]> Dogcows Code - chaz/openbox/blobdiff - otk/renderstyle.cc
new render system in effect. now ot make it look right
[chaz/openbox] / otk / renderstyle.cc
index 22622931de7cc8579fbc4b595ab0022f3229b92b..7e8b6446539b5eb5351e172a6dc3bac3cd08773b 100644 (file)
@@ -5,6 +5,8 @@
 #endif // HAVE_CONFIG_H
 
 #include "renderstyle.hh"
+#include "display.hh"
+#include "screeninfo.hh"
 
 namespace otk {
 
@@ -166,6 +168,50 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile)
                                     0x0);
 
   _label_font = new Font(_screen, "Arial,Sans-9:bold", true, 1, 0x40);
+  _label_justify = RightJustify;
+
+  _max_mask = new PixmapMask();
+  _max_mask->w = _max_mask->h = 8;
+  {
+    char data[] = { 0x7e, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e };
+    _max_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
+  }
+
+  _icon_mask = new PixmapMask();
+  _icon_mask->w = _icon_mask->h = 8;
+  {
+    char data[] = { 0x00, 0x00, 0xc3, 0xe7, 0x7e, 0x3c, 0x18, 0x00 };
+    _icon_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
+  }
+  
+  _stick_mask = new PixmapMask();
+  _stick_mask->w = _stick_mask->h = 8;
+  {
+    char data[] = { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 };
+    _icon_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
+  }
+  
+  _close_mask = new PixmapMask();
+  _close_mask->w = _close_mask->h = 8;
+  {
+    char data[] = { 0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3 };
+    _icon_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
+  }
+
+  _bevel_width = 1;
+  _handle_width = 4;
 }
 
 RenderStyle::~RenderStyle()
@@ -199,6 +245,11 @@ RenderStyle::~RenderStyle()
   delete _grip_unfocus;
 
   delete _label_font;
+
+  delete _max_mask;
+  delete _icon_mask;
+  delete _stick_mask;
+  delete _close_mask;
 }
 
 }
This page took 0.020754 seconds and 4 git commands to generate.