summaryrefslogtreecommitdiff
path: root/src/AttentionTheme.hh
blob: d5d539a1f9af25d4a2061d81bea9713805e0df61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <FocusableTheme.hh>

class AttentionTheme: public FocusableTheme {
public:
	AttentionTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused,
			FbTk::ThemeProxy<BaseTheme> &unfocused,
			FbTk::ThemeProxy<BaseTheme> &attention):
		FocusableTheme(win, focused, unfocused), m_attention_theme(attention)
	{}

	AttentionTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused,
			FbTk::ThemeProxy<BaseTheme> &unfocused):
		AttentionTheme(win, focused, unfocused, focused)
	{}

	FbTk::ThemeProxy<BaseTheme> &attentionTheme() { return m_attention_theme; }
	const FbTk::ThemeProxy<BaseTheme> &attentionTheme() const { return m_attention_theme; }

	virtual BaseTheme &operator *() {
		return (m_win.getAttentionState() ? *m_attention_theme : FocusableTheme::());
	}
	virtual const BaseTheme &operator *() const {
		return (m_win.getAttentionState() ? *m_attention_theme : FocusableTheme::());
	}

private:
	FbTk::ThemeProxy<BaseTheme> &m_attention_theme;
};