]> Dogcows Code - chaz/openbox/blob - otk/button.hh
53d08a8645a145d11d4cfac95fc0a61e212d59b2
[chaz/openbox] / otk / button.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __button_hh
3 #define __button_hh
4
5 #include "label.hh"
6
7 namespace otk {
8
9 class Button : public Label {
10
11 public:
12 Button(Widget *parent);
13 virtual ~Button();
14
15 virtual inline bool isDefault() const { return _default; }
16 virtual void setDefault(bool d);
17
18 virtual inline bool isPressed() const { return _pressed; }
19
20 virtual void press(unsigned int mouse_button);
21 virtual void release(unsigned int mouse_button);
22
23 virtual void buttonPressHandler(const XButtonEvent &e);
24 virtual void buttonReleaseHandler(const XButtonEvent &e);
25
26 virtual void styleChanged(const RenderStyle &style);
27
28 private:
29 bool _default;
30 bool _pressed;
31 unsigned int _mouse_button;
32 };
33
34 }
35
36 #endif
This page took 0.036137 seconds and 4 git commands to generate.