It 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. It can have a submenu associated with it, allowing for nested hierarchical menus. You can use append(), prepend() and insert() to add Gtk::MenuItem widgets, but you will probably find it more convenient to use the STL-style items() interface with the Gtk::Menu_Helpers::MenuElem() class.
Does the same as the accelerate(Window& window) method. But you can use any parent widget where the menu is used. This method then gets the toplevel window using Widget::get_toplevel() and uses this window for registering the menu accelerators.
Parent widget used as starting point for searching the toplevel window.
This method initializes the menu accelerators. Therefore an AccelGroup object is needed which is stored in each Window object in the Gtkmm library implementation.
When using MenuBar and OptionMenu objects this method is called automatically when the menus are realized. Because most likely the MenuBar and OptionMenu is attached to a window at this time and the window object can be found automatically.
Important note when using popup menus: If you are using accelerated menu entries inside a popup menu you have to call the accelerate() method manually. This is because the popup menu is not connected to any window and the accelerators should be initialized even before the popup menu is shown. The right place to call the accelerate() method is right after the popup menu has been build.
Window where the menu is shown. Inside this window the AccelGroup object is stored that will be used to initialize the accelerators.