aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-07 10:26:32 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-07 10:26:32 (GMT)
commitdbfddf8e0bcf8e7abbba671eff64c9679332a774 (patch)
tree37cefce75eef2f7e0c749c3489008608e71dcd6c /src/IconButton.hh
parentac1bd7e0981222bf340ce7defb2bb8307d42a0a2 (diff)
downloadfluxbox-dbfddf8e0bcf8e7abbba671eff64c9679332a774.zip
fluxbox-dbfddf8e0bcf8e7abbba671eff64c9679332a774.tar.bz2
added new ThemeProxy for automatically handling focused vs. unfocused ThemeItems
Diffstat (limited to 'src/IconButton.hh')
-rw-r--r--src/IconButton.hh11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/IconButton.hh b/src/IconButton.hh
index a0cd82e..b80a29b 100644
--- a/src/IconButton.hh
+++ b/src/IconButton.hh
@@ -23,12 +23,13 @@
23#ifndef ICONBUTTON_HH 23#ifndef ICONBUTTON_HH
24#define ICONBUTTON_HH 24#define ICONBUTTON_HH
25 25
26#include "FocusableTheme.hh"
27
26#include "FbTk/CachedPixmap.hh" 28#include "FbTk/CachedPixmap.hh"
27#include "FbTk/FbPixmap.hh" 29#include "FbTk/FbPixmap.hh"
28#include "FbTk/Observer.hh" 30#include "FbTk/Observer.hh"
29#include "FbTk/TextButton.hh" 31#include "FbTk/TextButton.hh"
30 32
31class Focusable;
32class IconbarTheme; 33class IconbarTheme;
33 34
34namespace FbTk { 35namespace FbTk {
@@ -38,7 +39,9 @@ template <class T> class ThemeProxy;
38class IconButton: public FbTk::TextButton, public FbTk::Observer { 39class IconButton: public FbTk::TextButton, public FbTk::Observer {
39public: 40public:
40 IconButton(const FbTk::FbWindow &parent, 41 IconButton(const FbTk::FbWindow &parent,
41 FbTk::ThemeProxy<IconbarTheme> &theme, Focusable &window); 42 FbTk::ThemeProxy<IconbarTheme> &focused_theme,
43 FbTk::ThemeProxy<IconbarTheme> &unfocused_theme,
44 Focusable &window);
42 virtual ~IconButton(); 45 virtual ~IconButton();
43 46
44 void exposeEvent(XExposeEvent &event); 47 void exposeEvent(XExposeEvent &event);
@@ -71,9 +74,9 @@ private:
71 FbTk::FbPixmap m_icon_mask; 74 FbTk::FbPixmap m_icon_mask;
72 bool m_use_pixmap; 75 bool m_use_pixmap;
73 76
74 FbTk::ThemeProxy<IconbarTheme> &m_theme; 77 FocusableTheme<IconbarTheme> m_theme;
75 // cached pixmaps 78 // cached pixmaps
76 FbTk::CachedPixmap m_focused_pm, m_unfocused_pm; 79 FbTk::CachedPixmap m_pm;
77}; 80};
78 81
79#endif // ICONBUTTON_HH 82#endif // ICONBUTTON_HH