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 Widget::Loader
21 Toggle &get_object() const;
23 virtual void finish();
24 void text(const std::string &);
27 sigc::signal<void, bool> signal_toggled;
36 Toggle(const std::string & = std::string());
38 virtual const char *get_class() const { return "toggle"; }
40 virtual void autosize();
42 void set_text(const std::string &);
43 void set_exclusive(bool);
44 bool get_exclusive() const { return exclusive; }
46 void exclude_siblings();
49 bool get_value() const { return value; }
52 virtual void rebuild_special(const Part &, CachedPart &);
55 virtual void button_press(int, int, unsigned);
56 virtual void button_release(int, int, unsigned);
58 virtual void on_style_change();