CellRendererProtocol
public protocol CellRendererProtocol : InitiallyUnownedProtocol
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_size(). Finally, the cell
is rendered in the correct location using gtk_cell_renderer_render().
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 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 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.
The CellRendererProtocol protocol exposes the methods and properties of an underlying GtkCellRenderer instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see CellRenderer.
Alternatively, use CellRendererRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkCellRendererinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
cell_renderer_ptrDefault implementationTyped pointer to the underlying
GtkCellRendererinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkCellRendererinstance.Declaration
Swift
var cell_renderer_ptr: UnsafeMutablePointer<GtkCellRenderer>! { get } -
Required Initialiser for types conforming to
CellRendererProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
CellRendererPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: CellRendererPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a CellRenderer property
Declaration
Swift
@inlinable func get(property: CellRendererPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a CellRenderer property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: CellRendererPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
CellRendererSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: CellRendererSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
CellRendererSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: CellRendererSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onEditingCanceled(flags:Extension methodhandler: ) 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().Note
This represents the underlyingediting-canceledsignalDeclaration
Swift
@discardableResult @inlinable func onEditingCanceled(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
editingCanceledsignal is emitted -
editingCanceledSignalExtension methodTyped
editing-canceledsignal for using theconnect(signal:)methodsDeclaration
Swift
static var editingCanceledSignal: CellRendererSignalName { get } -
onEditingStarted(flags:Extension methodhandler: ) 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 aGtkEntryCompletionor setting up additional columns in aGtkComboBox.See
gtk_cell_editable_start_editing()for information on the lifecycle of theeditableand a way to do setup that doesn’t depend on therenderer.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
editablebefore doing any specific setup, as in the following example: (C Language Example):static void text_editing_started (GtkCellRenderer *cell, GtkCellEditable *editable, const gchar *path, gpointer data) { if (GTK_IS_ENTRY (editable)) { GtkEntry *entry = GTK_ENTRY (editable); // ... create a GtkEntryCompletion gtk_entry_set_completion (entry, completion); } }Note
This represents the underlyingediting-startedsignalDeclaration
Swift
@discardableResult @inlinable func onEditingStarted(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ editable: CellEditableRef, _ path: String) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
editablethe
GtkCellEditablepaththe path identifying the edited cell
handlerThe signal handler to call Run the given callback whenever the
editingStartedsignal is emitted -
editingStartedSignalExtension methodTyped
editing-startedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var editingStartedSignal: CellRendererSignalName { get } -
onNotifyCellBackground(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::cell-backgroundsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackground(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCellBackgroundsignal is emitted -
notifyCellBackgroundSignalExtension methodTyped
notify::cell-backgroundsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCellBackgroundSignal: CellRendererSignalName { get } -
onNotifyCellBackgroundGdk(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::cell-background-gdksignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackgroundGdk(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCellBackgroundGdksignal is emitted -
notifyCellBackgroundGdkSignalExtension methodTyped
notify::cell-background-gdksignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCellBackgroundGdkSignal: CellRendererSignalName { get } -
onNotifyCellBackgroundRGBA(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::cell-background-rgbasignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackgroundRGBA(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCellBackgroundRGBAsignal is emitted -
notifyCellBackgroundRGBASignalExtension methodTyped
notify::cell-background-rgbasignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCellBackgroundRGBASignal: CellRendererSignalName { get } -
onNotifyCellBackgroundSet(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::cell-background-setsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackgroundSet(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyCellBackgroundSetsignal is emitted -
notifyCellBackgroundSetSignalExtension methodTyped
notify::cell-background-setsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyCellBackgroundSetSignal: CellRendererSignalName { get } -
onNotifyEditing(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::editingsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyEditing(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyEditingsignal is emitted -
notifyEditingSignalExtension methodTyped
notify::editingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyEditingSignal: CellRendererSignalName { get } -
onNotifyHeight(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::heightsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHeightsignal is emitted -
notifyHeightSignalExtension methodTyped
notify::heightsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHeightSignal: CellRendererSignalName { get } -
onNotifyIsExpanded(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::is-expandedsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsExpanded(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIsExpandedsignal is emitted -
notifyIsExpandedSignalExtension methodTyped
notify::is-expandedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIsExpandedSignal: CellRendererSignalName { get } -
onNotifyIsExpander(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::is-expandersignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsExpander(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIsExpandersignal is emitted -
notifyIsExpanderSignalExtension methodTyped
notify::is-expandersignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIsExpanderSignal: CellRendererSignalName { get } -
onNotifyMode(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::modesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyModesignal is emitted -
notifyModeSignalExtension methodTyped
notify::modesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyModeSignal: CellRendererSignalName { get } -
onNotifySensitive(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::sensitivesignalDeclaration
Swift
@discardableResult @inlinable func onNotifySensitive(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifySensitivesignal is emitted -
notifySensitiveSignalExtension methodTyped
notify::sensitivesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifySensitiveSignal: CellRendererSignalName { get } -
onNotifyVisible(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyVisiblesignal is emitted -
notifyVisibleSignalExtension methodTyped
notify::visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyVisibleSignal: CellRendererSignalName { get } -
onNotifyWidth(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::widthsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyWidthsignal is emitted -
notifyWidthSignalExtension methodTyped
notify::widthsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyWidthSignal: CellRendererSignalName { get } -
onNotifyXalign(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::xalignsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyXalign(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyXalignsignal is emitted -
notifyXalignSignalExtension methodTyped
notify::xalignsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyXalignSignal: CellRendererSignalName { get } -
onNotifyXpad(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::xpadsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyXpad(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyXpadsignal is emitted -
notifyXpadSignalExtension methodTyped
notify::xpadsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyXpadSignal: CellRendererSignalName { get } -
onNotifyYalign(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::yalignsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyYalign(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyYalignsignal is emitted -
notifyYalignSignalExtension methodTyped
notify::yalignsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyYalignSignal: CellRendererSignalName { get } -
onNotifyYpad(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::ypadsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyYpad(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyYpadsignal is emitted -
notifyYpadSignalExtension methodTyped
notify::ypadsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyYpadSignal: CellRendererSignalName { get }
-
activate(event:Extension methodwidget: path: backgroundArea: cellArea: 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.Declaration
Swift
@inlinable func activate<EventT, RectangleT, WidgetT>(event: EventT, widget: WidgetT, path: UnsafePointer<gchar>!, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) -> Bool where EventT : EventProtocol, RectangleT : RectangleProtocol, WidgetT : WidgetProtocol -
getAlignedArea(widget:Extension methodflags: cellArea: alignedArea: ) Gets the aligned area used by
cellinsidecell_area. Used for finding the appropriate edit and focus rectangle.Declaration
Swift
@inlinable func getAlignedArea<RectangleT, WidgetT>(widget: WidgetT, flags: CellRendererState, cellArea: RectangleT, alignedArea: RectangleT) where RectangleT : RectangleProtocol, WidgetT : WidgetProtocol -
getAlignment(xalign:Extension methodyalign: ) Fills in
xalignandyalignwith the appropriate values ofcell.Declaration
Swift
@inlinable func getAlignment(xalign: UnsafeMutablePointer<gfloat>! = nil, yalign: UnsafeMutablePointer<gfloat>! = nil) -
getFixedSize(width:Extension methodheight: ) Fills in
widthandheightwith the appropriate size ofcell.Declaration
Swift
@inlinable func getFixedSize(width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil) -
getPadding(xpad:Extension methodypad: ) Fills in
xpadandypadwith the appropriate values ofcell.Declaration
Swift
@inlinable func getPadding(xpad: UnsafeMutablePointer<gint>! = nil, ypad: UnsafeMutablePointer<gint>! = nil) -
getPreferredHeight(widget:Extension methodminimumSize: naturalSize: ) Retreives a renderer’s natural size when rendered to
widget.Declaration
Swift
@inlinable func getPreferredHeight<WidgetT>(widget: WidgetT, minimumSize: UnsafeMutablePointer<gint>! = nil, naturalSize: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol -
Retreives a cell renderers’s minimum and natural height if it were rendered to
widgetwith the specifiedwidth.Declaration
Swift
@inlinable func getPreferredHeightForWidth<WidgetT>(widget: WidgetT, width: Int, minimumHeight: UnsafeMutablePointer<gint>! = nil, naturalHeight: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol -
getPreferredSize(widget:Extension methodminimumSize: naturalSize: ) Retrieves the minimum and natural size of a cell taking into account the widget’s preference for height-for-width management.
Declaration
Swift
@inlinable func getPreferredSize<WidgetT>(widget: WidgetT, minimumSize: RequisitionRef? = nil, naturalSize: RequisitionRef? = nil) where WidgetT : WidgetProtocol -
getPreferredSize(widget:Extension methodminimumSize: naturalSize: ) Retrieves the minimum and natural size of a cell taking into account the widget’s preference for height-for-width management.
Declaration
Swift
@inlinable func getPreferredSize<RequisitionT, WidgetT>(widget: WidgetT, minimumSize: RequisitionT?, naturalSize: RequisitionT?) where RequisitionT : RequisitionProtocol, WidgetT : WidgetProtocol -
getPreferredWidth(widget:Extension methodminimumSize: naturalSize: ) Retreives a renderer’s natural size when rendered to
widget.Declaration
Swift
@inlinable func getPreferredWidth<WidgetT>(widget: WidgetT, minimumSize: UnsafeMutablePointer<gint>! = nil, naturalSize: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol -
getPreferredWidthForHeight(widget:Extension methodheight: minimumWidth: naturalWidth: ) Retreives a cell renderers’s minimum and natural width if it were rendered to
widgetwith the specifiedheight.Declaration
Swift
@inlinable func getPreferredWidthForHeight<WidgetT>(widget: WidgetT, height: Int, minimumWidth: UnsafeMutablePointer<gint>! = nil, naturalWidth: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol -
getRequestMode()Extension methodGets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.
Declaration
Swift
@inlinable func getRequestMode() -> GtkSizeRequestMode -
getSensitive()Extension methodReturns the cell renderer’s sensitivity.
Declaration
Swift
@inlinable func getSensitive() -> Bool -
getSize(widget:Extension methodcellArea: xOffset: yOffset: width: height: ) Obtains the width and height needed to render the cell. Used by view widgets to determine the appropriate size for the cell_area passed to
gtk_cell_renderer_render(). Ifcell_areais notnil, fills in the x and y offsets (if set) of the cell relative to this location.Please note that the values set in
widthandheight, as well as those inx_offsetandy_offsetare inclusive of the xpad and ypad properties.get_size is deprecated: Use gtk_cell_renderer_get_preferred_size() instead.
Declaration
Swift
@available(*, deprecated) @inlinable func getSize<WidgetT>(widget: WidgetT, cellArea: Gdk.RectangleRef? = nil, xOffset: UnsafeMutablePointer<gint>! = nil, yOffset: UnsafeMutablePointer<gint>! = nil, width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol -
getSize(widget:Extension methodcellArea: xOffset: yOffset: width: height: ) Obtains the width and height needed to render the cell. Used by view widgets to determine the appropriate size for the cell_area passed to
gtk_cell_renderer_render(). Ifcell_areais notnil, fills in the x and y offsets (if set) of the cell relative to this location.Please note that the values set in
widthandheight, as well as those inx_offsetandy_offsetare inclusive of the xpad and ypad properties.get_size is deprecated: Use gtk_cell_renderer_get_preferred_size() instead.
Declaration
Swift
@available(*, deprecated) @inlinable func getSize<RectangleT, WidgetT>(widget: WidgetT, cellArea: RectangleT?, xOffset: UnsafeMutablePointer<gint>! = nil, yOffset: UnsafeMutablePointer<gint>! = nil, width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil) where RectangleT : RectangleProtocol, WidgetT : WidgetProtocol -
getState(widget:Extension methodcellState: ) Translates the cell renderer state to
GtkStateFlags, based on the cell renderer and widget sensitivity, and the givenGtkCellRendererState.Declaration
Swift
@inlinable func getState(widget: WidgetRef? = nil, cellState: CellRendererState) -> StateFlags -
getState(widget:Extension methodcellState: ) Translates the cell renderer state to
GtkStateFlags, based on the cell renderer and widget sensitivity, and the givenGtkCellRendererState.Declaration
Swift
@inlinable func getState<WidgetT>(widget: WidgetT?, cellState: CellRendererState) -> StateFlags where WidgetT : WidgetProtocol -
getVisible()Extension methodReturns the cell renderer’s visibility.
Declaration
Swift
@inlinable func getVisible() -> Bool -
render(cr:Extension methodwidget: backgroundArea: cellArea: flags: ) Invokes the virtual render function of the
GtkCellRenderer. The three passed-in rectangles are areas incr. Most renderers will draw withincell_area; the xalign, yalign, xpad, and ypad fields of theGtkCellRenderershould be honored with respect tocell_area.background_areaincludes the blank space around the cell, and also the area containing the tree expander; so thebackground_arearectangles for all cells tile to cover the entirewindow.Declaration
Swift
@inlinable func render<ContextT, RectangleT, WidgetT>(cr: ContextT, widget: WidgetT, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) where ContextT : ContextProtocol, RectangleT : RectangleProtocol, WidgetT : WidgetProtocol -
setAlignment(xalign:Extension methodyalign: ) Sets the renderer’s alignment within its available space.
Declaration
Swift
@inlinable func setAlignment(xalign: Double, yalign: Double) -
setFixedSize(width:Extension methodheight: ) Sets the renderer size to be explicit, independent of the properties set.
Declaration
Swift
@inlinable func setFixedSize(width: Int, height: Int) -
setPadding(xpad:Extension methodypad: ) Sets the renderer’s padding.
Declaration
Swift
@inlinable func setPadding(xpad: Int, ypad: Int) -
set(sensitive:Extension method) Sets the cell renderer’s sensitivity.
Declaration
Swift
@inlinable func set(sensitive: Bool) -
set(visible:Extension method) Sets the cell renderer’s visibility.
Declaration
Swift
@inlinable func set(visible: Bool) -
startEditing(event:Extension methodwidget: path: backgroundArea: cellArea: flags: ) Starts editing the contents of this
cell, through a newGtkCellEditablewidget created by theGtkCellRendererClass.start_editingvirtual function.Declaration
Swift
@inlinable func startEditing<RectangleT, WidgetT>(event: Gdk.EventRef? = nil, widget: WidgetT, path: UnsafePointer<gchar>!, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) -> CellEditableRef! where RectangleT : RectangleProtocol, WidgetT : WidgetProtocol -
startEditing(event:Extension methodwidget: path: backgroundArea: cellArea: flags: ) Starts editing the contents of this
cell, through a newGtkCellEditablewidget created by theGtkCellRendererClass.start_editingvirtual function.Declaration
Swift
@inlinable func startEditing<EventT, RectangleT, WidgetT>(event: EventT?, widget: WidgetT, path: UnsafePointer<gchar>!, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) -> CellEditableRef! where EventT : EventProtocol, RectangleT : RectangleProtocol, WidgetT : WidgetProtocol -
stopEditing(canceled:Extension method) Informs the cell renderer that the editing is stopped. If
canceledistrue, the cell renderer will emit theGtkCellRenderer::editing-canceledsignal.This function should be called by cell renderer implementations in response to the
GtkCellEditable::editing-donesignal ofGtkCellEditable.Declaration
Swift
@inlinable func stopEditing(canceled: Bool) -
isActivatableExtension methodChecks whether the cell renderer can do something when activated.
Declaration
Swift
@inlinable var isActivatable: Bool { get } -
requestModeExtension methodGets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.
Declaration
Swift
@inlinable var requestMode: GtkSizeRequestMode { get } -
sensitiveExtension methodUndocumented
Declaration
Swift
@inlinable var sensitive: Bool { get nonmutating set } -
visibleExtension methodUndocumented
Declaration
Swift
@inlinable var visible: Bool { get nonmutating set } -
parentInstanceExtension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GInitiallyUnowned { get }
View on GitHub
Install in Dash
CellRendererProtocol Protocol Reference