[gtkmm-documentation] gmmproc appendix. More about Gtk::Object



commit f34e9d0ca2f7a5e8e9a214bc1c89ad2d76d7a74e
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Oct 12 18:02:15 2011 +0200

    gmmproc appendix. More about Gtk::Object
    
    * docs/tutorial/C/gtkmm-tutorial-in.xml: _CLASS_GTKOBJECT: Add a little
    more explanatory text abot when this should be used.

 ChangeLog                             |    7 +++++++
 docs/tutorial/C/gtkmm-tutorial-in.xml |    6 ++----
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8878a15..458e50f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-12  Murray Cumming  <murrayc murrayc com>
+
+	gmmproc appendix. More about Gtk::Object
+
+	* docs/tutorial/C/gtkmm-tutorial-in.xml: _CLASS_GTKOBJECT: Add a little
+	more explanatory text abot when this should be used.
+
 2011-10-11  Josà Alburquerque  <jaalburqu svn gnome org>
 
 	Wrapping Section: Use {OUT} instead of {RET} for output params.
diff --git a/docs/tutorial/C/gtkmm-tutorial-in.xml b/docs/tutorial/C/gtkmm-tutorial-in.xml
index 4369d62..8e25a3a 100644
--- a/docs/tutorial/C/gtkmm-tutorial-in.xml
+++ b/docs/tutorial/C/gtkmm-tutorial-in.xml
@@ -8575,10 +8575,8 @@ _CLASS_GOBJECT(AccelGroup, GtkAccelGroup, GTK_ACCEL_GROUP, Glib::Object, GObject
 _CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Bin, GtkBin)
 </programlisting>
 </para>
-<para>In GTK+2 there is a type <classname>GtkObject</classname>, which is wrapped
-    by <classname>Gtk::Object</classname>. In GTK+3 <classname>GtkObject</classname>
-    has been removed. <classname>Gtk::Object</classname> remains, because only
-    <classname>Gtk::Object</classname>s can be used with <function>Gtk::manage()</function>.</para>
+<para>You will typically use this macro when the class already derives from Gtk::Object. For instance, you will use it when wrapping a GTK+ Widget, because Gtk::Widget derives from Gtk::Object.</para>
+<para>You might also derive non-widget classes from Gtk::Object so they can be used without <classname>Glib::RefPtr</classname>. For isntance, they could then be instantiated with <function>Gtk::manage()</function> or on the stack as a member variable. This is convenient, but you should use this only when you are sure that true reference-counting is not needed. We consider it useful for widgets.</para>
 </sect3>
 
 <sect3 id="gmmproc-class-boxedtype">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]