GtkTreePath -> array

[email protected] (Tobias Schlitt) Wed, 14 Feb 2007 12:43:02 +0100
Newsgroups php.gtk.doc
Message-ID <[email protected]>
Hi again!

AFAICS the GtkTreePath has been replaced by a simple array structure. I
updated the docs regarding to this and added a description for the
GtkTreeView::row-activated signal.

Regards,
Toby
-- 
Tobias Schlitt - Zend Certification Member       GPG Key: 0xC462BC14
a passion for php                            http://www.schlitt.info
Member of the eZ components project          http://components.ez.no
GtkTreePath.patch (text/x-patch, 5.9 KB)
? GtkTreePath.patch
? insert_column_with_data_func.patch
Index: manual/en/reference/gtk/gtktreeview.xml
===================================================================
RCS file: /repository/php-gtk-doc/manual/en/reference/gtk/gtktreeview.xml,v
retrieving revision 1.16
diff -u -8 -p -r1.16 gtktreeview.xml
--- manual/en/reference/gtk/gtktreeview.xml	29 Jan 2007 17:58:07 -0000	1.16
+++ manual/en/reference/gtk/gtktreeview.xml	14 Feb 2007 11:38:47 -0000
@@ -119,17 +119,17 @@ $treeview->append_column($column);
     </para>
    </desc>
   </method>
 
   <method id="gtk.gtktreeview.method.collapse_row">
    <funcsynopsis>
     <funcprototype>
      <funcdef>void <function>collapse_row</function></funcdef>
-     <paramdef><classname>GtkTreePath</classname> <parameter>path</parameter></paramdef>
+     <paramdef>array <parameter>path</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
     Collapses a given row.
    </shortdesc>
    <desc>
     <para>
      Collapses the row at the given <parameter>path</parameter>
@@ -160,17 +160,17 @@ $treeview->append_column($column);
     </para>
    </desc>
   </method>
 
   <method id="gtk.gtktreeview.method.create_row_drag_icon">
    <funcsynopsis>
     <funcprototype>
      <funcdef> <function>create_row_drag_icon</function></funcdef>
-     <paramdef><classname>GtkTreePath</classname> <parameter>path</parameter></paramdef>
+     <paramdef>array <parameter>path</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
     Creates a GdkPixmap representation of the row
    </shortdesc>
    <desc>
     <para>
      Creates a <classname>GdkPixmap</classname> representation of the row at
@@ -555,17 +555,17 @@ $treeview->append_column($column);
     <para>
      Returns the tree path at the given pixel position. The coordinates
      have to be widget coordinates.
     </para>
     <para>
      The returned array has four elements:
      <itemizedlist>
       <listitem>
-       <classname>GtkTreePath</classname> of the row at the position
+       array of the row at the position
       </listitem>
       <listitem>
        <classname>GtkTreeViewColumn</classname>
       </listitem>
       <listitem>
        <literal>cell_x</literal>
       </listitem>
       <listitem>
@@ -735,26 +735,68 @@ $treeview->append_column($column);
 
   
 
   <method id="gtk.gtktreeview.method.insert_column_with_data_func">
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>insert_column_with_data_func</function></funcdef>
      
-     <paramdef><parameter>position</parameter></paramdef>
-     <paramdef><parameter>title</parameter></paramdef>
+     <paramdef>int <parameter>position</parameter></paramdef>
+     <paramdef>string <parameter>title</parameter></paramdef>
      <paramdef><classname>GtkCellRenderer</classname> <parameter>cellrenderer</parameter></paramdef>
-     <paramdef><parameter>callback</parameter></paramdef>
+     <paramdef>callback <parameter>callback</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
-
+    Inserts a column at the given position with a data function assigned.
    </shortdesc>
    <desc>
+    <para>
+	 This method inserts a new column into a <classname>GtkTreeView</classname>
+	 at the given position with a given name. In contrast to
+	 <function class="GtkTreeView">insert_column</function> and
+	 <function class="GtkTreeView">append_column</function> this method creates
+	 the column object internally and allows you to specify a data function,
+	 which is called everytime a cell in the model for this column changed and
+	 needs to be rendered.
+    </para>
+    <para>
+     The provided callback function receives the following parameters to act on them:
+     <itemizedlist>
+      <listitem>
+	   <classname>GtkTreeViewColumn</classname> The column object created by the
+	   <function class="GtkTreeView">insert_column_with_data_func</function>
+	   call.
+      </listitem>
+      <listitem>
+	   <classname>GtkCellRenderer</classname> The cell renderer used to display
+	   this cell.
+      </listitem>
+      <listitem>
+	   <classname>GtkTreeModel</classname> The model rendered by the tree view.
+	  </listitem>
+      <listitem>
+	   <classname>GtkTreeIter</classname> The tree row affected by the change.
+	  </listitem>
+     </itemizedlist>
+	 Inside the data function you most propably want to change the
+	 <classname>GtkCellRenderer</classname>, which is responsible for
+	 displaying.
+    </para>
+    <example>
+     <title>Using <function class="GtkTreeView">insert_column_with_data_func</function></title>
+     <programlisting role="php">
+      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="&directory.examples;/reference/gtk/gtktreeview/insert_column_with_data_func.phpw" parse="text">
+       <xi:fallback>FIXME:MISSING XINCLUDE CONTENT</xi:fallback>
+      </xi:include>
+     </programlisting>
+    </example>
+   </desc>
+   <desc>
 
    </desc>
   </method>
 
   
 
   <method id="gtk.gtktreeview.method.move_column_after">
    <funcsynopsis>
@@ -1412,21 +1454,23 @@ $treeview->append_column($column);
   </signal>
   
   <signal id="gtk.gtktreeview.signal.row-activated">
    <signalname>row-activated</signalname>
    <funcsynopsis>
     <funcprototype>
      <funcdef>void <cbfunction>callback</cbfunction></funcdef>
      <paramdef>GtkTreeView <parameter>treeview</parameter></paramdef>
-     <paramdef><!-- was:GtkTreePath -->XXX <parameter>UNKNOWN</parameter></paramdef>
-     <paramdef>GtkTreeViewColumn <parameter>UNKNOWN</parameter></paramdef>
+     <paramdef>array <parameter>path</parameter></paramdef>
+     <paramdef>GtkTreeViewColumn <parameter>column</parameter></paramdef>
+     <paramdef>array <parameter>userdata</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
+    Signal emmitted when a row in a GtkTreeView is double-clicked.
    </shortdesc>
    <desc>
 
    </desc>
   </signal>
   
   <signal id="gtk.gtktreeview.signal.row-collapsed">
    <signalname>row-collapsed</signalname>