aboutsummaryrefslogtreecommitdiff
path: root/src/Theme.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2002-12-01 13:42:15 (GMT)
committerrathnor <rathnor>2002-12-01 13:42:15 (GMT)
commit28b5c604490094e187494dcc566bd3d7a05a2c25 (patch)
tree8f78f5714a5cd055c10b067a2656fe7b2338e71a /src/Theme.hh
parentb9134162f9633784d9097df18769a699a62650fe (diff)
downloadfluxbox-28b5c604490094e187494dcc566bd3d7a05a2c25.zip
fluxbox-28b5c604490094e187494dcc566bd3d7a05a2c25.tar.bz2
Indenting from tabs to emacs 4-space
Diffstat (limited to 'src/Theme.hh')
-rw-r--r--src/Theme.hh184
1 files changed, 92 insertions, 92 deletions
diff --git a/src/Theme.hh b/src/Theme.hh
index 19c709e..2eae595 100644
--- a/src/Theme.hh
+++ b/src/Theme.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Theme.hh,v 1.20 2002/11/30 20:57:35 fluxgen Exp $ 25// $Id: Theme.hh,v 1.21 2002/12/01 13:42:00 rathnor Exp $
26 26
27#ifndef THEME_HH 27#ifndef THEME_HH
28#define THEME_HH 28#define THEME_HH
@@ -44,113 +44,113 @@
44class Theme { 44class Theme {
45public: 45public:
46 46
47 Theme(Display *display, Window rootwindow, Colormap colormap, 47 Theme(Display *display, Window rootwindow, Colormap colormap,
48 int screennum, const char *filename, const char *rootcommand); 48 int screennum, const char *filename, const char *rootcommand);
49 ~Theme(); 49 ~Theme();
50 50
51 51
52 typedef struct MenuStyle { 52 typedef struct MenuStyle {
53 MenuStyle():titlefont("fixed"), 53 MenuStyle():titlefont("fixed"),
54 framefont("fixed") { } 54 framefont("fixed") { }
55 FbTk::Color t_text, f_text, h_text, d_text; 55 FbTk::Color t_text, f_text, h_text, d_text;
56 FbTk::Texture title, frame, hilite; 56 FbTk::Texture title, frame, hilite;
57 GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc; 57 GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc;
58 FbTk::Font titlefont, framefont; 58 FbTk::Font titlefont, framefont;
59 DrawUtil::Font::FontJustify framefont_justify; 59 DrawUtil::Font::FontJustify framefont_justify;
60 DrawUtil::Font::FontJustify titlefont_justify; 60 DrawUtil::Font::FontJustify titlefont_justify;
61 int bullet, bullet_pos; 61 int bullet, bullet_pos;
62 } MenuStyle; 62 } MenuStyle;
63 63
64 typedef struct LabelStyle { 64 typedef struct LabelStyle {
65 LabelStyle(const char *fontname="fixed"):font(fontname) { } 65 LabelStyle(const char *fontname="fixed"):font(fontname) { }
66 66
67 FbTk::Texture l_focus, l_unfocus, 67 FbTk::Texture l_focus, l_unfocus,
68 t_focus, t_unfocus; 68 t_focus, t_unfocus;
69 GC l_text_focus_gc, l_text_unfocus_gc; 69 GC l_text_focus_gc, l_text_unfocus_gc;
70 FbTk::Font font; 70 FbTk::Font font;
71 DrawUtil::Font::FontJustify justify; 71 DrawUtil::Font::FontJustify justify;
72 FbTk::Color l_text_focus, l_text_unfocus; 72 FbTk::Color l_text_focus, l_text_unfocus;
73 } LabelStyle; 73 } LabelStyle;
74 74
75 75
76 typedef struct WindowStyle:public LabelStyle { 76 typedef struct WindowStyle:public LabelStyle {
77 FbTk::Color f_focus, f_unfocus, b_pic_focus, 77 FbTk::Color f_focus, f_unfocus, b_pic_focus,
78 b_pic_unfocus; 78 b_pic_unfocus;
79 FbTk::Texture h_focus, h_unfocus, 79 FbTk::Texture h_focus, h_unfocus,
80 b_focus, b_unfocus, b_pressed, g_focus, g_unfocus; 80 b_focus, b_unfocus, b_pressed, g_focus, g_unfocus;
81 GC b_pic_focus_gc, b_pic_unfocus_gc; 81 GC b_pic_focus_gc, b_pic_unfocus_gc;
82 82
83 struct t_tab:public LabelStyle { 83 struct t_tab:public LabelStyle {
84 FbTk::Color border_color; 84 FbTk::Color border_color;
85 unsigned int border_width; 85 unsigned int border_width;
86 unsigned int border_width_2x; 86 unsigned int border_width_2x;
87 } tab; 87 } tab;
88 88
89 } WindowStyle; 89 } WindowStyle;
90 90
91 91
92 typedef struct ToolbarStyle { 92 typedef struct ToolbarStyle {
93 ToolbarStyle():font("fixed") { } // default font 'fixed' 93 ToolbarStyle():font("fixed") { } // default font 'fixed'
94 FbTk::Color l_text, w_text, c_text, b_pic; 94 FbTk::Color l_text, w_text, c_text, b_pic;
95 FbTk::Texture toolbar, label, window, button, pressed, clock; 95 FbTk::Texture toolbar, label, window, button, pressed, clock;
96 GC l_text_gc, w_text_gc, c_text_gc, b_pic_gc; 96 GC l_text_gc, w_text_gc, c_text_gc, b_pic_gc;
97 FbTk::Font font; 97 FbTk::Font font;
98 DrawUtil::Font::FontJustify justify; 98 DrawUtil::Font::FontJustify justify;
99 } ToolbarStyle; 99 } ToolbarStyle;
100 100
101 inline WindowStyle &getWindowStyle() { return m_windowstyle; } 101 inline WindowStyle &getWindowStyle() { return m_windowstyle; }
102 inline MenuStyle &getMenuStyle() { return m_menustyle; } 102 inline MenuStyle &getMenuStyle() { return m_menustyle; }
103 inline ToolbarStyle &getToolbarStyle() { return m_toolbarstyle; } 103 inline ToolbarStyle &getToolbarStyle() { return m_toolbarstyle; }
104 inline const FbTk::Texture &getSlitTexture() const { return m_slit_texture; } 104 inline const FbTk::Texture &getSlitTexture() const { return m_slit_texture; }
105 inline unsigned int getBevelWidth() const { return m_bevel_width; } 105 inline unsigned int getBevelWidth() const { return m_bevel_width; }
106 inline unsigned int getBorderWidth() const { return m_border_width; } 106 inline unsigned int getBorderWidth() const { return m_border_width; }
107 inline unsigned int getHandleWidth() const { return m_handle_width; } 107 inline unsigned int getHandleWidth() const { return m_handle_width; }
108 inline unsigned int getFrameWidth() const { return m_frame_width; } 108 inline unsigned int getFrameWidth() const { return m_frame_width; }
109 inline GC getOpGC() const { return m_opgc; } 109 inline GC getOpGC() const { return m_opgc; }
110 inline const FbTk::Color &getBorderColor() const { return m_border_color; } 110 inline const FbTk::Color &getBorderColor() const { return m_border_color; }
111 void load(const char *filename); 111 void load(const char *filename);
112 void reconfigure(bool antialias = false); 112 void reconfigure(bool antialias = false);
113 113
114 inline void setRootCommand(const std::string &command) { m_rootcommand = command; } 114 inline void setRootCommand(const std::string &command) { m_rootcommand = command; }
115 115
116 116
117 117
118private: 118private:
119 119
120 void loadMenuStyle(); 120 void loadMenuStyle();
121 void loadWindowStyle(); 121 void loadWindowStyle();
122 void loadTabStyle(); 122 void loadTabStyle();
123 void loadToolbarStyle(); 123 void loadToolbarStyle();
124 void loadRootCommand(); 124 void loadRootCommand();
125 void loadMisc(); 125 void loadMisc();
126 void freeMenuStyle(); 126 void freeMenuStyle();
127 void freeWindowStyle(); 127 void freeWindowStyle();
128 void freeTabStyle(); 128 void freeTabStyle();
129 void freeToolbarStyle(); 129 void freeToolbarStyle();
130 void loadFontFromDatabase(FbTk::Font &dest, const char *name, const char *altname); 130 void loadFontFromDatabase(FbTk::Font &dest, const char *name, const char *altname);
131 bool readDatabaseTexture(char *, char *, FbTk::Texture *, unsigned long); 131 bool readDatabaseTexture(char *, char *, FbTk::Texture *, unsigned long);
132 bool readDatabaseColor(char *, char *, FbTk::Color *, unsigned long); 132 bool readDatabaseColor(char *, char *, FbTk::Color *, unsigned long);
133 133
134 void readDatabaseFontSet(char *, char *, XFontSet *); 134 void readDatabaseFontSet(char *, char *, XFontSet *);
135 XFontSet createFontSet(char *); 135 XFontSet createFontSet(char *);
136 void readDatabaseFont(char *, char *, XFontStruct **); 136 void readDatabaseFont(char *, char *, XFontStruct **);
137 137
138 static const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...); 138 static const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...);
139 static const char *getFontSize(const char *pattern, int *size); 139 static const char *getFontSize(const char *pattern, int *size);
140 140
141 141
142 WindowStyle m_windowstyle; 142 WindowStyle m_windowstyle;
143 MenuStyle m_menustyle; 143 MenuStyle m_menustyle;
144 ToolbarStyle m_toolbarstyle; 144 ToolbarStyle m_toolbarstyle;
145 unsigned int m_bevel_width, m_border_width, m_handle_width, m_frame_width; 145 unsigned int m_bevel_width, m_border_width, m_handle_width, m_frame_width;
146 FbTk::Color m_border_color; 146 FbTk::Color m_border_color;
147 GC m_opgc; 147 GC m_opgc;
148 Display *m_display; 148 Display *m_display;
149 XrmDatabase m_database; 149 XrmDatabase m_database;
150 Colormap m_colormap; 150 Colormap m_colormap;
151 int m_screennum; 151 int m_screennum;
152 std::string m_rootcommand; 152 std::string m_rootcommand;
153 FbTk::Texture m_slit_texture; 153 FbTk::Texture m_slit_texture;
154}; 154};
155 155
156 156