/* Copyright (C) 2020 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 <http://www.gnu.org/licenses/>.
 */

#include <gtkmm/widget.h>
#include <giomm/menumodel.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)

namespace Gtk
{
/** A menu bar with popovers.
 *
 * %Gtk::PopoverMenuBar presents a horizontal bar of items that pop
 * up popover menus when clicked.
 *
 * The only way to create instances of %PopoverMenuBar is from a Gio::MenuModel.
 *
 * @see Popover, PopoverMenu, Gio::MenuModel
 *
 * @newin{3,96}
 *
 * @ingroup Widgets
 * @ingroup Containers
 * @ingroup Menus
 */
class PopoverMenuBar : public Widget
{
  _CLASS_GTKOBJECT(PopoverMenuBar, GtkPopoverMenuBar, GTK_POPOVER_MENU_BAR, Gtk::Widget, GtkWidget)

public:
  _WRAP_CTOR(PopoverMenuBar(const Glib::RefPtr<Gio::MenuModel>& menu_model = {}), gtk_popover_menu_bar_new_from_model)

  _WRAP_METHOD(void set_menu_model(const Glib::RefPtr<Gio::MenuModel>& model), gtk_popover_menu_bar_set_menu_model)
  _WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_menu_model(), gtk_popover_menu_bar_get_menu_model, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_menu_model() const, gtk_popover_menu_bar_get_menu_model, refreturn, constversion)

  _WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)

  // PopoverMenuBar has no signals nor vfuncs.
};

} //namespace Gtk
