Package: gtk
Class gtk:cell-renderer
Superclassesgobject:object, common-lisp:standard-object, common-lisp:t Documented Subclassesgtk:cell-renderer-pixbuf, gtk:cell-renderer-progress, gtk:cell-renderer-spinner, gtk:cell-renderer-text, gtk:cell-renderer-toggle Direct SlotsDetails The gtk:cell-renderer class is a base class of a set of objects used for rendering a cell to a cairo:context-t context. These objects are used primarily by the gtk:tree-view widget, though
they are not tied to them in any specific way. It is worth noting that the gtk:cell-renderer object is not a gtk:widget object and cannot
be treated as such. The primary use of a gtk:cell-renderer object is for drawing a certain graphical elements on a Cairo context. Typically, one cell renderer is used to draw many cells on the screen. To this extent, it is not expected that a gtk:cell-renderer object keep any permanent state around. Instead, any state is set just prior to use using GObjects property system. Then, the cell is measured using the gtk:cell-renderer-preferred-size function. Finally, the cell is rendered in the correct location using the gtk:cell-renderer-render function. There are a number of rules that must be followed when writing a new gtk:cell-renderer class. First and formost, its important that a certain set of properties will always yield a cell renderer of the same size, barring a GtkStyle change. The gtk:cell-renderer class 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 the gtk:cell-renderer-toggle object, which toggles when it gets activated by a mouse click, or it can be "editable" like the gtk:cell-renderer-text object, which allows the user to edit the text using a gtk:entry widget. To make a cell renderer activatable or editable, you have to implement the GtkCellRendererClass.activate or GtkCellRendererClass.start_editing virtual functions, respectively. Many properties of the gtk:cell-renderer class and its subclasses have a corresponding set property, e.g. the cell-background-set property corresponds to the cell-background property. These set properties reflect whether a property has been set or not. You should not set them independently. Signal DetailsThe "editing-canceled" signallambda (renderer) :run-firstThe signal gets emitted 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 the Escape key. See also the gtk:cell-renderer-stop-editing function.
The "editing-started" signallambda (renderer editable path) :run-firstThe signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup on editable, e.g. adding a gtk:entry-completion object or setting up additional columns in a gtk:combo-box widget. Note that GTK does not 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 editable argument before doing any specific setup.
| Slot Access FunctionsInherited Slot Access FunctionsSee also |
2024-3-15