Class: Gtk::ToggleButton

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

Instance Method Summary collapse

Instance Method Details

#activeTrueClass

Queries a Gtk::ToggleButton and returns its current state. Returns true if the toggle button is pressed in and false if it is raised.

Returns:

  • (TrueClass)

    a #gboolean value.

#active=(active) ⇒ TrueClass

Parameters:

  • active (TrueClass)

Returns:

  • (TrueClass)

    active

  • (TrueClass)

    active

#active?TrueClass

Returns active.

Returns:

  • (TrueClass)

    active

#draw_indicator=(draw_indicator) ⇒ TrueClass

Parameters:

  • draw_indicator (TrueClass)

Returns:

  • (TrueClass)

    draw-indicator

  • (TrueClass)

    draw-indicator

#draw_indicator?TrueClass

Returns draw-indicator.

Returns:

  • (TrueClass)

    draw-indicator

#inconsistentTrueClass

Gets the value set by gtk_toggle_button_set_inconsistent().

Returns:

  • (TrueClass)

    true if the button is displayed as inconsistent, false otherwise

#inconsistent=(inconsistent) ⇒ TrueClass

Parameters:

  • inconsistent (TrueClass)

Returns:

  • (TrueClass)

    inconsistent

  • (TrueClass)

    inconsistent

#inconsistent?TrueClass

Returns inconsistent.

Returns:

  • (TrueClass)

    inconsistent

#modeTrueClass

Retrieves whether the button is displayed as a separate indicator and label. See gtk_toggle_button_set_mode().

Returns:

  • (TrueClass)

    true if the togglebutton is drawn as a separate indicator and label.

#mode=(draw_indicator) ⇒ nil

Sets whether the button is displayed as a separate indicator and label. You can call this function on a checkbutton or a radiobutton with draw_indicator = false to make the button look like a normal button.

This can be used to create linked strip of buttons that work like a Gtk::StackSwitcher.

This function only affects instances of classes like Gtk::CheckButton and Gtk::RadioButton that derive from #GtkToggleButton, not instances of Gtk::ToggleButton itself. and label; if false, draw the button like a normal button

Parameters:

  • draw_indicator (TrueClass)

    if true, draw the button as a separate indicator

Returns:

  • (nil)

#newGtk::Widget

Creates a new toggle button. A widget should be packed into the button, as in gtk_button_new().

Returns:

#new_with_label(label) ⇒ Gtk::Widget

Creates a new toggle button with a text label.

Parameters:

  • label (String)

    a string containing the message to be placed in the toggle button.

Returns:

#new_with_mnemonic(label) ⇒ Gtk::Widget

Creates a new Gtk::ToggleButton containing a label. The label will be created using gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the button.

Parameters:

  • label (String)

    the text of the button, with an underscore in front of the mnemonic character

Returns:

#togglednil

Emits the Gtk::ToggleButton::toggled signal on the Gtk::ToggleButton. There is no good reason for an application ever to call this function.

Returns:

  • (nil)