]> Dogcows Code - chaz/openbox/blob - otk/renderstyle.hh
c23d45aada0c07b9930b60cc0745978cc052aa58
[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 class RenderStyle {
14 public:
15 enum TextJustify {
16 LeftJustify,
17 RightJustify,
18 CenterJustify
19 };
20
21 private:
22 int _screen;
23 std::string _file;
24
25 RenderColor *_text_color_focus;
26 RenderColor *_text_color_unfocus;
27
28 RenderColor *_button_color_focus;
29 RenderColor *_button_color_unfocus;
30
31 RenderColor *_frame_border_color;
32 int _frame_border_width;
33
34 RenderColor *_client_border_color_focus;
35 RenderColor *_client_border_color_unfocus;
36 int _client_border_width;
37
38 RenderTexture *_titlebar_focus;
39 RenderTexture *_titlebar_unfocus;
40
41 RenderTexture *_label_focus;
42 RenderTexture *_label_unfocus;
43
44 RenderTexture *_handle_focus;
45 RenderTexture *_handle_unfocus;
46
47 RenderTexture *_button_unpress_focus;
48 RenderTexture *_button_unpress_unfocus;
49 RenderTexture *_button_press_focus;
50 RenderTexture *_button_press_unfocus;
51
52 RenderTexture *_grip_focus;
53 RenderTexture *_grip_unfocus;
54
55 Font *_label_font;
56 TextJustify _label_justify;
57
58 int _handle_width;
59 int _bevel_width;
60
61 public:
62 RenderStyle(int screen, const std::string &stylefile);
63 virtual ~RenderStyle();
64
65 inline RenderColor *textFocusColor() const { return _text_color_focus; }
66 inline RenderColor *textUnfocusColor() const { return _text_color_unfocus; }
67
68 inline RenderColor *buttonFocusColor() const { return _button_color_focus; }
69 inline RenderColor *buttonUnfocusColor() const
70 { return _button_color_unfocus; }
71
72 inline RenderColor *frameBorderColor() const { return _frame_border_color; }
73 inline int frameBorderWidth() const { return _frame_border_width; }
74
75 inline RenderColor *clientBorderFocusColor() const
76 { return _client_border_color_focus; }
77 inline RenderColor *clientBorderUnfocusColor() const
78 { return _client_border_color_unfocus; }
79 inline int clientBorderWidth() const { return _client_border_width; }
80
81 inline RenderTexture *titlebarFocusBackground() const
82 { return _titlebar_focus; }
83 inline RenderTexture *titlebarUnfocusBackground() const
84 { return _titlebar_unfocus; }
85
86 inline RenderTexture *labelFocusBackground() const { return _label_focus; }
87 inline RenderTexture *labelUnfocusBackground() const { return _label_unfocus;}
88
89 inline RenderTexture *handleFocusBackground() const { return _handle_focus; }
90 inline RenderTexture *handleUnfocusBackground() const
91 { return _handle_unfocus; }
92
93 inline RenderTexture *buttonUnpressFocusBackground() const
94 { return _button_unpress_focus; }
95 inline RenderTexture *buttonUnpressUnfocusBackground() const
96 { return _button_unpress_unfocus; }
97 inline RenderTexture *buttonPressFocusBackground() const
98 { return _button_press_focus; }
99 inline RenderTexture *buttonPressUnfocusBackgrounf() const
100 { return _button_press_unfocus; }
101
102 inline RenderTexture *gripdFocusBackground() const { return _grip_focus; }
103 inline RenderTexture *gripUnfocusBackground() const { return _grip_unfocus; }
104
105 inline Font *labelFont() const { return _label_font; }
106 inline TextJustify labelTextJustify() const { return _label_justify; }
107
108 inline int handleWidth() const { return _handle_width; }
109 inline int bevelWidth() const { return _bevel_width; }
110 };
111
112 }
113
114 #endif // __rendertexture_hh
This page took 0.074558 seconds and 4 git commands to generate.