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"
18 PixmapMask() { mask = None; w = h = 0; }
25 //! Called when the style is changed on the same screen as the handler.
26 virtual void styleChanged(const RenderStyle &) {}
30 static RenderStyle **_styles;
31 static std::list<StyleNotify*> *_notifies;
33 static void initialize();
34 static void destroy();
35 static void registerNotify(int screen, StyleNotify *n);
36 static void unregisterNotify(int screen, StyleNotify *n);
37 static RenderStyle *style(int screen);
38 static bool setStyle(int screen, const ustring &stylefile);
47 static bool loadStyle(RenderStyle *s, int screen, const ustring &stylefile);
48 static void defaultStyle(RenderStyle *s, int screen);
53 std::string _root_args;
55 RenderColor *_text_color_focus;
56 RenderColor *_text_color_unfocus;
58 RenderColor *_button_color_focus;
59 RenderColor *_button_color_unfocus;
61 RenderColor *_frame_border_color;
62 int _frame_border_width;
64 RenderColor *_client_border_color_focus;
65 RenderColor *_client_border_color_unfocus;
66 int _client_border_width;
68 RenderTexture *_titlebar_focus;
69 RenderTexture *_titlebar_unfocus;
71 RenderTexture *_label_focus;
72 RenderTexture *_label_unfocus;
74 RenderTexture *_handle_focus;
75 RenderTexture *_handle_unfocus;
77 RenderTexture *_button_unpress_focus;
78 RenderTexture *_button_unpress_unfocus;
79 RenderTexture *_button_press_focus;
80 RenderTexture *_button_press_unfocus;
82 RenderTexture *_grip_focus;
83 RenderTexture *_grip_unfocus;
86 Justify _label_justify;
88 PixmapMask *_max_mask;
89 PixmapMask *_icon_mask;
90 PixmapMask *_alldesk_mask;
91 PixmapMask *_close_mask;
97 virtual ~RenderStyle();
99 inline int screen() const { return _screen; }
101 inline const std::string& rootArgs() const { return _root_args; }
103 inline RenderColor *textFocusColor() const { return _text_color_focus; }
104 inline RenderColor *textUnfocusColor() const { return _text_color_unfocus; }
106 inline RenderColor *buttonFocusColor() const { return _button_color_focus; }
107 inline RenderColor *buttonUnfocusColor() const
108 { return _button_color_unfocus; }
110 inline RenderColor *frameBorderColor() const { return _frame_border_color; }
111 inline int frameBorderWidth() const { return _frame_border_width; }
113 inline RenderColor *clientBorderFocusColor() const
114 { return _client_border_color_focus; }
115 inline RenderColor *clientBorderUnfocusColor() const
116 { return _client_border_color_unfocus; }
117 inline int clientBorderWidth() const { return _client_border_width; }
119 inline RenderTexture *titlebarFocusBackground() const
120 { return _titlebar_focus; }
121 inline RenderTexture *titlebarUnfocusBackground() const
122 { return _titlebar_unfocus; }
124 inline RenderTexture *labelFocusBackground() const { return _label_focus; }
125 inline RenderTexture *labelUnfocusBackground() const { return _label_unfocus;}
127 inline RenderTexture *handleFocusBackground() const { return _handle_focus; }
128 inline RenderTexture *handleUnfocusBackground() const
129 { return _handle_unfocus; }
131 inline RenderTexture *buttonUnpressFocusBackground() const
132 { return _button_unpress_focus; }
133 inline RenderTexture *buttonUnpressUnfocusBackground() const
134 { return _button_unpress_unfocus; }
135 inline RenderTexture *buttonPressFocusBackground() const
136 { return _button_press_focus; }
137 inline RenderTexture *buttonPressUnfocusBackground() const
138 { return _button_press_unfocus; }
140 inline RenderTexture *gripFocusBackground() const { return _grip_focus; }
141 inline RenderTexture *gripUnfocusBackground() const { return _grip_unfocus; }
143 inline Font *labelFont() const { return _label_font; }
144 inline Justify labelTextJustify() const { return _label_justify; }
146 inline PixmapMask *maximizeMask() const { return _max_mask; }
147 inline PixmapMask *iconifyMask() const { return _icon_mask; }
148 inline PixmapMask *alldesktopsMask() const { return _alldesk_mask; }
149 inline PixmapMask *closeMask() const { return _close_mask; }
151 inline int handleWidth() const { return _handle_width; }
152 inline int bevelWidth() const { return _bevel_width; }
157 #endif // __renderstyle_hh