/* 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 .
*/
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_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 Container
{
_CLASS_GTKOBJECT(HeaderBar, GtkHeaderBar, GTK_HEADER_BAR, Gtk::Container, GtkContainer, , , GTKMM_API)
public:
/** Create a new HeaderBar widget.
*/
_CTOR_DEFAULT
_WRAP_METHOD(void set_title(const Glib::ustring& title), gtk_header_bar_set_title)
_WRAP_METHOD(Glib::ustring get_title() const, gtk_header_bar_get_title)
_WRAP_METHOD(void set_subtitle(const Glib::ustring& subtitle), gtk_header_bar_set_subtitle)
_WRAP_METHOD(Glib::ustring get_subtitle() const, gtk_header_bar_get_subtitle)
_WRAP_METHOD(void set_has_subtitle(bool setting = true), gtk_header_bar_set_has_subtitle)
_WRAP_METHOD(bool get_has_subtitle() const, gtk_header_bar_get_has_subtitle)
_WRAP_METHOD(void set_custom_title(Gtk::Widget& title_widget), gtk_header_bar_set_custom_title)
_WRAP_METHOD(Widget* get_custom_title(), gtk_header_bar_get_custom_title)
_WRAP_METHOD(const Widget* get_custom_title() const, gtk_header_bar_get_custom_title, 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 set_show_close_button(bool setting = true), gtk_header_bar_set_show_close_button)
_WRAP_METHOD(bool get_show_close_button() const, gtk_header_bar_get_show_close_button)
_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_PROPERTY("custom-title", Gtk::Widget*)
_WRAP_PROPERTY("show-close-button", bool)
_WRAP_PROPERTY("spacing", int)
_WRAP_PROPERTY("subtitle", Glib::ustring)
_WRAP_PROPERTY("title", Glib::ustring)
_WRAP_PROPERTY("decoration-layout", Glib::ustring)
_WRAP_PROPERTY("decoration-layout-set", bool)
_WRAP_PROPERTY("has-subtitle", bool)
_WRAP_CHILD_PROPERTY("pack-type", PackType)
_WRAP_CHILD_PROPERTY("position", int)
// Gtk::HeaderBar has no signals nor vfuncs as of 3.12.
};
} // namespace Gtk