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;
35 sigc::signal<void, bool> signal_toggled;
37 Toggle(const Resources &);
39 bool get_value() const { return value; }
41 virtual void button_release(int, int, unsigned);
42 virtual void pointer_enter();
43 virtual void pointer_leave();
45 virtual const char *get_class() const { return "toggle"; }
46 virtual void render_special(const Part &) const;