Doxygen
Loading...
Searching...
No Matches
htmlgen.cpp File Reference
#include <stdlib.h>
#include <assert.h>
#include <mutex>
#include "message.h"
#include "htmlgen.h"
#include "config.h"
#include "util.h"
#include "doxygen.h"
#include "diagram.h"
#include "version.h"
#include "dot.h"
#include "dotcallgraph.h"
#include "dotclassgraph.h"
#include "dotdirdeps.h"
#include "dotgfxhierarchytable.h"
#include "dotgroupcollaboration.h"
#include "dotincldepgraph.h"
#include "language.h"
#include "htmlhelp.h"
#include "docparser.h"
#include "docnode.h"
#include "htmldocvisitor.h"
#include "searchindex.h"
#include "pagedef.h"
#include "debug.h"
#include "dirdef.h"
#include "vhdldocgen.h"
#include "layout.h"
#include "image.h"
#include "ftvhelp.h"
#include "resourcemgr.h"
#include "tooltip.h"
#include "fileinfo.h"
#include "dir.h"
#include "utf8.h"
#include "textstream.h"
#include "indexlist.h"
#include "datetime.h"
#include "portable.h"
#include "outputlist.h"
#include "stringutil.h"
Include dependency graph for htmlgen.cpp:

Go to the source code of this file.

Macros

#define DBG_HTML(x)

Functions

static void writeClientSearchBox (TextStream &t, const QCString &relPath)
static void writeServerSearchBox (TextStream &t, const QCString &relPath, bool highlightSearch)
static QCString getConvertLatexMacro ()
 Convert a set of LaTeX commands \(re)newcommand to a form readable by MathJax LaTeX syntax:
static QCString getSearchBox (bool serverSide, QCString relPath, bool highlightSearch)
static QCString substituteHtmlKeywords (const QCString &file, const QCString &str, const QCString &title, const QCString &relPath, const QCString &navPath=QCString(), bool isSource=false)
static void fillColorStyleMap (const QCString &definitions, StringUnorderedMap &map)
static void fillColorStyleMaps ()
static QCString replaceVariables (const QCString &input)
static bool hasDateReplacement (const QCString &str)
static void writeDefaultStyleSheet (TextStream &t)
static void startSectionHeader (TextStream &t, const QCString &relPath, int sectionCount)
static void endSectionHeader (TextStream &t)
static void startSectionSummary (TextStream &t, int sectionCount)
static void endSectionSummary (TextStream &t)
static void startSectionContent (TextStream &t, int sectionCount)
static void endSectionContent (TextStream &t)
static void startQuickIndexList (TextStream &t, bool topLevel=TRUE)
static void endQuickIndexList (TextStream &t)
static void startQuickIndexItem (TextStream &t, const QCString &l, bool hl, bool, const QCString &relPath)
static void endQuickIndexItem (TextStream &t, const QCString &l)
static bool quickLinkVisible (LayoutNavEntry::Kind kind)
static void renderQuickLinksAsTree (TextStream &t, const QCString &relPath, LayoutNavEntry *root)
static void renderQuickLinksAsTabs (TextStream &t, const QCString &relPath, LayoutNavEntry *hlEntry, LayoutNavEntry::Kind kind, bool highlightParent, bool highlightSearch)
static void writeDefaultQuickLinks (TextStream &t, HighlightedItem hli, const QCString &file, const QCString &relPath, bool extraTabs)

Variables

static QCString g_header
static QCString g_header_file
static QCString g_footer_file
static QCString g_footer
static QCString g_mathjax_code
static QCString g_latex_macro
static bool g_build_date = false
static constexpr auto hex ="0123456789ABCDEF"
static const SelectionMarkerInfo htmlMarkerInfo = { '<', "<!--BEGIN ",10,"<!--END ",8,"-->",3 }
static StringUnorderedMap g_lightMap
static StringUnorderedMap g_darkMap
static std::mutex g_indexLock

Macro Definition Documentation

◆ DBG_HTML

#define DBG_HTML ( x)

Definition at line 61 of file htmlgen.cpp.

Referenced by HtmlGenerator::endEmbeddedDoc(), HtmlGenerator::endIndent(), HtmlGenerator::endInlineMemberDoc(), HtmlGenerator::endInlineMemberName(), HtmlGenerator::endInlineMemberType(), HtmlGenerator::endLabels(), HtmlGenerator::endMemberDescription(), HtmlGenerator::endMemberDoc(), HtmlGenerator::endMemberDocList(), HtmlGenerator::endMemberDocName(), HtmlGenerator::endMemberDocPrefixItem(), HtmlGenerator::endMemberDocSimple(), HtmlGenerator::endMemberHeader(), HtmlGenerator::endMemberList(), HtmlGenerator::endMemberSections(), HtmlGenerator::endMemberSubtitle(), HtmlGenerator::endParameterExtra(), HtmlGenerator::endParameterList(), HtmlGenerator::endParameterName(), HtmlGenerator::endParameterType(), HtmlGenerator::exceptionEntry(), HtmlGenerator::insertMemberAlign(), HtmlGenerator::startEmbeddedDoc(), HtmlGenerator::startIndent(), HtmlGenerator::startInlineMemberDoc(), HtmlGenerator::startInlineMemberName(), HtmlGenerator::startInlineMemberType(), HtmlGenerator::startLabels(), HtmlGenerator::startMemberDescription(), HtmlGenerator::startMemberDoc(), HtmlGenerator::startMemberDocList(), HtmlGenerator::startMemberDocName(), HtmlGenerator::startMemberDocPrefixItem(), HtmlGenerator::startMemberDocSimple(), HtmlGenerator::startMemberHeader(), HtmlGenerator::startMemberItem(), HtmlGenerator::startMemberList(), HtmlGenerator::startMemberSections(), HtmlGenerator::startMemberSubtitle(), HtmlGenerator::startParameterExtra(), HtmlGenerator::startParameterList(), HtmlGenerator::startParameterName(), HtmlGenerator::startParameterType(), HtmlGenerator::writeInheritedSectionTitle(), and HtmlGenerator::writeLabel().

Function Documentation

◆ endQuickIndexItem()

void endQuickIndexItem ( TextStream & t,
const QCString & l )
static

Definition at line 2841 of file htmlgen.cpp.

2842{
2843 t << "</span>";
2844 if (!l.isEmpty()) t << "</a>";
2845 t << "</li>\n";
2846}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163

References QCString::isEmpty().

Referenced by renderQuickLinksAsTabs().

◆ endQuickIndexList()

void endQuickIndexList ( TextStream & t)
static

Definition at line 2814 of file htmlgen.cpp.

2815{
2816 if (!Config_getBool(DISABLE_INDEX))
2817 {
2818 t << " </ul>\n";
2819 t << " </div>\n";
2820 }
2821 else
2822 {
2823 t << "</ul>\n";
2824 }
2825}
#define Config_getBool(name)
Definition config.h:33

References Config_getBool.

Referenced by renderQuickLinksAsTabs(), and renderQuickLinksAsTree().

◆ endSectionContent()

void endSectionContent ( TextStream & t)
static

Definition at line 2118 of file htmlgen.cpp.

2119{
2120 //t << "<!-- endSectionContent -->";
2121 t << "</div>\n";
2122}

Referenced by HtmlGenerator::endCallGraph(), HtmlGenerator::endClassDiagram(), HtmlGenerator::endDirDepGraph(), HtmlGenerator::endDotGraph(), HtmlGenerator::endGroupCollaboration(), and HtmlGenerator::endInclDepGraph().

◆ endSectionHeader()

void endSectionHeader ( TextStream & t)
static

◆ endSectionSummary()

void endSectionSummary ( TextStream & t)
static

Definition at line 2093 of file htmlgen.cpp.

2094{
2095 //t << "<!-- endSectionSummary -->";
2096 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2097 if (dynamicSections)
2098 {
2099 t << "</div>\n";
2100 }
2101}

References Config_getBool.

Referenced by HtmlGenerator::endCallGraph(), HtmlGenerator::endClassDiagram(), HtmlGenerator::endDirDepGraph(), HtmlGenerator::endDotGraph(), HtmlGenerator::endGroupCollaboration(), and HtmlGenerator::endInclDepGraph().

◆ fillColorStyleMap()

void fillColorStyleMap ( const QCString & definitions,
StringUnorderedMap & map )
static

Definition at line 715 of file htmlgen.cpp.

