1 #ifndef MSP_GLTK_TOGGLE_H_
2 #define MSP_GLTK_TOGGLE_H_
4 #include <sigc++/signal.h>
12 Allows toggling a value between two states.
14 class Toggle: public Widget
17 class Loader: public DataFile::DerivedObjectLoader<Toggle, Widget::Loader>
22 virtual void finish();
23 void text(const std::string &);
26 sigc::signal<void, bool> signal_toggled;
35 Toggle(const std::string & = std::string());
37 virtual const char *get_class() const { return "toggle"; }
39 virtual void autosize();
41 void set_text(const std::string &);
42 void set_exclusive(bool);
43 bool get_exclusive() const { return exclusive; }
45 void exclude_siblings();
48 bool get_value() const { return value; }
51 virtual void rebuild_special(const Part &);
54 virtual void button_press(int, int, unsigned);
55 virtual void button_release(int, int, unsigned);
57 virtual void on_style_change();