Class GTK1.Menu
- Description
A GTK1.Menu is a W(MenuShell) that implements a drop down menu consisting of a list of W(MenuItem) objects which can be navigated and activated by the user to perform application functions.
A GTK1.Menu is most commonly dropped down by activating a W(MenuItem) in a W(MenuBar) or popped up by activating a W(MenuItem) in another GTK1.Menu.
A GTK1.Menu can also be popped up by activating a W(OptionMenu). Other composite widgets such as the W(Notebook) can pop up a GTK1.Menu as well.
Applications can display a GTK1.Menu as a popup menu by calling the popup() function. The example below shows how an application can pop up a menu when the 3rd mouse button is pressed.
GTK1.Menu menu = create_menu(); GTK1.Window window = create_window(); window->signal_connect( "button_press_event", lambda(GTK1.Menu m, GTK1.Window w, mapping e ) { if( e->button == 3 ) menu->popup(); }, menu );
- Inherit MenuShell
inherit GTK1.MenuShell : MenuShell
- Method create
GTK1.Menu GTK1.Menu()
- Description
Create a new GTK1.Menu widget.