CellRendererProtocol

public protocol CellRendererProtocol : InitiallyUnownedProtocol

An object for rendering a single cell

The GtkCellRenderer is a base class of a set of objects used for rendering a cell to a cairo_t. These objects are used primarily by the GtkTreeView widget, though they aren’t tied to them in any specific way. It is worth noting that GtkCellRenderer is not a GtkWidget and cannot be treated as such.

The primary use of a GtkCellRenderer is for drawing a certain graphical elements on a cairo_t. Typically, one cell renderer is used to draw many cells on the screen. To this extent, it isn’t expected that a CellRenderer keep any permanent state around. Instead, any state is set just prior to use using GObjects property system. Then, the cell is measured using gtk_cell_renderer_get_preferred_size(). Finally, the cell is rendered in the correct location using gtk_cell_renderer_snapshot().

There are a number of rules that must be followed when writing a new GtkCellRenderer. First and foremost, it’s important that a certain set of properties will always yield a cell renderer of the same size, barring a style change. The GtkCellRenderer also has a number of generic properties that are expected to be honored by all children.

Beyond merely rendering a cell, cell renderers can optionally provide active user interface elements. A cell renderer can be “activatable” like GtkCellRendererToggle, which toggles when it gets activated by a mouse click, or it can be “editable” like GtkCellRendererText, which allows the user to edit the text using a widget implementing the GtkCellEditable interface, e.g. GtkEntry. To make a cell renderer activatable or editable, you have to implement the GtkCellRendererClass.activate or GtkCellRendererClass.start_editing virtual functions, respectively.

Many properties of GtkCellRenderer and its subclasses have a corresponding “set” property, e.g. “cell-background-set” corresponds to “cell-background”. These “set” properties reflect whether a property has been set or not. You should not set them independently.

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.

  • ptr

    Untyped pointer to the underlying GtkCellRenderer instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • cell_renderer_ptr Default implementation

    Typed 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)

CellRenderer Class

  • 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 transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return 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:value:) Extension method

    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

CellRenderer signals

  • Connect a Swift signal handler to the given, typed CellRendererSignalName signal

    Declaration

    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 by userData

    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 a C signal handler to the given, typed CellRendererSignalName signal

    Declaration

    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 by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • 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 underlying editing-canceled signal

    Declaration

    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 method

    Typed editing-canceled signal for using the connect(signal:) methods

    Declaration

    Swift

    static var editingCanceledSignal: CellRendererSignalName { get }
  • This signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup on editable, e.g. adding a GtkEntryCompletion or setting up additional columns in a GtkComboBox.

    See gtk_cell_editable_start_editing() for information on the lifecycle of the editable and a way to do setup that doesn’t depend on the renderer.

    Note that GTK doesn’t guarantee that cell renderers will continue to use the same kind of widget for editing in future releases, therefore you should check the type of editable before doing any specific setup, as in the following example: (C Language Example):

    static void
    text_editing_started (GtkCellRenderer *cell,
                          GtkCellEditable *editable,
                          const char      *path,
                          gpointer         data)
    {
      if (GTK_IS_ENTRY (editable))
        {
          GtkEntry *entry = GTK_ENTRY (editable);
    
          // ... create a GtkEntryCompletion
    
          gtk_entry_set_completion (entry, completion);
        }
    }
    

    Note

    This represents the underlying editing-started signal

    Declaration

    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 method

    Typed editing-started signal for using the connect(signal:) methods

    Declaration

    Swift

    static var editingStartedSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::cell-background signal

    Declaration

    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 method

    Typed notify::cell-background signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyCellBackgroundSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::cell-background-rgba signal

    Declaration

    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

  • Typed notify::cell-background-rgba signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyCellBackgroundRgbaSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::cell-background-set signal

    Declaration

    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

  • Typed notify::cell-background-set signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyCellBackgroundSetSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::editing signal

    Declaration

    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 method

    Typed notify::editing signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyEditingSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::height signal

    Declaration

    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 method

    Typed notify::height signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHeightSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::is-expanded signal

    Declaration

    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 method

    Typed notify::is-expanded signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyIsExpandedSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::is-expander signal

    Declaration

    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 method

    Typed notify::is-expander signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyIsExpanderSignal: CellRendererSignalName { get }
  • onNotifyMode(flags:handler:) Extension method

    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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::mode signal

    Declaration

    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 method

    Typed notify::mode signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyModeSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::sensitive signal

    Declaration

    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 method

    Typed notify::sensitive signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifySensitiveSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::visible signal

    Declaration

    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 method

    Typed notify::visible signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyVisibleSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::width signal

    Declaration

    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 method

    Typed notify::width signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyWidthSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::xalign signal

    Declaration

    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 method

    Typed notify::xalign signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyXalignSignal: CellRendererSignalName { get }
  • onNotifyXpad(flags:handler:) Extension method

    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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::xpad signal

    Declaration

    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 method

    Typed notify::xpad signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyXpadSignal: CellRendererSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::yalign signal

    Declaration

    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 method

    Typed notify::yalign signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyYalignSignal: CellRendererSignalName { get }
  • onNotifyYpad(flags:handler:) Extension method

    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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::ypad signal

    Declaration

    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 method

    Typed notify::ypad signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyYpadSignal: CellRendererSignalName { get }

