]> Dogcows Code - chaz/openbox/blob - otk/button.hh
smarter expose. stop when the window is found
[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 virtual void update(void);
37 virtual bool expose(const XExposeEvent &e);
38
39 private:
40
41 std::string _text;
42 //OtkPixmap _pixmap;
43 bool _pressed;
44 bool _dirty;
45
46 BTexture *_pressed_focus_tx;
47 BTexture *_pressed_unfocus_tx;
48
49 BTexture *_unpr_focus_tx;
50 BTexture *_unpr_unfocus_tx;
51 };
52
53 }
This page took 0.039234 seconds and 5 git commands to generate.