|  |  |  | GTK+ Reference Manual |  | 
|---|
GtkRadioAction — an action of which only one in a group can be active
#include <gtk/gtk.h> struct GtkRadioAction; GtkRadioAction* gtk_radio_action_new (const gchar *name, const gchar *label, const gchar *tooltip, const gchar *stock_id, gint value); GSList* gtk_radio_action_get_group (GtkRadioAction *action); void gtk_radio_action_set_group (GtkRadioAction *action, GSList *group); gint gtk_radio_action_get_current_value (GtkRadioAction *action);
GObject +----GtkAction +----GtkToggleAction +----GtkRadioAction
"group" GtkRadioAction : Write "value" gint : Read / Write
"changed" void user_function (GtkRadioAction *action, GtkRadioAction *current, gpointer user_data);
A GtkRadioAction is similar to GtkRadioMenuItem. A number of radio actions can be linked together so that only one may be active at any one time.
struct GtkRadioAction;
The GtkRadioAction struct contains only private members and should not be accessed directly.
GtkRadioAction* gtk_radio_action_new (const gchar *name, const gchar *label, const gchar *tooltip, const gchar *stock_id, gint value);
Creates a new GtkRadioAction object. To add the action to a GtkActionGroup and set the accelerator for the action, call gtk_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. | 
| Returns : | a new GtkRadioAction | 
Since 2.4
GSList* gtk_radio_action_get_group (GtkRadioAction *action);
Returns the list representing the radio group for this object
| action : | the action object | 
| Returns : | the list representing the radio group for this object | 
Since 2.4
void gtk_radio_action_set_group (GtkRadioAction *action, GSList *group);
Sets the radio group for the radio action object.
| action : | the action object | 
| group : | a list representing a radio group | 
Since 2.4
gint gtk_radio_action_get_current_value (GtkRadioAction *action);
Obtains the value property of the the currently active member of the group to which action belongs.
| action : | a GtkRadioAction | 
| Returns : | The value of the currently active group member | 
Since 2.4
| "group" (GtkRadioAction : Write) | Sets a new group for a radio action. 
 Since 2.4 | 
| "value" (gint : Read / Write) | 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 ::activate or ::changed signal handler. See gtk_radio_action_get_current_value() and GtkRadioActionEntry for convenient ways to get and set this property. 
 Since 2.4 | 
void user_function (GtkRadioAction *action, GtkRadioAction *current, gpointer user_data);
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.
| action : | the action on which the signal is emitted | 
| current : | the member of actions group which has just been activated | 
| user_data : | user data set when the signal handler was connected. | 
Since 2.4
| << GtkToggleAction | Selectors (File/Font/Color/Input Devices) >> |