You are not logged in! Log in or Register

File format

CityLive Widget files are essentially XML files. A barebone widget looks like this: The root element of a widget is . This element has to attributes:

<?xml version="1.0" standalone="yes" ?>
<DrawnXmlWidget PreferredDisplayMode="Block1x1" Name="" LanguageVersion="1">
	<Global></Global>
	<WidgetMode></WidgetMode>
	<FullScreenMode></FullScreenMode>
</DrawnXmlWidget>
  • PreferredDisplayMode: this indicates the preferred size for widget mode displaying. Possible values are : Block1x1 | Block1x2 | Block 2x1 | Block2x2 indicating the number of screen blocks requested in the vertical and horizontal direction.
  • Name (optional): the name of the widget.
  • LanguageVersion (integer): should be set to "1" for all widgets following this specification.

Within the root element, three parts can be identified:

WidgetMode

This part contains all the elements specific for the widget representation of the widget. In widgetmode, no user input is possible.

FullScreenMode

This part contains all the elements specific for the fullscreen representation of the widget.

Global

The elements contained in WidgetMode and FullScreenMode are created resp. disposed of when switching between display modes. Subsequently, the data contained in these elements is lost. Sometimes you wish to preserve data or elements between display mode switches. Elements placed in the Global section are created when the widget is opened and will remain so untill the entire widget is closed.