1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
/*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
// 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 <gtkmm/bin.h>
#include <gtkmm/activatable.h>
#include <gtkmm/sizegroup.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
namespace Gtk
{
/** The base class of widgets that can be added to ToolShell.
* ToolItem<!-- -->s 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 ToolItem
: public Bin,
public Activatable
{
_CLASS_GTKOBJECT(ToolItem, GtkToolItem, GTK_TOOL_ITEM, Gtk::Bin, GtkBin)
_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<SizeGroup> get_text_size_group(), gtk_tool_item_get_text_size_group, refreturn)
_WRAP_METHOD(Glib::RefPtr<const SizeGroup> 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
|