716{
717 int p=0,i=0;
718 while ((i=definitions.find('\n',p))!=-1)
719 {
720 QCString line = definitions.mid(p,i-p);
721 if (line.startsWith("--"))
722 {
723 int separator = line.find(':');
724 assert(separator!=-1);
725 std::string key = line.left(separator).str();
726 int semi = line.findRev(';');
727 assert(semi!=-1);
728 std::string value = line.mid(separator+1,semi-separator-1).stripWhiteSpace().str();
729 map.emplace(key,value);
730 //printf("var(%s)=%s\n",qPrint(key),qPrint(value));
731 }
732 p=i+1;
733 }
734}
This is an alternative implementation of QCString.
Definition qcstring.h:101
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
bool startsWith(const char *s) const
Definition qcstring.h:507
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:260
const std::string & str() const
Definition qcstring.h:552
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:96
QCString left(size_t len) const
Definition qcstring.h:229

References QCString::find(), QCString::findRev(), QCString::left(), QCString::mid(), QCString::startsWith(), QCString::str(), and QCString::stripWhiteSpace().

Referenced by fillColorStyleMaps().

◆ fillColorStyleMaps()

void fillColorStyleMaps ( )
static

Definition at line 736 of file htmlgen.cpp.

737{
739 auto colorStyle = Config_getEnum(HTML_COLORSTYLE);
740 if (colorStyle==HTML_COLORSTYLE_t::LIGHT)
741 {
742 fillColorStyleMap(replaceColorMarkers(mgr.getAsString("lightmode_settings.css")),g_lightMap);
743 }
744 else if (colorStyle==HTML_COLORSTYLE_t::DARK)
745 {
746 fillColorStyleMap(replaceColorMarkers(mgr.getAsString("darkmode_settings.css")),g_darkMap);
747 }
748}
Singleton for managing resources compiled into an executable.
Definition resourcemgr.h:37
static ResourceMgr & instance()
Returns the one and only instance of this class.
QCString getAsString(const QCString &name) const
Gets the resource data as a C string.
#define Config_getEnum(name)
Definition config.h:35
static void fillColorStyleMap(const QCString &definitions, StringUnorderedMap &map)
Definition htmlgen.cpp:715
static StringUnorderedMap g_lightMap
Definition htmlgen.cpp:712
static StringUnorderedMap g_darkMap
Definition htmlgen.cpp:713
QCString replaceColorMarkers(const QCString &str)
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC,...
Definition util.cpp:5824

References Config_getEnum, fillColorStyleMap(), g_darkMap, g_lightMap, ResourceMgr::getAsString(), ResourceMgr::instance(), and replaceColorMarkers().

Referenced by HtmlGenerator::init(), and HtmlGenerator::writeStyleSheetFile().

◆ getConvertLatexMacro()

QCString getConvertLatexMacro ( )
static

Convert a set of LaTeX commands \(re)newcommand to a form readable by MathJax LaTeX syntax:

\newcommand{\cmd}{replacement}
or
\renewcommand{\cmd}{replacement}

MathJax syntax:

cmd: "{replacement}"

LaTeX syntax:

\newcommand{\cmd}[nr]{replacement}
or
\renewcommand{\cmd}[nr]{replacement}

MathJax syntax:

cmd: ["{replacement}",nr]

Definition at line 142 of file htmlgen.cpp.

143{
144 QCString macrofile = Config_getString(FORMULA_MACROFILE);
145 if (macrofile.isEmpty()) return "";
146 QCString s = fileToString(macrofile);
147 macrofile = FileInfo(macrofile.str()).absFilePath();
148 size_t size = s.length();
149 QCString result;
150 result.reserve(size+8);
151 const char *data = s.data();
152 int line = 1;
153 int cnt = 0;
154 size_t i = 0;
155 QCString nr;
156 while (i < size)
157 {
158 nr = "";
159 // skip initial white space, but count lines
160 while (i < size && (data[i] == ' ' || data[i] == '\t' || data[i] == '\n'))
161 {
162 if (data[i] == '\n') line++;
163 i++;
164 }
165 if (i >= size) break;
166 // check for \newcommand or \renewcommand
167 if (data[i] != '\\')
168 {
169 warn(macrofile,line, "file contains non valid code, expected '\\' got '{:c}'",data[i]);
170 return "";
171 }
172 i++;
173 if (literal_at(data+i,"newcommand"))
174 {
175 i += strlen("newcommand");
176 }
177 else if (literal_at(data+i,"renewcommand"))
178 {
179 i += strlen("renewcommand");
180 }
181 else
182 {
183 warn(macrofile,line, "file contains non valid code, expected 'newcommand' or 'renewcommand'");
184 return "";
185 }
186 // handle {cmd}
187 if (data[i] != '{')
188 {
189 warn(macrofile,line, "file contains non valid code, expected '{{' got '{:c}'",data[i]);
190 return "";
191 }
192 i++;
193 if (data[i] != '\\')
194 {
195 warn(macrofile,line, "file contains non valid code, expected '\\' got '{:c}'",data[i]);
196 return "";
197 }
198 i++;
199 // run till }, i.e. cmd
200 result+=" ";
201 while (i < size && (data[i] != '}')) result+=data[i++];
202 if (i >= size)
203 {
204 warn(macrofile,line, "file contains non valid code, no closing '}}' for command");
205 return "";
206 }
207 result+=": ";
208 i++;
209
210 if (data[i] == '[')
211 {
212 // handle [nr]
213 // run till ]
214 result+='[';
215 i++;
216 while (i < size && (data[i] != ']')) nr += data[i++];
217 if (i >= size)
218 {
219 warn(macrofile,line, "file contains non valid code, no closing ']'");
220 return "";
221 }
222 i++;
223 }
224 else if (data[i] != '{')
225 {
226 warn(macrofile,line, "file contains non valid code, expected '[' or '{{' got '{:c}'",data[i]);
227 return "";
228 }
229 // handle {replacement}
230 // retest as the '[' part might have advanced so we can have a new '{'
231 if (data[i] != '{')
232 {
233 warn(macrofile,line, "file contains non valid code, expected '{{' got '{:c}'",data[i]);
234 return "";
235 }
236 result+="\"{";
237 i++;
238 // run till }
239 cnt = 1;
240 while (i < size && cnt)
241 {
242 switch(data[i])
243 {
244 case '\\':
245 result+="\\\\"; // need to escape it for MathJax js code
246 i++;
247 if (data[i] == '\\') // we have an escaped backslash
248 {
249 result+="\\\\";
250 i++;
251 }
252 else if (data[i] != '"') result+=data[i++]; // double quote handled separately
253 break;
254 case '{':
255 cnt++;
256 result+=data[i++];
257 break;
258 case '}':
259 cnt--;
260 if (cnt) result+=data[i];
261 i++;
262 break;
263 case '"':
264 result+='\\'; // need to escape it for MathJax js code
265 result+=data[i++];
266 break;
267 case '\n':
268 line++;
269 result+=data[i++];
270 break;
271 default:
272 result+=data[i++];
273 break;
274 }
275 }
276 if (i > size)
277 {
278 warn(macrofile,line, "file contains non valid code, no closing '}}' for replacement");
279 return "";
280 }
281 result+="}\"";
282 if (!nr.isEmpty())
283 {
284 result+=',';
285 result+=nr;
286 result+=']';
287 }
288 result+=",\n";
289 }
290 return result;
291}
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
std::string absFilePath() const
Definition fileinfo.cpp:101
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition qcstring.h:185
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
#define Config_getString(name)
Definition config.h:32
#define warn(file, line, fmt,...)
Definition message.h:97
bool literal_at(const char *data, const char(&str)[N])
returns TRUE iff data points to a substring that matches string literal str
Definition stringutil.h:98
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition util.cpp:1494

References FileInfo::absFilePath(), Config_getString, QCString::data(), fileToString(), QCString::isEmpty(), QCString::length(), literal_at(), QCString::reserve(), QCString::str(), and warn.

Referenced by HtmlGenerator::init().

◆ getSearchBox()

QCString getSearchBox ( bool serverSide,
QCString relPath,
bool highlightSearch )
static

Definition at line 293 of file htmlgen.cpp.

294{
295 TextStream t;
296 if (serverSide)
297 {
298 writeServerSearchBox(t, relPath, highlightSearch);
299 }
300 else
301 {
302 writeClientSearchBox(t, relPath);
303 }
304 return t.str();
305}
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:216
static void writeServerSearchBox(TextStream &t, const QCString &relPath, bool highlightSearch)
Definition htmlgen.cpp:93
static void writeClientSearchBox(TextStream &t, const QCString &relPath)
Definition htmlgen.cpp:76

References TextStream::str(), writeClientSearchBox(), and writeServerSearchBox().

