Créer  Editer  FrontPage  Index  Chercher  Changements  History  RSS  Login

Gtk::ToggleAction

class Gtk::ToggleAction

A Gtk::ToggleAction corresponds roughly to a Gtk::CheckMenuItem. It has an "active" state specifying whether the action has been checked or not.

Class Methods

Gtk::ToggleAction.new(name, label, tooltip, stock_id)
Creates a new Gtk::ToggleAction object. To add the action to a Gtk::ActionGroup and set the accelerator for the action, call Gtk::ActionGroup#add_action. Since 2.4
  • name: A unique name for the action
  • label: The label displayed in menu items and on buttons
  • tooltip: A tooltip for the action
  • stock_id: The stock icon to display in widgets representing the action(Gtk::Stock constants).
  • Returns: a new Gtk::ToggleAction

Instance Methods

toggled
Emits the "toggled" signal on the toggle action. Since 2.4
  • Returns: self
active?
Returns the checked state of the toggle action. Since 2.4
  • Returns: the checked state of the toggle action
active=(is_active)
Sets the checked state on the toggle action. Since 2.4
  • is_active: true if the action should be checked, otherwise false
  • Returns: is_active
set_active(is_active)
Same as Gtk::ToggleAction#active=. Since 2.4
  • is_active: true if the action should be checked, otherwise false
  • Returns: self
draw_as_radio?
Returns whether the action should have proxies like a radio action. Since 2.4
  • Returns: true if the action should have proxies like a radio action.
draw_as_radio=(draw_as_radio)
Sets whether the action should have proxies like a radio action. Since 2.4
  • draw_as_radio: true if the action should have proxies like a radio action
  • Returns: draw_as_radio
set_draw_as_radio(draw_as_radio)
Same as Gtk::ToggleAction#draw_as_radio=. Since 2.4
  • draw_as_radio: true if the action should have proxies like a radio action
  • Returns: self

Properties

draw-as-radio: true or false (Read/Write)
Whether the proxies for this action look like radio action proxies. Since 2.4
  • Default value: false

ChangeLog

  • 2005-1-27 Added. - Masao
Dernière modification:2011/06/28 17:47:37
Mots clef:
Références:[Gtk::ToggleAction] [Gtk::RadioAction]