Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CellRendererToggle

[15:7] extends: object

Renders a toggle button in a cell GtkCellRendererToggle renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on the GtkCellRendererToggle:radio property. When activated, it emits the GtkCellRendererToggle::toggled signal.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • CellRendererToggle ()

    Creates a new GtkCellRendererToggle. Adjust rendering parameters using object properties. Object properties can be set globally (with g_object_set()). Also, with GtkTreeViewColumn, you can bind a property to a value in a GtkTreeModel. For example, you can bind the “active” property on the cell renderer to a boolean value in the model, thus causing the check button to reflect the state of the model.

  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asCellRenderer ()

    Wraps this handle as CellRenderer.

    • @r A CellRenderer object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnToggled (callback Fn, UserData = null)

    The ::toggled signal is emitted when the cell is toggled. It is the responsibility of the application to update the model with the correct value to store at @path. Often this is simply the opposite of the value currently stored at @path.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (CellRendererToggle Self, string Path).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setActivatable (bool Value)

    Writes the activatable property.

    • @p Value is the new property value.
    • @r None.
  • setActive (bool Value)

    Writes the active property.

    • @p Value is the new property value.
    • @r None.
  • setInconsistent (bool Value)

    Writes the inconsistent property.

    • @p Value is the new property value.
    • @r None.
  • setRadio (bool Value)

    Writes the radio property.

    • @p Value is the new property value.
    • @r None.
  • get_activatable ()

    Returns whether the cell renderer is activatable. See gtk_cell_renderer_toggle_set_activatable().

  • get_active ()

    Returns whether the cell renderer is active. See gtk_cell_renderer_toggle_set_active().

  • get_radio ()

    Returns whether we’re rendering radio toggles rather than checkboxes.

  • set_activatable (bool setting)

    Makes the cell renderer activatable.

    • @p setting is the value to set..
    • @r None.
  • set_active (bool setting)

    Activates or deactivates a cell renderer.

    • @p setting is the value to set..
    • @r None.
  • set_radio (bool radio)

    If @radio is %TRUE, the cell renderer renders a radio toggle (i.e. a toggle in a group of mutually-exclusive toggles). If %FALSE, it renders a check toggle (a standalone boolean option). This can be set globally for the cell renderer, or changed just before rendering each cell in the model (for GtkTreeView, you set up a per-row setting using GtkTreeViewColumn to associate model columns with cell renderer properties).

    • @p radio is %TRUE to make the toggle look like a radio button.
    • @r None.

class: CellRendererToggleToggledCallback

[298:7] extends: object

Generated low-level callback wrapper for GIR callback toggled.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • CellRendererToggleToggledCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, path, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: CellRendererToggleMeta

[368:14] static extends: object

Generated metadata helpers for CellRendererToggle class surfaces.

Methods

  • properties ()

    Returns property metadata for CellRendererToggle.

    • @r A list.
  • signals ()

    Returns signal metadata for CellRendererToggle.

    • @r A list.