Gtk.CellRenderer Class
An object for rendering a single cell on a Gdk.Drawable

See Also: CellRenderer Members

Syntax

public class CellRenderer : Object

Remarks

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

The primary use of a Gtk.CellRenderer is for drawing a certain graphical elements on a Gdk.Drawable. Typically, one Gtk.CellRenderer is used to draw many cells on the screen. To this extent, it is not expected that a Gtk.CellRenderer keep any permanent state around. Instead, any state is set just prior to use. Then, the cell is measured using Gtk.CellRendererGetSize(Widget, Gdk.Rectangle, int, int, int, int). Finally, the cell is rendered in the correct location using CellRenderer.Render(Gdk.Window, Widget, Gdk.Rectangle, Gdk.Rectangle, Gdk.Rectangle, CellRendererState).

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

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: 2.12.0.0