diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-05 01:39:19 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-05 01:39:19 (GMT) |
commit | ac1bd7e0981222bf340ce7defb2bb8307d42a0a2 (patch) | |
tree | c8fb9c618184e7ac44f6138409cab3fab86b23e4 /src/GenericTool.hh | |
parent | 60ba709c2f47cc2c7b877aef1b0f297b097853e5 (diff) | |
download | fluxbox-ac1bd7e0981222bf340ce7defb2bb8307d42a0a2.zip fluxbox-ac1bd7e0981222bf340ce7defb2bb8307d42a0a2.tar.bz2 |
update code to use ThemeProxy
Diffstat (limited to 'src/GenericTool.hh')
-rw-r--r-- | src/GenericTool.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GenericTool.hh b/src/GenericTool.hh index 8f565a5..b64edcf 100644 --- a/src/GenericTool.hh +++ b/src/GenericTool.hh | |||
@@ -33,12 +33,14 @@ class ToolTheme; | |||
33 | 33 | ||
34 | namespace FbTk { | 34 | namespace FbTk { |
35 | class FbWindow; | 35 | class FbWindow; |
36 | template <class T> class ThemeProxy; | ||
36 | } | 37 | } |
37 | 38 | ||
38 | /// helper class for simple tools, i.e buttons etc | 39 | /// helper class for simple tools, i.e buttons etc |
39 | class GenericTool: public ToolbarItem, public FbTk::Observer, private FbTk::NotCopyable { | 40 | class GenericTool: public ToolbarItem, public FbTk::Observer, private FbTk::NotCopyable { |
40 | public: | 41 | public: |
41 | GenericTool(FbTk::FbWindow *new_window, ToolbarItem::Type type, ToolTheme &theme); | 42 | GenericTool(FbTk::FbWindow *new_window, ToolbarItem::Type type, |
43 | FbTk::ThemeProxy<ToolTheme> &theme); | ||
42 | virtual ~GenericTool(); | 44 | virtual ~GenericTool(); |
43 | void move(int x, int y); | 45 | void move(int x, int y); |
44 | void resize(unsigned int x, unsigned int y); | 46 | void resize(unsigned int x, unsigned int y); |
@@ -53,7 +55,7 @@ public: | |||
53 | 55 | ||
54 | void parentMoved(); | 56 | void parentMoved(); |
55 | 57 | ||
56 | const ToolTheme &theme() const { return m_theme; } | 58 | const FbTk::ThemeProxy<ToolTheme> &theme() const { return m_theme; } |
57 | FbTk::FbWindow &window() { return *m_window; } | 59 | FbTk::FbWindow &window() { return *m_window; } |
58 | const FbTk::FbWindow &window() const { return *m_window; } | 60 | const FbTk::FbWindow &window() const { return *m_window; } |
59 | 61 | ||
@@ -64,7 +66,7 @@ private: | |||
64 | void update(FbTk::Subject *subj); | 66 | void update(FbTk::Subject *subj); |
65 | 67 | ||
66 | std::auto_ptr<FbTk::FbWindow> m_window; | 68 | std::auto_ptr<FbTk::FbWindow> m_window; |
67 | ToolTheme &m_theme; | 69 | FbTk::ThemeProxy<ToolTheme> &m_theme; |
68 | }; | 70 | }; |
69 | 71 | ||
70 | #endif // GENERICTOOL_HH | 72 | #endif // GENERICTOOL_HH |