[gtkmm] Gtk::Widget: Add documentation to some override_* and unset_* methods
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Widget: Add documentation to some override_* and unset_* methods
- Date: Mon, 7 Oct 2013 16:45:40 +0000 (UTC)
commit e1e2e8a8b7e820180754395f43f5cb5249f3be73
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Oct 7 18:42:06 2013 +0200
Gtk::Widget: Add documentation to some override_* and unset_* methods
* gtk/src/widget.[hg|ccg]: Use _WRAP_METHOD for override_color() and
override_background_color(), thus copying the gtk+ docs. Add docs to some
unset_*() methods. Bug #551912.
gtk/src/widget.ccg | 11 -----------
gtk/src/widget.hg | 42 +++++++++++++++++++++++++++---------------
2 files changed, 27 insertions(+), 26 deletions(-)
---
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index ba53ce8..9f75d85 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -685,17 +685,6 @@ Requisition Widget::get_requisition() const
}
#endif // GTKMM_DISABLE_DEPRECATED
-//Implemented manually so we can reorder the parameters, to have a default value:
-void Widget::override_color(const Gdk::RGBA& color, StateFlags state)
-{
- gtk_widget_override_color(gobj(), ((GtkStateFlags)(state)), (color).gobj());
-}
-
-void Widget::override_background_color(const Gdk::RGBA& color, StateFlags state)
-{
- gtk_widget_override_background_color(gobj(), ((GtkStateFlags)(state)), (color).gobj());
-}
-
void Widget::unset_color(StateFlags state)
{
gtk_widget_override_color(gobj(), ((GtkStateFlags)(state)), 0);
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 15c9e90..a201df5 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -387,35 +387,47 @@ public:
gtk_widget_reset_rc_styles) //deprecated broadly in favour of StyleContext.;
-//TODO: Use _WRAP_METHOD() when it allows us to reorder parameters.
+ _WRAP_METHOD(void override_color(const Gdk::RGBA& color{.}, StateFlags state{.} = STATE_FLAG_NORMAL),
gtk_widget_override_color)
- //TODO: Documentation.
- void override_color(const Gdk::RGBA& color, StateFlags state = (StateFlags)0);
- _IGNORE(gtk_widget_override_color)
-
- //TODO: Documentation.
- void unset_color(StateFlags state = (StateFlags)0);
+ /** Undoes the effect of previous calls to override_color().
+ *
+ * @newin{3,0}
+ * @param state The state for which to use the color of the user's theme.
+ */
+ void unset_color(StateFlags state = STATE_FLAG_NORMAL);
- //TODO: Documentation.
- void override_background_color(const Gdk::RGBA& color, StateFlags state = (StateFlags)0);
- _IGNORE(gtk_widget_override_background_color)
+ _WRAP_METHOD(void override_background_color(const Gdk::RGBA& color{.}, StateFlags state{.} =
STATE_FLAG_NORMAL), gtk_widget_override_background_color)
- //TODO: Documentation.
- void unset_background_color(StateFlags state = (StateFlags)0);
+ /** Undoes the effect of previous calls to override_background_color().
+ *
+ * @newin{3,0}
+ * @param state The state for which to use the background color of the user's theme.
+ */
+ void unset_background_color(StateFlags state = STATE_FLAG_NORMAL);
_WRAP_METHOD(void override_font(const Pango::FontDescription& font_desc), gtk_widget_override_font)
- //TODO: Documentation.
+ /** Undoes the effect of previous calls to override_font().
+ *
+ * @newin{3,0}
+ */
void unset_font();
_WRAP_METHOD(void override_symbolic_color(const Glib::ustring& name, const Gdk::RGBA& color),
gtk_widget_override_symbolic_color)
- //TODO: Documentation.
+ /** Undoes the effect of previous calls to override_symbolic_color().
+ *
+ * @newin{3,0}
+ * @param name The name of the symbolic color to fetch from the user's theme.
+ */
void unset_symbolic_color(const Glib::ustring& name);
_WRAP_METHOD(void override_cursor(const Gdk::RGBA& cursor, const Gdk::RGBA& secondary_cursor),
gtk_widget_override_cursor)
- //TODO: Documentation.
+ /** Undoes the effect of previous calls to override_cursor().
+ *
+ * @newin{3,0}
+ */
void unset_cursor();
_IGNORE(gtk_widget_modify_fg, gtk_widget_modify_bg, gtk_widget_modify_font, gtk_widget_modify_text,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]