| 1 |
This demonstrates one way to set up and use Motif pulldown menus. |
| 2 |
|
| 3 |
There are two menus, File and Edit. |
| 4 |
The File menu has several items, including a separator line, |
| 5 |
and keyboard accelerators for the menu items. |
| 6 |
The Edit menu also has several items, but rather than simple push |
| 7 |
button items, this menu has a toggle button and three radio buttons. |
| 8 |
|
| 9 |
Menus can be in the popup planes or the normal planes. |
| 10 |
When in the popup planes, they show and hide without forcing |
| 11 |
a redraw of the entire scene. However, they are limited in the |
| 12 |
number of colors they can have. For instance, toggle buttons on |
| 13 |
menus in the normal planes can be colored yellow for easy visiblity, |
| 14 |
but in the popup planes have no color, and are more difficult to see. |
| 15 |
When there is a complicated scene, though, it is best to have the |
| 16 |
menus in the popup planes. (All viewers put menus in the popup planes.) |
| 17 |
|
| 18 |
The src file has a #define MENUS_IN_POPUP which forces the menus |
| 19 |
into the popup planes. Removing this causes the menus to appear in |
| 20 |
the normal planes. |