|
Calling Sequence
|
|
Menu(opts, element_content)
Menu[refID](opts, element_content)
|
|
Parameters
|
|
opts
|
-
|
equation(s) of the form option=value where option is one of background, caption, enabled, font, foreground, image, reference, or visible; specify options for the Menu element
|
element_content
|
-
|
any number of CheckBoxMenuItem, Menu, MenuItem, MenuSeparator, or RadioButtonMenuItem elements; nested Menu elements create submenus
|
refID
|
-
|
name or string; reference to the element
|
|
|
|
|
Description
|
|
•
|
The Menu menu element defines a menu in a menu bar.
|
•
|
The Menu element features can be modified by using options. To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.
|
Elements, Symbols, or Types
|
Assumed Option or Content
|
|
|
Image element
|
image option
|
string or symbol
|
caption option
|
|
|
|
|
•
|
A Menu element can contain any number of CheckBoxMenuItem, Menu, MenuItem, MenuSeparator, or RadioButtonMenuItem elements. A Menu element can contain a Font element to specify the font option and an Image element to specify the image option.
|
•
|
A Menu element can be contained in a Menu, MenuBar, or PopupMenu element.
|
•
|
The following table describes the control and use of the Menu element options.
|
|
An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).
|
|
An x in the R column indicates that the option is required in the calling sequence.
|
|
An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.
|
|
An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.
|
Option
|
I
|
R
|
G
|
S
|
|
|
|
|
|
caption
|
x
|
x
|
x
|
x
|
background
|
x
|
|
x
|
x
|
enabled
|
x
|
|
x
|
x
|
font
|
x
|
|
|
|
foreground
|
x
|
|
x
|
x
|
image
|
x
|
|
|
|
reference
|
x
|
|
|
|
visible
|
x
|
|
x
|
x
|
|
|
|
|
|
|
|
•
|
The opts argument can contain one or more of the following equations that set Maplet application options.
|
|
The color of the highlights of the menu. This can be a recognized color name, an RGB color structure, or a string of the form "#RRGGBB" where each pair is a two-digit hexadecimal number.
|
|
caption = string or symbol
|
|
The caption that appears on the menu. The caption can have a mnemonic key or access key associated with it. For more information, see Maplets Mnemonic Key.
|
|
Whether a menu can be selected. If enabled is set to false, the menu is dimmed, and any action associated with it cannot be initiated. By default, the value is true.
|
|
font = Font element or reference to a Font element (name or string)
|
|
The text font in the menu.
|
|
The face color of the menu.
|
|
image = Image element or reference to an Image element (name or string)
|
|
A reference to an Image element.
|
|
reference = name or string
|
|
A reference for the Menu element.
|
|
If the reference is specified by both an index, for example, Menu[refID], and a reference in the calling sequence, the index reference takes precedence.
|
|
Whether the menu is visible to the user. By default, the value is true.
|
|
|
Examples
|
|
>
|
|
>
|
|
|
|
|