[gtkmm] Gtk::ToolItem: Add class docs. Add unset_proxy_menu_item()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::ToolItem: Add class docs. Add unset_proxy_menu_item()
- Date: Mon, 16 Dec 2013 14:00:29 +0000 (UTC)
commit 8f946562b2e1eff3faeb6c7421a7b853a42a242a
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Dec 16 14:52:42 2013 +0100
Gtk::ToolItem: Add class docs. Add unset_proxy_menu_item()
* gtk/src/toolitem.[hg|ccg]: The gtk_tool_item_set_proxy_menu_item() docs
don't tell whether the menu_item argument can be NULL, but the gtk+ code
explicitly allows it, and the create-menu-proxy signal docs mention this
case. An unset method seems appropriate.
gtk/src/toolitem.ccg | 5 +++++
gtk/src/toolitem.hg | 27 ++++++++++++++++++++-------
2 files changed, 25 insertions(+), 7 deletions(-)
---
diff --git a/gtk/src/toolitem.ccg b/gtk/src/toolitem.ccg
index 330aefd..e33fa95 100644
--- a/gtk/src/toolitem.ccg
+++ b/gtk/src/toolitem.ccg
@@ -21,5 +21,10 @@
namespace Gtk
{
+void ToolItem::unset_proxy_menu_item(const Glib::ustring& menu_item_id)
+{
+ gtk_tool_item_set_proxy_menu_item(gobj(), menu_item_id.c_str(), 0);
+}
+
} // namespace Gtk
diff --git a/gtk/src/toolitem.hg b/gtk/src/toolitem.hg
index 4b6112c..0bf214f 100644
--- a/gtk/src/toolitem.hg
+++ b/gtk/src/toolitem.hg
@@ -30,7 +30,17 @@ _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
@@ -48,8 +58,6 @@ public:
_WRAP_METHOD(void set_expand(bool expand = true), gtk_tool_item_set_expand)
_WRAP_METHOD(bool get_expand() const, gtk_tool_item_get_expand)
- _IGNORE(gtk_tool_item_set_tooltip) //deprecated.
-
_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)
@@ -82,18 +90,23 @@ public:
_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)
- //TODO: This suggests calling set_proxy_menu_item() with NULL. but the function asserts against that.
_WRAP_SIGNAL(bool create_menu_proxy(), create_menu_proxy)
_WRAP_SIGNAL(void toolbar_reconfigured(), toolbar_reconfigured)
- //_WRAP_SIGNAL(bool set_tooltip(Tooltips* tooltips, const Glib::ustring& tip_text, const Glib::ustring&
tip_private), set_tooltip, deprecated) //TODO: Implement deprecated for _WRAP_SIGNAL() to avoid hand-coding
this:
- _IGNORE_SIGNAL(set_tooltip)
-
_WRAP_PROPERTY("visible_horizontal", bool)
_WRAP_PROPERTY("visible_vertical", bool)
_WRAP_PROPERTY("is_important", bool)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]