1 #ifndef MSP_GLTK_TOGGLE_H_
2 #define MSP_GLTK_TOGGLE_H_
4 #include <sigc++/signal.h>
5 #include "mspgltk_api.h"
13 Allows toggling a value between two states.
15 class MSPGLTK_API Toggle: public Widget
18 class MSPGLTK_API Loader: public DataFile::DerivedObjectLoader<Toggle, Widget::Loader>
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"; }
41 virtual void autosize_special(const Part &, Geometry &) const;
44 void set_text(const std::string &);
45 void set_exclusive(bool);
46 bool get_exclusive() const { return exclusive; }
48 void exclude_siblings();
51 bool get_value() const { return value; }
54 virtual void rebuild_special(const Part &);
57 virtual void button_press(int, int, unsigned);
58 virtual void button_release(int, int, unsigned);
59 virtual bool navigate(Navigation);
61 virtual void on_style_change();