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);
48 RenderColor *_root_color;
50 RenderColor *_text_color_focus;
51 RenderColor *_text_color_unfocus;
53 RenderColor *_button_color_focus;
54 RenderColor *_button_color_unfocus;
56 RenderColor *_frame_border_color;
57 int _frame_border_width;
59 RenderColor *_client_border_color_focus;
60 RenderColor *_client_border_color_unfocus;
61 int _client_border_width;
63 RenderTexture *_titlebar_focus;
64 RenderTexture *_titlebar_unfocus;
66 RenderTexture *_label_focus;
67 RenderTexture *_label_unfocus;
69 RenderTexture *_handle_focus;
70 RenderTexture *_handle_unfocus;
72 RenderTexture *_button_unpress_focus;
73 RenderTexture *_button_unpress_unfocus;
74 RenderTexture *_button_press_focus;
75 RenderTexture *_button_press_unfocus;
77 RenderTexture *_grip_focus;
78 RenderTexture *_grip_unfocus;
81 Justify _label_justify;
83 PixmapMask *_max_mask;
84 PixmapMask *_icon_mask;
85 PixmapMask *_alldesk_mask;
86 PixmapMask *_close_mask;
92 RenderStyle(int screen, const std::string &stylefile);
93 virtual ~RenderStyle();
95 inline int screen() const { return _screen; }
97 inline RenderColor *rootColor() const { return _root_color; }
99 inline RenderColor *textFocusColor() const { return _text_color_focus; }
100 inline RenderColor *textUnfocusColor() const { return _text_color_unfocus; }
102 inline RenderColor *buttonFocusColor() const { return _button_color_focus; }
103 inline RenderColor *buttonUnfocusColor() const
104 { return _button_color_unfocus; }
106 inline RenderColor *frameBorderColor() const { return _frame_border_color; }
107 inline int frameBorderWidth() const { return _frame_border_width; }
109 inline RenderColor *clientBorderFocusColor() const
110 { return _client_border_color_focus; }
111 inline RenderColor *clientBorderUnfocusColor() const
112 { return _client_border_color_unfocus; }
113 inline int clientBorderWidth() const { return _client_border_width; }
115 inline RenderTexture *titlebarFocusBackground() const
116 { return _titlebar_focus; }
117 inline RenderTexture *titlebarUnfocusBackground() const
118 { return _titlebar_unfocus; }
120 inline RenderTexture *labelFocusBackground() const { return _label_focus; }
121 inline RenderTexture *labelUnfocusBackground() const { return _label_unfocus;}
123 inline RenderTexture *handleFocusBackground() const { return _handle_focus; }
124 inline RenderTexture *handleUnfocusBackground() const
125 { return _handle_unfocus; }
127 inline RenderTexture *buttonUnpressFocusBackground() const
128 { return _button_unpress_focus; }
129 inline RenderTexture *buttonUnpressUnfocusBackground() const
130 { return _button_unpress_unfocus; }
131 inline RenderTexture *buttonPressFocusBackground() const
132 { return _button_press_focus; }
133 inline RenderTexture *buttonPressUnfocusBackground() const
134 { return _button_press_unfocus; }
136 inline RenderTexture *gripFocusBackground() const { return _grip_focus; }
137 inline RenderTexture *gripUnfocusBackground() const { return _grip_unfocus; }
139 inline Font *labelFont() const { return _label_font; }
140 inline Justify labelTextJustify() const { return _label_justify; }
142 inline PixmapMask *maximizeMask() const { return _max_mask; }
143 inline PixmapMask *iconifyMask() const { return _icon_mask; }
144 inline PixmapMask *alldesktopsMask() const { return _alldesk_mask; }
145 inline PixmapMask *closeMask() const { return _close_mask; }
147 inline int handleWidth() const { return _handle_width; }
148 inline int bevelWidth() const { return _bevel_width; }
153 #endif // __rendertexture_hh