aboutsummaryrefslogtreecommitdiff
path: root/src/RootTheme.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/RootTheme.hh')
-rw-r--r--src/RootTheme.hh24
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
35class BackgroundItem;
36
37namespace FbTk {
38class ResourceManager;
39class 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
36class RootTheme: public FbTk::Theme { 43class RootTheme: public FbTk::Theme {
37public: 44public:
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; }
57private: 66private:
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