Referenced by substituteHtmlKeywords(), and writeDefaultQuickLinks().

◆ hasDateReplacement()

bool hasDateReplacement ( const QCString & str)
static

Definition at line 1238 of file htmlgen.cpp.

1239{
1240 return (str.contains("$datetime",false) ||
1241 str.contains("$date",false) ||
1242 str.contains("$time",false) ||
1243 str.contains("$year",false)
1244 );
1245}
int contains(char c, bool cs=TRUE) const
Definition qcstring.cpp:148

References QCString::contains().

Referenced by HtmlGenerator::init().

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 2848 of file htmlgen.cpp.

2849{
2850 const auto &index = Index::instance();
2851 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
2852 bool showFiles = Config_getBool(SHOW_FILES);
2853 switch (kind)
2854 {
2855 case LayoutNavEntry::MainPage: return TRUE;
2856 case LayoutNavEntry::User: return TRUE;
2857 case LayoutNavEntry::UserGroup: return TRUE;
2858 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
2859 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
2860 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
2861 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
2862 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
2863 case LayoutNavEntry::Namespaces: return showNamespaces && index.numDocumentedNamespaces()>0;
2864 case LayoutNavEntry::NamespaceList: return showNamespaces && index.numDocumentedNamespaces()>0;
2865 case LayoutNavEntry::NamespaceMembers: return showNamespaces && index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
2866 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
2867 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
2868 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
2869 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
2870 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
2871 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0;
2872 case LayoutNavEntry::Files: return showFiles && index.numDocumentedFiles()>0;
2873 case LayoutNavEntry::FileList: return showFiles && index.numDocumentedFiles()>0;
2874 case LayoutNavEntry::FileGlobals: return showFiles && index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
2875 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
2876 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
2877 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
2878 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
2879 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
2880 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
2881 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
2882 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
2883 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
2884 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
2885 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
2886 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
2887 case LayoutNavEntry::None: // should never happen, means not properly initialized
2888 assert(kind != LayoutNavEntry::None);
2889 return FALSE;
2890 }
2891 return FALSE;
2892}
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:98
static Index & instance()
Definition index.cpp:108
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References ClassMemberHighlight::All, FileMemberHighlight::All, ModuleMemberHighlight::All, NamespaceMemberHighlight::All, Config_getBool, Doxygen::exampleLinkedMap, FALSE, Index::instance(), and TRUE.

Referenced by renderQuickLinksAsTabs(), and renderQuickLinksAsTree().

◆ renderQuickLinksAsTabs()

void renderQuickLinksAsTabs ( TextStream & t,
const QCString & relPath,
LayoutNavEntry * hlEntry,
LayoutNavEntry::Kind kind,
bool highlightParent,
bool highlightSearch )
static

Definition at line 2923 of file htmlgen.cpp.

2926{
2927 if (hlEntry->parent()) // first draw the tabs for the parent of hlEntry
2928 {
2929 renderQuickLinksAsTabs(t,relPath,hlEntry->parent(),kind,highlightParent,highlightSearch);
2930 }
2931 if (hlEntry->parent() && !hlEntry->parent()->children().empty()) // draw tabs for row containing hlEntry
2932 {
2933 bool topLevel = hlEntry->parent()->parent()==nullptr;
2934 int count=0;
2935 for (const auto &entry : hlEntry->parent()->children())
2936 {
2937 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
2938 }
2939 if (count>0) // at least one item is visible
2940 {
2941 startQuickIndexList(t,topLevel);
2942 for (const auto &entry : hlEntry->parent()->children())
2943 {
2944 if (entry->visible() && quickLinkVisible(entry->kind()))
2945 {
2946 QCString url = entry->url();
2947 startQuickIndexItem(t,url,
2948 entry.get()==hlEntry &&
2949 (!entry->children().empty() ||
2950 (entry->kind()==kind && !highlightParent)
2951 ),
2952 TRUE,relPath);
2953 t << fixSpaces(entry->title());
2954 endQuickIndexItem(t,url);
2955 }
2956 }
2957 if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row is special as it contains the search box
2958 {
2959 bool searchEngine = Config_getBool(SEARCHENGINE);
2960 bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
2961 bool disableIndex = Config_getBool(DISABLE_INDEX);
2962 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2963 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
2964 // case where DISABLE_INDEX=NO & GENERATE_TREEVIEW=YES & FULL_SIDEBAR=YES has search box in the side panel
2965 if (searchEngine)
2966 {
2967 t << " <li>\n";
2968 if (disableIndex || !generateTreeView || !fullSidebar)
2969 {
2970 if (!serverBasedSearch) // pure client side search
2971 {
2972 writeClientSearchBox(t,relPath);
2973 t << " </li>\n";
2974 }
2975 else // server based search
2976 {
2977 writeServerSearchBox(t,relPath,highlightSearch);
2978 if (!highlightSearch)
2979 {
2980 t << " </li>\n";
2981 }
2982 }
2983 }
2984 else
2985 {
2986 t << " </li>\n";
2987 }
2988 }
2989 if (!highlightSearch || Config_getBool(FULL_SIDEBAR))
2990 // on the search page the index will be ended by the page itself if the search box is part of the navigation bar
2991 {
2993 }
2994 }
2995 else // normal case for other rows than first one
2996 {
2998 }
2999 }
3000 }
3001}
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
static void endQuickIndexList(TextStream &t)
Definition htmlgen.cpp:2814
static void startQuickIndexList(TextStream &t, bool topLevel=TRUE)
Definition htmlgen.cpp:2794
static void startQuickIndexItem(TextStream &t, const QCString &l, bool hl, bool, const QCString &relPath)
Definition htmlgen.cpp:2827
static void renderQuickLinksAsTabs(TextStream &t, const QCString &relPath, LayoutNavEntry *hlEntry, LayoutNavEntry::Kind kind, bool highlightParent, bool highlightSearch)
Definition htmlgen.cpp:2923
static void endQuickIndexItem(TextStream &t, const QCString &l)
Definition htmlgen.cpp:2841
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2848
const LayoutNavEntryList & children() const
Definition layout.h:219
LayoutNavEntry * parent() const
Definition layout.h:212
QCString fixSpaces(const QCString &s)
Definition util.h:521

References LayoutNavEntry::children(), Config_getBool, endQuickIndexItem(), endQuickIndexList(), fixSpaces(), LayoutDocManager::instance(), LayoutNavEntry::parent(), quickLinkVisible(), renderQuickLinksAsTabs(), startQuickIndexItem(), startQuickIndexList(), TRUE, writeClientSearchBox(), and writeServerSearchBox().

Referenced by renderQuickLinksAsTabs(), and writeDefaultQuickLinks().

◆ renderQuickLinksAsTree()

void renderQuickLinksAsTree ( TextStream & t,
const QCString & relPath,
LayoutNavEntry * root )
static

Definition at line 2894 of file htmlgen.cpp.

2896{
2897 int count=0;
2898 for (const auto &entry : root->children())
2899 {
2900 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
2901 }
2902 if (count>0) // at least one item is visible
2903 {
2905 for (const auto &entry : root->children())
2906 {
2907 if (entry->visible() && quickLinkVisible(entry->kind()))
2908 {
2909 QCString url = entry->url();
2910 t << "<li><a href=\"" << relPath << url << "\"><span>";
2911 t << fixSpaces(entry->title());
2912 t << "</span></a>\n";
2913 // recursive into child list
2914 renderQuickLinksAsTree(t,relPath,entry.get());
2915 t << "</li>";
2916 }
2917 }
2919 }
2920}
static void renderQuickLinksAsTree(TextStream &t, const QCString &relPath, LayoutNavEntry *root)
Definition htmlgen.cpp:2894

References LayoutNavEntry::children(), endQuickIndexList(), fixSpaces(), quickLinkVisible(), renderQuickLinksAsTree(), and startQuickIndexList().

Referenced by renderQuickLinksAsTree(), and writeDefaultQuickLinks().

◆ replaceVariables()

QCString replaceVariables ( const QCString & input)
static

Definition at line 750 of file htmlgen.cpp.

751{
752 auto doReplacements = [&input](const StringUnorderedMap &mapping) -> QCString
753 {
754 QCString result;
755 result.reserve(input.length());
756 int p=0,i=0;
757 while ((i=input.find("var(",p))!=-1)
758 {
759 result+=input.mid(p,i-p);
760 int j=input.find(")",i+4);
761 assert(j!=-1);
762 auto it = mapping.find(input.mid(i+4,j-i-4).str()); // find variable
763 if (it==mapping.end())
764 { // should be found
765 err("failed to find value variable {}. It is not longer defined in doxygen.css\n",input.mid(i+4,j-i-4));
766 }
767 else
768 {
769 //printf("replace '%s' by '%s'\n",qPrint(input.mid(i+4,j-i-4)),qPrint(it->second));
770 result+=it->second; // add it value
771 }
772 p=j+1;
773 }
774 result+=input.mid(p,input.length()-p);
775 return result;
776 };
777
778 auto colorStyle = Config_getEnum(HTML_COLORSTYLE);
779 if (colorStyle==HTML_COLORSTYLE_t::LIGHT)
780 {
781 return doReplacements(g_lightMap);
782 }
783 else if (colorStyle==HTML_COLORSTYLE_t::DARK)
784 {
785 return doReplacements(g_darkMap);
786 }
787 else
788 {
789 return input;
790 }
791}
std::unordered_map< std::string, std::string > StringUnorderedMap
Definition containers.h:28
#define err(fmt,...)
Definition message.h:127

References Config_getEnum, err, QCString::find(), g_darkMap, g_lightMap, QCString::length(), QCString::mid(), QCString::reserve(), and QCString::str().

Referenced by HtmlGenerator::getNavTreeCss(), HtmlGenerator::init(), writeDefaultStyleSheet(), and HtmlGenerator::writeSearchData().

◆ startQuickIndexItem()

void startQuickIndexItem ( TextStream & t,
const QCString & l,
bool hl,
bool ,
const QCString & relPath )
static

Definition at line 2827 of file htmlgen.cpp.

2830{
2831 t << " <li";
2832 if (hl)
2833 {
2834 t << " class=\"current\"";
2835 }
2836 t << ">";
2837 if (!l.isEmpty()) t << "<a href=\"" << correctURL(l,relPath) << "\">";
2838 t << "<span>";
2839}
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5943

References correctURL(), and QCString::isEmpty().

Referenced by renderQuickLinksAsTabs().

◆ startQuickIndexList()

void startQuickIndexList ( TextStream & t,
bool topLevel = TRUE )
static

Definition at line 2794 of file htmlgen.cpp.

2795{
2796 if (!Config_getBool(DISABLE_INDEX))
2797 {
2798 if (topLevel)
2799 {
2800 t << " <div id=\"navrow1\" class=\"tabs\">\n";
2801 }
2802 else
2803 {
2804 t << " <div id=\"navrow2\" class=\"tabs2\">\n";
2805 }
2806 t << " <ul class=\"tablist\">\n";
2807 }
2808 else
2809 {
2810 t << "<ul>";
2811 }
2812}

References Config_getBool, and TRUE.

Referenced by renderQuickLinksAsTabs(), and renderQuickLinksAsTree().

◆ startSectionContent()

void startSectionContent ( TextStream & t,
int sectionCount )
static

Definition at line 2103 of file htmlgen.cpp.

2104{
2105 //t << "<!-- startSectionContent -->";
2106 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2107 if (dynamicSections)
2108 {
2109 t << "<div id=\"dynsection-" << sectionCount << "-content\" "
2110 "class=\"dyncontent hidden\">\n";
2111 }
2112 else
2113 {
2114 t << "<div class=\"dyncontent\">\n";
2115 }
2116}

References Config_getBool.

Referenced by HtmlGenerator::endCallGraph(), HtmlGenerator::endClassDiagram(), HtmlGenerator::endDirDepGraph(), HtmlGenerator::endDotGraph(), HtmlGenerator::endGroupCollaboration(), and HtmlGenerator::endInclDepGraph().

◆ startSectionHeader()

void startSectionHeader ( TextStream & t,
const QCString & relPath,
int sectionCount )
static

Definition at line 2059 of file htmlgen.cpp.

2061{
2062 //t << "<!-- startSectionHeader -->";
2063 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2064 if (dynamicSections)
2065 {
2066 t << "<div id=\"dynsection-" << sectionCount << "\" "
2067 "class=\"dynheader closed\">"
2068 "<span class=\"dynarrow\"><span class=\"arrowhead closed\"></span></span>";
2069 }
2070 else
2071 {
2072 t << "<div class=\"dynheader\">\n";
2073 }
2074}

References Config_getBool.

Referenced by HtmlGenerator::startCallGraph(), HtmlGenerator::startClassDiagram(), HtmlGenerator::startDirDepGraph(), HtmlGenerator::startDotGraph(), HtmlGenerator::startGroupCollaboration(), and HtmlGenerator::startInclDepGraph().

◆ startSectionSummary()

void startSectionSummary ( TextStream & t,
int sectionCount )
static

Definition at line 2082 of file htmlgen.cpp.

2083{
2084 //t << "<!-- startSectionSummary -->";
2085 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2086 if (dynamicSections)
2087 {
2088 t << "<div id=\"dynsection-" << sectionCount << "-summary\" "
2089 "class=\"dynsummary\">\n";
2090 }
2091}

References Config_getBool.

Referenced by HtmlGenerator::endCallGraph(), HtmlGenerator::endClassDiagram(), HtmlGenerator::endDirDepGraph(), HtmlGenerator::endDotGraph(), HtmlGenerator::endGroupCollaboration(), and HtmlGenerator::endInclDepGraph().

◆ substituteHtmlKeywords()

QCString substituteHtmlKeywords ( const QCString & file,
const QCString & str,
const QCString & title,
const QCString & relPath,
const QCString & navPath = QCString(),
bool isSource = false )
static

Definition at line 307 of file htmlgen.cpp.

