POPUPtext[[optionlist]]
BEGIN
itemdefinitions
END
This statement marks the beginning of the definition of a pop-up menu. A pop-up menu (which is also known as a drop-down menu) is a special menu item that displays a sublist of menu items when it is selected.
The text field takes an ASCII string, enclosed in double quotation marks, that specifies the name of the pop-up menu.
The optional optionlist field takes one or more predefined menu options that specify the appearance of the menu item. The menu options are as follows:
CHECKED
Item has a check mark next to it. This option is not valid for a top-level pop-up menu.
GRAYED
Item name is initially unavailable and appears on the menu in gray or a lightened shade of the menu-text color.
INACTIVE
Item name is displayed, but it cannot be selected.
MENUBARBREAK
Same as MF_MENUBREAK except in pop-up menus, where it separates the new column from the old column with a vertical line.
MENUBREAK
Static menu-bar items
Item is placed on a new line.
Pop-up menu items
Item is placed in a new column, with no dividing line between columns.
The options can be combined using the bitwise inclusive OR operator. The INACTIVE and GRAYED options cannot be used together.
The itemdefinitions field can specify any number of MENUITEM or POPUP statements. As a result, any pop-up menu item can display another pop-up menu.
The following example demonstrates the correct usage of the POPUP statement:
chem MENU
BEGIN
POPUP “&Elements”
BEGIN
MENUITEM “&Oxygen”, 200
MENUITEM “&Carbon”, 201, CHECKED
MENUITEM “&Hydrogen”, 202
MENUITEM “&Sulfur”, 203
MENUITEM “Ch&lorine”, 204
END
POPUP “&Compounds”
BEGIN
POPUP “&Sugars”
BEGIN
MENUITEM “&Glucose”, 301
MENUITEM “&Sucrose”, 302, CHECKED
MENUITEM “&Lactose”, 303, MENUBREAK
MENUITEM “&Fructose”, 304
END
POPUP “&Acids”
BEGIN
“&Hydrochloric”, 401
“&Sulfuric”, 402
END
END
END