From 059bc4dc24b68d637c3608c05344c53c64cc2c4b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 14 Feb 2003 03:04:23 +0000 Subject: add a Config class with config data from the scripts. set up the functions for loading a style from a file. use the Config class throughout instead of reading out of the python namespace all the time. --- otk/renderstyle.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'otk/renderstyle.hh') diff --git a/otk/renderstyle.hh b/otk/renderstyle.hh index 69745533..69c26a7f 100644 --- a/otk/renderstyle.hh +++ b/otk/renderstyle.hh @@ -5,8 +5,8 @@ #include "rendertexture.hh" #include "rendercolor.hh" #include "font.hh" +#include "ustring.hh" -#include #include namespace otk { @@ -34,6 +34,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,8 +43,11 @@ 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; @@ -89,7 +93,6 @@ private: int _bevel_width; public: - RenderStyle(int screen, const std::string &stylefile); virtual ~RenderStyle(); inline int screen() const { return _screen; } -- cgit v1.2.3