gtk.ToggleActionan action which can be
toggled between two states (new in PyGTK 2.4)Synopsisgtk.ToggleActiongtk.Actiongtk.ToggleActionnamelabeltooltipstock_idtoggledset_activeis_activeget_activeset_draw_as_radiodraw_as_radioget_draw_as_radioAncestry+-- gobject.GObject
+-- gtk.Action
+-- gtk.ToggleAction
Implemented Interfacesgtk.ToggleAction
implements
gtk.Buildablegtk.ToggleAction Propertiesgtk.Action Properties
"active"Read-WriteIf the toggle action should be active in or not. This
property is available in GTK+ 2.10 and above."draw-as-radio"Read-WriteIf True, the proxies for this action
look like radio action proxies. Available in GTK+ 2.4 and
above.
gtk.ToggleAction Signal Prototypesgobject.GObject Signal Prototypesgtk.Action Signal Prototypes"toggled"callbacktoggleactionuser_param1...DescriptionThis object is available in PyGTK 2.4 and above.A gtk.ToggleAction
which is a subclass of gtk.Action
corresponds roughly to a gtk.CheckMenuItem. It
has an "active" state specifying whether the action has been checked or
not.Constructorgtk.ToggleActionnamelabeltooltipstock_idname :a unique name for the actionlabel :the label displayed in menu items and on
buttonstooltip :a tooltip for the actionstock_id :the stock icon to display in widgets representing
the actionReturns :a new gtk.ToggleActionThis constructor is available in PyGTK 2.4 and above.Creates a new gtk.ToggleAction
object. To add the action to a gtk.ActionGroup
and set the accelerator for the action, call the gtk.ActionGroup.add_action_with_accel()
method.Methodsgtk.ToggleAction.toggledtoggledThis method is available in PyGTK 2.4 and above.The toggled() method emits the
"toggled" signal on the toggle action.gtk.ToggleAction.set_activeset_activeis_activeis_active :if True the action should be
checkedThis method is available in PyGTK 2.4 and above.The set_active() method sets the
checked state on the toggle action.gtk.ToggleAction.get_activeget_activeReturns :True if the toggle action is
checkedThis method is available in PyGTK 2.4 and above.The get_active() method returns
True if the toggle action is checked.gtk.ToggleAction.set_draw_as_radioset_draw_as_radiodraw_as_radiodraw_as_radio :if True the action should
have proxies like a radio actionThis method is available in PyGTK 2.4 and above.The set_draw_as_radio() method sets the
"draw-as-radio" property to the value of
draw_as_radio. If
draw_as_radio is True the action
should have proxies like a radio action.gtk.ToggleAction.get_draw_as_radioget_draw_as_radioReturns :True if the action should
have proxies like a radio action.This method is available in PyGTK 2.4 and above.The get_draw_as_radio() method returns
the value of the "draw-as-radio" property. If "draw-as-radio" is
True the action should have proxies like a radio
action.SignalsThe "toggled" gtk.ToggleAction Signalcallbacktoggleactionuser_param1...toggleaction :the toggleaction that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)This signal is available in GTK+ 2.4 and above.The "toggled" signal is emitted when the toggle action changes
its active state.