Gtk-- Reference: Gtk::Menu

Class Index | Cross Index | Namespace Index

# Class Gtk::Menu

A drop down menu widget.
Contained in: Gtk
Derived from: Gtk::MenuShell
Derived by: none

#include <gtk--/menu.h>

### public function member index:
`` | `Menu` | `()`;
``void`` | `detach` | `()`;
``AccelGroup`*` | `ensure_uline_accel_group` | `() `const``;
``AccelGroup`*` | `get_accel_group` | `() `const``;
``MenuItem`*` | `get_active` | `() `const``;
``Widget`*` | `get_attach_widget` | `() `const``;
``AccelGroup`*` | `get_uline_accel_group` | `() `const``;
``GtkMenu`*` | `gtkobj` | `()`;
``const` `GtkMenu`*` | `gtkobj` | `() `const``;
``static` `bool`` | `isA` | `(`Object`* `object`)`;
``bool`` | `is_torn_off` | `() `const``;
``void`` | `popdown` | `()`;
``void`` | `popup` | `(`MenuShell`& `parent_menu_shell`, `MenuItem`& `parent_menu_item`, `GtkMenuPositionFunc` `func`, `gpointer` `data`, `guint` `button`, `guint32` `activate_time`)`;
``void`` | `popup` | `(`GtkMenuPositionFunc` `func`, `gpointer` `data`, `guint` `button`, `guint32` `activate_time`)`;
``void`` | `popup` | `(`guint` `button`, `guint32` `activate_time`)`;
``void`` | `reorder_child` | `(`const` `MenuItem`& `child`, `gint` `position`)`;
``void`` | `reposition` | `()`;
``void`` | `set_accel_group` | `(`AccelGroup`* `accel_group`=0)`;
``void`` | `set_accel_group` | `(`AccelGroup`& `accel_group`)`;
``void`` | `set_active` | `(`gint` `index`)`;
``void`` | `set_tearoff_state` | `(`bool` `torn_off`)`;
``void`` | `set_title` | `(`const` `nstring`& `title`)`;
``virtual`` | `~Menu` | `()`;
### protected function member index:
``void`` | `attach_to_widget` | `(`Widget`& `widget`, `GtkMenuDetachFunc` `detacher`)`;

## Description:

A `Gtk::Menu` is a `Gtk::MenuShell` that implements a drop down menu consisting of a list of `Gtk::MenuItem` objects which can be navigated and activated by the user to perform application functions.

A `Gtk::Menu` is most commonly dropped down by activating a `Gtk::MenuItem` in a `Gtk::MenuBar` or popped up by activating a `Gtk::MenuItem` in another `Gtk::Menu`.

A `Gtk::Menu` can also be popped up by activating a `Gtk::OptionMenu`. Other composite widgets such as the `Gtk::Notebook` can pop up a `Gtk::Menu` as well.

Applications can display a `Gtk::Menu` as a popup menu by calling the `` function.

## Function Member Descriptions:

Gtk::Menu::gtkobj - Returns the underlaying gtk+ object.

``GtkMenu`*` `gtkobj``()`;
Gtk::Menu::isA - Returns true if object is this type.

``static` `bool`` `isA``(`Object`* `object`)`;
Gtk::Menu::popdown - Hides the menu away

``void`` `popdown``()`;
Gtk::Menu::popup - Display the menu on screen

``void`` `popup``(`MenuShell`& `parent_menu_shell`, `MenuItem`& `parent_menu_item`, `GtkMenuPositionFunc` `func`, `gpointer` `data`, `guint` `button`, `guint32` `activate_time`)`;
Gtk::Menu::popup - popup a floating menu

``void`` `popup``(`guint` `button`, `guint32` `activate_time`)`;