[gtkmm] Tooltip: Add unset_*() methods.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Tooltip: Add unset_*() methods.
- Date: Wed, 20 Jul 2011 10:13:12 +0000 (UTC)
commit 654b19a38cb820b5d18aa5d10256b162813bdf50
Author: Jonathon Jongsma <jonathon jongsma collabora co uk>
Date: Wed Jul 20 12:07:22 2011 +0200
Tooltip: Add unset_*() methods.
* gtk/src/tooltip.[hg|ccg]: provide unset_*() methods for all of the
functions that have NULL-able arguments. In the GTK+ API, if null is
passed, it disables that portion of the tooltip display. Fixes Bug #541296
ChangeLog | 8 ++++++++
gtk/src/tooltip.ccg | 20 ++++++++++++++++++++
gtk/src/tooltip.hg | 24 +++++++++++++++++++++++-
3 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ca90522..b40951e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-07-20 Jonathon Jongsma <jonathon jongsma collabora co uk>
+
+ Tooltip: Add unset_*() methods.
+
+ * gtk/src/tooltip.[hg|ccg]: provide unset_*() methods for all of the
+ functions that have NULL-able arguments. In the GTK+ API, if null is
+ passed, it disables that portion of the tooltip display. Fixes Bug #541296
+
2011-07-19 Murray Cumming <murrayc murrayc com>
Adjustment: Added get_minimum_increment().
diff --git a/gtk/src/tooltip.ccg b/gtk/src/tooltip.ccg
index 5756a6f..6dfcc84 100644
--- a/gtk/src/tooltip.ccg
+++ b/gtk/src/tooltip.ccg
@@ -27,4 +27,24 @@ void Tooltip::trigger_tooltip_query(const Glib::RefPtr<Gdk::Display>& display)
gtk_tooltip_trigger_tooltip_query(Glib::unwrap(display));
}
+void Tooltip::unset_markup()
+{
+ gtk_tooltip_set_markup(gobj(), 0);
+}
+
+void Tooltip::unset_text()
+{
+ gtk_tooltip_set_text(gobj(), 0);
+}
+
+void Tooltip::unset_icon()
+{
+ gtk_tooltip_set_icon(gobj(), 0);
+}
+
+void Tooltip::unset_custom()
+{
+ gtk_tooltip_set_custom(gobj(), 0);
+}
+
} // namespace Gtk
diff --git a/gtk/src/tooltip.hg b/gtk/src/tooltip.hg
index 228f529..2a09fa4 100644
--- a/gtk/src/tooltip.hg
+++ b/gtk/src/tooltip.hg
@@ -76,16 +76,38 @@ protected:
public:
_WRAP_METHOD(void set_markup(const Glib::ustring& markup), gtk_tooltip_set_markup)
+
+ /** Hide the label.
+ * @newin{3,2}
+ */
+ void unset_markup();
+
_WRAP_METHOD(void set_text(const Glib::ustring& markup), gtk_tooltip_set_text)
+
+ /** Hide the label.
+ * @newin{3,2}
+ */
+ void unset_text();
+
_WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_tooltip_set_icon)
_WRAP_METHOD(void set_icon(const Glib::RefPtr<Gio::Icon>& icon, IconSize size), gtk_tooltip_set_icon_from_gicon)
//TODO: Remove the _from_*() suffixes?
_WRAP_METHOD(void set_icon_from_stock(const StockID& stock_id, IconSize size), gtk_tooltip_set_icon_from_stock)
_WRAP_METHOD(void set_icon_from_icon_name(const Glib::ustring& icon_name, IconSize size), gtk_tooltip_set_icon_from_icon_name)
-
+
+ /** Hide the image.
+ * @newin{3,2}
+ */
+ void unset_icon();
_WRAP_METHOD(void set_custom(Widget& custom_widget), gtk_tooltip_set_custom)
+
+ /** Remove the custom widget.
+ * @newin{3,2}
+ */
+ void unset_custom();
+
_WRAP_METHOD(void set_tip_area(const Gdk::Rectangle& rect), gtk_tooltip_set_tip_area)
_IGNORE(gtk_tooltip_trigger_tooltip_query)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]