]> Pileus Git - ~andy/gtk/commitdiff
Migrated GtkCellLayout documentation into the source code.
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Sat, 4 Dec 2010 06:41:42 +0000 (15:41 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sat, 4 Dec 2010 06:41:42 +0000 (15:41 +0900)
Also added a section on specifying <cell-packing> properties
in the GtkCellLayout UI description.

docs/reference/gtk/tmpl/gtkcelllayout.sgml [deleted file]
gtk/gtkcelllayout.c
gtk/gtkcelllayout.h

diff --git a/docs/reference/gtk/tmpl/gtkcelllayout.sgml b/docs/reference/gtk/tmpl/gtkcelllayout.sgml
deleted file mode 100644 (file)
index 166d2cb..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-GtkCellLayout
-
-<!-- ##### SECTION Short_Description ##### -->
-An interface for packing cells
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-#GtkCellLayout is an interface to be implemented by all objects which
-want to provide a #GtkTreeViewColumn-like API for packing cells, setting
-attributes and data funcs. 
-</para>
-
-<para>
-One of the notable features provided by implementations of GtkCellLayout
-are <emphasis>attributes</emphasis>. Attributes let you set the properties
-in flexible ways. They can just be set to constant values like regular
-properties. But they can also be mapped to a column of the underlying 
-tree model with gtk_cell_layout_set_attributes(), which means that the value 
-of the attribute can change from cell to cell as they are rendered by the 
-cell renderer. Finally, it is possible to specify a function with 
-gtk_cell_layout_set_cell_data_func() that is called to determine the value 
-of the attribute for each cell that is rendered.
-</para>
-
-<refsect2 id="GtkCellLayout-BUILDER-UI">
-<title>GtkCellLayouts as GtkBuildable</title>
-<para>
-Implementations of GtkCellLayout which also implement the GtkBuildable 
-interface (#GtkCellView, #GtkIconView, #GtkComboBox, #GtkComboBoxEntry, 
-#GtkEntryCompletion, #GtkTreeViewColumn) accept GtkCellRenderer objects
-as &lt;child&gt; elements in UI definitions. They support a custom 
-&lt;attributes&gt; element for their children, which can contain 
-multiple &lt;attribute&gt; elements. Each &lt;attribute&gt; element has 
-a name attribute which specifies a property of the cell renderer; the 
-content of the element is the attribute value.
-</para>
-<example>
-<title>A UI definition fragment specifying attributes</title>
-<programlisting><![CDATA[
-<object class="GtkCellView">
-  <child>
-    <object class="GtkCellRendererText"/>
-    <attributes>
-      <attribute name="text">0</attribute>
-    </attributes>
-  </child>"
-</object>
-]]></programlisting>
-</example>
-</refsect2>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION Stability_Level ##### -->
-
-
-<!-- ##### SECTION Image ##### -->
-
-
-<!-- ##### STRUCT GtkCellLayout ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### STRUCT GtkCellLayoutIface ##### -->
-<para>
-
-</para>
-
-@g_iface: 
-@pack_start: 
-@pack_end: 
-@clear: 
-@add_attribute: 
-@set_cell_data_func: 
-@clear_attributes: 
-@reorder: 
-@get_cells: 
-
-<!-- ##### USER_FUNCTION GtkCellLayoutDataFunc ##### -->
-<para>
-A function which should set the value of @cell_layout's cell renderer(s)
-as appropriate. 
-</para>
-
-@cell_layout: a #GtkCellLayout
-@cell: the cell renderer whose value is to be set
-@tree_model: the model
-@iter: a #GtkTreeIter indicating the row to set the value for
-@data: user data passed to gtk_cell_layout_set_cell_data_func()
-
-
-<!-- ##### FUNCTION gtk_cell_layout_pack_start ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-@expand: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_pack_end ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-@expand: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_get_cells ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_reorder ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-@position: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_clear ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_set_attributes ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-@Varargs: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_add_attribute ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-@attribute: 
-@column: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_set_cell_data_func ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-@func: 
-@func_data: 
-@destroy: 
-
-
-<!-- ##### FUNCTION gtk_cell_layout_clear_attributes ##### -->
-<para>
-
-</para>
-
-@cell_layout: 
-@cell: 
-
-
index fb35428fe34dc3ffc6baec637265538776d31c2c..e0d86520557c6ffa022d83251073a41f04150e2f 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+/**
+ * SECTION:gtkcelllayout
+ * @Short_Description: An interface for packing cells
+ * @Title: GtkCellLayout
+ *
+ * #GtkCellLayout is an interface to be implemented by all objects which
+ * want to provide a #GtkTreeViewColumn-like API for packing cells, setting
+ * attributes and data funcs. 
+ *
+ * One of the notable features provided by implementations of GtkCellLayout
+ * are <emphasis>attributes</emphasis>. Attributes let you set the properties
+ * in flexible ways. They can just be set to constant values like regular
+ * properties. But they can also be mapped to a column of the underlying 
+ * tree model with gtk_cell_layout_set_attributes(), which means that the value 
+ * of the attribute can change from cell to cell as they are rendered by the 
+ * cell renderer. Finally, it is possible to specify a function with 
+ * gtk_cell_layout_set_cell_data_func() that is called to determine the value 
+ * of the attribute for each cell that is rendered.
+ *
+ * <refsect2 id="GtkCellLayout-BUILDER-UI">
+ * <title>GtkCellLayouts as GtkBuildable</title>
+ * <para>
+ * Implementations of GtkCellLayout which also implement the GtkBuildable 
+ * interface (#GtkCellView, #GtkIconView, #GtkComboBox, #GtkComboBoxEntry, 
+ * #GtkEntryCompletion, #GtkTreeViewColumn) accept GtkCellRenderer objects
+ * as &lt;child&gt; elements in UI definitions. They support a custom 
+ * &lt;attributes&gt; element for their children, which can contain 
+ * multiple &lt;attribute&gt; elements. Each &lt;attribute&gt; element has 
+ * a name attribute which specifies a property of the cell renderer; the 
+ * content of the element is the attribute value.
+ * 
+ * <example>
+ * <title>A UI definition fragment specifying attributes</title>
+ * <programlisting><![CDATA[
+ * <object class="GtkCellView">
+ *   <child>
+ *     <object class="GtkCellRendererText"/>
+ *     <attributes>
+ *       <attribute name="text">0</attribute>
+ *     </attributes>
+ *   </child>"
+ * </object>
+ * ]]></programlisting>
+ * </example>
+ *
+ * Furthermore for implementations of GtkCellLayout that use a #GtkCellArea
+ * to lay out cells (most, of not all GtkCellLayouts in GTK+ use a GtkCellArea)
+ * <link linkend="cell-properties">cell properties</link> can also be defined
+ * in the format by specifying the custom &lt;cell-packing&gt; attribute which
+ * can contain multiple &lt;property&gt; elements defined in the normal way.
+ * <example>
+ * <title>A UI definition fragment specifying cell properties</title>
+ * <programlisting><![CDATA[
+ * <object class="GtkTreeViewColumn">
+ *   <child>
+ *     <object class="GtkCellRendererText"/>
+ *     <cell-packing>
+ *       <property name="align">True</property>
+ *       <property name="expand">False</property>
+ *     </cell-packing>
+ *   </child>"
+ * </object>
+ * ]]></programlisting>
+ * </example>
+ * </para>
+ * </refsect2>
+ */
+
 #include "config.h"
 #include <string.h>
 #include <stdlib.h>
index 0191ab556835f41fca57701c859bd507ae54f67d..26957e6b2a2cb49c1e9632d220ea1b78cf471e81 100644 (file)
@@ -41,6 +41,17 @@ typedef struct _GtkCellLayout           GtkCellLayout; /* dummy typedef */
 typedef struct _GtkCellLayoutIface      GtkCellLayoutIface;
 
 /* keep in sync with GtkTreeCellDataFunc */
+/**
+ * GtkCellLayoutDataFunc:
+ * @cell_layout: a #GtkCellLayout
+ * @cell: the cell renderer whose value is to be set
+ * @tree_model: the model
+ * @iter: a #GtkTreeIter indicating the row to set the value for
+ * @data: user data passed to gtk_cell_layout_set_cell_data_func()
+ *
+ * A function which should set the value of @cell_layout's cell renderer(s)
+ * as appropriate. 
+ */
 typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout   *cell_layout,
                                         GtkCellRenderer *cell,
                                         GtkTreeModel    *tree_model,