mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-29 15:25:36 +00:00
7f8df4726f
svn path=/trunk/gtk-sharp/; revision=38803
220 lines
8.2 KiB
XML
220 lines
8.2 KiB
XML
<Type Name="CellRendererToggle" FullName="Gtk.CellRendererToggle">
|
|
<TypeSignature Language="C#" Value="public class CellRendererToggle : Gtk.CellRenderer, IWrapper, IDisposable" Maintainer="John Luke" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>gtk-sharp</AssemblyName>
|
|
<AssemblyPublicKey>
|
|
</AssemblyPublicKey>
|
|
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
|
<AssemblyCulture>neutral</AssemblyCulture>
|
|
<Attributes />
|
|
</AssemblyInfo>
|
|
<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>Renders a <see cref="T:Gtk.ToggleButton" /> or a <see cref="T:Gtk.RadioButton" /></summary>
|
|
<remarks>
|
|
<para>This Class is a <see cref="T:Gtk.CellRenderer" /> implementation that can render a checkbox in your <see cref="T:Gtk.TreeView" /> columns.</para>
|
|
<para>It is important to note that the <see cref="T:Gtk.CellRendererToggle" /> will not change the corresponding bool field in your <see cref="T:Gtk.TreeModel" /> itself - you'll need to provide a handler, as shown in the following code snippet:
|
|
</para>
|
|
<example>
|
|
<code lang="C#">
|
|
private TreeStore store;
|
|
|
|
void SetupTreeView ()
|
|
{
|
|
store = new TreeStore (typeof (string), typeof(bool));
|
|
|
|
// populate store..
|
|
|
|
TreeView tv = new TreeView (store);
|
|
tv.HeadersVisible = true;
|
|
|
|
tv.AppendColumn ("Name", new CellRendererText (), "text", 0);
|
|
|
|
CellRendererToggle crt = new CellRendererToggle();
|
|
crt.Activatable = true;
|
|
crt.Toggled += crt_toggled;
|
|
tv.AppendColumn ("CheckMe", crt, "active", 1);
|
|
|
|
// add the TreeView to some window...
|
|
}
|
|
|
|
void crt_toggled(object o, ToggledArgs args) {
|
|
TreeIter iter;
|
|
|
|
if (store.GetIter (out iter, new TreePath(args.Path))) {
|
|
bool old = (bool) store.GetValue(iter,1);
|
|
store.SetValue(iter,1,!old);
|
|
}
|
|
}
|
|
</code>
|
|
</example>
|
|
</remarks>
|
|
</Docs>
|
|
<Base>
|
|
<BaseTypeName>Gtk.CellRenderer</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
<Interface>
|
|
<InterfaceName>GLib.IWrapper</InterfaceName>
|
|
</Interface>
|
|
<Interface>
|
|
<InterfaceName>System.IDisposable</InterfaceName>
|
|
</Interface>
|
|
</Interfaces>
|
|
<Attributes />
|
|
<Members>
|
|
<Member MemberName="Finalize">
|
|
<MemberSignature Language="C#" Value="protected override void Finalize ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Disposes the resources associated with the object.</summary>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public CellRendererToggle (IntPtr raw);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="raw" Type="System.IntPtr" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Internal constructor</summary>
|
|
<param name="raw">Pointer to the C object.</param>
|
|
<returns>An instance of CellRendererToggle, wrapping the C object.</returns>
|
|
<remarks>
|
|
<para>This is an internal constructor, and should not be used by user code.</para>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public CellRendererToggle ();" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Creates a new <see cref="T:Gtk.CellRendererToggle" />.</summary>
|
|
<returns>an object of type <see cref="T:Gtk.CellRendererToggle" /></returns>
|
|
<remarks>The default constructor.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Activatable">
|
|
<MemberSignature Language="C#" Value="public bool Activatable { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The <see cref="T:Gtk.ToggleButton" /> can be activated.</summary>
|
|
<param name="value">an object of type <see cref="T:System.Boolean" /></param>
|
|
<returns>an object of type <see cref="T:System.Boolean" /></returns>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Active">
|
|
<MemberSignature Language="C#" Value="public bool Active { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The toggle state of the <see cref="T:Gtk.ToggleButton" />.</summary>
|
|
<param name="value">an object of type <see cref="T:System.Boolean" /></param>
|
|
<returns>an object of type <see cref="T:System.Boolean" /></returns>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Radio">
|
|
<MemberSignature Language="C#" Value="public bool Radio { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Draw the <see cref="T:Gtk.ToggleButton" /> as a <see cref="T:Gtk.RadioButton" />.</summary>
|
|
<param name="value">an object of type <see cref="T:System.Boolean" /></param>
|
|
<returns>an object of type <see cref="T:System.Boolean" /></returns>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Toggled">
|
|
<MemberSignature Language="C#" Value="public event Gtk.ToggledHandler Toggled;" />
|
|
<MemberType>Event</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gtk.ToggledHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Emitted when the cell is clicked.</summary>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Inconsistent">
|
|
<MemberSignature Language="C#" Value="public bool Inconsistent { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The inconsistent state of the button.</summary>
|
|
<param name="value">a <see cref="T:System.Boolean" /></param>
|
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="GType">
|
|
<MemberSignature Language="C#" Value="public static GLib.GType GType { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>GLib.GType</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>GType Property.</summary>
|
|
<returns>a <see cref="T:GLib.GType" /></returns>
|
|
<remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.CellRendererToggle" />.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="OnToggled">
|
|
<MemberSignature Language="C#" Value="protected virtual void OnToggled (string path);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="path" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Default handler for the <see cref="M:Gtk.CellRendererToggle.Toggled" /> event.</summary>
|
|
<param name="path">a <see cref="T:System.String" /></param>
|
|
<remarks>Override this method in a subclass to provide a default handler for the <see cref="M:Gtk.CellRendererToggle.Toggled" /> event.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected CellRendererToggle (GLib.GType gtype);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="gtype" Type="GLib.GType" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Protected Constructor.</summary>
|
|
<param name="gtype">a <see cref="T:GLib.GType" /></param>
|
|
<returns>a <see cref="T:Gtk.CellRendererToggle" /></returns>
|
|
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |