For this example pulldown menu system, the widgets have the relationships shown in the following table (where the children of a widget are indented from the parent). This table defines the widgets in the menu system, outlines widget hierarchical relationships, and assigns a label and widget handle (widget name) to each widget.
Widget Relationships
Widget
Menu Item
Label
PANEL
@P
PRINTER
@Prn
PULLDOWN MENU
MENU BUTTON
MENU SEPARATOR
CASCADE MENU
MENU BUTTON
MENU BUTTON
MENU BUTTON
CASCADE MENU
MENU TOGGLE
MENU TOGGLE
MENU TOGGLE
CASCADE MENU
MENU TOGGLE
MENU BUTTON
"PullDown_1"
"Button_1"
----------------
"Cascade_1"
"Item_1"
"Item_2"
"Item_3"
"Cascade_2"
"Toggle_1"
"Toggle_2"
"Toggle_3"
"Cascade_3"
"Toggle_1"
"Button_1"
@Pd1
@B11
@S12
@C13
@B131
@B132
@B133
@C14
@T141
@T142
@T143
@C144
@T1441
@T1442
PULLDOWN MENU
MENU BUTTON
MENU BUTTON
MENU BUTTON
"PullDown_2"
"Button_1"
"Button_2"
"Button_3
@Pd2
@B21
@B22
@B23
PULLDOWN MENU
MENU BUTTON
MENU BUTTON
MENU BUTTON
MENU SEPARATOR
MENU BUTTON
"PullDown_3"
"Button_1"
"Button_2"
"Button_3"
----------------
"QUIT"
@Pd3
@B31
@B32
@B33
@S34
@Quit
It is the hierarchical relationships of the widgets and the order in which they are created that defines the layout of the menu system. However, note the requirementfor ordering widgets to make sure they are in the proper sequence on the display only applies to each level of the menu system.
For example, consider the top-level PULLDOWN MENU widgets. You could create the widgets following the order in the table, and the three would be in the proper order. Or, you could create the three PULLDOWN MENU widgets and then go back and populate the lower-level widgets. The only requirement is that PullDown_1 is created beforePullDown_2, and that PullDown_2 is created before PullDown_3.