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

GFC::Gtk::ToggleAction Class Reference

A GtkToggleAction C++ wrapper class. More...

#include <gfc/gtk/toggleaction.hh>

Inheritance diagram for GFC::Gtk::ToggleAction:

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

Signal Prototypes

Public Member Functions

Constructors
Accessors
Methods
Signal Proxies

Protected Member Functions

Constructors

Detailed Description

A GtkToggleAction C++ wrapper class.

A ToggleAction corresponds roughly to a CheckMenuItem. It has an "active" state specifying whether the action has been checked or not.


Constructor & Destructor Documentation

GFC::Gtk::ToggleAction::ToggleAction GtkToggleAction *  action,
bool  owns_reference = true
[explicit, protected]
 

Construct a new ToggleAction from an existing GtkToggleAction.

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

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

GFC::Gtk::ToggleAction::ToggleAction const String name,
const String label,
bool  is_active
 

Constructs a new ToggleAction object.

Parameters:
name A unique name for the action.
label The label displayed in menu items and on buttons.
is_active Whether the initial state of the toggle action is active.

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

GFC::Gtk::ToggleAction::ToggleAction const String name,
const StockId stock_id,
bool  is_active
 

Constructs a new ToggleAction object.

Parameters:
name A unique name for the action.
is_active Whether the initial state of the toggle action is active.
stock_id The stock icon and label to display in widgets representing the action.

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

GFC::Gtk::ToggleAction::ToggleAction const String name,
const String label,
const StockId stock_id,
bool  is_active
 

Constructs a new ToggleAction object.

Parameters:
name A unique name for the action.
label The label displayed in menu items and on buttons.
is_active Whether the initial state of the toggle action is active.
stock_id The stock icon to display in widgets representing the action.

To add the action to a 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

bool GFC::Gtk::ToggleAction::get_active  )  const
 

Determines the checked state of the toggle action.

Returns:
true if the toggle action is checked.

bool GFC::Gtk::ToggleAction::get_draw_as_radio  )  const
 

Determines whether the action should have proxies like a radio action.

Returns:
Whether the action should have proxies like a radio action.

void GFC::Gtk::ToggleAction::set_active bool  is_active  ) 
 

Sets the checked state of the toggle action.

Parameters:
is_active Whether the action should be checked or not.

void GFC::Gtk::ToggleAction::set_draw_as_radio bool  draw_as_radio  ) 
 

Sets whether the action should have proxies like a radio action.

Parameters:
draw_as_radio Whether the action should have proxies like a radio action.


Member Data Documentation

const ToggledSignalType GFC::Gtk::ToggleAction::toggled_signal [static, protected]
 

Toggled signal (see sig_toggled()).

Calls a slot with the signature:

             void function();


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