diff options
author | fluxgen <fluxgen> | 2006-01-03 10:02:46 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2006-01-03 10:02:46 (GMT) |
commit | 7be5606abb88b44ea09613af5155b5f0cc8a3052 (patch) | |
tree | 7ae20c6a5b9fb7749593067672e2277848ab79d7 /src/FbTk/Theme.hh | |
parent | 56b8d7296c03b4a849d3e73df274e31a9bab825f (diff) | |
download | fluxbox_pavel-7be5606abb88b44ea09613af5155b5f0cc8a3052.zip fluxbox_pavel-7be5606abb88b44ea09613af5155b5f0cc8a3052.tar.bz2 |
using screen based vector for theme lists
Diffstat (limited to 'src/FbTk/Theme.hh')
-rw-r--r-- | src/FbTk/Theme.hh | 12 |
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 |
95 | class Theme { | 96 | class Theme { |
96 | public: | 97 | public: |
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 | ||
114 | private: | 117 | private: |
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 | */ |
126 | class ThemeManager { | 129 | class ThemeManager { |
127 | public: | 130 | public: |
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; |