diff options
Diffstat (limited to 'src/IconButton.hh')
-rw-r--r-- | src/IconButton.hh | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/IconButton.hh b/src/IconButton.hh index b8a7ef0..dc8203b 100644 --- a/src/IconButton.hh +++ b/src/IconButton.hh | |||
@@ -25,17 +25,18 @@ | |||
25 | #ifndef ICONBUTTON_HH | 25 | #ifndef ICONBUTTON_HH |
26 | #define ICONBUTTON_HH | 26 | #define ICONBUTTON_HH |
27 | 27 | ||
28 | #include "FbTk/CachedPixmap.hh" | ||
28 | #include "FbTk/FbPixmap.hh" | 29 | #include "FbTk/FbPixmap.hh" |
29 | #include "FbTk/Observer.hh" | 30 | #include "FbTk/Observer.hh" |
30 | #include "FbTk/TextButton.hh" | 31 | #include "FbTk/TextButton.hh" |
31 | 32 | ||
32 | class FluxboxWindow; | 33 | class Focusable; |
33 | class IconbarTool; | 34 | class IconbarTheme; |
34 | 35 | ||
35 | class IconButton: public FbTk::TextButton, public FbTk::Observer { | 36 | class IconButton: public FbTk::TextButton, public FbTk::Observer { |
36 | public: | 37 | public: |
37 | IconButton(const IconbarTool& tool, const FbTk::FbWindow &parent, | 38 | IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme, |
38 | FbTk::Font &font, FluxboxWindow &window); | 39 | Focusable &window); |
39 | virtual ~IconButton(); | 40 | virtual ~IconButton(); |
40 | 41 | ||
41 | void exposeEvent(XExposeEvent &event); | 42 | void exposeEvent(XExposeEvent &event); |
@@ -47,11 +48,13 @@ public: | |||
47 | unsigned int width, unsigned int height); | 48 | unsigned int width, unsigned int height); |
48 | void resize(unsigned int width, unsigned int height); | 49 | void resize(unsigned int width, unsigned int height); |
49 | 50 | ||
51 | void reconfigTheme(); | ||
52 | |||
50 | void update(FbTk::Subject *subj); | 53 | void update(FbTk::Subject *subj); |
51 | void setPixmap(bool use); | 54 | void setPixmap(bool use); |
52 | 55 | ||
53 | FluxboxWindow &win() { return m_win; } | 56 | Focusable &win() { return m_win; } |
54 | const FluxboxWindow &win() const { return m_win; } | 57 | const Focusable &win() const { return m_win; } |
55 | 58 | ||
56 | bool setOrientation(FbTk::Orientation orient); | 59 | bool setOrientation(FbTk::Orientation orient); |
57 | 60 | ||
@@ -60,11 +63,15 @@ protected: | |||
60 | private: | 63 | private: |
61 | void setupWindow(); | 64 | void setupWindow(); |
62 | 65 | ||
63 | FluxboxWindow &m_win; | 66 | Focusable &m_win; |
64 | FbTk::FbWindow m_icon_window; | 67 | FbTk::FbWindow m_icon_window; |
65 | FbTk::FbPixmap m_icon_pixmap; | 68 | FbTk::FbPixmap m_icon_pixmap; |
66 | FbTk::FbPixmap m_icon_mask; | 69 | FbTk::FbPixmap m_icon_mask; |
67 | bool m_use_pixmap; | 70 | bool m_use_pixmap; |
71 | |||
72 | IconbarTheme &m_theme; | ||
73 | // cached pixmaps | ||
74 | FbTk::CachedPixmap m_focused_pm, m_unfocused_pm; | ||
68 | }; | 75 | }; |
69 | 76 | ||
70 | #endif // ICONBUTTON_HH | 77 | #endif // ICONBUTTON_HH |