]> Dogcows Code - chaz/openbox/blob - otk/focuswidget.hh
doc the state functions better
[chaz/openbox] / otk / focuswidget.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __focuswidget_hh
3 #define __focuswidget_hh
4
5 #include "widget.hh"
6 #include "application.hh"
7
8 namespace otk {
9
10 class FocusWidget : public Widget {
11
12 public:
13
14 FocusWidget(Widget *parent, Direction = Horizontal);
15 virtual ~FocusWidget();
16
17 virtual void focus(void);
18 virtual void unfocus(void);
19
20 virtual void setTexture(RenderTexture *texture);
21 virtual void setBorderColor(const RenderColor *color);
22
23 inline void setUnfocusTexture(RenderTexture *texture)
24 { _unfocus_texture = texture; }
25 inline RenderTexture *getUnfocusTexture(void) const
26 { return _unfocus_texture; }
27
28 inline void setUnfocusBorderColor(const RenderColor *color)
29 { _unfocus_bcolor = color; }
30 inline const RenderColor *getUnfocusBorderColor(void) const
31 { return _unfocus_bcolor; }
32
33 inline bool isFocused(void) const { return _focused; }
34 inline bool isUnfocused(void) const { return !_focused; }
35
36 private:
37
38 RenderTexture *_unfocus_texture;
39 RenderTexture *_focus_texture;
40
41 const RenderColor *_unfocus_bcolor;
42 const RenderColor *_focus_bcolor;
43 };
44
45 }
46
47 #endif // __focuswidget_hh
This page took 0.035013 seconds and 4 git commands to generate.