In addition to simple items, a menu definition can contain the definition of a submenu. A submenu can itself invoke a lower level submenu.
──SUBMENU──────────────────────────────────
────string──,┬────┬,┬──────┬─,┬──────────┬─
└cmd─┘ └styles┘ └attributes┘
┌─────────────────────┐
│
┌──PRESPARAMS─statement─┴┐
────BEGIN──┴────────────────────────┴───────
┌────────────────────────┐
│
────────┬───MENUITEM─statement───┼──END────
│ │
└───SUBMENU─statement────┘
string (PCH)
To insert a double-quote character (") in the text, use two double-quote characters ("").
If the styles parameter does not contain MIS_TEXT, the string is ignored but must still be specified. An empty string ("") should be specified in this instance.
In the SUBMENU statement, the style MIS_SUBMENU is always ORed with the styles given. If no value is supplied, the default value of MIS_TEXT and MIS_SUBMENU is used.
Example:
MENU "chem"
BEGIN
SUBMENU "~Elements", 2, MIS_TEXT
BEGIN
MENUITEM "~Oxygen", 200, MIS_TEXT
MENUITEM "~Carbon", 201, MIS_TEXT,MIA_CHECKED
MENUITEM "~Hydrogen", 202, MIS_TEXT
END
SUBMENU "~Compounds", 3, MIS_TEXT
BEGIN
MENUITEM "~Glucose", 301, MIS_TEXT
MENUITEM "~Sucrose", 302, MIS_TEXT,MIA_CHECKED
MENUITEM "~Lactose", 303, MIS_TEXT|MIS_BREAK
MENUITEM "~Fructose", 304, MIS_TEXT
END
END