3 This file is part of libmspgltk
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_TOGGLE_H_
9 #define MSP_GLTK_TOGGLE_H_
11 #include <sigc++/signal.h>
18 Allows toggling a value between two states.
20 class Toggle: public Widget
23 class Loader: public Widget::Loader
27 Toggle &get_object() const;
29 virtual void finish();
38 sigc::signal<void, bool> signal_toggled;
40 Toggle(const Resources &);
43 bool get_value() const { return value; }
45 virtual void button_press(int, int, unsigned);
46 virtual void button_release(int, int, unsigned);
48 virtual const char *get_class() const { return "toggle"; }
49 virtual void render_special(const Part &) const;