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 DataFile::DerivedObjectLoader<Button, 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"; }
40 virtual void autosize_special(const Part &, Geometry &) const;
43 void set_text(const std::string &);
44 void set_icon(const GL::Texture2D *);
47 virtual void rebuild_special(const Part &);
50 virtual void button_press(int, int, unsigned);
51 virtual void button_release(int, int, unsigned);
52 virtual void pointer_motion(int, int);
54 virtual void on_style_change();