/* Copyright (C) 2009 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
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
namespace Gtk
{
/** A ToolItemGroup is used together with ToolPalette to add ToolItems to a
* palette-like container with different categories and drag and drop support.
*
* @newin{2,20}
* @ingroup Widgets
* @ingroup Containers
*/
class GTKMM_API ToolItemGroup
: public Container,
public ToolShell
{
_CLASS_GTKOBJECT(ToolItemGroup, GtkToolItemGroup, GTK_TOOL_ITEM_GROUP, Gtk::Container, GtkContainer, , , GTKMM_API)
_IMPLEMENTS_INTERFACE(ToolShell)
public:
_WRAP_CTOR(ToolItemGroup(const Glib::ustring& label = Glib::ustring()), gtk_tool_item_group_new)
_WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_tool_item_group_set_label)
_WRAP_METHOD(void set_label_widget(Widget& label_widget), gtk_tool_item_group_set_label_widget)
_WRAP_METHOD(void set_collapsed(bool collapsed = true), gtk_tool_item_group_set_collapsed)
_WRAP_METHOD(void set_ellipsize(Pango::EllipsizeMode ellipsize), gtk_tool_item_group_set_ellipsize)
_WRAP_METHOD(void set_header_relief(ReliefStyle style), gtk_tool_item_group_set_header_relief)
_WRAP_METHOD(Glib::ustring get_label() const, gtk_tool_item_group_get_label)
_WRAP_METHOD(Widget* get_label_widget(), gtk_tool_item_group_get_label_widget)
_WRAP_METHOD(const Widget* get_label_widget() const, gtk_tool_item_group_get_label_widget, constversion)
_WRAP_METHOD(bool get_collapsed() const, gtk_tool_item_group_get_collapsed)
_WRAP_METHOD(Pango::EllipsizeMode get_ellipsize() const, gtk_tool_item_group_get_ellipsize)
_WRAP_METHOD(ReliefStyle get_header_relief() const, gtk_tool_item_group_get_header_relief)
_WRAP_METHOD(void insert(ToolItem& item, int position), gtk_tool_item_group_insert)
/** Inserts @a item at the end of the list of children of the group.
*
* @param item The ToolItem to insert into the group.
*/
void insert(ToolItem& item);
_WRAP_METHOD(void set_item_position(ToolItem& item, int position), gtk_tool_item_group_set_item_position)
_WRAP_METHOD(int get_item_position(const ToolItem& item) const, gtk_tool_item_group_get_item_position)
_WRAP_METHOD(guint get_n_items() const, gtk_tool_item_group_get_n_items)
_WRAP_METHOD(ToolItem* get_nth_item(guint index), gtk_tool_item_group_get_nth_item)
_WRAP_METHOD(const ToolItem* get_nth_item(guint index) const, gtk_tool_item_group_get_nth_item, constversion)
_WRAP_METHOD(ToolItem* get_drop_item(int x, int y), gtk_tool_item_group_get_drop_item)
_WRAP_METHOD(ToolItem* get_drop_item(int x, int y) const, gtk_tool_item_group_get_drop_item, constversion)
_WRAP_PROPERTY("label", Glib::ustring)
_WRAP_PROPERTY("label-widget", Gtk::Widget*)
_WRAP_PROPERTY("collapsed", bool)
_WRAP_PROPERTY("ellipsize", Pango::EllipsizeMode)
_WRAP_PROPERTY("header-relief", ReliefStyle)
_WRAP_CHILD_PROPERTY("homogeneous", bool)
_WRAP_CHILD_PROPERTY("expand", bool)
_WRAP_CHILD_PROPERTY("fill", bool)
_WRAP_CHILD_PROPERTY("new-row", bool)
_WRAP_CHILD_PROPERTY("position", int)
};
} // namespace Gtk