Gtk.ToggleAction¶
| Subclasses: | Gtk.RadioAction | 
|---|
Methods¶
| Inherited: | Gtk.Action (42), GObject.Object (37), Gtk.Buildable (10) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(name, label, tooltip, stock_id) | 
| get_active() | |
| get_draw_as_radio() | |
| set_active(is_active) | |
| set_draw_as_radio(draw_as_radio) | |
| toggled() | 
Properties¶
| Inherited: | Gtk.Action (16) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| active | bool | r/w | Whether the toggle action should be active deprecated | 
| draw-as-radio | bool | r/w | Whether the proxies for this action look like radio action proxies deprecated | 
Signals¶
| Inherited: | Gtk.Action (1), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| toggled | Should be connected if you wish to perform an action whenever the Gtk.ToggleActionstate is changed.deprecated | 
Fields¶
| Inherited: | Gtk.Action (1), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | Gtk.Action | r | 
Class Details¶
- 
class Gtk.ToggleAction(*args, **kwargs)¶
- Bases: - Gtk.Action- Abstract: - No - Structure: - Gtk.ToggleActionClass- A - Gtk.ToggleActioncorresponds roughly to a- Gtk.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.ToggleActionobject. To add the action to a- Gtk.ActionGroupand set the accelerator for the action, call- Gtk.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: - bool- 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: - bool- 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. 
 
- 
classmethod 
Signal Details¶
- 
Gtk.ToggleAction.signals.toggled(toggle_action)¶
- Signal Name: - toggled- Flags: - RUN_FIRST- Parameters: - toggle_action ( - Gtk.ToggleAction) – The object which received the signal- Should be connected if you wish to perform an action whenever the - Gtk.ToggleActionstate is changed.- Deprecated since version 3.10. 
Property Details¶
- 
Gtk.ToggleAction.props.active¶
- Name: - active- Type: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE- Whether the toggle action should be active. - New in version 2.10. - Deprecated since version 3.10. 
- 
Gtk.ToggleAction.props.draw_as_radio¶
- Name: - draw-as-radio- Type: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE- 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-appearanceis- True.- Deprecated since version 3.10.