gtkmm 3.1.16
|
A "light switch"-style toggle. More...
Public Member Functions | |
virtual | ~Switch () |
GtkSwitch* | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkSwitch* | gobj () const |
Provides access to the underlying C GtkObject. | |
Switch () | |
void | set_active (bool is_active=true) |
Changes the state of sw to the desired one. | |
bool | get_active () const |
Gets whether the Gtk::Switch is in its "on" or "off" state. | |
Glib::PropertyProxy< bool > | property_active () |
Whether the switch is on or off. | |
Glib::PropertyProxy_ReadOnly < bool > | property_active () const |
Whether the switch is on or off. | |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::Switch* | wrap (GtkSwitch* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
A "light switch"-style toggle.
The Switch widget has two states: on or off. The user can control which state should be active by clicking the empty area, or by dragging the handle.
virtual Gtk::Switch::~Switch | ( | ) | [virtual] |
Gtk::Switch::Switch | ( | ) |
bool Gtk::Switch::get_active | ( | ) | const |
Gets whether the Gtk::Switch is in its "on" or "off" state.
true
if the Gtk::Switch is active, and false
otherwise. GtkSwitch* Gtk::Switch::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Activatable.
const GtkSwitch* Gtk::Switch::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Activatable.
Glib::PropertyProxy<bool> Gtk::Switch::property_active | ( | ) |
Whether the switch is on or off.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> Gtk::Switch::property_active | ( | ) | const |
Whether the switch is on or off.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Gtk::Switch::set_active | ( | bool | is_active = true | ) |
Changes the state of sw to the desired one.
is_active | true if sw should be active, and false otherwise. |
Gtk::Switch* wrap | ( | GtkSwitch * | object, |
bool | take_copy = false |
||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |