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

#include <gtkmm/widget.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)

namespace Gtk
{

/** A box with a centered child.
 *
 * Gtk::HeaderBar is similar to a horizontal Gtk::Box, it allows
 * to place children at the start or the end. In addition,
 * it allows a title to be displayed. The title will be
 * centered with respect to the width of the box, even if the children
 * at either side take up different amounts of space.
 *
 * @ingroup Containers
 * @newin{3,10}
 */
class GTKMM_API HeaderBar
  : public Widget
{
  _CLASS_GTKOBJECT(HeaderBar, GtkHeaderBar, GTK_HEADER_BAR, Gtk::Widget, GtkWidget, , , GTKMM_API)
public:

  /** Create a new HeaderBar widget.
   */
  _CTOR_DEFAULT

  _WRAP_METHOD(void set_title_widget(Gtk::Widget& title_widget), gtk_header_bar_set_title_widget)
  _WRAP_METHOD(Widget* get_title_widget(), gtk_header_bar_get_title_widget)
  _WRAP_METHOD(const Widget* get_title_widget() const, gtk_header_bar_get_title_widget, constversion)

  _WRAP_METHOD(void pack_start(Gtk::Widget& child), gtk_header_bar_pack_start)
  _WRAP_METHOD(void pack_end(Gtk::Widget& child), gtk_header_bar_pack_end)
  _WRAP_METHOD(void remove(Gtk::Widget& child), gtk_header_bar_remove)

  _WRAP_METHOD(void set_show_title_buttons(bool setting = true), gtk_header_bar_set_show_title_buttons)
  _WRAP_METHOD(bool get_show_title_buttons() const, gtk_header_bar_get_show_title_buttons)

  _WRAP_METHOD(void set_decoration_layout(const Glib::ustring& layout), gtk_header_bar_set_decoration_layout)

  /** Unset the decoration layout.
   * See set_decoration_layout().
   */
  void unset_decoration_layout();

  _WRAP_METHOD(Glib::ustring get_decoration_layout() const, gtk_header_bar_get_decoration_layout)

  _WRAP_METHOD(bool get_use_native_controls() const, gtk_header_bar_get_use_native_controls)
  _WRAP_METHOD(void set_use_native_controls(bool setting = true), gtk_header_bar_set_use_native_controls)

  _WRAP_PROPERTY("title-widget", Gtk::Widget*)
  _WRAP_PROPERTY("show-title-buttons", bool)
  _WRAP_PROPERTY("decoration-layout", Glib::ustring)
  _WRAP_PROPERTY("use-native-controls", bool)

  // Gtk::HeaderBar has no signals nor vfuncs as of 3.12.
};

} // namespace Gtk
