[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide



PulldownMenu

A PulldownMenu is always associated with another RowColumn. It becomes visible when the user activates a CascadeButton in the associated RowColumn. It becomes invisible when the user traverses upward or laterally in the menu hierarchy, activates a button in the hierarchy (other than a CascadeButton in the menu or a descendant), presses osfCancel, or clicks or releases a mouse button outside a menu item.

A PulldownMenu must have the following relations with other widgets:

  1. It must be the value of the XmNsubMenuId resource of the CascadeButton that is to post the menu.

  2. It must have a MenuShell as its parent. The Motif convenience routines that create PulldownMenus create MenuShell parents automatically. As with the PopupMenu, several different widgets may share a given Pulldown menu. One widget must serve as the parent of the MenuShell, but other widgets may be nominated with the XmAddToPostFromList(3) function.

  3. The MenuShell must have the proper parent, depending on the kind of RowColumn with which the PulldownMenu is associated. The MenuShell is a popup child of its own parent. Following are the required parents of the MenuShell:

    1. If the PulldownMenu is to be pulled down from a MenuBar, the parent must be the MenuBar.

    2. If the PulldownMenu is to be pulled down from a PopupMenu or another PulldownMenu, the parent must be that PopupMenu or PulldownMenu. Actually, the parent is the other menu's MenuShell; but the parent parameter to the Motif convenience routines that create PopupMenus must be the other menu itself (the RowColumn), not its MenuShell parent.

    3. If the PulldownMenu is to be pulled down from an OptionMenu, the parent must be the parent of the OptionMenu.

    4. [ Previous | Next | Contents | Glossary | Home | Search ]