GtkCellRenderer {RGtk2} | R Documentation |
An object for rendering a single cell on a GdkDrawable
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)
GObject +----GInitiallyUnowned +----GtkObject +----GtkCellRenderer +----GtkCellRendererText +----GtkCellRendererPixbuf +----GtkCellRendererProgress +----GtkCellRendererToggle
The 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.
GtkCellRenderer
GtkCellRendererState
selected
prelit
insensitive
sorted
focused
GtkCellRendererMode
inert
activatable
editable
The (renderer, user.data)
See also: gtkCellRendererStopEditing
.
Since 2.4
renderer
GtkCellRenderer
] the object which received the signaluser.data
The (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
GtkCellRenderer
] the object which received the signaleditable
GtkCellEditable
] the GtkCellEditable
path
user.data
cell-background
[character : Write]Cell background color as a string. Default value: NULL
cell-background-gdk
[GdkColor
: Read / Write]Cell background color as a GdkColor.
cell-background-set
[logical : Read / Write]Whether this tag affects the cell background color. Default value: FALSE
height
[integer : Read / Write]The fixed height. Allowed values: >= -1 Default value: -1
is-expanded
[logical : Read / Write]Row is an expander row, and is expanded. Default value: FALSE
is-expander
[logical : Read / Write]Row has children. Default value: FALSE
mode
[GtkCellRendererMode
: Read / Write]Editable mode of the CellRenderer. Default value: GTK_CELL_RENDERER_MODE_INERT
sensitive
[logical : Read / Write]Display the cell sensitive. Default value: TRUE
visible
[logical : Read / Write]Display the cell. Default value: TRUE
width
[integer : Read / Write]The fixed width. Allowed values: >= -1 Default value: -1
xalign
[numeric : Read / Write]The x-align. Allowed values: [0,1] Default value: 0.5
xpad
[numeric : Read / Write]The xpad. Default value: 0
yalign
[numeric : Read / Write]The y-align. Allowed values: [0,1] Default value: 0.5
ypad
[numeric : Read / Write]The ypad. Default value: 0
Derived by RGtkGen from GTK+ documentation
http://developer.gnome.org/doc/API/2.0/gtk/GtkCellRenderer.html
GtkCellRendererText
GtkCellRendererPixbuf
GtkCellRendererToggle