Documentation | ApplicationDefinition | WidgetSet
Container
A Container in a WidgetSet defines a container for Widgets. There are currently three different types of containers, Toolbar, ContextMenu and Splitterbar.
A WidgetSet may specify zero or more Containers.
Containers are provided as a convenience for creating user interface elements that are displayed as a toolbar of buttons, menus and split containers. A Container contains the following sub-tags:
- Name. Required. This is the HTML id of an element (typically a DIV) that the Toolbar is to be created within. More than one Toolbar can be assigned to the same container.
- Type. Required. This is the type of the Container and must be one of:
- Toolbar. A horizontally or vertically oriented toolbar intended to contain buttons that activate widgets.
- ContextMenu. A menu that can be associated with widgets that have menus. Currently this is the MapWidget and the TaskPane widget.
- Splitterbar. A horizontally oriented container that is split into sub containers to hold each of the Items in the container. The sub containers are initially spaced equally in the available space, and the size of the containers can be changed by the user by dragging a small vertical bar between each of the containers.
- Position. Optional. For Toolbar containers, this specifies the orientation of the toolbar. It can be one of the following:
- top. The toolbar is oriented horizontally and menu items open down.
- bottom. The toolbar is oriented horizontally and menu items open up.
- left. The toolbar is oriented vertically and menu items open to the right.
- right. The toolbar is oriented vertically and menu items open to the left.
- Item. Optional. The Item tags define what goes in the container. The Item tag is described in the next section.
Item
An Item tag contains at least one sub tag, Function, which defines what the item is. The valid values for Function are:
- Separator
- Widget
- Flyout
Separator
A Separator Item has no other tags and defines a visual separator in a Toolbar or Menu.
Widget
A Widget Item has one other sub tag, Widget, which identifies a Widget to be placed in the Container. The value of the Widget tag is matched with the Widget's Name tag.
Flyout
A Flyout represents a menu or sub menu. A Flyout may contain another Flyout Item. A Flyout Item has several sub tags and contains any number of Item tags. :
- Label. This is the label placed in the button that triggers the menu to open.
- Tooltip. This is displayed as a tooltip when the user hovers the mouse over the menu button.
- ImageUrl. This is a URL to an image to place in the button that opens the menu
- ImageClass. This is a CSS class name to put on the Image. This is typically left blank as buttons can be styled in other ways.
- Item. This can occur many times and contain any valid Item tag.
Examples
Toolbar Example
A toolbar with one widget and one flyout.
<Container> <Name>MainToolbar</Name> <Type>Toolbar</Type> <Position>top</Position> <Item> <Function>Widget</Function> <Command>ZoomIn</Command> </Item> <Item> <Function>Flyout</Function> <Item> <Function>Flyout</Function> <Label>Menu</Label> <Tooltip/> <ImageUrl/> <ImageClass/> <Item> <Function>Widget</Function> <Widget>ZoomOut</Widget> </Item> </Item> </Container>