The CellRenderer is a base class of a set of objects used for rendering
a cell to a Drawable. These objects are used primarily by the TreeView
widget, though they aren't tied to them in any specific way. It is worth
noting that CellRenderer is not a Widget and cannot be treated as such.
The primary use of a CellRenderer is for drawing a certain graphical
elements on a Drawable. Typically, one cell renderer is used to draw many
cells on the screen. To this extent, it isn't expected that a CellRenderer
keep any permanent state around. Instead, any state is set just prior to use
using GObjects property system. Then, the cell is measured using
cellRendererGetSize. Finally, the cell is rendered in the correct location
using cellRendererRender.
Beyond merely rendering a cell, cell renderers can optionally provide
active user interface elements. A cell renderer can be activatable like
CellRendererToggle, which toggles when it gets activated by a mouse click,
or it can be editable like CellRendererText, which allows the user to edit
the text using a Entry.
|