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>
* gtk/Gtk.metadata : set preferred on CellViewMenuItem.NewWithText.

View File

@ -10,7 +10,7 @@
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Docs>
<summary>Manages layout for table cells.</summary>
<remarks/>
<remarks />
</Docs>
<Base />
<Interfaces>
@ -31,11 +31,11 @@
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Re-inserts <paramref name="cell"/> at <paramref name="position"/>.</summary>
<summary>Re-inserts <paramref name="cell" /> at <paramref name="position" />.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="position">a <see cref="T:System.Int32" /></param>
<remarks>
Note that <paramref name="cell"/> has already to be packed
Note that <paramref name="cell" /> has already to be packed
into the cell layout for this to function properly.
</remarks>
</Docs>
@ -52,14 +52,14 @@
</Parameters>
<Docs>
<summary>
Adds the <paramref name="cell"/> to the end of the cell layout.
Adds the <paramref name="cell" /> to the end of the cell layout.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" />, TRUE if <paramref name="cell"/> is to be given extra space allocated to this cell layout.</param>
<param name="expand">a <see cref="T:System.Boolean" />, TRUE if <paramref name="cell" /> is to be given extra space allocated to this cell layout.</param>
<remarks>
If <paramref name="expand"/> is FALSE, then the
If <paramref name="expand" /> is FALSE, then the
cell is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is
divided evenly between cells for which <paramref name="expand" /> is
TRUE.
</remarks>
</Docs>
@ -76,14 +76,14 @@
</Parameters>
<Docs>
<summary>
Packs <paramref name="cell"/> into the beginning of the cell layout.
Packs <paramref name="cell" /> into the beginning of the cell layout.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" />, TRUE if <paramref name="cell"/> is to be given extra space allocated to this cell layout.</param>
<param name="expand">a <see cref="T:System.Boolean" />, TRUE if <paramref name="cell" /> is to be given extra space allocated to this cell layout.</param>
<remarks>
If <paramref name="expand"/> is FALSE, then the
If <paramref name="expand" /> is FALSE, then the
cell is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is
divided evenly between cells for which <paramref name="expand" /> is
TRUE.
</remarks>
</Docs>
@ -107,11 +107,11 @@
<param name="attribute">a <see cref="T:System.String" /></param>
<param name="column">a <see cref="T:System.Int32" /></param>
<remarks>
The <paramref name="column"/> is the
column of the model to get a value from, and the <paramref name="attribute"/> is the
parameter on <paramref name="cell"/> to be set from the value. So for example if column 2
The <paramref name="column" /> is the
column of the model to get a value from, and the <paramref name="attribute" /> is the
parameter on <paramref name="cell" /> to be set from the value. So for example if column 2
of the model contains strings, you could have the "text" attribute of a
<see cref="T:Gtk.CellRendererText"/> get its values from column 2.
<see cref="T:Gtk.CellRendererText" /> get its values from column 2.
</remarks>
</Docs>
</Member>
@ -126,9 +126,9 @@
</Parameters>
<Docs>
<summary>Clears all existing attributes previously set with
<see cref="M:Gtk.CellLayout.SetAttributes"/>.</summary>
<see cref="M:Gtk.CellLayout.SetAttributes" />.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<remarks/>
<remarks />
</Docs>
</Member>
<Member MemberName="Clear">
@ -140,33 +140,46 @@
<Parameters />
<Docs>
<summary>Unsets all the mappings on all renderers for this cell layout.</summary>
<remarks/>
<remarks />
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="renderer" 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 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_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>
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)
as appropriate. <paramref name="func"/> may be <see langword="null"/> to remove an older one.
as appropriate. <paramref name="func" /> may be <see langword="null" /> to remove an older one.
</remarks>
</Docs>
</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>
</Type>

View File

