Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/htmlgen.cpp

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: htmlgen.cpp,v 1.56 2001/03/19 19:27:40 root Exp $
4 *
5 * Copyright (C) 1997-2011 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17
18#include <stdlib.h>
19
20#include "qtbc.h"
21#include <qdir.h>
22#include <qregexp.h>
23#include "message.h"
24#include "htmlgen.h"
25#include "config.h"
26#include "util.h"
27#include "doxygen.h"
28#include "logos.h"
29#include "diagram.h"
30#include "version.h"
31#include "dot.h"
32#include "language.h"
33#include "htmlhelp.h"
34#include "docparser.h"
35#include "htmldocvisitor.h"
36#include "index.h"
37#include "pagedef.h"
38#include "debug.h"
39#include "dirdef.h"
40#include "vhdldocgen.h"
41#include "layout.h"
42#include "image.h"
43
44
45//#define DBG_HTML(x) x;
46#define DBG_HTML(x)
47
48static const char defaultStyleSheet[] =
49#include "doxygen_css.h"
50;
51
52static const char search_script[]=
53#include "search_php.h"
54;
55
56static const char search_styleSheet[] =
57#include "search_css.h"
58;
59
60static const char search_jquery_script1[]=
61#include "jquery_js.h"
62;
63static const char search_jquery_script2[]=
64#include "sizzle_js.h"
65;
66static const char search_jquery_script3[]=
67#include "jquery_ui_js.h"
68;
69
70
71static QCString g_header;
72static QCString g_footer;
73
74//------------------------- Pictures for the Tabs ------------------------
75
76// active
77static unsigned char tab_a_png[36] =
78{
79 31, 42, 59, 69, 73, 74, 75, 77, 77,
80 77, 79, 80, 80, 82, 81, 83, 84, 86,
81 87, 88, 89, 90, 91, 91, 93, 94, 94,
82 96, 96, 97, 98, 98, 99, 99, 99, 100
83};
84
85// normal background
86static unsigned char tab_b_png[36] =
87{
88 240, 239, 238, 237, 235, 234, 234, 232, 231,
89 229, 228, 227, 224, 224, 221, 219, 218, 217,
90 214, 212, 210, 209, 206, 203, 202, 200, 198,
91 196, 195, 193, 192, 190, 189, 188, 188, 188
92};
93
94// shadowed header
95static unsigned char header_png[12] =
96{
97 255, 240, 241, 242, 243, 244,
98 245, 246, 247, 248, 249, 250
99};
100
101// function header
102static unsigned char func_header_png[56] =
103{
104 248, 247, 246, 245, 244, 243, 242, 241,
105 240, 239, 238, 237, 236, 235, 234, 233,
106 232, 231, 230, 229, 228, 223, 223, 223,
107 223, 223, 223, 223, 223, 223, 223, 223,
108 224, 224, 224, 224, 225, 225, 225, 225,
109 225, 226, 226, 226, 227, 227, 227, 227,
110 228, 228, 228, 229, 229, 229, 229, 229
111};
112
113// hovering
114static unsigned char tab_h_png[36] =
115{
116 199, 198, 196, 196, 195, 194, 193, 192, 189,
117 188, 187, 184, 184, 181, 180, 178, 176, 173,
118 171, 169, 166, 164, 163, 161, 159, 156, 155,
119 153, 152, 149, 148, 147, 145, 145, 150, 161
120};
121
122// separator
123static unsigned char tab_s_png[36] =
124{
125 187, 186, 185, 183, 182, 181, 180, 178, 176,
126 174, 173, 171, 169, 167, 164, 163, 161, 158,
127 156, 154, 152, 150, 148, 145, 143, 141, 140,
128 138, 136, 134, 131, 131, 128, 126, 125, 124
129};
130
131
132static unsigned char bc_s_png[240] =
133{
134 150,187,187,148,148,148,148,148,
135 147,175,186,147,147,147,147,147,
136 146,153,185,185,146,146,146,146,
137 144,144,177,183,144,144,144,144,
138 144,144,159,182,144,144,144,144,
139 143,143,144,179,181,143,143,143,
140 142,142,142,165,180,142,142,142,
141 141,141,141,144,178,178,141,141,
142 139,139,139,139,167,176,139,139,
143 137,137,137,137,146,174,137,137,
144 137,137,137,137,137,169,173,137,
145 135,135,135,135,135,150,171,135,
146 133,133,133,133,133,135,167,169,
147 132,132,132,132,132,132,154,167,
148 129,129,129,129,129,129,140,164,
149 129,129,129,129,129,129,154,163,
150 127,127,127,127,127,128,161,161,
151 125,125,125,125,125,141,158,125,
152 123,123,123,123,123,152,156,123,
153 121,121,121,121,129,154,121,121,
154 120,120,120,120,143,152,120,120,
155 118,118,118,120,150,150,118,118,
156 117,117,117,132,148,117,117,117,
157 114,114,114,142,145,114,114,114,
158 113,113,120,143,113,113,113,113,
159 111,111,133,141,111,111,111,111,
160 110,112,140,140,110,110,110,110,
161 109,124,138,109,109,109,109,109,
162 107,133,136,107,107,107,107,107,
163 111,134,106,106,106,106,106,106
164};
165
166static unsigned char bc_s_a_png[240] =
167{
168 241,241, 21, 0, 0, 0, 0, 0,
169 162,205,117, 0, 0, 0, 0, 0,
170 54,231,225, 3, 0, 0, 0, 0,
171 0,198,215, 78, 0, 0, 0, 0,
172 0, 93,211,186, 0, 0, 0, 0,
173 0, 6,232,235, 42, 0, 0, 0,
174 0, 0,132,203,147, 0, 0, 0,
175 0, 0, 27,242,241, 15, 0, 0,
176 0, 0, 0,168,205,108, 0, 0,
177 0, 0, 0, 63,228,219, 0, 0,
178 0, 0, 0, 0,207,221, 72, 0,
179 0, 0, 0, 0,102,208,177, 0,
180 0, 0, 0, 0, 9,238,240, 36,
181 0, 0, 0, 0, 0,138,201,138,
182 0, 0, 0, 0, 0, 77,187,158,
183 0, 0, 0, 0, 0,159,204,120,
184 0, 0, 0, 0, 15,241,241, 21,
185 0, 0, 0, 0,111,208,171, 0,
186 0, 0, 0, 0,210,222, 66, 0,
187 0, 0, 0, 60,227,219, 0, 0,
188 0, 0, 0,162,204,114, 0, 0,
189 0, 0, 18,238,238, 21, 0, 0,
190 0, 0,114,205,165, 0, 0, 0,
191 0, 0,216,225, 60, 0, 0, 0,
192 0, 66,226,216, 0, 0, 0, 0,
193 0,165,204,111, 0, 0, 0, 0,
194 21,241,241, 18, 0, 0, 0, 0,
195 117,203,159, 0, 0, 0, 0, 0,
196 219,227, 57, 0, 0, 0, 0, 0,
197 211,201, 0, 0, 0, 0, 0, 0
198};
199
200static unsigned char doxygen_png[3224] =
201{
202 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
203 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
204 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,255,255,255,255,255,255,255,255,
205 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 91, 91, 91, 91, 32, 32,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
206 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,255,255,255,255, 32, 32,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
207 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,253,253,253,253, 32, 32,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,255,255,255,255,255,255,255,255,
208 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,251,251,251,251, 32, 32,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,255,255,255,255,255,255,255,255,
209 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,249,249,249,249, 32, 32,249,249,249,249, 32, 32, 32, 32, 32, 32,249,249,249,249, 32, 32, 32, 32, 32, 32,249,249,249,249, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,249,249,249, 32, 32, 32, 32, 32,249,249,249,249, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,249,249,249,249,249,249, 32, 32, 32, 32, 32, 32, 32,249,249,249,249,249, 32, 32, 32, 32, 32,249, 32, 32, 32, 32, 32,255,255,255,
210 32, 32, 32, 32, 46,132,190,190,147, 61,247,247,247,247, 32, 32,247,247, 32, 32,118,161,190,190,161,118, 32, 32,247, 32, 46, 89, 89, 89, 89, 46, 32,247,247, 32, 89, 89, 89, 89, 61, 89, 89, 89, 89, 46, 32,247, 32, 46, 89, 89, 89, 89, 32,247, 32, 32,118,175,190,161, 89, 61, 89, 89, 89, 61, 32,247,247,247, 32, 32,104,147,190,190,190,132, 89, 32, 32,247,247, 32, 46, 89, 89, 89, 75, 32, 89,161,190,161, 75, 32,255,255,
211 32, 32, 32, 74,230,244,244,244,244,244,244,244,244,244, 32, 32,244, 32, 74,216,244,244,244,244,244,244,216, 74, 32,244, 32,187,244,244,244,159, 32,244, 32,117,244,244,244,230, 46,173,244,244,244,131, 32,244, 32,131,244,244,244,173, 32, 32, 46,173,244,244,244,244,244,230,244,244,244,131, 32,244,244, 32, 74,202,244,244,244,244,244,244,244,173, 46, 32,244, 32, 89,244,244,244,187,145,244,244,244,244,244, 89, 32,255,
212 32, 32, 46,213,241,241,241,241,241,241,241,241,241,241, 32, 32, 32, 60,227,241,241,241,241,241,241,241,241,227, 60, 32, 32, 46,227,241,241,241,102, 32, 60,227,241,241,241, 88, 32,116,241,241,241,199, 32,241, 32,185,241,241,241,116, 32, 32,143,241,241,241,241,241,241,241,241,241,241,130, 32,241, 32, 74,227,241,241,241,199,185,241,241,241,241,171, 32,241, 32, 88,241,241,241,241,241,241,241,241,241,241,199, 32,255,
213 32, 32,128,237,237,237,223,128, 87,128,237,237,237,237, 32, 32, 32,182,237,237,237,196,100,100,196,237,237,237,182, 32,237, 32,100,237,237,237,223, 59,196,237,237,237,141, 32, 32, 46,237,237,237,237, 59, 32, 46,237,237,237,237, 46, 32, 59,237,237,237,237,169, 87, 87,182,237,237,237,128, 32,237, 32,196,237,237,237, 87, 32, 32, 73,223,237,237,237, 73, 32, 32, 87,237,237,237,237,223,182,223,237,237,237,237, 46, 32,
214 32, 32,207,234,234,234,113, 32, 32, 32,234,234,234,234, 32, 32, 59,234,234,234,221, 45, 32, 32, 45,221,234,234,234, 59, 32,234, 32,140,234,234,234,221,234,234,234,194, 32, 32,234, 32,167,234,234,234,126, 32, 99,234,234,234,167, 32, 32,126,234,234,234,180, 32, 32, 32,126,234,234,234,126, 32, 32, 99,234,234,234,167, 32, 32, 32, 32,153,234,234,234,126, 32, 32, 86,234,234,234,207, 45, 32, 45,234,234,234,234, 86, 32,
215 32, 45,231,231,231,218, 32, 32, 32, 32,231,231,231,231, 32, 32, 98,231,231,231,165, 32,231,231, 32,165,231,231,231, 98, 32,231, 32, 45,191,231,231,231,231,231,218, 72, 32,231,231, 32, 98,231,231,231,165, 32,151,231,231,231,112, 32, 32,165,231,231,231,112, 32,231, 32,125,231,231,231,125, 32, 32,138,231,231,231,178,125,125,125,125,178,231,231,231,178, 32, 32, 85,231,231,231,178, 32,255, 32,191,231,231,231, 85, 32,
216 32, 84,227,227,227,175, 32, 32, 32, 32,227,227,227,227, 32, 32,123,227,227,227,123, 32,227,227, 32,123,227,227,227,123, 32,227,227, 32, 71,227,227,227,227,227,123, 32,227,227,227,227, 32,214,227,227,227, 45,201,227,227,227, 45, 32, 32,175,227,227,227, 84, 32,227, 32,123,227,227,227,123, 32, 32,175,227,227,227,227,227,227,227,227,227,227,227,227,175, 32, 32, 84,227,227,227,175, 32,255, 32,175,227,227,227, 84, 32,
217 32, 83,223,223,223,172, 32, 32, 32, 32,223,223,223,223, 32, 32,121,223,223,223,121, 32,223,223, 32,121,223,223,223,121, 32,223,223,223, 32,172,223,223,223,210, 45, 32,223,223,223,223, 32,147,223,223,223,134,223,223,223,147, 32,223, 32,172,223,223,223, 83, 32,223, 32,121,223,223,223,121, 32, 32,172,223,223,223,223,223,223,223,223,223,223,223,223,172, 32, 32, 83,223,223,223,172, 32,255, 32,172,223,223,223, 83, 32,
218 32, 82,220,220,220,170, 32, 32, 32, 32,220,220,220,220, 32, 32,120,220,220,220,120, 32,220,220, 32,120,220,220,220,120, 32,220,220, 32, 95,220,220,220,220,220,132, 32,220,220,220,220, 32, 95,220,220,220,207,220,220,220, 95, 32,220, 32,170,220,220,220,107, 32,220, 32,120,220,220,220,120, 32, 32,170,220,220,220,132, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 82,220,220,220,170, 32,255, 32,170,220,220,220, 82, 32,
219 32, 57,216,216,216,216, 32, 32, 32, 32,216,216,216,216, 32, 32, 81,216,216,216,167, 32,216,216, 32,155,216,216,216, 81, 32,216, 32, 57,204,216,216,216,216,216,216, 93, 32,216,216,216,216, 32,204,216,216,216,216,216,204, 32,216,216, 32,118,216,216,216,167, 32, 32, 32,130,216,216,216,118, 32, 32,118,216,216,216,191, 32, 32,216,216,216, 32, 32, 44, 57, 32, 32, 81,216,216,216,167, 32,255, 32,167,216,216,216, 81, 32,
220 32, 32,189,213,213,213,116, 32, 32, 80,213,213,213,213, 32, 32, 44,201,213,213,213, 68, 32, 32, 68,213,213,213,213, 44, 32, 32, 32,165,213,213,213,165,213,213,213,201, 44, 32,213,213,213, 32,129,213,213,213,213,213,141, 32,213,213, 32, 80,213,213,213,213,165,116,153,213,213,213,213,116, 32, 32, 56,213,213,213,213,153, 56, 32, 32, 32, 44,104,189,116, 32, 32, 80,213,213,213,165, 32,255, 32,165,213,213,213, 80, 32,
221 32, 32,139,210,210,210,210,174,174,210,210,210,210,210, 32, 32, 32,127,210,210,210,198,127,127,198,210,210,210,127, 32,210, 32,115,210,210,210,174, 44,139,210,210,210,163, 32, 32,210,210, 32, 68,210,210,210,210,210, 91, 32,210,210,210, 32,174,210,210,210,210,210,210,210,210,210,210,115, 32,210, 32,127,210,210,210,210,210,174,163,163,210,210,210,115, 32, 32, 79,210,210,210,163, 32,255, 32,163,210,210,210, 79, 32,
222 32, 32, 55,194,206,206,206,206,206,194,206,206,206,206, 32, 32, 32, 44,171,206,206,206,206,206,206,206,206,171, 44, 32, 32, 67,206,206,206,206, 67, 32, 44,183,206,206,206,113, 32,206,206,206, 32,183,206,206,206,194, 32,206,206,206,206, 32, 67,194,206,206,206,206,206,171,206,206,206,113, 32,206, 32, 32,136,206,206,206,206,206,206,206,206,206,206,113, 32, 32, 78,206,206,206,160, 32,255, 32,160,206,206,206, 78, 32,
223 32, 32, 32,100,192,203,203,203,157, 55,203,203,203,203, 32, 32,203, 32, 43,135,203,203,203,203,203,203,135, 43, 32, 32, 43,180,203,203,203,112, 32,203, 32, 66,203,203,203,203, 66, 32,203,203, 32,157,203,203,203,135, 32,203,203,203,203,203, 32, 43,112,157,157,123, 55,112,203,203,203,112, 32,203,203, 32, 32, 78,146,203,203,203,203,203,203,169,123, 55, 32, 32, 78,203,203,203,157, 32,255, 32,157,203,203,203, 78, 32,
224 32, 32, 32, 32, 54,110,110, 88, 32, 32, 32, 32, 32, 32, 32, 32,200,200, 32, 32, 54, 99,110,110, 99, 54, 32, 32,200,200, 32, 32, 32, 32, 32, 32, 32,200,200, 32, 32, 32, 32, 32, 32,200,200, 32, 54,200,200,200,200, 77, 32,200,200,200,200,200, 32, 32, 32, 32, 32, 32, 32,166,200,200,200, 88, 32,200,200,200,200, 32, 32, 32, 66, 77, 77, 77, 32, 32, 32, 32,200,200, 32, 32, 32, 32, 32, 32,255, 32, 32, 32, 32, 32, 32,255,
225 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,198,198,198,198, 32, 32, 32, 32, 32, 32,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198, 32,109,198,198,198,176, 32,198,198,198,198,198, 32, 98,121, 76, 32, 32, 54,109,198,198,198,198, 43, 32,198,198,198,198,198,198,198, 32, 32, 32, 32,198,198,198,198,198,198,198,198,198,198,198,198,255,255,255,255,255,255,255,255,
226 32, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 33,159,191,191,191,117, 36, 41, 41, 41, 41, 41, 34,108,191,191,191,191,191,191,191,191,191,117, 36, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,255,
227 32, 41, 97,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 78, 38, 64,190,192,192,192, 66, 66, 41, 41, 85,128, 65, 34,107,190,192,192,192,192,192,192,192,139, 48, 39, 41, 41,105,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 97, 41,255,
228 32, 41, 97,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 96, 36, 95,147,148,148,139, 55, 41, 41, 85,121,128, 91, 38, 75,137,158,190,190,190,170,139, 97, 49, 37, 41, 41,105,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 97, 41,255,
229 32, 41, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 41, 36, 45, 45, 45, 48, 38, 41, 41, 76, 76, 76, 76, 76, 37, 34, 42, 33, 33, 33, 39, 48, 59, 41, 41, 41, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 41,255,
230 32, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,255,
231 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
232 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
233};
234
235static unsigned char doxygen_a_png[3224] =
236{
237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
238 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 66, 66, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
240 0, 0, 0, 0, 0, 0, 0, 0, 0,145,247,247,247,247,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
241 0, 0, 0, 0, 0, 0, 0, 0, 0,247,247,247,247,247,247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
242 0, 0, 0, 0, 0, 0, 0, 0, 0,247,247,247,247,247,247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
243 0, 0, 0, 0, 0, 0, 0, 0, 0,247,247,247,247,247,247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
244 0, 0, 0, 0, 16,115,181,181,132,247,247,247,247,247,247, 0, 0, 0, 0, 0, 99,148,181,181,148, 99, 0, 0, 0, 0, 16, 66, 66, 66, 66, 16, 0, 0, 0, 0, 66, 66, 66, 66, 33, 66, 66, 66, 66, 16, 0, 0, 0, 16, 66, 66, 66, 66, 0, 0, 0, 0, 99,165,181,148, 66, 33, 66, 66, 66, 33, 0, 0, 0, 0, 0, 0, 82,132,181,181,181,115, 66, 0, 0, 0, 0, 0, 16, 66, 66, 66, 49, 0, 66,148,181,148, 49, 0, 0, 0,
245 0, 0, 0,129,247,247,247,247,247,247,247,247,247,247,247, 0, 0, 0,112,214,247,247,247,247,247,247,214,112, 0, 16,247,247,247,247,247,247, 46, 0, 0,145,247,247,247,247,247,247,247,247,247,247, 16, 0, 16,247,247,247,247,247, 66, 0, 63,165,247,247,247,247,247,247,247,247,247,247, 33, 0, 0, 0, 96,198,247,247,247,247,247,247,247,165, 63, 0, 0, 16,247,247,247,247,247,145,247,247,247,247,247,145, 0, 0,
246 0, 0,112,247,247,247,247,247,247,247,247,247,247,247,247, 0, 0,129,247,247,247,247,247,247,247,247,247,247,129, 0,181,247,247,247,247,247,148, 0,129,247,247,247,247,247,247,247,247,247,247,247,115, 0,115,247,247,247,247,247,165, 30,247,247,247,247,247,247,247,247,247,247,247,247,115, 0, 0,129,247,247,247,247,247,247,247,247,247,247,247, 63, 0, 66,247,247,247,247,247,247,247,247,247,247,247,247, 96, 0,
247 0, 16,247,247,247,247,247,247,247,247,247,247,247,247,247, 0, 79,247,247,247,247,247,247,247,247,247,247,247,247, 79, 79,247,247,247,247,247,247,129,247,247,247,247,247,247,129,247,247,247,247,247,198, 0,181,247,247,247,247,247, 99,145,247,247,247,247,247,247,247,247,247,247,247,247,115, 0, 96,247,247,247,247,247,247,247,247,247,247,247,247,165, 0, 66,247,247,247,247,247,247,247,247,247,247,247,247,198, 0,
248 0,115,247,247,247,247,247,247,247,247,247,247,247,247,247, 0,181,247,247,247,247,247,247,247,247,247,247,247,247,181, 0,129,247,247,247,247,247,247,247,247,247,247,247,145, 16,247,247,247,247,247,247, 33,247,247,247,247,247,247, 33,247,247,247,247,247,247,247,247,247,247,247,247,247,115, 0,198,247,247,247,247,247,198,181,247,247,247,247,247,247, 49, 66,247,247,247,247,247,247,247,247,247,247,247,247,247, 16,
249 0,214,247,247,247,247,247,129, 66,247,247,247,247,247,247, 33,247,247,247,247,247,247, 96, 96,247,247,247,247,247,247, 33, 0,145,247,247,247,247,247,247,247,247,247,198, 30, 0,165,247,247,247,247,247,115,247,247,247,247,247,165,115,247,247,247,247,247,181, 66,115,247,247,247,247,247,115, 82,247,247,247,247,247,165,115,115,148,247,247,247,247,247,115, 66,247,247,247,247,247,247,181,247,247,247,247,247,247, 66,
250 16,247,247,247,247,247,231, 0, 0,247,247,247,247,247,247, 82,247,247,247,247,247,165, 0, 0,165,247,247,247,247,247, 82, 0, 30,247,247,247,247,247,247,247,247,247, 96, 0, 0, 82,247,247,247,247,247,165,247,247,247,247,247, 99,165,247,247,247,247,247, 99, 0,115,247,247,247,247,247,115,132,247,247,247,247,247,247,247,247,247,247,247,247,247,247,181, 66,247,247,247,247,247,181, 0,198,247,247,247,247,247, 66,
251 66,247,247,247,247,247,181, 0, 0,247,247,247,247,247,247,115,247,247,247,247,247,115, 0, 0,115,247,247,247,247,247,115, 0, 0, 96,247,247,247,247,247,247,247,129, 0, 0, 0, 0,231,247,247,247,247,247,247,247,247,247,247, 16,181,247,247,247,247,247, 66, 0,115,247,247,247,247,247,115,181,247,247,247,247,247,247,247,247,247,247,247,247,247,247,181, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
252 66,247,247,247,247,247,181, 0, 0,247,247,247,247,247,247,115,247,247,247,247,247,115, 0, 0,115,247,247,247,247,247,115, 0, 0, 0,181,247,247,247,247,247,247, 30, 0, 0, 0, 0,148,247,247,247,247,247,247,247,247,247,148, 0,181,247,247,247,247,247, 66, 0,115,247,247,247,247,247,115,181,247,247,247,247,247,247,247,247,247,247,247,247,247,247,181, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
253 66,247,247,247,247,247,181, 0, 0,247,247,247,247,247,247,115,247,247,247,247,247,115, 0, 0,115,247,247,247,247,247,115, 0, 0,129,247,247,247,247,247,247,247,145, 0, 0, 0, 0, 82,247,247,247,247,247,247,247,247,247, 82, 0,181,247,247,247,247,247, 99, 0,115,247,247,247,247,247,115,181,247,247,247,247,247,247,247,247,247,247,247,247,247,181, 79, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
254 33,247,247,247,247,247,247, 14, 0,247,247,247,247,247,247, 66,247,247,247,247,247,181, 0, 0,165,247,247,247,247,247, 66, 0, 79,247,247,247,247,247,247,247,247,247,129, 0, 0, 0, 0,231,247,247,247,247,247,247,247,231, 0, 0,115,247,247,247,247,247,181,115,165,247,247,247,247,247,115,115,247,247,247,247,247,214, 63, 0, 0, 0, 16,112,247,247, 33, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
255 0,214,247,247,247,247,247,198,198,247,247,247,247,247,247, 16,247,247,247,247,247,247,132,132,247,247,247,247,247,247, 16, 14,181,247,247,247,247,247,247,247,247,247,247, 79, 0, 0, 0,132,247,247,247,247,247,247,247,148, 0, 0, 66,247,247,247,247,247,247,247,247,247,247,247,247,247,115, 33,247,247,247,247,247,247,247,198,181,181,247,247,247,247,115, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
256 0,148,247,247,247,247,247,247,247,247,247,247,247,247,247, 0,132,247,247,247,247,247,247,247,247,247,247,247,247,145, 0,145,247,247,247,247,247,247,247,247,247,247,247,181, 14, 0, 0, 49,247,247,247,247,247,247,247, 82, 0, 0, 0,198,247,247,247,247,247,247,247,247,247,247,247,247,115, 0,145,247,247,247,247,247,247,247,247,247,247,247,247,247,115, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
257 0, 46,247,247,247,247,247,247,247,247,247,247,247,247,247, 0, 30,247,247,247,247,247,247,247,247,247,247,247,247, 30,112,247,247,247,247,247,247, 96,247,247,247,247,247,247,145, 0, 0, 0,214,247,247,247,247,247,231, 0, 0, 0, 0, 96,247,247,247,247,247,247,247,247,247,247,247,247,115, 0, 30,148,247,247,247,247,247,247,247,247,247,247,247,247,115, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
258 0, 0,129,247,247,247,247,247,247,247,247,247,247,247,247, 0, 0, 96,247,247,247,247,247,247,247,247,247,247, 96, 16,247,247,247,247,247,247,145, 0,112,247,247,247,247,247,247, 49, 0, 0,181,247,247,247,247,247,148, 0, 0, 0, 0, 0,129,247,247,247,247,247,247,247,247,247,247,247,115, 0, 0, 46,148,247,247,247,247,247,247,247,247,247,247,247, 33, 66,247,247,247,247,247,181, 0,181,247,247,247,247,247, 66,
259 0, 0, 0,129,247,247,247,247,181,145,247,247,247,247,145, 0, 0, 0, 46,148,247,247,247,247,247,247,148, 46, 0, 0,112,214,247,247,247,145, 14, 0, 0,145,247,247,247,247,145, 0, 0, 33,247,247,247,247,247,247, 66, 0, 0, 0, 0, 0, 99,132,115,181,181,132,198,247,247,247,247,247, 82, 0, 0, 0, 0, 66,165,247,247,247,247,247,247,198,132, 33, 0, 0,145,247,247,247,181, 79, 0, 79,181,247,247,247,145, 0,
260 0, 0, 0, 0, 33,115,115, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 99,115,115, 99, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115,247,247,247,247,247,214, 0, 0, 0, 0, 0, 99,247,247,247,247,247,247,247,247,247,247,247,247, 16, 0, 0, 0, 0, 0, 0, 0, 49, 66, 66, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
261 0,165,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,108,224,255,255,255,255,255,255,101,164,255,255,255,143,250,255,255,255,255,255,255,255,255,255,255,255, 98,170,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,165, 0,
262 0,165,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,136,251,255,255,255,255,255,255,101,130,255,255,255,153,250,255,255,255,255,255,255,255,255,255,255,121, 98,189,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,165, 0,
263 0,165,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,198,252,255,255,255,255,255,164,164,255,255,255,255,176,249,251,255,255,255,255,255,255,255,255,150, 86,192,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,165, 0,
264 0,165,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,164,198,255,255,255,255,201,133,164,255,255,255,255,255,145,203,255,255,255,255,255,255,255,117, 79,194,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,165, 0,
265 0, 66,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102, 73, 73,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102, 47, 70,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102, 66, 0,
266 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
268};
269
270unsigned char mag_sel_png[] = {
271 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
272 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x13,
273 0x08, 0x06, 0x00, 0x00, 0x00, 0x90, 0x8c, 0x2d, 0xb5, 0x00, 0x00, 0x00,
274 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b,
275 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48,
276 0x52, 0x4d, 0x00, 0x00, 0x6d, 0x98, 0x00, 0x00, 0x73, 0x8e, 0x00, 0x00,
277 0xe0, 0x38, 0x00, 0x00, 0x82, 0xd5, 0x00, 0x00, 0x7a, 0x07, 0x00, 0x00,
278 0xca, 0xb4, 0x00, 0x00, 0x33, 0x44, 0x00, 0x00, 0x1c, 0x76, 0x84, 0x36,
279 0x2a, 0xbd, 0x00, 0x00, 0x01, 0xb9, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
280 0xe4, 0x94, 0xbb, 0x8a, 0x22, 0x41, 0x14, 0x86, 0xbf, 0xda, 0x16, 0x3a,
281 0x10, 0xba, 0x03, 0x2f, 0x78, 0x03, 0x51, 0x11, 0x4c, 0xd4, 0x40, 0xd4,
282 0x37, 0x30, 0x31, 0x30, 0xe9, 0x07, 0xf0, 0x15, 0x14, 0x7c, 0x1e, 0x31,
283 0x37, 0x33, 0x11, 0x73, 0xe9, 0x56, 0x44, 0x84, 0x36, 0xe9, 0x40, 0x50,
284 0x54, 0x14, 0xc4, 0xc0, 0xa8, 0x6d, 0x50, 0x6a, 0x92, 0x1d, 0xd9, 0x9d,
285 0x99, 0x75, 0x0d, 0x26, 0x58, 0xd8, 0x3f, 0xaa, 0xe2, 0xfc, 0xf5, 0xd5,
286 0x39, 0x9c, 0x53, 0x25, 0xa4, 0x94, 0x7c, 0xa7, 0x7e, 0xf0, 0xcd, 0xfa,
287 0xf7, 0x81, 0xbe, 0xf7, 0xc5, 0xf9, 0x7c, 0x96, 0x93, 0xc9, 0x84, 0xe5,
288 0x72, 0xc9, 0x66, 0xb3, 0x21, 0x99, 0x4c, 0x92, 0xcf, 0xe7, 0xa9, 0x54,
289 0x2a, 0x04, 0x02, 0x01, 0xf1, 0x2a, 0x50, 0x48, 0x29, 0x39, 0x9d, 0x4e,
290 0x72, 0x30, 0x18, 0x60, 0x59, 0xd6, 0x27, 0x43, 0xb5, 0x5a, 0xa5, 0xd1,
291 0x68, 0x10, 0x0c, 0x06, 0xc5, 0xcb, 0x19, 0x4e, 0xa7, 0x53, 0x2c, 0xcb,
292 0x22, 0x95, 0x4a, 0x51, 0x2a, 0x95, 0xc8, 0x64, 0x32, 0xac, 0x56, 0x2b,
293 0x66, 0xb3, 0x19, 0x93, 0xc9, 0x84, 0x48, 0x24, 0x42, 0xbd, 0x5e, 0x7f,
294 0xbd, 0x64, 0xdb, 0xb6, 0x01, 0x28, 0x97, 0xcb, 0x54, 0x2a, 0x15, 0x34,
295 0x4d, 0x13, 0xa1, 0x50, 0x48, 0x2a, 0x8a, 0xc2, 0x7a, 0xbd, 0xc6, 0xb6,
296 0x6d, 0xea, 0xf5, 0x3a, 0xa3, 0xd1, 0x48, 0xf6, 0xfb, 0xfd, 0xc7, 0x61,
297 0xc3, 0x30, 0xa8, 0xd5, 0x6a, 0xe2, 0x53, 0x53, 0xb6, 0xdb, 0x2d, 0x00,
298 0xc5, 0x62, 0x11, 0x4d, 0xd3, 0x04, 0x80, 0xa6, 0x69, 0xa2, 0x50, 0x28,
299 0xf0, 0x6b, 0x1c, 0x10, 0x86, 0x61, 0x3c, 0x60, 0x80, 0xf8, 0xb2, 0xcb,
300 0x89, 0x44, 0x02, 0x00, 0xc7, 0x71, 0x00, 0xde, 0x27, 0x5d, 0xfe, 0xdc,
301 0x3f, 0xe2, 0x1f, 0xa0, 0xe2, 0x8f, 0x63, 0x93, 0xcb, 0xe5, 0x00, 0x18,
302 0x8f, 0xc7, 0x98, 0xa6, 0x89, 0xeb, 0xba, 0xd2, 0x34, 0x4d, 0xc6, 0xe3,
303 0x31, 0x00, 0xe9, 0x74, 0x1a, 0x80, 0x5a, 0xad, 0xf6, 0x80, 0x3e, 0xed,
304 0xf2, 0x7a, 0xbd, 0x96, 0xc3, 0xe1, 0x90, 0xf9, 0x7c, 0xfe, 0xa5, 0x29,
305 0x1c, 0x0e, 0xd3, 0xe9, 0x74, 0xd0, 0x75, 0x5d, 0x00, 0x8c, 0x46, 0xa3,
306 0x8f, 0x17, 0xfc, 0x0e, 0xf4, 0x3c, 0x4f, 0xee, 0x76, 0x3b, 0x16, 0x8b,
307 0x05, 0x8e, 0xe3, 0xb0, 0xdf, 0xef, 0x89, 0xc7, 0xe3, 0xa4, 0xd3, 0x69,
308 0x6c, 0xdb, 0xe6, 0x74, 0x3a, 0x11, 0x8d, 0x46, 0x69, 0xb7, 0xdb, 0x0f,
309 0xe8, 0xd3, 0x0c, 0x01, 0x3c, 0xcf, 0x93, 0xae, 0xeb, 0xe2, 0x79, 0x1e,
310 0xb7, 0xdb, 0x0d, 0x9f, 0xcf, 0x87, 0xa2, 0x28, 0x5c, 0x2e, 0x17, 0x7a,
311 0xbd, 0x1e, 0xc7, 0xe3, 0x91, 0x58, 0x2c, 0x46, 0xab, 0xd5, 0x7a, 0x0a,
312 0x7d, 0xbc, 0x14, 0x55, 0x55, 0x85, 0xaa, 0xaa, 0x9f, 0x0c, 0x7e, 0xbf,
313 0x5f, 0x36, 0x9b, 0x4d, 0xba, 0xdd, 0x2e, 0xd7, 0xeb, 0x95, 0xeb, 0xf5,
314 0x8a, 0xae, 0xeb, 0x7f, 0xcf, 0xf0, 0x99, 0x5c, 0xd7, 0x95, 0x87, 0xc3,
315 0x81, 0xfb, 0xfd, 0x4e, 0x36, 0x9b, 0x7d, 0xad, 0xe4, 0xff, 0xe7, 0xfb,
316 0x7a, 0x1b, 0x00, 0x59, 0xa8, 0xba, 0x68, 0xca, 0x4f, 0xc5, 0xa7, 0x00,
317 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
318};
319unsigned int mag_sel_png_len = 563;
320
321unsigned char mag_png[] = {
322 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
323 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x13,
324 0x08, 0x06, 0x00, 0x00, 0x00, 0x90, 0x8c, 0x2d, 0xb5, 0x00, 0x00, 0x00,
325 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b,
326 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48,
327 0x52, 0x4d, 0x00, 0x00, 0x6d, 0x98, 0x00, 0x00, 0x73, 0x8e, 0x00, 0x00,
328 0xe0, 0x38, 0x00, 0x00, 0x82, 0xd5, 0x00, 0x00, 0x7a, 0x07, 0x00, 0x00,
329 0xca, 0xb4, 0x00, 0x00, 0x33, 0x44, 0x00, 0x00, 0x1c, 0x76, 0x84, 0x36,
330 0x2a, 0xbd, 0x00, 0x00, 0x01, 0x92, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
331 0xe4, 0x94, 0xbb, 0xaa, 0xea, 0x50, 0x10, 0x86, 0xbf, 0xec, 0x08, 0x29,
332 0x36, 0x24, 0x85, 0x17, 0xbc, 0x81, 0x18, 0x11, 0x6c, 0xd4, 0x42, 0x8c,
333 0x0f, 0x61, 0xe1, 0x2b, 0xf8, 0x0a, 0x0a, 0x3e, 0x8f, 0xf8, 0x0c, 0x36,
334 0x62, 0x1f, 0x92, 0x88, 0x88, 0x10, 0x9b, 0x14, 0x42, 0x44, 0x45, 0x41,
335 0x2c, 0xac, 0x92, 0x80, 0xb2, 0x4e, 0x73, 0x94, 0x03, 0xfb, 0xb0, 0x4d,
336 0xb1, 0x8b, 0x03, 0xe7, 0xaf, 0xd6, 0x62, 0xfe, 0xf5, 0x31, 0xc3, 0xcc,
337 0x1a, 0x49, 0x08, 0xc1, 0x4f, 0xea, 0x83, 0x1f, 0xd6, 0xbf, 0x0f, 0x4c,
338 0x3c, 0x0f, 0xd7, 0xeb, 0x55, 0x38, 0x8e, 0xc3, 0x66, 0xb3, 0x61, 0xb7,
339 0xdb, 0x51, 0x2a, 0x95, 0xa8, 0xd7, 0xeb, 0x18, 0x86, 0x41, 0x32, 0x99,
340 0x94, 0xe2, 0x02, 0x25, 0x21, 0x04, 0x97, 0xcb, 0x45, 0x4c, 0xa7, 0x53,
341 0x6c, 0xdb, 0xfe, 0x62, 0xe8, 0x74, 0x3a, 0xf4, 0x7a, 0x3d, 0x52, 0xa9,
342 0x94, 0x14, 0x3b, 0xc3, 0xc5, 0x62, 0x81, 0x6d, 0xdb, 0x94, 0xcb, 0x65,
343 0x5a, 0xad, 0x16, 0x95, 0x4a, 0x85, 0xed, 0x76, 0xcb, 0x72, 0xb9, 0xc4,
344 0x71, 0x1c, 0xb2, 0xd9, 0x2c, 0xdd, 0x6e, 0x37, 0x7e, 0xc9, 0xae, 0xeb,
345 0x02, 0xd0, 0x6e, 0xb7, 0x31, 0x0c, 0x03, 0x55, 0x55, 0xa5, 0x74, 0x3a,
346 0x2d, 0x64, 0x59, 0xc6, 0xf7, 0x7d, 0x5c, 0xd7, 0x8d, 0x0d, 0xfc, 0x00,
347 0xd8, 0xef, 0xf7, 0x00, 0x34, 0x9b, 0x4d, 0x54, 0x55, 0x95, 0x00, 0x54,
348 0x55, 0x95, 0x1a, 0x8d, 0x06, 0x7f, 0xc6, 0x63, 0x03, 0x8b, 0xc5, 0x22,
349 0x00, 0x9e, 0xe7, 0x01, 0x3c, 0x27, 0x5d, 0xfc, 0xbe, 0xbf, 0xe2, 0xb1,
350 0x81, 0xb5, 0x5a, 0x0d, 0x00, 0xd3, 0x34, 0xb1, 0x2c, 0x8b, 0x20, 0x08,
351 0x84, 0x65, 0x59, 0x98, 0xa6, 0x09, 0x80, 0xae, 0xeb, 0xaf, 0x07, 0xf3,
352 0xf9, 0xfc, 0x7d, 0x97, 0x7d, 0xdf, 0x17, 0xb3, 0xd9, 0x8c, 0xd5, 0x6a,
353 0xf5, 0x57, 0x53, 0x26, 0x93, 0x61, 0x34, 0x1a, 0xa1, 0x69, 0x9a, 0x14,
354 0x6b, 0x6c, 0xa2, 0x28, 0x12, 0x87, 0xc3, 0x81, 0xf5, 0x7a, 0x8d, 0xe7,
355 0x79, 0x1c, 0x8f, 0x47, 0x0a, 0x85, 0x02, 0xba, 0xae, 0xe3, 0xba, 0x2e,
356 0x97, 0xcb, 0x85, 0x5c, 0x2e, 0xc7, 0x70, 0x38, 0x7c, 0x0b, 0x95, 0x9e,
357 0xcb, 0x21, 0x8a, 0x22, 0x11, 0x04, 0x01, 0x51, 0x14, 0x71, 0xbf, 0xdf,
358 0x49, 0x24, 0x12, 0xc8, 0xb2, 0xcc, 0xed, 0x76, 0x63, 0x32, 0x99, 0x70,
359 0x3e, 0x9f, 0xc9, 0xe7, 0xf3, 0x0c, 0x06, 0x83, 0x6f, 0xa1, 0xaf, 0x9f,
360 0xa2, 0x28, 0x8a, 0xa4, 0x28, 0xca, 0x17, 0xc3, 0xe7, 0xe7, 0xa7, 0xe8,
361 0xf7, 0xfb, 0x8c, 0xc7, 0x63, 0xc2, 0x30, 0x24, 0x0c, 0x43, 0x34, 0x4d,
362 0x7b, 0x9f, 0xe1, 0x77, 0x0a, 0x82, 0x40, 0x9c, 0x4e, 0x27, 0x1e, 0x8f,
363 0x07, 0xd5, 0x6a, 0x35, 0x5e, 0xc9, 0xff, 0xcf, 0xfa, 0xfa, 0x35, 0x00,
364 0x70, 0xf3, 0xae, 0xcb, 0x89, 0xcd, 0xd2, 0x46, 0x00, 0x00, 0x00, 0x00,
365 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
366};
367unsigned int mag_png_len = 524;
368
369unsigned char search_l_png[] = {
370 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
371 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x13,
372 0x08, 0x06, 0x00, 0x00, 0x00, 0x90, 0x8c, 0x2d, 0xb5, 0x00, 0x00, 0x00,
373 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b,
374 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48,
375 0x52, 0x4d, 0x00, 0x00, 0x6d, 0x98, 0x00, 0x00, 0x73, 0x8e, 0x00, 0x00,
376 0xe0, 0x38, 0x00, 0x00, 0x82, 0xd5, 0x00, 0x00, 0x7a, 0x07, 0x00, 0x00,
377 0xca, 0xb4, 0x00, 0x00, 0x33, 0x44, 0x00, 0x00, 0x1c, 0x76, 0x84, 0x36,
378 0x2a, 0xbd, 0x00, 0x00, 0x01, 0xe2, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
379 0xac, 0x54, 0x3d, 0xab, 0xda, 0x50, 0x18, 0x7e, 0xce, 0xc9, 0x39, 0x31,
380 0x4d, 0xfc, 0x40, 0x30, 0x46, 0x14, 0xec, 0x50, 0x44, 0x17, 0x2f, 0x9d,
381 0xba, 0x15, 0xda, 0xd1, 0xa1, 0x2e, 0xdd, 0x3b, 0x14, 0x4a, 0xa1, 0x7f,
382 0xa6, 0x74, 0xbd, 0x43, 0xff, 0x84, 0xfd, 0x05, 0x82, 0xda, 0xa5, 0x83,
383 0x1d, 0xdc, 0x8a, 0x88, 0xa0, 0x44, 0x83, 0xc6, 0x28, 0xad, 0x1f, 0x49,
384 0xde, 0x2e, 0x8d, 0x78, 0x6f, 0xaf, 0x34, 0x68, 0x9f, 0xed, 0xbc, 0x70,
385 0x1e, 0x9e, 0x8f, 0xf7, 0x1c, 0x46, 0x44, 0x38, 0x45, 0xaf, 0xd7, 0x63,
386 0xb6, 0x6d, 0xe7, 0x6d, 0xdb, 0x6e, 0xba, 0xae, 0xfb, 0x6e, 0xb3, 0xd9,
387 0xdc, 0x6c, 0xb7, 0xdb, 0x04, 0xe7, 0x1c, 0x8c, 0x31, 0xfc, 0x0b, 0x2c,
388 0x22, 0xec, 0x76, 0xbb, 0xcc, 0xf3, 0xbc, 0xcc, 0x68, 0x34, 0x7a, 0xed,
389 0xba, 0xee, 0x87, 0x6c, 0x36, 0x7b, 0x93, 0xcb, 0xe5, 0x44, 0x3a, 0x9d,
390 0x86, 0xa6, 0x69, 0x50, 0x14, 0x25, 0x3e, 0x61, 0xa7, 0xd3, 0x61, 0xf3,
391 0xf9, 0xfc, 0xc9, 0x78, 0x3c, 0xbe, 0xd5, 0x75, 0xfd, 0x79, 0xa5, 0x52,
392 0x11, 0xa6, 0x69, 0x22, 0x95, 0x4a, 0x41, 0xd3, 0x34, 0x08, 0x21, 0xc0,
393 0x18, 0x8b, 0x45, 0x28, 0x00, 0x60, 0xb5, 0x5a, 0xa5, 0x27, 0x93, 0xc9,
394 0xa7, 0x62, 0xb1, 0xf8, 0xb2, 0x5a, 0xad, 0x22, 0x9f, 0xcf, 0xc3, 0x30,
395 0x0c, 0x48, 0x29, 0xc1, 0x39, 0x47, 0x5c, 0xbb, 0x00, 0x20, 0xda, 0xed,
396 0x36, 0x9f, 0x4e, 0xa7, 0xaf, 0x4c, 0xd3, 0x7c, 0x51, 0xaf, 0xd7, 0x61,
397 0x59, 0x16, 0x74, 0x5d, 0x87, 0x94, 0x12, 0x97, 0x40, 0x2c, 0x16, 0x0b,
398 0x93, 0x88, 0xde, 0xd6, 0x6a, 0x35, 0xdd, 0xb2, 0x2c, 0x18, 0x86, 0x01,
399 0x21, 0x04, 0x2e, 0x05, 0xf7, 0x3c, 0xaf, 0x59, 0x2e, 0x97, 0x9f, 0x45,
400 0xca, 0x38, 0xe7, 0xb8, 0x06, 0x3c, 0x08, 0x82, 0x46, 0xa1, 0x50, 0x78,
401 0x74, 0xad, 0xb2, 0x23, 0xa1, 0x94, 0xf2, 0x69, 0x26, 0x93, 0xe1, 0x51,
402 0x66, 0xf7, 0xf7, 0xd2, 0xf7, 0xfd, 0x07, 0x2f, 0x9e, 0x9b, 0x73, 0x55,
403 0x55, 0xb3, 0x91, 0x55, 0xc6, 0x18, 0xc2, 0x30, 0xbc, 0x1b, 0xf2, 0x19,
404 0xd5, 0xe7, 0xe6, 0x5c, 0x4a, 0x39, 0x06, 0x70, 0x5c, 0x8b, 0xb8, 0xeb,
405 0x71, 0xd6, 0x32, 0x11, 0x75, 0xf6, 0xfb, 0xfd, 0xd1, 0xea, 0xd5, 0xa5,
406 0x10, 0xd1, 0xb7, 0xf5, 0x7a, 0x1d, 0x84, 0x61, 0x08, 0x22, 0xba, 0x9e,
407 0x50, 0x51, 0x94, 0xaf, 0x8e, 0xe3, 0xfc, 0xdc, 0xed, 0x76, 0xf8, 0x1f,
408 0xe0, 0x89, 0x44, 0xe2, 0xc7, 0x72, 0xb9, 0xfc, 0xee, 0x38, 0x0e, 0x7c,
409 0xdf, 0x3f, 0x5a, 0xbf, 0xdf, 0x76, 0x6c, 0xc2, 0x46, 0xa3, 0xf1, 0x2b,
410 0x08, 0x82, 0xdb, 0xe1, 0x70, 0xe8, 0x2c, 0x16, 0x0b, 0x04, 0x41, 0x00,
411 0x22, 0xba, 0xb8, 0x1c, 0xfe, 0x67, 0x05, 0xbe, 0x78, 0x9e, 0xf7, 0x79,
412 0x30, 0x18, 0x8c, 0x67, 0xb3, 0x19, 0x45, 0x25, 0x9d, 0x53, 0x49, 0x44,
413 0x38, 0x1c, 0x0e, 0x38, 0x2d, 0xf3, 0xce, 0x6f, 0x03, 0x60, 0x29, 0x84,
414 0xf8, 0xe8, 0x79, 0x9e, 0xdb, 0xef, 0xf7, 0xdf, 0x97, 0x4a, 0xa5, 0xc7,
415 0xd1, 0x53, 0x54, 0x55, 0x15, 0x52, 0xca, 0xbf, 0x14, 0x0b, 0x21, 0x1e,
416 0x8c, 0x87, 0x9d, 0x1e, 0x5a, 0xad, 0x96, 0x00, 0x50, 0x27, 0xa2, 0x37,
417 0xaa, 0xaa, 0x36, 0x0d, 0xc3, 0x28, 0x26, 0x93, 0x49, 0xa1, 0x69, 0x9a,
418 0xc2, 0x39, 0x8f, 0x95, 0xc1, 0xef, 0x01, 0x00, 0x35, 0xe5, 0xd5, 0x5e,
419 0xd0, 0xed, 0x0c, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44,
420 0xae, 0x42, 0x60, 0x82
421};
422unsigned int search_l_png_len = 604;
423
424unsigned char search_m_png[] = {
425 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
426 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
427 0x08, 0x02, 0x00, 0x00, 0x00, 0x35, 0x5e, 0x4b, 0x4d, 0x00, 0x00, 0x00,
428 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xd6, 0xd8, 0xd4, 0x4f, 0x58,
429 0x32, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66,
430 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20,
431 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x71, 0xc9,
432 0x65, 0x3c, 0x00, 0x00, 0x00, 0x30, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
433 0x62, 0x2c, 0x2f, 0x2f, 0x67, 0x60, 0x60, 0x60, 0x3c, 0x7e, 0xfc, 0x38,
434 0x88, 0xfa, 0xf8, 0xf1, 0x23, 0x88, 0xfa, 0xff, 0xff, 0x3f, 0x90, 0x62,
435 0x62, 0x00, 0x03, 0x5a, 0x50, 0x2c, 0x10, 0x1b, 0x58, 0x6e, 0xdd, 0xba,
436 0x05, 0xa4, 0x00, 0x02, 0x0c, 0x00, 0xa5, 0x07, 0x0f, 0x3c, 0x7e, 0xe1,
437 0x45, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
438 0x60, 0x82
439};
440unsigned int search_m_png_len = 158;
441
442unsigned char search_r_png[] = {
443 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
444 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13,
445 0x08, 0x06, 0x00, 0x00, 0x00, 0x9d, 0x92, 0x5d, 0xf2, 0x00, 0x00, 0x00,
446 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b,
447 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48,
448 0x52, 0x4d, 0x00, 0x00, 0x6d, 0x98, 0x00, 0x00, 0x73, 0x8e, 0x00, 0x00,
449 0xe0, 0x38, 0x00, 0x00, 0x82, 0xd5, 0x00, 0x00, 0x7a, 0x07, 0x00, 0x00,
450 0xca, 0xb4, 0x00, 0x00, 0x33, 0x44, 0x00, 0x00, 0x1c, 0x76, 0x84, 0x36,
451 0x2a, 0xbd, 0x00, 0x00, 0x01, 0xea, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
452 0xa4, 0xd4, 0xbf, 0xaa, 0x1a, 0x41, 0x14, 0x06, 0xf0, 0x6f, 0xf6, 0x9f,
453 0xb2, 0x0a, 0x6b, 0xa5, 0x56, 0x8b, 0xa4, 0x92, 0xd4, 0x69, 0x7c, 0x03,
454 0xb1, 0x59, 0x49, 0x11, 0x52, 0xdf, 0xbc, 0x43, 0xcc, 0x2b, 0xa4, 0x4c,
455 0x97, 0x67, 0x08, 0xa4, 0x11, 0x2c, 0x52, 0x5c, 0x42, 0x24, 0x60, 0x8a,
456 0x34, 0x29, 0x42, 0x50, 0x41, 0x21, 0xa0, 0x97, 0xd5, 0x55, 0xb3, 0xbb,
457 0xee, 0xb2, 0xce, 0xee, 0xcc, 0x49, 0x91, 0x28, 0xc2, 0x0d, 0xe6, 0xaa,
458 0xa7, 0x9d, 0xc3, 0x8f, 0x73, 0x98, 0xf9, 0x86, 0x75, 0x3a, 0x1d, 0xc2,
459 0x89, 0x12, 0x42, 0x24, 0xf9, 0x7c, 0x7e, 0x5a, 0x2c, 0x16, 0x3f, 0x96,
460 0x4a, 0xa5, 0x5e, 0xb5, 0x5a, 0xfd, 0x52, 0x2e, 0x97, 0xfd, 0x46, 0xa3,
461 0x21, 0x8e, 0xfb, 0xd8, 0x60, 0x30, 0x38, 0x09, 0x65, 0x59, 0x86, 0x24,
462 0x49, 0x10, 0x04, 0x81, 0xf0, 0x3c, 0x6f, 0xb3, 0xd9, 0x6c, 0x7e, 0x58,
463 0x96, 0x75, 0x5b, 0xab, 0xd5, 0xde, 0x34, 0x9b, 0xcd, 0x5f, 0x07, 0xc8,
464 0xf7, 0xfd, 0x93, 0x90, 0x94, 0xf2, 0x80, 0x85, 0x61, 0x88, 0xe5, 0x72,
465 0x49, 0xe3, 0xf1, 0x58, 0xc6, 0x71, 0xfc, 0xc1, 0xb6, 0xed, 0xe7, 0x8e,
466 0xe3, 0x84, 0x00, 0xc0, 0xa4, 0x94, 0x27, 0x21, 0x22, 0x82, 0x94, 0x12,
467 0x52, 0x4a, 0xa4, 0x69, 0x8a, 0x28, 0x8a, 0xb0, 0x58, 0x2c, 0x30, 0x1c,
468 0x0e, 0x85, 0xeb, 0xba, 0xef, 0x6b, 0xb5, 0xda, 0x4d, 0xab, 0xd5, 0x8a,
469 0x34, 0xc6, 0xd8, 0x29, 0x07, 0x8c, 0x31, 0x28, 0x8a, 0x02, 0x22, 0x82,
470 0xae, 0xeb, 0x30, 0x0c, 0x03, 0xb9, 0x5c, 0x0e, 0x86, 0x61, 0xa8, 0x52,
471 0xca, 0xa7, 0xf3, 0xf9, 0xfc, 0x67, 0xbf, 0xdf, 0x7f, 0xa5, 0xe0, 0x81,
472 0xc5, 0x18, 0x03, 0x63, 0x0c, 0x9a, 0xa6, 0xa1, 0x50, 0x28, 0xa0, 0x52,
473 0xa9, 0xa0, 0x5e, 0xaf, 0x6b, 0x00, 0x5e, 0xac, 0xd7, 0xeb, 0x47, 0x0f,
474 0x86, 0x8e, 0x41, 0x55, 0x55, 0x61, 0x9a, 0x26, 0x2a, 0x95, 0x0a, 0x6c,
475 0xdb, 0xb6, 0x82, 0x20, 0x78, 0x76, 0x36, 0xb4, 0xc7, 0xf6, 0x93, 0x55,
476 0xab, 0x55, 0x26, 0x84, 0x78, 0xac, 0x1c, 0x5f, 0xf3, 0xb9, 0xa5, 0xeb,
477 0x3a, 0x2c, 0xcb, 0x82, 0xae, 0xeb, 0xbb, 0x03, 0xa4, 0x69, 0xda, 0xd9,
478 0x53, 0x29, 0x8a, 0x02, 0xd3, 0x34, 0x99, 0x61, 0x18, 0xcb, 0x8b, 0x56,
479 0x3b, 0xc6, 0xfe, 0x4e, 0x76, 0x77, 0x15, 0x44, 0x44, 0xe0, 0x9c, 0x0b,
480 0x22, 0xfa, 0xaa, 0x5c, 0x83, 0x48, 0x29, 0x11, 0x86, 0xe1, 0x86, 0x88,
481 0xbe, 0x5f, 0x35, 0xd1, 0x6e, 0xb7, 0x83, 0xe7, 0x79, 0x3d, 0x55, 0x55,
482 0x7d, 0xd0, 0x05, 0x25, 0xa5, 0x24, 0xce, 0x39, 0x4d, 0x26, 0x93, 0x45,
483 0xb7, 0xdb, 0x7d, 0x42, 0x44, 0x50, 0x2e, 0x59, 0x49, 0x08, 0x81, 0xf5,
484 0x7a, 0x9d, 0x4c, 0xa7, 0xd3, 0x77, 0x42, 0x88, 0x6f, 0x00, 0xa0, 0xed,
485 0x0f, 0xb3, 0x2c, 0x3b, 0xe4, 0xe9, 0x5f, 0xf9, 0x23, 0xfa, 0x93, 0x6d,
486 0xce, 0x39, 0x56, 0xab, 0x95, 0x18, 0x0e, 0x87, 0x9f, 0x82, 0x20, 0x78,
487 0xdd, 0x6e, 0xb7, 0xd3, 0x7b, 0xe9, 0x27, 0xa2, 0x7b, 0x08, 0x11, 0x21,
488 0x4d, 0x53, 0x70, 0xce, 0x11, 0xc7, 0xb1, 0x74, 0x5d, 0xd7, 0x9f, 0xcd,
489 0x66, 0x3d, 0xce, 0xf9, 0x4b, 0xc7, 0x71, 0xee, 0x0e, 0xef, 0x70, 0x34,
490 0x1a, 0xe1, 0x7f, 0xff, 0x51, 0x92, 0x24, 0xd8, 0x6e, 0xb7, 0x61, 0x14,
491 0x45, 0x9f, 0x39, 0xe7, 0x6f, 0x19, 0x63, 0xb7, 0x8e, 0xe3, 0x44, 0xc7,
492 0x7d, 0xbf, 0x07, 0x00, 0x5f, 0x77, 0x46, 0x8c, 0x30, 0x2c, 0xd8, 0x9d,
493 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
494};
495unsigned int search_r_png_len = 612;
496
497static unsigned char close_png[] = {
498 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
499 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b,
500 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0xac, 0x77, 0x26, 0x00, 0x00, 0x00,
501 0xd8, 0x49, 0x44, 0x41, 0x54, 0x18, 0x19, 0x75, 0x51, 0xbd, 0x12, 0x46,
502 0x40, 0x0c, 0xdc, 0x18, 0x15, 0x0a, 0x14, 0x14, 0x1a, 0x43, 0xeb, 0x35,
503 0xbc, 0x7f, 0xa7, 0x43, 0x67, 0x06, 0x33, 0x28, 0xd0, 0xde, 0x77, 0x7b,
504 0x23, 0x2a, 0xdf, 0x16, 0x97, 0x9f, 0xdb, 0xcb, 0x26, 0x39, 0xc1, 0x83,
505 0x7d, 0xdf, 0xcd, 0xb2, 0x2c, 0xd8, 0xb6, 0x0d, 0xe7, 0x79, 0x22, 0x8a,
506 0x22, 0xc4, 0x71, 0x8c, 0x3c, 0xcf, 0x91, 0xa6, 0xa9, 0x90, 0xe6, 0x8e,
507 0x69, 0x9a, 0xcc, 0x38, 0x8e, 0xb8, 0xae, 0x4b, 0xdf, 0xbe, 0x36, 0x0c,
508 0x43, 0x94, 0x65, 0x89, 0xa2, 0x28, 0xc4, 0x3b, 0x8e, 0xe3, 0x2f, 0x91,
509 0x2f, 0xa8, 0xc2, 0x42, 0x56, 0xd1, 0x78, 0xf3, 0x3c, 0xbb, 0x04, 0x2f,
510 0xda, 0xb6, 0x45, 0x55, 0x55, 0x74, 0x9d, 0x65, 0x2c, 0x22, 0xb8, 0xef,
511 0x1b, 0xeb, 0xba, 0xc2, 0x67, 0x8f, 0x4c, 0x10, 0x7d, 0xdf, 0xa3, 0xae,
512 0x6b, 0xe7, 0xd3, 0x32, 0x56, 0x90, 0xe7, 0x53, 0x46, 0x31, 0x0c, 0x83,
513 0x73, 0x95, 0xa8, 0x31, 0x93, 0x9c, 0xc7, 0xe3, 0xd4, 0x0a, 0xb6, 0xa0,
514 0x44, 0x5a, 0xc6, 0xc6, 0x18, 0x77, 0xcd, 0x41, 0xbd, 0x24, 0x49, 0x94,
515 0xfb, 0x12, 0x59, 0x51, 0x5b, 0xd2, 0x16, 0xed, 0xfa, 0x20, 0xdc, 0x6f,
516 0xd7, 0x75, 0x9f, 0x6b, 0xd3, 0x2a, 0x41, 0x10, 0xa0, 0x69, 0x1a, 0x57,
517 0x59, 0x28, 0x47, 0x99, 0x2f, 0x30, 0xcf, 0x7b, 0xfb, 0x41, 0xcf, 0x1a,
518 0x2c, 0xeb, 0xeb, 0x07, 0x29, 0x9d, 0x65, 0x19, 0x6c, 0xab, 0x6e, 0x5d,
519 0x3f, 0x07, 0x0a, 0x79, 0x90, 0x0e, 0x11, 0x45, 0xc2, 0x00, 0x00, 0x00,
520 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
521};
522static unsigned int close_png_len = 273;
523
524#if 0
525unsigned char open_gif[] = {
526 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x09, 0x00, 0x09, 0x00, 0xf0, 0x00,
527 0x00, 0x8e, 0xaf, 0xc4, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
528 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00,
529 0x00, 0x02, 0x0d, 0x8c, 0x8f, 0xa9, 0xcb, 0xe0, 0xff, 0x02, 0x8c, 0x66,
530 0x26, 0x7a, 0x51, 0x01, 0x00, 0x3b
531};
532unsigned int open_gif_len = 54;
533
534unsigned char closed_gif[] = {
535 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x09, 0x00, 0x09, 0x00, 0xf0, 0x00,
536 0x00, 0x8e, 0xaf, 0xc4, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
537 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00,
538 0x00, 0x02, 0x10, 0x8c, 0x03, 0xa7, 0x98, 0xcb, 0xad, 0x80, 0x84, 0x66,
539 0xca, 0x38, 0x57, 0xd6, 0xf4, 0xd0, 0x02, 0x00, 0x3b
540};
541unsigned int closed_gif_len = 57;
542#endif
543
544static unsigned char closed_png[81] =
545{
546 0, 0, 0, 0,142, 0, 0, 0, 0,
547 0, 0, 0, 0,142,142, 0, 0, 0,
548 0, 0, 0, 0,142,142,142, 0, 0,
549 0, 0, 0, 0,142,142,142,142, 0,
550 0, 0, 0, 0,142,142,142,142,142,
551 0, 0, 0, 0,142,142,142,142, 0,
552 0, 0, 0, 0,142,142,142, 0, 0,
553 0, 0, 0, 0,142,142, 0, 0, 0,
554 0, 0, 0, 0,142, 0, 0, 0, 0
555};
556
557static unsigned char closed_a_png[81] =
558{
559 0, 0, 0, 0,255, 0, 0, 0, 0,
560 0, 0, 0, 0,255,255, 0, 0, 0,
561 0, 0, 0, 0,255,255,255, 0, 0,
562 0, 0, 0, 0,255,255,255,255, 0,
563 0, 0, 0, 0,255,255,255,255,255,
564 0, 0, 0, 0,255,255,255,255, 0,
565 0, 0, 0, 0,255,255,255, 0, 0,
566 0, 0, 0, 0,255,255, 0, 0, 0,
567 0, 0, 0, 0,255, 0, 0, 0, 0
568};
569
570static unsigned char open_png[81] =
571{
572 0, 0, 0, 0, 0, 0, 0, 0, 0,
573 0, 0, 0, 0, 0, 0, 0, 0, 0,
574 0, 0, 0, 0, 0, 0, 0, 0, 0,
575 0, 0, 0, 0, 0, 0, 0, 0, 0,
576 142,142,142,142,142,142,142,142,142,
577 0,142,142,142,142,142,142,142, 0,
578 0, 0,142,142,142,142,142, 0, 0,
579 0, 0, 0,142,142,142, 0, 0, 0,
580 0, 0, 0, 0,142, 0, 0, 0, 0
581};
582
583static unsigned char open_a_png[81] =
584{
585 0, 0, 0, 0, 0, 0, 0, 0, 0,
586 0, 0, 0, 0, 0, 0, 0, 0, 0,
587 0, 0, 0, 0, 0, 0, 0, 0, 0,
588 0, 0, 0, 0, 0, 0, 0, 0, 0,
589 255,255,255,255,255,255,255,255,255,
590 0,255,255,255,255,255,255,255, 0,
591 0, 0,255,255,255,255,255, 0, 0,
592 0, 0, 0,255,255,255, 0, 0, 0,
593 0, 0, 0, 0,255, 0, 0, 0, 0
594};
595
596
597
598//------------------------------------------------------------------------
599
600static const char tabs_css[] =
601".tabs, .tabs2, .tabs3 {\n"
602" background-image: url('tab_b.png');\n"
603" width: 100%;\n"
604" z-index: 101;\n"
605" font-size: 13px;\n"
606"}\n"
607"\n"
608".tabs2 {\n"
609" font-size: 10px;\n"
610"}\n"
611".tabs3 {\n"
612" font-size: 9px;\n"
613"}\n"
614"\n"
615".tablist {\n"
616" margin: 0;\n"
617" padding: 0;\n"
618" display: table;\n"
619"}\n"
620"\n"
621".tablist li {\n"
622" float: left;\n"
623" display: table-cell;\n"
624" background-image: url('tab_b.png');\n"
625" line-height: 36px;\n"
626" list-style: none;\n"
627"}\n"
628"\n"
629".tablist a {\n"
630" display: block;\n"
631" padding: 0 20px;\n"
632" font-weight: bold;\n"
633" background-image:url('tab_s.png');\n"
634" background-repeat:no-repeat;\n"
635" background-position:right;\n"
636" color: ##30;\n"
637" text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\n"
638" text-decoration: none;\n"
639" outline: none;\n"
640"}\n"
641"\n"
642".tabs3 .tablist a {\n"
643" padding: 0 10px;\n"
644"}\n"
645"\n"
646".tablist a:hover {\n"
647" background-image: url('tab_h.png');\n"
648" background-repeat:repeat-x;\n"
649" color: #fff;\n"
650" text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);\n"
651" text-decoration: none;\n"
652"}\n"
653"\n"
654".tablist li.current a {\n"
655" background-image: url('tab_a.png');\n"
656" background-repeat:repeat-x;\n"
657" color: #fff;\n"
658" text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);\n"
659"}\n"
660;
661
662struct img_data_item
663{
664 const char *name;
665 unsigned char *content;
666 unsigned int len;
667};
668
669
670static void writeImgData(const char *dir,img_data_item *data)
671{
672 while (data->name)
673 {
674 QCString fileName;
675 fileName=(QCString)dir+"/"+data->name;
676 QFile f(fileName);
677 if (f.open(IO_WriteOnly))
678 {
679 f.writeBlock((char*)data->content,
680 data->len>0 ? data->len : strlen((char*)data->content));
681 }
682 else
683 {
684 fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name);
685 }
686 Doxygen::indexList.addImageFile(QCString("/search/")+data->name);
687 data++;
688 }
689}
690
691static ColoredImgDataItem colored_tab_data[] =
692{
693 { "tab_a.png", 1, 36, tab_a_png, 0 },
694 { "tab_b.png", 1, 36, tab_b_png, 0 },
695 { "tab_h.png", 1, 36, tab_h_png, 0 },
696 { "tab_s.png", 1, 36, tab_s_png, 0 },
697 { "nav_h.png", 1, 12, header_png, 0 },
698 { "nav_f.png", 1, 56, func_header_png, 0 },
699 { "bc_s.png", 8, 32, bc_s_png, bc_s_a_png },
700 { "doxygen.png", 104,31, doxygen_png, doxygen_a_png },
701 { "closed.png", 9, 9, closed_png, closed_a_png },
702 { "open.png", 9, 9, open_png, open_a_png },
703 { 0, 0, 0, 0, 0 }
704};
705
706static img_data_item search_client_data[] =
707{
708 { "mag_sel.png", mag_sel_png, mag_sel_png_len },
709 { "search_l.png", search_l_png, search_l_png_len },
710 { "search_m.png", search_m_png, search_m_png_len },
711 { "search_r.png", search_r_png, search_r_png_len },
712 { "close.png", close_png, close_png_len },
713 { 0, 0, 0 }
714};
715
716static img_data_item search_server_data[] =
717{
718 { "mag.png", mag_png, mag_png_len },
719 { "search_l.png", search_l_png, search_l_png_len },
720 { "search_m.png", search_m_png, search_m_png_len },
721 { "search_r.png", search_r_png, search_r_png_len },
722 { 0, 0, 0 }
723};
724
725//------------------------------------------------------------------------
726
727static void writeClientSearchBox(FTextStream &t,const char *relPath)
728{
729 t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
730 t << " <span class=\"left\">\n";
731 t << " <img id=\"MSearchSelect\" src=\"" << relPath << "search/mag_sel.png\"\n";
732 t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
733 t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
734 t << " alt=\"\"/>\n";
735 t << " <input type=\"text\" id=\"MSearchField\" value=\""
736 << theTranslator->trSearch() << "\" accesskey=\"S\"\n";
737 t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
738 t << " onblur=\"searchBox.OnSearchFieldFocus(false)\" \n";
739 t << " onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n";
740 t << " </span><span class=\"right\">\n";
741 t << " <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
742 << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"" << relPath << "search/close.png\" alt=\"\"/></a>\n";
743 t << " </span>\n";
744 t << " </div>\n";
745}
746
747static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlightSearch)
748{
749 t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
750 t << " <span class=\"left\">\n";
751 t << " <form id=\"FSearchBox\" action=\"" << relPath << "search.php\" method=\"get\">\n";
752 t << " <img id=\"MSearchSelect\" src=\"" << relPath << "search/mag.png\" alt=\"\"/>\n";
753 if (!highlightSearch)
754 {
755 t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\""
756 << theTranslator->trSearch() << "\" size=\"20\" accesskey=\"S\" \n";
757 t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
758 t << " onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
759 t << " </form>\n";
760 t << " </span><span class=\"right\"></span>\n";
761 t << " </div>\n";
762 }
763}
764
765static QCString getLogoName(const char *projectLogo)
766{
767 if (projectLogo==0) return "";
768 if (projectLogo[0]=='$') return projectLogo; // marker is used
769 QFileInfo fi(projectLogo);
770 if (fi.exists())
771 {
772 return fi.fileName().data();
773 }
774 return "";
775}
776
777static void writeTitleArea(FTextStream &t,const char *relPath,
778 const char *projectName,const char *projectBrief,
779 const char *projectNumber,const char *projectLogo)
780{
781 QCString logoName = getLogoName(projectLogo);
782 static bool disableIndex = Config_getBool("DISABLE_INDEX");
783 static bool searchEngine = Config_getBool("SEARCHENGINE");
784 static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
785 if (!(logoName.isEmpty() && QCString(projectName).isEmpty() &&
786 QCString(projectBrief).isEmpty()) ||
787 (disableIndex && searchEngine))
788 {
789 t << "<div id=\"titlearea\">" << endl;
790 t << "<table cellspacing=\"0\" cellpadding=\"0\">" << endl;
791 t << " <tbody>" << endl;
792 t << " <tr style=\"height: 56px;\">" << endl;
793 if (!logoName.isEmpty())
794 {
795 t << " <td id=\"projectlogo\"><img alt=\"Logo\" src=\"" << relPath << logoName << "\"/></td>" << endl;
796 }
797 if (!(QCString(projectName).isEmpty() && QCString(projectBrief).isEmpty()))
798 {
799 t << " <td style=\"padding-left: 0.5em;\">" << endl;
800 if (!QCString(projectName).isEmpty())
801 {
802 t << " <div id=\"projectname\">" << projectName;
803 if (!QCString(projectNumber).isEmpty())
804 {
805 t << "&#160;<span id=\"projectnumber\">" << projectNumber << "</span>";
806 }
807 t << "</div>" << endl;
808 }
809 if (!QCString(projectBrief).isEmpty())
810 {
811 t << " <div id=\"projectbrief\">" << projectBrief << "</div>" << endl;
812 }
813 t << " </td>" << endl;
814 }
815 if (disableIndex && searchEngine)
816 {
817 t << " <td>" << endl;
818 if (serverBasedSearch)
819 {
820 writeServerSearchBox(t,relPath,FALSE);
821 }
822 else
823 {
824 writeClientSearchBox(t,relPath);
825 }
826 t << " </td>" << endl;
827 }
828 t << " </tr>" << endl;
829 t << " </tbody>" << endl;
830 t << "</table>" << endl;
831 t << "</div>" << endl;
832 }
833}
834
835//------------------------------------------------------------------------
836
837/// substitute all occurrences of \a src in \a s by \a dst
838QCString substitute(const char *s,const char *src,const char *dst)
839{
840 if (s==0 || src==0) return s;
841 const char *p, *q;
842 int srcLen = strlen(src);
843 int dstLen = dst ? strlen(dst) : 0;
844 int resLen;
845 if (srcLen!=dstLen)
846 {
847 int count;
848 for (count=0, p=s; (q=strstr(p,src))!=0; p=q+srcLen) count++;
849 resLen = p-s+strlen(p)+count*(dstLen-srcLen);
850 }
851 else // result has same size as s
852 {
853 resLen = strlen(s);
854 }
855 QCString result(resLen+1);
856 char *r;
857 for (r=result.data(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
858 {
859 int l = (int)(q-p);
860 memcpy(r,p,l);
861 r+=l;
862 if (dst) memcpy(r,dst,dstLen);
863 r+=dstLen;
864 }
865 strcpy(r,p);
866 //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data());
867 return result;
868}
869//----------------------------------------------------------------------
870
871/// Clear a text block \a s from \a begin to end \a markers
872QCString clearBlock(const char *s,const char *begin,const char *end)
873{
874 if (s==0 || begin==0 || end==0) return s;
875 const char *p, *q;
876 int beginLen = strlen(begin);
877 int endLen = strlen(end);
878 int resLen = 0;
879 for(p=s; (q=strstr(p,begin))!=0; p=q+endLen)
880 {
881 resLen+=q-p;
882 p=q+beginLen;
883 if((q=strstr(p,end))==0)
884 {
885 resLen+=beginLen;
886 break;
887 }
888 }
889 resLen+=strlen(p);
890
891 QCString result(resLen+1);
892 char *r;
893 for (r=result.data(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
894 {
895 int l = (int)(q-p);
896 memcpy(r,p,l);
897 r+=l;
898 p=q+beginLen;
899 if((q=strstr(p,end))==0)
900 {
901 memcpy(r,begin,beginLen);
902 r+=beginLen;
903 break;
904 }
905 }
906 strcpy(r,p);
907 return result;
908}
909//----------------------------------------------------------------------
910
911QCString selectBlock(const QCString& s,const QCString &name,bool which)
912{
913 const QCString begin = "<!--BEGIN " + name + "-->";
914 const QCString end = "<!--END " + name + "-->";
915 const QCString nobegin = "<!--BEGIN !" + name + "-->";
916 const QCString noend = "<!--END !" + name + "-->";
917
918 QCString result = s;
919 if (which)
920 {
921 result = substitute(result, begin, "");
922 result = substitute(result, end, "");
923 result = clearBlock(result, nobegin, noend);
924 }
925 else
926 {
927 result = substitute(result, nobegin, "");
928 result = substitute(result, noend, "");
929 result = clearBlock(result, begin, end);
930 }
931
932 return result;
933}
934
935static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch)
936{
937 QGString result;
938 FTextStream t(&result);
939 if (serverSide) {
940 writeServerSearchBox(t, relPath, highlightSearch);
941 }
942 else {
943 writeClientSearchBox(t, relPath);
944 }
945 return QCString(result);
946}
947
948
949static QCString substituteHtmlKeywords(const QCString &s,const char *title,
950 const QCString &relPath)
951{
952 // Build CSS/Javascript tags depending on treeview, search engine settings
953 QCString treeViewCssJs;
954 QCString searchCssJs;
955 QCString searchBox;
956 QCString mathJaxJs;
957 static bool treeView = Config_getBool("GENERATE_TREEVIEW");
958 static bool searchEngine = Config_getBool("SEARCHENGINE");
959 static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
960 static bool mathJax = Config_getBool("USE_MATHJAX");
961 static bool disableIndex = Config_getBool("DISABLE_INDEX");
962 static bool hasProjectName = !Config_getString("PROJECT_NAME").isEmpty();
963 static bool hasProjectNumber = !Config_getString("PROJECT_NUMBER").isEmpty();
964 static bool hasProjectBrief = !Config_getString("PROJECT_BRIEF").isEmpty();
965 static bool hasProjectLogo = !Config_getString("PROJECT_LOGO").isEmpty();
966 static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
967
968 if (treeView)
969 {
970 treeViewCssJs = "<link href=\"$relpath$navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
971 "<script type=\"text/javascript\" src=\"$relpath$jquery.js\"></script>\n"
972 "<script type=\"text/javascript\" src=\"$relpath$resize.js\"></script>\n"
973 "<script type=\"text/javascript\" src=\"$relpath$navtree.js\"></script>\n"
974 "<script type=\"text/javascript\">\n"
975 " $(document).ready(initResizable);\n"
976 "</script>";
977 }
978
979 if (searchEngine)
980 {
981 searchCssJs = "<link href=\"$relpath$search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
982 if (!Config_getBool("GENERATE_TREEVIEW"))
983 {
984 searchCssJs += "<script type=\"text/javascript\" src=\"$relpath$jquery.js\"></script>\n";
985 }
986 searchCssJs += "<script type=\"text/javascript\" src=\"$relpath$search/search.js\"></script>\n";
987
988 if (!serverBasedSearch)
989 {
990 searchCssJs += "<script type=\"text/javascript\">\n"
991 " $(document).ready(function() { searchBox.OnSelectItem(0); });\n"
992 "</script>";
993 }
994 else
995 {
996 searchCssJs += "<script type=\"text/javascript\">\n"
997 " $(document).ready(function() {\n"
998 " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
999 " });\n"
1000 "</script>";
1001 }
1002 searchBox = getSearchBox(serverBasedSearch, relPath, FALSE);
1003 }
1004
1005 if (mathJax)
1006 {
1007 mathJaxJs = "<script src=\"$relpath$MathJax.js\">\n"
1008 " MathJax.Hub.Config({\n"
1009 " extensions: [\"tex2jax.js\"],\n"
1010 " jax: [\"input/TeX\",\"output/HTML-CSS\"],\n"
1011 "});\n"
1012 "</script>\n";
1013 }
1014
1015 // first substitute generic keywords
1016 QCString result = substituteKeywords(s,title);
1017
1018 // additional HTML only keywords
1019 result = substitute(result,"$treeview",treeViewCssJs);
1020 result = substitute(result,"$search",searchCssJs);
1021 result = substitute(result,"$searchbox",searchBox);
1022 result = substitute(result,"$mathjax",mathJaxJs);
1023 result = substitute(result,"$relpath$",relPath); //<-- must be last
1024
1025 // additional HTML only conditional blocks
1026 result = selectBlock(result,"DISABLE_INDEX",disableIndex);
1027 result = selectBlock(result,"GENERATE_TREEVIEW",treeView);
1028 result = selectBlock(result,"SEARCHENGINE",searchEngine);
1029 result = selectBlock(result,"TITLEAREA",titleArea);
1030 result = selectBlock(result,"PROJECT_NAME",hasProjectName);
1031 result = selectBlock(result,"PROJECT_NUMBER",hasProjectNumber);
1032 result = selectBlock(result,"PROJECT_BRIEF",hasProjectBrief);
1033 result = selectBlock(result,"PROJECT_LOGO",hasProjectLogo);
1034
1035 return result;
1036}
1037
1038//------------------------- Pictures for the Tabs ------------------------
1039
1040HtmlGenerator::HtmlGenerator() : OutputGenerator()
1041{
1042 dir=Config_getString("HTML_OUTPUT");
1043 col=0;
1044}
1045
1046HtmlGenerator::~HtmlGenerator()
1047{
1048 //printf("HtmlGenerator::~HtmlGenerator()\n");
1049}
1050
1051void HtmlGenerator::init()
1052{
1053 QCString dname=Config_getString("HTML_OUTPUT");
1054 QDir d(dname);
1055 if (!d.exists() && !d.mkdir(dname))
1056 {
1057 err("Could not create output directory %s\n",dname.data());
1058 exit(1);
1059 }
1060 //writeLogo(dname);
1061 if (!Config_getString("HTML_HEADER").isEmpty())
1062 {
1063 g_header=fileToString(Config_getString("HTML_HEADER"));
1064 //printf("g_header='%s'\n",g_header.data());
1065 }
1066 if (!Config_getString("HTML_FOOTER").isEmpty())
1067 {
1068 g_footer=fileToString(Config_getString("HTML_FOOTER"));
1069 //printf("g_footer='%s'\n",g_footer.data());
1070 }
1071 createSubDirs(d);
1072
1073 QCString fileName=dname+"/tabs.css";
1074 QFile f(fileName);
1075 if (f.open(IO_WriteOnly))
1076 {
1077 FTextStream t(&f);
1078 t << replaceColorMarkers(tabs_css);
1079 }
1080 else
1081 {
1082 fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
1083 }
1084
1085 {
1086 QFile f(dname+"/jquery.js");
1087 if (f.open(IO_WriteOnly))
1088 {
1089 FTextStream t(&f);
1090 t << search_jquery_script1 << search_jquery_script2 << search_jquery_script3;
1091 }
1092 }
1093}
1094
1095/// Additional initialization after indices have been created
1096void HtmlGenerator::writeTabData()
1097{
1098 Doxygen::indexList.addStyleSheetFile("tabs.css");
1099 QCString dname=Config_getString("HTML_OUTPUT");
1100 writeColoredImgData(dname,colored_tab_data);
1101}
1102
1103void HtmlGenerator::writeSearchData(const char *dir)
1104{
1105 static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
1106 writeImgData(dir,serverBasedSearch ? search_server_data : search_client_data);
1107 QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
1108 QFile f(searchDirName+"/search.css");
1109 if (f.open(IO_WriteOnly))
1110 {
1111 FTextStream t(&f);
1112 t << replaceColorMarkers(search_styleSheet);
1113 }
1114 Doxygen::indexList.addStyleSheetFile("search/search.css");
1115}
1116
1117
1118
1119void HtmlGenerator::writeStyleSheetFile(QFile &file)
1120{
1121 FTextStream t(&file);
1122 t << replaceColorMarkers(defaultStyleSheet);
1123}
1124
1125static void writeDefaultNavTree(FTextStream &t,const char *relPathStr)
1126{
1127 static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
1128 if (generateTreeView)
1129 {
1130 t << "<link href=\"" << relPathStr << "navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
1131 t << "<script type=\"text/javascript\" src=\"" << relPathStr << "jquery.js\"></script>\n";
1132 t << "<script type=\"text/javascript\" src=\"" << relPathStr << "navtree.js\"></script>\n";
1133 t << "<script type=\"text/javascript\" src=\"" << relPathStr << "resize.js\"></script>\n";
1134 t << "<script type=\"text/javascript\">" << endl;
1135 t << "$(document).ready(initResizable);" << endl;
1136 t << "</script>" << endl;
1137 }
1138}
1139
1140static void writeDefaultHeaderFile(FTextStream &t, const char *name,
1141 const char *title,
1142 const char *relPath,bool usePathCmd,
1143 bool searchPage=FALSE)
1144{
1145 QString relPathStr;
1146 if (usePathCmd)
1147 relPathStr="$relpath$";
1148 else
1149 relPathStr=relPath;
1150
1151 QCString id = name;
1152 if (id.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
1153 {
1154 id=id.left(id.length()-Doxygen::htmlFileExtension.length());
1155 }
1156
1157 static bool searchEngine = Config_getBool("SEARCHENGINE");
1158 static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
1159 //if (searchEngine && !generateTreeView)
1160 //{
1161 // t << "<!-- This comment will put IE 6, 7 and 8 in quirks mode -->" << endl;
1162 //}
1163 // t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
1164 // t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
1165 t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
1166 t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n"
1167 "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"
1168 "<title>";
1169 t << convertToHtml(title);
1170 t << "</title>\n";
1171
1172 t << "<link href=\"" << relPathStr << "tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
1173 if (searchEngine /* && !generateTreeView*/ )
1174 {
1175 t << "<link href=\"" << relPathStr << "search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
1176 t << "<script type=\"text/javascript\" src=\"" << relPathStr << "search/search.js\"></script>\n";
1177 }
1178
1179 writeDefaultNavTree(t,relPathStr);
1180
1181 if (Config_getBool("USE_MATHJAX"))
1182 {
1183 QCString path = Config_getString("MATHJAX_RELPATH");
1184 if (!path.isEmpty() && path.at(path.length()-1)!='/')
1185 {
1186 path+="/";
1187 }
1188 if (path.isEmpty() || path.left(2)=="..") // relative path
1189 {
1190 path.prepend(relPathStr);
1191 }
1192 t << "<script src=\"" << path << "MathJax.js\">\n";
1193 t << " MathJax.Hub.Config({\n";
1194 t << " extensions: [\"tex2jax.js\"],\n";
1195 t << " jax: [\"input/TeX\",\"output/HTML-CSS\"],\n";
1196 t << "});\n";
1197 t << "</script>\n";
1198 }
1199 t << "<link ";
1200 t << "href=\"";
1201 QCString cssname=Config_getString("HTML_STYLESHEET");
1202 if (cssname.isEmpty())
1203 {
1204 t << relPathStr << "doxygen.css";
1205 }
1206 else
1207 {
1208 if (usePathCmd)
1209 {
1210 t << relPathStr << cssname;
1211 }
1212 else
1213 {
1214 QFileInfo cssfi(cssname);
1215 if (!cssfi.exists())
1216 {
1217 err("error: user specified HTML style sheet file does not exist!\n");
1218 }
1219 t << relPathStr << cssfi.fileName();
1220 }
1221 }
1222
1223 t << "\" rel=\"stylesheet\" type=\"text/css\"/>\n";
1224 t << "</head>\n";
1225 if (searchEngine && /*!generateTreeView &&*/ !serverBasedSearch)
1226 {
1227 // for the javascript based search select the default filter
1228 t << "<body onload='searchBox.OnSelectItem(0);'>\n";
1229 }
1230 else
1231 {
1232 if (searchPage) // keep focus on search result's box when loading
1233 // search results page
1234 {
1235 t << "<body onload='searchBox.DOMSearchField().focus()'>\n";
1236 }
1237 else
1238 {
1239 t << "<body>\n";
1240 }
1241 }
1242}
1243
1244
1245void HtmlGenerator::writeHeaderFile(QFile &file, const char *cssname)
1246{
1247 FTextStream t(&file);
1248
1249 // writeDefaultHeaderFile(t,file.name(),"$title",relativePathToRoot(0),TRUE);
1250
1251 QString relPathStr = "$relpath$";
1252
1253 QCString id(file.name());
1254 if (id.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
1255 {
1256 id=id.left(id.length()-Doxygen::htmlFileExtension.length());
1257 }
1258
1259 t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
1260 t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n"
1261 "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"
1262 "<title>$title</title>\n";
1263 t << "<link href=\"$relpath$tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
1264 t << "<link href=\"$relpath$" << cssname << "\" rel=\"stylesheet\" type=\"text/css\" />\n";
1265 t << "$treeview\n";
1266 t << "$search\n";
1267 t << "$mathjax\n";
1268 t << "</head>\n";
1269 t << "<body>\n";
1270 t << "<div id=\"top\"><!-- do not remove this div! -->\n";
1271
1272 t << "<!--BEGIN TITLEAREA-->\n";
1273 t << "<div id=\"titlearea\">\n";
1274 t << "<table cellspacing=\"0\" cellpadding=\"0\">\n";
1275 t << " <tbody>\n";
1276 t << " <tr style=\"height: 56px;\">\n";
1277 t << " <!--BEGIN PROJECT_LOGO-->\n";
1278 t << " <td id=\"projectlogo\"><img alt=\"Logo\" src=\"$relpath$$projectlogo\"></td>\n";
1279 t << " <!--END PROJECT_LOGO-->\n";
1280 t << " <!--BEGIN PROJECT_NAME-->\n";
1281 t << " <td style=\"padding-left: 0.5em;\">\n";
1282 t << " <div id=\"projectname\">$projectname\n";
1283 t << " <!--BEGIN PROJECT_NUMBER-->&#160;<span id=\"projectnumber\">$projectnumber</span><!--END PROJECT_NUMBER-->\n";
1284 t << " </div>\n";
1285 t << " <!--BEGIN PROJECT_BRIEF--><div id=\"projectbrief\">$projectbrief</div><!--END PROJECT_BRIEF-->\n";
1286 t << " </td>\n";
1287 t << " <!--END PROJECT_NAME-->\n";
1288 t << " <!--BEGIN !PROJECT_NAME-->\n";
1289 t << " <!--BEGIN PROJECT_BRIEF-->\n";
1290 t << " <td style=\"padding-left: 0.5em;\">\n";
1291 t << " <div id=\"projectbrief\">$projectbrief</div>\n";
1292 t << " </td>\n";
1293 t << " <!--END PROJECT_BRIEF-->\n";
1294 t << " <!--END !PROJECT_NAME-->\n";
1295 t << " <!--BEGIN DISABLE_INDEX-->\n";
1296 t << " <!--BEGIN SEARCHENGINE-->\n";
1297 t << " <td>$searchbox</td>\n";
1298 t << " <!--END SEARCHENGINE-->\n";
1299 t << " <!--END DISABLE_INDEX-->\n";
1300 t << " </tr>\n";
1301 t << " </tbody>\n";
1302 t << "</table>\n";
1303 t << "</div>\n";
1304 t << "<!--END TITLEAREA-->\n";
1305}
1306
1307void HtmlGenerator::writeFooterFile(QFile &file)
1308{
1309 FTextStream t(&file);
1310
1311 t << "<!--BEGIN GENERATE_TREEVIEW-->\n";
1312 t << " <li class=\"footer\">";
1313 t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ) << endl;
1314 t << " <a href=\"http://www.doxygen.org/index.html\">\n";
1315 t << " <img class=\"footer\" src=\"doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n";
1316 t << " </ul>\n";
1317 t << " </div>\n";
1318 t << "<!--END GENERATE_TREEVIEW-->\n";
1319 t << "<!--BEGIN !GENERATE_TREEVIEW-->\n";
1320 t << "<hr class=\"footer\"/><address class=\"footer\"><small>\n";
1321 t << theTranslator->trGeneratedAt( "$datetime", "$projectname" );
1322 t << "&#160;<a href=\"http://www.doxygen.org/index.html\">"
1323 << "<img class=\"footer\" src=\"$relpath$doxygen.png\" alt=\"doxygen\"/>"
1324 << "</a> $doxygenversion";
1325 t << "</small></address>\n";
1326 t << "<!--END !GENERATE_TREEVIEW-->\n";
1327
1328 t << "</body>\n"
1329 << "</html>\n";
1330}
1331
1332static void generateDynamicSections(FTextStream &t,const QCString &relPath)
1333{
1334 if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
1335 {
1336 t <<
1337#if 0
1338 "<script type=\"text/javascript\">\n"
1339 "<!--\n"
1340 "function changeDisplayState (e){\n"
1341 " var num=this.id.replace(/[^[0-9]/g,'');\n"
1342 " var button=this.firstChild;\n"
1343 " var sectionDiv=document.getElementById('dynsection'+num);\n"
1344 " if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){\n"
1345 " sectionDiv.style.display='block';\n"
1346 " button.src='" << relPath << "open.png';\n"
1347 " }else{\n"
1348 " sectionDiv.style.display='none';\n"
1349 " button.src='" << relPath << "closed.png';\n"
1350 " }\n"
1351 "}\n"
1352 "function initDynSections(){\n"
1353 " var divs=document.getElementsByTagName('div');\n"
1354 " var sectionCounter=1;\n"
1355 " for(var i=0;i<divs.length-1;i++){\n"
1356 " if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){\n"
1357 " var header=divs[i];\n"
1358 " var section=divs[i+1];\n"
1359 " var button=header.firstChild;\n"
1360 " if (button!='IMG'){\n"
1361 " divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);\n"
1362 " button=document.createElement('img');\n"
1363 " divs[i].insertBefore(button,divs[i].firstChild);\n"
1364 " }\n"
1365 " header.style.cursor='pointer';\n"
1366 " header.onclick=changeDisplayState;\n"
1367 " header.id='dynheader'+sectionCounter;\n"
1368 " button.src='" << relPath << "closed.png';\n"
1369 " section.id='dynsection'+sectionCounter;\n"
1370 " section.style.display='none';\n"
1371 " section.style.marginLeft='14px';\n"
1372 " sectionCounter++;\n"
1373 " }\n"
1374 " }\n"
1375 "}\n"
1376 "window.onload = initDynSections;\n"
1377 "-->\n"
1378 "</script>\n";
1379#endif
1380 "<script type=\"text/javascript\">\n"
1381 "function hasClass(ele,cls) {\n"
1382 " return ele.className.match(new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)'));\n"
1383 "}\n"
1384 "\n"
1385 "function addClass(ele,cls) {\n"
1386 " if (!this.hasClass(ele,cls)) ele.className += \" \"+cls;\n"
1387 "}\n"
1388 "\n"
1389 "function removeClass(ele,cls) {\n"
1390 " if (hasClass(ele,cls)) {\n"
1391 " var reg = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n"
1392 " ele.className=ele.className.replace(reg,' ');\n"
1393 " }\n"
1394 "}\n"
1395 "\n"
1396 "function toggleVisibility(linkObj) {\n"
1397 " var base = linkObj.getAttribute('id');\n"
1398 " var summary = document.getElementById(base + '-summary');\n"
1399 " var content = document.getElementById(base + '-content');\n"
1400 " var trigger = document.getElementById(base + '-trigger');\n"
1401 " if ( hasClass(linkObj,'closed') ) {\n"
1402 " summary.style.display = 'none';\n"
1403 " content.style.display = 'block';\n"
1404 " trigger.src = '" << relPath << "open.png';\n"
1405 " removeClass(linkObj,'closed');\n"
1406 " addClass(linkObj,'opened');\n"
1407 " } else if ( hasClass(linkObj,'opened') ) {\n"
1408 " summary.style.display = 'block';\n"
1409 " content.style.display = 'none';\n"
1410 " trigger.src = '" << relPath << "closed.png';\n"
1411 " removeClass(linkObj,'opened');\n"
1412 " addClass(linkObj,'closed');\n"
1413 " }\n"
1414 " return false;\n"
1415 "}\n"
1416 "</script>\n";
1417 }
1418}
1419
1420
1421void HtmlGenerator::startFile(const char *name,const char *,
1422 const char *title)
1423{
1424 //printf("HtmlGenerator::startFile(%s)\n",name);
1425 QCString fileName=name;
1426 lastTitle=title;
1427 relPath = relativePathToRoot(fileName);
1428
1429 if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
1430 {
1431 fileName+=Doxygen::htmlFileExtension;
1432 }
1433 startPlainFile(fileName);
1434 Doxygen::indexList.addIndexFile(fileName);
1435 //if (Config_getBool("GENERATE_HTMLHELP"))
1436 //{
1437 // HtmlHelp::getInstance()->addIndexFile(fileName);
1438 //}
1439
1440 QCString dispTitle = title;
1441 QCString projName = Config_getString("PROJECT_NAME");
1442 if (!projName.isEmpty())
1443 {
1444 dispTitle.prepend(projName+": ");
1445 }
1446
1447 lastFile = fileName;
1448 if (g_header.isEmpty())
1449 {
1450 writeDefaultHeaderFile(t,name,dispTitle,relPath,FALSE);
1451 }
1452 else
1453 {
1454 t << substituteHtmlKeywords(g_header,convertToHtml(dispTitle),relPath);
1455 }
1456 t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
1457 << versionString << " -->" << endl;
1458 //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
1459 static bool searchEngine = Config_getBool("SEARCHENGINE");
1460 if (searchEngine /*&& !generateTreeView*/)
1461 {
1462 t << "<script type=\"text/javascript\"><!--\n";
1463 t << "var searchBox = new SearchBox(\"searchBox\", \""
1464 << relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n";
1465 t << "--></script>\n";
1466 }
1467 generateDynamicSections(t,relPath);
1468 m_sectionCount=0;
1469}
1470
1471void HtmlGenerator::writeSearchFooter(FTextStream &t,const QCString &relPath)
1472{
1473 (void)relPath;
1474 t << "<!-- window showing the filter options -->\n";
1475 t << "<div id=\"MSearchSelectWindow\"\n";
1476 t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
1477 t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
1478 t << " onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n";
1479 writeSearchCategories(t);
1480 t << "</div>\n";
1481 t << "\n";
1482 t << "<!-- iframe showing the search results (closed by default) -->\n";
1483 t << "<div id=\"MSearchResultsWindow\">\n";
1484 t << "<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n";
1485 t << " name=\"MSearchResults\" id=\"MSearchResults\">\n";
1486 t << "</iframe>\n";
1487 t << "</div>\n";
1488 t << "\n";
1489}
1490
1491
1492QCString HtmlGenerator::writeLogoAsString(const char *path)
1493{
1494 static bool timeStamp = Config_getBool("HTML_TIMESTAMP");
1495 QCString result;
1496 if (timeStamp)
1497 {
1498 result += theTranslator->trGeneratedAt(
1499 dateToString(TRUE),
1500 Config_getString("PROJECT_NAME")
1501 );
1502 }
1503 else
1504 {
1505 result += theTranslator->trGeneratedBy();
1506 }
1507 result += "&#160;\n<a href=\"http://www.doxygen.org/index.html\">\n"
1508 "<img class=\"footer\" src=\"";
1509 result += path;
1510 result += "doxygen.png\" alt=\"doxygen\"/></a> ";
1511 result += versionString;
1512 result += " ";
1513 return result;
1514}
1515
1516void HtmlGenerator::writeLogo()
1517{
1518 t << writeLogoAsString(relPath);
1519}
1520
1521void HtmlGenerator::writePageFooter(FTextStream &t,const QCString &lastTitle,const QCString &relPath)
1522{
1523 static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
1524 static bool searchEngine = Config_getBool("SEARCHENGINE");
1525 static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
1526 if (searchEngine /*&& !generateTreeView*/ && !serverBasedSearch)
1527 {
1528 HtmlGenerator::writeSearchFooter(t,relPath);
1529 }
1530 if (g_footer.isEmpty())
1531 {
1532 if (!generateTreeView)
1533 {
1534 t << "<hr class=\"footer\"/><address class=\"footer\"><small>";
1535 t << writeLogoAsString(relPath);
1536 t << "</small></address>";
1537 if (Debug::isFlagSet(Debug::Validate))
1538 {
1539 t << "<p><a href=\"http://validator.w3.org/check/referer\">"
1540 "<img class=\"footer\" src=\"http://www.w3.org/Icons/valid-html401\""
1541 " height=\"31\" width=\"88\" alt=\"This page is Valid HTML 4.01 "
1542 "Transitional!\"></a><a href=\"http://jigsaw.w3.org/css-validator/\">"
1543 "<img class=\"footer\" style=\"border:0;width:88px;height:31px\" "
1544 "src=\"http://jigsaw.w3.org/css-validator/images/vcss\" "
1545 "alt=\"This page uses valid CSS!\"/></a></p>";
1546 }
1547 }
1548 t << "\n</body>\n</html>\n";
1549 }
1550 else
1551 {
1552 t << substituteHtmlKeywords(g_footer,convertToHtml(lastTitle),relPath);
1553 }
1554}
1555
1556void HtmlGenerator::writeFooter()
1557{
1558 writePageFooter(t,lastTitle,relPath);
1559}
1560
1561void HtmlGenerator::endFile()
1562{
1563 endPlainFile();
1564}
1565
1566void HtmlGenerator::startProjectNumber()
1567{
1568 t << "<h3 class=\"version\">";
1569}
1570
1571void HtmlGenerator::endProjectNumber()
1572{
1573 t << "</h3>";
1574}
1575
1576void HtmlGenerator::writeStyleInfo(int part)
1577{
1578 //printf("writeStyleInfo(%d)\n",part);
1579 if (part==0)
1580 {
1581 if (Config_getString("HTML_STYLESHEET").isEmpty()) // write default style sheet
1582 {
1583 //printf("write doxygen.css\n");
1584 startPlainFile("doxygen.css");
1585
1586 // alternative, cooler looking titles
1587 //t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
1588 //t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
1589
1590 t << replaceColorMarkers(defaultStyleSheet);
1591 endPlainFile();
1592 Doxygen::indexList.addStyleSheetFile("doxygen.css");
1593 }
1594 else // write user defined style sheet
1595 {
1596 QCString cssname=Config_getString("HTML_STYLESHEET");
1597 QFileInfo cssfi(cssname);
1598 if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
1599 {
1600 err("error: style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data());
1601 }
1602 else
1603 {
1604 // convert style sheet to string
1605 QCString fileStr = fileToString(cssname);
1606 // write the string into the output dir
1607 startPlainFile(cssfi.fileName());
1608 t << fileStr;
1609 endPlainFile();
1610 }
1611 Doxygen::indexList.addStyleSheetFile(cssfi.fileName());
1612 }
1613 }
1614}
1615
1616void HtmlGenerator::startDoxyAnchor(const char *,const char *,
1617 const char *anchor, const char *name,
1618 const char *args)
1619{
1620 t << "<a class=\"anchor\" id=\"" << anchor << "\"></a>";
1621 t << "<!-- doxytag: member=\"";
1622 docify(name,TRUE);
1623 t << "\" ref=\"";
1624 docify(anchor,TRUE);
1625 t << "\" args=\"";
1626 docify(args,TRUE);
1627 t << "\" -->";
1628}
1629
1630void HtmlGenerator::endDoxyAnchor(const char *,const char *)
1631{
1632}
1633
1634//void HtmlGenerator::newParagraph()
1635//{
1636// t << endl << "<p>" << endl;
1637//}
1638
1639void HtmlGenerator::startParagraph()
1640{
1641 t << endl << "<p>";
1642}
1643
1644void HtmlGenerator::endParagraph()
1645{
1646 t << "</p>" << endl;
1647}
1648
1649void HtmlGenerator::writeString(const char *text)
1650{
1651 t << text;
1652}
1653
1654void HtmlGenerator::startIndexListItem()
1655{
1656 t << "<li>";
1657}
1658
1659void HtmlGenerator::endIndexListItem()
1660{
1661 t << "</li>" << endl;
1662}
1663
1664void HtmlGenerator::startIndexItem(const char *ref,const char *f)
1665{
1666 //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
1667 if (ref || f)
1668 {
1669 if (ref)
1670 {
1671 t << "<a class=\"elRef\" ";
1672 t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
1673 }
1674 else
1675 {
1676 t << "<a class=\"el\" ";
1677 }
1678 t << "href=\"";
1679 t << externalRef(relPath,ref,TRUE);
1680 if (f) t << f << Doxygen::htmlFileExtension << "\">";
1681 }
1682 else
1683 {
1684 t << "<b>";
1685 }
1686}
1687
1688void HtmlGenerator::endIndexItem(const char *ref,const char *f)
1689{
1690 //printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
1691 if (ref || f)
1692 {
1693 t << "</a>";
1694 }
1695 else
1696 {
1697 t << "</b>";
1698 }
1699}
1700
1701void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
1702 const char *path,const char *name)
1703{
1704 t << "<li>";
1705 if (path) docify(path);
1706 t << "<a class=\"el\" href=\"" << f << Doxygen::htmlFileExtension << "\">";
1707 docify(name);
1708 t << "</a> ";
1709}
1710
1711void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
1712 const char *anchor, const char *name)
1713{
1714 if (ref)
1715 {
1716 t << "<a class=\"elRef\" ";
1717 t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
1718 }
1719 else
1720 {
1721 t << "<a class=\"el\" ";
1722 }
1723 t << "href=\"";
1724 t << externalRef(relPath,ref,TRUE);
1725 if (f) t << f << Doxygen::htmlFileExtension;
1726 if (anchor) t << "#" << anchor;
1727 t << "\">";
1728 docify(name);
1729 t << "</a>";
1730}
1731
1732void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
1733 const char *anchor, const char *name,
1734 const char *tooltip)
1735{
1736 //printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
1737 if (ref)
1738 {
1739 t << "<a class=\"codeRef\" ";
1740 t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
1741 }
1742 else
1743 {
1744 t << "<a class=\"code\" ";
1745 }
1746 t << "href=\"";
1747 t << externalRef(relPath,ref,TRUE);
1748 if (f) t << f << Doxygen::htmlFileExtension;
1749 if (anchor) t << "#" << anchor;
1750 t << "\"";
1751 if (tooltip) t << " title=\"" << tooltip << "\"";
1752 t << ">";
1753 docify(name);
1754 t << "</a>";
1755 col+=strlen(name);
1756}
1757
1758void HtmlGenerator::startTextLink(const char *f,const char *anchor)
1759{
1760 t << "<a href=\"";
1761 if (f) t << relPath << f << Doxygen::htmlFileExtension;
1762 if (anchor) t << "#" << anchor;
1763 t << "\">";
1764}
1765
1766void HtmlGenerator::endTextLink()
1767{
1768 t << "</a>";
1769}
1770
1771void HtmlGenerator::startHtmlLink(const char *url)
1772{
1773 static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
1774 t << "<a ";
1775 if (generateTreeView) t << "target=\"top\" ";
1776 t << "href=\"";
1777 if (url) t << url;
1778 t << "\">";
1779}
1780
1781void HtmlGenerator::endHtmlLink()
1782{
1783 t << "</a>";
1784}
1785
1786void HtmlGenerator::startGroupHeader(int extraIndentLevel)
1787{
1788 if (extraIndentLevel==2)
1789 {
1790 t << "<h4>";
1791 }
1792 else if (extraIndentLevel==1)
1793 {
1794 t << "<h3>";
1795 }
1796 else // extraIndentLevel==0
1797 {
1798 t << "<h2>";
1799 }
1800}
1801
1802void HtmlGenerator::endGroupHeader(int extraIndentLevel)
1803{
1804 if (extraIndentLevel==2)
1805 {
1806 t << "</h4>" << endl;
1807 }
1808 else if (extraIndentLevel==1)
1809 {
1810 t << "</h3>" << endl;
1811 }
1812 else
1813 {
1814 t << "</h2>" << endl;
1815 }
1816}
1817
1818void HtmlGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
1819{
1820 switch(type)
1821 {
1822 case SectionInfo::Page: t << "\n\n<h1>"; break;
1823 case SectionInfo::Section: t << "\n\n<h2>"; break;
1824 case SectionInfo::Subsection: t << "\n\n<h3>"; break;
1825 case SectionInfo::Subsubsection: t << "\n\n<h4>"; break;
1826 case SectionInfo::Paragraph: t << "\n\n<h5>"; break;
1827 default: ASSERT(0); break;
1828 }
1829 t << "<a class=\"anchor\" id=\"" << lab << "\"></a>";
1830}
1831
1832void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
1833{
1834 switch(type)
1835 {
1836 case SectionInfo::Page: t << "</h1>"; break;
1837 case SectionInfo::Section: t << "</h2>"; break;
1838 case SectionInfo::Subsection: t << "</h3>"; break;
1839 case SectionInfo::Subsubsection: t << "</h4>"; break;
1840 case SectionInfo::Paragraph: t << "</h5>"; break;
1841 default: ASSERT(0); break;
1842 }
1843}
1844
1845void HtmlGenerator::docify(const char *str)
1846{
1847 docify(str,FALSE);
1848}
1849
1850void HtmlGenerator::docify(const char *str,bool inHtmlComment)
1851{
1852 if (str)
1853 {
1854 const char *p=str;
1855 char c;
1856 while (*p)
1857 {
1858 c=*p++;
1859 switch(c)
1860 {
1861 case '<': t << "&lt;"; break;
1862 case '>': t << "&gt;"; break;
1863 case '&': t << "&amp;"; break;
1864 case '"': t << "&quot;"; break;
1865 case '-': if (inHtmlComment) t << "&#45;"; else t << "-"; break;
1866 case '\\':
1867 if (*p=='<')
1868 { t << "&lt;"; p++; }
1869 else if (*p=='>')
1870 { t << "&gt;"; p++; }
1871 else
1872 t << "\\";
1873 break;
1874 default: t << c;
1875 }
1876 }
1877 }
1878}
1879
1880void HtmlGenerator::codify(const char *str)
1881{
1882 //docify(str);
1883 //static char spaces[]=" ";
1884 if (str)
1885 {
1886 const char *p=str;
1887 char c;
1888 int spacesToNextTabStop;
1889 while (*p)
1890 {
1891 c=*p++;
1892 switch(c)
1893 {
1894 case '\t': spacesToNextTabStop =
1895 Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
1896 t << Doxygen::spaces.left(spacesToNextTabStop);
1897 col+=spacesToNextTabStop;
1898 break;
1899 case '\n': t << "\n"; col=0;
1900 break;
1901 //case '\n': t << "<br>"; col=0;
1902 // break;
1903 case '\r': break;
1904 case '<': t << "&lt;"; col++;
1905 break;
1906 case '>': t << "&gt;"; col++;
1907 break;
1908 case '&': t << "&amp;"; col++;
1909 break;
1910 case '\'': t << "&#39;"; col++; // &apos; is not valid HTML
1911 break;
1912 case '"': t << "&quot;"; col++;
1913 break;
1914 //case ' ': t << "&#160;"; col++;
1915 // break;
1916 case '\\':
1917 if (*p=='<')
1918 { t << "&lt;"; p++; }
1919 else if (*p=='>')
1920 { t << "&gt;"; p++; }
1921 else
1922 t << "\\";
1923 col++;
1924 break;
1925 default: t << c;
1926 col++;
1927 break;
1928 }
1929 }
1930 }
1931}
1932
1933void HtmlGenerator::writeChar(char c)
1934{
1935 char cs[2];
1936 cs[0]=c;
1937 cs[1]=0;
1938 docify(cs);
1939}
1940
1941//--- helper function for dynamic sections -------------------------
1942
1943static void startSectionHeader(FTextStream &t,
1944 const QCString &relPath,int sectionCount)
1945{
1946 //t << "<!-- startSectionHeader -->";
1947 static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1948 if (dynamicSections)
1949 {
1950 t << "<div id=\"dynsection-" << sectionCount << "\" "
1951 "onclick=\"return toggleVisibility(this)\" "
1952 "class=\"dynheader closed\" "
1953 "style=\"cursor:pointer;\">" << endl;
1954 t << " <img id=\"dynsection-" << sectionCount << "-trigger\" src=\""
1955 << relPath << "closed.png\"/> ";
1956 }
1957 else
1958 {
1959 t << "<div class=\"dynheader\">" << endl;
1960 }
1961}
1962
1963static void endSectionHeader(FTextStream &t)
1964{
1965 //t << "<!-- endSectionHeader -->";
1966 t << "</div>" << endl;
1967}
1968
1969static void startSectionSummary(FTextStream &t,int sectionCount)
1970{
1971 //t << "<!-- startSectionSummary -->";
1972 static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1973 if (dynamicSections)
1974 {
1975 t << "<div id=\"dynsection-" << sectionCount << "-summary\" "
1976 "class=\"dynsummary\" "
1977 "style=\"display:block;\">" << endl;
1978 }
1979}
1980
1981static void endSectionSummary(FTextStream &t)
1982{
1983 //t << "<!-- endSectionSummary -->";
1984 static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1985 if (dynamicSections)
1986 {
1987 t << "</div>" << endl;
1988 }
1989}
1990
1991static void startSectionContent(FTextStream &t,int sectionCount)
1992{
1993 //t << "<!-- startSectionContent -->";
1994 static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1995 if (dynamicSections)
1996 {
1997 t << "<div id=\"dynsection-" << sectionCount << "-content\" "
1998 "class=\"dyncontent\" "
1999 "style=\"display:none;\">" << endl;
2000 }
2001 else
2002 {
2003 t << "<div class=\"dyncontent\">" << endl;
2004 }
2005}
2006
2007static void endSectionContent(FTextStream &t)
2008{
2009 //t << "<!-- endSectionContent -->";
2010 t << "</div>" << endl;
2011}
2012
2013//----------------------------
2014
2015void HtmlGenerator::startClassDiagram()
2016{
2017 startSectionHeader(t,relPath,m_sectionCount);
2018}
2019
2020void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
2021 const char *fileName,const char *name)
2022{
2023 endSectionHeader(t);
2024 startSectionSummary(t,m_sectionCount);
2025 endSectionSummary(t);
2026 startSectionContent(t,m_sectionCount);
2027 t << " <div class=\"center\">" << endl;
2028 t << " <img src=\"";
2029 t << relPath << fileName << ".png\" usemap=\"#";
2030 docify(name);
2031 t << "_map\" alt=\"\"/>" << endl;
2032 t << " <map id=\"";
2033 docify(name);
2034 t << "_map\" name=\"";
2035 docify(name);
2036 t << "_map\">" << endl;
2037
2038 d.writeImage(t,dir,relPath,fileName);
2039 t << " </div>";
2040 endSectionContent(t);
2041 m_sectionCount++;
2042}
2043
2044
2045void HtmlGenerator::startMemberList()
2046{
2047 DBG_HTML(t << "<!-- startMemberList -->" << endl)
2048 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2049 {
2050 }
2051 else
2052 {
2053 t << "<ul>" << endl;
2054 }
2055}
2056
2057void HtmlGenerator::endMemberList()
2058{
2059 DBG_HTML(t << "<!-- endMemberList -->" << endl)
2060 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2061 {
2062 }
2063 else
2064 {
2065 t << "</ul>" << endl;
2066 }
2067}
2068
2069// anonymous type:
2070// 0 = single column right aligned
2071// 1 = double column left aligned
2072// 2 = single column left aligned
2073void HtmlGenerator::startMemberItem(int annoType)
2074{
2075 DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
2076 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2077 {
2078 t << "<tr>";
2079 switch(annoType)
2080 {
2081 case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
2082 case 1: t << "<td class=\"memItemLeft\" >"; break;
2083 case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
2084 default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
2085 }
2086 }
2087 else
2088 {
2089 t << "<li>";
2090 }
2091}
2092
2093void HtmlGenerator::endMemberItem()
2094{
2095 //DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
2096 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2097 {
2098 t << "</td></tr>";
2099 }
2100 t << endl;
2101}
2102
2103void HtmlGenerator::startMemberTemplateParams()
2104{
2105}
2106
2107void HtmlGenerator::endMemberTemplateParams()
2108{
2109 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2110 {
2111 t << "</td></tr>" << endl;
2112 t << "<tr><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
2113 }
2114}
2115
2116
2117void HtmlGenerator::insertMemberAlign(bool templ)
2118{
2119 DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
2120 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2121 {
2122 QCString className = templ ? "memTemplItemRight" : "memItemRight";
2123 t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
2124 }
2125}
2126
2127void HtmlGenerator::startMemberDescription()
2128{
2129 DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
2130 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2131 {
2132 t << "<tr><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
2133 }
2134 else
2135 {
2136 t << "<dl class=\"el\"><dd class=\"mdescRight\">";
2137 }
2138}
2139
2140void HtmlGenerator::endMemberDescription()
2141{
2142 DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
2143 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2144 {
2145 t << "<br/></td></tr>" << endl;
2146 }
2147 else
2148 {
2149 t << "<br/></dl>";
2150 }
2151}
2152
2153void HtmlGenerator::startMemberSections()
2154{
2155 DBG_HTML(t << "<!-- startMemberSections -->" << endl)
2156 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2157 {
2158 t << "<table class=\"memberdecls\">" << endl;
2159 // HTML is not recursively decomposable, sorry
2160 //t << "<tr><td></td></tr>" << endl;
2161 }
2162}
2163
2164void HtmlGenerator::endMemberSections()
2165{
2166 DBG_HTML(t << "<!-- endMemberSections -->" << endl)
2167 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2168 {
2169 t << "</table>" << endl;
2170 }
2171}
2172
2173void HtmlGenerator::startMemberHeader(const char *anchor)
2174{
2175 DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
2176 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2177 {
2178 t << "<tr><td colspan=\"2\"><h2>";
2179 }
2180 else
2181 {
2182 startGroupHeader(FALSE);
2183 }
2184 if (anchor)
2185 {
2186 t << "<a name=\"" << anchor << "\"></a>" << endl;
2187 }
2188}
2189
2190void HtmlGenerator::endMemberHeader()
2191{
2192 DBG_HTML(t << "<!-- endMemberHeader -->" << endl)
2193 if (Config_getBool("HTML_ALIGN_MEMBERS"))
2194 {
2195 t << "</h2></td></tr>" << endl;
2196 }
2197 else
2198 {
2199 endGroupHeader(FALSE);
2200 }
2201}
2202
2203void HtmlGenerator::startMemberSubtitle()
2204{
2205 DBG_HTML(t << "<!-- startMemberSubtitle -->" << endl)
2206 if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<tr><td class=\"ititle\" colspan=\"2\">";
2207}
2208
2209void HtmlGenerator::endMemberSubtitle()
2210{
2211 DBG_HTML(t << "<!-- endMemberSubtitle -->" << endl)
2212 if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "</td></tr>" << endl;
2213}
2214
2215void HtmlGenerator::startIndexList()
2216{
2217 t << "<table>" << endl;
2218}
2219
2220void HtmlGenerator::endIndexList()
2221{
2222 t << "</table>" << endl;
2223}
2224
2225void HtmlGenerator::startIndexKey()
2226{
2227 // inserted 'class = ...', 02 jan 2002, jh
2228 t << " <tr><td class=\"indexkey\">";
2229}
2230
2231void HtmlGenerator::endIndexKey()
2232{
2233 t << "</td>";
2234}
2235
2236void HtmlGenerator::startIndexValue(bool)
2237{
2238 // inserted 'class = ...', 02 jan 2002, jh
2239 t << "<td class=\"indexvalue\">";
2240}
2241
2242void HtmlGenerator::endIndexValue(const char *,bool)
2243{
2244 t << "</td></tr>" << endl;
2245}
2246
2247void HtmlGenerator::startMemberDocList()
2248{
2249 DBG_HTML(t << "<!-- startMemberDocList -->" << endl;)
2250}
2251
2252void HtmlGenerator::endMemberDocList()
2253{
2254 DBG_HTML(t << "<!-- endMemberDocList -->" << endl;)
2255}
2256
2257void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *,bool)
2258{
2259 DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
2260
2261 t << "\n<div class=\"memitem\">" << endl;
2262 t << "<div class=\"memproto\">" << endl;
2263}
2264
2265void HtmlGenerator::startMemberDocPrefixItem()
2266{
2267 DBG_HTML(t << "<!-- startMemberDocPrefixItem -->" << endl;)
2268 t << "<div class=\"memtemplate\">" << endl;
2269}
2270
2271void HtmlGenerator::endMemberDocPrefixItem()
2272{
2273 DBG_HTML(t << "<!-- endMemberDocPrefixItem -->" << endl;)
2274 t << "</div>" << endl;
2275}
2276
2277void HtmlGenerator::startMemberDocName(bool /*align*/)
2278{
2279 DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
2280
2281 t << " <table class=\"memname\">" << endl;
2282
2283 t << " <tr>" << endl;
2284 t << " <td class=\"memname\">";
2285}
2286
2287void HtmlGenerator::endMemberDocName()
2288{
2289 DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
2290 t << "</td>" << endl;
2291}
2292
2293void HtmlGenerator::startParameterList(bool openBracket)
2294{
2295 DBG_HTML(t << "<!-- startParameterList -->" << endl;)
2296 t << " <td>";
2297 if (openBracket) t << "(";
2298 t << "</td>" << endl;
2299}
2300
2301void HtmlGenerator::startParameterType(bool first,const char *key)
2302{
2303 if (first)
2304 {
2305 DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;)
2306 t << " <td class=\"paramtype\">";
2307 }
2308 else
2309 {
2310 DBG_HTML(t << "<!-- startParameterType -->" << endl;)
2311 t << " <tr>" << endl;
2312 t << " <td class=\"paramkey\">";
2313 if (key) t << key;
2314 t << "</td>" << endl;
2315 t << " <td></td>" << endl;
2316 t << " <td class=\"paramtype\">";
2317 }
2318}
2319
2320void HtmlGenerator::endParameterType()
2321{
2322 DBG_HTML(t << "<!-- endParameterType -->" << endl;)
2323 t << "&#160;</td>" << endl;
2324}
2325
2326void HtmlGenerator::startParameterName(bool /*oneArgOnly*/)
2327{
2328 DBG_HTML(t << "<!-- startParameterName -->" << endl;)
2329 t << " <td class=\"paramname\">";
2330}
2331
2332void HtmlGenerator::endParameterName(bool last,bool emptyList,bool closeBracket)
2333{
2334 DBG_HTML(t << "<!-- endParameterName -->" << endl;)
2335 if (last)
2336 {
2337 if (emptyList)
2338 {
2339 if (closeBracket) t << "</td><td>)";
2340 t << "</td>" << endl;
2341 t << " <td>";
2342 }
2343 else
2344 {
2345 t << "&#160;</td>" << endl;
2346 t << " </tr>" << endl;
2347 t << " <tr>" << endl;
2348 t << " <td></td>" << endl;
2349 t << " <td>";
2350 if (closeBracket) t << ")";
2351 t << "</td>" << endl;
2352 t << " <td></td><td>";
2353 }
2354 }
2355 else
2356 {
2357 t << "</td>" << endl;
2358 t << " </tr>" << endl;
2359 }
2360}
2361
2362void HtmlGenerator::endParameterList()
2363{
2364 DBG_HTML(t << "<!-- endParameterList -->" << endl;)
2365 t << "</td>" << endl;
2366 t << " </tr>" << endl;
2367}
2368
2369void HtmlGenerator::endMemberDoc(bool hasArgs)
2370{
2371 DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
2372 if (!hasArgs)
2373 {
2374 t << " </tr>" << endl;
2375 }
2376 t << " </table>" << endl;
2377 t << "</div>" << endl;
2378}
2379
2380void HtmlGenerator::startDotGraph()
2381{
2382 startSectionHeader(t,relPath,m_sectionCount);
2383}
2384
2385void HtmlGenerator::endDotGraph(const DotClassGraph &g)
2386{
2387 endSectionHeader(t);
2388 startSectionSummary(t,m_sectionCount);
2389 endSectionSummary(t);
2390 startSectionContent(t,m_sectionCount);
2391
2392 g.writeGraph(t,BITMAP,dir,fileName,relPath);
2393 if (Config_getBool("GENERATE_LEGEND"))
2394 {
2395 t << "<center><span class=\"legend\">[";
2396 startHtmlLink(relPath+"graph_legend"+Doxygen::htmlFileExtension);
2397 t << theTranslator->trLegend();
2398 endHtmlLink();
2399 t << "]</span></center>";
2400 }
2401
2402 endSectionContent(t);
2403 m_sectionCount++;
2404}
2405
2406void HtmlGenerator::startInclDepGraph()
2407{
2408 startSectionHeader(t,relPath,m_sectionCount);
2409}
2410
2411void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g)
2412{
2413 endSectionHeader(t);
2414 startSectionSummary(t,m_sectionCount);
2415 endSectionSummary(t);
2416 startSectionContent(t,m_sectionCount);
2417
2418 g.writeGraph(t,BITMAP,dir,fileName,relPath);
2419
2420 endSectionContent(t);
2421 m_sectionCount++;
2422}
2423
2424void HtmlGenerator::startGroupCollaboration()
2425{
2426 startSectionHeader(t,relPath,m_sectionCount);
2427}
2428
2429void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
2430{
2431 endSectionHeader(t);
2432 startSectionSummary(t,m_sectionCount);
2433 endSectionSummary(t);
2434 startSectionContent(t,m_sectionCount);
2435
2436 g.writeGraph(t,BITMAP,dir,fileName,relPath);
2437
2438 endSectionContent(t);
2439 m_sectionCount++;
2440}
2441
2442void HtmlGenerator::startCallGraph()
2443{
2444 startSectionHeader(t,relPath,m_sectionCount);
2445}
2446
2447void HtmlGenerator::endCallGraph(const DotCallGraph &g)
2448{
2449 endSectionHeader(t);
2450 startSectionSummary(t,m_sectionCount);
2451 endSectionSummary(t);
2452 startSectionContent(t,m_sectionCount);
2453
2454 g.writeGraph(t,BITMAP,dir,fileName,relPath);
2455
2456 endSectionContent(t);
2457 m_sectionCount++;
2458}
2459
2460void HtmlGenerator::startDirDepGraph()
2461{
2462 startSectionHeader(t,relPath,m_sectionCount);
2463}
2464
2465void HtmlGenerator::endDirDepGraph(const DotDirDeps &g)
2466{
2467 endSectionHeader(t);
2468 startSectionSummary(t,m_sectionCount);
2469 endSectionSummary(t);
2470 startSectionContent(t,m_sectionCount);
2471
2472 g.writeGraph(t,BITMAP,dir,fileName,relPath);
2473
2474 endSectionContent(t);
2475 m_sectionCount++;
2476}
2477
2478void HtmlGenerator::writeGraphicalHierarchy(const DotGfxHierarchyTable &g)
2479{
2480 g.writeGraph(t,dir,fileName);
2481}
2482
2483void HtmlGenerator::startMemberGroupHeader(bool)
2484{
2485 t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
2486}
2487
2488void HtmlGenerator::endMemberGroupHeader()
2489{
2490 t << "</div></td></tr>" << endl;
2491}
2492
2493void HtmlGenerator::startMemberGroupDocs()
2494{
2495 t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
2496}
2497
2498void HtmlGenerator::endMemberGroupDocs()
2499{
2500 t << "</div></td></tr>" << endl;
2501}
2502
2503void HtmlGenerator::startMemberGroup()
2504{
2505}
2506
2507void HtmlGenerator::endMemberGroup(bool)
2508{
2509}
2510
2511void HtmlGenerator::startIndent()
2512{
2513 DBG_HTML(t << "<!-- startIndent -->" << endl;)
2514
2515 t << "<div class=\"memdoc\">\n";
2516}
2517
2518void HtmlGenerator::endIndent()
2519{
2520 DBG_HTML(t << "<!-- endIndent -->" << endl;)
2521 t << endl << "</div>" << endl << "</div>" << endl;
2522}
2523
2524void HtmlGenerator::addIndexItem(const char *,const char *)
2525{
2526}
2527
2528void HtmlGenerator::writeNonBreakableSpace(int n)
2529{
2530 int i;
2531 for (i=0;i<n;i++)
2532 {
2533 t << "&#160;";
2534 }
2535}
2536
2537void HtmlGenerator::writeLineNumber(const char *ref,const char *filename,
2538 const char *anchor,int l)
2539{
2540 QCString lineNumber,lineAnchor;
2541 lineNumber.sprintf("%05d",l);
2542 lineAnchor.sprintf("l%05d",l);
2543
2544 if (filename)
2545 {
2546 startCodeAnchor(lineAnchor);
2547 writeCodeLink(ref,filename,anchor,lineNumber,0);
2548 endCodeAnchor();
2549 }
2550 else
2551 {
2552 startCodeAnchor(lineAnchor);
2553 codify(lineNumber);
2554 endCodeAnchor();
2555 }
2556 codify(" ");
2557}
2558
2559void HtmlGenerator::startSimpleSect(SectionTypes,
2560 const char *filename,const char *anchor,
2561 const char *title)
2562{
2563 t << "<dl><dt><b>";
2564 if (filename)
2565 {
2566 writeObjectLink(0,filename,anchor,title);
2567 }
2568 else
2569 {
2570 docify(title);
2571 }
2572 t << "</b></dt>";
2573}
2574
2575void HtmlGenerator::endSimpleSect()
2576{
2577 t << "</dl>";
2578}
2579
2580void HtmlGenerator::startParamList(ParamListTypes,
2581 const char *title)
2582{
2583 t << "<dl><dt><b>";
2584 docify(title);
2585 t << "</b></dt>";
2586}
2587
2588void HtmlGenerator::endParamList()
2589{
2590 t << "</dl>";
2591}
2592
2593void HtmlGenerator::printDoc(DocNode *n,const char *langExt)
2594{
2595 HtmlDocVisitor *visitor = new HtmlDocVisitor(t,*this,langExt);
2596 n->accept(visitor);
2597 delete visitor;
2598}
2599
2600//---------------- helpers for index generation -----------------------------
2601
2602static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
2603{
2604 if (compact)
2605 {
2606 if (topLevel)
2607 {
2608 t << " <div id=\"navrow1\" class=\"tabs\">\n";
2609 }
2610 else
2611 {
2612 t << " <div id=\"navrow2\" class=\"tabs2\">\n";
2613 }
2614 t << " <ul class=\"tablist\">\n";
2615 }
2616 else
2617 {
2618 t << "<ul>";
2619 }
2620}
2621
2622static void endQuickIndexList(FTextStream &t,bool compact)
2623{
2624 if (compact)
2625 {
2626 t << " </ul>\n";
2627 t << " </div>\n";
2628 }
2629 else
2630 {
2631 t << "</ul>\n";
2632 }
2633}
2634
2635static void startQuickIndexItem(FTextStream &t,const char *l,
2636 bool hl,bool /*compact*/,
2637 const QCString &relPath)
2638{
2639 //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2640 t << " <li";
2641 if (hl)
2642 {
2643 t << " class=\"current\"";
2644 //if (generateTreeView)
2645 //{
2646 // t << " onmouseover=\"return navShow('" << l << "')\"";
2647 //}
2648 }
2649 t << "><a ";
2650 t << "href=\"" << relPath << l << "\">";
2651 t << "<span>";
2652}
2653
2654static void endQuickIndexItem(FTextStream &t)
2655{
2656 t << "</span>";
2657 t << "</a>";
2658 t << "</li>\n";
2659}
2660
2661static QCString fixSpaces(const QCString &s)
2662{
2663 return substitute(s," ","&#160;");
2664}
2665
2666static bool quickLinkVisible(LayoutNavEntry::Kind kind)
2667{
2668 switch (kind)
2669 {
2670 case LayoutNavEntry::MainPage: return TRUE;
2671 case LayoutNavEntry::Pages: return indexedPages>0;
2672 case LayoutNavEntry::Modules: return documentedGroups>0;
2673 case LayoutNavEntry::Namespaces: return documentedNamespaces>0;
2674 case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0;
2675 case LayoutNavEntry::Classes: return annotatedClasses>0;
2676 case LayoutNavEntry::ClassAnnotated: return annotatedClasses>0;
2677 case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0;
2678 case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0;
2679 case LayoutNavEntry::Files: return documentedHtmlFiles>0;
2680 case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0;
2681 case LayoutNavEntry::Dirs: return documentedDirs>0;
2682 case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0;
2683 }
2684 return FALSE;
2685}
2686
2687static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,LayoutNavEntry *root)
2688
2689{
2690 QListIterator<LayoutNavEntry> li(root->children());
2691 LayoutNavEntry *entry;
2692 int count=0;
2693 for (li.toFirst();(entry=li.current());++li)
2694 {
2695 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
2696 }
2697 if (count>0) // at least one item is visible
2698 {
2699 startQuickIndexList(t,FALSE);
2700 for (li.toFirst();(entry=li.current());++li)
2701 {
2702 if (entry->visible() && quickLinkVisible(entry->kind()))
2703 {
2704 startQuickIndexItem(t,entry->baseFile()+Doxygen::htmlFileExtension,
2705 FALSE,FALSE,relPath);
2706 t << fixSpaces(entry->title());
2707 // recursive into child list
2708 renderQuickLinksAsTree(t,relPath,entry);
2709 endQuickIndexItem(t);
2710 }
2711 }
2712 endQuickIndexList(t,FALSE);
2713 }
2714}
2715
2716
2717static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
2718 LayoutNavEntry *hlEntry,LayoutNavEntry::Kind kind,
2719 bool highlightParent,bool highlightSearch)
2720{
2721 //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2722 if (hlEntry->parent()) // first draw the tabs for the parent of hlEntry
2723 {
2724 renderQuickLinksAsTabs(t,relPath,hlEntry->parent(),kind,highlightParent,highlightSearch);
2725 }
2726 if (hlEntry->parent() && hlEntry->parent()->children().count()>0) // draw tabs for row containing hlEntry
2727 {
2728 bool topLevel = hlEntry->parent()->parent()==0;
2729 QListIterator<LayoutNavEntry> li(hlEntry->parent()->children());
2730 LayoutNavEntry *entry;
2731
2732 int count=0;
2733 for (li.toFirst();(entry=li.current());++li)
2734 {
2735 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
2736 }
2737 if (count>0) // at least one item is visible
2738 {
2739 startQuickIndexList(t,TRUE,topLevel);
2740 for (li.toFirst();(entry=li.current());++li)
2741 {
2742 if (entry->visible() && quickLinkVisible(entry->kind()))
2743 {
2744 startQuickIndexItem(t,entry->baseFile()+Doxygen::htmlFileExtension,
2745 entry==hlEntry &&
2746 (entry->children().count()>0 ||
2747 (entry->kind()==kind && !highlightParent)
2748 ),
2749 TRUE,relPath);
2750 t << fixSpaces(entry->title());
2751 endQuickIndexItem(t);
2752 }
2753 }
2754 if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry())
2755 {
2756 //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2757 static bool searchEngine = Config_getBool("SEARCHENGINE");
2758 static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
2759 if (searchEngine /* && !generateTreeView */)
2760 {
2761 if (!serverBasedSearch) // pure client side search
2762 {
2763 t << " <li id=\"searchli\">\n";
2764 writeClientSearchBox(t,relPath);
2765 t << " </li>\n";
2766 }
2767 else // if (!generateTreeView) // server based search
2768 {
2769 t << " <li id=\"searchli\">\n";
2770 writeServerSearchBox(t,relPath,highlightSearch);
2771 if (!highlightSearch)
2772 {
2773 t << " </li>\n";
2774 }
2775 }
2776 }
2777 if (!highlightSearch) // on the search page the page will be ended by the
2778 // page itself
2779 {
2780 endQuickIndexList(t,TRUE);
2781 }
2782 }
2783 else // normal case
2784 {
2785 endQuickIndexList(t,TRUE);
2786 }
2787 }
2788#if 0
2789 if (generateTreeView)
2790 {
2791 // add empty rows for the dynamic menus (max 4 levels)
2792 t << " <div id=\"navrow2\" class=\"tabs2\">\n";
2793 t << " </div>\n";
2794 t << " <div id=\"navrow3\" class=\"tabs3\">\n";
2795 t << " </div>\n";
2796 t << " <div id=\"navrow4\" class=\"tabs3\">\n";
2797 t << " </div>\n";
2798 }
2799#endif
2800 }
2801}
2802
2803static void writeDefaultQuickLinks(FTextStream &t,bool compact,
2804 HighlightedItem hli,const QCString &relPath)
2805{
2806 LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
2807 LayoutNavEntry::Kind kind = (LayoutNavEntry::Kind)-1;
2808 bool highlightParent=FALSE;
2809 switch (hli) // map HLI enums to LayoutNavEntry::Kind enums
2810 {
2811 case HLI_Main: kind = LayoutNavEntry::MainPage; break;
2812 case HLI_Modules: kind = LayoutNavEntry::Modules; break;
2813 case HLI_Directories: kind = LayoutNavEntry::Dirs; break;
2814 case HLI_Namespaces: kind = LayoutNavEntry::Namespaces; break;
2815 case HLI_Hierarchy: kind = LayoutNavEntry::ClassHierarchy; break;
2816 case HLI_Classes: kind = LayoutNavEntry::Classes; break;
2817 case HLI_Annotated: kind = LayoutNavEntry::ClassAnnotated; break;
2818 case HLI_Files: kind = LayoutNavEntry::Files; break;
2819 case HLI_NamespaceMembers: kind = LayoutNavEntry::NamespaceMembers; break;
2820 case HLI_Functions: kind = LayoutNavEntry::ClassMembers; break;
2821 case HLI_Globals: kind = LayoutNavEntry::FileGlobals; break;
2822 case HLI_Pages: kind = LayoutNavEntry::Pages; break;
2823 case HLI_Examples: kind = LayoutNavEntry::Examples; break;
2824 case HLI_ClassVisible: kind = LayoutNavEntry::Classes; highlightParent = TRUE; break;
2825 case HLI_NamespaceVisible: kind = LayoutNavEntry::Namespaces; highlightParent = TRUE; break;
2826 case HLI_FileVisible: kind = LayoutNavEntry::Files; highlightParent = TRUE; break;
2827 case HLI_None: break;
2828 case HLI_Search: break;
2829 }
2830
2831 if (compact)
2832 {
2833 // find highlighted index item
2834 LayoutNavEntry *hlEntry = root->find(kind);
2835 if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
2836 {
2837 highlightParent=TRUE;
2838 hlEntry = root->children().getFirst();
2839 if (hlEntry==0)
2840 {
2841 return; // argl, empty index!
2842 }
2843 }
2844 renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HLI_Search);
2845 }
2846 else
2847 {
2848 renderQuickLinksAsTree(t,relPath,root);
2849 }
2850}
2851
2852void HtmlGenerator::startQuickIndices()
2853{
2854 static bool customHeader = !Config_getString("HTML_HEADER").isEmpty();
2855 static QCString projectName = Config_getString("PROJECT_NAME");
2856 static QCString projectBrief = Config_getString("PROJECT_BRIEF");
2857 static QCString projectNumber = Config_getString("PROJECT_NUMBER");
2858 static QCString projectLogo = Config_getString("PROJECT_LOGO");
2859
2860 if (!customHeader)
2861 {
2862 t << "<div id=\"top\"";
2863 //if (generateTreeView)
2864 //{
2865 // t << " onmouseout=\"return navLeave()\" onmouseover=\"navEnter()\"";
2866 //}
2867 t << ">" << endl;
2868 writeTitleArea(t,relPath,projectName,projectBrief,projectNumber,projectLogo);
2869 }
2870}
2871
2872void HtmlGenerator::endQuickIndices()
2873{
2874 t << "</div>" << endl;
2875}
2876
2877QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpath)
2878{
2879 static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2880 QCString result;
2881 // write split bar
2882 if (generateTreeView)
2883 {
2884 result = QCString(
2885 "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
2886 " <div id=\"nav-tree\">\n"
2887 " <div id=\"nav-tree-contents\">\n"
2888 " </div>\n"
2889 " </div>\n"
2890 " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
2891 " class=\"ui-resizable-handle\">\n"
2892 " </div>\n"
2893 "</div>\n"
2894 "<script type=\"text/javascript\">\n"
2895 " initNavTree('") +
2896 QCString(name) + Doxygen::htmlFileExtension +
2897 QCString("','") + relpath +
2898 QCString("');\n"
2899 "</script>\n"
2900 "<div id=\"doc-content\">\n");
2901 }
2902 return result;
2903}
2904
2905void HtmlGenerator::writeSplitBar(const char *name)
2906{
2907 t << writeSplitBarAsString(name,relPath);
2908}
2909
2910void HtmlGenerator::startContents()
2911{
2912 t << "<div class=\"contents\">" << endl;
2913}
2914
2915void HtmlGenerator::endContents()
2916{
2917 t << "</div>" << endl;
2918}
2919
2920void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli)
2921{
2922 writeDefaultQuickLinks(t,compact,hli,relPath);
2923}
2924
2925// PHP based search script
2926void HtmlGenerator::writeSearchPage()
2927{
2928 static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2929 static QCString projectName = Config_getString("PROJECT_NAME");
2930 static QCString projectBrief = Config_getString("PROJECT_BRIEF");
2931 static QCString projectNumber = Config_getString("PROJECT_NUMBER");
2932 static QCString projectLogo = Config_getString("PROJECT_LOGO");
2933 QCString fileName = Config_getString("HTML_OUTPUT")+"/search.php";
2934 QFile f(fileName);
2935 if (f.open(IO_WriteOnly))
2936 {
2937 FTextStream t(&f);
2938 if (g_header.isEmpty())
2939 {
2940 writeDefaultHeaderFile(t,"search",theTranslator->trSearch().data(),0,FALSE,TRUE);
2941 }
2942 else
2943 {
2944 t << substituteHtmlKeywords(g_header,"Search","");
2945 }
2946
2947 t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
2948 << versionString << " -->" << endl;
2949 //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2950 static bool searchEngine = Config_getBool("SEARCHENGINE");
2951 if (searchEngine /* && !generateTreeView*/)
2952 {
2953 t << "<script type=\"text/javascript\"><!--\n";
2954 t << "var searchBox = new SearchBox(\"searchBox\", \""
2955 << "search\",false,'" << theTranslator->trSearch() << "');\n";
2956 t << "--></script>\n";
2957 }
2958 t << "<div id=\"top\">" << endl;
2959 writeTitleArea(t,"",projectName,projectBrief,projectNumber,projectLogo);
2960 if (!Config_getBool("DISABLE_INDEX"))
2961 {
2962 writeDefaultQuickLinks(t,TRUE,HLI_Search,"");
2963 }
2964 else
2965 {
2966 //t << "&#160;\n<div class=\"qindex\">\n";
2967 //t << " <form class=\"search\" action=\"search.php\" "
2968 // << "method=\"get\">\n";
2969 t << "</div>" << endl;
2970 }
2971
2972 t << "\n<script language=\"php\">\n\n";
2973 t << "function search_results()\n";
2974 t << "{\n";
2975 t << " return \"" << theTranslator->trSearchResultsTitle() << "\";\n";
2976 t << "}\n";
2977 t << "\n";
2978 t << "function matches_text($num)\n";
2979 t << "{\n";
2980 t << " if ($num==0)\n";
2981 t << " {\n";
2982 t << " return \"" << theTranslator->trSearchResults(0) << "\";\n";
2983 t << " }\n";
2984 t << " else if ($num==1)\n";
2985 t << " {\n";
2986 t << " return \"" << theTranslator->trSearchResults(1) << "\";\n";
2987 t << " }\n";
2988 t << " else // $num>1\n";
2989 t << " {\n";
2990 t << " return \"" << theTranslator->trSearchResults(2) << "\";\n";
2991 t << " }\n";
2992 t << "}\n";
2993 t << "\n";
2994 t << "function report_matches()\n";
2995 t << "{\n";
2996 t << " return \"" << theTranslator->trSearchMatches() << " \";\n";
2997 t << "}\n";
2998 t << "function end_form($value)\n";
2999 t << "{\n";
3000 t << " echo \"";
3001 if (!Config_getBool("DISABLE_INDEX"))
3002 {
3003 t << " <input type=\\\"text\\\" id=\\\"MSearchField\\\" name=\\\"query\\\" value=\\\"$value\\\" size=\\\"20\\\" accesskey=\\\"S\\\" "
3004 << "onfocus=\\\"searchBox.OnSearchFieldFocus(true)\\\" "
3005 << "onblur=\\\"searchBox.OnSearchFieldFocus(false)\\\"/>\\n"
3006 << " </form>\\n"
3007 << " </span><span class=\\\"right\\\"></span>\\n"
3008 << " </div>\\n"
3009 << " </li>\\n"
3010 << " </ul>\\n"
3011 << " </div>\\n";
3012 t << "</div>\\n";
3013 }
3014 if (generateTreeView)
3015 {
3016 t << substitute(substitute(writeSplitBarAsString("",""),
3017 "\"","\\\""),
3018 "\n","\\n");
3019 }
3020 t << "\";\n";
3021 t << "}\n";
3022 t << "function end_page()\n";
3023 t << "{\n";
3024 t << " echo \"";
3025 if (generateTreeView)
3026 {
3027 t << "</div>\\n";
3028 t << "<div id=\\\"nav-path\\\" class=\\\"navpath\\\">\\n";
3029 t << " <ul>\\n";
3030 t << " <li class=\\\"footer\\\">";
3031 t << substitute(substitute(writeLogoAsString(""),
3032 "\"","\\\""),
3033 "\n","\\n");
3034 t << "</li>\\n";
3035 t << " </ul>\\n";
3036 t << "</div>\\n";
3037 }
3038 t << "</body></html>\";\n";
3039 t << "}\n";
3040 t << "\n";
3041 t << search_script;
3042 t << "\n";
3043 t << "</script>\n";
3044 writePageFooter(t,"Search","");
3045 }
3046 QCString scriptName = Config_getString("HTML_OUTPUT")+"/search/search.js";
3047 QFile sf(scriptName);
3048 if (sf.open(IO_WriteOnly))
3049 {
3050 FTextStream t(&sf);
3051 t << "function SearchBox(name, resultsPath, inFrame, label)\n";
3052 t << "{\n";
3053 t << " this.searchLabel = label;\n";
3054 t << " this.DOMSearchField = function()\n";
3055 t << " { return document.getElementById(\"MSearchField\"); }\n";
3056 t << " this.DOMSearchBox = function()\n";
3057 t << " { return document.getElementById(\"MSearchBox\"); }\n";
3058 t << " this.OnSearchFieldFocus = function(isActive)\n";
3059 t << " {\n";
3060 t << " if (isActive)\n";
3061 t << " {\n";
3062 t << " this.DOMSearchBox().className = 'MSearchBoxActive';\n";
3063 t << " var searchField = this.DOMSearchField();\n";
3064 t << " if (searchField.value == this.searchLabel) \n";
3065 t << " {\n";
3066 t << " searchField.value = '';\n";
3067 t << " }\n";
3068 t << " }\n";
3069 t << " else\n";
3070 t << " {\n";
3071 t << " this.DOMSearchBox().className = 'MSearchBoxInactive';\n";
3072 t << " this.DOMSearchField().value = this.searchLabel;\n";
3073 t << " }\n";
3074 t << " }\n";
3075 t << "}\n";
3076 }
3077 else
3078 {
3079 err("Failed to open file '%s' for writing...\n",scriptName.data());
3080 }
3081
3082}
3083
3084#if 0
3085void HtmlGenerator::generateSectionImages()
3086{
3087 {
3088 QCString fileName = Config_getString("HTML_OUTPUT")+"/open.png";
3089 QFile f(fileName);
3090 if (f.open(IO_WriteOnly))
3091 {
3092 f.writeBlock((char*)open_gif,open_gif_len);
3093 }
3094 Doxygen::indexList.addImageFile("open.png");
3095 }
3096 {
3097 QCString fileName = Config_getString("HTML_OUTPUT")+"/closed.png";
3098 QFile f(fileName);
3099 if (f.open(IO_WriteOnly))
3100 {
3101 f.writeBlock((char*)closed_gif,closed_gif_len);
3102 }
3103 Doxygen::indexList.addImageFile("closed.png");
3104 }
3105}
3106#endif
3107
3108void HtmlGenerator::startConstraintList(const char *header)
3109{
3110 t << "<div class=\"typeconstraint\">" << endl;
3111 t << "<dl><dt><b>" << header << "</b><dt><dd>" << endl;
3112 t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl;
3113}
3114
3115void HtmlGenerator::startConstraintParam()
3116{
3117 t << "<tr><td valign=\"top\"><em>";
3118}
3119
3120void HtmlGenerator::endConstraintParam()
3121{
3122 t << "</em></td>";
3123}
3124
3125void HtmlGenerator::startConstraintType()
3126{
3127 t << "<td>&#160;:</td><td valign=\"top\"><em>";
3128}
3129
3130void HtmlGenerator::endConstraintType()
3131{
3132 t << "</em></td>";
3133}
3134
3135void HtmlGenerator::startConstraintDocs()
3136{
3137 t << "<td>&#160;";
3138}
3139
3140void HtmlGenerator::endConstraintDocs()
3141{
3142 t << "</td></tr>" << endl;
3143}
3144
3145void HtmlGenerator::endConstraintList()
3146{
3147 t << "</table>" << endl;
3148 t << "</dl>" << endl;
3149 t << "</div>" << endl;
3150}
3151
3152void HtmlGenerator::lineBreak(const char *style)
3153{
3154 if (style)
3155 {
3156 t << "<br class=\"" << style << "\"/>" << endl;
3157 }
3158 else
3159 {
3160 t << "<br/>" << endl;
3161 }
3162}
3163
3164void HtmlGenerator::startHeaderSection()
3165{
3166 t << "<div class=\"header\">" << endl;
3167}
3168
3169void HtmlGenerator::startTitleHead(const char *)
3170{
3171 t << " <div class=\"headertitle\">" << endl;
3172 startTitle();
3173}
3174
3175void HtmlGenerator::endTitleHead(const char *,const char *)
3176{
3177 endTitle();
3178 t << " </div>" << endl;
3179}
3180
3181void HtmlGenerator::endHeaderSection()
3182{
3183 t << "</div>" << endl;
3184}
3185
3186void HtmlGenerator::startInlineDescription()
3187{
3188 t << "<tr><td colspan=\"2\">";
3189}
3190
3191void HtmlGenerator::endInlineDescription()
3192{
3193 t << "</td></tr>" << endl;
3194}
3195
3196void HtmlGenerator::startInlineHeader()
3197{
3198 t << "<tr><td colspan=\"2\"><h3>";
3199}
3200
3201void HtmlGenerator::endInlineHeader()
3202{
3203 t << "</h3></td></tr>" << endl;
3204}
3205
3206
3207

Archive Download this file

Revision: 1322