While it is possible to construct your own main window, the Motif toolkit provides the -special−purpose
MainWindow widget, which supports the recommended style. All of the elements in the MainWindow are optional, so
an application can use it to display just the areas that it requires. The MainWindow widget is described in detail in
Chapter 4, The Main Window.
4.4.2 Menus
Motif supports three different styles of menus. PulldownMenus that are displayed from the MenuBar in a
MainWindow are the most common type of menu. A PulldownMenu is displayed when the user selects a
CascadeButton in the MenuBar. The menu pane is displayed below the CascadeButton. the figure shows a typical
MenuBar and PulldownMenu.
A MenuBar and an associated PulldownMenu
An item in a PulldownMenu can have a cascading menu associated with it. The cascading menu is displayed to the
right of the menu item as shown in the figure, so these menus are sometimes referred to as pullright menus.
4 Overview of the Motif Toolkit 4.4.2 Menus
61
Get Volume 6A: Motif Programming Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.