1 #ifndef MSP_GLTK_BUTTON_H_
2 #define MSP_GLTK_BUTTON_H_
4 #include <sigc++/sigc++.h>
5 #include <msp/gl/texture2d.h>
13 A clickable button widget. Buttons can have a text label, which is displayed
14 in a spacial part "text".
16 class Button: public Widget
19 class Loader: public Widget::Loader
24 void text(const std::string &);
27 sigc::signal<void> signal_clicked;
31 const GL::Texture2D *icon;
35 Button(const std::string & = std::string());
37 virtual const char *get_class() const { return "button"; }
39 virtual void autosize();
41 void set_text(const std::string &);
42 void set_icon(const GL::Texture2D *);
45 virtual void rebuild_special(const Part &, CachedPart &);
48 virtual void button_press(int, int, unsigned);
49 virtual void button_release(int, int, unsigned);
50 virtual void pointer_motion(int, int);
52 virtual void on_style_change();