treelistmodel: Improve docs
authorBenjamin Otte <otte@redhat.com>
Fri, 13 Dec 2019 06:45:57 +0000 (07:45 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 15 Dec 2019 20:07:54 +0000 (21:07 +0100)
- Move into its own section
- Split GtkTreeListRow into its own document

Trees are weird with listmodels and they deserve their own treatment,
they shouldn't be mushed up with the rest of the list machinery.

docs/reference/gtk/gtk4-docs.xml
docs/reference/gtk/gtk4-sections.txt
docs/reference/gtk/gtk4.types.in
gtk/gtktreelistmodel.c

index 8d4a96f66d2ca981d6639abeef32aeaed018a3ef..13bbfe4228b325eae7f4da5103b29ec6f35d824d 100644 (file)
       <xi:include href="xml/gtkmaplistmodel.xml" />
       <xi:include href="xml/gtkslicelistmodel.xml" />
       <xi:include href="xml/gtksortlistmodel.xml" />
-      <xi:include href="xml/gtktreelistmodel.xml" />
       <xi:include href="xml/gtkselectionmodel.xml" />
       <xi:include href="xml/gtknoselection.xml" />
       <xi:include href="xml/gtksingleselection.xml" />
     </chapter>
 
+    <chapter id="Trees">
+      <xi:include href="xml/gtktreelistrow.xml" />
+      <xi:include href="xml/gtktreelistmodel.xml" />
+    </chapter>
+
     <chapter id="Application">
       <title>Application support</title>
       <xi:include href="xml/gtkapplication.xml" />
index 4939bbda58c724c422a4c363758b960315104026..698e11630204feb2309f7d4b32830522381409d5 100644 (file)
@@ -3434,6 +3434,29 @@ GTK_TOOLTIP
 gtk_tooltip_get_type
 </SECTION>
 
+<SECTION>
+<FILE>gtktreelistrow</FILE>
+<TITLE>GtkTreeListRow</TITLE>
+gtk_tree_list_row_get_item
+gtk_tree_list_row_set_expanded
+gtk_tree_list_row_get_expanded
+gtk_tree_list_row_is_expandable
+gtk_tree_list_row_get_position
+gtk_tree_list_row_get_depth
+gtk_tree_list_row_get_children
+gtk_tree_list_row_get_parent
+gtk_tree_list_row_get_child_row
+<SUBSECTION Standard>
+GTK_TREE_LIST_ROW
+GTK_IS_TREE_LIST_ROW
+GTK_TYPE_TREE_LIST_ROW
+GTK_TREE_LIST_ROW_CLASS
+GTK_IS_TREE_LIST_ROW_CLASS
+GTK_TREE_LIST_ROW_GET_CLASS
+<SUBSECTION Private>
+gtk_tree_list_row_get_type
+</SECTION>
+
 <SECTION>
 <FILE>gtktreelistmodel</FILE>
 <TITLE>GtkTreeListModel</TITLE>
@@ -3447,18 +3470,6 @@ gtk_tree_list_model_set_autoexpand
 gtk_tree_list_model_get_autoexpand
 gtk_tree_list_model_get_child_row
 gtk_tree_list_model_get_row
-
-<SUBSECTION>
-gtk_tree_list_row_get_item
-gtk_tree_list_row_set_expanded
-gtk_tree_list_row_get_expanded
-gtk_tree_list_row_is_expandable
-gtk_tree_list_row_get_position
-gtk_tree_list_row_get_depth
-gtk_tree_list_row_get_children
-gtk_tree_list_row_get_parent
-gtk_tree_list_row_get_child_row
-
 <SUBSECTION Standard>
 GTK_TREE_LIST_MODEL
 GTK_IS_TREE_LIST_MODEL
@@ -3466,14 +3477,7 @@ GTK_TYPE_TREE_LIST_MODEL
 GTK_TREE_LIST_MODEL_CLASS
 GTK_IS_TREE_LIST_MODEL_CLASS
 GTK_TREE_LIST_MODEL_GET_CLASS
-GTK_TREE_LIST_ROW
-GTK_IS_TREE_LIST_ROW
-GTK_TYPE_TREE_LIST_ROW
-GTK_TREE_LIST_ROW_CLASS
-GTK_IS_TREE_LIST_ROW_CLASS
-GTK_TREE_LIST_ROW_GET_CLASS
 <SUBSECTION Private>
-gtk_tree_list_model_get_type
 gtk_tree_list_row_get_type
 </SECTION>
 
index 2db6ce2348740db54f4496763bc6bb90d5be2995..45d26146c72a7b69c96ff540cbd9e3ee4456d6b5 100644 (file)
@@ -206,6 +206,7 @@ gtk_tool_button_get_type
 gtk_tool_item_get_type
 gtk_tree_drag_dest_get_type
 gtk_tree_drag_source_get_type
+gtk_tree_expander_get_type
 gtk_tree_list_model_get_type
 gtk_tree_list_row_get_type
 gtk_tree_model_filter_get_type
index 333b8b70e69af8f398ca7b04847b2b5f36e071ce..597de53c6f21cacf8842c57be86c9f0137687f5d 100644 (file)
@@ -930,7 +930,24 @@ gtk_tree_list_model_get_child_row (GtkTreeListModel *self,
   return tree_node_get_row (child);
 }
 
-/***   ROW   ***/
+/**
+ * SECTION:gtktreelistrow
+ * @Short_description: rows in a tree
+ * @Title: GtkTreeListRow
+ * @See_also: #GtkTreeListModel
+ *
+ * #GtkTreeListRow is the object used by #GtkTreeListModel to
+ * represent items. It allows navigating the model as a tree and
+ * modify the state of rows.
+ *
+ * #GtkTreeListRow instances are created by a #GtkTreeListModel only
+ * when the GtkTreeListModel:passthrough property is not set.
+ *
+ * There are various support objects that can make use of #GtkTreeListRow
+ * objects, such as the #GtkTreeExpander widget that allows displaying
+ * an icon to expand or collapse a row or #GtkTreeListRowSorter that makes
+ * it possible to sort trees properly.
+ */
 
 enum {
   ROW_PROP_0,