Gtk.RadioAction¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Gtk.ToggleAction (6), Gtk.Action (42), GObject.Object (37), Gtk.Buildable (10) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(name, label, tooltip, stock_id, value) | 
| get_current_value() | |
| get_group() | |
| join_group(group_source) | |
| set_current_value(current_value) | |
| set_group(group) | 
Virtual Methods¶
| Inherited: | Gtk.ToggleAction (1), Gtk.Action (6), GObject.Object (7), Gtk.Buildable (10) | 
|---|
| do_changed(current) | 
Properties¶
| Inherited: | Gtk.ToggleAction (2), Gtk.Action (16) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| current-value | int | r/w | The value property of the currently active member of the group to which this action belongs. deprecated | 
| group | Gtk.RadioAction | w | The radio action whose group this action belongs to. deprecated | 
| value | int | r/w | The value returned by Gtk.RadioAction.get_current_value() when this action is the current action of its group.deprecated | 
Signals¶
| Inherited: | Gtk.ToggleAction (1), Gtk.Action (1), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| changed | The ::changedsignal is emitted on every member of a radio group when the active member is changed.deprecated | 
Fields¶
| Inherited: | Gtk.ToggleAction (1), Gtk.Action (1), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | Gtk.ToggleAction | r | 
Class Details¶
- 
class Gtk.RadioAction(*args, **kwargs)¶
- Bases: - Gtk.ToggleAction- Abstract: - No - Structure: - Gtk.RadioActionClass- A - Gtk.RadioActionis similar to- Gtk.RadioMenuItem. A number of radio actions can be linked together so that only one may be active at any one time.- 
classmethod new(name, label, tooltip, stock_id, value)[source]¶
- Parameters: - name (str) – A unique name for the action
- label (strorNone) – The label displayed in menu items and on buttons, orNone
- tooltip (strorNone) – A tooltip for this action, orNone
- stock_id (strorNone) – The stock icon to display in widgets representing this action, orNone
- value (int) – The value whichGtk.RadioAction.get_current_value() should return if this action is selected.
 - Returns: - a new - Gtk.RadioAction- Return type: - Creates a new - Gtk.RadioActionobject. 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. 
- name (
 - 
get_current_value()[source]¶
- Returns: - The value of the currently active group member - Return type: - int- Obtains the value property of the currently active member of the group to which self belongs. - New in version 2.4. - Deprecated since version 3.10. 
 - 
get_group()[source]¶
- Returns: - the list representing the radio group for this object - Return type: - [ - Gtk.RadioAction]- Returns the list representing the radio group for this object. Note that the returned list is only valid until the next change to the group. - A common way to set up a group of radio group is the following: - GSList *group = NULL; GtkRadioAction *action; while ( ...more actions to add... /) { action = gtk_radio_action_new (...); gtk_radio_action_set_group (action, group); group = gtk_radio_action_get_group (action); } - New in version 2.4. - Deprecated since version 3.10. 
 - 
join_group(group_source)[source]¶
- Parameters: - group_source ( - Gtk.RadioActionor- None) – a radio action object whos group we are joining, or- Noneto remove the radio action from its group- Joins a radio action object to the group of another radio action object. - Use this in language bindings instead of the - Gtk.RadioAction.get_group() and- Gtk.RadioAction.set_group() methods- A common way to set up a group of radio actions is the following: - GtkRadioAction *action; GtkRadioAction *last_action; while ( ...more actions to add... /) { action = gtk_radio_action_new (...); gtk_radio_action_join_group (action, last_action); last_action = action; } - New in version 3.0. - Deprecated since version 3.10. 
 - 
set_current_value(current_value)[source]¶
- Parameters: - current_value ( - int) – the new value- Sets the currently active group member to the member with value property current_value. - New in version 2.10. - Deprecated since version 3.10. 
 - 
set_group(group)[source]¶
- Parameters: - group ([ - Gtk.RadioAction] or- None) – a list representing a radio group, or- None- Sets the radio group for the radio action object. - New in version 2.4. - Deprecated since version 3.10. 
 - 
do_changed(current) virtual¶
- Parameters: - current ( - Gtk.RadioAction) –
 
- 
classmethod 
Signal Details¶
- 
Gtk.RadioAction.signals.changed(radio_action, current)¶
- Signal Name: - changed- Flags: - Parameters: - radio_action (Gtk.RadioAction) – The object which received the signal
- current (Gtk.RadioAction) – the member of action’s group which has just been activated
 - The - ::changedsignal is emitted on every member of a radio group when the active member is changed. The signal gets emitted after the- ::activatesignals for the previous and current active members.- New in version 2.4. - Deprecated since version 3.10. 
- radio_action (
Property Details¶
- 
Gtk.RadioAction.props.current_value¶
- Name: - current-value- Type: - int- Default Value: - 0- Flags: - READABLE,- WRITABLE- The value property of the currently active member of the group to which this action belongs. - New in version 2.10. - Deprecated since version 3.10. 
- 
Gtk.RadioAction.props.group¶
- Name: - group- Type: - Gtk.RadioAction- Default Value: - None- Flags: - WRITABLE- Sets a new group for a radio action. - New in version 2.4. - Deprecated since version 3.10. 
- 
Gtk.RadioAction.props.value¶
- Name: - value- Type: - int- Default Value: - 0- Flags: - READABLE,- WRITABLE- The value is an arbitrary integer which can be used as a convenient way to determine which action in the group is currently active in an - ::activateor- ::changedsignal handler. See- Gtk.RadioAction.get_current_value() and- Gtk.RadioActionEntryfor convenient ways to get and set this property.- New in version 2.4. - Deprecated since version 3.10.