]> icculus.org git repositories - mikachu/openbox.git/blob - otk/focuswidget.hh
add a skeletal OBActions class for user actions
[mikachu/openbox.git] / otk / focuswidget.hh
1 #ifndef __focuswidget_hh
2 #define __focuswidget_hh
3
4 #include "widget.hh"
5 #include "application.hh"
6
7 namespace otk {
8
9 class OtkFocusWidget : public OtkWidget {
10
11 public:
12
13   OtkFocusWidget(OtkWidget *parent, Direction = Horizontal);
14   virtual ~OtkFocusWidget();
15
16   virtual void focus(void);
17   virtual void unfocus(void);
18
19   void setTexture(BTexture *texture);
20
21   inline void setUnfocusTexture(BTexture *texture)
22   { _unfocus_texture = texture; }
23   inline BTexture *getUnfocusTexture(void) const
24   { return _unfocus_texture; }
25
26   inline bool isFocused(void) const { return _focused; }
27   inline bool isUnfocused(void) const { return !_focused; }
28
29 private:
30
31   BTexture *_unfocus_texture;
32   BTexture *_focus_texture;
33
34   bool _focused;
35 };
36
37 }
38
39 #endif // __focuswidget_hh