X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frenderstyle.hh;h=0f512148e94e6f503885b13528726a13b541680c;hb=739c958ac58154f8b1896113701e1c7f580d4cde;hp=697455337c9cae067952d92cf037016ff7a7f32c;hpb=99cd843fc6dc7a7f55b6c90fd1162f233853aad2;p=chaz%2Fopenbox diff --git a/otk/renderstyle.hh b/otk/renderstyle.hh index 69745533..0f512148 100644 --- a/otk/renderstyle.hh +++ b/otk/renderstyle.hh @@ -5,9 +5,10 @@ #include "rendertexture.hh" #include "rendercolor.hh" #include "font.hh" +#include "ustring.hh" -#include #include +#include namespace otk { @@ -34,6 +35,7 @@ public: static void registerNotify(int screen, StyleNotify *n); static void unregisterNotify(int screen, StyleNotify *n); static RenderStyle *style(int screen); + static bool setStyle(int screen, const ustring &stylefile); enum Justify { LeftTopJustify, @@ -42,10 +44,13 @@ public: }; private: + static bool loadStyle(RenderStyle *s, int screen, const ustring &stylefile); + static void defaultStyle(RenderStyle *s, int screen); + int _screen; - std::string _file; + ustring _file; - RenderColor *_root_color; + std::string _root_args; RenderColor *_text_color_focus; RenderColor *_text_color_unfocus; @@ -89,12 +94,11 @@ private: int _bevel_width; public: - RenderStyle(int screen, const std::string &stylefile); virtual ~RenderStyle(); inline int screen() const { return _screen; } - inline RenderColor *rootColor() const { return _root_color; } + inline const std::string& rootArgs() const { return _root_args; } inline RenderColor *textFocusColor() const { return _text_color_focus; } inline RenderColor *textUnfocusColor() const { return _text_color_unfocus; } @@ -150,4 +154,4 @@ public: } -#endif // __rendertexture_hh +#endif // __renderstyle_hh