313{
314 // Build CSS/JavaScript tags depending on treeview, search engine settings
315 QCString cssFile;
316 QCString generatedBy;
317 QCString treeViewCssJs;
318 QCString searchCssJs;
319 QCString searchBox;
320 QCString mathJaxJs;
321 QCString mermaidJs;
322 QCString extraCssText;
323
324 QCString projectName = Config_getString(PROJECT_NAME);
325 bool treeView = Config_getBool(GENERATE_TREEVIEW);
326 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
327 bool codeFolding = Config_getBool(HTML_CODE_FOLDING);
328 bool searchEngine = Config_getBool(SEARCHENGINE);
329 bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
330 bool mathJax = Config_getBool(USE_MATHJAX);
331 bool disableIndex = Config_getBool(DISABLE_INDEX);
332 bool hasProjectName = !projectName.isEmpty();
333 bool hasProjectNumber = !Config_getString(PROJECT_NUMBER).isEmpty();
334 bool hasProjectBrief = !Config_getString(PROJECT_BRIEF).isEmpty();
335 bool hasProjectLogo = !Config_getString(PROJECT_LOGO).isEmpty();
336 bool hasProjectIcon = !Config_getString(PROJECT_ICON).isEmpty();
337 bool hasFullSideBar = Config_getBool(FULL_SIDEBAR) && /*disableIndex &&*/ treeView;
338 bool hasCopyClipboard = Config_getBool(HTML_COPY_CLIPBOARD);
339 bool hasCookie = treeView || searchEngine || Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE;
340 static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
341
342 cssFile = Config_getString(HTML_STYLESHEET);
343 if (cssFile.isEmpty())
344 {
345 cssFile = "doxygen.css";
346 }
347 else
348 {
349 if (!cssFile.startsWith("http:") && !cssFile.startsWith("https:"))
350 {
351 FileInfo cssfi(cssFile.str());
352 if (cssfi.exists())
353 {
354 cssFile = cssfi.fileName();
355 }
356 else
357 {
358 cssFile = "doxygen.css";
359 }
360 }
361 }
362
363 extraCssText = "";
364 const StringVector &extraCssFile = Config_getList(HTML_EXTRA_STYLESHEET);
365 for (const auto &fileName : extraCssFile)
366 {
367 if (!fileName.empty())
368 {
369 QCString htmlStyleSheet = fileName;
370 if (htmlStyleSheet.startsWith("http:") || htmlStyleSheet.startsWith("https:"))
371 {
372 extraCssText += "<link href=\""+htmlStyleSheet+"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
373 }
374 else
375 {
376 FileInfo fi(fileName);
377 if (fi.exists())
378 {
379 extraCssText += "<link href=\"$relpath^"+stripPath(fileName)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
380 }
381 }
382 }
383 }
384
385 switch (Config_getEnum(TIMESTAMP))
386 {
387 case TIMESTAMP_t::NO:
388 generatedBy = theTranslator->trGeneratedBy();
389 break;
390 default:
391 generatedBy = theTranslator->trGeneratedAt("<span class=\"timestamp\"></span>",
392 convertToHtml(Config_getString(PROJECT_NAME)));
393 break;
394 }
395 if (treeView)
396 {
397 treeViewCssJs = "<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
398 "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
399 "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n";
400 }
401
402 if (searchEngine)
403 {
404 searchCssJs = "<link href=\"$relpath^search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
405 if (!serverBasedSearch)
406 {
407 searchCssJs += "<script type=\"text/javascript\" src=\"$relpath^search/searchdata.js\"></script>\n";
408 }
409 searchCssJs += "<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n";
410
411 if (!serverBasedSearch)
412 {
413 }
414 else
415 {
416 // OPENSEARCH_PROVIDER {
417 searchCssJs += "<link rel=\"search\" href=\"" + relPath +
418 "search_opensearch.php?v=opensearch.xml\" "
419 "type=\"application/opensearchdescription+xml\" title=\"" +
420 (hasProjectName ? projectName : QCString("Doxygen")) +
421 "\"/>";
422 // OPENSEARCH_PROVIDER }
423 }
424 searchBox = getSearchBox(serverBasedSearch, relPath, FALSE);
425 }
426
427 if (mathJax && !isSource)
428 {
429 auto mathJaxVersion = Config_getEnum(MATHJAX_VERSION);
430 QCString path = Config_getString(MATHJAX_RELPATH);
431 if (path.isEmpty() || path.startsWith("..")) // relative path
432 {
433 path.prepend(relPath);
434 }
435
436 auto writeMathJax3Packages = [&mathJaxJs](const StringVector &mathJaxExtensions)
437 {
438 mathJaxJs += " packages: ['base','configmacros'";
439 if (!g_latex_macro.isEmpty())
440 {
441 mathJaxJs+= ",'newcommand'";
442 }
443 for (const auto &s : mathJaxExtensions)
444 {
445 mathJaxJs+= ",'"+s+"'";
446 }
447 mathJaxJs += "]\n";
448 };
449
450 auto writeMathJax4Packages = [&mathJaxJs](const StringVector &mathJaxExtensions)
451 {
452 mathJaxJs += " packages: {\n";
453 bool first = true;
454 for (const auto &s : mathJaxExtensions)
455 {
456 if (!first) mathJaxJs+= ",";
457 if (s.at(0) =='-')
458 {
459 mathJaxJs+= "\n '[-]': ['";
460 mathJaxJs+=s.data()+1;
461 mathJaxJs+="']";
462 }
463 else
464 {
465 mathJaxJs+= "\n '[+]': ['"+s+"']";
466 }
467 first = false;
468 }
469 mathJaxJs += "\n }\n";
470 };
471
472 auto writeMathJaxScript = [&path,&mathJaxJs](const QCString &pathPostfix,
473 std::function<void(const StringVector&)> writePackages)
474 {
475 QCString mathJaxFormat = Config_getEnumAsString(MATHJAX_FORMAT);
476 mathJaxJs += "<script type=\"text/javascript\">\n"
477 "window.MathJax = {\n"
478 " options: {\n"
479 " ignoreHtmlClass: 'tex2jax_ignore',\n"
480 " processHtmlClass: 'tex2jax_process'\n"
481 " }";
482 // MACRO / EXT
483 const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
484 if (!mathJaxExtensions.empty() || !g_latex_macro.isEmpty())
485 {
486 mathJaxJs+= ",\n";
487 if (!mathJaxExtensions.empty())
488 {
489 bool first = true;
490 mathJaxJs+= " loader: {\n"
491 " load: [";
492 for (const auto &s : mathJaxExtensions)
493 {
494 if (s.at(0) !='-')
495 {
496 if (!first) mathJaxJs+= ",";
497 mathJaxJs+= "'[tex]/"+s+"'"; // packages preceded by a minus sign should not be loaded
498 first = false;
499 }
500 }
501 mathJaxJs+= "]\n"
502 " },\n";
503 }
504 mathJaxJs+= " tex: {\n"
505 " macros: {";
506 if (!g_latex_macro.isEmpty())
507 {
508 mathJaxJs += g_latex_macro+" ";
509 }
510 mathJaxJs+="},\n";
511 writePackages(mathJaxExtensions);
512 mathJaxJs += " }\n";
513 }
514 else
515 {
516 mathJaxJs += "\n";
517 }
518 mathJaxJs += "};\n";
519 // MATHJAX_CODEFILE
520 if (!g_mathjax_code.isEmpty())
521 {
522 mathJaxJs += g_mathjax_code;
523 mathJaxJs += "\n";
524 }
525 mathJaxJs+="</script>\n";
526 mathJaxJs += "<script type=\"text/javascript\" id=\"MathJax-script\" async=\"async\" src=\"" +
527 path + pathPostfix + "tex-" + mathJaxFormat.lower() + ".js\">";
528 mathJaxJs+="</script>\n";
529 };
530
531 switch (mathJaxVersion)
532 {
533 case MATHJAX_VERSION_t::MathJax_4:
534 writeMathJaxScript("",writeMathJax4Packages);
535 break;
536 case MATHJAX_VERSION_t::MathJax_3:
537 writeMathJaxScript("es5/",writeMathJax3Packages);
538 break;
539 case MATHJAX_VERSION_t::MathJax_2:
540 {
541 QCString mathJaxFormat = Config_getEnumAsString(MATHJAX_FORMAT);
542 mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
543 "MathJax.Hub.Config({\n"
544 " extensions: [\"tex2jax.js\"";
545 const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
546 for (const auto &s : mathJaxExtensions)
547 {
548 mathJaxJs+= ", \""+QCString(s)+".js\"";
549 }
550 if (mathJaxFormat.isEmpty())
551 {
552 mathJaxFormat = "HTML-CSS";
553 }
554 mathJaxJs += "],\n"
555 " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n";
556 if (!g_latex_macro.isEmpty())
557 {
558 mathJaxJs += " TeX: { Macros: {\n";
559 mathJaxJs += g_latex_macro;
560 mathJaxJs += "\n"
561 " } }\n";
562 }
563 mathJaxJs += "});\n";
564 if (!g_mathjax_code.isEmpty())
565 {
566 mathJaxJs += g_mathjax_code;
567 mathJaxJs += "\n";
568 }
569 mathJaxJs += "</script>\n";
570 mathJaxJs += "<script type=\"text/javascript\" async=\"async\" src=\"" + path + "MathJax.js\"></script>\n";
571 }
572 break;
573 }
574 }
575
576 QCString darkModeJs;
577 if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
578 {
579 darkModeJs="<script type=\"text/javascript\" src=\"$relpath^darkmode_toggle.js\"></script>\n";
580 }
581
582 QCString mermaidRenderMode = Config_getEnumAsString(MERMAID_RENDER_MODE);
583 if (mermaidRenderMode=="CLIENT_SIDE" || mermaidRenderMode=="AUTO")
584 {
585 QCString mermaidJsUrl = Config_getString(MERMAID_JS_URL);
586 mermaidJs = "<script type=\"module\">\n"
587 "import mermaid from '" + mermaidJsUrl + "';\n";
588 switch(Config_getEnum(HTML_COLORSTYLE))
589 {
590 case HTML_COLORSTYLE_t::LIGHT:
591 mermaidJs += "const theme = 'default';\n";
592 break;
593 case HTML_COLORSTYLE_t::DARK:
594 mermaidJs += "const theme = 'dark';\n";
595 break;
596 case HTML_COLORSTYLE_t::AUTO_LIGHT:
597 case HTML_COLORSTYLE_t::AUTO_DARK:
598 mermaidJs += "const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'default';\n";
599 break;
600 case HTML_COLORSTYLE_t::TOGGLE:
601 mermaidJs += "const theme = DarkModeToggle.darkModeEnabled ? 'dark' : 'default'\n";
602 break;
603 }
604 mermaidJs += "mermaid.initialize({ startOnLoad: true, theme: theme });\n";
605 if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
606 {
607 mermaidJs +=
608 "(function() {\n"
609 " const elementCode = '.mermaid';\n"
610 " const loadMermaid = function(theme) {\n"
611 " mermaid.initialize({theme})\n"
612 " mermaid.init({theme}, document.querySelectorAll(elementCode))\n"
613 " }\n"
614 " const saveOriginalData = function() {\n"
615 " return new Promise((resolve, reject) => {\n"
616 " try {\n"
617 " var els = document.querySelectorAll(elementCode), count = els.length;\n"
618 " els.forEach(element => {\n"
619 " element.setAttribute('data-original-code', element.innerHTML)\n"
620 " count--\n"
621 " if (count == 0) { resolve() }\n"
622 " });\n"
623 " } catch (error) { reject(error) }\n"
624 " })\n"
625 " }\n"
626 " const resetProcessed = function(){\n"
627 " return new Promise((resolve, reject) => {\n"
628 " try {\n"
629 " var els = document.querySelectorAll(elementCode), count = els.length;\n"
630 " els.forEach(element => {\n"
631 " if (element.getAttribute('data-original-code') != null) {\n"
632 " element.removeAttribute('data-processed')\n"
633 " element.innerHTML = element.getAttribute('data-original-code')\n"
634 " }\n"
635 " count--\n"
636 " if(count == 0) { resolve() }\n"
637 " });\n"
638 " } catch (error) { reject(error) }\n"
639 " })\n"
640 " }\n"
641 " saveOriginalData()\n"
642 " const original = DarkModeToggle.enableDarkMode.bind(DarkModeToggle);\n"
643 " DarkModeToggle.enableDarkMode = function(enable) {\n"
644 " original(enable);\n"
645 " resetProcessed().then(loadMermaid(enable ? 'dark' : 'default')).catch(console.error)\n"
646 " };\n"
647 "})();\n";
648 }
649 mermaidJs += "</script>\n";
650 }
651
652 if (hasCookie) // extend the $treeview tag to avoid breaking old files used with HTML_HEADER
653 {
654 treeViewCssJs+="<script type=\"text/javascript\" src=\"$relpath^cookie.js\"></script>\n";
655 }
656
657 // first substitute generic keywords
658 QCString result = substituteKeywords(file,str,title,
659 convertToHtml(Config_getString(PROJECT_NAME)),
660 convertToHtml(Config_getString(PROJECT_NUMBER)),
661 convertToHtml(Config_getString(PROJECT_BRIEF)));
662
663 // then do the HTML specific keywords
664 result = substituteKeywords(file,result,
665 {
666 // keyword value getter
667 { "$datetime", [&]() -> QCString { return "<span class=\"datetime\"></span>"; } },
668 { "$date", [&]() -> QCString { return "<span class=\"date\"></span>"; } },
669 { "$time", [&]() -> QCString { return "<span class=\"time\"></span>"; } },
670 { "$year", [&]() -> QCString { return "<span class=\"year\"></span>"; } },
671 { "$navpath", [&]() -> QCString { return navPath; } },
672 { "$stylesheet", [&]() -> QCString { return cssFile; } },
673 { "$treeview", [&]() -> QCString { return treeViewCssJs; } },
674 { "$searchbox", [&]() -> QCString { return searchBox; } },
675 { "$search", [&]() -> QCString { return searchCssJs; } },
676 { "$mathjax", [&]() -> QCString { return mathJaxJs; } },
677 { "$mermaidjs", [&]() -> QCString { return mermaidJs; } },
678 { "$darkmode", [&]() -> QCString { return darkModeJs; } },
679 { "$generatedby", [&]() -> QCString { return generatedBy; } },
680 { "$extrastylesheet",[&]() -> QCString { return extraCssText; } },
681 { "$relpath$", [&]() -> QCString { return relPath; } } //<-- obsolete: for backwards compatibility only
682 });
683
684 result = substitute(result,"$relpath^",relPath); //<-- must be done after the previous substitutions
685
686 // remove conditional blocks
687 result = selectBlocks(result,
688 {
689 // keyword, is enabled
690 { "FULL_SIDEBAR", hasFullSideBar },
691 { "DISABLE_INDEX", disableIndex },
692 { "GENERATE_TREEVIEW", treeView },
693 { "SEARCHENGINE", searchEngine },
694 { "TITLEAREA", titleArea },
695 { "PROJECT_NAME", hasProjectName },
696 { "PROJECT_NUMBER", hasProjectNumber },
697 { "PROJECT_BRIEF", hasProjectBrief },
698 { "PROJECT_LOGO", hasProjectLogo },
699 { "PROJECT_ICON", hasProjectIcon },
700 { "COPY_CLIPBOARD", hasCopyClipboard },
701 { "HTML_CODE_FOLDING", codeFolding },
702 { "HTML_DYNAMIC_SECTIONS", dynamicSections},
704
705 result = removeEmptyLines(result);
706
707 return result;
708}
QCString & prepend(const char *s)
Definition qcstring.h:422
QCString lower() const
Definition qcstring.h:249
static void codeFolding(yyscan_t yyscanner, const Definition *d)
Definition code.l:2362
#define Config_getList(name)
Definition config.h:38
#define Config_getEnumAsString(name)
Definition config.h:36
std::vector< std::string > StringVector
Definition containers.h:33
static QCString g_mathjax_code
Definition htmlgen.cpp:67
static const SelectionMarkerInfo htmlMarkerInfo
Definition htmlgen.cpp:72
static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch)
Definition htmlgen.cpp:293
static QCString g_latex_macro
Definition htmlgen.cpp:68
Translator * theTranslator
Definition language.cpp:71
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:571
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:3984
QCString stripPath(const QCString &s)
Definition util.cpp:4969
QCString removeEmptyLines(const QCString &s)
Definition util.cpp:6604
QCString selectBlocks(const QCString &s, const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo)
remove disabled blocks and all block markers from s and return the result as a string
Definition util.cpp:6427
QCString substituteKeywords(const QCString &file, const QCString &s, const KeywordSubstitutionList &keywords)
Definition util.cpp:3075

References codeFolding(), Config_getBool, Config_getEnum, Config_getEnumAsString, Config_getList, Config_getString, convertToHtml(), QCString::data(), FileInfo::exists(), FALSE, FileInfo::fileName(), g_latex_macro, g_mathjax_code, getSearchBox(), htmlMarkerInfo, QCString::isEmpty(), QCString::lower(), QCString::prepend(), removeEmptyLines(), selectBlocks(), QCString::startsWith(), QCString::str(), stripPath(), substitute(), substituteKeywords(), and theTranslator.

Referenced by HtmlGenerator::init(), HtmlGenerator::startFile(), HtmlGenerator::writeExternalSearchPage(), HtmlGenerator::writePageFooter(), and HtmlGenerator::writeSearchPage().

◆ writeClientSearchBox()

void writeClientSearchBox ( TextStream & t,
const QCString & relPath )
static

Definition at line 76 of file htmlgen.cpp.

77{
78 t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
79 t << " <span class=\"left\">\n";
80 t << " <span id=\"MSearchSelect\" class=\"search-icon\">";
81 t << "<span class=\"search-icon-dropdown\"></span></span>\n";
82 t << " <input type=\"text\" id=\"MSearchField\" value=\"\" placeholder=\""
83 << theTranslator->trSearch() << "\" accesskey=\"S\"/>\n";
84 t << " </span><span class=\"right\">\n";
85 t << " <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
86 << "<div id=\"MSearchCloseImg\" class=\"close-icon\"></div></a>\n";
87 t << " </span>\n";
88 t << " </div>\n";
89}

References theTranslator.

Referenced by getSearchBox(), and renderQuickLinksAsTabs().

◆ writeDefaultQuickLinks()

void writeDefaultQuickLinks ( TextStream & t,
HighlightedItem hli,
const QCString & file,
const QCString & relPath,
bool extraTabs )
static

Definition at line 3003 of file htmlgen.cpp.

3008{
3009 bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
3010 bool searchEngine = Config_getBool(SEARCHENGINE);
3011 bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
3012 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3013 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3014 bool disableIndex = Config_getBool(DISABLE_INDEX);
3015 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3017 LayoutNavEntry::Kind kind = LayoutNavEntry::None;
3018 LayoutNavEntry::Kind altKind = LayoutNavEntry::None; // fall back for the old layout file
3019 bool highlightParent=false;
3020 switch (hli) // map HLI enums to LayoutNavEntry::Kind enums
3021 {
3022 case HighlightedItem::Main: kind = LayoutNavEntry::MainPage; break;
3023 case HighlightedItem::Topics: kind = LayoutNavEntry::Topics; break;
3024 case HighlightedItem::Modules: kind = LayoutNavEntry::ModuleList; altKind = LayoutNavEntry::Modules; break;
3025 case HighlightedItem::Namespaces: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces; break;
3026 case HighlightedItem::ClassHierarchy: kind = LayoutNavEntry::ClassHierarchy; break;
3027 case HighlightedItem::InterfaceHierarchy: kind = LayoutNavEntry::InterfaceHierarchy; break;
3028 case HighlightedItem::ExceptionHierarchy: kind = LayoutNavEntry::ExceptionHierarchy; break;
3029 case HighlightedItem::Classes: kind = LayoutNavEntry::ClassIndex; altKind = LayoutNavEntry::Classes; break;
3030 case HighlightedItem::Concepts: kind = LayoutNavEntry::Concepts; break;
3031 case HighlightedItem::Interfaces: kind = LayoutNavEntry::InterfaceIndex; altKind = LayoutNavEntry::Interfaces; break;
3032 case HighlightedItem::Structs: kind = LayoutNavEntry::StructIndex; altKind = LayoutNavEntry::Structs; break;
3033 case HighlightedItem::Exceptions: kind = LayoutNavEntry::ExceptionIndex; altKind = LayoutNavEntry::Exceptions; break;
3034 case HighlightedItem::AnnotatedClasses: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; break;
3035 case HighlightedItem::AnnotatedInterfaces: kind = LayoutNavEntry::InterfaceList; altKind = LayoutNavEntry::Interfaces; break;
3036 case HighlightedItem::AnnotatedStructs: kind = LayoutNavEntry::StructList; altKind = LayoutNavEntry::Structs; break;
3037 case HighlightedItem::AnnotatedExceptions: kind = LayoutNavEntry::ExceptionList; altKind = LayoutNavEntry::Exceptions; break;
3038 case HighlightedItem::Files: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; break;
3039 case HighlightedItem::NamespaceMembers: kind = LayoutNavEntry::NamespaceMembers; break;
3040 case HighlightedItem::ModuleMembers: kind = LayoutNavEntry::ModuleMembers; break;
3041 case HighlightedItem::Functions: kind = LayoutNavEntry::ClassMembers; break;
3042 case HighlightedItem::Globals: kind = LayoutNavEntry::FileGlobals; break;
3043 case HighlightedItem::Pages: kind = LayoutNavEntry::Pages; break;
3044 case HighlightedItem::Examples: kind = LayoutNavEntry::Examples; break;
3045 case HighlightedItem::UserGroup: kind = LayoutNavEntry::UserGroup; break;
3046 case HighlightedItem::ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes;
3047 highlightParent = true; break;
3048 case HighlightedItem::ConceptVisible: kind = LayoutNavEntry::Concepts;
3049 highlightParent = true; break;
3050 case HighlightedItem::ModuleVisible: kind = LayoutNavEntry::ModuleList; altKind = LayoutNavEntry::Modules;
3051 highlightParent = true; break;
3052 case HighlightedItem::InterfaceVisible: kind = LayoutNavEntry::InterfaceList; altKind = LayoutNavEntry::Interfaces;
3053 highlightParent = true; break;
3054 case HighlightedItem::StructVisible: kind = LayoutNavEntry::StructList; altKind = LayoutNavEntry::Structs;
3055 highlightParent = true; break;
3056 case HighlightedItem::ExceptionVisible: kind = LayoutNavEntry::ExceptionList; altKind = LayoutNavEntry::Exceptions;
3057 highlightParent = true; break;
3058 case HighlightedItem::NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces;
3059 highlightParent = true; break;
3060 case HighlightedItem::FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files;
3061 highlightParent = true; break;
3062 case HighlightedItem::None: break;
3063 case HighlightedItem::Search: break;
3064 }
3065
3066 t << "<script type=\"application/json\" id=\"doxygen-config\">\n";
3067 t << "{\n";
3068 t << " \"relPath\": \"" << relPath << "\",\n";
3069 t << " \"generateTreeView\": " << (generateTreeView?"true":"false") << ",\n";
3070 t << " \"searchEngine\": " << (searchEngine?"true":"false") << ",\n";
3071 t << " \"serverBasedSearch\": " << (serverBasedSearch?"true":"false") << ",\n";
3072 t << " \"disableIndex\": " << (disableIndex?"true":"false") << ",\n";
3073 t << " \"dynamicMenus\": " << (dynamicMenus?"true":"false") << ",\n";
3074 t << " \"fullSidebar\": " << (fullSidebar?"true":"false") << "\n";
3075 t << "}\n";
3076 t << "</script>\n";
3077
3078 if (!disableIndex && dynamicMenus)
3079 {
3080 QCString searchPage;
3081 if (externalSearch)
3082 {
3083 searchPage = "search" + Doxygen::htmlFileExtension;
3084 }
3085 else
3086 {
3087 searchPage = "search.php";
3088 }
3089 t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>\n";
3090 t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>\n";
3091 t << "<div id=\"main-nav-mobile\">\n";
3092 if (searchEngine && !fullSidebar)
3093 {
3094 t << "<div class=\"sm sm-dox\"><input id=\"main-menu-state\" type=\"checkbox\"/>\n";
3095 t << "<label class=\"main-menu-btn\" for=\"main-menu-state\">\n";
3096 t << "<span class=\"main-menu-btn-icon\"></span> Toggle main menu visibility</label>\n";
3097 t << "<span id=\"searchBoxPos1\">";
3098 t << "</span>\n";
3099 t << "</div>\n";
3100 }
3101 t << "</div><!-- main-nav-mobile -->\n";
3102 t << "<div id=\"main-nav\">\n";
3103 t << " <ul class=\"sm sm-dox\" id=\"main-menu\">\n";
3104 t << " <li id=\"searchBoxPos2\">\n";
3105 if (searchEngine && !(generateTreeView && fullSidebar))
3106 {
3107 t << getSearchBox(serverBasedSearch,relPath,false);
3108 }
3109 t << " </li>\n";
3110 t << " </ul>\n";
3111 t << "</div><!-- main-nav -->\n";
3112 }
3113 else if (!disableIndex) // && !Config_getBool(HTML_DYNAMIC_MENUS)
3114 {
3115 // find highlighted index item
3116 LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : QCString());
3117 if (!hlEntry && altKind!=LayoutNavEntry::None) { hlEntry=root->find(altKind); kind=altKind; }
3118 if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
3119 {
3120 highlightParent=TRUE;
3121 hlEntry = root->children().front().get();
3122 if (hlEntry==nullptr)
3123 {
3124 return; // argl, empty index!
3125 }
3126 }
3127 if (kind==LayoutNavEntry::UserGroup)
3128 {
3129 LayoutNavEntry *e = hlEntry->children().front().get();
3130 if (e)
3131 {
3132 hlEntry = e;
3133 }
3134 }
3135 t << "<div id=\"main-nav\">\n";
3136 renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HighlightedItem::Search);
3137 if (!extraTabs)
3138 {
3139 t << "</div><!-- main-nav -->\n";
3140 }
3141 }
3142 else if (!generateTreeView)
3143 {
3144 renderQuickLinksAsTree(t,relPath,root);
3145 }
3146 if (generateTreeView && !disableIndex && fullSidebar && !extraTabs)
3147 {
3148 t << "<div id=\"container\"><div id=\"doc-content\">\n";
3149 }
3150}
static QCString htmlFileExtension
Definition doxygen.h:122
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1448
@ AnnotatedExceptions
Definition index.h:76
@ InterfaceVisible
Definition index.h:89
@ InterfaceHierarchy
Definition index.h:66
@ AnnotatedInterfaces
Definition index.h:74
@ NamespaceMembers
Definition index.h:78
@ AnnotatedClasses
Definition index.h:73
@ AnnotatedStructs
Definition index.h:75
@ ExceptionVisible
Definition index.h:91
@ NamespaceVisible
Definition index.h:92
@ ExceptionHierarchy
Definition index.h:67
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
Definition layout.cpp:133
Kind
Definition layout.h:193

