blob: 09fc0d6b6494aa28bf9c36e8b1379b2f88e3a7ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __button_hh
#define __button_hh
#include "label.hh"
namespace otk {
class Button : public Label {
public:
Button(Widget *parent);
virtual ~Button();
virtual inline bool isPressed() const { return _pressed; }
virtual void press(unsigned int mouse_button);
virtual void release(unsigned int mouse_button);
virtual void buttonPressHandler(const XButtonEvent &e);
virtual void buttonReleaseHandler(const XButtonEvent &e);
virtual void styleChanged(const RenderStyle &style);
private:
bool _pressed;
unsigned int _mouse_button;
};
}
#endif
|