summaryrefslogtreecommitdiff
path: root/src/AttentionTheme.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/AttentionTheme.hh')
-rw-r--r--src/AttentionTheme.hh28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/AttentionTheme.hh b/src/AttentionTheme.hh
new file mode 100644
index 0000000..d5d539a
--- /dev/null
+++ b/src/AttentionTheme.hh
@@ -0,0 +1,28 @@
1#include <FocusableTheme.hh>
2
3class AttentionTheme: public FocusableTheme {
4public:
5 AttentionTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused,
6 FbTk::ThemeProxy<BaseTheme> &unfocused,
7 FbTk::ThemeProxy<BaseTheme> &attention):
8 FocusableTheme(win, focused, unfocused), m_attention_theme(attention)
9 {}
10
11 AttentionTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused,
12 FbTk::ThemeProxy<BaseTheme> &unfocused):
13 AttentionTheme(win, focused, unfocused, focused)
14 {}
15
16 FbTk::ThemeProxy<BaseTheme> &attentionTheme() { return m_attention_theme; }
17 const FbTk::ThemeProxy<BaseTheme> &attentionTheme() const { return m_attention_theme; }
18
19 virtual BaseTheme &operator *() {
20 return (m_win.getAttentionState() ? *m_attention_theme : FocusableTheme::());
21 }
22 virtual const BaseTheme &operator *() const {
23 return (m_win.getAttentionState() ? *m_attention_theme : FocusableTheme::());
24 }
25
26private:
27 FbTk::ThemeProxy<BaseTheme> &m_attention_theme;
28};