diff options
author | fluxgen <fluxgen> | 2005-11-22 21:59:48 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2005-11-22 21:59:48 (GMT) |
commit | 4d77f7fbf188759a8feb50f51c1573b86b48663b (patch) | |
tree | 01bb47e65619c2f415087b777561e4d6369bcf77 /src/RootTheme.hh | |
parent | e62176913405f98fce84a19d63cb211c6cfc3713 (diff) | |
download | fluxbox-4d77f7fbf188759a8feb50f51c1573b86b48663b.zip fluxbox-4d77f7fbf188759a8feb50f51c1573b86b48663b.tar.bz2 |
new background style item, making rootCommand in styles obsolete
Diffstat (limited to 'src/RootTheme.hh')
-rw-r--r-- | src/RootTheme.hh | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/RootTheme.hh b/src/RootTheme.hh index dce9d31..c1ac060 100644 --- a/src/RootTheme.hh +++ b/src/RootTheme.hh | |||
@@ -26,21 +26,30 @@ | |||
26 | 26 | ||
27 | #include "FbTk/Theme.hh" | 27 | #include "FbTk/Theme.hh" |
28 | #include "FbTk/GContext.hh" | 28 | #include "FbTk/GContext.hh" |
29 | #include "FbTk/Texture.hh" | ||
29 | 30 | ||
30 | #include <X11/Xlib.h> | 31 | #include <X11/Xlib.h> |
31 | 32 | ||
32 | #include <string> | 33 | #include <string> |
33 | 34 | ||
35 | class BackgroundItem; | ||
36 | |||
37 | namespace FbTk { | ||
38 | class ResourceManager; | ||
39 | class ImageControl; | ||
40 | } | ||
34 | 41 | ||
35 | /// Contains border color, border size, bevel width and opGC for objects like geometry window in BScreen | 42 | /// Contains border color, border size, bevel width and opGC for objects like geometry window in BScreen |
36 | class RootTheme: public FbTk::Theme { | 43 | class RootTheme: public FbTk::Theme { |
37 | public: | 44 | public: |
38 | /// constructor | 45 | /// constructor |
39 | /// @param screen_num the screen number | 46 | /// @param resmanager resource manager for finding specific resources |
40 | /// @param screen_root_command the string to be executed override theme rootCommand | 47 | /// @param image_control for rendering background texture |
41 | RootTheme(int screen_num, std::string &screen_root_command); | 48 | RootTheme(const std::string &root_command, |
49 | FbTk::ImageControl &image_control); | ||
42 | ~RootTheme(); | 50 | ~RootTheme(); |
43 | 51 | ||
52 | bool fallback(FbTk::ThemeItem_base &item); | ||
44 | void reconfigTheme(); | 53 | void reconfigTheme(); |
45 | 54 | ||
46 | GC opGC() const { return m_opgc.gc(); } | 55 | GC opGC() const { return m_opgc.gc(); } |
@@ -55,10 +64,13 @@ public: | |||
55 | //!! TODO we should need this later | 64 | //!! TODO we should need this later |
56 | void lock(bool value) { m_lock = value; } | 65 | void lock(bool value) { m_lock = value; } |
57 | private: | 66 | private: |
58 | FbTk::ThemeItem<std::string> m_root_command; | 67 | BackgroundItem *m_background;///< background image/texture |
59 | std::string &m_screen_root_command; ///< string to execute and override theme rootCommand | ||
60 | FbTk::GContext m_opgc; | 68 | FbTk::GContext m_opgc; |
61 | bool m_lock; | 69 | const std::string &m_root_command; |
70 | FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture | ||
71 | bool m_lock; ///< reconfigure lock | ||
72 | bool m_background_loaded; ///< whether or not the background is present in the style file | ||
73 | |||
62 | }; | 74 | }; |
63 | 75 | ||
64 | #endif // ROOTTHEME_HH | 76 | #endif // ROOTTHEME_HH |