Ardour  9.0-pre0-582-g084a23a80d
Gtk::Menu_Helpers::MenuElem Class Reference

#include <menu_elems.h>

Inheritance diagram for Gtk::Menu_Helpers::MenuElem:
[legend]

Public Member Functions

 MenuElem (MenuItem &child)
 
 MenuElem (const Glib::ustring &label, const CallSlot &slot=CallSlot())
 
 MenuElem (const Glib::ustring &label, const AccelKey &key, const CallSlot &slot=CallSlot())
 
 MenuElem (const Glib::ustring &label, Gtk::Menu &submenu)
 
 MenuElem (const Glib::ustring &label, const AccelKey &key, Gtk::Menu &submenu)
 
- Public Member Functions inherited from Gtk::Menu_Helpers::Element
 Element ()
 
 Element (MenuItem &child)
 
 ~Element ()
 
const Glib::RefPtr< MenuItem > & get_child () const
 

Additional Inherited Members

- Public Types inherited from Gtk::Menu_Helpers::Element
typedef sigc::slot< void > CallSlot
 
- Protected Member Functions inherited from Gtk::Menu_Helpers::Element
void set_child (MenuItem *pChild)
 
void set_accel_key (const AccelKey &accel_key)
 
- Protected Attributes inherited from Gtk::Menu_Helpers::Element
Glib::RefPtr< MenuItemchild_
 

Detailed Description

Use this class and its subclasses to build menu items. For example,

m_Menu_File.items().push_back( Gtk::Menu_Helpers::MenuElem("_New",
sigc::mem_fun(*this, &ExampleWindow::on_menu_file_new) ) );

Definition at line 75 of file tk/ytkmm/ytkmm/gtkmm/menu_elems.h.

Constructor & Destructor Documentation

◆ MenuElem() [1/5]

Gtk::Menu_Helpers::MenuElem::MenuElem ( MenuItem child)

◆ MenuElem() [2/5]

Gtk::Menu_Helpers::MenuElem::MenuElem ( const Glib::ustring &  label,
const CallSlot slot = CallSlot() 
)

Create a labeled, non-accelerated MenuItem with a sigc::slot

Parameters
labelThe menu item's name
slotUse sigc::mem_fun() to specify a signal handler

◆ MenuElem() [3/5]

Gtk::Menu_Helpers::MenuElem::MenuElem ( const Glib::ustring &  label,
const AccelKey key,
const CallSlot slot = CallSlot() 
)

Create a labeled, accelerated MenuItem with a sigc::slot

Parameters
labelThe menu item's name
keyThe accelerator key combination
slotUse sigc::mem_fun() to specify a signal handler

◆ MenuElem() [4/5]

Gtk::Menu_Helpers::MenuElem::MenuElem ( const Glib::ustring &  label,
Gtk::Menu submenu 
)

Create a labeled, non-accelerated MenuItem with a submenu

Parameters
labelThe menu item's name
submenuThe sub menu

◆ MenuElem() [5/5]

Gtk::Menu_Helpers::MenuElem::MenuElem ( const Glib::ustring &  label,
const AccelKey key,
Gtk::Menu submenu 
)

Create a labeled, accelerated MenuItem with a submenu

Parameters
labelThe menu item's name
keyThe accelerator key combination
submenuThe sub menu

The documentation for this class was generated from the following file: