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
GtkCellRenderer
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
cell_renderer_ptr
Default implementationTyped pointer to the underlying
GtkCellRenderer
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkCellRenderer
instance.Declaration
Swift
var cell_renderer_ptr: UnsafeMutablePointer<GtkCellRenderer>! { get }
-
Required Initialiser for types conforming to
CellRendererProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
CellRendererPropertyName
source 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 : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a CellRenderer property
Declaration
Swift
@inlinable func get(property: CellRendererPropertyName) -> GLibObject.Value
Parameters
property
the 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
property
the 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
CellRendererSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: CellRendererSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The 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
CellRendererSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: CellRendererSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The 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-canceled
signalDeclaration
Swift
@discardableResult @inlinable func onEditingCanceled(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
The signal handler to call Run the given callback whenever the
editingCanceled
signal is emitted -
editingCanceledSignal
Extension methodTyped
editing-canceled
signal 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 aGtkEntryCompletion
or setting up additional columns in aGtkComboBox
.See
gtk_cell_editable_start_editing()
for information on the lifecycle of theeditable
and 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
editable
before 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-started
signalDeclaration
Swift
@discardableResult @inlinable func onEditingStarted(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ editable: CellEditableRef, _ path: String) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
editable
the
GtkCellEditable
path
the path identifying the edited cell
handler
The signal handler to call Run the given callback whenever the
editingStarted
signal is emitted -
editingStartedSignal
Extension methodTyped
editing-started
signal 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 innotify
being 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
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackground(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCellBackground
signal is emitted -
notifyCellBackgroundSignal
Extension methodTyped
notify::cell-background
signal 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 innotify
being 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-gdk
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackgroundGdk(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCellBackgroundGdk
signal is emitted -
notifyCellBackgroundGdkSignal
Extension methodTyped
notify::cell-background-gdk
signal 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 innotify
being 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-rgba
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackgroundRGBA(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCellBackgroundRGBA
signal is emitted -
notifyCellBackgroundRGBASignal
Extension methodTyped
notify::cell-background-rgba
signal 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 innotify
being 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-set
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellBackgroundSet(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCellBackgroundSet
signal is emitted -
notifyCellBackgroundSetSignal
Extension methodTyped
notify::cell-background-set
signal 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 innotify
being 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::editing
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyEditing(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyEditing
signal is emitted -
notifyEditingSignal
Extension methodTyped
notify::editing
signal 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 innotify
being 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::height
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyHeight(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyHeight
signal is emitted -
notifyHeightSignal
Extension methodTyped
notify::height
signal 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 innotify
being 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-expanded
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsExpanded(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyIsExpanded
signal is emitted -
notifyIsExpandedSignal
Extension methodTyped
notify::is-expanded
signal 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 innotify
being 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-expander
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsExpander(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyIsExpander
signal is emitted -
notifyIsExpanderSignal
Extension methodTyped
notify::is-expander
signal 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 innotify
being 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::mode
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyMode
signal is emitted -
notifyModeSignal
Extension methodTyped
notify::mode
signal 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 innotify
being 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::sensitive
signalDeclaration
Swift
@discardableResult @inlinable func onNotifySensitive(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifySensitive
signal is emitted -
notifySensitiveSignal
Extension methodTyped
notify::sensitive
signal 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 innotify
being 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::visible
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyVisible
signal is emitted -
notifyVisibleSignal
Extension methodTyped
notify::visible
signal 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 innotify
being 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::width
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyWidth
signal is emitted -
notifyWidthSignal
Extension methodTyped
notify::width
signal 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 innotify
being 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::xalign
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyXalign(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyXalign
signal is emitted -
notifyXalignSignal
Extension methodTyped
notify::xalign
signal 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 innotify
being 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::xpad
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyXpad(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyXpad
signal is emitted -
notifyXpadSignal
Extension methodTyped
notify::xpad
signal 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 innotify
being 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::yalign
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyYalign(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyYalign
signal is emitted -
notifyYalignSignal
Extension methodTyped
notify::yalign
signal 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 innotify
being 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::ypad
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyYpad(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: CellRendererRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyYpad
signal is emitted -
notifyYpadSignal
Extension methodTyped
notify::ypad
signal 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,
GtkCellRendererToggle
toggles 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
cell
insidecell_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
xalign
andyalign
with the appropriate values ofcell
.Declaration
Swift
@inlinable func getAlignment(xalign: UnsafeMutablePointer<gfloat>! = nil, yalign: UnsafeMutablePointer<gfloat>! = nil)
-
getFixedSize(width:
Extension methodheight: ) Fills in
width
andheight
with the appropriate size ofcell
.Declaration
Swift
@inlinable func getFixedSize(width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil)
-
getPadding(xpad:
Extension methodypad: ) Fills in
xpad
andypad
with 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
widget
with 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
widget
with 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_area
is notnil
, fills in the x and y offsets (if set) of the cell relative to this location.Please note that the values set in
width
andheight
, as well as those inx_offset
andy_offset
are 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_area
is notnil
, fills in the x and y offsets (if set) of the cell relative to this location.Please note that the values set in
width
andheight
, as well as those inx_offset
andy_offset
are 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 theGtkCellRenderer
should be honored with respect tocell_area
.background_area
includes the blank space around the cell, and also the area containing the tree expander; so thebackground_area
rectangles 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 newGtkCellEditable
widget created by theGtkCellRendererClass.start_editing
virtual 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 newGtkCellEditable
widget created by theGtkCellRendererClass.start_editing
virtual 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
canceled
istrue
, the cell renderer will emit theGtkCellRenderer::editing-canceled
signal.This function should be called by cell renderer implementations in response to the
GtkCellEditable::editing-done
signal ofGtkCellEditable
.Declaration
Swift
@inlinable func stopEditing(canceled: Bool)
-
isActivatable
Extension methodChecks whether the cell renderer can do something when activated.
Declaration
Swift
@inlinable var isActivatable: Bool { get }
-
requestMode
Extension methodGets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.
Declaration
Swift
@inlinable var requestMode: GtkSizeRequestMode { get }
-
sensitive
Extension methodUndocumented
Declaration
Swift
@inlinable var sensitive: Bool { get nonmutating set }
-
visible
Extension methodUndocumented
Declaration
Swift
@inlinable var visible: Bool { get nonmutating set }
-
parentInstance
Extension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GInitiallyUnowned { get }