]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtktreeview.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtktreeview.sgml
index f6ac199a179f631d6a32e8dbb127fcf2e82e4a48..549b2e62125802f01d4df3a3bc9dcfa2d88992cc 100644 (file)
@@ -2,7 +2,7 @@
 GtkTreeView
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget for displaying both trees and lists.
+A widget for displaying both trees and lists
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
@@ -10,11 +10,76 @@ Widget that displays any object that implements the <link
 linkend="GtkTreeModel">GtkTreeModel</link> interface.
 </para>
 
+<para>
+Please refer to the <link linkend="TreeWidget">tree widget conceptual 
+overview</link> for an overview of all the objects and data types related 
+to the tree widget and how they work together.
+</para>
+
+<para>
+Several different coordinate systems are exposed in the GtkTreeView API.
+These are:
+
+<inlinegraphic fileref="tree-view-coordinates.png" format="PNG"></inlinegraphic>
+
+  <simplelist>
+    <member>Widget coordinates -- coordinates relative to the widget 
+    (usually <literal>widget-&gt;window</literal>.</member>
+    <member>Bin window coordinates -- coordinates relative to the window 
+    that GtkTreeView renders to.</member>
+    <member>Tree coordinates -- coordinates relative to the entire scrollable 
+    area of GtkTreeView.  These coordinates start at (0, 0) for row 0 of the 
+    tree.</member>
+  </simplelist>
+</para>
+
+<para>
+Several functions are available for converting between the different
+coordinate systems.  The most common translations are between widget and bin 
+window coordinates and between bin window and tree coordinates.  For the 
+former you can use gtk_tree_view_convert_widget_to_bin_window_coords()
+(and vice versa), for the latter gtk_tree_view_convert_bin_window_to_tree_coords() 
+(and vice versa).
+</para>
+
+<refsect2 id="GtkTreeView-BUILDER-UI">
+<title>GtkTreeView as GtkBuildable</title>
+<para>
+The GtkTreeView implementation of the GtkBuildable interface accepts
+GtkTreeViewColumn objects as &lt;child&gt; elements in UI definitions.
+</para>
+<example>
+<title>A UI definition fragment with GtkTreeView</title>
+<programlisting><![CDATA[
+<object class="GtkTreeView" id="treeview">
+  <property name="model">liststore1</property>
+  <child>
+    <object class="GtkTreeViewColumn" id="test-column">
+      <property name="title">Test</property>
+      <child>
+        <object class="GtkCellRendererText" id="test-renderer"/>
+        <attributes>
+          <attribute name="text">1</attribute>
+        </attributes>
+      </child>
+    </object>
+  </child>
+</object>
+]]></programlisting>
+</example>
+</refsect2>
+
 <!-- ##### SECTION See_Also ##### -->
 <para>
 #GtkTreeViewColumn, #GtkTreeSelection, #GtkTreeDnd, #GtkTreeMode, #GtkTreeSortable, #GtkTreeModelSort, #GtkListStore, #GtkTreeStore, #GtkCellRenderer, #GtkCellEditable, #GtkCellRendererPixbuf, #GtkCellRendererText, #GtkCellRendererToggle
 </para>
 
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### STRUCT GtkTreeView ##### -->
 <para>
 
@@ -26,21 +91,21 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 
 <!-- ##### SIGNAL GtkTreeView::cursor-changed ##### -->
 <para>
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 
 <!-- ##### SIGNAL GtkTreeView::expand-collapse-cursor-row ##### -->
 <para>
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 @arg3: 
@@ -51,7 +116,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 @Returns: 
@@ -61,7 +126,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 
@@ -70,7 +135,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 
@@ -79,7 +144,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 
@@ -88,7 +153,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @Returns: 
 
 <!-- ##### SIGNAL GtkTreeView::select-cursor-parent ##### -->
@@ -96,7 +161,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @Returns: 
 
 <!-- ##### SIGNAL GtkTreeView::select-cursor-row ##### -->
@@ -104,7 +169,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @Returns: 
 
@@ -113,7 +178,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 
@@ -122,7 +187,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @Returns: 
 
 <!-- ##### SIGNAL GtkTreeView::test-collapse-row ##### -->
@@ -130,7 +195,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 @Returns: 
@@ -140,7 +205,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @arg1: 
 @arg2: 
 @Returns: 
@@ -150,7 +215,7 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @Returns: 
 
 <!-- ##### SIGNAL GtkTreeView::unselect-all ##### -->
@@ -158,14 +223,24 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
-@treeview: the object which received the signal.
+@tree_view: the object which received the signal.
 @Returns: 
 
+<!-- ##### ARG GtkTreeView:enable-grid-lines ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:enable-search ##### -->
 <para>
 
 </para>
 
+<!-- ##### ARG GtkTreeView:enable-tree-lines ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:expander-column ##### -->
 <para>
 
@@ -191,11 +266,21 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
+<!-- ##### ARG GtkTreeView:hover-expand ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:hover-selection ##### -->
 <para>
 
 </para>
 
+<!-- ##### ARG GtkTreeView:level-indentation ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:model ##### -->
 <para>
 
@@ -206,6 +291,11 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
+<!-- ##### ARG GtkTreeView:rubber-banding ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:rules-hint ##### -->
 <para>
 
@@ -216,6 +306,16 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
+<!-- ##### ARG GtkTreeView:show-expanders ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkTreeView:tooltip-column ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:vadjustment ##### -->
 <para>
 
@@ -236,6 +336,16 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
+<!-- ##### ARG GtkTreeView:grid-line-pattern ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkTreeView:grid-line-width ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:horizontal-separator ##### -->
 <para>
 
@@ -251,6 +361,21 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 
 </para>
 
+<!-- ##### ARG GtkTreeView:row-ending-details ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkTreeView:tree-line-pattern ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkTreeView:tree-line-width ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG GtkTreeView:vertical-separator ##### -->
 <para>
 
@@ -261,10 +386,10 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
 An enum for determining where a dropped row goes.
 </para>
 
-@GTK_TREE_VIEW_DROP_BEFORE: 
-@GTK_TREE_VIEW_DROP_AFTER: 
-@GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: 
-@GTK_TREE_VIEW_DROP_INTO_OR_AFTER: 
+@GTK_TREE_VIEW_DROP_BEFORE: dropped row is inserted before
+@GTK_TREE_VIEW_DROP_AFTER: dropped row is inserted after
+@GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: dropped row becomes a child or is inserted before
+@GTK_TREE_VIEW_DROP_INTO_OR_AFTER: dropped row becomes a child or is inserted after
 
 <!-- ##### STRUCT GtkTreeViewPrivate ##### -->
 <para>
@@ -325,9 +450,46 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 </para>
 
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_level_indentation ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_show_expanders ##### -->
+<para>
+
+</para>
+
+@tree_view: 
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_set_level_indentation ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@indentation: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_show_expanders ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@enabled: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_new_with_model ##### -->
 <para>
 
@@ -353,8 +515,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @model: 
-<!-- # Unused Parameters # -->
-@tree_model: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_selection ##### -->
@@ -373,8 +533,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @Returns: 
-<!-- # Unused Parameters # -->
-@layout: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_set_hadjustment ##### -->
@@ -384,8 +542,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @adjustment: 
-<!-- # Unused Parameters # -->
-@layout: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_vadjustment ##### -->
@@ -395,8 +551,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @Returns: 
-<!-- # Unused Parameters # -->
-@layout: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_set_vadjustment ##### -->
@@ -406,8 +560,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @adjustment: 
-<!-- # Unused Parameters # -->
-@layout: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_headers_visible ##### -->
@@ -436,6 +588,15 @@ has some similarity to strcmp() returning 0 for equal strings.
 @tree_view: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_get_headers_clickable ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_set_headers_clickable ##### -->
 <para>
 
@@ -443,8 +604,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @setting: 
-<!-- # Unused Parameters # -->
-@active: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_set_rules_hint ##### -->
@@ -745,8 +904,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 @cell_x: 
 @cell_y: 
 @Returns: 
-<!-- # Unused Parameters # -->
-@window: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_cell_area ##### -->
@@ -780,6 +937,17 @@ has some similarity to strcmp() returning 0 for equal strings.
 @visible_rect: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_get_visible_range ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@start_path: 
+@end_path: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_get_bin_window ##### -->
 <para>
 
@@ -789,19 +957,43 @@ has some similarity to strcmp() returning 0 for equal strings.
 @Returns: 
 
 
-<!-- ##### FUNCTION gtk_tree_view_widget_to_tree_coords ##### -->
+<!-- ##### FUNCTION gtk_tree_view_convert_bin_window_to_tree_coords ##### -->
 <para>
 
 </para>
 
 @tree_view: 
+@bx: 
+@by: 
+@tx: 
+@ty: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_convert_bin_window_to_widget_coords ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@bx: 
+@by: 
 @wx: 
 @wy: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_convert_tree_to_bin_window_coords ##### -->
+<para>
+
+</para>
+
+@tree_view: 
 @tx: 
 @ty: 
+@bx: 
+@by: 
 
 
-<!-- ##### FUNCTION gtk_tree_view_tree_to_widget_coords ##### -->
+<!-- ##### FUNCTION gtk_tree_view_convert_tree_to_widget_coords ##### -->
 <para>
 
 </para>
@@ -813,6 +1005,30 @@ has some similarity to strcmp() returning 0 for equal strings.
 @wy: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_convert_widget_to_bin_window_coords ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@wx: 
+@wy: 
+@bx: 
+@by: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_convert_widget_to_tree_coords ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@wx: 
+@wy: 
+@tx: 
+@ty: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_enable_model_drag_dest ##### -->
 <para>
 
@@ -902,8 +1118,6 @@ has some similarity to strcmp() returning 0 for equal strings.
 
 @tree_view: 
 @enable_search: 
-<!-- # Unused Parameters # -->
-@use_search: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_enable_search ##### -->
@@ -951,9 +1165,54 @@ has some similarity to strcmp() returning 0 for equal strings.
 @search_equal_func: 
 @search_user_data: 
 @search_destroy: 
-<!-- # Unused Parameters # -->
-@search_compare_func: 
-@search_data: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_search_entry ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_search_entry ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@entry: 
+
+
+<!-- ##### USER_FUNCTION GtkTreeViewSearchPositionFunc ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@search_dialog: 
+@user_data: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_search_position_func ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_search_position_func ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@func: 
+@data: 
+@destroy: 
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_fixed_height_mode ##### -->
@@ -971,7 +1230,7 @@ has some similarity to strcmp() returning 0 for equal strings.
 </para>
 
 @tree_view: 
-@hover
+@enable
 
 
 <!-- ##### FUNCTION gtk_tree_view_get_hover_selection ##### -->
@@ -992,6 +1251,24 @@ has some similarity to strcmp() returning 0 for equal strings.
 @hover: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_get_hover_expand ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_hover_expand ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@expand: 
+
+
 <!-- ##### USER_FUNCTION GtkTreeDestroyCountFunc ##### -->
 <para>
 
@@ -1014,3 +1291,165 @@ has some similarity to strcmp() returning 0 for equal strings.
 @destroy: 
 
 
+<!-- ##### USER_FUNCTION GtkTreeViewRowSeparatorFunc ##### -->
+<para>
+Function type for determining whether the row pointed to by @iter should
+be rendered as a separator. A common way to implement this is to have a
+boolean column in the model, whose values the #GtkTreeViewRowSeparatorFunc
+returns.
+</para>
+
+@model: the #GtkTreeModel
+@iter: a #GtkTreeIter pointing at a row in @model
+@data: user data
+@Returns: %TRUE if the row is a separator
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_row_separator_func ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_row_separator_func ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@func: 
+@data: 
+@destroy: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_rubber_banding ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_rubber_banding ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@enable: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_is_rubber_banding_active ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_enable_tree_lines ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_enable_tree_lines ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@enabled: 
+
+
+<!-- ##### ENUM GtkTreeViewGridLines ##### -->
+<para>
+Used to indicate which grid lines to draw in a tree view.
+</para>
+
+@GTK_TREE_VIEW_GRID_LINES_NONE: No grid lines.
+@GTK_TREE_VIEW_GRID_LINES_HORIZONTAL: Horizontal grid lines.
+@GTK_TREE_VIEW_GRID_LINES_VERTICAL: Vertical grid lines.
+@GTK_TREE_VIEW_GRID_LINES_BOTH: Horizontal and vertical grid lines.
+
+<!-- ##### FUNCTION gtk_tree_view_get_grid_lines ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_grid_lines ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@grid_lines: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_tooltip_row ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@tooltip: 
+@path: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_tooltip_cell ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@tooltip: 
+@path: 
+@column: 
+@cell: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_tooltip_context ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@x: 
+@y: 
+@keyboard_tip: 
+@model: 
+@path: 
+@iter: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_get_tooltip_column ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_tree_view_set_tooltip_column ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@column: 
+
+