References AnnotatedClasses, AnnotatedExceptions, AnnotatedInterfaces, AnnotatedStructs, LayoutNavEntry::children(), Classes, ClassHierarchy, ClassVisible, Concepts, ConceptVisible, Config_getBool, Examples, ExceptionHierarchy, Exceptions, ExceptionVisible, Files, FileVisible, LayoutNavEntry::find(), Functions, getSearchBox(), Globals, Doxygen::htmlFileExtension, LayoutDocManager::instance(), InterfaceHierarchy, Interfaces, InterfaceVisible, Main, ModuleMembers, Modules, ModuleVisible, NamespaceMembers, Namespaces, NamespaceVisible, None, Pages, renderQuickLinksAsTabs(), renderQuickLinksAsTree(), LayoutDocManager::rootNavEntry(), Search, Structs, StructVisible, Topics, TRUE, and UserGroup.

Referenced by HtmlGenerator::writeExternalSearchPage(), HtmlGenerator::writeQuickLinks(), and HtmlGenerator::writeSearchPage().

◆ writeDefaultStyleSheet()

void writeDefaultStyleSheet ( TextStream & t)
static

Definition at line 1461 of file htmlgen.cpp.

1462{
1463 t << "/* The standard CSS for doxygen " << getDoxygenVersion() << "*/\n\n";
1464 switch (Config_getEnum(HTML_COLORSTYLE))
1465 {
1466 case HTML_COLORSTYLE_t::LIGHT:
1467 case HTML_COLORSTYLE_t::DARK:
1468 /* variables will be resolved while writing to the CSS file */
1469 break;
1470 case HTML_COLORSTYLE_t::AUTO_LIGHT:
1471 case HTML_COLORSTYLE_t::TOGGLE:
1472 t << "html {\n";
1473 t << replaceColorMarkers(ResourceMgr::instance().getAsString("lightmode_settings.css"));
1474 t << "}\n\n";
1475 break;
1476 case HTML_COLORSTYLE_t::AUTO_DARK:
1477 t << "html {\n";
1478 t << replaceColorMarkers(ResourceMgr::instance().getAsString("darkmode_settings.css"));
1479 t << "}\n\n";
1480 break;
1481 }
1482 if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::AUTO_LIGHT)
1483 {
1484 t << "@media (prefers-color-scheme: dark) {\n";
1485 t << " html:not(.dark-mode) {\n";
1486 t << " color-scheme: dark;\n\n";
1487 t << replaceColorMarkers(ResourceMgr::instance().getAsString("darkmode_settings.css"));
1488 t << "}}\n";
1489 }
1490 else if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::AUTO_DARK)
1491 {
1492 t << "@media (prefers-color-scheme: light) {\n";
1493 t << " html:not(.light-mode) {\n";
1494 t << " color-scheme: light;\n\n";
1495 t << replaceColorMarkers(ResourceMgr::instance().getAsString("lightmode_settings.css"));
1496 t << "}}\n";
1497 }
1498 else if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1499 {
1500 t << "html.dark-mode {\n";
1501 t << replaceColorMarkers(ResourceMgr::instance().getAsString("darkmode_settings.css"));
1502 t << "}\n\n";
1503 }
1504
1505 QCString cssStr = ResourceMgr::instance().getAsString("doxygen.css");
1506 bool hasFullSidebar = Config_getBool(FULL_SIDEBAR) && Config_getBool(GENERATE_TREEVIEW);
1507 if (hasFullSidebar)
1508 {
1509 cssStr+="\n"
1510 "#titlearea {\n"
1511 " border-bottom: none;\n"
1512 " background-color: var(--nav-background-color);\n"
1513 " border-right: 1px solid var(--nav-border-color);\n"
1514 "}\n";
1515 }
1516 t << replaceVariables(cssStr);
1517
1518 bool addTimestamp = Config_getEnum(TIMESTAMP)!=TIMESTAMP_t::NO;
1519 if (g_build_date || addTimestamp)
1520 {
1521 t << "\nhtml {\n";
1522
1523 if (addTimestamp)
1524 {
1525 QCString timeStampStr;
1526 switch (Config_getEnum(TIMESTAMP))
1527 {
1528 case TIMESTAMP_t::YES:
1529 case TIMESTAMP_t::DATETIME:
1530 timeStampStr = dateToString(DateTimeType::DateTime);
1531 break;
1532 case TIMESTAMP_t::DATE:
1533 timeStampStr = dateToString(DateTimeType::Date);
1534 break;
1535 default:
1536 break;
1537 }
1538 t << "--timestamp: '" << timeStampStr << "';\n";
1539 }
1540 if (g_build_date)
1541 {
1542 t << "--datetime: '" << dateToString(DateTimeType::DateTime) << "';\n";
1543 t << "--date: '" << dateToString(DateTimeType::Date) << "';\n";
1544 t << "--time: '" << dateToString(DateTimeType::Time) << "';\n";
1545 t << "--year: '" << yearToString() << "';\n";
1546 }
1547 t << "}\n";
1548
1549 if (addTimestamp)
1550 {
1551 t << "span.timestamp { content: ' '; }\n";
1552 t << "span.timestamp:before { content: var(--timestamp); }\n\n";
1553 }
1554 if (g_build_date)
1555 {
1556 t << "span.datetime { content: ' '; }\n";
1557 t << "span.datetime:before { content: var(--datetime); }\n\n";
1558 t << "span.date { content: ' '; }\n";
1559 t << "span.date:before { content: var(--date); }\n\n";
1560 t << "span.time { content: ' '; }\n";
1561 t << "span.time:before { content: var(--time); }\n\n";
1562 t << "span.year { content: ' '; }\n";
1563 t << "span.year:before { content: var(--year); }\n\n";
1564 }
1565 }
1566
1567 // For Webkit based the scrollbar styling cannot be overruled (bug in chromium?).
1568 // To allow the user to style the scrollbars differently we should only add it in case
1569 // the user did not specify any extra stylesheets.
1570 bool addScrollbarStyling = Config_getList(HTML_EXTRA_STYLESHEET).empty();
1571 if (addScrollbarStyling)
1572 {
1573 t << replaceVariables(ResourceMgr::instance().getAsString("scrollbar.css"));
1574 }
1575
1576}
QCString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
Definition datetime.cpp:62
QCString yearToString()
Returns the current year as a string.
Definition datetime.cpp:75
static bool g_build_date
Definition htmlgen.cpp:69
static QCString replaceVariables(const QCString &input)
Definition htmlgen.cpp:750

