User Interface Description Reference

This chapter provides a discussion of an overview, elements, and attributes of user interface description's namespace.

1. Overview

Provides a discussion of an overview of user interface description's namespace.

1.1. Features and Usage

Namespace that describes user interface such as main menu, context menu, and toolbar in order to edit an XML document in the canvas.

1.2. Namespace URI Reference

The URI reference of user interface description's namespace is http://xmlns.xfytec.com/ui. In the following discussion, use the namespace prefix "ui:" in order to describe the elements of the user interface description.

Also, we use the following namespaces and their prefixes in the descriptions below.

  • VC Core
    We use xvcd: as the namespace prefix.
    For more information, see the VC Core Reference.

2. Elements and Attributes Defined in the User Interface Description's Namespace

Provides a discussion of elements and attributes defined in the user interface description's namespace.

2.1. Root Element

The root element of user interface description's namespace is ui:ui element.

ui:ui Element

Root element to describe user interface. One element can be specified within the xvcd:vocabulary element. Optional. Within the element, describe the setting of the menu and toolbox corresponding to the vocabulary.

Attribute:
version (mandatory)

Sets the version number of the namespace for the user interface description. This must be 1.0.

Content:

Within the ui:ui element, be sure to describe it by combining one or more of the following elements:

2.2. Menu

Elements and attributes used to describe the menu are listed below.

ui:context-menu Element

Used to describe the content of a context menu.

Attribute:

No attributes for the element.

Content:

Within the ui:context-menu element, be sure to describe it by combining one or more of the following elements:

2.3. Tool Bar

Elements and attributes used to describe the toolbar are listed below.

ui:tool-bar Element

Describes toolbar content.

Attribute:

No attributes for the element.

Content:

Within the ui:tool-bar element, be sure to describe it by combining one or more of the following elements:

ui:tool-list Element

Used to describe a list box containing many buttons, where user can select one of them to execute. For icon and text displayed in this list box, the icon of the button that is contained in it is used.

Attribute:
label

Specifies a label string of a button in list box format. It can be any string. However, as the strings beginning with # is internally reserved. To describe the strings beginning with #, describe beginning # as ## therefore: This label string is used for a tool tip of a button in list box format.

Either the label attribute or the resource-key attribute is mandatory. If both of them are specified, the resource-key attribute takes precedence.

If omitted, the string specified in the resource-key attribute is used.

resource-key

Specifies the resource key of the string when retrieving the label string of the button in list box format from the string resource. It can be any string.

Either the label attribute or the resource-key attribute is mandatory. If both of them are specified, the resource-key attribute takes precedence.

If omitted, the string specified in the label attribute is used.

Content:

The elements that can be specified within the ui:tool-list element are listed below.

ui:tool-button Element

Used to describe a toolbar button.

Attribute:
label

Specifies toolbar label string. It can be any string. However, as the strings beginning with # is internally reserved. To describe the strings beginning with #, describe beginning # as ## therefore:

Either the label attribute or the resource-key attribute is mandatory. If both of them are specified, the resource-key attribute takes precedence.

If omitted, the string specified in the resource-key attribute is used.

resource-key

Specifies the resource key of the string when retrieving the label string of the tool bar from the string resource.

Either the label attribute or the resource-key attribute is mandatory. If both of them are specified, the resource-key attribute takes precedence.

If omitted, the string specified in the label attribute is used.

command

Specifies the command to be executed when button is clicked. Specify the command name defined within the name attribute of the xvcd:command element or the command name provided by a platform.

If omitted, the command instruction column described within the element is executed. If both the command attribute and command instruction column are described at the same time, the specification within the command attribute takes precedence, and the command instruction column is ignored.

icon

Specifies the icon to be displayed in a button. It can be a URL string.

If omitted, a button which has a string specified within the resource-key attribute or the label attribute on its face is created.

Content:

The contents that can be specified within the ui:tool-button element are listed below.

2.4. Separator

A separator can be inserted in a menu or tool bar.

ui:separator Element

Used to insert a separator in a menu or tool bar.

Attribute:

No attributes for the element.

Content:

The ui:separator element is empty.

2.5. Key Accelerator

Changes key accelerator settings.

ui:accelerators Element

ui:accelerators element is the container of ui:accelerator.

Attribute:

No attributes for the element.

Content:

The elements that can be specified within the ui:accelerators element are listed below.

  • ui:accelerator Element
    Key accelerator settings can be described. Any number of elements can be specified, if needed. Optional.

ui:accelerator Element

Indicates key accelerator settings. The combination of keys and the executed command can be described.

Attribute:
key-sequence (mandatory)

Specifies the accelerator key to invoke a command by key operation during editing in the canvas. It can be a string. Specify the combination of keys in the same format as the accelerator attribute of the ui:menu-item element.

command

Specifies the command executed when the key operation that is specified within the key-sequence attribute is performed. Specify the command name defined within the name attribute of the xvcd:command element or the command name provided by a platform.

If omitted, the command instruction column described within the element is executed. If both the command attribute and command instruction column are described at the same time, the specification within the command attribute takes precedence, and the command instruction column is ignored.

Content:

The contents that can be specified within the ui:accelerator element are listed below.

2.6. Import of the User Interface Description

The user interface definition described in another file can be imported.

ui:import Element

Used to import the user interface definition described in another file.

Attribute:
href (mandatory)

Specifies the file in which the user interface definition to be imported is described. It can be a URL string.

Content:

The ui:import element is empty.

2.7. Specification of User Interface Item Added

You can add user interface items as necessary.

ui:mount Element

Adds a user interface item when the user agent is enabled to be added to a menu or tool bar.

Attribute:
name (mandatory)

Describes the name specified at the position where the user interface item of the user agent is added. It can be QName.

Content:

Within the ui:mount element, be sure to describe it by combining one or more of the following elements:

2.7.1. List of Defined Mount Point

The following table shows the defined mount point that can be described in XVCD.

Name Location UI item to be added
ui:main-menu-file [File] of main menu ui:menu, ui:menu-item, ui:separator
ui:main-menu-edit [Edit] of main menu ui:menu, ui:menu-item, ui:separator
ui:main-menu-view [Display] of main menu ui:menu, ui:menu-item, ui:separator
ui:main-menu The top tier of main menu ui:menu, ui:menu-item, ui:separator
ui:main-menu-tools [Tool] of main menu ui:menu, ui:menu-item, ui:separator
ui:main-menu-help [Help] of main menu ui:menu, ui:menu-item, ui:separator
ui:tool-bar Tool Bar ui:tool-list, ui:tool-button, ui:separator
ui:context-menu Context Menu ui:menu, ui:menu-item, ui:separator

2.8. Command Parameter Specification

Allows you to specify command parameters.

ui:with-param Element

Used to specify the parameter to be passed to a command.

Attribute:
name (mandatory)

Specifies the parameter name. It can be QName. As to the parameter name to specify, describe the name set within the name attribute of the instruction:param element described within the xvcd:command element.

Content:

The content to be passed to a command as a parameter can be specified within the ui:with-param element. It can be PCDATA string.