Class

GtkCellRendererToggle

Description [src]

final class Gtk.CellRendererToggle : Gtk.CellRenderer {
  /* No available fields */
}

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.

Hierarchy

hierarchy this GtkCellRendererToggle ancestor_0 GtkCellRenderer ancestor_0--this ancestor_1 GInitiallyUnowned ancestor_1--ancestor_0 ancestor_2 GObject ancestor_2--ancestor_1

Constructors

gtk_cell_renderer_toggle_new

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.

Instance methods

gtk_cell_renderer_toggle_get_activatable

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

gtk_cell_renderer_toggle_get_active

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

gtk_cell_renderer_toggle_get_radio

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

gtk_cell_renderer_toggle_set_activatable

Makes the cell renderer activatable.

gtk_cell_renderer_toggle_set_active

Activates or deactivates a cell renderer.

gtk_cell_renderer_toggle_set_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).

Methods inherited from GtkCellRenderer (27)
gtk_cell_renderer_activate

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.

gtk_cell_renderer_get_aligned_area

Gets the aligned area used by cell inside cell_area. Used for finding the appropriate edit and focus rectangle.

gtk_cell_renderer_get_alignment

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

gtk_cell_renderer_get_fixed_size

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

gtk_cell_renderer_get_is_expanded

Checks whether the given GtkCellRenderer is expanded.

gtk_cell_renderer_get_is_expander

Checks whether the given GtkCellRenderer is an expander.

gtk_cell_renderer_get_padding

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

gtk_cell_renderer_get_preferred_height

Retrieves a renderer’s natural size when rendered to widget.

gtk_cell_renderer_get_preferred_height_for_width

Retrieves a cell renderers’s minimum and natural height if it were rendered to widget with the specified width.

gtk_cell_renderer_get_preferred_size

Retrieves the minimum and natural size of a cell taking into account the widget’s preference for height-for-width management.

gtk_cell_renderer_get_preferred_width

Retrieves a renderer’s natural size when rendered to widget.

gtk_cell_renderer_get_preferred_width_for_height

Retrieves a cell renderers’s minimum and natural width if it were rendered to widget with the specified height.

gtk_cell_renderer_get_request_mode

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

gtk_cell_renderer_get_sensitive

Returns the cell renderer’s sensitivity.

gtk_cell_renderer_get_state

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

gtk_cell_renderer_get_visible

Returns the cell renderer’s visibility.

gtk_cell_renderer_is_activatable

Checks whether the cell renderer can do something when activated.

gtk_cell_renderer_set_alignment

Sets the renderer’s alignment within its available space.

gtk_cell_renderer_set_fixed_size

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

gtk_cell_renderer_set_is_expanded

Sets whether the given GtkCellRenderer is expanded.

gtk_cell_renderer_set_is_expander

Sets whether the given GtkCellRenderer is an expander.

gtk_cell_renderer_set_padding

Sets the renderer’s padding.

gtk_cell_renderer_set_sensitive

Sets the cell renderer’s sensitivity.

Methods inherited from GObject (42)

Properties

Gtk.CellRendererToggle:activatable
No description available.
Gtk.CellRendererToggle:active
No description available.
Gtk.CellRendererToggle:inconsistent
No description available.
Gtk.CellRendererToggle:radio
No description available.
Properties inherited from GtkCellRenderer (15)
Gtk.CellRenderer:cell-background
No description available.
Gtk.CellRenderer:cell-background-rgba

Cell background as a GdkRGBA

Gtk.CellRenderer:cell-background-set
No description available.
Gtk.CellRenderer:editing
No description available.
Gtk.CellRenderer:height
No description available.
Gtk.CellRenderer:is-expanded
No description available.
Gtk.CellRenderer:is-expander
No description available.
Gtk.CellRenderer:mode
No description available.
Gtk.CellRenderer:sensitive
No description available.
Gtk.CellRenderer:visible
No description available.
Gtk.CellRenderer:width
No description available.
Gtk.CellRenderer:xalign
No description available.
Gtk.CellRenderer:xpad
No description available.
Gtk.CellRenderer:yalign
No description available.
Gtk.CellRenderer:ypad
No description available.

Signals

Gtk.CellRendererToggle::toggled

The ::toggled signal is emitted when the cell is toggled.

Signals inherited from GtkCellRenderer (2)
Gtk.CellRenderer::editing-canceled

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.

Gtk.CellRenderer::editing-started

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.

Signals inherited from GObject (1)