Class: Gtk::ToggleAction

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

Instance Method Summary collapse

Instance Method Details

#active ⇒ TrueClass

Returns the checked state of the toggle action.

Returns:

  • (TrueClass) —

    the checked state of the toggle action

#active=(active) ⇒ TrueClass

Whether the toggle action should be active.

Parameters:

  • active (TrueClass)

Returns:

  • (TrueClass) —

    active

  • (TrueClass) —

    active

#active? ⇒ TrueClass

Whether the toggle action should be active.

Returns:

  • (TrueClass) —

    active

#draw_as_radio ⇒ TrueClass

Returns whether the action should have proxies like a radio action.

Returns:

  • (TrueClass) —

    whether the action should have proxies like a radio action.

#draw_as_radio=(draw_as_radio) ⇒ TrueClass

Whether the proxies for this action look like radio action proxies.

This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.

Parameters:

  • draw_as_radio (TrueClass)

Returns:

  • (TrueClass) —

    draw-as-radio

  • (TrueClass) —

    draw-as-radio

#draw_as_radio? ⇒ TrueClass

Whether the proxies for this action look like radio action proxies.

This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.

Returns:

  • (TrueClass) —

    draw-as-radio

#new(name, label, tooltip, stock_id) ⇒ Gtk::ToggleAction

Creates a new Gtk::ToggleAction object. To add the action to a Gtk::ActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel().

Parameters:

  • name (String) —

    A unique name for the action

  • label (String) —

    The label displayed in menu items and on buttons, or nil

  • tooltip (String) —

    A tooltip for the action, or nil

  • stock_id (String) —

    The stock icon to display in widgets representing the action, or nil

Returns:

#toggled ⇒ nil

Emits the “toggled” signal on the toggle action.

Returns:

  • (nil)