logo top
Main Page   Widgets   Namespaces   Book  

Gtk::ToggleButton Class Reference
[Widgets]

A Gtk::ToggleButton will remain 'pressed-in' when clicked. More...

Inheritance diagram for Gtk::ToggleButton:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~ToggleButton ()
GtkToggleButton* gobj ()
 Provides access to the underlying C GtkObject.

const GtkToggleButton* gobj () const
 Provides access to the underlying C GtkObject.

 ToggleButton ()
 Create an empty toggle button.

 ToggleButton (const Glib::ustring& label, bool mnemonic=false)
 Create a toggle button with a label.

void set_mode (bool draw_indicator=true)
bool get_mode () const
void set_active (bool is_active=true)
bool get_active () const
void set_inconsistent (bool setting=true)
bool get_inconsistent () const
void toggled ()
Glib::SignalProxy0<void> signal_toggled ()
Glib::PropertyProxy<bool> property_active ()
Glib::PropertyProxy<bool> property_inconsistent ()
Glib::PropertyProxy<bool> property_draw_indicator ()

Protected Member Functions

virtual void on_toggled ()

Related Functions

(Note that these are not member functions.)

Gtk::ToggleButtonwrap (GtkToggleButton* object, bool take_copy=false)

Detailed Description

A Gtk::ToggleButton will remain 'pressed-in' when clicked.

Clicking again will cause the toggle button to return to it's normal state. The state of a Gtk::ToggleButton can be set specifically using set_active(), and retrieved using get_active(). To simply switch the state of a toggle button, use toggled().


Constructor & Destructor Documentation

virtual Gtk::ToggleButton::~ToggleButton (  )  [virtual]
 

Gtk::ToggleButton::ToggleButton (  ) 
 

Create an empty toggle button.

With an empty button, you can Gtk::Button::add() a widget such as a Gtk::Pixmap or Gtk::Box.

If you just wish to add a Gtk::Label, you may want to use the Gtk::ToggleButton(const Glib::ustring& label) constructor directly instead.

Gtk::ToggleButton::ToggleButton ( const Glib::ustring&  label,
bool  mnemonic = false
[explicit]
 

Create a toggle button with a label.

You won't be able to add a widget to this button since it already contains a Gtk::Label


Member Function Documentation

bool Gtk::ToggleButton::get_active (  )  const
 

bool Gtk::ToggleButton::get_inconsistent (  )  const
 

bool Gtk::ToggleButton::get_mode (  )  const
 

const GtkToggleButton* Gtk::ToggleButton::gobj (  )  const [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Button.

Reimplemented in Gtk::CheckButton, and Gtk::RadioButton.

GtkToggleButton* Gtk::ToggleButton::gobj (  )  [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Button.

Reimplemented in Gtk::CheckButton, and Gtk::RadioButton.

virtual void Gtk::ToggleButton::on_toggled (  )  [protected, virtual]
 

Glib::PropertyProxy<bool> Gtk::ToggleButton::property_active (  ) 
 

Glib::PropertyProxy<bool> Gtk::ToggleButton::property_draw_indicator (  ) 
 

Glib::PropertyProxy<bool> Gtk::ToggleButton::property_inconsistent (  ) 
 

void Gtk::ToggleButton::set_active ( bool  is_active = true  ) 
 

void Gtk::ToggleButton::set_inconsistent ( bool  setting = true  ) 
 

void Gtk::ToggleButton::set_mode ( bool  draw_indicator = true  ) 
 

Glib::SignalProxy0<void> Gtk::ToggleButton::signal_toggled (  ) 
 

Prototype:
void toggled()

void Gtk::ToggleButton::toggled (  ) 
 


Friends And Related Function Documentation

Gtk::ToggleButton* wrap ( GtkToggleButton*  object,
bool  take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm2.2 by Doxygen 1.3.3 © 1997-2001