/* 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 . */ // This is for including the config header before any code (such as // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated: _CONFIGINCLUDE(gtkmmconfig.h) #include #include #include _DEFS(gtkmm,gtk) _PINCLUDE(gtkmm/private/bin_p.h) namespace Gtk { /** The base class of widgets that can be added to ToolShell. * ToolItems are widgets that can appear on a toolbar. To * create a toolbar item that contains something else than a button, use * a ToolItem. Use Container::add() to add a child widget to the tool item. * * For toolbar items that contain buttons, see the ToolButton, * ToggleToolButton and RadioToolButton classes. * * See the Toolbar class for a description of the toolbar widget, and * ToolShell for a description of the tool shell interface. * * @ingroup Widgets */ class GTKMM_API ToolItem : public Bin, public Activatable { _CLASS_GTKOBJECT(ToolItem, GtkToolItem, GTK_TOOL_ITEM, Gtk::Bin, GtkBin, , , GTKMM_API) _IMPLEMENTS_INTERFACE(Activatable) public: _CTOR_DEFAULT _WRAP_METHOD(void set_homogeneous(bool homogeneous = true), gtk_tool_item_set_homogeneous) _WRAP_METHOD(bool get_homogeneous() const, gtk_tool_item_get_homogeneous) _WRAP_METHOD(void set_expand(bool expand = true), gtk_tool_item_set_expand) _WRAP_METHOD(bool get_expand() const, gtk_tool_item_get_expand) _WRAP_METHOD(void set_tooltip_text(const Glib::ustring& text), gtk_tool_item_set_tooltip_text) _WRAP_METHOD(void set_tooltip_markup(const Glib::ustring& markup), gtk_tool_item_set_tooltip_markup) _WRAP_METHOD(void set_use_drag_window(bool use_drag_window = true), gtk_tool_item_set_use_drag_window) _WRAP_METHOD(bool get_use_drag_window() const, gtk_tool_item_get_use_drag_window) _WRAP_METHOD(void set_visible_horizontal(bool visible_horizontal = true), gtk_tool_item_set_visible_horizontal) _WRAP_METHOD(bool get_visible_horizontal() const, gtk_tool_item_get_visible_horizontal) _WRAP_METHOD(void set_visible_vertical(bool visible_vertical = true), gtk_tool_item_set_visible_vertical) _WRAP_METHOD(bool get_visible_vertical() const, gtk_tool_item_get_visible_vertical) _WRAP_METHOD(bool get_is_important() const, gtk_tool_item_get_is_important) _WRAP_METHOD(void set_is_important(bool is_important = true), gtk_tool_item_set_is_important) _WRAP_METHOD(Pango::EllipsizeMode get_ellipsize_mode() const, gtk_tool_item_get_ellipsize_mode) _WRAP_METHOD(IconSize get_icon_size () const, gtk_tool_item_get_icon_size) _WRAP_METHOD(Orientation get_orientation() const, gtk_tool_item_get_orientation) _WRAP_METHOD(ToolbarStyle get_toolbar_style() const, gtk_tool_item_get_toolbar_style) _WRAP_METHOD(ReliefStyle get_relief_style() const, gtk_tool_item_get_relief_style) _WRAP_METHOD(float get_text_alignment() const, gtk_tool_item_get_text_alignment) _WRAP_METHOD(Orientation get_text_orientation() const, gtk_tool_item_get_text_orientation) _WRAP_METHOD(Glib::RefPtr get_text_size_group(), gtk_tool_item_get_text_size_group, refreturn) _WRAP_METHOD(Glib::RefPtr get_text_size_group() const, gtk_tool_item_get_text_size_group, refreturn, constversion) _WRAP_METHOD(Widget* retrieve_proxy_menu_item(), gtk_tool_item_retrieve_proxy_menu_item) _WRAP_METHOD(const Widget* retrieve_proxy_menu_item() const, gtk_tool_item_retrieve_proxy_menu_item, constversion) _WRAP_METHOD(Widget* get_proxy_menu_item(const Glib::ustring& menu_item_id), gtk_tool_item_get_proxy_menu_item) _WRAP_METHOD(const Widget* get_proxy_menu_item(const Glib::ustring& menu_item_id) const, gtk_tool_item_get_proxy_menu_item, constversion) _WRAP_METHOD(void set_proxy_menu_item(const Glib::ustring& menu_item_id, Widget& menu_item), gtk_tool_item_set_proxy_menu_item) /** Removes the MenuItem used in the toolbar overflow menu, if any. * The @a menu_item_id is used to identify the caller of this function and * should also be used with get_proxy_menu_item(). * * @newin{3,12} * * @param menu_item_id A string used to identify the MenuItem. */ void unset_proxy_menu_item(const Glib::ustring& menu_item_id); _WRAP_METHOD(void rebuild_menu(), gtk_tool_item_rebuild_menu) _WRAP_METHOD(void toolbar_reconfigured(), gtk_tool_item_toolbar_reconfigured) _WRAP_SIGNAL(bool create_menu_proxy(), create_menu_proxy) _WRAP_SIGNAL(void toolbar_reconfigured(), toolbar_reconfigured) _WRAP_PROPERTY("visible_horizontal", bool) _WRAP_PROPERTY("visible_vertical", bool) _WRAP_PROPERTY("is_important", bool) }; } // namespace Gtk