1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
5 #endif // HAVE_CONFIG_H
7 #include "renderstyle.hh"
9 #include "screeninfo.hh"
13 RenderStyle::RenderStyle(int screen
, const std::string
&stylefile
)
22 _root_color
= new RenderColor(_screen
, 0x272a2f);
24 _text_color_focus
= new RenderColor(_screen
, 0x272a2f);
25 _text_color_unfocus
= new RenderColor(_screen
, 0x676869);
27 _button_color_focus
= new RenderColor(_screen
, 0x96ba86);
28 _button_color_unfocus
= new RenderColor(_screen
, 0x676869);
30 _frame_border_color
= new RenderColor(_screen
, 0x181f24);
31 _frame_border_width
= 1;
33 _client_border_color_focus
= new RenderColor(_screen
, 0x858687);
34 _client_border_color_unfocus
= new RenderColor(_screen
, 0x555657);
35 _client_border_width
= 1;
37 _titlebar_focus
= new RenderTexture(_screen
,
40 RenderTexture::Bevel1
,
42 RenderTexture::Vertical
,
48 _titlebar_unfocus
= new RenderTexture(_screen
,
51 RenderTexture::Bevel1
,
53 RenderTexture::Vertical
,
60 _label_focus
= new RenderTexture(_screen
,
63 RenderTexture::Bevel1
,
65 RenderTexture::Vertical
,
71 _label_unfocus
= new RenderTexture(_screen
,
73 RenderTexture::Sunken
,
74 RenderTexture::Bevel1
,
76 RenderTexture::CrossDiagonal
,
84 _handle_focus
= new RenderTexture(_screen
,
87 RenderTexture::Bevel1
,
89 RenderTexture::Vertical
,
95 _handle_unfocus
= new RenderTexture(_screen
,
98 RenderTexture::Bevel1
,
100 RenderTexture::Vertical
,
108 _button_unpress_focus
= new RenderTexture(_screen
,
110 RenderTexture::Raised
,
111 RenderTexture::Bevel2
,
113 RenderTexture::CrossDiagonal
,
119 _button_unpress_unfocus
= new RenderTexture(_screen
,
121 RenderTexture::Raised
,
122 RenderTexture::Bevel2
,
124 RenderTexture::CrossDiagonal
,
131 _button_press_focus
= new RenderTexture(_screen
,
133 RenderTexture::Sunken
,
134 RenderTexture::Bevel2
,
136 RenderTexture::CrossDiagonal
,
142 _button_press_unfocus
= new RenderTexture(_screen
,
144 RenderTexture::Sunken
,
145 RenderTexture::Bevel2
,
147 RenderTexture::CrossDiagonal
,
154 _grip_focus
= new RenderTexture(_screen
,
157 RenderTexture::Bevel1
,
159 RenderTexture::Vertical
,
165 _grip_unfocus
= new RenderTexture(_screen
,
168 RenderTexture::Bevel1
,
170 RenderTexture::Vertical
,
177 _label_font
= new Font(_screen
, "Arial,Sans-9:bold", true, 1, 0x40);
178 _label_justify
= RightJustify
;
180 _max_mask
= new PixmapMask();
181 _max_mask
->w
= _max_mask
->h
= 8;
183 //char data[] = { 0x7e, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e };
184 char data
[] = {0x00, 0x00, 0x18, 0x3c, 0x66, 0x42, 0x00, 0x00 };
186 XCreateBitmapFromData(**display
,
187 display
->screenInfo(_screen
)->rootWindow(),
191 _icon_mask
= new PixmapMask();
192 _icon_mask
->w
= _icon_mask
->h
= 8;
194 //char data[] = { 0x00, 0x00, 0xc3, 0xe7, 0x7e, 0x3c, 0x18, 0x00 };
195 char data
[] = { 0x00, 0x00, 0x42, 0x66, 0x3c, 0x18, 0x00, 0x00 };
197 XCreateBitmapFromData(**display
,
198 display
->screenInfo(_screen
)->rootWindow(),
202 _alldesk_mask
= new PixmapMask();
203 _alldesk_mask
->w
= _alldesk_mask
->h
= 8;
205 //char data[] = { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 };
206 char data
[] = { 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00 };
207 _alldesk_mask
->mask
=
208 XCreateBitmapFromData(**display
,
209 display
->screenInfo(_screen
)->rootWindow(),
213 _close_mask
= new PixmapMask();
214 _close_mask
->w
= _close_mask
->h
= 8;
216 //char data[] = { 0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3 };
217 char data
[] = { 0x00, 0xc3, 0x66, 0x3c, 0x3c, 0x66, 0xc3, 0x00 };
219 XCreateBitmapFromData(**display
,
220 display
->screenInfo(_screen
)->rootWindow(),
228 _root_color
= new RenderColor(_screen
, 0x7b756a);
230 _text_color_focus
= new RenderColor(_screen
, 0xffffff);
231 _text_color_unfocus
= new RenderColor(_screen
, 0xffffff);
233 _button_color_focus
= new RenderColor(_screen
, 0x222222);
234 _button_color_unfocus
= new RenderColor(_screen
, 0x333333);
236 _frame_border_color
= new RenderColor(_screen
, 0x222222);
237 _frame_border_width
= 1;
239 _client_border_color_focus
= new RenderColor(_screen
, 0x858687);
240 _client_border_color_unfocus
= new RenderColor(_screen
, 0x555657);
241 _client_border_width
= 0;
243 _titlebar_focus
= new RenderTexture(_screen
,
246 RenderTexture::Bevel1
,
248 RenderTexture::Solid
,
254 _titlebar_unfocus
= new RenderTexture(_screen
,
257 RenderTexture::Bevel1
,
259 RenderTexture::Solid
,
266 _label_focus
= new RenderTexture(_screen
,
269 RenderTexture::Bevel1
,
271 RenderTexture::Solid
,
279 _label_unfocus
= new RenderTexture(_screen
,
282 RenderTexture::Bevel1
,
284 RenderTexture::Solid
,
292 _handle_focus
= new RenderTexture(_screen
,
295 RenderTexture::Bevel1
,
297 RenderTexture::Solid
,
303 _handle_unfocus
= new RenderTexture(_screen
,
306 RenderTexture::Bevel1
,
308 RenderTexture::Solid
,
316 _button_unpress_focus
= new RenderTexture(_screen
,
319 RenderTexture::Bevel1
,
321 RenderTexture::Solid
,
327 _button_unpress_unfocus
= new RenderTexture(_screen
,
330 RenderTexture::Bevel1
,
332 RenderTexture::Solid
,
339 _button_press_focus
= new RenderTexture(_screen
,
341 RenderTexture::Sunken
,
342 RenderTexture::Bevel1
,
344 RenderTexture::Solid
,
350 _button_press_unfocus
= new RenderTexture(_screen
,
352 RenderTexture::Sunken
,
353 RenderTexture::Bevel1
,
355 RenderTexture::Solid
,
362 _grip_focus
= new RenderTexture(_screen
,
365 RenderTexture::Bevel1
,
367 RenderTexture::Solid
,
373 _grip_unfocus
= new RenderTexture(_screen
,
376 RenderTexture::Bevel1
,
378 RenderTexture::Solid
,
385 _label_font
= new Font(_screen
, "Arial,Sans-8", true, 1, 0x3e);
386 _label_justify
= CenterJustify
;
388 _max_mask
= new PixmapMask();
389 _max_mask
->w
= _max_mask
->h
= 7;
391 char data
[] = {0x7c, 0x44, 0x47, 0x47, 0x7f, 0x1f, 0x1f };
393 XCreateBitmapFromData(**display
,
394 display
->screenInfo(_screen
)->rootWindow(),
398 _icon_mask
= new PixmapMask();
399 _icon_mask
->w
= _icon_mask
->h
= 7;
401 char data
[] = {0x00, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3e };
403 XCreateBitmapFromData(**display
,
404 display
->screenInfo(_screen
)->rootWindow(),
408 _alldesk_mask
= new PixmapMask();
409 _alldesk_mask
->w
= _alldesk_mask
->h
= 7;
411 char data
[] = {0x00, 0x36, 0x36, 0x00, 0x36, 0x36, 0x00 };
412 _alldesk_mask
->mask
=
413 XCreateBitmapFromData(**display
,
414 display
->screenInfo(_screen
)->rootWindow(),
418 _close_mask
= new PixmapMask();
419 _close_mask
->w
= _close_mask
->h
= 7;
421 char data
[] = { 0x22, 0x77, 0x3e, 0x1c, 0x3e, 0x77, 0x22 };
423 XCreateBitmapFromData(**display
,
424 display
->screenInfo(_screen
)->rootWindow(),
436 RenderStyle::~RenderStyle()
440 delete _text_color_focus
;
441 delete _text_color_unfocus
;
443 delete _button_color_focus
;
444 delete _button_color_unfocus
;
446 delete _frame_border_color
;
448 delete _client_border_color_focus
;
449 delete _client_border_color_unfocus
;
451 delete _titlebar_focus
;
452 delete _titlebar_unfocus
;
455 delete _label_unfocus
;
457 delete _handle_focus
;
458 delete _handle_unfocus
;
460 delete _button_unpress_focus
;
461 delete _button_unpress_unfocus
;
462 delete _button_press_focus
;
463 delete _button_press_unfocus
;
466 delete _grip_unfocus
;
472 delete _alldesk_mask
;