aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Theme.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Theme.hh')
-rw-r--r--src/FbTk/Theme.hh12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh
index c5d8e36..aeef4f1 100644
--- a/src/FbTk/Theme.hh
+++ b/src/FbTk/Theme.hh
@@ -30,6 +30,7 @@
30 30
31#include <string> 31#include <string>
32#include <list> 32#include <list>
33#include <vector>
33#include <string> 34#include <string>
34 35
35#include "XrmDatabaseHelper.hh" 36#include "XrmDatabaseHelper.hh"
@@ -94,6 +95,8 @@ private:
94/// Hold ThemeItems. Use this to create a Theme set 95/// Hold ThemeItems. Use this to create a Theme set
95class Theme { 96class Theme {
96public: 97public:
98 typedef std::list<ThemeItem_base *> ItemList;
99
97 explicit Theme(int screen_num); // create a theme for a specific screen 100 explicit Theme(int screen_num); // create a theme for a specific screen
98 virtual ~Theme(); 101 virtual ~Theme();
99 virtual void reconfigTheme() = 0; 102 virtual void reconfigTheme() = 0;
@@ -113,7 +116,7 @@ public:
113 116
114private: 117private:
115 const int m_screen_num; 118 const int m_screen_num;
116 typedef std::list<ThemeItem_base *> ItemList; 119
117 ItemList m_themeitems; 120 ItemList m_themeitems;
118 FbTk::Subject m_reconfig_sig; 121 FbTk::Subject m_reconfig_sig;
119}; 122};
@@ -125,6 +128,9 @@ private:
125*/ 128*/
126class ThemeManager { 129class ThemeManager {
127public: 130public:
131 typedef std::list<FbTk::Theme *> ThemeList;
132 typedef std::vector<ThemeList> ScreenThemeVector;
133
128 static ThemeManager &instance(); 134 static ThemeManager &instance();
129 /// load style file "filename" to screen 135 /// load style file "filename" to screen
130 bool load(const std::string &filename, const std::string &overlay_filename, int screen_num = -1); 136 bool load(const std::string &filename, const std::string &overlay_filename, int screen_num = -1);
@@ -150,8 +156,8 @@ private:
150 /// @return false if theme isn't registred in the manager 156 /// @return false if theme isn't registred in the manager
151 bool unregisterTheme(FbTk::Theme &tm); 157 bool unregisterTheme(FbTk::Theme &tm);
152 /// map each theme manager to a screen 158 /// map each theme manager to a screen
153 typedef std::list<FbTk::Theme *> ThemeList; 159
154 ThemeList m_themelist; 160 ScreenThemeVector m_themes;
155 int m_max_screens; 161 int m_max_screens;
156 XrmDatabaseHelper m_database; 162 XrmDatabaseHelper m_database;
157 bool m_verbose; 163 bool m_verbose;