[40:7] extends: object
An object for rendering a single cell The GtkCellRenderer is a base class
of a set of objects used for rendering a cell to a cairo_t. 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 cairo_t.
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
gtk_cell_renderer_get_preferred_size(). Finally, the cell is rendered in the
correct location using gtk_cell_renderer_snapshot(). There are a number of
rules that must be followed when writing a new GtkCellRenderer. First and
foremost, it’s important that a certain set of properties will always yield a
cell renderer of the same size, barring a style 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 widget implementing the GtkCellEditable
interface, e.g. GtkEntry. 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 GtkCellRenderer and its subclasses have a corresponding “set”
property, e.g. “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.
CellRenderer (Handle = null)
Creates a new
CellRendererby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asInitiallyUnowned ()
Wraps this handle as
InitiallyUnowned.
A InitiallyUnowned object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnEditingcanceled (callback Fn, UserData = null)
This 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 Escape. See also: gtk_cell_renderer_stop_editing().
Fn is the Aussom callback.Fn is called with (CellRenderer Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnEditingstarted (callback Fn, UserData = null)
This 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
GtkEntryCompletionor setting up additional columns in aGtkComboBox. See gtk_cell_editable_start_editing() for information on the lifecycle of the @editable and a way to do setup that doesn’t depend on the @renderer. 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:c static void text_editing_started (GtkCellRenderer *cell, GtkCellEditable *editable, const char *path, gpointer data) { if (GTK_IS_ENTRY (editable)) { GtkEntry *entry = GTK_ENTRY (editable); // ... create a GtkEntryCompletion gtk_entry_set_completion (entry, completion); } }
Fn is the Aussom callback.Fn is called with (CellRenderer Self, CellEditable Editable, string Path).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setCellbackground (string Value)
Writes the
cell-backgroundproperty.
Value is the new property value.None.setCellbackgroundset (bool Value)
Writes the
cell-background-setproperty.
Value is the new property value.None.setHeight (int Value)
Writes the
heightproperty.
Value is the new property value.None.setIsexpanded (bool Value)
Writes the
is-expandedproperty.
Value is the new property value.None.setIsexpander (bool Value)
Writes the
is-expanderproperty.
Value is the new property value.None.setMode (string Value)
Writes the
modeproperty.
Value is the new property value.None.setSensitive (bool Value)
Writes the
sensitiveproperty.
Value is the new property value.None.setVisible (bool Value)
Writes the
visibleproperty.
Value is the new property value.None.setWidth (int Value)
Writes the
widthproperty.
Value is the new property value.None.setXalign (double Value)
Writes the
xalignproperty.
Value is the new property value.None.setXpad (int Value)
Writes the
xpadproperty.
Value is the new property value.None.setYalign (double Value)
Writes the
yalignproperty.
Value is the new property value.None.setYpad (int Value)
Writes the
ypadproperty.
Value is the new property value.None.activate (object event, object widget, string path, background_area, cell_area, string flags)
Passes an activate event to the cell renderer for possible processing. Some cell renderers may use events; for example,
GtkCellRendererToggletoggles when it gets a mouse click.
event is a GdkEvent.widget is widget that received the event.path is widget-dependent string representation of the event location; e.g. for GtkTreeView, a string representation of GtkTreePath.background_area is background area as passed to gtk_cell_renderer_render().cell_area is cell area as passed to gtk_cell_renderer_render().flags is render flags.get_is_expanded ()
Checks whether the given
GtkCellRendereris expanded.
get_is_expander ()
Checks whether the given
GtkCellRendereris an expander.
get_request_mode ()
Gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.
get_sensitive ()
Returns the cell renderer’s sensitivity.
get_state (object widget, string cell_state)
Translates the cell renderer state to
GtkStateFlags, based on the cell renderer and widget sensitivity, and the givenGtkCellRendererState.
widget is a GtkWidget.cell_state is cell renderer state.get_visible ()
Returns the cell renderer’s visibility.
is_activatable ()
Checks whether the cell renderer can do something when activated.
set_alignment (double xalign, double yalign)
Sets the renderer’s alignment within its available space.
xalign is the x alignment of the cell renderer.yalign is the y alignment of the cell renderer.None.set_fixed_size (int width, int height)
Sets the renderer size to be explicit, independent of the properties set.
width is the width of the cell renderer, or -1.height is the height of the cell renderer, or -1.None.set_is_expanded (bool is_expanded)
Sets whether the given
GtkCellRendereris expanded.
is_expanded is whether @cell should be expanded.None.set_is_expander (bool is_expander)
Sets whether the given
GtkCellRendereris an expander.
is_expander is whether @cell is an expander.None.set_padding (int xpad, int ypad)
Sets the renderer’s padding.
xpad is the x padding of the cell renderer.ypad is the y padding of the cell renderer.None.set_sensitive (bool sensitive)
Sets the cell renderer’s sensitivity.
sensitive is the sensitivity of the cell.None.set_visible (bool visible)
Sets the cell renderer’s visibility.
visible is the visibility of the cell.None.snapshot (object snapshot, object widget, background_area, cell_area, string flags)
Invokes the virtual render function of the
GtkCellRenderer. The three passed-in rectangles are areas in @cr. Most renderers will draw within
the xalign, yalign, xpad, and ypad fields of the GtkCellRenderer should be honored with respect to @cell_area.includes the blank space around the cell, and also the area containing the tree expander; so the @background_area rectangles for all cells tile to cover the entire @window.snapshot is a GtkSnapshot to draw to.widget is the widget owning @window.background_area is entire cell area (including tree expanders and maybe padding on the sides).cell_area is area normally rendered by a cell renderer.flags is flags that affect rendering.None.start_editing (object event, object widget, string path, background_area, cell_area, string flags)
Starts editing the contents of this @cell, through a new
GtkCellEditablewidget created by theGtkCellRendererClass.start_editing virtual function.
event is a GdkEvent.widget is widget that received the event.path is widget-dependent string representation of the event location; e.g. for GtkTreeView, a string representation of GtkTreePath.background_area is background area as passed to gtk_cell_renderer_render().cell_area is cell area as passed to gtk_cell_renderer_render().flags is render flags.stop_editing (bool canceled)
Informs the cell renderer that the editing is stopped. If @canceled is %TRUE, the cell renderer will emit the
GtkCellRenderer::editing-canceled signal. This function should be called by cell renderer implementations in response to theGtkCellEditable::editing-donesignal ofGtkCellEditable.
canceled is %TRUE if the editing has been canceled.None.[782:14] static extends: object
Generated metadata helpers for CellRenderer class surfaces.
properties ()
Returns property metadata for
CellRenderer.
A list.signals ()
Returns signal metadata for
CellRenderer.
A list.[641:7] extends: object
Generated low-level callback wrapper for GIR callback editing-canceled.
CellRendererEditingcanceledCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[711:7] extends: object
Generated low-level callback wrapper for GIR callback editing-started.
CellRendererEditingstartedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, editable, path, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.