Gtk.RadioAction¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.ToggleAction (6), Gtk.Action (42), GObject.Object (37), Gtk.Buildable (10)
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
The value property of the currently active member of the group to which this action belongs. |
||
w |
The radio action whose group this action belongs to. |
||
r/w |
The value returned by |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Gtk.RadioAction(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Gtk.RadioActionis similar toGtk.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 actionlabel (
strorNone) – The label displayed in menu items and on buttons, orNonestock_id (
strorNone) – The stock icon to display in widgets representing this action, orNonevalue (
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 aGtk.ActionGroupand set the accelerator for the action, callGtk.ActionGroup.add_action_with_accel().New in version 2.4.
Deprecated since version 3.10.
- get_current_value()[source]¶
- Returns:
The value of the currently active group member
- Return type:
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:
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.RadioActionorNone) – a radio action object whos group we are joining, orNoneto 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() andGtk.RadioAction.set_group() methodsA 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] orNone) – a list representing a radio group, orNone
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) –
Signal Details¶
- Gtk.RadioAction.signals.changed(radio_action, current)¶
- Signal Name:
changed- Flags:
- Parameters:
radio_action (
Gtk.RadioAction) – The object which received the signalcurrent (
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.
Property Details¶
- Gtk.RadioAction.props.current_value¶
-
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:
- Default Value:
- Flags:
Sets a new group for a radio action.
New in version 2.4.
Deprecated since version 3.10.
- Gtk.RadioAction.props.value¶
-
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. SeeGtk.RadioAction.get_current_value() andGtk.RadioActionEntryfor convenient ways to get and set this property.New in version 2.4.
Deprecated since version 3.10.