]> git.tdb.fi Git - libs/gltk.git/blob - source/button.h
Initial revision
[libs/gltk.git] / source / button.h
1 #ifndef MSP_GLTK_BUTTON_H_
2 #define MSP_GLTK_BUTTON_H_
3
4 #include <sigc++/sigc++.h>
5 #include "widget.h"
6
7 namespace Msp {
8 namespace GLtk {
9
10 class Button: public Widget
11 {
12 public:
13         sigc::signal<void> signal_clicked;
14
15         Button(const Resources &, const std::string & =std::string());
16         void set_text(const std::string &);
17 private:
18         std::string text;
19         bool pressed;
20
21         const char *get_class() const { return "button"; }
22         void render_part(const Part &) const;
23         void on_button_press(int, int, unsigned);
24         void on_button_release(int, int, unsigned);
25 };
26
27 } // namespace GLtk
28 } // namespace Msp
29
30 #endif