mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 06:35:41 +00:00
3402acb805
svn path=/trunk/gtk-sharp/; revision=90841
677 lines
30 KiB
XML
677 lines
30 KiB
XML
<Type Name="CellRenderer" FullName="Gtk.CellRenderer">
|
|
<TypeSignature Language="C#" Maintainer="John Luke" Value="public class CellRenderer : Gtk.Object" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>gtk-sharp</AssemblyName>
|
|
<AssemblyPublicKey>
|
|
</AssemblyPublicKey>
|
|
<AssemblyVersion>2.12.0.0</AssemblyVersion>
|
|
</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>An object for rendering a single cell on a <see cref="T:Gdk.Drawable" /></summary>
|
|
<remarks>
|
|
<para>
|
|
The <see cref="T:Gtk.CellRenderer" /> is a base class of a set of objects used for rendering a cell to a <see cref="T:Gdk.Drawable" />.
|
|
These objects are used primarily by the <see cref="T:Gtk.TreeView" /> widget, though they are not tied to them in any specific way.
|
|
It is worth noting that <see cref="T:Gtk.CellRenderer" /> is not a <see cref="T:Gtk.Widget" /> and cannot be treated as such.
|
|
</para>
|
|
<para>
|
|
The primary use of a <see cref="T:Gtk.CellRenderer" /> is for drawing a certain graphical elements on a <see cref="T:Gdk.Drawable" />.
|
|
Typically, one <see cref="T:Gtk.CellRenderer" /> is used to draw many cells on the screen.
|
|
To this extent, it is not expected that a <see cref="T:Gtk.CellRenderer" /> keep any permanent state around.
|
|
Instead, any state is set just prior to use.
|
|
Then, the cell is measured using <see cref="M:Gtk.CellRendererGetSize(Gtk.Widget,Gdk.Rectangle,System.Int32,System.Int32,System.Int32,System.Int32)" />.
|
|
Finally, the cell is rendered in the correct location using <see cref="M:Gtk.CellRenderer.Render(Gdk.Window,Gtk.Widget,Gdk.Rectangle,Gdk.Rectangle,Gdk.Rectangle,Gtk.CellRendererState)" />.
|
|
</para>
|
|
<para>
|
|
There are a number of rules that must be followed when writing a new <see cref="T:Gtk.CellRenderer" />.
|
|
First and foremost, it is important that a certain set of properties will always yield a <see cref="T:Gtk.CellRenderer" /> of the same size, barring a <see cref="T:Gtk.Style" /> change.
|
|
The <see cref="T:Gtk.CellRenderer" /> also has a number of generic properties that are expected to be honored by all children.
|
|
</para>
|
|
</remarks>
|
|
</Docs>
|
|
<Base>
|
|
<BaseTypeName>Gtk.Object</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
</Interfaces>
|
|
<Members>
|
|
<Member MemberName="Render">
|
|
<MemberSignature Language="C#" Value="public void Render (Gdk.Window window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="window" Type="Gdk.Window" />
|
|
<Parameter Name="widget" Type="Gtk.Widget" />
|
|
<Parameter Name="background_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="cell_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="expose_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="flags" Type="Gtk.CellRendererState" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Invokes the virtual render function of the <see cref="T:Gtk.CellRenderer" />.</summary>
|
|
<param name="window">an object of type <see cref="T:Gdk.Window" /></param>
|
|
<param name="widget">an object of type <see cref="T:Gtk.Widget" /></param>
|
|
<param name="background_area">an object of type <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="cell_area">an object of type <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="expose_area">an object of type <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="flags">an object of type <see cref="T:Gtk.CellRendererState" /></param>
|
|
<remarks>
|
|
The three passed-in rectangles are areas of <paramref name="window" />.
|
|
Most renderers will draw within <paramref name="cell_area" />;
|
|
<paramref name="background_area" /> includes the blank space around the cell, and also the area containing the tree expander; so the <paramref name="background_area" /> rectangles for all cells tile to cover the entire window.
|
|
<paramref name="expose_area" /> is a clip rectangle.
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="SetFixedSize">
|
|
<MemberSignature Language="C#" Value="public void SetFixedSize (int width, int height);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="width" Type="System.Int32" />
|
|
<Parameter Name="height" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Sets the renderer size to be explicit, independent of the properties set.</summary>
|
|
<param name="width">an object of type <see cref="T:System.Int32" /></param>
|
|
<param name="height">an object of type <see cref="T:System.Int32" /></param>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Activate">
|
|
<MemberSignature Language="C#" Value="public bool Activate (Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="evnt" Type="Gdk.Event" />
|
|
<Parameter Name="widget" Type="Gtk.Widget" />
|
|
<Parameter Name="path" Type="System.String" />
|
|
<Parameter Name="background_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="cell_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="flags" Type="Gtk.CellRendererState" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Passes an activate event to the <see cref="T:Gtk.CellRenderer" /> for possible processing.</summary>
|
|
<param name="evnt">an object of type <see cref="T:Gdk.Event" /></param>
|
|
<param name="widget">an object of type <see cref="T:Gtk.Widget" /></param>
|
|
<param name="path">an object of type <see cref="T:System.String" /></param>
|
|
<param name="background_area">an object of type <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="cell_area">an object of type <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="flags">an object of type <see cref="T:Gtk.CellRendererState" /></param>
|
|
<returns>an object of type <see cref="T:System.Boolean" /></returns>
|
|
<remarks>Some <see cref="T:Gtk.CellRenderer" />s may use events; for example, <see cref="T:Gtk.CellRendererToggle" /> toggles when it gets a mouse click.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public CellRenderer (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>
|
|
<remarks>
|
|
<para>This is an internal constructor, and should not be used by user code.</para>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Height">
|
|
<MemberSignature Language="C#" Value="public int Height { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The fixed height.</summary>
|
|
<value>an object of type <see cref="T:System.Int32" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("height")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Visible">
|
|
<MemberSignature Language="C#" Value="public bool Visible { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Display the cell.</summary>
|
|
<value>an object of type <see cref="T:System.Boolean" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("visible")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Xalign">
|
|
<MemberSignature Language="C#" Value="public float Xalign { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Single</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The x-align.</summary>
|
|
<value>an object of type <see cref="T:System.Single" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("xalign")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Width">
|
|
<MemberSignature Language="C#" Value="public int Width { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The fixed width.</summary>
|
|
<value>an object of type <see cref="T:System.Int32" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("width")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Yalign">
|
|
<MemberSignature Language="C#" Value="public float Yalign { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Single</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The y-align.</summary>
|
|
<value>an object of type <see cref="T:System.Single" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("yalign")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="IsExpander">
|
|
<MemberSignature Language="C#" Value="public bool IsExpander { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Row has children.</summary>
|
|
<value>an object of type <see cref="T:System.Boolean" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("is-expander")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Ypad">
|
|
<MemberSignature Language="C#" Value="public uint Ypad { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.UInt32</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The ypad.</summary>
|
|
<value>an object of type <see cref="T:System.UInt32" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("ypad")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Xpad">
|
|
<MemberSignature Language="C#" Value="public uint Xpad { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.UInt32</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The xpad.</summary>
|
|
<value>an object of type <see cref="T:System.UInt32" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("xpad")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="IsExpanded">
|
|
<MemberSignature Language="C#" Value="public bool IsExpanded { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Row is an expander row, and is expanded.</summary>
|
|
<value>an object of type <see cref="T:System.Boolean" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("is-expanded")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Mode">
|
|
<MemberSignature Language="C#" Value="public Gtk.CellRendererMode Mode { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gtk.CellRendererMode</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Editable mode of the CellRenderer.</summary>
|
|
<value>an object of type <see cref="T:Gtk.CellRendererMode" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("mode")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="CellBackgroundGdk">
|
|
<MemberSignature Language="C#" Value="public Gdk.Color CellBackgroundGdk { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gdk.Color</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Cell background color as a <see cref="T:Gdk.Color" />.</summary>
|
|
<value>a <see cref="T:Gdk.Color" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("cell-background-gdk")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="CellBackground">
|
|
<MemberSignature Language="C#" Value="public string CellBackground { set; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.String</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Cell background color as a <see cref="T:System.String" />.</summary>
|
|
<value>a <see cref="T:System.String" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("cell-background")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</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>
|
|
<value>a <see cref="T:GLib.GType" /></value>
|
|
<remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.CellRenderer" />.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected CellRenderer (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>
|
|
<remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.Obsolete</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected CellRenderer ();" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Protected constructor.</summary>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="GetSize">
|
|
<MemberSignature Language="C#" Value="public virtual void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="widget" Type="Gtk.Widget" />
|
|
<Parameter Name="cell_area" Type="Gdk.Rectangle&" RefType="ref" />
|
|
<Parameter Name="x_offset" Type="System.Int32&" RefType="out" />
|
|
<Parameter Name="y_offset" Type="System.Int32&" RefType="out" />
|
|
<Parameter Name="width" Type="System.Int32&" RefType="out" />
|
|
<Parameter Name="height" Type="System.Int32&" RefType="out" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Obtains the <paramref name="width" /> and <paramref name="height" /> needed to render the cell.</summary>
|
|
<param name="widget">a <see cref="T:Gtk.Widget" /></param>
|
|
<param name="cell_area">a <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="x_offset">a <see cref="T:System.Int32" /></param>
|
|
<param name="y_offset">a <see cref="T:System.Int32" /></param>
|
|
<param name="width">a <see cref="T:System.Int32" /></param>
|
|
<param name="height">a <see cref="T:System.Int32" /></param>
|
|
<remarks>Used by view widgets to determine the appropriate size for the <paramref name="cell_area" /> passed to gtk_cell_renderer_render(). If <paramref name="cell_area" /> is not <see langword="null" />, fills in the x and y offsets (if set) of the cell relative to this location. Please note that the values set in <paramref name="width" /> and <paramref name="height" />, as well as those in <paramref name="x_offset" /> and <paramref name="y_offset" /> are inclusive of the xpad and ypad properties.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Render">
|
|
<MemberSignature Language="C#" Value="protected virtual void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="window" Type="Gdk.Drawable" />
|
|
<Parameter Name="widget" Type="Gtk.Widget" />
|
|
<Parameter Name="background_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="cell_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="expose_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="flags" Type="Gtk.CellRendererState" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Invokes the virtual render function of the <see cref="M:CellRenderer" />. The three passed-in rectangles are areas of window. Most renderers will draw within <paramref name="cell_area" />; the xalign, yalign, xpad, and ypad fields of the <see cref="M:CellRenderer" /> should be honored with respect to <paramref name="cell_area" />. <paramref name="background_area" /> includes the blank space around the cell, and also the area containing the tree expander; so the <paramref name="background_area" /> rectangles for all cells tile to cover the entire window. <paramref name="expose_area" /> is a clip rectangle.</summary>
|
|
<param name="window">a <see cref="T:Gdk.Drawable" /> to render to</param>
|
|
<param name="widget">a <see cref="T:Gtk.Widget" />, the widget that owns <paramref name="window" /></param>
|
|
<param name="background_area">a <see cref="T:Gdk.Rectangle" />, entire cell area (including tree expanders and maybe padding on the sides)</param>
|
|
<param name="cell_area">a <see cref="T:Gdk.Rectangle" />, area normally rendered by a cell renderer</param>
|
|
<param name="expose_area">a <see cref="T:Gdk.Rectangle" />, area that needs updating</param>
|
|
<param name="flags">a <see cref="T:System.Int32" />, flags that affect rendering</param>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="StartEditing">
|
|
<MemberSignature Language="C#" Value="public virtual Gtk.CellEditable StartEditing (Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gtk.CellEditable</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="evnt" Type="Gdk.Event" />
|
|
<Parameter Name="widget" Type="Gtk.Widget" />
|
|
<Parameter Name="path" Type="System.String" />
|
|
<Parameter Name="background_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="cell_area" Type="Gdk.Rectangle" />
|
|
<Parameter Name="flags" Type="Gtk.CellRendererState" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Passes an activate event to the <see cref="T:Gtk.CellRenderer" /> for possible processing.</summary>
|
|
<param name="evnt">a <see cref="T:Gdk.Event" /></param>
|
|
<param name="widget">a <see cref="T:Gtk.Widget" /></param>
|
|
<param name="path">a <see cref="T:System.String" /></param>
|
|
<param name="background_area">a <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="cell_area">a <see cref="T:Gdk.Rectangle" /></param>
|
|
<param name="flags">a <see cref="T:System.Int32" /></param>
|
|
<returns>a <see cref="T:Gtk.CellEditable" /></returns>
|
|
<remarks>Some cell renderers may use events; for example, <see cref="T:CellRendererToggle" /> toggles when it gets a mouse click.
|
|
<para>
|
|
The following example illustrates a CellRenderText derived class that implements auto-completion in the entry widget.
|
|
</para><example><code lang="C#">
|
|
public class CellRendererCompletion : CellRendererText
|
|
{
|
|
public delegate ListStore CompletionStoreNeededDelegate(TreeView tree, out int textColumn);
|
|
|
|
// Delegate that is called to obtain a ListStore that contains entries
|
|
// for the column being editted. TreeView.GetCursor(out path, out column)
|
|
// can be used to determine the column being editted.
|
|
public static CompletionStoreNeededDelegate CompletionStoreNeededEventHandler;
|
|
|
|
// Required constructor that may be called by the framework.
|
|
public CellRendererCompletion(System.IntPtr raw) : base(raw)
|
|
{
|
|
}
|
|
|
|
public CellRendererCompletion()
|
|
{
|
|
}
|
|
|
|
public override CellEditable StartEditing(Gdk.Event evnt, Widget widget, string path,
|
|
Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags)
|
|
{
|
|
// get the entry widget
|
|
Entry entry = base.StartEditing (evnt, widget, path, background_area, cell_area, flags) as Gtk.Entry;
|
|
|
|
// make it auto-complete
|
|
TreeView treeview = widget as TreeView;
|
|
int textColumn = 0;
|
|
|
|
entry.Completion = new EntryCompletion();
|
|
entry.Completion.Model = CreateCompletionModel(treeview, out textColumn);
|
|
entry.Completion.TextColumn = textColumn;
|
|
|
|
return entry;
|
|
}
|
|
|
|
// Gets the ListStore that contains the auto-complete entries
|
|
// to be shown when editting this cell. Typical use might use
|
|
// TreeView.GetCursor(out path, out column) to get the column name
|
|
// being editted to build an appropriate list.
|
|
private static TreeModel CreateCompletionModel(TreeView treeview, out int textColumn)
|
|
{
|
|
textColumn = 0;
|
|
|
|
if (CompletionStoreNeededEventHandler != null)
|
|
return CompletionStoreNeededEventHandler(treeview, out textColumn);
|
|
|
|
return null;
|
|
}
|
|
|
|
}
|
|
</code></example></remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="EditingCanceled">
|
|
<MemberSignature Language="C#" Value="public event EventHandler EditingCanceled;" />
|
|
<MemberType>Event</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.EventHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>
|
|
This event is raised when the user cancels the process of
|
|
editing a cell.
|
|
</summary>
|
|
<remarks>
|
|
For example, an editable cell renderer could be written to cancel
|
|
editing when the user presses Escape.
|
|
</remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Signal("editing-canceled")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="OnEditingCanceled">
|
|
<MemberSignature Language="C#" Value="protected virtual void OnEditingCanceled ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Default handler for the <see cref="M:Gtk.CellRenderer.EditingCanceled" /> event.</summary>
|
|
<remarks>Override this method in a subclass to provide a default handler for the <see cref="M:Gtk.CellRenderer.EditingCanceled" /> event.</remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="CancelEditing">
|
|
<MemberSignature Language="C#" Value="public void CancelEditing ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Causes the cell renderer to fire an <see cref="M:Gtk.CellRenderer.EditingCanceled" /> event.</summary>
|
|
<remarks>
|
|
This function is for use only by implementations of cell renderers that need to
|
|
notify the client program that an editing process was canceled and the
|
|
changes were not committed.
|
|
</remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Sensitive">
|
|
<MemberSignature Language="C#" Value="public bool Sensitive { set; get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>Display the cell sensitive.</summary>
|
|
<value>A <see cref="T:System.Boolean" />.</value>
|
|
<remarks>The default value is <see langword="true" />.</remarks>
|
|
<since version="Gtk# 2.6" />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Property("sensitive")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="EditingStarted">
|
|
<MemberSignature Language="C#" Value="public event Gtk.EditingStartedHandler EditingStarted;" />
|
|
<MemberType>Event</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gtk.EditingStartedHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>This signal gets emitted when a cell starts to be edited.</summary>
|
|
<remarks>
|
|
<para>
|
|
The intended use of this signal is to do special setup on editable cell, e.g. adding a <see cref="T:Gtk.EntryCompletion" /> or setting up additional columns in a <see cref="T:Gtk.ComboBox" />.
|
|
</para>
|
|
<para>
|
|
Note that GTK# doesn't guarantee that cell renderers will continue to use the same kind of widget for editing in future releases, therefore you should check the type of the cell before doing any specifi setup.
|
|
</para>
|
|
</remarks>
|
|
<since version="Gtk# 2.6" />
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>GLib.Signal("editing-started")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="OnEditingStarted">
|
|
<MemberSignature Language="C#" Value="protected virtual void OnEditingStarted (Gtk.CellEditable editable, string path);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="editable" Type="Gtk.CellEditable" />
|
|
<Parameter Name="path" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Default handler for the <see cref="M:Gtk.CellRenderer.EditingStarted" /> event.</summary>
|
|
<param name="editable">a <see cref="T:Gtk.CellEditable" /></param>
|
|
<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.CellRenderer.EditingStarted" /> event.</remarks>
|
|
<since version="Gtk# 2.6" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="StopEditing">
|
|
<MemberSignature Language="C#" Value="public void StopEditing (bool canceled);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="canceled" Type="System.Boolean" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Informs the cell renderer that the editing is stopped.</summary>
|
|
<param name="canceled">a <see cref="T:System.Boolean" /></param>
|
|
<remarks>If <paramref name="canceled" /> is <see langword="true" />, the cell renderer will emit the <see cref="F:Gtk.CellRenderer.EditingCanceled" /> event. This method should be called by cell renderer implementations in response to the <see cref="F:Gtk.CellEditable.EditingDone" /> event of <see cref="T:Gtk.CellEditable" />.</remarks>
|
|
<since version="Gtk# 2.6" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="GetFixedSize">
|
|
<MemberSignature Language="C#" Value="public void GetFixedSize (out int width, out int height);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="width" Type="System.Int32&" RefType="out" />
|
|
<Parameter Name="height" Type="System.Int32&" RefType="out" />
|
|
</Parameters>
|
|
<Docs>
|
|
<param name="width">Location to fill in with the fixed width of the widget, or <see langword="null" />.</param>
|
|
<param name="height">Location to fill in with the fixed height of the widget, or <see langword="null" />.</param>
|
|
<summary>Fills in <paramref name="width" /> and <paramref name="height" /> with the appropriate size.</summary>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type>
|