gtk.toggle_action

Module for [ToggleAction] class

Types 3

A #GtkToggleAction corresponds roughly to a #GtkCheckMenuItem. It has an “active” state specifying whether the action has been checked or not.

Methods
GType _gType() @property
ToggleAction self()Returns `this`, for use in `with` statements.
ToggleActionGidBuilder builder()Get builder for [gtk.toggle_action.ToggleAction] Returns: New builder object
bool active() @propertyGet `active` property. Returns: Whether the toggle action should be active.
void active(bool propval) @propertySet `active` property. Params: propval = Whether the toggle action should be active.
bool drawAsRadio() @propertyGet `drawAsRadio` property. Returns: Whether the proxies for this action look like radio action proxies.
void drawAsRadio(bool propval) @propertySet `drawAsRadio` property. Params: propval = Whether the proxies for this action look like radio action proxies.
bool getActive()Returns the checked state of the toggle action. Returns: the checked state of the toggle action
bool getDrawAsRadio()Returns whether the action should have proxies like a radio action. Returns: whether the action should have proxies like a radio action.
void setActive(bool isActive)Sets the checked state on the toggle action.
void setDrawAsRadio(bool drawAsRadio)Sets whether the action should have proxies like a radio action.
void toggled()Emits the “toggled” signal on the toggle 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)Connect to `Toggled` signal.
Constructors
this(void * ptr, Flag!"Take" take)
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].
Methods
T active(bool propval)Set `active` property. Params: propval = Whether the toggle action should be active. Returns: Builder instance for fluent chaining
T drawAsRadio(bool propval)Set `drawAsRadio` property. Params: propval = Whether the proxies for this action look like radio action proxies.

Fluent builder for [gtk.toggle_action.ToggleAction]