CellRenderer Class: CellRendererProtocol extension (methods and fields)

  • 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<CChar>!, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) -> Bool where EventT : EventProtocol, RectangleT : RectangleProtocol, WidgetT : WidgetProtocol
  • Gets the aligned area used by cell inside cell_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:yalign:) Extension method

    Fills in xalign and yalign with the appropriate values of cell.

    Declaration

    Swift

    @inlinable
    func getAlignment(xalign: UnsafeMutablePointer<CFloat>! = nil, yalign: UnsafeMutablePointer<CFloat>! = nil)
  • getFixedSize(width:height:) Extension method

    Fills in width and height with the appropriate size of cell.

    Declaration

    Swift

    @inlinable
    func getFixedSize(width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil)
  • getIsExpanded() Extension method

    Checks whether the given GtkCellRenderer is expanded.

    Declaration

    Swift

    @inlinable
    func getIsExpanded() -> Bool
  • getIsExpander() Extension method

    Checks whether the given GtkCellRenderer is an expander.

    Declaration

    Swift

    @inlinable
    func getIsExpander() -> Bool
  • getPadding(xpad:ypad:) Extension method

    Fills in xpad and ypad with the appropriate values of cell.

    Declaration

    Swift

    @inlinable
    func getPadding(xpad: UnsafeMutablePointer<gint>! = nil, ypad: UnsafeMutablePointer<gint>! = nil)
  • Retrieves 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
  • Retrieves a cell renderers’s minimum and natural height if it were rendered to widget with the specified width.

    Declaration

    Swift

    @inlinable
    func getPreferredHeightForWidth<WidgetT>(widget: WidgetT, width: Int, minimumHeight: UnsafeMutablePointer<gint>! = nil, naturalHeight: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol
  • 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
  • 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
  • Retrieves 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
  • Retrieves a cell renderers’s minimum and natural width if it were rendered to widget with the specified height.

    Declaration

    Swift

    @inlinable
    func getPreferredWidthForHeight<WidgetT>(widget: WidgetT, height: Int, minimumWidth: UnsafeMutablePointer<gint>! = nil, naturalWidth: UnsafeMutablePointer<gint>! = nil) where WidgetT : WidgetProtocol
  • getRequestMode() Extension method

    Gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.

    Declaration

    Swift

    @inlinable
    func getRequestMode() -> GtkSizeRequestMode
  • getSensitive() Extension method

    Returns the cell renderer’s sensitivity.

    Declaration

    Swift

    @inlinable
    func getSensitive() -> Bool
  • getState(widget:cellState:) Extension method

    Translates the cell renderer state to GtkStateFlags, based on the cell renderer and widget sensitivity, and the given GtkCellRendererState.

    Declaration

    Swift

    @inlinable
    func getState(widget: WidgetRef? = nil, cellState: CellRendererState) -> StateFlags
  • getState(widget:cellState:) Extension method

    Translates the cell renderer state to GtkStateFlags, based on the cell renderer and widget sensitivity, and the given GtkCellRendererState.

    Declaration

    Swift

    @inlinable
    func getState<WidgetT>(widget: WidgetT?, cellState: CellRendererState) -> StateFlags where WidgetT : WidgetProtocol
  • getVisible() Extension method

    Returns the cell renderer’s visibility.

    Declaration

    Swift

    @inlinable
    func getVisible() -> Bool
  • setAlignment(xalign:yalign:) Extension method

    Sets the renderer’s alignment within its available space.

    Declaration

    Swift

    @inlinable
    func setAlignment(xalign: CFloat, yalign: CFloat)
  • setFixedSize(width:height:) Extension method

    Sets the renderer size to be explicit, independent of the properties set.

    Declaration

    Swift

    @inlinable
    func setFixedSize(width: Int, height: Int)
  • set(isExpanded:) Extension method

    Sets whether the given GtkCellRenderer is expanded.

    Declaration

    Swift

    @inlinable
    func set(isExpanded: Bool)
  • set(isExpander:) Extension method

    Sets whether the given GtkCellRenderer is an expander.

    Declaration

    Swift

    @inlinable
    func set(isExpander: Bool)
  • setPadding(xpad:ypad:) Extension method

    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)
  • Invokes the virtual render function of the GtkCellRenderer. The three passed-in rectangles are areas in cr. Most renderers will draw within cell_area; the xalign, yalign, xpad, and ypad fields of the GtkCellRenderer should be honored with respect to cell_area. background_area includes the blank space around the cell, and also the area containing the tree expander; so the background_area rectangles for all cells tile to cover the entire window.

    Declaration

    Swift

    @inlinable
    func snapshot<RectangleT, SnapshotT, WidgetT>(snapshot: SnapshotT, widget: WidgetT, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) where RectangleT : RectangleProtocol, SnapshotT : SnapshotProtocol, WidgetT : WidgetProtocol
  • Starts editing the contents of this cell, through a new GtkCellEditable widget created by the GtkCellRendererClass.start_editing virtual function.

    Declaration

    Swift

    @inlinable
    func startEditing<RectangleT, WidgetT>(event: Gdk.EventRef? = nil, widget: WidgetT, path: UnsafePointer<CChar>!, backgroundArea: RectangleT, cellArea: RectangleT, flags: CellRendererState) -> CellEditableRef! where RectangleT : RectangleProtocol, WidgetT : WidgetProtocol
  • Starts editing the contents of this cell, through a new GtkCellEditable widget created by the GtkCellRendererClass.start_editing virtual function.

    Declaration

    Swift

    @inlinable
    func startEditing<EventT, RectangleT, WidgetT>(event: EventT?, widget: WidgetT, path: UnsafePointer<CChar>!, 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 is true, the cell renderer will emit the GtkCellRendererediting-canceled signal.

    This function should be called by cell renderer implementations in response to the GtkCellEditableediting-done`signal of GtkCellEditable`.

    Declaration

    Swift

    @inlinable
    func stopEditing(canceled: Bool)
  • isActivatable Extension method

    Checks whether the cell renderer can do something when activated.

    Declaration

    Swift

    @inlinable
    var isActivatable: Bool { get }
  • isExpanded Extension method

    Checks whether the given GtkCellRenderer is expanded.

    Declaration

    Swift

    @inlinable
    var isExpanded: Bool { get nonmutating set }
  • isExpander Extension method

    Checks whether the given GtkCellRenderer is an expander.

    Declaration

    Swift

    @inlinable
    var isExpander: Bool { get nonmutating set }
  • requestMode Extension method

    Gets 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 method

    Undocumented

    Declaration

    Swift

    @inlinable
    var sensitive: Bool { get nonmutating set }
  • visible Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var visible: Bool { get nonmutating set }
  • parentInstance Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentInstance: GInitiallyUnowned { get }