![]() |
![]() |
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().
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) |
Sets whether the button is displayed as a separate indicator and label. | |
bool | get_mode () const |
Retrieves whether the button is displayed as a separate indicator and label. | |
void | set_active (bool is_active=true) |
bool | get_active () const |
void | set_inconsistent (bool setting=true) |
If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a toggle button, and the current values in that range are inconsistent, you may want to display the toggle in an "in between" state. | |
bool | get_inconsistent () const |
Gets the value set by set_inconsistent(). | |
void | toggled () |
Glib::SignalProxy0<void> | signal_toggled () |
Glib::PropertyProxy<bool> | property_active () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<bool> | property_inconsistent () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<bool> | property_draw_indicator () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Protected Member Functions | |
virtual void | on_toggled () |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::ToggleButton* | wrap (GtkToggleButton* object, bool take_copy=false) |
|
|
|
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. |
|
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 |
|
|
|
Gets the value set by set_inconsistent().
|
|
Retrieves whether the button is displayed as a separate indicator and label. See set_mode().
|
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Button. Reimplemented in Gtk::CheckButton, and Gtk::RadioButton. |
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Button. Reimplemented in Gtk::CheckButton, and Gtk::RadioButton. |
|
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
|
|
If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a toggle button, and the current values in that range are inconsistent, you may want to display the toggle in an "in between" state. This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user toggles the toggle button. This has to be done manually, set_inconsistent() only affects visual appearance, it doesn't affect the semantics of the button.
|
|
Sets whether the button is displayed as a separate indicator and label.
You can call this function on a checkbutton or a radiobutton with draw_indicator = This function only effects instances of classes like Gtk::CheckButton and Gtk::RadioButton that derive from Gtk::ToggleButton, not instances of Gtk::ToggleButton itself.
|
|
|
|
|
|
|