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 "mermaid.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 62 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 2847 of file htmlgen.cpp.

2848{
2849 t << "</span>";
2850 if (!l.isEmpty()) t << "</a>";
2851 t << "</li>\n";
2852}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:167

References QCString::isEmpty().

Referenced by renderQuickLinksAsTabs().

◆ endQuickIndexList()

void endQuickIndexList ( TextStream & t)
static

Definition at line 2820 of file htmlgen.cpp.

2821{
2822 if (!Config_getBool(DISABLE_INDEX))
2823 {
2824 t << " </ul>\n";
2825 t << " </div>\n";
2826 }
2827 else
2828 {
2829 t << "</ul>\n";
2830 }
2831}
#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 2124 of file htmlgen.cpp.

2125{
2126 //t << "<!-- endSectionContent -->";
2127 t << "</div>\n";
2128}

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 2099 of file htmlgen.cpp.

2100{
2101 //t << "<!-- endSectionSummary -->";
2102 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2103 if (dynamicSections)
2104 {
2105 t << "</div>\n";
2106 }
2107}

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 716 of file htmlgen.cpp.

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

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 737 of file htmlgen.cpp.

738{
740 auto colorStyle = Config_getEnum(HTML_COLORSTYLE);
741 if (colorStyle==HTML_COLORSTYLE_t::LIGHT)
742 {
743 fillColorStyleMap(replaceColorMarkers(mgr.getAsString("lightmode_settings.css")),g_lightMap);
744 }
745 else if (colorStyle==HTML_COLORSTYLE_t::DARK)
746 {
747 fillColorStyleMap(replaceColorMarkers(mgr.getAsString("darkmode_settings.css")),g_darkMap);
748 }
749}
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:716
static StringUnorderedMap g_lightMap
Definition htmlgen.cpp:713
static StringUnorderedMap g_darkMap
Definition htmlgen.cpp:714
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:5828

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 143 of file htmlgen.cpp.

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

295{
296 TextStream t;
297 if (serverSide)
298 {
299 writeServerSearchBox(t, relPath, highlightSearch);
300 }
301 else
302 {
303 writeClientSearchBox(t, relPath);
304 }
305 return t.str();
306}
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:94
static void writeClientSearchBox(TextStream &t, const QCString &relPath)
Definition htmlgen.cpp:77

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

Referenced by substituteHtmlKeywords(), and writeDefaultQuickLinks().

◆ hasDateReplacement()

bool hasDateReplacement ( const QCString & str)
static

Definition at line 1239 of file htmlgen.cpp.

1240{
1241 return (str.contains("$datetime",false) ||
1242 str.contains("$date",false) ||
1243 str.contains("$time",false) ||
1244 str.contains("$year",false)
1245 );
1246}
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 2854 of file htmlgen.cpp.

2855{
2856 const auto &index = Index::instance();
2857 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
2858 bool showFiles = Config_getBool(SHOW_FILES);
2859 switch (kind)
2860 {
2861 case LayoutNavEntry::MainPage: return TRUE;
2862 case LayoutNavEntry::User: return TRUE;
2863 case LayoutNavEntry::UserGroup: return TRUE;
2864 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
2865 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
2866 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
2867 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
2868 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
2869 case LayoutNavEntry::Namespaces: return showNamespaces && index.numDocumentedNamespaces()>0;
2870 case LayoutNavEntry::NamespaceList: return showNamespaces && index.numDocumentedNamespaces()>0;
2871 case LayoutNavEntry::NamespaceMembers: return showNamespaces && index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
2872 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
2873 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
2874 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
2875 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
2876 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
2877 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0;
2878 case LayoutNavEntry::Files: return showFiles && index.numDocumentedFiles()>0;
2879 case LayoutNavEntry::FileList: return showFiles && index.numDocumentedFiles()>0;
2880 case LayoutNavEntry::FileGlobals: return showFiles && index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
2881 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
2882 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
2883 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
2884 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
2885 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
2886 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
2887 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
2888 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
2889 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
2890 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
2891 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
2892 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
2893 case LayoutNavEntry::None: // should never happen, means not properly initialized
2894 assert(kind != LayoutNavEntry::None);
2895 return FALSE;
2896 }
2897 return FALSE;
2898}
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 2929 of file htmlgen.cpp.

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

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 2900 of file htmlgen.cpp.

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

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