@ -88,11 +88,12 @@
<Parameter Name="value" Type="GLib.Value" />
</Parameters>
<Docs>
<summary>Sets the value of <paramref name="renderer"/>'s property <paramref name="property"/> to <paramref name="value"/>, then resizes and redraws this cell view.</summary>
<summary>Sets the value of <paramref name="renderer" />'s property <paramref name="property" /> to <paramref name="value" />, then resizes and redraws this cell view.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="property">a <see cref="T:System.String" /></param>
<param name="value">a <see cref="T:GLib.Value" /></param>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="GetSizeOfRow">
@ -124,11 +125,11 @@
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Re-inserts <paramref name="cell"/> at <paramref name="position"/>.</summary>
<summary>Re-inserts <paramref name="cell" /> at <paramref name="position" />.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="position">a <see cref="T:System.Int32" /></param>
<remarks>
Note that <paramref name="cell"/> has already to be packed
Note that <paramref name="cell" /> has already to be packed
into its view for this to function properly.
</remarks>
</Docs>
@ -144,13 +145,13 @@
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Adds the <paramref name="cell"/> into the end of the cell layout.</summary>
<summary>Adds the <paramref name="cell" /> into the end of the cell layout.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
If <paramref name="expand" /> is <see langword="false" />, then the
<paramref name="cell" /> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand" /> is <see langword="true" />.
</remarks>
</Docs>
</Member>
@ -165,13 +166,13 @@
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Packs the <paramref name="cell"/> into the beginning of the cell layout.</summary>
<summary>Packs the <paramref name="cell" /> into the beginning of the cell layout.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
If <paramref name="expand" /> is <see langword="false" />, then the
<paramref name="cell" /> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand" /> is <see langword="true" />.
</remarks>
</Docs>
</Member>
@ -191,13 +192,13 @@
Adds an attribute mapping to the list for this cell layout.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell"/> to be set from the value</param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell" /> to be set from the value</param>
<param name="column">a <see cref="T:System.Int32" />, column of the model to get a value from.</param>
<remarks>
The <paramref name="column"/> is the column of the model to get a value from, and the <paramref name="attribute"/> is the
parameter on <paramref name="cell"/> to be set from the value. So for example if column 2
The <paramref name="column" /> is the column of the model to get a value from, and the <paramref name="attribute" /> is the
parameter on <paramref name="cell" /> to be set from the value. So for example if column 2
of the model contains strings, you could have the "text" attribute of a
<see cref="T:Gtk.ComboBox"/> get its values from column 2.
<see cref="T:Gtk.ComboBox" /> get its values from column 2.
</remarks>
</Docs>
</Member>
@ -212,10 +213,8 @@
</Parameters>
<Docs>
Clears all existing attributes previously set with
<see cref="M:Gtk.CellView.SetAttributes"/>.
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<remarks></remarks>
</Docs>
<see cref="M:Gtk.CellView.SetAttributes" />.
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param><remarks></remarks></Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public virtual void Clear ();" />
@ -226,7 +225,8 @@
<Parameters />
<Docs>
<summary>Unsets all the mappings on all renderers for this cell view.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
@ -358,29 +358,42 @@
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters>
<Docs>
<summary>Sets a data function to use for the cell layout.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></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>
</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="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
<Parameter Name="attrs" Type="System.Object[]" />
</Parameters>
<Docs>
<summary>Sets a data function to use for the cell layout.</summary>
<summary>Sets the attribute to model column bindings for a renderer.</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>
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>
<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>

View File

@ -220,7 +220,8 @@ class ComboBoxSample
<Docs>
<summary>Sets the current active item to be the one referenced by iter.</summary>
<param name="iter">a <see cref="T:Gtk.TreeIter" /></param>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Popdown">
@ -266,11 +267,11 @@ class ComboBoxSample
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Re-inserts <paramref name="cell"/> at <paramref name="position"/>.</summary>
<summary>Re-inserts <paramref name="cell" /> at <paramref name="position" />.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="position">a <see cref="T:System.Int32" /></param>
<remarks>
Note that <paramref name="cell"/> has already to be packed
Note that <paramref name="cell" /> has already to be packed
into the combo box for this to function properly.
</remarks>
</Docs>i
@ -286,13 +287,13 @@ class ComboBoxSample
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Adds the <paramref name="cell"/> to the end of the combo box.</summary>
<summary>Adds the <paramref name="cell" /> to the end of the combo box.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
If <paramref name="expand" /> is <see langword="false" />, then the
<paramref name="cell" /> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand" /> is <see langword="true" />.
</remarks>
</Docs>
</Member>
@ -302,19 +303,18 @@ class ComboBoxSample
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Packs the <paramref name="cell"/> into the beginning of the combo box.</summary>
<summary>Packs the <paramref name="cell" /> into the beginning of the combo box.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
If <paramref name="expand" /> is <see langword="false" />, then the
<paramref name="cell" /> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand" /> is <see langword="true" />.
</remarks>
</Docs>
</Member>
@ -334,13 +334,13 @@ class ComboBoxSample
Adds an attribute mapping to the list in this combo box.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell"/> to be set from the value</param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell" /> to be set from the value</param>
<param name="column">a <see cref="T:System.Int32" />, column of the model to get a value from.</param>
<remarks>
The <paramref name="column"/> is the column of the model to get a value from, and the <paramref name="attribute"/> is the
parameter on <paramref name="cell"/> to be set from the value. So for example if column 2
The <paramref name="column" /> is the column of the model to get a value from, and the <paramref name="attribute" /> is the
parameter on <paramref name="cell" /> to be set from the value. So for example if column 2
of the model contains strings, you could have the "text" attribute of a
<see cref="T:Gtk.ComboBox"/> get its values from column 2.
<see cref="T:Gtk.ComboBox" /> get its values from column 2.
</remarks>
</Docs>
</Member>
@ -356,10 +356,11 @@ class ComboBoxSample
<Docs>
<summary>
Clears all existing attributes previously set with
<see cref="M:Gtk.ComboBox.SetAttributes"/>.
<see cref="M:Gtk.ComboBox.SetAttributes" />.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Clear">
@ -371,11 +372,12 @@ class ComboBoxSample
<Parameters />
<Docs>
<summary>Unsets all the mappings on all renderers for this combo box.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
@ -392,7 +394,7 @@ class ComboBoxSample
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.
as appropriate. <paramref name="func" /> may be <see langword="null" /> to remove an older one.
</remarks>
</Docs>
</Member>
@ -552,30 +554,21 @@ Default value: 0
<remarks />
</Docs>
</Member>
<Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func, IntPtr func_data, IntPtr destroy);" />
<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="func" Type="Gtk.CellLayoutDataFunc" />
<Parameter Name="func_data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="System.IntPtr" />
<Parameter Name="attrs" Type="System.Object[]" />
</Parameters>
<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="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>
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>
<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 indexes.</remarks>
</Docs>
</Member>
</Members>

View File

@ -236,13 +236,13 @@ public class DemoEntryCompletion : Window
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Adds the <paramref name="cell"/> to the end of the entry-completion widget.</summary>
<summary>Adds the <paramref name="cell" /> to the end of the entry-completion widget.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
If <paramref name="expand" /> is <see langword="false" />, then the
<paramref name="cell" /> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand" /> is <see langword="true" />.
</remarks>
</Docs>
</Member>
@ -257,13 +257,13 @@ public class DemoEntryCompletion : Window
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Packs the <paramref name="cell"/> into the beginning of the entry-completion widget.</summary>
<summary>Packs the <paramref name="cell" /> into the beginning of the entry-completion widget.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="expand">a <see cref="T:System.Boolean" /></param>
<remarks>
If <paramref name="expand"/> is <see langword="false"/>, then the
<paramref name="cell"/> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand"/> is <see langword="true"/>.
If <paramref name="expand" /> is <see langword="false" />, then the
<paramref name="cell" /> is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <paramref name="expand" /> is <see langword="true" />.
</remarks>
</Docs>
</Member>
@ -283,13 +283,13 @@ public class DemoEntryCompletion : Window
Adds an attribute mapping to the list in this entry-completion widget.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell"/> to be set from the value</param>
<param name="attribute">a <see cref="T:System.String" />, parameter on <paramref name="cell" /> to be set from the value</param>
<param name="column">a <see cref="T:System.Int32" />, column of the model to get a value from.</param>
<remarks>
The <paramref name="column"/> is the column of the model to get a value from, and the <paramref name="attribute"/> is the
parameter on <paramref name="cell"/> to be set from the value. So for example if column 2
The <paramref name="column" /> is the column of the model to get a value from, and the <paramref name="attribute" /> is the
parameter on <paramref name="cell" /> to be set from the value. So for example if column 2
of the model contains strings, you could have the "text" attribute of a
<see cref="T:Gtk.EntryCompletion"/> get its values from column 2.
<see cref="T:Gtk.EntryCompletion" /> get its values from column 2.
</remarks>
</Docs>
</Member>
@ -305,7 +305,7 @@ public class DemoEntryCompletion : Window
<Docs>
<summary>
Clears all existing attributes previously set with
<see cref="M:Gtk.EntryCompletion.SetAttributes"/>.
<see cref="M:Gtk.EntryCompletion.SetAttributes" />.
</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<remarks />
@ -476,23 +476,19 @@ public class DemoEntryCompletion : Window
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="renderer" 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 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_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>
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)
@ -513,5 +509,22 @@ public class DemoEntryCompletion : Window
<remarks />
</Docs>
</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>
</Type>

