Renders a toggle button in a cell
Class GtkCellRendererToggle
GtkCellRendererToggle renders a toggle button in a cell. The button is drawn as a radio- or checkbutton, depending on the radio property. When activated, it emits the toggled signal.
djust 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 | Returns whether the cell renderer is activatable. |
get_active | Returns whether the cell renderer is active. |
get_radio | Returns whether we're rendering radio toggles rather than checkboxes. |
set_activatable | Makes the cell renderer activatable. |
set_active | Activates or deactivates a cell renderer. |
set_radio | If radio is TRUE, the cell renderer renders a radio toggle (i.e. a toggle in a group of mutually-exclusive toggles). |
signal_toggled | The toggled signal is emitted when the cell is toggled. |
Returns whether the cell renderer is activatable.
GtkCellRendererToggle.get_activatable()
Return | TRUE if the cell renderer is activatable. |
Returns whether the cell renderer is active.
GtkCellRendererToggle.get_active()
Return | TRUE if the cell renderer is active. |
Returns whether we're rendering radio toggles rather than checkboxes.
GtkCellRendererToggle.get_radio()
Return | TRUE if we're rendering radio toggles rather than checkboxes |
Makes the cell renderer activatable.
GtkCellRendererToggle.set_activatable( activatable )
activatable | TRUE to make the cell renderer activatable |
Activates or deactivates a cell renderer.
GtkCellRendererToggle.set_active( active )
active | TRUE to activate the cell renderer |
If radio is TRUE, the cell renderer renders a radio toggle (i.e. a toggle in a group of mutually-exclusive toggles).
GtkCellRendererToggle.set_radio( radio )
radio | TRUE to make the toggle look like a radio button |
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).
The toggled signal is emitted when the cell is toggled.
GtkCellRendererToggle.signal_toggled()