Referenced by renderQuickLinksAsTree(), and writeDefaultQuickLinks().

◆ replaceVariables()

QCString replaceVariables ( const QCString & input)
static

Definition at line 751 of file htmlgen.cpp.

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

2836{
2837 t << " <li";
2838 if (hl)
2839 {
2840 t << " class=\"current\"";
2841 }
2842 t << ">";
2843 if (!l.isEmpty()) t << "<a href=\"" << correctURL(l,relPath) << "\">";
2844 t << "<span>";
2845}
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5947

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

Referenced by renderQuickLinksAsTabs().

◆ startQuickIndexList()

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

Definition at line 2800 of file htmlgen.cpp.

2801{
2802 if (!Config_getBool(DISABLE_INDEX))
2803 {
2804 if (topLevel)
2805 {
2806 t << " <div id=\"navrow1\" class=\"tabs\">\n";
2807 }
2808 else
2809 {
2810 t << " <div id=\"navrow2\" class=\"tabs2\">\n";
2811 }
2812 t << " <ul class=\"tablist\">\n";
2813 }
2814 else
2815 {
2816 t << "<ul>";
2817 }
2818}

References Config_getBool, and TRUE.

Referenced by renderQuickLinksAsTabs(), and renderQuickLinksAsTree().

◆ startSectionContent()

void startSectionContent ( TextStream & t,
int sectionCount )
static

Definition at line 2109 of file htmlgen.cpp.

2110{
2111 //t << "<!-- startSectionContent -->";
2112 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2113 if (dynamicSections)
2114 {
2115 t << "<div id=\"dynsection-" << sectionCount << "-content\" "
2116 "class=\"dyncontent hidden\">\n";
2117 }
2118 else
2119 {
2120 t << "<div class=\"dyncontent\">\n";
2121 }
2122}

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 2065 of file htmlgen.cpp.

2067{
2068 //t << "<!-- startSectionHeader -->";
2069 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2070 if (dynamicSections)
2071 {
2072 t << "<div id=\"dynsection-" << sectionCount << "\" "
2073 "class=\"dynheader closed\">"
2074 "<span class=\"dynarrow\"><span class=\"arrowhead closed\"></span></span>";
2075 }
2076 else
2077 {
2078 t << "<div class=\"dynheader\">\n";
2079 }
2080}

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 2088 of file htmlgen.cpp.

2089{
2090 //t << "<!-- startSectionSummary -->";
2091 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2092 if (dynamicSections)
2093 {
2094 t << "<div id=\"dynsection-" << sectionCount << "-summary\" "
2095 "class=\"dynsummary\">\n";
2096 }
2097}

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 308 of file htmlgen.cpp.

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

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

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 3009 of file htmlgen.cpp.

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

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

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 94 of file htmlgen.cpp.

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

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 70 of file htmlgen.cpp.

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

◆ g_darkMap

StringUnorderedMap g_darkMap
static

Definition at line 714 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 1601 of file htmlgen.cpp.

Referenced by HtmlGenerator::startFile().

◆ g_latex_macro

QCString g_latex_macro
static

Definition at line 69 of file htmlgen.cpp.

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

◆ g_lightMap

StringUnorderedMap g_lightMap
static

Definition at line 713 of file htmlgen.cpp.

Referenced by fillColorStyleMaps(), and replaceVariables().

◆ g_mathjax_code

QCString g_mathjax_code
static

Definition at line 68 of file htmlgen.cpp.

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

◆ hex

auto hex ="0123456789ABCDEF"
staticconstexpr

Definition at line 71 of file htmlgen.cpp.

◆ htmlMarkerInfo

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

Definition at line 73 of file htmlgen.cpp.

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

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