aboutsummaryrefslogtreecommitdiff
path: root/src/GenericTool.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/GenericTool.hh')
-rw-r--r--src/GenericTool.hh8
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
34namespace FbTk { 34namespace FbTk {
35class FbWindow; 35class FbWindow;
36template <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
39class GenericTool: public ToolbarItem, public FbTk::Observer, private FbTk::NotCopyable { 40class GenericTool: public ToolbarItem, public FbTk::Observer, private FbTk::NotCopyable {
40public: 41public:
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