Gtk.ToggleAction¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Whether the toggle action should be active |
||
r/w |
Whether the proxies for this action look like radio action proxies |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Should be connected if you wish to perform an action whenever the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Gtk.ToggleAction(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Gtk.ToggleAction
corresponds roughly to aGtk.CheckMenuItem
. It has an “active” state specifying whether the action has been checked or not.- classmethod new(name, label, tooltip, stock_id)[source]¶
- Parameters:
- Returns:
a new
Gtk.ToggleAction
- Return type:
Creates a new
Gtk.ToggleAction
object. To add the action to aGtk.ActionGroup
and set the accelerator for the action, callGtk.ActionGroup.add_action_with_accel
().New in version 2.4.
Deprecated since version 3.10.
- get_active()[source]¶
- Returns:
the checked state of the toggle action
- Return type:
Returns the checked state of the toggle action.
New in version 2.4.
Deprecated since version 3.10.
- get_draw_as_radio()[source]¶
- Returns:
whether the action should have proxies like a radio action.
- Return type:
Returns whether the action should have proxies like a radio action.
New in version 2.4.
Deprecated since version 3.10.
- set_active(is_active)[source]¶
- Parameters:
is_active (
bool
) – whether the action should be checked or not
Sets the checked state on the toggle action.
New in version 2.4.
Deprecated since version 3.10.
- set_draw_as_radio(draw_as_radio)[source]¶
- Parameters:
draw_as_radio (
bool
) – whether the action should have proxies like a radio action
Sets whether the action should have proxies like a radio action.
New in version 2.4.
Deprecated since version 3.10.
- toggled()[source]¶
Emits the “toggled” signal on the toggle action.
New in version 2.4.
Deprecated since version 3.10.
- do_toggled() virtual¶
Emits the “toggled” signal on the toggle action.
New in version 2.4.
Deprecated since version 3.10.
Signal Details¶
- Gtk.ToggleAction.signals.toggled(toggle_action)¶
- Signal Name:
toggled
- Flags:
- Parameters:
toggle_action (
Gtk.ToggleAction
) – The object which received the signal
Should be connected if you wish to perform an action whenever the
Gtk.ToggleAction
state is changed.Deprecated since version 3.10.
Property Details¶
- Gtk.ToggleAction.props.active¶
-
Whether the toggle action should be active.
New in version 2.10.
Deprecated since version 3.10.
- Gtk.ToggleAction.props.draw_as_radio¶
-
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
isTrue
.Deprecated since version 3.10.