Class: Gtk::CellRendererToggle

Inherits:
CellRenderer
  • Object
show all
Defined in:
(unknown)

Overview

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.

Instance Method Summary collapse

Methods inherited from CellRenderer

#activate, #cell_background=, #cell_background_rgba, #cell_background_rgba=, #cell_background_set=, #cell_background_set?, #editing=, #editing?, #get_aligned_area, #get_alignment, #get_fixed_size, #get_padding, #get_preferred_height, #get_preferred_height_for_width, #get_preferred_size, #get_preferred_width, #get_preferred_width_for_height, #get_state, #height, #height=, #is_activatable, #is_expanded, #is_expanded=, #is_expanded?, #is_expander, #is_expander=, #is_expander?, #mode, #mode=, #request_mode, #sensitive, #sensitive=, #sensitive?, #set_alignment, #set_fixed_size, #set_padding, #snapshot, #start_editing, #stop_editing, #visible, #visible=, #visible?, #width, #width=, #xalign, #xalign=, #xpad, #xpad=, #yalign, #yalign=, #ypad, #ypad=

Constructor Details

#initializeGtk::CellRenderer

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 Method Details

#activatableBoolean

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

Returns:

  • (Boolean)

    true if the cell renderer is activatable.

#activatable=(activatable) ⇒ Boolean

Parameters:

  • activatable (Boolean)

Returns:

  • (Boolean)

    activatable

  • (Boolean)

    activatable

#activatable?Boolean

Returns activatable.

Returns:

  • (Boolean)

    activatable

#activeBoolean

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

Returns:

  • (Boolean)

    true if the cell renderer is active.

#active=(active) ⇒ Boolean

Parameters:

  • active (Boolean)

Returns:

  • (Boolean)

    active

  • (Boolean)

    active

#active?Boolean

Returns active.

Returns:

  • (Boolean)

    active

#inconsistent=(inconsistent) ⇒ Boolean

Parameters:

  • inconsistent (Boolean)

Returns:

  • (Boolean)

    inconsistent

  • (Boolean)

    inconsistent

#inconsistent?Boolean

Returns inconsistent.

Returns:

  • (Boolean)

    inconsistent

#radioBoolean

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

Returns:

  • (Boolean)

    true if we’re rendering radio toggles rather than checkboxes

#radio=(radio) ⇒ Boolean

Parameters:

  • radio (Boolean)

Returns:

  • (Boolean)

    radio

  • (Boolean)

    radio

#radio?Boolean

Returns radio.

Returns:

  • (Boolean)

    radio