Class Index Cross Index Namespace Index

Class Gtk::MenuShell

A base class for menu objects.
Contained in: Gtk
Derived from: Gtk::Container
Derived by: Gtk::Menu Gtk::MenuBar

#include <gtk--/menushell.h>


public function member index:

void accelerate(Gtk::Window&);
signal void activate_current(gboolean);
void activate_item(MenuItem& menu_item, bool force_deactivate);
void append(MenuItem& menu_item);
signal void cancel();
emitable signal void deactivate();
void deselect();
AccelGroup* get_accel_group() const;
GtkMenuShell* gtkobj();
const GtkMenuShell* gtkobj() const;
void insert(MenuItem& menu_item, gint position);
static bool isA(Object* object);
MenuList& items();
const MenuList& items() const;
signal void move_current(GtkMenuDirectionType);
void prepend(MenuItem& menu_item);
void select_item(MenuItem& menu_item);
signal void selection_done();
virtual ~MenuShell();
 

protected function member index:

MenuShell(void);
virtual void activate_current_impl(gboolean p0);
virtual void cancel_impl();
virtual void deactivate_impl();
virtual gint event_impl(GdkEvent*);
virtual void move_current_impl(GtkMenuDirectionType p0);
virtual void realize_impl();
virtual void selection_done_impl();
 

Description:

A Gtk::MenuShell is the abstract base class used to derive the Gtk::Menu and Gtk::MenuBar subclasses.

A Gtk::MenuShell is a container of Gtk::MenuItem objects arranged in a list which can be navigated, selected, and activated by the user to perform application functions. A Gtk::MenuItem can have a submenu associated with it, allowing for nested hierarchical menus.


Function Member Descriptions:

Gtk::MenuShell::accelerate - assign the menu to a window

void accelerate(Gtk::Window&);
Use this function to assign a popup menu to act as keyboard accelerators for a window. A popup menu is one which acts without a parent.

This function has no gtk+ equivelent. In gtk+, you create an accelerator group and then create items with the group then later assign the group to the window. To automate this and save passing arround the group, assignment of accelerators is held off until you assign the menu to its window.

It is not necessary to call this on menubars as they perform this automatically.



Gtk::MenuShell::activate_current - An action signal that activates the current menu item within the menu shell.

signal void activate_current(gboolean);
virtual void activate_current_impl(gboolean p0);

Gtk::MenuShell::activate_item - Activates the menu item within the menu shell.

void activate_item(MenuItem& menu_item, bool force_deactivate);
menu_item: The GtkMenuItem to activate.

force_deactivate: If TRUE, force the deactivation of the menu shell after the menu item is activated.



Gtk::MenuShell::append - (deprecated) append a MenuItem

void append(MenuItem& menu_item);

Gtk::MenuShell::cancel - An action signal which cancels the selection within the menu shell. Causes the {GtkMenuShell::selection-done} signal to be emitted.

signal void cancel();
virtual void cancel_impl();

Gtk::MenuShell::deactivate - This signal is emitted when a menu shell is deactivated.

emitable signal void deactivate();
virtual void deactivate_impl();

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

GtkMenuShell* gtkobj();

Gtk::MenuShell::insert - (deprecated) insert a MenuItem

void insert(MenuItem& menu_item, gint position);

Gtk::MenuShell::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::MenuShell::move_current - An action signal which moves the current menu item in the direction specified by direction.

signal void move_current(GtkMenuDirectionType);
virtual void move_current_impl(GtkMenuDirectionType p0);

Gtk::MenuShell::prepend - (deprecated) prepend a MenuItem

void prepend(MenuItem& menu_item);

Gtk::MenuShell::select_item - Selects the menu item from the menu shell.

void select_item(MenuItem& menu_item);
menu_item: The Gtk::MenuItem to select.


Gtk::MenuShell::selection_done - This signal is emitted when a selection has been completed within a menu shell.

signal void selection_done();
virtual void selection_done_impl();


Variable Member Descriptions: