2007-04-17 Ben Motmans <ben.motmans@gmail.com>
* gtk/Widget.custom: StyleGetPropertyValue that returns a GLib.Value when StyleGetProperty cannot automatically cast the GLib.Value (eg: Gdk.Color) [Fixes #81253] * doc/en/Gtk/Widget.xml: Documentation for the new StyleGetPropertyValue method and improved documentation for StyleGetProperty * gtk/TreeView.custom: OddRowColor and EvenRowColor properties * doc/en/Gtk/TreeView.xml: documentation for OddRowColor and EvenRowColor properties svn path=/trunk/gtk-sharp/; revision=75816
This commit is contained in:
parent
a66f097de3
commit
dfa98a3ea2
5 changed files with 85 additions and 1 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2007-04-17 Ben Motmans <ben.motmans@gmail.com>
|
||||
|
||||
* gtk/Widget.custom:
|
||||
StyleGetPropertyValue that returns a GLib.Value when StyleGetProperty cannot automatically cast the GLib.Value (eg: Gdk.Color)
|
||||
[Fixes #81253]
|
||||
* doc/en/Gtk/Widget.xml:
|
||||
Documentation for the new StyleGetPropertyValue method and improved documentation for StyleGetProperty
|
||||
* gtk/TreeView.custom:
|
||||
OddRowColor and EvenRowColor properties
|
||||
* doc/en/Gtk/TreeView.xml:
|
||||
documentation for OddRowColor and EvenRowColor properties
|
||||
|
||||
2007-04-12 Brad Taylor <brad@getcoded.net>
|
||||
|
||||
* doc/en/Gtk/Widget.xml: Documentation for OnActivate, but only because
|
||||
|
|
|
@ -2269,5 +2269,31 @@ tree_view.AppendColumn ("title", text, "text", 0);
|
|||
<since version="Gtk# 2.10" />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="OddRowColor">
|
||||
<MemberSignature Language="C#" Value="public Gdk.Color OddRowColor { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gdk.Color</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>This property contains the background color that is used for all even rows.</summary>
|
||||
<value>a <see cref="T:Gdk.Color" /></value>
|
||||
<remarks />
|
||||
<since version="Gtk# 2.10" />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="EvenRowColor">
|
||||
<MemberSignature Language="C#" Value="public Gdk.Color EvenRowColor { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gdk.Color</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>This property contains the background color that is used for all odd rows.</summary>
|
||||
<value>a <see cref="T:Gdk.Color" /></value>
|
||||
<remarks>The odd row color is only used when the <see cref="M:Gtk.TreeView.RulesHint" /> property is set to true.</remarks>
|
||||
<since version="Gtk# 2.10" />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
|
|
|
@ -2950,10 +2950,29 @@ class TestClose
|
|||
<summary>Obtains the value of a style property of <paramref name="widget" />.</summary>
|
||||
<param name="property_name">The name of a style property.</param>
|
||||
<remarks />
|
||||
<returns>To be added.</returns>
|
||||
<returns>The property value. This can be one of the following types: <see cref="T:System.Boolean" />, <see cref="T:System.Int32" />, <see cref="T:System.UInt32" />, <see cref="T:System.Int64" />, <see cref="T:System.UInt64" />,
|
||||
<see cref="T:System.Enum" />, <see cref="T:System.Single" />, <see cref="T:System.Double" />, <see cref="T:System.String" />, <see cref="T:System.IntPtr" />
|
||||
or <see cref="T:GLib.Object" />.</returns>
|
||||
<since version="Gtk# 2.4" />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="StyleGetPropertyValue">
|
||||
<MemberSignature Language="C#" Value="internal GLib.Value StyleGetPropertyValue (string property_name);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>GLib.Value</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="property_name" Type="System.String" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Obtains the value of a style property of <paramref name="widget" />.</summary>
|
||||
<param name="property_name">The name of a style property.</param>
|
||||
<remarks>This method should only be used in certain scenarios where <see cref="M:Gtk.Widget.StyleGetProperty" /> fails, for example: when the GLib.Value contains a <see cref="T:Gdk.Color" />.</remarks>
|
||||
<returns>A <see cref="T:GLib.Value" /> instance. When the instance is no longer needed, Dispose() must be invoked.</returns>
|
||||
<since version="Gtk# 2.10" />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="HasScreen">
|
||||
<MemberSignature Language="C#" Value="public bool HasScreen { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
|
|
|
@ -40,6 +40,24 @@
|
|||
Raw = gtk_tree_view_new_with_model (store.Handle);
|
||||
}
|
||||
|
||||
public Gdk.Color OddRowColor {
|
||||
get {
|
||||
GLib.Value value = StyleGetPropertyValue ("odd-row-color");
|
||||
Gdk.Color ret = (Gdk.Color)value;
|
||||
value.Dispose ();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public Gdk.Color EvenRowColor {
|
||||
get {
|
||||
GLib.Value value = StyleGetPropertyValue ("even-row-color");
|
||||
Gdk.Color ret = (Gdk.Color)value;
|
||||
value.Dispose ();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_tree_view_get_columns (IntPtr raw);
|
||||
|
||||
|
|
|
@ -331,6 +331,15 @@ public object StyleGetProperty (string property_name) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
internal GLib.Value StyleGetPropertyValue (string property_name) {
|
||||
GLib.Value value = new GLib.Value ();
|
||||
|
||||
IntPtr name = GLib.Marshaller.StringToPtrGStrdup (property_name);
|
||||
gtksharp_widget_style_get_property (Handle, name, ref value);
|
||||
GLib.Marshaller.Free (name);
|
||||
return value;
|
||||
}
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_widget_list_mnemonic_labels (IntPtr raw);
|
||||
|
||||
|
|
Loading…
Reference in a new issue