View File

@ -1170,7 +1170,7 @@ tree_view.AppendColumn ("title", text, "text", 0);
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>Gtk.TreeViewColumn</ReturnType>
@ -1178,13 +1178,13 @@ tree_view.AppendColumn ("title", text, "text", 0);
<Parameters>
<Parameter Name="title" Type="System.String" />
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="cell_data" Type="Gtk.TreeCellDataFunc" />
<Parameter Name="cell_data" Type="Gtk.CellLayoutDataFunc" />
</Parameters>
<Docs>
<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="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>
<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>
@ -1769,7 +1769,7 @@ tree_view.AppendColumn ("title", text, "text", 0);
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
@ -1778,16 +1778,16 @@ tree_view.AppendColumn ("title", text, "text", 0);
<Parameter Name="pos" Type="System.Int32" />
<Parameter Name="title" Type="System.String" />
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="cell_data" Type="Gtk.TreeCellDataFunc" />
<Parameter Name="cell_data" Type="Gtk.CellLayoutDataFunc" />
</Parameters>
<Docs>
<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>
<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="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>
<remarks>
See also <see cref="M:Gtk.TreeViewColumn.SetCellDataFunc" />, <see cref="M:Gtk.TreeViewColumn.PackStart" />.

View File

@ -93,7 +93,7 @@
<param name="func">an object of type <see cref="T:Gtk.TreeCellDataFunc" /></param>
<param name="func_data">an object of type <see cref="T:System.IntPtr" /></param>
<param name="destroy">an object of type <see cref="T:Gtk.DestroyNotify" /></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>
</Member>
<Member MemberName="Finalize">
@ -403,19 +403,19 @@
</Docs>
</Member>
<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>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell_renderer" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.TreeCellDataFunc" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters>
<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="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>
</Docs>
</Member>
@ -578,7 +578,8 @@
<Docs>
<summary>Whether this column gets share of extra width allocated to the widget.</summary>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Reorder">
@ -592,7 +593,7 @@
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Re-inserts <paramref name="cell"/> at <paramref name="position"/>.</summary>
<summary>Re-inserts <paramref name="cell" /> at <paramref name="position" />.</summary>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="position">a <see cref="T:System.Int32" /></param>
<remarks>The given cell must already be packed into the layout for this method to work properly.</remarks>
@ -680,34 +681,6 @@
</remarks>
</Docs>
</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">
<MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.NodeCellDataFunc func);" />
<MemberType>Method</MemberType>
@ -725,5 +698,22 @@
<remarks />
</Docs>
</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>
</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
//
// 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
@ -19,9 +21,42 @@
// Boston, MA 02111-1307, USA.
public void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func)
{
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = null;
func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this);
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero);
}
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

@ -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/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='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='InsertText']/*/*[@name='position']" name="pass_as">ref</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='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='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='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>
@ -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='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='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='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='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='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']/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>

View File

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

View File

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

View File

@ -120,7 +120,7 @@
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 ();
col.Title = title;
col.PackStart (cell, true);
@ -136,7 +136,7 @@
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 ();
col.Title = title;

View File

@ -21,6 +21,16 @@
// 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) {
Title = title;
@ -76,16 +86,16 @@
}
[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) {
ReleaseDataFunc (cell_renderer);
return;
}
;
GtkSharp.TreeCellDataFuncWrapper wrapper = new GtkSharp.TreeCellDataFuncWrapper (func, this);
GtkSharp.CellLayoutDataFuncWrapper wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func, this);
CellDataFuncs [cell_renderer.Handle] = wrapper;
gtk_tree_view_column_set_cell_data_func(Handle, cell_renderer.Handle, wrapper.NativeDelegate, IntPtr.Zero, IntPtr.Zero);
}