]> Dogcows Code - chaz/openbox/blob - otk/renderstyle.hh
remove the word "sticky" from everywhere, and replace with "all desktops". change...
[chaz/openbox] / otk / renderstyle.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __renderstyle_hh
3 #define __renderstyle_hh
4
5 #include "rendertexture.hh"
6 #include "rendercolor.hh"
7 #include "font.hh"
8
9 #include <string>
10
11 namespace otk {
12
13 struct PixmapMask {
14 Pixmap mask;
15 unsigned int w, h;
16 PixmapMask() { mask = None; w = h = 0; }
17 };
18
19 class RenderStyle {
20 public:
21 enum TextJustify {
22 LeftJustify,
23 RightJustify,
24 CenterJustify
25 };
26
27 private:
28 int _screen;
29 std::string _file;
30
31 RenderColor *_text_color_focus;
32 RenderColor *_text_color_unfocus;
33
34 RenderColor *_button_color_focus;
35 RenderColor *_button_color_unfocus;
36
37 RenderColor *_frame_border_color;
38 int _frame_border_width;
39
40 RenderColor *_client_border_color_focus;
41 RenderColor *_client_border_color_unfocus;
42 int _client_border_width;
43
44 RenderTexture *_titlebar_focus;
45 RenderTexture *_titlebar_unfocus;
46
47 RenderTexture *_label_focus;
48 RenderTexture *_label_unfocus;
49
50 RenderTexture *_handle_focus;
51 RenderTexture *_handle_unfocus;
52
53 RenderTexture *_button_unpress_focus;
54 RenderTexture *_button_unpress_unfocus;
55 RenderTexture *_button_press_focus;
56 RenderTexture *_button_press_unfocus;
57
58 RenderTexture *_grip_focus;
59 RenderTexture *_grip_unfocus;
60
61 Font *_label_font;
62 TextJustify _label_justify;
63
64 PixmapMask *_max_mask;
65 PixmapMask *_icon_mask;
66 PixmapMask *_alldesk_mask;
67 PixmapMask *_close_mask;
68
69 int _handle_width;
70 int _bevel_width;
71
72 public:
73 RenderStyle(int screen, const std::string &stylefile);
74 virtual ~RenderStyle();
75
76 inline int screen() const { return _screen; }
77
78 inline RenderColor *textFocusColor() const { return _text_color_focus; }
79 inline RenderColor *textUnfocusColor() const { return _text_color_unfocus; }
80
81 inline RenderColor *buttonFocusColor() const { return _button_color_focus; }
82 inline RenderColor *buttonUnfocusColor() const
83 { return _button_color_unfocus; }
84
85 inline RenderColor *frameBorderColor() const { return _frame_border_color; }
86 inline int frameBorderWidth() const { return _frame_border_width; }
87
88 inline RenderColor *clientBorderFocusColor() const
89 { return _client_border_color_focus; }
90 inline RenderColor *clientBorderUnfocusColor() const
91 { return _client_border_color_unfocus; }
92 inline int clientBorderWidth() const { return _client_border_width; }
93
94 inline RenderTexture *titlebarFocusBackground() const
95 { return _titlebar_focus; }
96 inline RenderTexture *titlebarUnfocusBackground() const
97 { return _titlebar_unfocus; }
98
99 inline RenderTexture *labelFocusBackground() const { return _label_focus; }
100 inline RenderTexture *labelUnfocusBackground() const { return _label_unfocus;}
101
102 inline RenderTexture *handleFocusBackground() const { return _handle_focus; }
103 inline RenderTexture *handleUnfocusBackground() const
104 { return _handle_unfocus; }
105
106 inline RenderTexture *buttonUnpressFocusBackground() const
107 { return _button_unpress_focus; }
108 inline RenderTexture *buttonUnpressUnfocusBackground() const
109 { return _button_unpress_unfocus; }
110 inline RenderTexture *buttonPressFocusBackground() const
111 { return _button_press_focus; }
112 inline RenderTexture *buttonPressUnfocusBackground() const
113 { return _button_press_unfocus; }
114
115 inline RenderTexture *gripFocusBackground() const { return _grip_focus; }
116 inline RenderTexture *gripUnfocusBackground() const { return _grip_unfocus; }
117
118 inline Font *labelFont() const { return _label_font; }
119 inline TextJustify labelTextJustify() const { return _label_justify; }
120
121 inline PixmapMask *maximizeMask() const { return _max_mask; }
122 inline PixmapMask *iconifyMask() const { return _icon_mask; }
123 inline PixmapMask *alldesktopsMask() const { return _alldesk_mask; }
124 inline PixmapMask *closeMask() const { return _close_mask; }
125
126 inline int handleWidth() const { return _handle_width; }
127 inline int bevelWidth() const { return _bevel_width; }
128 };
129
130 }
131
132 #endif // __rendertexture_hh
This page took 0.039222 seconds and 5 git commands to generate.