3 This file is part of libmspgltk
4 Copyright © 2007, 2009 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_BUTTON_H_
9 #define MSP_GLTK_BUTTON_H_
11 #include <sigc++/sigc++.h>
12 #include <msp/gl/texture2d.h>
19 A clickable button widget. Buttons can have a text label, which is displayed
20 in a spacial part "text".
22 class Button: public Widget
25 class Loader: public Widget::Loader
29 Button &get_object() const;
34 const GL::Texture2D *icon;
38 sigc::signal<void> signal_clicked;
40 Button(const Resources &, const std::string & =std::string());
41 void set_text(const std::string &);
42 void set_icon(const GL::Texture2D *);
43 virtual void button_press(int, int, unsigned);
44 virtual void button_release(int, int, unsigned);
45 virtual void pointer_motion(int, int);
47 virtual const char *get_class() const { return "button"; }
48 virtual void render_special(const Part &) const;