]> Dogcows Code - chaz/openbox/blob - otk/button.hh
6908322e608c1dcd601805b781fed70a4f0de97c
[chaz/openbox] / otk / button.hh
1 #include "focuswidget.hh"
2 //#include "pixmap.hh"
3
4 namespace otk {
5
6 class OtkButton : public OtkFocusWidget {
7
8 public:
9
10 OtkButton(OtkWidget *parent);
11 ~OtkButton();
12
13 inline const BTexture *getPressedFocusTexture(void) const
14 { return _pressed_focus_tx; }
15 void setPressedFocusTexture(BTexture *texture)
16 { _pressed_focus_tx = texture; }
17
18 inline const BTexture *getPressedUnfocusTexture(void) const
19 { return _pressed_unfocus_tx; }
20 void setPressedUnfocusTexture(BTexture *texture)
21 { _pressed_unfocus_tx = texture; }
22
23 void setTexture(BTexture *texture);
24 void setUnfocusTexture(BTexture *texture);
25
26 inline const std::string &getText(void) const { return _text; }
27 void setText(const std::string &text) { _text = text; _dirty = true; }
28
29 //inline const OtkPixmap &getPixmap(void) const { return _pixmap; }
30 //void setPixmap(const OtkPixmap &pixmap);
31
32 inline bool isPressed(void) const { return _pressed; }
33 void press(void);
34 void release(void);
35
36 void update(void);
37
38 private:
39
40 std::string _text;
41 //OtkPixmap _pixmap;
42 bool _pressed;
43 // bool _dirty;
44
45 BTexture *_pressed_focus_tx;
46 BTexture *_pressed_unfocus_tx;
47
48 BTexture *_unpr_focus_tx;
49 BTexture *_unpr_unfocus_tx;
50 };
51
52 }
This page took 0.032549 seconds and 3 git commands to generate.