Gtk.CellRendererToggle¶
class — extends CellRenderer
:::warning Deprecated since 4.10 This API is deprecated. :::
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.
Constructors¶
new¶
:::warning Deprecated since 4.10 This API is deprecated. :::
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.
Methods¶
get_activatable¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns whether the cell renderer is activatable. See
CellRendererToggle.set_activatable.
get_active¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns whether the cell renderer is active. See
CellRendererToggle.set_active.
get_radio¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns whether we’re rendering radio toggles rather than checkboxes.
set_activatable¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Makes the cell renderer activatable.
Parameters:
setting— the value to set.
set_active¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Activates or deactivates a cell renderer.
Parameters:
setting— the value to set.
set_radio¶
:::warning Deprecated since 4.10 This API is deprecated. :::
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).
Parameters:
radio—Trueto make the toggle look like a radio button
Properties¶
activatable¶
active¶
inconsistent¶
radio¶
Signals¶
toggled¶
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.