Gtk.CellRendererToggle - Classes - Gtk 3.0 (original) (raw)
g GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.CellRenderer Gtk.CellRenderer GObject.InitiallyUnowned->Gtk.CellRenderer GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.CellRendererToggle Gtk.CellRendererToggle Gtk.CellRenderer->Gtk.CellRendererToggle
Subclasses:
None
Methods¶
Inherited:
Gtk.CellRenderer (25), GObject.Object (37)
Structs:
Gtk.CellRendererClass (1), GObject.ObjectClass (5)
class | new () |
---|---|
get_activatable () | |
get_active () | |
get_radio () | |
set_activatable (setting) | |
set_active (setting) | |
set_radio (radio) |
Virtual Methods¶
Inherited:
Gtk.CellRenderer (12), GObject.Object (7)
do_toggled (path) |
---|
Properties¶
Inherited:
Name | Type | Flags | Short Description |
---|---|---|---|
activatable | bool | r/w/en | The toggle button can be activated |
active | bool | r/w/en | The toggle state of the button |
inconsistent | bool | r/w/en | The inconsistent state of the button |
indicator-size | int | d/r/w/en | Size of check or radio indicator deprecated |
radio | bool | r/w/en | Draw the toggle button as a radio button |
Signals¶
Inherited:
Gtk.CellRenderer (2), GObject.Object (1)
Name | Short Description |
---|---|
toggled | The ::toggled signal is emitted when the cell is toggled. |
Fields¶
Inherited:
Gtk.CellRenderer (2), GObject.Object (1)
Name | Type | Access | Description |
---|---|---|---|
parent | Gtk.CellRenderer | r |
Class Details¶
class Gtk.CellRendererToggle(**kwargs)¶
Bases:
Abstract:
No
Structure:
Gtk.CellRendererToggle renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on theGtk.CellRendererToggle :radio property. When activated, it emits the Gtk.CellRendererToggle ::toggled signal.
Returns:
the new cell renderer
Return type:
Creates a new Gtk.CellRendererToggle. Adjust rendering parameters using object properties. Object properties can be set globally (with g_object_set()). Also, with Gtk.TreeViewColumn, you can bind a property to a value in a Gtk.TreeModel. 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.
Returns:
True if the cell renderer is activatable.
Return type:
Returns whether the cell renderer is activatable. SeeGtk.CellRendererToggle.set_activatable().
New in version 2.18.
Returns:
True if the cell renderer is active.
Return type:
Returns whether the cell renderer is active. SeeGtk.CellRendererToggle.set_active().
Returns:
True if we’re rendering radio toggles rather than checkboxes
Return type:
Returns whether we’re rendering radio toggles rather than checkboxes.
set_activatable(setting)[source]¶
Parameters:
setting (bool) – the value to set.
Makes the cell renderer activatable.
New in version 2.18.
Parameters:
setting (bool) – the value to set.
Activates or deactivates a cell renderer.
Parameters:
radio (bool) – True to make the toggle look like a radio button
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 Gtk.TreeView, you set up a per-row setting using Gtk.TreeViewColumn to associate model columns with cell renderer properties).
do_toggled(path) virtual¶
Parameters:
path (str) –
Signal Details¶
Gtk.CellRendererToggle.signals.toggled(cell_renderer_toggle, path)¶
Signal Name:
toggled
Flags:
Parameters:
- cell_renderer_toggle (Gtk.CellRendererToggle) – The object which received the signal
- path (str) – string representation of Gtk.TreePath describing the event location
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.
Property Details¶
Gtk.CellRendererToggle.props.activatable¶
Name:
activatable
Type:
Default Value:
Flags:
READABLE, WRITABLE, EXPLICIT_NOTIFY
The toggle button can be activated
Gtk.CellRendererToggle.props.active¶
Name:
active
Type:
Default Value:
Flags:
READABLE, WRITABLE, EXPLICIT_NOTIFY
The toggle state of the button
Gtk.CellRendererToggle.props.inconsistent¶
Name:
inconsistent
Type:
Default Value:
Flags:
READABLE, WRITABLE, EXPLICIT_NOTIFY
The inconsistent state of the button
Gtk.CellRendererToggle.props.indicator_size¶
Name:
indicator-size
Type:
Default Value:
0
Flags:
DEPRECATED, READABLE, WRITABLE, EXPLICIT_NOTIFY
Size of check or radio indicator
Deprecated since version ???.
Gtk.CellRendererToggle.props.radio¶
Name:
radio
Type:
Default Value:
Flags:
READABLE, WRITABLE, EXPLICIT_NOTIFY
Draw the toggle button as a radio button