2005-01-04 Mike Kestner <mkestner@novell.com>

* gtk/CellLayout.custom : declare SetAttributes and SetCellDataFunc.
	* gtk/CellView.custom : impl SetAttributes and SetCellDataFunc.
	* gtk/ComboBox.custom : impl SetAttributes and SetCellDataFunc.
	* gtk/EntryCompletion.custom : impl SetAttributes and SetCellDataFunc.
	* gtk/Gtk.metadata : hide some methods to be manually implemented.
	* gtk/Makefile.am : add new customs.
	* gtk/NodeCellDataFunc : use CellLayoutDataFuncNative.
	* gtk/TreeView.custom : use CellLayoutDataFunc not TreeCellDataFunc.
	* gtk/TreeViewColumn.custom : impl SetAttributes and SetCellDataFunc.
	[Fixes #70941]

svn path=/trunk/gtk-sharp/; revision=38321
This commit is contained in:
Mike Kestner 2005-01-04 18:54:02 +00:00
parent 363e2b368a
commit 15acf14aef
16 changed files with 409 additions and 173 deletions

View file

@ -1,3 +1,16 @@
2005-01-04 Mike Kestner <mkestner@novell.com>
* gtk/CellLayout.custom : declare SetAttributes and SetCellDataFunc.
* gtk/CellView.custom : impl SetAttributes and SetCellDataFunc.
* gtk/ComboBox.custom : impl SetAttributes and SetCellDataFunc.
* gtk/EntryCompletion.custom : impl SetAttributes and SetCellDataFunc.
* gtk/Gtk.metadata : hide some methods to be manually implemented.
* gtk/Makefile.am : add new customs.
* gtk/NodeCellDataFunc : use CellLayoutDataFuncNative.
* gtk/TreeView.custom : use CellLayoutDataFunc not TreeCellDataFunc.
* gtk/TreeViewColumn.custom : impl SetAttributes and SetCellDataFunc.
[Fixes #70941]
2005-01-04 Mike Kestner <mkestner@novell.com> 2005-01-04 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : set preferred on CellViewMenuItem.NewWithText. * gtk/Gtk.metadata : set preferred on CellViewMenuItem.NewWithText.

View file

@ -144,23 +144,19 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets up a data function for this layout.</summary> <summary>Sets up a data function for this layout.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<param name="func_data">a <see cref="T:System.IntPtr" />, the user data (FIXME: is this necessary in the Gtk# API?)</param>
<param name="destroy">a <see cref="T:System.IntPtr" />, the destroy notification (FIXME: is this necessary in the Gtk# API?)</param>
<remarks> <remarks>
The data function is used instead of the standard attributes mapping for setting the The data function is used instead of the standard attributes mapping for setting the
column value, and should set the value of the layout's cell renderer(s) column value, and should set the value of the layout's cell renderer(s)
@ -168,5 +164,22 @@
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetAttributes">
<MemberSignature Language="C#" Value="public virtual void SetAttributes (Gtk.CellRenderer renderer, object [] attrs);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" />
<Parameter Name="attrs" Type="System.Object[]" />
</Parameters>
<Docs>
<summary>Sets the attribute to model column bindings for a renderer.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attrs">a <see cref="T:System.Object" /></param>
<remarks>The <paramref name="attrs"/> array should consist of pairs of attribute names and column indices.</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -92,7 +92,8 @@
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="property">a <see cref="T:System.String" /></param> <param name="property">a <see cref="T:System.String" /></param>
<param name="value">a <see cref="T:GLib.Value" /></param> <param name="value">a <see cref="T:GLib.Value" /></param>
<remarks></remarks> <remarks>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="GetSizeOfRow"> <Member MemberName="GetSizeOfRow">
@ -213,9 +214,7 @@
<Docs> <Docs>
Clears all existing attributes previously set with Clears all existing attributes previously set with
<see cref="M:Gtk.CellView.SetAttributes" />. <see cref="M:Gtk.CellView.SetAttributes" />.
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param><remarks></remarks></Docs>
<remarks></remarks>
</Docs>
</Member> </Member>
<Member MemberName="Clear"> <Member MemberName="Clear">
<MemberSignature Language="C#" Value="public virtual void Clear ();" /> <MemberSignature Language="C#" Value="public virtual void Clear ();" />
@ -226,7 +225,8 @@
<Parameters /> <Parameters />
<Docs> <Docs>
<summary>Unsets all the mappings on all renderers for this cell view.</summary> <summary>Unsets all the mappings on all renderers for this cell view.</summary>
<remarks></remarks> <remarks>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName=".ctor"> <Member MemberName=".ctor">
@ -358,23 +358,19 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets a data function to use for the cell layout.</summary> <summary>Sets a data function to use for the cell layout.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<param name="func_data">a <see cref="T:System.IntPtr" /></param>
<param name="destroy">a <see cref="T:System.IntPtr" /></param>
<remarks> <remarks>
The data function The data function
is used instead of the standard attributes mapping for setting the is used instead of the standard attributes mapping for setting the
@ -383,5 +379,22 @@
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetAttributes">
<MemberSignature Language="C#" Value="public virtual void SetAttributes (Gtk.CellRenderer cell, object [] attrs);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="attrs" Type="System.Object[]" />
</Parameters>
<Docs>
<summary>Sets the attribute to model column bindings for a renderer.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attrs">a <see cref="T:System.Object" /></param>
<remarks>The <paramref name="attrs"/> array should consist of pairs of attribute name and column index.</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -220,7 +220,8 @@ class ComboBoxSample
<Docs> <Docs>
<summary>Sets the current active item to be the one referenced by iter.</summary> <summary>Sets the current active item to be the one referenced by iter.</summary>
<param name="iter">a <see cref="T:Gtk.TreeIter" /></param> <param name="iter">a <see cref="T:Gtk.TreeIter" /></param>
<remarks></remarks> <remarks>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="Popdown"> <Member MemberName="Popdown">
@ -302,7 +303,6 @@ class ComboBoxSample
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="expand" Type="System.Boolean" /> <Parameter Name="expand" Type="System.Boolean" />
@ -359,7 +359,8 @@ class ComboBoxSample
<see cref="M:Gtk.ComboBox.SetAttributes" />. <see cref="M:Gtk.ComboBox.SetAttributes" />.
</summary> </summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<remarks></remarks> <remarks>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="Clear"> <Member MemberName="Clear">
@ -371,11 +372,12 @@ class ComboBoxSample
<Parameters /> <Parameters />
<Docs> <Docs>
<summary>Unsets all the mappings on all renderers for this combo box.</summary> <summary>Unsets all the mappings on all renderers for this combo box.</summary>
<remarks></remarks> <remarks>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
@ -552,30 +554,21 @@ Default value: 0
<remarks /> <remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetAttributes">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetAttributes (Gtk.CellRenderer cell, object [] attrs);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="attrs" Type="System.Object[]" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets a data function to use for the combo box.</summary> <summary>Sets the attribute to column bindings for a renderer.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="attrs">a <see cref="T:System.Object" /></param>
<param name="func_data">a <see cref="T:System.IntPtr" /></param> <remarks>The <paramref name="attrs"/> array should consist of pairs of attribute name and column indexes.</remarks>
<param name="destroy">a <see cref="T:System.IntPtr" /></param>
<remarks>
The data function
is used instead of the standard attributes mapping for setting the
column value, and should set the value of the cell renderer
as appropriate. <paramref name="func"/> may be <see langword="null"/> to remove an older one.
</remarks>
</Docs> </Docs>
</Member> </Member>
</Members> </Members>

View file

@ -476,23 +476,19 @@ public class DemoEntryCompletion : Window
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets up a data function for this layout.</summary> <summary>Sets up a data function for this layout.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<param name="func_data">a <see cref="T:System.IntPtr" />, the user data (FIXME: is this necessary in the Gtk# API?)</param>
<param name="destroy">a <see cref="T:System.IntPtr" />, the destroy notification (FIXME: is this necessary in the Gtk# API?)</param>
<remarks> <remarks>
The data function is used instead of the standard attributes mapping for setting the The data function is used instead of the standard attributes mapping for setting the
column value, and should set the value of the layout's cell renderer(s) column value, and should set the value of the layout's cell renderer(s)
@ -513,5 +509,22 @@ public class DemoEntryCompletion : Window
<remarks /> <remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetAttributes">
<MemberSignature Language="C#" Value="public virtual void SetAttributes (Gtk.CellRenderer cell, object [] attrs);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="attrs" Type="System.Object[]" />
</Parameters>
<Docs>
<summary>Sets the attribute to model column bindings for a renderer.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attrs">a <see cref="T:System.Object" /></param>
<remarks>The <paramref name="attrs"/> array should be pairs of attribute names and column indexes.</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -1170,7 +1170,7 @@ tree_view.AppendColumn ("title", text, "text", 0);
</Docs> </Docs>
</Member> </Member>
<Member MemberName="AppendColumn"> <Member MemberName="AppendColumn">
<MemberSignature Language="C#" Value="public Gtk.TreeViewColumn AppendColumn (string title, Gtk.CellRenderer cell, Gtk.TreeCellDataFunc cell_data);" /> <MemberSignature Language="C#" Value="public Gtk.TreeViewColumn AppendColumn (string title, Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc cell_data);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>Gtk.TreeViewColumn</ReturnType> <ReturnType>Gtk.TreeViewColumn</ReturnType>
@ -1178,13 +1178,13 @@ tree_view.AppendColumn ("title", text, "text", 0);
<Parameters> <Parameters>
<Parameter Name="title" Type="System.String" /> <Parameter Name="title" Type="System.String" />
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="cell_data" Type="Gtk.TreeCellDataFunc" /> <Parameter Name="cell_data" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Adds a new <see cref="T:Gtk.TreeViewColumn" /> to the TreeView and returns it.</summary> <summary>Adds a new <see cref="T:Gtk.TreeViewColumn" /> to the TreeView and returns it.</summary>
<param name="title">a <see cref="T:System.String" /></param> <param name="title">a <see cref="T:System.String" /></param>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="cell_data">a <see cref="T:Gtk.TreeCellDataFunc" /></param> <param name="cell_data">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<returns>a <see cref="T:Gtk.TreeViewColumn" /></returns> <returns>a <see cref="T:Gtk.TreeViewColumn" /></returns>
<remarks>This method actually creates the column, rather than relying on a column object to be passed in. There's an alternate invokation form if you'd like to pass in an existing column object.</remarks> <remarks>This method actually creates the column, rather than relying on a column object to be passed in. There's an alternate invokation form if you'd like to pass in an existing column object.</remarks>
</Docs> </Docs>
@ -1769,7 +1769,7 @@ tree_view.AppendColumn ("title", text, "text", 0);
</Docs> </Docs>
</Member> </Member>
<Member MemberName="InsertColumn"> <Member MemberName="InsertColumn">
<MemberSignature Language="C#" Value="public int InsertColumn (int pos, string title, Gtk.CellRenderer cell, Gtk.TreeCellDataFunc cell_data);" /> <MemberSignature Language="C#" Value="public int InsertColumn (int pos, string title, Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc cell_data);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Int32</ReturnType> <ReturnType>System.Int32</ReturnType>
@ -1778,16 +1778,16 @@ tree_view.AppendColumn ("title", text, "text", 0);
<Parameter Name="pos" Type="System.Int32" /> <Parameter Name="pos" Type="System.Int32" />
<Parameter Name="title" Type="System.String" /> <Parameter Name="title" Type="System.String" />
<Parameter Name="cell" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="cell_data" Type="Gtk.TreeCellDataFunc" /> <Parameter Name="cell_data" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Convenience function that inserts a new column into the tree view <summary>Convenience function that inserts a new column into the tree view
with the given cell renderer and a <see cref="T:Gtk.TreeCellDataFunc" /> to set cell renderer with the given cell renderer and a <see cref="T:Gtk.CellLayoutDataFunc" /> to set cell renderer
attributes (normally using data from the model). </summary> attributes (normally using data from the model). </summary>
<param name="pos">a <see cref="T:System.Int32" />, the position of the new column (-1 to append, positive numbers to insert)</param> <param name="pos">a <see cref="T:System.Int32" />, the position of the new column (-1 to append, positive numbers to insert)</param>
<param name="title">a <see cref="T:System.String" />, the column title</param> <param name="title">a <see cref="T:System.String" />, the column title</param>
<param name="cell">a <see cref="T:Gtk.CellRenderer" />, the renderer object</param> <param name="cell">a <see cref="T:Gtk.CellRenderer" />, the renderer object</param>
<param name="cell_data">a <see cref="T:Gtk.TreeCellDataFunc" />, a function for presenting the data</param> <param name="cell_data">a <see cref="T:Gtk.CellLayoutDataFunc" />, a function for presenting the data</param>
<returns>The number of columns in the tree view after the insertion.</returns> <returns>The number of columns in the tree view after the insertion.</returns>
<remarks> <remarks>
See also <see cref="M:Gtk.TreeViewColumn.SetCellDataFunc" />, <see cref="M:Gtk.TreeViewColumn.PackStart" />. See also <see cref="M:Gtk.TreeViewColumn.SetCellDataFunc" />, <see cref="M:Gtk.TreeViewColumn.PackStart" />.

View file

@ -403,19 +403,19 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.TreeCellDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell_renderer" Type="Gtk.CellRenderer" /> <Parameter Name="cell_renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.TreeCellDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets the <see cref="T:Gtk.TreeViewColumnFunc" /> to use for the column.</summary> <summary>Sets the <see cref="T:Gtk.CellLayoutDataFunc" /> to use for a renderer.</summary>
<param name="cell_renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell_renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.TreeCellDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks>This function is used instead of the standard attributes mapping for setting the column value, and should set the value of the <see cref="T:Gtk.TreeViewColumn" /><paramref name="cell_renderer" /> as appropriate. <paramref name="func" /> may be <see langword="null" /> to remove an older one.</remarks> <remarks>This function is used instead of the standard attributes mapping for setting the column value, and should set the value of the <see cref="T:Gtk.TreeViewColumn" /><paramref name="cell_renderer" /> as appropriate. <paramref name="func" /> may be <see langword="null" /> to remove an older one.</remarks>
</Docs> </Docs>
</Member> </Member>
@ -578,7 +578,8 @@
<Docs> <Docs>
<summary>Whether this column gets share of extra width allocated to the widget.</summary> <summary>Whether this column gets share of extra width allocated to the widget.</summary>
<returns>a <see cref="T:System.Boolean" /></returns> <returns>a <see cref="T:System.Boolean" /></returns>
<remarks></remarks> <remarks>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="Reorder"> <Member MemberName="Reorder">
@ -680,34 +681,6 @@
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
</Parameters>
<Docs>
<summary>
Sets the <see cref="T:Gtk.CellLayoutDataFunc"/> to use for the column.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<param name="func_data">a <see cref="T:System.IntPtr" /></param>
<param name="destroy">a <see cref="T:System.IntPtr" /></param>
<remarks>
This function is used instead of the standard attributes mapping for
setting the column value, and should set the value of this tree view column's
cell renderer as appropriate. <paramref name="func"/> may be
<see langword="null"/> to remove an older one.
</remarks>
</Docs>
</Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.NodeCellDataFunc func);" /> <MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.NodeCellDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
@ -725,5 +698,22 @@
<remarks /> <remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetAttributes">
<MemberSignature Language="C#" Value="public virtual void SetAttributes (Gtk.CellRenderer cell, object [] attrs);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="attrs" Type="System.Object[]" />
</Parameters>
<Docs>
<summary>Sets the attribute to model column bindings for a renderer.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attrs">a <see cref="T:System.Object" /></param>
<remarks>The <paramref name="attrs"/> array should consist of pairs of attribute name and column index.</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

24
gtk/CellLayout.custom Normal file
View file

@ -0,0 +1,24 @@
// Gtk.CellLayout.custom - Gtk CellLayout customizations
//
// Author: Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2005 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func);
void SetAttributes (CellRenderer renderer, object[] attrs);

62
gtk/CellView.custom Normal file
View file

@ -0,0 +1,62 @@
// Gtk.CellView.custom - Gtk CellView customizations
//
// Authors: Todd Berman <tberman@off.net>
// Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2004 Todd Berman
// Copyright (c) 2005 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
Hashtable datafuncs;
Hashtable DataFuncs {
get {
if (datafuncs == null)
datafuncs = new Hashtable ();
return datafuncs;
}
}
public void SetAttributes (CellRenderer cell, params object[] attrs)
{
if (attrs.Length % 2 != 0)
throw new ArgumentException ("attrs should contain pairs of attribute/col");
ClearAttributes (cell);
for (int i = 0; i < attrs.Length - 1; i += 2) {
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
}
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, IntPtr func, IntPtr func_data, IntPtr destroy);
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, IntPtr destroy);
public void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func)
{
if (func == null) {
DataFuncs [renderer] = null;
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
} else {
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this);
DataFuncs [renderer] = func_wrapper;
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero);
}
}

View file

@ -1,8 +1,10 @@
// Gtk.ComboBox.custom - Gtk ComboBox customizations // Gtk.ComboBox.custom - Gtk ComboBox customizations
// //
// Authors: Todd Berman <tberman@off.net> // Authors: Todd Berman <tberman@off.net>
// Mike Kestner <mkestner@novell.com>
// //
// Copyright (c) 2004 Todd Berman // Copyright (c) 2004 Todd Berman
// Copyright (c) 2005 Novell, Inc.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General // modify it under the terms of version 2 of the Lesser GNU General
@ -19,9 +21,42 @@
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
public void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func) Hashtable datafuncs;
Hashtable DataFuncs {
get {
if (datafuncs == null)
datafuncs = new Hashtable ();
return datafuncs;
}
}
public void SetAttributes (CellRenderer cell, params object[] attrs)
{ {
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = null; if (attrs.Length % 2 != 0)
func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this); throw new ArgumentException ("attrs should contain pairs of attribute/col");
ClearAttributes (cell);
for (int i = 0; i < attrs.Length - 1; i += 2) {
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
}
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, IntPtr func, IntPtr func_data, IntPtr destroy);
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, IntPtr destroy);
public void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func)
{
if (func == null) {
DataFuncs [renderer] = null;
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
} else {
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this);
DataFuncs [renderer] = func_wrapper;
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero); gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero);
} }
}

