Menu composition¶
Main menu bar |
The main menu bar is a horizontal line, positioned at the top of the window, immediately below the border and title (if any). Its position may not be altered. The menu bar is composed of the labels of all the items defined for the menu, in the order in which they are defined. By default, the first character of the first label appears in the second column of the window, and labels are separated from each other by the insertion of two spaces. The menu bar is continued on a second line if the labels are too long to fit in the window. Whenever control is passed to the menu bar, one item has focus. When the window is opened for the first time this is normally the first item listed. Otherwise it is the item which was last selected. |
Submenus |
Submenus drop down in a window when their parent item is selected. The subitem labels are listed in the order in which they are defined in the program code. The width of the submenu window is determined by the length of the subitem labels, and the height by the number of subitems. If the width or height of the subitem window are too great for it to fit in its natural display position, Sculptor automatically assigns a suitable position. The position of submenus may not be altered by the programmer. Submenus may be nested indefinitely. The menuline clause may be used to draw a horizontal line between subitems. Each item on a menu or submenu is either an option, or the parent of a submenu. An option which is a menu can be visually distinguished by a right arrow character at the end of the option label. The highlighted option is selected by means of a single left-click with the mouse. Items may also be selected by accelerator key or by hotkey. If the item has subitems, selecting it causes the submenu to open. If the item has no subitems, the function defined in the item’s select = clause is called. If the item has neither subitems nor a select = clause, selecting it has no effect. An item may be selected by pressing its accelerator key, if one has been assigned. |
RELATED TOPICS |