gtkCellRendererGetSize(object, widget, cell.area = NULL)
gtkCellRendererRender(object, window, widget, background.area, cell.area, expose.area, flags)
gtkCellRendererActivate(object, event, widget, path, background.area, cell.area, flags)
gtkCellRendererStartEditing(object, event, widget, path, background.area, cell.area, flags)
gtkCellRendererEditingCanceled(object)
gtkCellRendererEditingCanceled(object)
gtkCellRendererStopEditing(object, canceled)
gtkCellRendererGetFixedSize(object)
gtkCellRendererSetFixedSize(object, width, height)
gtkCellRendererGetVisible(object)
gtkCellRendererSetVisible(object, visible)
gtkCellRendererGetSensitive(object)
gtkCellRendererSetSensitive(object, sensitive)
gtkCellRendererGetAlignment(object, xalign, yalign)
gtkCellRendererSetAlignment(object, xalign, yalign)
gtkCellRendererGetPadding(object, xpad, ypad)
gtkCellRendererSetPadding(object, xpad, ypad)
GObject +----GInitiallyUnowned +----GtkObject +----GtkCellRenderer +----GtkCellRendererText +----GtkCellRendererPixbuf +----GtkCellRendererProgress +----GtkCellRendererSpinner +----GtkCellRendererToggle
GtkCellRenderer
is a base class of a set of objects used for
rendering a cell to a GdkDrawable
. These objects are used primarily by
the GtkTreeView
widget, though they aren't tied to them in any
specific way. It is worth noting that GtkCellRenderer
is not a
GtkWidget
and cannot be treated as such. The primary use of a GtkCellRenderer
is for drawing a certain graphical
elements on a GdkDrawable
. 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 GObject
s property system. Then, the
cell is measured using gtkCellRendererGetSize
. Finally, the cell
is rendered in the correct location using gtkCellRendererRender
. There are a number of rules that must be followed when writing a new
GtkCellRenderer
. First and formost, it's important that a certain set
of properties will always yield a cell renderer of the same size,
barring a GtkStyle
change. The GtkCellRenderer
also has a number of
generic properties that are expected to be honored by all children. Beyond merely rendering a cell, cell renderers can optionally
provide active user interface elements. A cell renderer can be
activatable like GtkCellRendererToggle
,
which toggles when it gets activated by a mouse click, or it can be
editable like GtkCellRendererText
, which
allows the user to edit the text using a GtkEntry
.
To make a cell renderer activatable or editable, you have to
implement the activate
or start.editing
virtual functions,
respectively.GtkCellRendererState
selected
prelit
insensitive
sorted
focused
GtkCellRendererMode
inert
activatable
editable
editing-canceled(renderer, user.data)
gtkCellRendererStopEditing
.
Since 2.4 renderer
user.data
editing-started(renderer, editable, path, user.data)
editable
, e.g. adding a GtkEntryCompletion
or setting
up additional columns in a GtkComboBox
. 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 editable
before doing any specific setup, as in the following example:
text_editing_started <- function(cell, editable, path, data) { checkPtrType(editable, "GtkEntry") ## ... create a GtkEntryCompletion editable$setCompletion(completion) }Since 2.6
renderer
editable
GtkCellEditable
path
user.data
cell-background
[character : * : Write]cell-background-gdk
[GdkColor
: * : Read / Write]cell-background-set
[logical : Read / Write]editing
[logical : Read]height
[integer : Read / Write]is-expanded
[logical : Read / Write]is-expander
[logical : Read / Write]mode
[GtkCellRendererMode
: Read / Write]sensitive
[logical : Read / Write]visible
[logical : Read / Write]width
[integer : Read / Write]xalign
[numeric : Read / Write]xpad
[numeric : Read / Write]yalign
[numeric : Read / Write]ypad
[numeric : Read / Write]GtkCellRendererText
GtkCellRendererPixbuf
GtkCellRendererToggle