]> icculus.org git repositories - mikachu/openbox.git/blob - otk/button.hh
use the same alogo to pick a color in allocateColor as in reduceDepth, break it off...
[mikachu/openbox.git] / 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 isPressed() const { return _pressed; }
16
17   virtual void press(unsigned int mouse_button);
18   virtual void release(unsigned int mouse_button);
19
20   virtual void buttonPressHandler(const XButtonEvent &e);
21   virtual void buttonReleaseHandler(const XButtonEvent &e);
22
23   virtual void styleChanged(const RenderStyle &style);
24  
25 private:
26   bool _pressed;
27   unsigned int _mouse_button;
28 };
29
30 }
31
32 #endif