gtk.toggle_action
Module for [ToggleAction] class
Types 3
classToggleAction : gtk.action.Action
A #GtkToggleAction corresponds roughly to a #GtkCheckMenuItem. It has an “active” state specifying whether the action has been checked or not.
Methods
ToggleActionGidBuilder builder() static nothrowGet builder for [gtk.toggle_action.ToggleAction] Returns: New builder objectbool active() @property nothrowGet `active` property. Returns: Whether the toggle action should be active.void active(bool propval) @property nothrowSet `active` property. Params: propval = Whether the toggle action should be active.bool drawAsRadio() @property nothrowGet `drawAsRadio` property. Returns: Whether the proxies for this action look like radio action proxies.void drawAsRadio(bool propval) @property nothrowSet `drawAsRadio` property. Params: propval = Whether the proxies for this action look like radio action proxies.bool getActive() nothrowReturns the checked state of the toggle action. Returns: the checked state of the toggle actionbool getDrawAsRadio() nothrowReturns whether the action should have proxies like a radio action. Returns: whether the action should have proxies like a radio action.void setDrawAsRadio(bool drawAsRadio) nothrowSets whether the action should have proxies like a radio action.gulong connectToggled(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.toggle_action.ToggleAction)))
&& Parameters!T.length < 2) nothrowConnect to `Toggled` signal.Constructors
this(string name, string label = null, string tooltip = null, string stockId = null)Creates a new #GtkToggleAction object. To add the action to a #GtkActionGroup and set the accelerator for the action, call [gtk.action_group.ActionGroup.addActionWithAccel].Fluent builder implementation template for gtk.toggle_action.ToggleAction
Methods
T active(bool propval) nothrowSet `active` property. Params: propval = Whether the toggle action should be active. Returns: Builder instance for fluent chainingT drawAsRadio(bool propval) nothrowSet `drawAsRadio` property. Params: propval = Whether the proxies for this action look like radio action proxies.Fluent builder for gtk.toggle_action.ToggleAction
Methods