References Config_getBool, Config_getEnum, Config_getList, Date, DateTime, dateToString(), g_build_date, ResourceMgr::getAsString(), ResourceMgr::instance(), replaceColorMarkers(), replaceVariables(), Time, and yearToString().

Referenced by HtmlGenerator::writeStyleInfo(), LatexGenerator::writeStyleInfo(), HtmlGenerator::writeStyleSheetFile(), and LatexGenerator::writeStyleSheetFile().

◆ writeServerSearchBox()

void writeServerSearchBox ( TextStream & t,
const QCString & relPath,
bool highlightSearch )
static

Definition at line 93 of file htmlgen.cpp.

94{
95 bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
96 t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
97 t << " <div class=\"left\">\n";
98 t << " <form id=\"FSearchBox\" action=\"" << relPath;
99 if (externalSearch)
100 {
101 t << "search" << Doxygen::htmlFileExtension;
102 }
103 else
104 {
105 t << "search.php";
106 }
107 t << "\" method=\"get\">\n";
108 t << " <span id=\"MSearchSelectExt\" class=\"search-icon\"></span>\n";
109 if (!highlightSearch || !Config_getBool(HTML_DYNAMIC_MENUS))
110 {
111 t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" placeholder=\""
112 << theTranslator->trSearch() << "\" size=\"20\" accesskey=\"S\"/>\n";
113 t << " </form>\n";
114 t << " </div><div class=\"right\"></div>\n";
115 t << " </div>\n";
116 }
117}

