/* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/menushell_p.h)
namespace Gtk
{
_WRAP_ENUM(PackDirection, GtkPackDirection, decl_prefix GTKMM_API)
/** A standard menu bar which usually holds Gtk::Menu submenu items.
* The useful methods are in the base class - Gtk::MenuShell.
*
* The MenuBar widget looks like this:
* @image html menubar1.png
*
* @ingroup Widgets
* @ingroup Menus
*/
class GTKMM_API MenuBar : public MenuShell
{
_CLASS_GTKOBJECT(MenuBar,GtkMenuBar,GTK_MENU_BAR,Gtk::MenuShell,GtkMenuShell,,,GTKMM_API)
public:
MenuBar();
//This is custom-implemented because the gtk_menu_new_from_model() does more
//than just call g_object_new. See https://bugzilla.gnome.org/show_bug.cgi?id=704671
//This might be nearly-useless. See https://bugzilla.gnome.org/show_bug.cgi?id=708905
/** Creates a new MenuBar and populates it with menu items
* and submenus according to the @a model.
*
* The created menu items are connected to actions found in the
* ApplicationWindow to which the menu bar belongs - typically
* by means of being contained within the ApplicationWindow's
* widget hierarchy.
*
* @param model
*
* @newin{3,10}
*/
explicit MenuBar(const Glib::RefPtr& model);
_IGNORE(gtk_menu_bar_new_from_model)
_WRAP_METHOD(PackDirection get_pack_direction () const, gtk_menu_bar_get_pack_direction)
_WRAP_METHOD(void set_pack_direction(PackDirection pack_dir), gtk_menu_bar_set_pack_direction)
_WRAP_METHOD(PackDirection get_child_pack_direction() const, gtk_menu_bar_get_child_pack_direction)
_WRAP_METHOD(void set_child_pack_direction(PackDirection child_pack_dir), gtk_menu_bar_set_child_pack_direction)
// append, prepend and insert are defined in menushell
_WRAP_PROPERTY("pack-direction", PackDirection)
_WRAP_PROPERTY("child-pack-direction", PackDirection)
private:
void init_accels_handler_(void);
};
} // namespace Gtk