An action of which only one in a group can be active
A <gtk-radio-action>
is similar to <gtk-radio-menu-item>
. A number
of radio actions can be linked together so that only one may be active at any
one time.
Derives from
<gtk-toggle-action>
.This class defines the following slots:
value
- The value returned by gtk_radio_action_get_current_value() when this action is the current action of its group.
group
- The radio action whose group this action belongs to.
current-value
- The value property of the currently active member of the group to which this action belongs.
<gtk-radio-action>
)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.
Since 2.4
mchars
) (label mchars
) (tooltip mchars
) (stock_id mchars
) (value int
) ⇒ (ret <gtk-radio-action>
)Creates a new
<gtk-radio-action>
object. To add the action to a<gtk-action-group>
and set the accelerator for the action, callgtk-action-group-add-action-with-accel
.
- name
- A unique name for the action
- label
- The label displayed in menu items and on buttons
- tooltip
- A tooltip for this action
- stock-id
- The stock icon to display in widgets representing this action
- value
- The value which
gtk-radio-action-get-current-value
should return if this action is selected.- ret
- a new
<gtk-radio-action>
Since 2.4
<gtk-radio-action>
) ⇒ (ret <gtk-radio-group*>
)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); }
- action
- the action object
- ret
- the list representing the radio group for this object
Since 2.4
<gtk-radio-action>
) (group <gtk-radio-group*>
)Sets the radio group for the radio action object.
- action
- the action object
- group
- a list representing a radio group
Since 2.4