Menu Types (XForms (Forms Library) - Version 1.2 (Rev. 4) A Graphical User Interface Toolkit for X)

Next: Menu Interaction, Previous: Adding Menu Objects, Up: Menu Object [Contents][Index]

#### 23.2.2 Menu Types

The following types are available:

`FL_PUSH_MENU`

  The menu appears when the user presses a mouse button on it.

`FL_PULLDOWN_MENU`

  The menu appears when the user presses a mouse button on it.

`FL_TOUCH_MENU`

  The menu appears when the user move the mouse inside it.

`FL_PUSH_MENU` and `FL_PULLDOWN_MENU` behave rather similar. When you click on a `FL_PUSH_MENU` per default a pop-up window gets opened on top of the `FL_PUSH_MENU` menu’s box that has a label at the top, indicating the currently selected menu item. The pop-up window stays open until you either select an item or press a mouse button somewhere outside the pop-up window.

When you click on `FL_PULLDOWN_MENU` also a pop-up window is shown, but directly below the menu’s box. This pop-up window has no label and it only stays open until you release the mouse button.

`FL_PUSH_MENU` and `FL_PULLDOWN_MENU` can be made even more similar by using the `fl_set_menu_notitle()` function (see below). This changes it’s properties so that the pop-up window also appears below the menu’s box and that no label is shown in the pop-up window. The only remaining difference then is that a `FL_PUSH_MENU` only gets closed when a menu item is selected or the user presses the mouse outside of the pop-up window while a `FL_PULLDOWN_MENU` also gets closed when the mouse button is released.