1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __renderstyle_hh
3 #define __renderstyle_hh
5 #include "rendertexture.hh"
6 #include "rendercolor.hh"
17 PixmapMask() { mask
= None
; w
= h
= 0; }
24 //! Called when the style is changed on the same screen as the handler.
25 virtual void styleChanged(const RenderStyle
&) {}
29 static RenderStyle
**_styles
;
30 static std::list
<StyleNotify
*> *_notifies
;
32 static void initialize();
33 static void destroy();
34 static void registerNotify(int screen
, StyleNotify
*n
);
35 static void unregisterNotify(int screen
, StyleNotify
*n
);
36 static RenderStyle
*style(int screen
);
37 static bool setStyle(int screen
, const ustring
&stylefile
);
46 static bool loadStyle(RenderStyle
*s
, int screen
, const ustring
&stylefile
);
47 static void defaultStyle(RenderStyle
*s
, int screen
);
52 RenderColor
*_root_color
;
54 RenderColor
*_text_color_focus
;
55 RenderColor
*_text_color_unfocus
;
57 RenderColor
*_button_color_focus
;
58 RenderColor
*_button_color_unfocus
;
60 RenderColor
*_frame_border_color
;
61 int _frame_border_width
;
63 RenderColor
*_client_border_color_focus
;
64 RenderColor
*_client_border_color_unfocus
;
65 int _client_border_width
;
67 RenderTexture
*_titlebar_focus
;
68 RenderTexture
*_titlebar_unfocus
;
70 RenderTexture
*_label_focus
;
71 RenderTexture
*_label_unfocus
;
73 RenderTexture
*_handle_focus
;
74 RenderTexture
*_handle_unfocus
;
76 RenderTexture
*_button_unpress_focus
;
77 RenderTexture
*_button_unpress_unfocus
;
78 RenderTexture
*_button_press_focus
;
79 RenderTexture
*_button_press_unfocus
;
81 RenderTexture
*_grip_focus
;
82 RenderTexture
*_grip_unfocus
;
85 Justify _label_justify
;
87 PixmapMask
*_max_mask
;
88 PixmapMask
*_icon_mask
;
89 PixmapMask
*_alldesk_mask
;
90 PixmapMask
*_close_mask
;
96 virtual ~RenderStyle();
98 inline int screen() const { return _screen
; }
100 inline RenderColor
*rootColor() const { return _root_color
; }
102 inline RenderColor
*textFocusColor() const { return _text_color_focus
; }
103 inline RenderColor
*textUnfocusColor() const { return _text_color_unfocus
; }
105 inline RenderColor
*buttonFocusColor() const { return _button_color_focus
; }
106 inline RenderColor
*buttonUnfocusColor() const
107 { return _button_color_unfocus
; }
109 inline RenderColor
*frameBorderColor() const { return _frame_border_color
; }
110 inline int frameBorderWidth() const { return _frame_border_width
; }
112 inline RenderColor
*clientBorderFocusColor() const
113 { return _client_border_color_focus
; }
114 inline RenderColor
*clientBorderUnfocusColor() const
115 { return _client_border_color_unfocus
; }
116 inline int clientBorderWidth() const { return _client_border_width
; }
118 inline RenderTexture
*titlebarFocusBackground() const
119 { return _titlebar_focus
; }
120 inline RenderTexture
*titlebarUnfocusBackground() const
121 { return _titlebar_unfocus
; }
123 inline RenderTexture
*labelFocusBackground() const { return _label_focus
; }
124 inline RenderTexture
*labelUnfocusBackground() const { return _label_unfocus
;}
126 inline RenderTexture
*handleFocusBackground() const { return _handle_focus
; }
127 inline RenderTexture
*handleUnfocusBackground() const
128 { return _handle_unfocus
; }
130 inline RenderTexture
*buttonUnpressFocusBackground() const
131 { return _button_unpress_focus
; }
132 inline RenderTexture
*buttonUnpressUnfocusBackground() const
133 { return _button_unpress_unfocus
; }
134 inline RenderTexture
*buttonPressFocusBackground() const
135 { return _button_press_focus
; }
136 inline RenderTexture
*buttonPressUnfocusBackground() const
137 { return _button_press_unfocus
; }
139 inline RenderTexture
*gripFocusBackground() const { return _grip_focus
; }
140 inline RenderTexture
*gripUnfocusBackground() const { return _grip_unfocus
; }
142 inline Font
*labelFont() const { return _label_font
; }
143 inline Justify
labelTextJustify() const { return _label_justify
; }
145 inline PixmapMask
*maximizeMask() const { return _max_mask
; }
146 inline PixmapMask
*iconifyMask() const { return _icon_mask
; }
147 inline PixmapMask
*alldesktopsMask() const { return _alldesk_mask
; }
148 inline PixmapMask
*closeMask() const { return _close_mask
; }
150 inline int handleWidth() const { return _handle_width
; }
151 inline int bevelWidth() const { return _bevel_width
; }
156 #endif // __rendertexture_hh