GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gtk::RadioAction Class Reference

A GtkRadioAction C++ wrapper class. More...

#include <gfc/gtk/radioaction.hh>

Inheritance diagram for GFC::Gtk::RadioAction:

GFC::Gtk::ToggleAction GFC::Gtk::Action GFC::G::Object GFC::G::TypeInstance GFC::Trackable List of all members.

Signal Prototypes

Public Types

Public Member Functions

Constructors
Accessors
Methods
Signal Proxies

Protected Member Functions

Constructors

Detailed Description

A GtkRadioAction C++ wrapper class.

A RadioAction is similar to RadioMenuItem. A number of radio actions can be linked together so that only one may be active at any one time.


Constructor & Destructor Documentation

GFC::Gtk::RadioAction::RadioAction GtkRadioAction *  action,
bool  owns_reference = true
[explicit, protected]
 

Construct a new RadioAction from an existing GtkRadioAction.

Parameters:
action A pointer to a GtkRadioAction.
owns_reference Set false if the initial reference count is floating, set true if it's not.

The action can be a newly created GtkRadioAction or an existing GtkRadioAction (see G::Object::Object).

GFC::Gtk::RadioAction::RadioAction const RadioAction group,
const String name,
const String label,
int  value
 

Constructs a RadioAction object that is a member of group.

Parameters:
group An existing radio button group, or null to start a new group.
name A unique name for the action.
label The label displayed in menu items and on buttons.
value The value which get_current_value() should return if this action is selected.

To add the action to an ActionGroup and set the accelerator for the action, call Gtk::ActionGroup::add_action().

GFC::Gtk::RadioAction::RadioAction const RadioAction group,
const String name,
const StockId stock_id,
int  value
 

Constructs a RadioAction object that is a member of group.

Parameters:
group An existing radio button group, or null to start a new group.
name A unique name for the action.
stock_id The stock icon and label to display in widgets representing the action.
value The value which get_current_value() should return if this action is selected.

To add the action to an ActionGroup and set the accelerator for the action, call Gtk::ActionGroup::add_action().

GFC::Gtk::RadioAction::RadioAction const RadioAction group,
const String name,
const String label,
const StockId stock_id,
int  value
 

Constructs a RadioAction object that is a member of group.

Parameters:
group An existing radio button group, or null to start a new group.
name A unique name for the action.
label The label displayed in menu items and on buttons.
stock_id The stock icon to display in widgets representing the action.
value The value which get_current_value() should return if this action is selected.

To add the action to an ActionGroup and set the accelerator for the action, call Gtk::ActionGroup::add_action(). Note that label is displayed instead of the stock_id label.


Member Function Documentation

int GFC::Gtk::RadioAction::get_current_value  )  const
 

Obtains the value of the currently active member of the group to which action belongs.

Returns:
The value of the currently active group member.

Group* GFC::Gtk::RadioAction::get_group  )  const
 

Returns the list representing the radio group for this object.

Returns:
The list representing the radio group for this object.

int GFC::Gtk::RadioAction::get_value  )  const
 

Obtains the value for this radio action.

Returns:
The value that identifies this radio action.

void GFC::Gtk::RadioAction::set_group Group group  ) 
 

Sets the radio group for the radio action object.

Parameters:
group A list representing a radio group.

const ChangedSignalProxy GFC::Gtk::RadioAction::sig_changed  ) 
 

Connect to the changed_signal; 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. When creating a group radio actions manually with Gtk::ActionGroup::add_action() you only need to connect the changed_signal to the first radio action in the group.


Member Data Documentation

const ChangedSignalType GFC::Gtk::RadioAction::changed_signal [static, protected]
 

Changed signal (see sig_changed()).

Calls a slot with the signature:

             void function(RadioAction& current);
             // current: The member of the action group which has just been activated. 


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:41 2004 for GFC-UI by doxygen 1.3.8