]> Dogcows Code - chaz/openbox/blob - otk/focuswidget.hh
blef
[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(Texture *texture);
21 virtual void setBorderColor(const Color *color);
22
23 inline void setUnfocusTexture(Texture *texture)
24 { _unfocus_texture = texture; }
25 inline Texture *getUnfocusTexture(void) const
26 { return _unfocus_texture; }
27
28 inline void setUnfocusBorderColor(const Color *color)
29 { _unfocus_bcolor = color; }
30 inline const Color *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 Texture *_unfocus_texture;
39 Texture *_focus_texture;
40
41 const Color *_unfocus_bcolor;
42 const Color *_focus_bcolor;
43 };
44
45 }
46
47 #endif // __focuswidget_hh
This page took 0.036346 seconds and 4 git commands to generate.