summaryrefslogtreecommitdiff
path: root/src/user/include/cxx/raleigh/w/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/include/cxx/raleigh/w/button.h')
-rw-r--r--src/user/include/cxx/raleigh/w/button.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/user/include/cxx/raleigh/w/button.h b/src/user/include/cxx/raleigh/w/button.h
index 71ccae2..c56a6e3 100644
--- a/src/user/include/cxx/raleigh/w/button.h
+++ b/src/user/include/cxx/raleigh/w/button.h
@@ -4,10 +4,12 @@
#include <raleigh/widget.h>
namespace raleigh {
+ typedef void *button_tag_t;
class button : public widget {
public:
- button(widget &inner, void (*on_click)(button &), _pixel_t border_color=RGB(00, 00, 00),
- _pixel_t bg_color=RGB(bf, bf, bf), _pixel_t pressed_color=RGB(9f, 9f, 9f));
+ button(widget &inner, void (*on_click)(button_tag_t), button_tag_t tag=0,
+ _pixel_t border_color=RGB(00, 00, 00), _pixel_t bg_color=RGB(bf, bf, bf),
+ _pixel_t pressed_color=RGB(9f, 9f, 9f));
void notify_window_change() override;
void paint(_pixel_t *pixbuf, uint32_t pitch) override;
@@ -16,7 +18,8 @@ namespace raleigh {
void notify_has_opaque_parent(widget *parent) override;
private:
widget &inner;
- void (*on_click)(button &);
+ void (*on_click)(button_tag_t);
+ button_tag_t tag;
_pixel_t border_color;
_pixel_t bg_color;
_pixel_t pressed_color;