gtk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Object An object for rendering a single cell on a

The is a base class of a set of objects used for rendering a cell to a . These objects are used primarily by the widget, though they are not tied to them in any specific way. It is worth noting that is not a and cannot be treated as such.

The primary use of a is for drawing a certain graphical elements on a . Typically, one is used to draw many cells on the screen. To this extent, it is not expected that a keep any permanent state around. Instead, any state is set just prior to use. Then, the cell is measured using . Finally, the cell is rendered in the correct location using .

There are a number of rules that must be followed when writing a new . First and foremost, it is important that a certain set of properties will always yield a of the same size, barring a change. The also has a number of generic properties that are expected to be honored by all children.

- Constructor
  2.12.0.0
  Protected constructor.
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Protected Constructor.
  Chain to this constructor if you have manually registered a native value for your subclass.
- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Method
  2.12.0.0
  System.Boolean `` `` `` `` `` `` an object of type an object of type an object of type an object of type an object of type an object of type Passes an activate event to the for possible processing. an object of type Some s may use events; for example, toggles when it gets a mouse click.
- Method
  2.12.0.0
  System.Obsolete
  System.Void Causes the cell renderer to fire an event. 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.
- Property
  2.12.0.0
  GLib.Property("cell-background")
  System.String Cell background color as a . a
- Property
  2.12.0.0
  GLib.Property("cell-background-gdk")
  Gdk.Color Cell background color as a . a
- Event
  2.12.0.0
  GLib.Signal("editing-canceled")
  System.EventHandler This event is raised when the user cancels the process of editing a cell. For example, an editable cell renderer could be written to cancel editing when the user presses Escape.
- Event
  2.12.0.0
  GLib.Signal("editing-started")
  Gtk.EditingStartedHandler This signal gets emitted when a cell starts to be edited.

  The intended use of this signal is to do special setup on editable cell, e.g. adding a or setting up additional columns in a .

  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.

- Method
  2.12.0.0
  System.Void `` `` Location to fill in with the fixed width of the widget, or . Location to fill in with the fixed height of the widget, or . Fills in and with the appropriate size.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideGetSize", Type=typeof(Gtk.CellRenderer))
  System.Void `` `` `` `` `` `` a a a a a a Obtains the and needed to render the cell. Used by view widgets to determine the appropriate size for the passed to gtk_cell_renderer_render(). If is not , fills in the x and y offsets (if set) of the cell relative to this location. Please note that the values set in and , as well as those in and are inclusive of the xpad and ypad properties.
- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  GLib.Property("height")
  System.Int32 The fixed height. an object of type
- Property
  2.12.0.0
  GLib.Property("is-expanded")
  System.Boolean Row is an expander row, and is expanded. an object of type
- Property
  2.12.0.0
  GLib.Property("is-expander")
  System.Boolean Row has children. an object of type
- Property
  2.12.0.0
  GLib.Property("mode")
  Gtk.CellRendererMode Editable mode of the CellRenderer. an object of type
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideEditingCanceled", Type=typeof(Gtk.CellRenderer))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideEditingStarted", Type=typeof(Gtk.CellRenderer))
  System.Void `` `` a a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideRender", Type=typeof(Gtk.CellRenderer))
  System.Void `` `` `` `` `` `` a to render to a , the widget that owns a , entire cell area (including tree expanders and maybe padding on the sides) a , area normally rendered by a cell renderer a , area that needs updating a , flags that affect rendering Invokes the virtual render function of the . The three passed-in rectangles are areas of window. Most renderers will draw within ; the xalign, yalign, xpad, and ypad fields of the should be honored with respect to . includes the blank space around the cell, and also the area containing the tree expander; so the rectangles for all cells tile to cover the entire window. is a clip rectangle.
- Method
  2.12.0.0
  System.Void `` `` `` `` `` `` an object of type an object of type an object of type an object of type an object of type an object of type Invokes the virtual render function of the . The three passed-in rectangles are areas of . Most renderers will draw within ; includes the blank space around the cell, and also the area containing the tree expander; so the rectangles for all cells tile to cover the entire window. is a clip rectangle.
- Property
  2.12.0.0
  GLib.Property("sensitive")
  System.Boolean Display the cell sensitive. A . The default value is .
- Method
  2.12.0.0
  System.Void `` `` an object of type an object of type Sets the renderer size to be explicit, independent of the properties set.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideStartEditing", Type=typeof(Gtk.CellRenderer))
  Gtk.CellEditable `` `` `` `` `` `` a a a a a a Passes an activate event to the for possible processing. a Some cell renderers may use events; for example, toggles when it gets a mouse click.

  The following example illustrates a CellRenderText derived class that implements auto-completion in the entry widget.

  `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; } }`
- Method
  2.12.0.0
  System.Void `` a Informs the cell renderer that the editing is stopped. If is , the cell renderer will emit the event. This method should be called by cell renderer implementations in response to the event of .
- Property
  2.12.0.0
  GLib.Property("visible")
  System.Boolean Display the cell. an object of type
- Property
  2.12.0.0
  GLib.Property("width")
  System.Int32 The fixed width. an object of type
- Property
  2.12.0.0
  GLib.Property("xalign")
  System.Single The x-align. an object of type
- Property
  2.12.0.0
  GLib.Property("xpad")
  System.UInt32 The xpad. an object of type
- Property
  2.12.0.0
  GLib.Property("yalign")
  System.Single The y-align. an object of type
- Property
  2.12.0.0
  GLib.Property("ypad")
  System.UInt32 The ypad. an object of type