Package: gtk
Class gtk:cell-renderer
Superclassesgobject:initially-unowned, gobject: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-snapshot 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 style change. The gtk:cell-renderer 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 widget implementing the gtk:cell-editable interface, for example the 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, for example, cell-background-set corresponds to cell-background. These set properties reflect whether a property has been set or not. You should not set them independently. WarningSignal DetailsThe "editing-canceled" signallambda (renderer) :run-first
The "editing-started" signallambda (renderer editable path) :run-first
| Slot Access FunctionsInherited Slot Access FunctionsSee also |
2024-5-15