The Menu Editor generates a resource method of the menu specification
in the category menu specs of the class protocol, which returns
a symbolic representation (literal array) of the menus components and their
behavior. The menu resource methods are invoked by the UIBuilder
when the applications window is created for those widgets which define
a menu aspect.
| Menu | Button | Description |
| File/New | Creates a new menu spec. | |
| File/Load | Opens a dialog to load a menu spec from a class. | |
| File/Save | Saves current menu spec and if modified the help spec. | |
| Edit/Cut | Cuts the selected item(s) and places it to the clipboard. | |
| Edit/Copy | Copies the selected item(s) to the clipboard. | |
| Edit/Paste | Pastes the contents of the clipboard. | |
| Edit/Delete | Delete the selected item(s). | |
| Edit/Move Up | Moves the selected item one step up. | |
| Edit/Move Down | Moves the selected item one step down. | |
| Edit/Move Into | Moves the selected item into next item as child item. | |
| Edit/Move Out | Moves the selected item out of its parent item. | |
| Add/Menu Item | Adds a new menu item. | |
| Add/Menu Separator | Adds a new separator. | |
| Add/Submenu | Adds a new sub menu. | |
| Add/Submenu Link | Adds a new linked sub menu. | |
| File Menu | Description |
| File/Save As | Opens a dialog to select or create a class and selector in order to save current menu spec. |
| File/Pick A Menu... | Changes the cursor to cross hair for moving it over another menu view to load its menu spec. |
| File/Browse Class | Opens a System Browser on current class and selector. |
| File/Exit | Exits the Menu Editor. |
| Test Menu | Description |
| Test/... | Shows a menu preview of the current menu spec. |
After creating or loading of a menu specification the menu and its components are displayed in the tree view on the left side of the Menu Editor. The root item of the tree represents the menu itself. This single item is always shown, even if no menu is loaded. The only purpose of this item is to hold the menu specs selector. This selector must also be defined as the menu selector of the corresponding component in the GUI Painter.
Basic Properties:
| Selector | Selector under which the generated menu spec is saved. |
The main attribute of a menu item is its action selector; this specifies
the name of a method (in your application) which is invoked when the item
is selected.
Basic Properties:
| Name Key | Unique identifier of the item (optional). |
| Label | Label of the item. |
| Action | The name (i.e. selector) of the method which
is invoked when the item is selected.
Typically, the selector specifies a zero-argument method name. However, if the selector is for a one-argument method, the argument passed is: - the 'argument' fields value (see below) if not empty - otherwise, the boolean toggle state, if the item has an indication. - otherwise, the menu item itself. |
| Argument | An argument passed to above selector, if it is a 1 argument selector. |
| Indication | If defined, the menu item is displayed as
a check toggle.
Typically, the name of a method (in your application) is specified here, which returns a Boolean instance or a boolean ValueHolder. However, it is also possible to place a boolean ValueHolder or a Block which returns a Boolean instance into the applications aspect bindings directory (instead of defining a method). Choice and Indication are mutually exclusive. |
| Choice | If defined, the menu item is displayed as
a radio button.
Typically, the name of a method (in your application) is specified here, which returns a ValueHolder. Choice and Indication are mutually exclusive. |
| Value | Defines the choice-value, if the item was
defined as a choice item (i.e. the choice field is non-empty).
This is the value which is placed into the choice value holder, whenever the item is selected. |
| Translate Label | Turns on/off translation behavior of the label via the application classes resource file (i.e. national strings). |
| Is Button | If on, the item is displayed as a button; if off, it is displayed as a normal menu item. Setting this flag for all items results in a menu which looks like a button panel (as in the launcher). |
| Hide after Activation | If on, the menu hides itself (i.e. closes) when
the item is activated.
If off, it remains open. Turing it off only makes sense with checkBox and radioButton items; (i.e. with non-empty indication or choice aspects) |
| BusyCursor while active | If on, a wait-cursor is shown in the
application while the items action is performing. |
| Accelerator | Shortkey to select the menu item from the
keyboard.
Typically something like Altx or Ctrlx is defined here. |
| Enabled | A boolean ValueHolder to enable/disable the menu item. |
| Visibility | A boolean ValueHolder which controls the visibility of the menu item. |
| Aux Value | An arbitrary value, which is stored in the item,
and can be used to mark labels or pass additional information. Can only be extracted programatically (i.e. by scanning the menus items) |
| Start Group | Indicates whether this item starts a new item
group. Currently, the only supported group attribute is right, which
places this item group towards the right border of the menu.
Additional group properties are planned in the future. |
| Access Character Position | Index of the access character position of
the textual label (optional).
This character will be underlined. WARNING: If labels are translated (to national variants), the usefulness of this field is very limited. Therefore, we recommend leaving this field blank, and using an ambersant character in the items label instead. |
| Retriever | Typically, the class implementing the image
resource method.
If no class is given, the current application class will be asked for the image. |
| Selector | Selector of the method returning the image. |
| Image & Label | Turns on/off displaying both image and textual label. |
-> see document "Using the Help Tool"
Separators are used to structure a menu into groups.
Basic Properties:
| Separator | List of valid separators. There are currently 3 types of separators available: blanks, single lines, and double lines. |
Sub Menus are containers holding other (sub) menu items.
Basic Properties:
| Name Key | -> see menu item |
| Label | -> see menu item |
| Translate Label | -> see menu item |
To avoid very large menu specifications, linked submenus can be used to embed submenus provided by other menu resource methods or value holders. Using linked submenus, it is possible to build a menu by assembling a base menu frame with reusable submenu building blocks.
Basic Properties:
| Name Key | -> see menu item |
| Label: | -> see menu item |
| Menu | A selector or a ValueHolder instance providing the submenu to be opened if the item is selected. |
| Argument | An optional argument which is passed with
the above menu selector
(selector must be for a one-argument method). |
| Translate Label | -> see menu item |
Copyright © 1998 eXept Software AG, all rights reserved