]> Dogcows Code - chaz/openbox/blob - otk/button.hh
resizes
[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 virtual bool configure(const XConfigureEvent &e);
39
40 private:
41
42 std::string _text;
43 //OtkPixmap _pixmap;
44 bool _pressed;
45 bool _dirty;
46
47 BTexture *_pressed_focus_tx;
48 BTexture *_pressed_unfocus_tx;
49
50 BTexture *_unpr_focus_tx;
51 BTexture *_unpr_unfocus_tx;
52 };
53
54 }
This page took 0.037403 seconds and 5 git commands to generate.