logo top
Main Page   Widgets   Namespaces   Book  

Gtk::Menu Class Reference
[WidgetsMenu classes]

A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated by the user to perform application functions. More...

Inheritance diagram for Gtk::Menu:

Inheritance graph
[legend]
List of all members.

Public Types

typedef SigC::Slot3< void,
int&, int&, bool& > 
SlotPositionCalc
 void on_menu_position(int&, int&, bool& push_in);


Public Member Functions

virtual ~Menu ()
GtkMenu* gobj ()
 Provides access to the underlying C GtkObject.

const GtkMenu* gobj () const
 Provides access to the underlying C GtkObject.

 Menu ()
void popup (MenuShell& parent_menu_shell, MenuItem& parent_menu_item, GtkMenuPositionFunc func, gpointer data, guint button, guint32 activate_time)
void popup (const SlotPositionCalc& position_calc_slot, guint button, guint32 activate_time)
 Displays a menu and makes it available for selection.

void popup (guint button, guint32 activate_time)
 Displays a menu and makes it available for selection.

void reposition ()
void popdown ()
MenuItemget_active ()
const MenuItemget_active () const
void set_active (guint index)
void set_accel_group (const Glib::RefPtr<AccelGroup>& accel_group)
void unset_accel_group ()
Glib::RefPtr<AccelGroupget_accel_group ()
void set_accel_path (const Glib::ustring& accel_path)
void detach ()
Widgetget_attach_widget ()
const Widgetget_attach_widget () const
void set_tearoff_state (bool torn_off=true)
bool get_tearoff_state () const
void set_title (const Glib::ustring& title)
void unset_title ()
Glib::ustring get_title () const
void set_screen (const Glib::RefPtr<Gdk::Screen>& screen)
void reorder_child (const MenuItem& child, int position)
Glib::PropertyProxy<Glib::ustring> property_tearoff_title ()

Protected Member Functions

void attach_to_widget (Widget& widget, GtkMenuDetachFunc detacher)

Related Functions

(Note that these are not member functions.)

Gtk::Menuwrap (GtkMenu* object, bool take_copy=false)

Detailed Description

A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated by the user to perform application functions.

Menus are normally placed inside a Gtk::MenuBar or another MenuItem as a sub menu. A Menu can also be popped up, for instance as a right-click context menu, by calling the popup() method. See also Gtk::OptionMenu.


Member Typedef Documentation

typedef SigC::Slot3<void, int&, int&, bool&> Gtk::Menu::SlotPositionCalc
 

void on_menu_position(int&, int&, bool& push_in);


Constructor & Destructor Documentation

virtual Gtk::Menu::~Menu (  )  [virtual]
 

Gtk::Menu::Menu (  ) 
 


Member Function Documentation

void Gtk::Menu::attach_to_widget ( Widget widget,
GtkMenuDetachFunc  detacher
[protected]
 

void Gtk::Menu::detach (  ) 
 

Glib::RefPtr<AccelGroup> Gtk::Menu::get_accel_group (  ) 
 

const MenuItem* Gtk::Menu::get_active (  )  const
 

MenuItem* Gtk::Menu::get_active (  ) 
 

const Widget* Gtk::Menu::get_attach_widget (  )  const
 

Widget* Gtk::Menu::get_attach_widget (  ) 
 

bool Gtk::Menu::get_tearoff_state (  )  const
 

Glib::ustring Gtk::Menu::get_title (  )  const
 

const GtkMenu* Gtk::Menu::gobj (  )  const [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::MenuShell.

GtkMenu* Gtk::Menu::gobj (  )  [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::MenuShell.

void Gtk::Menu::popdown (  ) 
 

void Gtk::Menu::popup ( guint  button,
guint32  activate_time
 

Displays a menu and makes it available for selection.

Applications can use this function to display context-sensitive menus. The default menu positioning function will position the menu at the current pointer position.

Parameters:
button The button which was pressed to initiate the event.
activate_time The time at which the activation event occurred.

void Gtk::Menu::popup ( const SlotPositionCalc position_calc_slot,
guint  button,
guint32  activate_time
 

Displays a menu and makes it available for selection.

void Gtk::Menu::popup ( MenuShell parent_menu_shell,
MenuItem parent_menu_item,
GtkMenuPositionFunc  func,
gpointer  data,
guint  button,
guint32  activate_time
 

Glib::PropertyProxy<Glib::ustring> Gtk::Menu::property_tearoff_title (  ) 
 

void Gtk::Menu::reorder_child ( const MenuItem child,
int  position
 

void Gtk::Menu::reposition (  ) 
 

void Gtk::Menu::set_accel_group ( const Glib::RefPtr<AccelGroup>&  accel_group  ) 
 

void Gtk::Menu::set_accel_path ( const Glib::ustring&  accel_path  ) 
 

void Gtk::Menu::set_active ( guint  index  ) 
 

void Gtk::Menu::set_screen ( const Glib::RefPtr<Gdk::Screen>&  screen  ) 
 

void Gtk::Menu::set_tearoff_state ( bool  torn_off = true  ) 
 

void Gtk::Menu::set_title ( const Glib::ustring&  title  ) 
 

void Gtk::Menu::unset_accel_group (  ) 
 

void Gtk::Menu::unset_title (  ) 
 


Friends And Related Function Documentation

Gtk::Menu* wrap ( GtkMenu*  object,
bool  take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm2.2 by Doxygen 1.3.3 © 1997-2001