References Config_getBool, Doxygen::htmlFileExtension, and theTranslator.

Referenced by getSearchBox(), and renderQuickLinksAsTabs().

Variable Documentation

◆ g_build_date

bool g_build_date = false
static

Definition at line 69 of file htmlgen.cpp.

Referenced by HtmlGenerator::init(), and writeDefaultStyleSheet().

◆ g_darkMap

StringUnorderedMap g_darkMap
static

Definition at line 713 of file htmlgen.cpp.

Referenced by fillColorStyleMaps(), and replaceVariables().

◆ g_footer

◆ g_footer_file

◆ g_header

◆ g_header_file

◆ g_indexLock

std::mutex g_indexLock
static

Definition at line 1596 of file htmlgen.cpp.

Referenced by HtmlGenerator::startFile().

◆ g_latex_macro

QCString g_latex_macro
static

Definition at line 68 of file htmlgen.cpp.

Referenced by HtmlGenerator::init(), and substituteHtmlKeywords().

◆ g_lightMap

StringUnorderedMap g_lightMap
static

Definition at line 712 of file htmlgen.cpp.

Referenced by fillColorStyleMaps(), and replaceVariables().

◆ g_mathjax_code

QCString g_mathjax_code
static

Definition at line 67 of file htmlgen.cpp.

Referenced by HtmlGenerator::init(), and substituteHtmlKeywords().

◆ hex

auto hex ="0123456789ABCDEF"
staticconstexpr

Definition at line 70 of file htmlgen.cpp.

◆ htmlMarkerInfo

const SelectionMarkerInfo htmlMarkerInfo = { '<', "<!--BEGIN ",10,"<!--END ",8,"-->",3 }
static

Definition at line 72 of file htmlgen.cpp.

72{ '<', "<!--BEGIN ",10,"<!--END ",8,"-->",3 };

Referenced by HtmlGenerator::init(), and substituteHtmlKeywords().