gtk.RadioAction
gtk.RadioAction — an action that can be grouped so that only one can be active (new in PyGTK 2.4)
Synopsis
class gtk.RadioAction(gtk.ToggleAction): |
gtk.RadioAction Properties
|
gtk.RadioAction Signal Prototypes
gtk.ToggleAction Signal Prototypes
"changed" | def callback( |
Description
Note
This object is available in PyGTK 2.4 and above.
A gtk.RadioAction
is a subclass of gtk.ToggleAction
and similar to gtk.RadioMenuItem
.
A number of radio actions can be linked together so that only one may be
active at any one time.
Constructor
gtk.RadioAction(name
, label
, tooltip
, stock_id
, value
)
| A unique name for the action |
| The label displayed in menu items and on buttons |
| A tooltip for this action |
| The stock icon to display in widgets representing this action |
| A unique integer value that get_current_value()
should return if this action is selected. |
Returns : | a new gtk.RadioAction |
Note
This constructor is available in PyGTK 2.4 and above.
Creates a new gtk.RadioAction
object suing the properties specified by: name
,
label
, tooltip
,
stock_id
and value
. To add the
action to a gtk.ActionGroup
and set the accelerator for the action, call the gtk.ActionGroup.add_action_with_accel()
.
Methods
gtk.RadioAction.set_group
def set_group(group
)
| another gtk.RadioAction or None |
Note
This method is available in PyGTK 2.4 and above.
The set_group
() method sets the radio
group for the radio action to the same group as the gtk.RadioAction
specified by group
i.e. the radio action joins the
group.
In PyGTK 2.6.2 and above, if group
is
None
the radio action is removed from its current
group.
gtk.RadioAction.get_group
def get_group()
Returns : | a list containing the radio actions in the
group or None |
Note
This method is available in PyGTK 2.4 and above.
The get_group
() method returns a list
containing the group that the radio action belongs to or
None
if the radio action is not part of a group.
gtk.RadioAction.set_current_value
def set_current_value()
| the new value. |
Note
This method is available in PyGTK 2.10 and above.
The get_current_value
() method sets the currently
active group member to the member with value property current_value.
gtk.RadioAction.get_current_value
def get_current_value()
Returns : | The value of the currently active group member |
Note
This method is available in PyGTK 2.4 and above.
The get_current_value
() method returns
the "value" property of the the currently active member of the group that
the radio action belongs to.
Signals
The "changed" gtk.RadioAction Signal
def callback(radioaction
, current
, user_param1
, ...
)
| the radioaction that received the signal |
| the currently active gtk.RadioAction
in the group |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
Note
This signal is available in GTK+ 2.4 and above.
The "changed" signal is emitted on every member of a radio group when the active member is changed. The signal gets emitted after the "activate" signals for the previous and current active members.