00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef TOOLFACTORY_HH
00025 #define TOOLFACTORY_HH
00026
00027 #include "ToolTheme.hh"
00028 #include "IconbarTheme.hh"
00029
00030 #include "FbTk/NotCopyable.hh"
00031
00032 class ToolbarItem;
00033 class BScreen;
00034 class Toolbar;
00035
00036 namespace FbTk {
00037 class FbWindow;
00038 };
00039
00041 class ToolFactory:private FbTk::NotCopyable {
00042 public:
00043 explicit ToolFactory(BScreen &screen);
00044 virtual ~ToolFactory() { }
00045
00046 ToolbarItem *create(const std::string &name, const FbTk::FbWindow &parent, Toolbar &tbar);
00047 void updateThemes();
00048 int maxFontHeight() const;
00049 inline const BScreen &screen() const { return m_screen; }
00050 inline BScreen &screen() { return m_screen; }
00051
00052 private:
00053 BScreen &m_screen;
00054 ToolTheme m_clock_theme;
00055 std::auto_ptr<ToolTheme> m_button_theme, m_workspace_theme;
00056 IconbarTheme m_iconbar_theme;
00057 };
00058
00059 #endif // TOOLFACTORY_HH