+RenderStyle *RenderStyle::style(int screen)
+{
+ assert(screen >= 0 && screen < ScreenCount(**display));
+ return _styles[screen];
+}
+
+bool RenderStyle::setStyle(int screen, const ustring &stylefile)
+{
+ RenderStyle *s = new RenderStyle();
+ if (!loadStyle(s, screen, stylefile)) {
+ delete s;
+ return false;
+ }
+ delete _styles[screen];
+ _styles[screen] = s;
+
+ std::list<StyleNotify*>::iterator it, end = _notifies[screen].end();
+ for (it = _notifies[screen].begin(); it != end; ++it)
+ (*it)->styleChanged(*s);
+ return true;
+}
+
+bool RenderStyle::loadStyle(RenderStyle *s, int screen,
+ const ustring &stylefile)
+{
+ s->_screen = screen;
+ s->_file = stylefile;
+// pick one..
+#define FIERON
+//#define MERRY
+
+#ifdef FIERON
+ s->_root_args = "#272a2f";
+
+ s->_text_color_focus = new RenderColor(screen, 0x272a2f);
+ s->_text_color_unfocus = new RenderColor(screen, 0x676869);
+
+ s->_button_color_focus = new RenderColor(screen, 0x96ba86);
+ s->_button_color_unfocus = new RenderColor(screen, 0x676869);
+
+ s->_frame_border_color = new RenderColor(screen, 0x181f24);
+ s->_frame_border_width = 1;
+
+ s->_client_border_color_focus = new RenderColor(screen, 0x858687);
+ s->_client_border_color_unfocus = new RenderColor(screen, 0x555657);
+ s->_client_border_width = 1;
+
+ s->_titlebar_focus = new RenderTexture(screen,
+ false,
+ RenderTexture::Flat,
+ RenderTexture::Bevel1,
+ false,
+ RenderTexture::Vertical,
+ false,
+ 0x858687,
+ 0x373a3f,
+ 0x0,
+ 0x0);
+ s->_titlebar_unfocus = new RenderTexture(screen,
+ false,
+ RenderTexture::Flat,
+ RenderTexture::Bevel1,
+ false,
+ RenderTexture::Vertical,
+ false,
+ 0x555657,
+ 0x171a1f,
+ 0x0,
+ 0x0);