235 static bool serverBasedSearch =
Config_getBool(
"SERVER_BASED_SEARCH");
239 static bool hasProjectName = !projectName.
isEmpty();
240 static bool hasProjectNumber = !
Config_getString(
"PROJECT_NUMBER").isEmpty();
243 static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
248 cssFile =
"doxygen.css";
255 cssFile = cssfi.fileName().utf8();
259 cssFile =
"doxygen.css";
265 for (
uint i=0; i<extraCssFile.
count(); ++i)
273 extraCssText +=
"<link href=\"$relpath^"+
stripPath(
fileName)+
"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
289 treeViewCssJs =
"<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" 290 "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n" 291 "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n" 292 "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n" 293 "<script type=\"text/javascript\">\n" 294 " $(document).ready(initResizable);\n" 295 " $(window).load(resizeHeight);\n" 301 searchCssJs =
"<link href=\"$relpath^search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
302 if (!serverBasedSearch)
304 searchCssJs +=
"<script type=\"text/javascript\" src=\"$relpath^search/searchdata.js\"></script>\n";
306 searchCssJs +=
"<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n";
308 if (!serverBasedSearch)
310 searchCssJs +=
"<script type=\"text/javascript\">\n" 311 " $(document).ready(function() { init_search(); });\n" 316 searchCssJs +=
"<script type=\"text/javascript\">\n" 317 " $(document).ready(function() {\n" 318 " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n" 323 searchCssJs +=
"<link rel=\"search\" href=\"" + relPath +
324 "search_opensearch.php?v=opensearch.xml\" " 325 "type=\"application/opensearchdescription+xml\" title=\"" +
326 (hasProjectName ? projectName :
QCString(
"Doxygen")) +
340 mathJaxJs =
"<script type=\"text/x-mathjax-config\">\n" 341 " MathJax.Hub.Config({\n" 342 " extensions: [\"tex2jax.js\"";
344 const char *s = mathJaxExtensions.
first();
347 mathJaxJs+=
", \""+
QCString(s)+
".js\"";
348 s = mathJaxExtensions.
next();
352 mathJaxFormat =
"HTML-CSS";
355 " jax: [\"input/TeX\",\"output/"+mathJaxFormat+
"\"],\n" 362 mathJaxJs +=
"</script>";
363 mathJaxJs +=
"<script type=\"text/javascript\" src=\"" + path +
"MathJax.js\"></script>\n";
373 result =
substitute(result,
"$navpath",navPath);
374 result =
substitute(result,
"$stylesheet",cssFile);
375 result =
substitute(result,
"$treeview",treeViewCssJs);
376 result =
substitute(result,
"$searchbox",searchBox);
377 result =
substitute(result,
"$search",searchCssJs);
378 result =
substitute(result,
"$mathjax",mathJaxJs);
379 result =
substitute(result,
"$generatedby",generatedBy);
380 result =
substitute(result,
"$extrastylesheet",extraCssText);
381 result =
substitute(result,
"$relpath$",relPath);
382 result =
substitute(result,
"$relpath^",relPath);
385 result =
selectBlock(result,
"DISABLE_INDEX",disableIndex);
386 result =
selectBlock(result,
"GENERATE_TREEVIEW",treeView);
387 result =
selectBlock(result,
"SEARCHENGINE",searchEngine);
388 result =
selectBlock(result,
"TITLEAREA",titleArea);
389 result =
selectBlock(result,
"PROJECT_NAME",hasProjectName);
390 result =
selectBlock(result,
"PROJECT_NUMBER",hasProjectNumber);
391 result =
selectBlock(result,
"PROJECT_BRIEF",hasProjectBrief);
392 result =
selectBlock(result,
"PROJECT_LOGO",hasProjectLogo);
QCString substituteKeywords(const QCString &s, const char *title, const char *projName, const char *projNum, const char *projBrief)
static QCString stripPath(const QCString &s)
#define Config_getList(val)
QCString left(uint len) const
#define Config_getEnum(val)
static QCString removeEmptyLines(const QCString &s)
virtual QCString trGeneratedBy()=0
QCString convertToHtml(const char *s, bool keepEntities)
QCString & prepend(const char *s)
QCString dateToString(bool includeTime)
#define Config_getString(val)
#define Config_getBool(val)
QCString selectBlock(const QCString &s, const QCString &name, bool enable)
virtual QCString trGeneratedAt(const char *date, const char *projName)=0
static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch)
static QCString g_mathjax_code
Translator * theTranslator
The QFileInfo class provides system-independent file information.
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst