Class: Gtk::RadioAction

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#current_valueInteger

The value property of the currently active member of the group to which this action belongs.

Returns:

  • (Integer)

    current-value

#current_value=(current_value) ⇒ Integer

The value property of the currently active member of the group to which this action belongs.

Parameters:

  • current_value (Integer)

Returns:

  • (Integer)

    current-value

  • (Integer)

    current-value

#groupGLib::SList

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);
  }

Returns:

  • (GLib::SList)

    the list representing the radio group for this object

#group=(group) ⇒ Gtk::RadioAction

Sets a new group for a radio action.

Parameters:

Returns:

#join_group(group_source) ⇒ nil

Joins a radio action object to the group of another radio action object.

Use this in language bindings instead of the gtk_radio_action_get_group() and gtk_radio_action_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;
  }

Parameters:

  • group_source (Gtk::RadioAction)

    a radio action object whos group we are joining, or nil to remove the radio action from its group

Returns:

  • (nil)

#new(name, label, tooltip, stock_id, value) ⇒ Gtk::RadioAction

Creates a new Gtk::RadioAction object. To add the action to a Gtk::ActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel().

Parameters:

  • name (String)

    A unique name for the action

  • label (String)

    The label displayed in menu items and on buttons, or nil

  • tooltip (String)

    A tooltip for this action, or nil

  • stock_id (String)

    The stock icon to display in widgets representing this action, or nil

  • value (Integer)

    The value which gtk_radio_action_get_current_value() should return if this action is selected.

Returns:

#valueInteger

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 Gtk::RadioActionEntry for convenient ways to get and set this property.

Returns:

  • (Integer)

    value

#value=(value) ⇒ Integer

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 Gtk::RadioActionEntry for convenient ways to get and set this property.

Parameters:

  • value (Integer)

Returns:

  • (Integer)

    value

  • (Integer)

    value