View file

@ -0,0 +1,62 @@
// Gtk.EntryCompletion.custom - Gtk EntryCompletion customizations
//
// Authors: Todd Berman <tberman@off.net>
// Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2004 Todd Berman
// Copyright (c) 2005 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
Hashtable datafuncs;
Hashtable DataFuncs {
get {
if (datafuncs == null)
datafuncs = new Hashtable ();
return datafuncs;
}
}
public void SetAttributes (CellRenderer cell, params object[] attrs)
{
if (attrs.Length % 2 != 0)
throw new ArgumentException ("attrs should contain pairs of attribute/col");
ClearAttributes (cell);
for (int i = 0; i < attrs.Length - 1; i += 2) {
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
}
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, IntPtr func, IntPtr func_data, IntPtr destroy);
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, IntPtr destroy);
public void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func)
{
if (func == null) {
DataFuncs [renderer] = null;
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
} else {
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this);
DataFuncs [renderer] = func_wrapper;
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero);
}
}

View file

@ -66,6 +66,8 @@
<attr path="/api/namespace/enum[@cname='GtkVisibility']" name="hidden">1</attr> <attr path="/api/namespace/enum[@cname='GtkVisibility']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkCellEditable']/method[@name='EditingDone']" name="name">FinishEditing</attr> <attr path="/api/namespace/interface[@cname='GtkCellEditable']/method[@name='EditingDone']" name="name">FinishEditing</attr>
<attr path="/api/namespace/interface[@cname='GtkCellEditable']/signal[@name='RemoveWidget']" name="name">WidgetRemoved</attr> <attr path="/api/namespace/interface[@cname='GtkCellEditable']/signal[@name='RemoveWidget']" name="name">WidgetRemoved</attr>
<attr path="/api/namespace/interface[@cname='GtkCellLayout']/method[@name='SetAttributes']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkCellLayout']/method[@name='SetCellDataFunc']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='GetEditable']" name="name">GetIsEditable</attr> <attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='GetEditable']" name="name">GetIsEditable</attr>
<attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='InsertText']/*/*[@name='position']" name="pass_as">ref</attr> <attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='InsertText']/*/*[@name='position']" name="pass_as">ref</attr>
<attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='SetEditable']" name="name">SetIsEditable</attr> <attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='SetEditable']" name="name">SetIsEditable</attr>
@ -124,6 +126,7 @@
<attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='StartEditing']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='StartEditing']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='GetSize']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='GetSize']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkCellViewMenuItem']/constructor[@cname='gtk_cell_view_menu_item_new_with_text']" name="preferred">1</attr> <attr path="/api/namespace/object[@cname='GtkCellViewMenuItem']/constructor[@cname='gtk_cell_view_menu_item_new_with_text']" name="preferred">1</attr>
<attr path="/api/namespace/object[@cname='GtkCellView']/method[@name='SetValues']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkCheckButton']/constructor[@cname='gtk_check_button_new_with_mnemonic']" name="preferred">1</attr> <attr path="/api/namespace/object[@cname='GtkCheckButton']/constructor[@cname='gtk_check_button_new_with_mnemonic']" name="preferred">1</attr>
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_mnemonic']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_mnemonic']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_label']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkCheckMenuItem']/constructor[@cname='gtk_check_menu_item_new_with_label']" name="hidden">1</attr>
@ -336,13 +339,15 @@
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Prepend']/*/*[@name='iter']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Prepend']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Remove']/*/*[@name='iter']" name="pass_as">ref</attr> <attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Remove']/*/*[@name='iter']" name="pass_as">ref</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='SetColumnTypes']/*/*[@name='types']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='SetColumnTypes']/*/*[@name='types']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/constructor[@cname='gtk_tree_view_column_new_with_attributes']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='AddAttribute']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='AddAttribute']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='Clear']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='Clear']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='ClearAttributes']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='ClearAttributes']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='Clicked']" name="name">Click</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='Clicked']" name="name">Click</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='GetCellRenderers']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackEnd']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackEnd']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackStart']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackStart']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='GetCellRenderers']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='SetAttributes']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/constructor[@cname='gtk_tree_view_new_with_model']/*/*[@type='GtkTreeModel*']" name="null_ok">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/constructor[@cname='gtk_tree_view_new_with_model']/*/*[@type='GtkTreeModel*']" name="null_ok">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragDest']/*/*[@name='targets']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragDest']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragSource']/*/*[@name='targets']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragSource']/*/*[@name='targets']" name="array">1</attr>

View file

@ -45,6 +45,8 @@ customs = \
Button.custom \ Button.custom \
Calendar.custom \ Calendar.custom \
CellRenderer.custom \ CellRenderer.custom \
CellLayout.custom \
CellView.custom \
CheckMenuItem.custom \ CheckMenuItem.custom \
Clipboard.custom \ Clipboard.custom \
ColorSelection.custom \ ColorSelection.custom \
@ -54,6 +56,7 @@ customs = \
Container.custom \ Container.custom \
Dialog.custom \ Dialog.custom \
Entry.custom \ Entry.custom \
EntryCompletion.custom \
FileChooserDialog.custom \ FileChooserDialog.custom \
FileChooserWidget.custom \ FileChooserWidget.custom \
FileSelection.custom \ FileSelection.custom \

View file

@ -36,12 +36,12 @@ namespace Gtk {
managed (col, renderer, store.GetNode (iter)); managed (col, renderer, store.GetNode (iter));
} }
internal GtkSharp.TreeCellDataFuncNative NativeDelegate; internal GtkSharp.CellLayoutDataFuncNative NativeDelegate;
protected NodeCellDataFunc managed; protected NodeCellDataFunc managed;
public NodeCellDataFuncWrapper (NodeCellDataFunc managed, object o) : base (o) public NodeCellDataFuncWrapper (NodeCellDataFunc managed, object o) : base (o)
{ {
NativeDelegate = new GtkSharp.TreeCellDataFuncNative (NativeCallback); NativeDelegate = new GtkSharp.CellLayoutDataFuncNative (NativeCallback);
this.managed = managed; this.managed = managed;
} }
} }

View file

@ -120,7 +120,7 @@
return raw_ret; return raw_ret;
} }
public Gtk.TreeViewColumn AppendColumn (string title, Gtk.CellRenderer cell, Gtk.TreeCellDataFunc cell_data) { public TreeViewColumn AppendColumn (string title, CellRenderer cell, CellLayoutDataFunc cell_data) {
Gtk.TreeViewColumn col = new Gtk.TreeViewColumn (); Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();
col.Title = title; col.Title = title;
col.PackStart (cell, true); col.PackStart (cell, true);
@ -136,7 +136,7 @@
return col; return col;
} }
public int InsertColumn (int pos, string title, CellRenderer cell, TreeCellDataFunc cell_data) public int InsertColumn (int pos, string title, CellRenderer cell, CellLayoutDataFunc cell_data)
{ {
TreeViewColumn col = new TreeViewColumn (); TreeViewColumn col = new TreeViewColumn ();
col.Title = title; col.Title = title;

View file

@ -21,6 +21,16 @@
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
public void SetAttributes (CellRenderer cell, params object[] attrs)
{
if (attrs.Length % 2 != 0)
throw new ArgumentException ("attrs should contain pairs of attribute/col");
ClearAttributes (cell);
for (int i = 0; i < attrs.Length - 1; i += 2) {
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
}
}
private void _NewWithAttributes (string title, Gtk.CellRenderer cell, Array attrs) { private void _NewWithAttributes (string title, Gtk.CellRenderer cell, Array attrs) {
Title = title; Title = title;
@ -76,16 +86,16 @@
} }
[DllImport("libgtk-win32-2.0-0.dll")] [DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_view_column_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.TreeCellDataFuncNative func, IntPtr func_data, IntPtr destroy); static extern void gtk_tree_view_column_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, IntPtr destroy);
public void SetCellDataFunc (CellRenderer cell_renderer, TreeCellDataFunc func) public void SetCellDataFunc (CellRenderer cell_renderer, CellLayoutDataFunc func)
{ {
if (func == null) { if (func == null) {
ReleaseDataFunc (cell_renderer); ReleaseDataFunc (cell_renderer);
return; return;
} }
; ;
GtkSharp.TreeCellDataFuncWrapper wrapper = new GtkSharp.TreeCellDataFuncWrapper (func, this); GtkSharp.CellLayoutDataFuncWrapper wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this);
CellDataFuncs [cell_renderer.Handle] = wrapper; CellDataFuncs [cell_renderer.Handle] = wrapper;
gtk_tree_view_column_set_cell_data_func(Handle, cell_renderer.Handle, wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero); gtk_tree_view_column_set_cell_data_func(Handle, cell_renderer.Handle, wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero);
} }