Doxygen
Loading...
Searching...
No Matches
HtmlGenerator Class Referencefinal

Generator for HTML output. More...

#include <src/htmlgen.h>

Inheritance diagram for HtmlGenerator:
Collaboration diagram for HtmlGenerator:

Classes

struct  TocState

Public Member Functions

 HtmlGenerator ()
 HtmlGenerator (const HtmlGenerator &)
HtmlGeneratoroperator= (const HtmlGenerator &)
 HtmlGenerator (HtmlGenerator &&)=delete
HtmlGeneratoroperator= (HtmlGenerator &&)=delete
 ~HtmlGenerator ()
void clearBuffer ()
OutputType type () const override
std::unique_ptr< OutputGenIntfclone () override
void addCodeGen (OutputCodeList &list) override
void cleanup () override
void writeDoc (const IDocNodeAST *node, const Definition *, const MemberDef *, int id, int sectionLevel) override
void startFile (const DString &name, bool isSource, const DString &manName, const DString &title, int id, int hierarchyLevel) override
void endFile () override
void writeFooter (const DString &navPath) override
void writeSearchInfo () override
void startIndexSection (IndexSection) override
void endIndexSection (IndexSection) override
void writePageLink (const DString &, bool) override
void startProjectNumber () override
void endProjectNumber () override
void writeStyleInfo (int part) override
void startTitleHead (const DString &) override
void endTitleHead (const DString &, const DString &) override
void startParagraph (const DString &classDef) override
void endParagraph () override
void writeString (const DString &text) override
void startIndexListItem () override
void endIndexListItem () override
void startIndexList () override
void endIndexList () override
void startIndexKey () override
void endIndexKey () override
void startIndexValue (bool) override
void endIndexValue (const DString &, bool) override
void startItemList () override
void endItemList () override
void startIndexItem (const DString &ref, const DString &file) override
void endIndexItem (const DString &ref, const DString &file) override
void docify (const DString &text) override
void writeObjectLink (const DString &ref, const DString &file, const DString &anchor, const DString &name) override
void startTextLink (const DString &file, const DString &anchor) override
void endTextLink () override
void startTypewriter () override
void endTypewriter () override
void startGroupHeader (const DString &, int) override
void endGroupHeader (int) override
void startItemListItem () override
void endItemListItem () override
void startMemberSections () override
void endMemberSections () override
void startHeaderSection () override
void endHeaderSection () override
void startMemberHeader (const DString &, int) override
void endMemberHeader () override
void startMemberSubtitle () override
void endMemberSubtitle () override
void startMemberDocList () override
void endMemberDocList () override
void startMemberList () override
void endMemberList () override
void startInlineHeader () override
void endInlineHeader () override
void startAnonTypeScope (int) override
void endAnonTypeScope (int) override
void startMemberItem (const DString &anchor, MemberItemType, const DString &inheritId) override
void endMemberItem (MemberItemType) override
void startMemberTemplateParams () override
void endMemberTemplateParams (const DString &anchor, const DString &inheritId) override
void startCompoundTemplateParams () override
void endCompoundTemplateParams () override
void startMemberGroupHeader (const DString &, bool) override
void endMemberGroupHeader (bool) override
void startMemberGroupDocs () override
void endMemberGroupDocs () override
void startMemberGroup () override
void endMemberGroup (bool) override
void insertMemberAlign (bool) override
void insertMemberAlignLeft (MemberItemType, bool) override
void startMemberDescription (const DString &anchor, const DString &inheritId, bool typ) override
void endMemberDescription () override
void startMemberDeclaration () override
void endMemberDeclaration (const DString &anchor, const DString &inheritId) override
void writeInheritedSectionTitle (const DString &id, const DString &ref, const DString &file, const DString &anchor, const DString &title, const DString &name) override
void writeRuler () override
void writeAnchor (const DString &, const DString &name) override
void startEmphasis () override
void endEmphasis () override
void startBold () override
void endBold () override
void startDescForItem () override
void endDescForItem () override
void lineBreak (const DString &style) override
void writeChar (char c) override
void startMemberDoc (const DString &clName, const DString &memName, const DString &anchor, const DString &title, int memCount, int memTotal, bool showInline) override
void endMemberDoc (bool) override
void startDoxyAnchor (const DString &fName, const DString &manName, const DString &anchor, const DString &name, const DString &args) override
void endDoxyAnchor (const DString &fName, const DString &anchor) override
void addLabel (const DString &, const DString &) override
void writeLatexSpacing () override
void writeStartAnnoItem (const DString &type, const DString &file, const DString &path, const DString &name) override
void startCenter () override
void endCenter () override
void startSmall () override
void endSmall () override
void startExamples () override
void endExamples () override
void startSection (const DString &, const DString &, SectionType) override
void endSection (const DString &, SectionType) override
void addIndexItem (const DString &, const DString &) override
void startIndent () override
void endIndent () override
void writeSynopsis () override
void startClassDiagram () override
void endClassDiagram (const ClassDiagram &, const DString &, const DString &) override
void startPageRef () override
void endPageRef (const DString &, const DString &) override
void startQuickIndices () override
void endQuickIndices () override
void writeSplitBar (const DString &name, const DString &allMembersFile) override
void writeNavigationPath (const DString &s) override
void writeLogo () override
void writeQuickLinks (HighlightedItem hli, const DString &file, bool extraTabs) override
void writeSummaryLink (const DString &file, const DString &anchor, const DString &title, bool first) override
void writePageOutline () override
void startContents () override
void endContents () override
void startPageDoc (const DString &pageTitle) override
void endPageDoc () override
void writeNonBreakableSpace (int) override
void startDescTable (const DString &title, const bool hasInits) override
void endDescTable () override
void startDescTableRow () override
void endDescTableRow () override
void startDescTableTitle () override
void endDescTableTitle () override
void startDescTableInit () override
void endDescTableInit () override
void startDescTableData () override
void endDescTableData () override
void startDotGraph () override
void endDotGraph (DotClassGraph &g) override
void startInclDepGraph () override
void endInclDepGraph (DotInclDepGraph &g) override
void startGroupCollaboration () override
void endGroupCollaboration (DotGroupCollaboration &g) override
void startCallGraph () override
void endCallGraph (DotCallGraph &g) override
void startDirDepGraph () override
void endDirDepGraph (DotDirDeps &g) override
void writeGraphicalHierarchy (DotGfxHierarchyTable &g) override
void startTextBlock (bool) override
void endTextBlock (bool) override
void lastIndexPage () override
void startMemberDocPrefixItem () override
void endMemberDocPrefixItem () override
void startMemberDocName (bool) override
void endMemberDocName () override
void startParameterType (bool first, const DString &key) override
void endParameterType () override
void startParameterName (bool) override
void endParameterName () override
void startParameterExtra () override
void endParameterExtra (bool last, bool emptyList, bool closeBracket) override
void startParameterDefVal (const char *sep) override
void endParameterDefVal () override
void startParameterList (bool) override
void endParameterList () override
void exceptionEntry (const DString &, bool) override
void startConstraintList (const DString &) override
void startConstraintParam () override
void endConstraintParam () override
void startConstraintType () override
void endConstraintType () override
void startConstraintDocs () override
void endConstraintDocs () override
void endConstraintList () override
void startMemberDocSimple (bool) override
void endMemberDocSimple (bool) override
void startInlineMemberType () override
void endInlineMemberType () override
void startInlineMemberName () override
void endInlineMemberName () override
void startInlineMemberDoc () override
void endInlineMemberDoc () override
void startLabels () override
void writeLabel (const DString &l, bool isLast) override
void endLabels () override
void startLocalToc (int level) override
void endLocalToc () override
void startTocEntry (const SectionInfo *si) override
void endTocEntry (const SectionInfo *si) override
void startPlainFile (const DString &name) override
void endPlainFile () override
void startEmbeddedDoc (size_t) override
void endEmbeddedDoc () override
Public Member Functions inherited from OutputGenerator
 OutputGenerator ()
 OutputGenerator (const DString &dir)
virtual ~OutputGenerator ()=default
DString dir () const
DString fileName () const
void startPlainFile (const DString &name)
void endPlainFile ()

Static Public Member Functions

static void init ()
static void writeStyleSheetFile (TextStream &t)
static void writeHeaderFile (TextStream &t, const DString &cssname)
static void writeFooterFile (TextStream &t)
static void writeTabData ()
 Additional initialization after indices have been created.
static void writeSearchInfoStatic (TextStream &t, const DString &relPath)
static void writeSearchData (const DString &dir)
static void writeSearchPage ()
static void writeExternalSearchPage ()
static DString writeLogoAsString (const DString &path)
static DString writeSplitBarAsString (const DString &name, const DString &relpath, const DString &allMembersFile)
static DString getNavTreeCss ()
static DString fixSpaces (const DString &s)

Private Member Functions

void startTitle ()
void endTitle ()
void docify_ (const DString &text, bool inHtmlComment)

Static Private Member Functions

static void writePageFooter (TextStream &t, const DString &, const DString &, const DString &)

Private Attributes

DString m_lastTitle
DString m_lastFile
DString m_relPath
int m_sectionCount = 0
bool m_emptySection = false
std::unique_ptr< OutputCodeListm_codeList
HtmlCodeGeneratorm_codeGen = nullptr
int m_pageOutlineIndent = 0
TocState m_tocState

Additional Inherited Members

Public Types inherited from OutputGenerator
enum class  ParamListTypes { Param , RetVal , Exception }
enum class  MemberItemType { Normal , AnonymousStart , AnonymousEnd , Templated }
Protected Attributes inherited from OutputGenerator
TextStream m_t
DString m_dir

Detailed Description

Generator for HTML output.

Definition at line 92 of file htmlgen.h.

Constructor & Destructor Documentation

◆ HtmlGenerator() [1/3]

HtmlGenerator::HtmlGenerator ( )

Definition at line 1220 of file htmlgen.cpp.

1221 : OutputGenerator(Config_getString(HTML_OUTPUT))
1222 , m_codeList(std::make_unique<OutputCodeList>())
1223{
1224 //printf("%p:HtmlGenerator()\n",(void*)this);
1225 m_codeGen = m_codeList->add<HtmlCodeGenerator>(&m_t);
1226}
HtmlCodeGenerator * m_codeGen
Definition htmlgen.h:349
std::unique_ptr< OutputCodeList > m_codeList
Definition htmlgen.h:348
TextStream m_t
Definition outputgen.h:113
#define Config_getString(name)
Definition config.h:32

References Config_getString, m_codeGen, m_codeList, OutputGenerator::m_t, and OutputGenerator::OutputGenerator().

Referenced by HtmlGenerator(), HtmlGenerator(), operator=(), and operator=().

◆ HtmlGenerator() [2/3]

HtmlGenerator::HtmlGenerator ( const HtmlGenerator & og)

Definition at line 1228 of file htmlgen.cpp.

1228 : OutputGenerator(og.m_dir), OutputGenIntf()
1229{
1230 //printf("%p:HtmlGenerator(copy %p)\n",(void*)this,(void*)&og);
1231 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
1232 m_codeGen = m_codeList->get<HtmlCodeGenerator>(OutputType::Html);
1236 m_relPath = og.m_relPath;
1239}
void setTextStream(TextStream *t)
Definition htmlgen.h:28
int m_sectionCount
Definition htmlgen.h:346
DString m_lastTitle
Definition htmlgen.h:343
DString m_lastFile
Definition htmlgen.h:344
DString m_relPath
Definition htmlgen.h:345
bool m_emptySection
Definition htmlgen.h:347

References Html, HtmlGenerator(), m_codeGen, m_codeList, OutputGenerator::m_dir, m_emptySection, m_lastFile, m_lastTitle, m_relPath, m_sectionCount, OutputGenerator::m_t, OutputGenerator::OutputGenerator(), and HtmlCodeGenerator::setTextStream().

◆ HtmlGenerator() [3/3]

HtmlGenerator::HtmlGenerator ( HtmlGenerator && )
delete

References HtmlGenerator().

◆ ~HtmlGenerator()

HtmlGenerator::~HtmlGenerator ( )
default

Member Function Documentation

◆ addCodeGen()

void HtmlGenerator::addCodeGen ( OutputCodeList & list)
overridevirtual

Implements OutputGenIntf.

Definition at line 1261 of file htmlgen.cpp.

1262{
1264}
void add(OutputCodeIntfPtr &&p)
Definition outputlist.h:192
OutputCodeDefer< HtmlCodeGenerator > HtmlCodeGeneratorDefer
Definition outputlist.h:99

References OutputCodeList::add(), and m_codeGen.

◆ addIndexItem()

void HtmlGenerator::addIndexItem ( const DString & ,
const DString &  )
overridevirtual

Implements OutputGenIntf.

Definition at line 2747 of file htmlgen.cpp.

2748{
2749}

◆ addLabel()

void HtmlGenerator::addLabel ( const DString & ,
const DString &  )
overridevirtual

Implements OutputGenIntf.

Definition at line 1851 of file htmlgen.cpp.

1852{
1853}

◆ cleanup()

void HtmlGenerator::cleanup ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1431 of file htmlgen.cpp.

1432{
1433 DString dname = Config_getString(HTML_OUTPUT);
1434 Dir d(dname.str());
1435 clearSubDirs(d);
1436}
const std::string & str() const
Definition dstring.h:645
void clearSubDirs(const Dir &d)
Definition util.cpp:2996

References clearSubDirs(), Config_getString, and DString::str().

◆ clearBuffer()

void HtmlGenerator::clearBuffer ( )

◆ clone()

std::unique_ptr< OutputGenIntf > HtmlGenerator::clone ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 120 of file htmlgen.h.

120{ return std::make_unique<HtmlGenerator>(*this); }

◆ docify()

void HtmlGenerator::docify ( const DString & text)
overridevirtual

Implements OutputGenIntf.

Definition at line 2047 of file htmlgen.cpp.

2048{
2049 docify_(str,false);
2050}
void docify_(const DString &text, bool inHtmlComment)
Definition htmlgen.cpp:2052

References docify_().

Referenced by startExamples(), startMemberDoc(), startParameterDefVal(), writeChar(), writeObjectLink(), and writeStartAnnoItem().

◆ docify_()

void HtmlGenerator::docify_ ( const DString & text,
bool inHtmlComment )
private

Definition at line 2052 of file htmlgen.cpp.

2053{
2054 if (!str.empty())
2055 {
2056 const char *p=str.data();
2057 while (*p)
2058 {
2059 char c=*p++;
2060 switch(c)
2061 {
2062 case '<': m_t << "&lt;"; break;
2063 case '>': m_t << "&gt;"; break;
2064 case '&': m_t << "&amp;"; break;
2065 case '"': m_t << "&quot;"; break;
2066 case '-': if (inHtmlComment) m_t << "&#45;"; else m_t << "-"; break;
2067 case '\\':
2068 if (*p=='<')
2069 { m_t << "&lt;"; p++; }
2070 else if (*p=='>')
2071 { m_t << "&gt;"; p++; }
2072 else if (*p=='[')
2073 { m_t << "\\&zwj;["; p++; }
2074 else if (*p==']')
2075 { m_t << "\\&zwj;]"; p++; }
2076 else if (*p=='(')
2077 { m_t << "\\&zwj;("; p++; }
2078 else if (*p==')')
2079 { m_t << "\\&zwj;)"; p++; }
2080 else
2081 m_t << "\\";
2082 break;
2083 default: m_t << c;
2084 }
2085 }
2086 }
2087}

References DString::data(), DString::empty(), and OutputGenerator::m_t.

Referenced by docify().

◆ endAnonTypeScope()

void HtmlGenerator::endAnonTypeScope ( int )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 183 of file htmlgen.h.

183{}

◆ endBold()

void HtmlGenerator::endBold ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 214 of file htmlgen.h.

214{ m_t << "</b>"; }

References OutputGenerator::m_t.

◆ endCallGraph()

void HtmlGenerator::endCallGraph ( DotCallGraph & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2670 of file htmlgen.cpp.

2671{
2676
2678
2681}
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
DString dir() const
Definition outputgen.cpp:48
DString fileName() const
Definition outputgen.cpp:53
static void startSectionContent(TextStream &t, int sectionCount)
Definition htmlgen.cpp:2143
static void startSectionSummary(TextStream &t, int sectionCount)
Definition htmlgen.cpp:2122
static void endSectionContent(TextStream &t)
Definition htmlgen.cpp:2158
static void endSectionHeader(TextStream &t)
Definition htmlgen.cpp:2116
static void endSectionSummary(TextStream &t)
Definition htmlgen.cpp:2133

References BITMAP, OutputGenerator::dir(), endSectionContent(), endSectionHeader(), endSectionSummary(), OutputGenerator::fileName(), Html, m_relPath, m_sectionCount, OutputGenerator::m_t, startSectionContent(), startSectionSummary(), and DotCallGraph::writeGraph().

◆ endCenter()

void HtmlGenerator::endCenter ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 232 of file htmlgen.h.

232{ m_t << "</center>\n"; }

References OutputGenerator::m_t.

◆ endClassDiagram()

void HtmlGenerator::endClassDiagram ( const ClassDiagram & d,
const DString & fileName,
const DString & name )
overridevirtual

Implements OutputGenIntf.

Definition at line 2171 of file htmlgen.cpp.

2173{
2178 TextStream tt;
2179 d.writeImage(tt,dir(),m_relPath,fileName,true,true);
2180 if (!tt.empty())
2181 {
2182 m_t << " <div class=\"center\">\n";
2183 m_t << " <img src=\"";
2184 m_t << m_relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
2185 m_t << "_map\" alt=\"\"/>\n";
2186 m_t << " <map id=\"" << convertToId(name);
2187 m_t << "_map\" name=\"" << convertToId(name);
2188 m_t << "_map\">\n";
2189 m_t << tt.str();
2190 m_t << " </map>\n";
2191 m_t << "</div>";
2192 }
2193 else
2194 {
2195 m_t << " <div class=\"center\">\n";
2196 m_t << " <img src=\"";
2197 m_t << m_relPath << fileName << ".png\" alt=\"\"/>\n";
2198 m_t << " </div>";
2199 }
2202}
void writeImage(TextStream &t, const DString &path, const DString &relPath, const DString &file, bool generateMap, bool toIndex) const
Definition diagram.cpp:1363
bool empty() const
Returns true iff the buffer is empty.
Definition textstream.h:256
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:232
DString convertToId(const DString &s)
Definition util.cpp:3202

References convertToId(), OutputGenerator::dir(), TextStream::empty(), endSectionContent(), endSectionHeader(), endSectionSummary(), OutputGenerator::fileName(), m_relPath, m_sectionCount, OutputGenerator::m_t, startSectionContent(), startSectionSummary(), TextStream::str(), and ClassDiagram::writeImage().

◆ endCompoundTemplateParams()

void HtmlGenerator::endCompoundTemplateParams ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2274 of file htmlgen.cpp.

2275{
2276 m_t << "</div>";
2277}

References OutputGenerator::m_t.

◆ endConstraintDocs()

void HtmlGenerator::endConstraintDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3508 of file htmlgen.cpp.

3509{
3510 m_t << "</td></tr>\n";
3511}

References OutputGenerator::m_t.

◆ endConstraintList()

void HtmlGenerator::endConstraintList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3513 of file htmlgen.cpp.

3514{
3515 m_t << "</table>\n";
3516 m_t << "</dd>\n";
3517 m_t << "</dl>\n";
3518 m_t << "</div>\n";
3519}

References OutputGenerator::m_t.

◆ endConstraintParam()

void HtmlGenerator::endConstraintParam ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3488 of file htmlgen.cpp.

3489{
3490 m_t << "</em></td>";
3491}

References OutputGenerator::m_t.

◆ endConstraintType()

void HtmlGenerator::endConstraintType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3498 of file htmlgen.cpp.

3499{
3500 m_t << "</em></td>";
3501}

References OutputGenerator::m_t.

◆ endContents()

void HtmlGenerator::endContents ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3251 of file htmlgen.cpp.

3252{
3253 m_t << "</div><!-- contents -->\n";
3254}

References OutputGenerator::m_t.

◆ endDescForItem()

void HtmlGenerator::endDescForItem ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 216 of file htmlgen.h.

216{ m_t << "</dd>\n"; }

References OutputGenerator::m_t.

◆ endDescTable()

void HtmlGenerator::endDescTable ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2764 of file htmlgen.cpp.

2765{
2766 m_t << "</table>\n";
2767}

References OutputGenerator::m_t.

◆ endDescTableData()

void HtmlGenerator::endDescTableData ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2804 of file htmlgen.cpp.

2805{
2806 m_t << "</td>";
2807}

References OutputGenerator::m_t.

◆ endDescTableInit()

void HtmlGenerator::endDescTableInit ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2794 of file htmlgen.cpp.

2795{
2796 m_t << "&#160;</td>";
2797}

References OutputGenerator::m_t.

◆ endDescTableRow()

void HtmlGenerator::endDescTableRow ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2774 of file htmlgen.cpp.

2775{
2776 m_t << "</tr>\n";
2777}

References OutputGenerator::m_t.

◆ endDescTableTitle()

void HtmlGenerator::endDescTableTitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2784 of file htmlgen.cpp.

2785{
2786 m_t << "&#160;</td>";
2787}

References OutputGenerator::m_t.

◆ endDirDepGraph()

void HtmlGenerator::endDirDepGraph ( DotDirDeps & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2688 of file htmlgen.cpp.

2689{
2694
2696
2699}
DString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1, bool linkRelations=true)

References BITMAP, OutputGenerator::dir(), endSectionContent(), endSectionHeader(), endSectionSummary(), OutputGenerator::fileName(), Html, m_relPath, m_sectionCount, OutputGenerator::m_t, startSectionContent(), startSectionSummary(), and DotDirDeps::writeGraph().

◆ endDotGraph()

void HtmlGenerator::endDotGraph ( DotClassGraph & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2600 of file htmlgen.cpp.

2601{
2602 bool generateLegend = Config_getBool(GENERATE_LEGEND);
2603 bool umlLook = Config_getBool(UML_LOOK);
2608
2610 if (generateLegend && !umlLook)
2611 {
2612 DString url = m_relPath+"graph_legend"+Doxygen::htmlFileExtension;
2613 m_t << "<center><span class=\"legend\">[";
2614 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2615 m_t << "<a ";
2616 if (generateTreeView) m_t << "target=\"top\" ";
2617 m_t << "href=\"";
2618 if (!url.empty()) m_t << url;
2619 m_t << "\">";
2621 m_t << "</a>";
2622 m_t << "]</span></center>";
2623 }
2624
2627}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:148
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool TBRank=true, bool imageMap=true, int graphId=-1)
static DString htmlFileExtension
Definition doxygen.h:115
virtual DString trLegend()=0
#define Config_getBool(name)
Definition config.h:33
Translator * theTranslator
Definition language.cpp:76

References BITMAP, Config_getBool, OutputGenerator::dir(), DString::empty(), endSectionContent(), endSectionHeader(), endSectionSummary(), OutputGenerator::fileName(), Html, Doxygen::htmlFileExtension, m_relPath, m_sectionCount, OutputGenerator::m_t, startSectionContent(), startSectionSummary(), theTranslator, Translator::trLegend(), and DotClassGraph::writeGraph().

◆ endDoxyAnchor()

void HtmlGenerator::endDoxyAnchor ( const DString & fName,
const DString & anchor )
overridevirtual

Implements OutputGenIntf.

Definition at line 1847 of file htmlgen.cpp.

1848{
1849}

◆ endEmbeddedDoc()

void HtmlGenerator::endEmbeddedDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3627 of file htmlgen.cpp.

3628{
3629 DBG_HTML(m_t << "<!-- endEmbeddedDoc -->\n";)
3630 m_t << "</div>";
3631}
#define DBG_HTML(x)
Definition htmlgen.cpp:55

References DBG_HTML, and OutputGenerator::m_t.

◆ endEmphasis()

void HtmlGenerator::endEmphasis ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 212 of file htmlgen.h.

212{ m_t << "</em>"; }

References OutputGenerator::m_t.

◆ endExamples()

void HtmlGenerator::endExamples ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2816 of file htmlgen.cpp.

2817{
2818 m_t << "</dl>\n";
2819}

References OutputGenerator::m_t.

◆ endFile()

void HtmlGenerator::endFile ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1747 of file htmlgen.cpp.

1748{
1749 endPlainFile();
1750}
void endPlainFile() override
Definition htmlgen.h:332

References endPlainFile().

◆ endGroupCollaboration()

void HtmlGenerator::endGroupCollaboration ( DotGroupCollaboration & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2652 of file htmlgen.cpp.

2653{
2658
2660
2663}
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)

References BITMAP, OutputGenerator::dir(), endSectionContent(), endSectionHeader(), endSectionSummary(), OutputGenerator::fileName(), Html, m_relPath, m_sectionCount, OutputGenerator::m_t, startSectionContent(), startSectionSummary(), and DotGroupCollaboration::writeGraph().

◆ endGroupHeader()

void HtmlGenerator::endGroupHeader ( int extraIndentLevel)
overridevirtual

Implements OutputGenIntf.

Definition at line 2000 of file htmlgen.cpp.

2001{
2002 if (extraIndentLevel==2)
2003 {
2004 m_t << "</h4>\n";
2005 }
2006 else if (extraIndentLevel==1)
2007 {
2008 m_t << "</h3>\n";
2009 }
2010 else
2011 {
2012 m_t << "</h2>\n";
2013 }
2014}

References OutputGenerator::m_t.

◆ endHeaderSection()

void HtmlGenerator::endHeaderSection ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3550 of file htmlgen.cpp.

3551{
3552 m_t << "</div><!--header-->\n";
3553}

References OutputGenerator::m_t.

◆ endInclDepGraph()

void HtmlGenerator::endInclDepGraph ( DotInclDepGraph & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2634 of file htmlgen.cpp.

2635{
2640
2642
2645}
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)

References BITMAP, OutputGenerator::dir(), endSectionContent(), endSectionHeader(), endSectionSummary(), OutputGenerator::fileName(), Html, m_relPath, m_sectionCount, OutputGenerator::m_t, startSectionContent(), startSectionSummary(), and DotInclDepGraph::writeGraph().

◆ endIndent()

void HtmlGenerator::endIndent ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2741 of file htmlgen.cpp.

2742{
2743 DBG_HTML(m_t << "<!-- endIndent -->\n";)
2744 m_t << "\n</div>\n" << "</div>\n";
2745}

References DBG_HTML, and OutputGenerator::m_t.

◆ endIndexItem()

void HtmlGenerator::endIndexItem ( const DString & ref,
const DString & file )
overridevirtual

Implements OutputGenIntf.

Definition at line 1913 of file htmlgen.cpp.

1914{
1915 //printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
1916 if (!ref.empty() || !f.empty())
1917 {
1918 m_t << "</a>";
1919 }
1920 else
1921 {
1922 m_t << "</b>";
1923 }
1924}

References DString::empty(), and OutputGenerator::m_t.

◆ endIndexKey()

void HtmlGenerator::endIndexKey ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2404 of file htmlgen.cpp.

2405{
2406 //m_t << "</td>";
2407}

◆ endIndexList()

void HtmlGenerator::endIndexList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2394 of file htmlgen.cpp.

2395{
2396 m_t << "</table>\n";
2397}

References OutputGenerator::m_t.

◆ endIndexListItem()

void HtmlGenerator::endIndexListItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1878 of file htmlgen.cpp.

1879{
1880 m_t << "</li>\n";
1881}

References OutputGenerator::m_t.

◆ endIndexSection()

void HtmlGenerator::endIndexSection ( IndexSection )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 131 of file htmlgen.h.

131{}

◆ endIndexValue()

void HtmlGenerator::endIndexValue ( const DString & ,
bool  )
overridevirtual

Implements OutputGenIntf.

Definition at line 2414 of file htmlgen.cpp.

2415{
2416 //m_t << "</td></tr>\n";
2417}

◆ endInlineHeader()

void HtmlGenerator::endInlineHeader ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3565 of file htmlgen.cpp.

3566{
3567 m_t << "</h3></th></tr>\n";
3568}

References OutputGenerator::m_t.

◆ endInlineMemberDoc()

void HtmlGenerator::endInlineMemberDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3615 of file htmlgen.cpp.

3616{
3617 DBG_HTML(m_t << "<!-- endInlineMemberDoc -->\n";)
3618 m_t << "</td></tr>\n";
3619}

References DBG_HTML, and OutputGenerator::m_t.

◆ endInlineMemberName()

void HtmlGenerator::endInlineMemberName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3603 of file htmlgen.cpp.

3604{
3605 DBG_HTML(m_t << "<!-- endInlineMemberName -->\n";)
3606 m_t << "</td>\n";
3607}

References DBG_HTML, and OutputGenerator::m_t.

◆ endInlineMemberType()

void HtmlGenerator::endInlineMemberType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3591 of file htmlgen.cpp.

3592{
3593 DBG_HTML(m_t << "<!-- endInlineMemberType -->\n";)
3594 m_t << "</td>\n";
3595}

References DBG_HTML, and OutputGenerator::m_t.

◆ endItemList()

void HtmlGenerator::endItemList ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 151 of file htmlgen.h.

151{ m_t << "</ul>\n"; }

References OutputGenerator::m_t.

◆ endItemListItem()

void HtmlGenerator::endItemListItem ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 166 of file htmlgen.h.

166{ m_t << "</li>\n"; }

References OutputGenerator::m_t.

◆ endLabels()

void HtmlGenerator::endLabels ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3679 of file htmlgen.cpp.

3680{
3681 DBG_HTML(m_t << "<!-- endLabels -->\n";)
3682 m_t << "</span>";
3683}

References DBG_HTML, and OutputGenerator::m_t.

◆ endLocalToc()

void HtmlGenerator::endLocalToc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3787 of file htmlgen.cpp.

3788{
3790 while (m_tocState.level>0)
3791 {
3792 m_tocState.decIndent(m_t,"</li>");
3793 m_tocState.decIndent(m_t,"</ul>");
3794 m_tocState.level--;
3795 }
3796 m_t << "</div>\n";
3797}
TocState m_tocState
Definition htmlgen.h:362
void decIndent(TextStream &t, const DString &text)
Definition htmlgen.h:360

References HtmlGenerator::TocState::decIndent(), HtmlGenerator::TocState::level, OutputGenerator::m_t, m_tocState, and HtmlGenerator::TocState::maxLevel.

◆ endMemberDeclaration()

void HtmlGenerator::endMemberDeclaration ( const DString & anchor,
const DString & inheritId )
overridevirtual

Implements OutputGenIntf.

Definition at line 3762 of file htmlgen.cpp.

3763{
3764}

◆ endMemberDescription()

void HtmlGenerator::endMemberDescription ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2318 of file htmlgen.cpp.

2319{
2320 DBG_HTML(m_t << "<!-- endMemberDescription -->\n")
2321 m_t << "<br /></td></tr>\n";
2322}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDoc()

void HtmlGenerator::endMemberDoc ( bool hasArgs)
overridevirtual

Implements OutputGenIntf.

Definition at line 2584 of file htmlgen.cpp.

2585{
2586 DBG_HTML(m_t << "<!-- endMemberDoc -->\n";)
2587 if (!hasArgs)
2588 {
2589 m_t << " </tr>\n";
2590 }
2591 m_t << " </table>\n";
2592 // m_t << "</div>\n";
2593}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocList()

void HtmlGenerator::endMemberDocList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2424 of file htmlgen.cpp.

2425{
2426 DBG_HTML(m_t << "<!-- endMemberDocList -->\n";)
2427}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocName()

void HtmlGenerator::endMemberDocName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2468 of file htmlgen.cpp.

2469{
2470 DBG_HTML(m_t << "<!-- endMemberDocName -->\n";)
2471 m_t << "</td>\n";
2472}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocPrefixItem()

void HtmlGenerator::endMemberDocPrefixItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2452 of file htmlgen.cpp.

2453{
2454 DBG_HTML(m_t << "<!-- endMemberDocPrefixItem -->\n";)
2455 m_t << "</div>\n";
2456}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocSimple()

void HtmlGenerator::endMemberDocSimple ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 3579 of file htmlgen.cpp.

3580{
3581 DBG_HTML(m_t << "<!-- endMemberDocSimple -->\n";)
3582 m_t << "</table>\n";
3583}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberGroup()

void HtmlGenerator::endMemberGroup ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2730 of file htmlgen.cpp.

2731{
2732}

◆ endMemberGroupDocs()

void HtmlGenerator::endMemberGroupDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2721 of file htmlgen.cpp.

2722{
2723 m_t << "</div></td></tr>\n";
2724}

References OutputGenerator::m_t.

◆ endMemberGroupHeader()

void HtmlGenerator::endMemberGroupHeader ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2711 of file htmlgen.cpp.

2712{
2713 m_t << "</div></td></tr>\n";
2714}

References OutputGenerator::m_t.

◆ endMemberHeader()

void HtmlGenerator::endMemberHeader ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2366 of file htmlgen.cpp.

2367{
2368 DBG_HTML(m_t << "<!-- endMemberHeader -->\n")
2369 m_t << "</h2></td></tr>\n";
2370}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberItem()

void HtmlGenerator::endMemberItem ( MemberItemType type)
overridevirtual

Implements OutputGenIntf.

Definition at line 2243 of file htmlgen.cpp.

2244{
2246 {
2247 insertMemberAlign(false);
2248 }
2249 m_t << "</td></tr>\n";
2250}
OutputType type() const override
Definition htmlgen.h:119
void insertMemberAlign(bool) override
Definition htmlgen.cpp:2279

References OutputGenerator::AnonymousStart, insertMemberAlign(), OutputGenerator::m_t, and type().

◆ endMemberList()

void HtmlGenerator::endMemberList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2210 of file htmlgen.cpp.

2211{
2212 DBG_HTML(m_t << "<!-- endMemberList -->\n")
2213}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberSections()

void HtmlGenerator::endMemberSections ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2332 of file htmlgen.cpp.

2333{
2334 DBG_HTML(m_t << "<!-- endMemberSections -->\n")
2335 if (!m_emptySection)
2336 {
2337 m_t << "</table>\n";
2338 }
2339}

References DBG_HTML, m_emptySection, and OutputGenerator::m_t.

◆ endMemberSubtitle()

void HtmlGenerator::endMemberSubtitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2383 of file htmlgen.cpp.

2384{
2385 DBG_HTML(m_t << "<!-- endMemberSubtitle -->\n")
2386 m_t << "</td></tr>\n";
2387}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberTemplateParams()

void HtmlGenerator::endMemberTemplateParams ( const DString & anchor,
const DString & inheritId )
overridevirtual

Implements OutputGenIntf.

Definition at line 2256 of file htmlgen.cpp.

2257{
2258 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2259 m_t << "</td></tr>\n";
2260 m_t << "<tr class=\"memitem:" << convertToId(anchor);
2261 if (!inheritId.empty())
2262 {
2263 if (dynamicSections) m_t << " inherit";
2264 m_t << " " << inheritId;
2265 }
2266 m_t << " template\"><td class=\"memItemLeft\">";
2267}

References Config_getBool, convertToId(), DString::empty(), and OutputGenerator::m_t.

◆ endPageDoc()

void HtmlGenerator::endPageDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3261 of file htmlgen.cpp.

3262{
3263 m_t << "</div><!-- PageDoc -->\n";
3264}

References OutputGenerator::m_t.

◆ endPageRef()

void HtmlGenerator::endPageRef ( const DString & ,
const DString &  )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 246 of file htmlgen.h.

246{}

◆ endParagraph()

void HtmlGenerator::endParagraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1863 of file htmlgen.cpp.

1864{
1865 m_t << "</p>\n";
1866}

References OutputGenerator::m_t.

◆ endParameterDefVal()

void HtmlGenerator::endParameterDefVal ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2553 of file htmlgen.cpp.

2554{
2555 m_t << "</span>";
2556}

References OutputGenerator::m_t.

◆ endParameterExtra()

void HtmlGenerator::endParameterExtra ( bool last,
bool emptyList,
bool closeBracket )
overridevirtual

Implements OutputGenIntf.

Definition at line 2522 of file htmlgen.cpp.

2523{
2524 DBG_HTML(m_t << "<!-- endParameterExtra -->\n";)
2525 if (last)
2526 {
2527 if (emptyList)
2528 {
2529 if (closeBracket) m_t << "</td><td>)";
2530 m_t << "</td>\n";
2531 m_t << " <td>";
2532 }
2533 else
2534 {
2535 m_t << "&#160;";
2536 if (closeBracket) m_t << ")";
2537 }
2538 }
2539 else
2540 {
2541 m_t << "</td>\n";
2542 m_t << " </tr>\n";
2543 }
2544}

References DBG_HTML, and OutputGenerator::m_t.

◆ endParameterList()

void HtmlGenerator::endParameterList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2558 of file htmlgen.cpp.

2559{
2560 DBG_HTML(m_t << "<!-- endParameterList -->\n";)
2561 m_t << "</td>\n";
2562 m_t << " </tr>\n";
2563}

References DBG_HTML, and OutputGenerator::m_t.

◆ endParameterName()

void HtmlGenerator::endParameterName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2511 of file htmlgen.cpp.

2512{
2513 DBG_HTML(m_t << "<!-- endParameterName -->\n";)
2514 m_t << "</em></span>";
2515}

References DBG_HTML, and OutputGenerator::m_t.

◆ endParameterType()

void HtmlGenerator::endParameterType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2499 of file htmlgen.cpp.

2500{
2501 DBG_HTML(m_t << "<!-- endParameterType -->\n";)
2502 m_t << "</td>";
2503}

References DBG_HTML, and OutputGenerator::m_t.

◆ endPlainFile()

void HtmlGenerator::endPlainFile ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 332 of file htmlgen.h.

References OutputGenerator::endPlainFile().

Referenced by endFile(), and writeStyleInfo().

◆ endProjectNumber()

void HtmlGenerator::endProjectNumber ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1757 of file htmlgen.cpp.

1758{
1759 m_t << "</h3>";
1760}

References OutputGenerator::m_t.

◆ endQuickIndices()

void HtmlGenerator::endQuickIndices ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3192 of file htmlgen.cpp.

3193{
3194 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3195 m_t << "</div><!-- top -->\n";
3196 if (!generateTreeView)
3197 {
3198 m_t << "<div id=\"doc-content\">\n";
3199 }
3200}

References Config_getBool, and OutputGenerator::m_t.

◆ endSection()

void HtmlGenerator::endSection ( const DString & ,
SectionType type )
overridevirtual

Implements OutputGenIntf.

Definition at line 2032 of file htmlgen.cpp.

2033{
2034 switch(type.level())
2035 {
2036 case SectionType::Page: m_t << "</h1>"; break;
2037 case SectionType::Section: m_t << "</h2>"; break;
2038 case SectionType::Subsection: m_t << "</h3>"; break;
2039 case SectionType::Subsubsection: m_t << "</h4>"; break;
2040 case SectionType::Paragraph: m_t << "</h5>"; break;
2041 case SectionType::Subparagraph: m_t << "</h6>"; break;
2042 case SectionType::Subsubparagraph: m_t << "</h6>"; break;
2043 default: ASSERT(0); break;
2044 }
2045}
static constexpr int Section
Definition section.h:33
static constexpr int Subsection
Definition section.h:34
static constexpr int Subsubsection
Definition section.h:35
constexpr int level() const
Definition section.h:46
static constexpr int Page
Definition section.h:31
static constexpr int Paragraph
Definition section.h:36
static constexpr int Subsubparagraph
Definition section.h:38
static constexpr int Subparagraph
Definition section.h:37
#define ASSERT(x)
Definition message.h:142

References ASSERT, SectionType::level(), OutputGenerator::m_t, SectionType::Page, SectionType::Paragraph, SectionType::Section, SectionType::Subparagraph, SectionType::Subsection, SectionType::Subsubparagraph, SectionType::Subsubsection, and type().

◆ endSmall()

void HtmlGenerator::endSmall ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 234 of file htmlgen.h.

234{ m_t << "</small>\n"; }

References OutputGenerator::m_t.

◆ endTextBlock()

void HtmlGenerator::endTextBlock ( bool )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 285 of file htmlgen.h.

285{ m_t << "</div>"; }

References OutputGenerator::m_t.

◆ endTextLink()

void HtmlGenerator::endTextLink ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1974 of file htmlgen.cpp.

1975{
1976 m_t << "</a>";
1977}

References OutputGenerator::m_t.

◆ endTitle()

void HtmlGenerator::endTitle ( )
inlineprivate

Definition at line 339 of file htmlgen.h.

339{ m_t << "</div>"; }

References OutputGenerator::m_t.

Referenced by endTitleHead().

◆ endTitleHead()

void HtmlGenerator::endTitleHead ( const DString & ,
const DString &  )
overridevirtual

Implements OutputGenIntf.

Definition at line 3544 of file htmlgen.cpp.

3545{
3546 endTitle();
3547 m_t << "</div>\n";
3548}
void endTitle()
Definition htmlgen.h:339

References endTitle(), and OutputGenerator::m_t.

◆ endTocEntry()

void HtmlGenerator::endTocEntry ( const SectionInfo * si)
overridevirtual

Implements OutputGenIntf.

Definition at line 3843 of file htmlgen.cpp.

3844{
3845 SectionType type = si->type();
3846 int nextLevel = type.level();
3847 if (type.isSection() && nextLevel<=m_tocState.maxLevel)
3848 {
3849 m_t << "</a>\n";
3850 m_tocState.inLi[nextLevel]=true;
3851 m_tocState.level = nextLevel;
3852 }
3853}
SectionType type() const
Definition section.h:71
constexpr bool isSection() const
Definition section.h:47

References HtmlGenerator::TocState::inLi, SectionType::isSection(), HtmlGenerator::TocState::level, SectionType::level(), OutputGenerator::m_t, m_tocState, HtmlGenerator::TocState::maxLevel, type(), and SectionInfo::type().

◆ endTypewriter()

void HtmlGenerator::endTypewriter ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 162 of file htmlgen.h.

162{ m_t << "</code>"; }

References OutputGenerator::m_t.

◆ exceptionEntry()

void HtmlGenerator::exceptionEntry ( const DString & prefix,
bool closeBracket )
overridevirtual

Implements OutputGenIntf.

Definition at line 2565 of file htmlgen.cpp.

2566{
2567 DBG_HTML(m_t << "<!-- exceptionEntry -->\n";)
2568 if (!closeBracket)
2569 {
2570 m_t << "</td>\n";
2571 m_t << " </tr>\n";
2572 m_t << " <tr>\n";
2573 m_t << " <td align=\"right\">";
2574 }
2575 // colspan 2 so it gets both parameter type and parameter name columns
2576 if (!prefix.empty())
2577 m_t << prefix << "</td><td>(</td><td colspan=\"2\">";
2578 else if (closeBracket)
2579 m_t << "&#160;)</td><td></td><td></td><td>";
2580 else
2581 m_t << "</td><td></td><td colspan=\"2\">";
2582}
constexpr auto prefix
Definition anchor.cpp:47

References DBG_HTML, OutputGenerator::m_t, and prefix.

◆ fixSpaces()

DString HtmlGenerator::fixSpaces ( const DString & s)
static

Definition at line 3772 of file htmlgen.cpp.

3773{
3774 return substitute(s," ","&#160;");
3775}
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
Definition dstring.cpp:485

References substitute().

Referenced by renderQuickLinksAsTabs(), and renderQuickLinksAsTree().

◆ getNavTreeCss()

DString HtmlGenerator::getNavTreeCss ( )
static

Definition at line 3766 of file htmlgen.cpp.

3767{
3768 ResourceMgr &mgr = ResourceMgr::instance();
3769 return replaceVariables(mgr.getAsString("navtree.css"));
3770}
static ResourceMgr & instance()
Returns the one and only instance of this class.
DString getAsString(const DString &name) const
Gets the resource data as a C string.
static DString replaceVariables(const DString &input)
Definition htmlgen.cpp:778

References ResourceMgr::getAsString(), ResourceMgr::instance(), and replaceVariables().

Referenced by init().

◆ init()

void HtmlGenerator::init ( )
static

Definition at line 1275 of file htmlgen.cpp.

1276{
1277 DString dname = Config_getString(HTML_OUTPUT);
1278 Dir d(dname.str());
1279 if (!d.exists() && !d.mkdir(dname.str()))
1280 {
1281 term("Could not create output directory {}\n",dname);
1282 }
1283 //writeLogo(dname);
1284 if (!Config_getString(HTML_HEADER).empty())
1285 {
1286 g_header_file=Config_getString(HTML_HEADER);
1289 //printf("g_header='%s'\n",qPrint(g_header));
1290 DString result = substituteHtmlKeywords(g_header_file,g_header,DString(),DString());
1291 checkBlocks(result,Config_getString(HTML_HEADER),htmlMarkerInfo);
1292 }
1293 else
1294 {
1295 g_header_file="header.html";
1298 DString result = substituteHtmlKeywords(g_header_file,g_header,DString(),DString());
1299 checkBlocks(result,"<default header.html>",htmlMarkerInfo);
1300 }
1301
1302 if (!Config_getString(HTML_FOOTER).empty())
1303 {
1304 g_footer_file=Config_getString(HTML_FOOTER);
1307 //printf("g_footer='%s'\n",qPrint(g_footer));
1308 DString result = substituteHtmlKeywords(g_footer_file,g_footer,DString(),DString());
1309 checkBlocks(result,Config_getString(HTML_FOOTER),htmlMarkerInfo);
1310 }
1311 else
1312 {
1313 g_footer_file = "footer.html";
1316 DString result = substituteHtmlKeywords(g_footer_file,g_footer,DString(),DString());
1317 checkBlocks(result,"<default footer.html>",htmlMarkerInfo);
1318 }
1319
1320 if (Config_getBool(USE_MATHJAX))
1321 {
1322 if (!Config_getString(MATHJAX_CODEFILE).empty())
1323 {
1324 g_mathjax_code=fileToString(Config_getString(MATHJAX_CODEFILE));
1325 //printf("g_mathjax_code='%s'\n",qPrint(g_mathjax_code));
1326 }
1328 //printf("converted g_latex_macro='%s'\n",qPrint(g_latex_macro));
1329 }
1330 createSubDirs(d);
1331
1333
1334 ResourceMgr &mgr = ResourceMgr::instance();
1335
1336 {
1337 DString tabsCss;
1338 if (Config_getBool(HTML_DYNAMIC_MENUS))
1339 {
1340 tabsCss = mgr.getAsString("tabs.css");
1341 }
1342 else // stylesheet for the 'old' static tabs
1343 {
1344 tabsCss = mgr.getAsString("fixed_tabs.css");
1345 }
1346
1347 std::ofstream f = Portable::openOutputStream(dname+"/tabs.css");
1348 if (f.is_open())
1349 {
1350 TextStream t(&f);
1351 t << replaceVariables(tabsCss);
1352 }
1353 }
1354
1355
1356 if (Config_getBool(INTERACTIVE_SVG))
1357 {
1358 mgr.copyResource("svg.min.js",dname);
1359 }
1360
1361 if (!Config_getBool(DISABLE_INDEX) && Config_getBool(HTML_DYNAMIC_MENUS))
1362 {
1363 mgr.copyResource("menu.js",dname);
1364 }
1365
1366 // copy navtree.css
1367 {
1368 std::ofstream f = Portable::openOutputStream(dname+"/navtree.css");
1369 if (f.is_open())
1370 {
1371 TextStream t(&f);
1372 t << getNavTreeCss();
1373 }
1374 }
1375
1376 if (Config_getBool(HTML_COPY_CLIPBOARD))
1377 {
1378 std::ofstream f = Portable::openOutputStream(dname+"/clipboard.js");
1379 if (f.is_open())
1380 {
1381 TextStream t(&f);
1382 t << substitute(mgr.getAsString("clipboard.js"),"$copy_to_clipboard_text",theTranslator->trCopyToClipboard());
1383 }
1384 }
1385
1386 bool hasCookie = Config_getBool(GENERATE_TREEVIEW) || Config_getBool(SEARCHENGINE) || Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE;
1387 if (hasCookie)
1388 {
1389 mgr.copyResource("cookie.js",dname);
1390 }
1391
1392 if (Config_getBool(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1393 {
1394 std::ofstream f = Portable::openOutputStream(dname+"/darkmode_toggle.js");
1395 if (f.is_open())
1396 {
1397 TextStream t(&f);
1398 t << substitute(replaceColorMarkers(mgr.getAsString("darkmode_toggle.js")),
1399 "$PROJECTID",getProjectId());
1400 }
1401 }
1402
1403 if (Config_getBool(HTML_DYNAMIC_SECTIONS) ||
1404 (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS)))
1405 {
1406 std::ofstream f = Portable::openOutputStream(dname+"/dynsections.js");
1407 if (f.is_open())
1408 {
1409 TextStream t(&f);
1410 if (Config_getBool(HTML_DYNAMIC_SECTIONS))
1411 {
1412 t << replaceVariables(mgr.getAsString("dynsections.js"));
1413 }
1414 if (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS))
1415 {
1416 t << replaceVariables(mgr.getAsString("dynsections_tooltips.js"));
1417 }
1418 }
1419 }
1420 if (Config_getBool(HTML_CODE_FOLDING))
1421 {
1422 std::ofstream f = Portable::openOutputStream(dname+"/codefolding.js");
1423 if (f.is_open())
1424 {
1425 TextStream t(&f);
1426 t << replaceVariables(mgr.getAsString("codefolding.js"));
1427 }
1428 }
1429}
static DString getNavTreeCss()
Definition htmlgen.cpp:3766
bool copyResource(const DString &name, const DString &targetDir) const
Copies a registered resource to a given target directory.
virtual DString trCopyToClipboard()=0
#define Config_getEnum(name)
Definition config.h:35
static bool g_build_date
Definition htmlgen.cpp:63
static bool hasDateReplacement(const DString &str)
Definition htmlgen.cpp:1266
static DString substituteHtmlKeywords(const DString &file, const DString &str, const DString &title, const DString &relPath, const DString &navPath=DString(), bool isSource=false)
Definition htmlgen.cpp:301
static const SelectionMarkerInfo htmlMarkerInfo
Definition htmlgen.cpp:66
static DString g_footer
Definition htmlgen.cpp:60
static DString g_latex_macro
Definition htmlgen.cpp:62
static void fillColorStyleMaps()
Definition htmlgen.cpp:764
static DString g_header_file
Definition htmlgen.cpp:58
static DString getConvertLatexMacro()
Convert a set of LaTeX commands \‍(re)newcommand to a form readable by MathJax LaTeX syntax:
Definition htmlgen.cpp:136
static DString g_mathjax_code
Definition htmlgen.cpp:61
static DString g_header
Definition htmlgen.cpp:57
static DString g_footer_file
Definition htmlgen.cpp:59
#define term(fmt,...)
Definition message.h:137
std::ofstream openOutputStream(const DString &name, bool append=false)
Definition portable.cpp:681
DString replaceColorMarkers(const DString &str)
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC,...
Definition util.cpp:4568
DString getProjectId()
Definition util.cpp:5270
void createSubDirs(const Dir &d)
Definition util.cpp:2969
void checkBlocks(const DString &s, const DString fileName, const SelectionMarkerInfo &markerInfo)
Definition util.cpp:5114
DString fileToString(const DString &name, bool filter, bool isSourceCode)
Definition util.cpp:1053

References checkBlocks(), Config_getBool, Config_getEnum, Config_getString, ResourceMgr::copyResource(), createSubDirs(), Dir::exists(), fileToString(), fillColorStyleMaps(), g_build_date, g_footer, g_footer_file, g_header, g_header_file, g_latex_macro, g_mathjax_code, ResourceMgr::getAsString(), getConvertLatexMacro(), getNavTreeCss(), getProjectId(), hasDateReplacement(), htmlMarkerInfo, ResourceMgr::instance(), Dir::mkdir(), Portable::openOutputStream(), replaceColorMarkers(), replaceVariables(), DString::str(), substitute(), substituteHtmlKeywords(), term, theTranslator, and Translator::trCopyToClipboard().

Referenced by generateOutput().

◆ insertMemberAlign()

void HtmlGenerator::insertMemberAlign ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2279 of file htmlgen.cpp.

2280{
2281 DBG_HTML(m_t << "<!-- insertMemberAlign -->\n")
2282 m_t << "&#160;</td><td class=\"memItemRight\">";
2283}

References DBG_HTML, and OutputGenerator::m_t.

Referenced by endMemberItem().

◆ insertMemberAlignLeft()

void HtmlGenerator::insertMemberAlignLeft ( MemberItemType type,
bool initTag )
overridevirtual

Implements OutputGenIntf.

Definition at line 2285 of file htmlgen.cpp.

2286{
2287 if (!initTag) m_t << "&#160;</td>";
2288 switch (type)
2289 {
2290 case MemberItemType::Normal: m_t << "<td class=\"memItemLeft\">"; break;
2291 case MemberItemType::AnonymousStart: m_t << "<td class=\"memItemLeft anon\">"; break;
2292 case MemberItemType::AnonymousEnd: m_t << "<td class=\"memItemLeft anonEnd\">"; break;
2293 case MemberItemType::Templated: m_t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
2294 }
2295}

References OutputGenerator::AnonymousEnd, OutputGenerator::AnonymousStart, OutputGenerator::m_t, OutputGenerator::Normal, OutputGenerator::Templated, and type().

Referenced by startMemberItem().

◆ lastIndexPage()

void HtmlGenerator::lastIndexPage ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 286 of file htmlgen.h.

286{}

◆ lineBreak()

void HtmlGenerator::lineBreak ( const DString & style)
overridevirtual

Implements OutputGenIntf.

Definition at line 3521 of file htmlgen.cpp.

3522{
3523 if (!style.empty())
3524 {
3525 m_t << "<br class=\"" << style << "\" />\n";
3526 }
3527 else
3528 {
3529 m_t << "<br />\n";
3530 }
3531}

References DString::empty(), and OutputGenerator::m_t.

◆ operator=() [1/2]

HtmlGenerator & HtmlGenerator::operator= ( const HtmlGenerator & og)

Definition at line 1241 of file htmlgen.cpp.

1242{
1243 //printf("%p:HtmlGenerator(copy assign %p)\n",(void*)this,(void*)&og);
1244 if (this!=&og)
1245 {
1246 m_dir = og.m_dir;
1247 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
1248 m_codeGen = m_codeList->get<HtmlCodeGenerator>(OutputType::Html);
1252 m_relPath = og.m_relPath;
1255 }
1256 return *this;
1257}

References Html, HtmlGenerator(), m_codeGen, m_codeList, OutputGenerator::m_dir, m_emptySection, m_lastFile, m_lastTitle, m_relPath, m_sectionCount, OutputGenerator::m_t, and HtmlCodeGenerator::setTextStream().

◆ operator=() [2/2]

HtmlGenerator & HtmlGenerator::operator= ( HtmlGenerator && )
delete

References HtmlGenerator().

◆ startAnonTypeScope()

void HtmlGenerator::startAnonTypeScope ( int )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 182 of file htmlgen.h.

182{}

◆ startBold()

void HtmlGenerator::startBold ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 213 of file htmlgen.h.

213{ m_t << "<b>"; }

References OutputGenerator::m_t.

◆ startCallGraph()

void HtmlGenerator::startCallGraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2665 of file htmlgen.cpp.

2666{
2668}
static void startSectionHeader(TextStream &t, const DString &relPath, int sectionCount)
Definition htmlgen.cpp:2099

References m_relPath, m_sectionCount, OutputGenerator::m_t, and startSectionHeader().

◆ startCenter()

void HtmlGenerator::startCenter ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 231 of file htmlgen.h.

231{ m_t << "<center>\n"; }

References OutputGenerator::m_t.

◆ startClassDiagram()

void HtmlGenerator::startClassDiagram ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2166 of file htmlgen.cpp.

References m_relPath, m_sectionCount, OutputGenerator::m_t, and startSectionHeader().

◆ startCompoundTemplateParams()

void HtmlGenerator::startCompoundTemplateParams ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2269 of file htmlgen.cpp.

2270{
2271 m_t << "<div class=\"compoundTemplParams\">";
2272}

References OutputGenerator::m_t.

◆ startConstraintDocs()

void HtmlGenerator::startConstraintDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3503 of file htmlgen.cpp.

3504{
3505 m_t << "<td>&#160;";
3506}

References OutputGenerator::m_t.

◆ startConstraintList()

void HtmlGenerator::startConstraintList ( const DString & header)
overridevirtual

Implements OutputGenIntf.

Definition at line 3476 of file htmlgen.cpp.

3477{
3478 m_t << "<div class=\"typeconstraint\">\n";
3479 m_t << "<dl><dt><b>" << header << "</b></dt><dd>\n";
3480 m_t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n";
3481}

References OutputGenerator::m_t.

◆ startConstraintParam()

void HtmlGenerator::startConstraintParam ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3483 of file htmlgen.cpp.

3484{
3485 m_t << "<tr><td valign=\"top\"><em>";
3486}

References OutputGenerator::m_t.

◆ startConstraintType()

void HtmlGenerator::startConstraintType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3493 of file htmlgen.cpp.

3494{
3495 m_t << "<td>&#160;:</td><td valign=\"top\"><em>";
3496}

References OutputGenerator::m_t.

◆ startContents()

void HtmlGenerator::startContents ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3246 of file htmlgen.cpp.

3247{
3248 m_t << "<div class=\"contents\">\n";
3249}

References OutputGenerator::m_t.

◆ startDescForItem()

void HtmlGenerator::startDescForItem ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 215 of file htmlgen.h.

215{ m_t << "<dd>"; }

References OutputGenerator::m_t.

◆ startDescTable()

void HtmlGenerator::startDescTable ( const DString & title,
const bool hasInits )
overridevirtual

Implements OutputGenIntf.

Definition at line 2759 of file htmlgen.cpp.

2760{
2761 m_t << "<table class=\"fieldtable\">\n"
2762 << "<tr><th colspan=\"" << (hasInits?3:2) << "\">" << title << "</th></tr>";
2763}

References OutputGenerator::m_t.

◆ startDescTableData()

void HtmlGenerator::startDescTableData ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2799 of file htmlgen.cpp.

2800{
2801 m_t << "<td class=\"fielddoc\">";
2802}

References OutputGenerator::m_t.

◆ startDescTableInit()

void HtmlGenerator::startDescTableInit ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2789 of file htmlgen.cpp.

2790{
2791 m_t << "<td class=\"fieldinit\">";
2792}

References OutputGenerator::m_t.

◆ startDescTableRow()

void HtmlGenerator::startDescTableRow ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2769 of file htmlgen.cpp.

2770{
2771 m_t << "<tr>";
2772}

References OutputGenerator::m_t.

◆ startDescTableTitle()

void HtmlGenerator::startDescTableTitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2779 of file htmlgen.cpp.

2780{
2781 m_t << "<td class=\"fieldname\">";
2782}

References OutputGenerator::m_t.

◆ startDirDepGraph()

void HtmlGenerator::startDirDepGraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2683 of file htmlgen.cpp.

References m_relPath, m_sectionCount, OutputGenerator::m_t, and startSectionHeader().

◆ startDotGraph()

void HtmlGenerator::startDotGraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2595 of file htmlgen.cpp.

References m_relPath, m_sectionCount, OutputGenerator::m_t, and startSectionHeader().

◆ startDoxyAnchor()

void HtmlGenerator::startDoxyAnchor ( const DString & fName,
const DString & manName,
const DString & anchor,
const DString & name,
const DString & args )
overridevirtual

Implements OutputGenIntf.

Definition at line 1840 of file htmlgen.cpp.

1843{
1844 m_t << "<a id=\"" << anchor << "\" name=\"" << anchor << "\"></a>";
1845}

References OutputGenerator::m_t.

◆ startEmbeddedDoc()

void HtmlGenerator::startEmbeddedDoc ( size_t indent)
overridevirtual

Implements OutputGenIntf.

Definition at line 3621 of file htmlgen.cpp.

3622{
3623 DBG_HTML(m_t << "<!-- startEmbeddedDoc -->\n";)
3624 m_t << "<div class=\"embeddoc indent-" << indent << "\">";
3625}

References DBG_HTML, and OutputGenerator::m_t.

◆ startEmphasis()

void HtmlGenerator::startEmphasis ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 211 of file htmlgen.h.

211{ m_t << "<em>"; }

References OutputGenerator::m_t.

◆ startExamples()

void HtmlGenerator::startExamples ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2809 of file htmlgen.cpp.

2810{
2811 m_t << "<dl class=\"section examples\"><dt>";
2813 m_t << "</dt>";
2814}
void docify(const DString &text) override
Definition htmlgen.cpp:2047
virtual DString trExamples()=0

References docify(), OutputGenerator::m_t, theTranslator, and Translator::trExamples().

◆ startFile()

void HtmlGenerator::startFile ( const DString & name,
bool isSource,
const DString & manName,
const DString & title,
int id,
int hierarchyLevel )
overridevirtual

Implements OutputGenIntf.

Definition at line 1637 of file htmlgen.cpp.

1639{
1640 //printf("HtmlGenerator::startFile(%s)\n",qPrint(name));
1642 DString fileName = name;
1644 m_lastTitle=title;
1645
1649 {
1650 std::lock_guard<std::mutex> lock(g_indexLock);
1652 }
1653
1656
1657 m_t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
1658 << getDoxygenVersion() << " -->\n";
1659 bool searchEngine = Config_getBool(SEARCHENGINE);
1660 if (searchEngine /*&& !generateTreeView*/)
1661 {
1662 m_t << "<script type=\"text/javascript\">\n";
1663 m_t << "let searchBox = new SearchBox(\"searchBox\", \""
1664 << m_relPath<< "search/\",'" << Doxygen::htmlFileExtension << "');\n";
1665 m_t << "</script>\n";
1666 }
1667 if (Config_getBool(HTML_CODE_FOLDING))
1668 {
1669 m_t << "<script type=\"text/javascript\">\n";
1670 m_t << "document.addEventListener('DOMContentLoaded', codefold.init);\n";
1671 m_t << "</script>\n";
1672 }
1674}
static IndexList * indexList
Definition doxygen.h:125
void setFileName(const DString fileName)
Definition htmlgen.h:29
void setRelativePath(const DString &path)
Definition htmlgen.cpp:837
void startPlainFile(const DString &name) override
Definition htmlgen.h:331
void addIndexFile(const DString &name)
Definition indexlist.h:121
virtual DString trGeneratedBy()=0
static std::mutex g_indexLock
Definition htmlgen.cpp:1635
DString filterTitle(const DString &title)
Definition util.cpp:4454
DString convertToHtml(const DString &s, bool keepEntities)
Definition util.cpp:3291
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3931
DString relativePathToRoot(const DString &name)
Definition util.cpp:2912

References addHtmlExtensionIfMissing(), IndexList::addIndexFile(), Config_getBool, convertToHtml(), OutputGenerator::fileName(), filterTitle(), g_header, g_header_file, g_indexLock, Doxygen::htmlFileExtension, Doxygen::indexList, m_codeGen, m_lastFile, m_lastTitle, m_relPath, m_sectionCount, OutputGenerator::m_t, relativePathToRoot(), HtmlCodeGenerator::setFileName(), HtmlCodeGenerator::setRelativePath(), startPlainFile(), substituteHtmlKeywords(), theTranslator, and Translator::trGeneratedBy().

◆ startGroupCollaboration()

void HtmlGenerator::startGroupCollaboration ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2647 of file htmlgen.cpp.

References m_relPath, m_sectionCount, OutputGenerator::m_t, and startSectionHeader().

◆ startGroupHeader()

void HtmlGenerator::startGroupHeader ( const DString & id,
int extraIndentLevel )
overridevirtual

Implements OutputGenIntf.

Definition at line 1979 of file htmlgen.cpp.

1980{
1981 if (extraIndentLevel==2)
1982 {
1983 m_t << "<h4";
1984 }
1985 else if (extraIndentLevel==1)
1986 {
1987 m_t << "<h3";
1988 }
1989 else // extraIndentLevel==0
1990 {
1991 m_t << "<h2";
1992 }
1993 if (!id.empty())
1994 {
1995 m_t <<" id=\"header-"+convertToId(id)+"\"";
1996 }
1997 m_t << " class=\"groupheader\">";
1998}

References convertToId(), and OutputGenerator::m_t.

◆ startHeaderSection()

void HtmlGenerator::startHeaderSection ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3533 of file htmlgen.cpp.

3534{
3535 m_t << "<div class=\"header\">\n";
3536}

References OutputGenerator::m_t.

◆ startInclDepGraph()

void HtmlGenerator::startInclDepGraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2629 of file htmlgen.cpp.

References m_relPath, m_sectionCount, OutputGenerator::m_t, and startSectionHeader().

◆ startIndent()

void HtmlGenerator::startIndent ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2734 of file htmlgen.cpp.

2735{
2736 DBG_HTML(m_t << "<!-- startIndent -->\n";)
2737
2738 m_t << "<div class=\"memdoc\">\n";
2739}

References DBG_HTML, and OutputGenerator::m_t.

◆ startIndexItem()

void HtmlGenerator::startIndexItem ( const DString & ref,
const DString & file )
overridevirtual

Implements OutputGenIntf.

Definition at line 1883 of file htmlgen.cpp.

1884{
1885 //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
1886 if (!ref.empty() || !f.empty())
1887 {
1888 if (!ref.empty())
1889 {
1890 m_t << "<a class=\"elRef\" ";
1892 }
1893 else
1894 {
1895 m_t << "<a class=\"el\" ";
1896 }
1897 m_t << "href=\"";
1898 m_t << externalRef(m_relPath,ref);
1899 if (!f.empty())
1900 {
1901 DString fn=f;
1903 m_t << fn;
1904 }
1905 m_t << "\">";
1906 }
1907 else
1908 {
1909 m_t << "<b>";
1910 }
1911}
DString externalLinkTarget(const bool parent)
Definition util.cpp:4491
DString externalRef(const DString &relPath, const DString &ref)
Definition util.cpp:4538

References addHtmlExtensionIfMissing(), DString::empty(), externalLinkTarget(), externalRef(), m_relPath, and OutputGenerator::m_t.

◆ startIndexKey()

void HtmlGenerator::startIndexKey ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2399 of file htmlgen.cpp.

2400{
2401 //m_t << " <tr><td class=\"indexkey\">";
2402}

◆ startIndexList()

void HtmlGenerator::startIndexList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2389 of file htmlgen.cpp.

2390{
2391 m_t << "<table>\n";
2392}

References OutputGenerator::m_t.

◆ startIndexListItem()

void HtmlGenerator::startIndexListItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1873 of file htmlgen.cpp.

1874{
1875 m_t << "<li>";
1876}

References OutputGenerator::m_t.

◆ startIndexSection()

void HtmlGenerator::startIndexSection ( IndexSection )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 130 of file htmlgen.h.

130{}

◆ startIndexValue()

void HtmlGenerator::startIndexValue ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2409 of file htmlgen.cpp.

2410{
2411 //m_t << "<td class=\"indexvalue\">";
2412}

◆ startInlineHeader()

void HtmlGenerator::startInlineHeader ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3555 of file htmlgen.cpp.

3556{
3557 if (m_emptySection)
3558 {
3559 m_t << "<table class=\"memberdecls memberdecls-inline\">\n";
3560 m_emptySection=false;
3561 }
3562 m_t << "<tr><th colspan=\"2\"><h3>";
3563}

References m_emptySection, and OutputGenerator::m_t.

◆ startInlineMemberDoc()

void HtmlGenerator::startInlineMemberDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3609 of file htmlgen.cpp.

3610{
3611 DBG_HTML(m_t << "<!-- startInlineMemberDoc -->\n";)
3612 m_t << "<td class=\"fielddoc\">\n";
3613}

References DBG_HTML, and OutputGenerator::m_t.

◆ startInlineMemberName()

void HtmlGenerator::startInlineMemberName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3597 of file htmlgen.cpp.

3598{
3599 DBG_HTML(m_t << "<!-- startInlineMemberName -->\n";)
3600 m_t << "<td class=\"fieldname\">\n";
3601}

References DBG_HTML, and OutputGenerator::m_t.

◆ startInlineMemberType()

void HtmlGenerator::startInlineMemberType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3585 of file htmlgen.cpp.

3586{
3587 DBG_HTML(m_t << "<!-- startInlineMemberType -->\n";)
3588 m_t << "<tr><td class=\"fieldtype\">\n";
3589}

References DBG_HTML, and OutputGenerator::m_t.

◆ startItemList()

void HtmlGenerator::startItemList ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 150 of file htmlgen.h.

150{ m_t << "<ul>\n"; }

References OutputGenerator::m_t.

◆ startItemListItem()

void HtmlGenerator::startItemListItem ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 165 of file htmlgen.h.

165{ m_t << "<li>"; }

References OutputGenerator::m_t.

◆ startLabels()

void HtmlGenerator::startLabels ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3633 of file htmlgen.cpp.

3634{
3635 DBG_HTML(m_t << "<!-- startLabels -->\n";)
3636 m_t << "<span class=\"mlabels\">";
3637}

References DBG_HTML, and OutputGenerator::m_t.

◆ startLocalToc()

void HtmlGenerator::startLocalToc ( int level)
overridevirtual

Implements OutputGenIntf.

Definition at line 3777 of file htmlgen.cpp.

3778{
3779 m_tocState.level=0;
3781 m_tocState.maxLevel=level;
3782 m_tocState.inLi = BoolVector(level+1,false);
3783 m_t << "<div class=\"toc\">";
3784 m_t << "<h3>" << theTranslator->trRTFTableOfContents() << "</h3>\n";
3785}
virtual DString trRTFTableOfContents()=0
std::vector< bool > BoolVector
Definition containers.h:36

References HtmlGenerator::TocState::indent, HtmlGenerator::TocState::inLi, HtmlGenerator::TocState::level, OutputGenerator::m_t, m_tocState, HtmlGenerator::TocState::maxLevel, theTranslator, and Translator::trRTFTableOfContents().

◆ startMemberDeclaration()

void HtmlGenerator::startMemberDeclaration ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 202 of file htmlgen.h.

202{}

◆ startMemberDescription()

void HtmlGenerator::startMemberDescription ( const DString & anchor,
const DString & inheritId,
bool typ )
overridevirtual

Implements OutputGenIntf.

Definition at line 2297 of file htmlgen.cpp.

2298{
2299 DBG_HTML(m_t << "<!-- startMemberDescription -->\n")
2300 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2301 if (m_emptySection)
2302 {
2303 m_t << "<table class=\"memberdecls\">\n";
2304 m_emptySection=false;
2305 }
2306 m_t << "<tr class=\"memdesc:" << anchor;
2307 if (!inheritId.empty())
2308 {
2309 if (dynamicSections) m_t << " inherit";
2310 m_t << " " << inheritId;
2311 }
2312 m_t << "\">";
2313 m_t << "<td class=\"mdescLeft\">&#160;</td>";
2314 if (typ) m_t << "<td class=\"mdescLeft\">&#160;</td>";
2315 m_t << "<td class=\"mdescRight\">";
2316}

References Config_getBool, DBG_HTML, DString::empty(), m_emptySection, and OutputGenerator::m_t.

◆ startMemberDoc()

void HtmlGenerator::startMemberDoc ( const DString & clName,
const DString & memName,
const DString & anchor,
const DString & title,
int memCount,
int memTotal,
bool showInline )
overridevirtual

Implements OutputGenIntf.

Definition at line 2429 of file htmlgen.cpp.

2432{
2433 DBG_HTML(m_t << "<!-- startMemberDoc -->\n";)
2434 m_t << "\n<h2 class=\"memtitle\">"
2435 << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&#160;</a></span>";
2436 docify(title);
2437 if (memTotal>1)
2438 {
2439 m_t << " <span class=\"overload\">[" << memCount << "/" << memTotal <<"]</span>";
2440 }
2441 m_t << "</h2>\n";
2442 m_t << "\n<div class=\"memitem\">\n";
2443 m_t << "<div class=\"memproto\">\n";
2444}

References DBG_HTML, docify(), and OutputGenerator::m_t.

◆ startMemberDocList()

void HtmlGenerator::startMemberDocList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2419 of file htmlgen.cpp.

2420{
2421 DBG_HTML(m_t << "<!-- startMemberDocList -->\n";)
2422}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberDocName()

void HtmlGenerator::startMemberDocName ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2458 of file htmlgen.cpp.

2459{
2460 DBG_HTML(m_t << "<!-- startMemberDocName -->\n";)
2461
2462 m_t << " <table class=\"memname\">\n";
2463
2464 m_t << " <tr>\n";
2465 m_t << " <td class=\"memname\">";
2466}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberDocPrefixItem()

void HtmlGenerator::startMemberDocPrefixItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2446 of file htmlgen.cpp.

2447{
2448 DBG_HTML(m_t << "<!-- startMemberDocPrefixItem -->\n";)
2449 m_t << "<div class=\"memtemplate\">\n";
2450}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberDocSimple()

void HtmlGenerator::startMemberDocSimple ( bool isEnum)
overridevirtual

Implements OutputGenIntf.

Definition at line 3570 of file htmlgen.cpp.

3571{
3572 DBG_HTML(m_t << "<!-- startMemberDocSimple -->\n";)
3573 m_t << "<table class=\"fieldtable\">\n";
3574 m_t << "<tr><th colspan=\"" << (isEnum?"2":"3") << "\">";
3575 m_t << (isEnum? theTranslator->trEnumerationValues() :
3576 theTranslator->trCompoundMembers()) << "</th></tr>\n";
3577}
virtual DString trCompoundMembers()=0
virtual DString trEnumerationValues()=0

References DBG_HTML, OutputGenerator::m_t, theTranslator, Translator::trCompoundMembers(), and Translator::trEnumerationValues().

◆ startMemberGroup()

void HtmlGenerator::startMemberGroup ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2726 of file htmlgen.cpp.

2727{
2728}

◆ startMemberGroupDocs()

void HtmlGenerator::startMemberGroupDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2716 of file htmlgen.cpp.

2717{
2718 m_t << "<tr><td colspan=\"2\" class=\"ititle\"><div class=\"groupText\">";
2719}

References OutputGenerator::m_t.

◆ startMemberGroupHeader()

void HtmlGenerator::startMemberGroupHeader ( const DString & id,
bool  )
overridevirtual

Implements OutputGenIntf.

Definition at line 2706 of file htmlgen.cpp.

2707{
2708 m_t << "<tr id=\"" << id << "\" class=\"groupHeader\"><td colspan=\"2\"><div class=\"groupHeader\">";
2709}

References OutputGenerator::m_t.

◆ startMemberHeader()

void HtmlGenerator::startMemberHeader ( const DString & anchor,
int typ )
overridevirtual

Implements OutputGenIntf.

Definition at line 2341 of file htmlgen.cpp.

2342{
2343 DBG_HTML(m_t << "<!-- startMemberHeader -->\n")
2344 if (!m_emptySection)
2345 {
2346 m_t << "</table>";
2347 m_emptySection=true;
2348 }
2349 if (m_emptySection)
2350 {
2351 m_t << "<table class=\"memberdecls\">\n";
2352 m_emptySection=false;
2353 }
2354 m_t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2";
2355 if (!anchor.empty())
2356 {
2357 m_t << " id=\"header-" << anchor << "\"";
2358 }
2359 m_t << " class=\"groupheader\">";
2360 if (!anchor.empty())
2361 {
2362 m_t << "<a id=\"" << anchor << "\" name=\"" << anchor << "\"></a>\n";
2363 }
2364}

References DBG_HTML, DString::empty(), m_emptySection, and OutputGenerator::m_t.

◆ startMemberItem()

void HtmlGenerator::startMemberItem ( const DString & anchor,
MemberItemType type,
const DString & inheritId )
overridevirtual

Implements OutputGenIntf.

Definition at line 2219 of file htmlgen.cpp.

2220{
2221 DBG_HTML(m_t << "<!-- startMemberItem() -->\n")
2222 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2223 if (m_emptySection)
2224 {
2225 m_t << "<table class=\"memberdecls\">\n";
2226 m_emptySection=false;
2227 }
2228 m_t << "<tr class=\"memitem:" << convertToId(anchor);
2229 if (!inheritId.empty())
2230 {
2231 if (dynamicSections) m_t << " inherit";
2232 m_t << " " << inheritId;
2233 }
2234 m_t << "\"";
2235 if (!anchor.empty())
2236 {
2237 m_t << " id=\"r_" << convertToId(anchor) << "\"";
2238 }
2239 m_t << ">";
2241}
void insertMemberAlignLeft(MemberItemType, bool) override
Definition htmlgen.cpp:2285

References Config_getBool, convertToId(), DBG_HTML, DString::empty(), insertMemberAlignLeft(), m_emptySection, OutputGenerator::m_t, and type().

◆ startMemberList()

void HtmlGenerator::startMemberList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2205 of file htmlgen.cpp.

2206{
2207 DBG_HTML(m_t << "<!-- startMemberList -->\n")
2208}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberSections()

void HtmlGenerator::startMemberSections ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2324 of file htmlgen.cpp.

2325{
2326 DBG_HTML(m_t << "<!-- startMemberSections -->\n")
2327 m_emptySection=true; // we postpone writing <table> until we actually
2328 // write a row to prevent empty tables, which
2329 // are not valid XHTML!
2330}

References DBG_HTML, m_emptySection, and OutputGenerator::m_t.

◆ startMemberSubtitle()

void HtmlGenerator::startMemberSubtitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2372 of file htmlgen.cpp.

2373{
2374 DBG_HTML(m_t << "<!-- startMemberSubtitle -->\n")
2375 if (m_emptySection)
2376 {
2377 m_t << "<table class=\"memberdecls\">\n";
2378 m_emptySection=false;
2379 }
2380 m_t << "<tr><td class=\"ititle\" colspan=\"2\">";
2381}

References DBG_HTML, m_emptySection, and OutputGenerator::m_t.

◆ startMemberTemplateParams()

void HtmlGenerator::startMemberTemplateParams ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2252 of file htmlgen.cpp.

2253{
2254}

◆ startPageDoc()

void HtmlGenerator::startPageDoc ( const DString & pageTitle)
overridevirtual

Implements OutputGenIntf.

Definition at line 3256 of file htmlgen.cpp.

3257{
3258 m_t << "<div>";
3259}

References OutputGenerator::m_t.

◆ startPageRef()

void HtmlGenerator::startPageRef ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 245 of file htmlgen.h.

245{}

◆ startParagraph()

void HtmlGenerator::startParagraph ( const DString & classDef)
overridevirtual

Implements OutputGenIntf.

Definition at line 1855 of file htmlgen.cpp.

1856{
1857 if (!classDef.empty())
1858 m_t << "\n<p class=\"" << classDef << "\">";
1859 else
1860 m_t << "\n<p>";
1861}

References DString::empty(), and OutputGenerator::m_t.

◆ startParameterDefVal()

void HtmlGenerator::startParameterDefVal ( const char * sep)
overridevirtual

Implements OutputGenIntf.

Definition at line 2546 of file htmlgen.cpp.

2547{
2548 m_t << "<span class=\"paramdefsep\">";
2549 docify(s);
2550 m_t << "</span><span class=\"paramdefval\">";
2551}

References docify(), and OutputGenerator::m_t.

◆ startParameterExtra()

void HtmlGenerator::startParameterExtra ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2517 of file htmlgen.cpp.

2518{
2519 DBG_HTML(m_t << "<!-- startParameterExtra -->\n";)
2520}

References DBG_HTML, and OutputGenerator::m_t.

◆ startParameterList()

void HtmlGenerator::startParameterList ( bool openBracket)
overridevirtual

Implements OutputGenIntf.

Definition at line 2474 of file htmlgen.cpp.

2475{
2476 DBG_HTML(m_t << "<!-- startParameterList -->\n";)
2477 m_t << " <td>";
2478 if (openBracket) m_t << "(";
2479 m_t << "</td>\n";
2480}

References DBG_HTML, and OutputGenerator::m_t.

◆ startParameterName()

void HtmlGenerator::startParameterName ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2505 of file htmlgen.cpp.

2506{
2507 DBG_HTML(m_t << "<!-- startParameterName -->\n";)
2508 m_t << " <td class=\"paramname\"><span class=\"paramname\"><em>";
2509}

References DBG_HTML, and OutputGenerator::m_t.

◆ startParameterType()

void HtmlGenerator::startParameterType ( bool first,
const DString & key )
overridevirtual

Implements OutputGenIntf.

Definition at line 2482 of file htmlgen.cpp.

2483{
2484 if (first)
2485 {
2486 DBG_HTML(m_t << "<!-- startFirstParameterType -->\n";)
2487 m_t << " <td class=\"paramtype\">";
2488 }
2489 else
2490 {
2491 DBG_HTML(m_t << "<!-- startParameterType -->\n";)
2492 m_t << " <tr>\n";
2493 m_t << " <td class=\"paramkey\">" << key << "</td>\n";
2494 m_t << " <td></td>\n";
2495 m_t << " <td class=\"paramtype\">";
2496 }
2497}

References DBG_HTML, and OutputGenerator::m_t.

◆ startPlainFile()

void HtmlGenerator::startPlainFile ( const DString & name)
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 331 of file htmlgen.h.

void startPlainFile(const DString &name)
Definition outputgen.cpp:28

References OutputGenerator::startPlainFile().

Referenced by startFile(), and writeStyleInfo().

◆ startProjectNumber()

void HtmlGenerator::startProjectNumber ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1752 of file htmlgen.cpp.

1753{
1754 m_t << "<h3 class=\"version\">";
1755}

References OutputGenerator::m_t.

◆ startQuickIndices()

void HtmlGenerator::startQuickIndices ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 247 of file htmlgen.h.

247{}

◆ startSection()

void HtmlGenerator::startSection ( const DString & lab,
const DString & ,
SectionType type )
overridevirtual

Implements OutputGenIntf.

Definition at line 2016 of file htmlgen.cpp.

2017{
2018 switch(type.level())
2019 {
2020 case SectionType::Page: m_t << "\n\n<h1 class=\"doxsection\">"; break;
2021 case SectionType::Section: m_t << "\n\n<h2 class=\"doxsection\">"; break;
2022 case SectionType::Subsection: m_t << "\n\n<h3 class=\"doxsection\">"; break;
2023 case SectionType::Subsubsection: m_t << "\n\n<h4 class=\"doxsection\">"; break;
2024 case SectionType::Paragraph: m_t << "\n\n<h5 class=\"doxsection\">"; break;
2025 case SectionType::Subparagraph: m_t << "\n\n<h6 class=\"doxsection\">"; break;
2026 case SectionType::Subsubparagraph: m_t << "\n\n<h6 class=\"doxsection\">"; break;
2027 default: ASSERT(0); break;
2028 }
2029 m_t << "<a id=\"" << lab << "\" name=\"" << lab << "\"></a>";
2030}

References ASSERT, SectionType::level(), OutputGenerator::m_t, SectionType::Page, SectionType::Paragraph, SectionType::Section, SectionType::Subparagraph, SectionType::Subsection, SectionType::Subsubparagraph, SectionType::Subsubsection, and type().

◆ startSmall()

void HtmlGenerator::startSmall ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 233 of file htmlgen.h.

233{ m_t << "<small>\n"; }

References OutputGenerator::m_t.

◆ startTextBlock()

void HtmlGenerator::startTextBlock ( bool )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 284 of file htmlgen.h.

284{ m_t << "<div class=\"textblock\">"; }

References OutputGenerator::m_t.

◆ startTextLink()

void HtmlGenerator::startTextLink ( const DString & file,
const DString & anchor )
overridevirtual

Implements OutputGenIntf.

Definition at line 1962 of file htmlgen.cpp.

1963{
1964 m_t << "<a href=\"";
1965 DString fn = f;
1968 fileName() == Config_getString(HTML_OUTPUT)+"/"+fn,
1969 fn,
1970 anchor);
1971 m_t << "\">";
1972}
DString createHtmlUrl(const DString &relPath, const DString &ref, bool isLocalFile, const DString &targetFileName, const DString &anchor)
Definition util.cpp:4502

References addHtmlExtensionIfMissing(), Config_getString, createHtmlUrl(), OutputGenerator::fileName(), m_relPath, and OutputGenerator::m_t.

◆ startTitle()

void HtmlGenerator::startTitle ( )
inlineprivate

Definition at line 338 of file htmlgen.h.

338{ m_t << "<div class=\"title\">"; }

References OutputGenerator::m_t.

Referenced by startTitleHead().

◆ startTitleHead()

void HtmlGenerator::startTitleHead ( const DString & )
overridevirtual

Implements OutputGenIntf.

Definition at line 3538 of file htmlgen.cpp.

3539{
3540 m_t << " <div class=\"headertitle\">";
3541 startTitle();
3542}
void startTitle()
Definition htmlgen.h:338

References OutputGenerator::m_t, and startTitle().

◆ startTocEntry()

void HtmlGenerator::startTocEntry ( const SectionInfo * si)
overridevirtual

Implements OutputGenIntf.

Definition at line 3799 of file htmlgen.cpp.

3800{
3801 SectionType type = si->type();
3802 if (type.isSection())
3803 {
3804 //printf(" level=%d title=%s maxLevel=%d\n",level,qPrint(si->title()),maxLevel);
3805 int nextLevel = type.level();
3806 if (nextLevel>m_tocState.level)
3807 {
3808 for (int l=m_tocState.level;l<nextLevel;l++)
3809 {
3810 if (l < m_tocState.maxLevel)
3811 {
3812 m_tocState.incIndent(m_t,"<ul>");
3813 char cs[2] = { static_cast<char>('0'+l+1), 0 };
3814 const char *empty = (l!=nextLevel-1) ? " empty" : "";
3815 m_tocState.incIndent(m_t,"<li class=\"level" + DString(cs) + empty + "\">");
3816 }
3817 }
3818 }
3819 else if (nextLevel<m_tocState.level)
3820 {
3821 for (int l=m_tocState.level;l>nextLevel;l--)
3822 {
3823 if (l <= m_tocState.maxLevel) m_tocState.decIndent(m_t,"</li>");
3824 m_tocState.inLi[l] = false;
3825 if (l <= m_tocState.maxLevel) m_tocState.decIndent(m_t,"</ul>");
3826 }
3827 }
3828 if (nextLevel <= m_tocState.maxLevel)
3829 {
3830 if (m_tocState.inLi[nextLevel] || m_tocState.level>nextLevel)
3831 {
3832 m_tocState.decIndent(m_t,"</li>");
3833 char cs[2] = { static_cast<char>('0'+nextLevel), 0 };
3834 m_tocState.incIndent(m_t,"<li class=\"level" + DString(cs) + "\">");
3835 }
3836 DString label = si->label();
3838 m_t << "<a href=\"#"+label+"\">";
3839 }
3840 }
3841}
DString label() const
Definition section.h:69
void writeIndent(TextStream &t)
Definition htmlgen.h:358
void incIndent(TextStream &t, const DString &text)
Definition htmlgen.h:359

References HtmlGenerator::TocState::decIndent(), HtmlGenerator::TocState::incIndent(), HtmlGenerator::TocState::inLi, SectionType::isSection(), SectionInfo::label(), HtmlGenerator::TocState::level, SectionType::level(), OutputGenerator::m_t, m_tocState, HtmlGenerator::TocState::maxLevel, type(), SectionInfo::type(), and HtmlGenerator::TocState::writeIndent().

◆ startTypewriter()

void HtmlGenerator::startTypewriter ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 161 of file htmlgen.h.

161{ m_t << "<code>"; }

References OutputGenerator::m_t.

◆ type()

OutputType HtmlGenerator::type ( ) const
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 119 of file htmlgen.h.

119{ return OutputType::Html; }

References Html.

Referenced by endMemberItem(), endSection(), endTocEntry(), insertMemberAlignLeft(), startMemberItem(), startSection(), and startTocEntry().

◆ writeAnchor()

void HtmlGenerator::writeAnchor ( const DString & ,
const DString & name )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 209 of file htmlgen.h.

210 { m_t << "<a name=\"" << name <<"\" id=\"" << name << "\"></a>"; }

References OutputGenerator::m_t.

◆ writeChar()

void HtmlGenerator::writeChar ( char c)
overridevirtual

Implements OutputGenIntf.

Definition at line 2089 of file htmlgen.cpp.

2090{
2091 char cs[2];
2092 cs[0]=c;
2093 cs[1]=0;
2094 docify(cs);
2095}

References docify().

◆ writeDoc()

void HtmlGenerator::writeDoc ( const IDocNodeAST * node,
const Definition * ctx,
const MemberDef * ,
int id,
int sectionLevel )
overridevirtual

Implements OutputGenIntf.

Definition at line 2821 of file htmlgen.cpp.

2822{
2823 const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST*>(ast);
2824 if (astImpl && sectionLevel<=m_tocState.maxLevel)
2825 {
2826 m_codeList->setId(id);
2827 HtmlDocVisitor visitor(m_t,*m_codeList,ctx,fileName());
2828 std::visit(visitor,astImpl->root);
2829 }
2830}
DocNodeVariant root
Definition docnode.h:1496

References OutputGenerator::fileName(), m_codeList, OutputGenerator::m_t, m_tocState, HtmlGenerator::TocState::maxLevel, and DocNodeAST::root.

◆ writeExternalSearchPage()

void HtmlGenerator::writeExternalSearchPage ( )
static

Definition at line 3371 of file htmlgen.cpp.

3372{
3373 bool disableIndex = Config_getBool(DISABLE_INDEX);
3374 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3375 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3376 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3377 DString dname = Config_getString(HTML_OUTPUT);
3378 DString fileName = dname+"/search"+Doxygen::htmlFileExtension;
3379 std::ofstream f = Portable::openOutputStream(fileName);
3380 if (f.is_open())
3381 {
3382 TextStream t(&f);
3384
3385 t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
3386 << getDoxygenVersion() << " -->\n";
3387 t << "<script type=\"text/javascript\">\n";
3388 t << "let searchBox = new SearchBox(\"searchBox\", \""
3389 << "search/\",'" << Doxygen::htmlFileExtension << "');\n";
3390 t << "</script>\n";
3391
3392 if (!disableIndex && !quickLinksAfterSplitbar)
3393 {
3394 writeDefaultQuickLinks(t,HighlightedItem::Search,DString(),DString(),false);
3395 }
3396 if (generateTreeView)
3397 {
3398 t << "</div><!-- top -->\n";
3399 }
3400 t << writeSplitBarAsString("search.php",DString(),DString());
3401 if (quickLinksAfterSplitbar)
3402 {
3403 writeDefaultQuickLinks(t,HighlightedItem::Search,DString(),DString(),false);
3404 }
3405
3406 t << "<div class=\"header\">\n";
3407 t << " <div class=\"headertitle\">\n";
3408 t << " <div class=\"title\">" << theTranslator->trSearchResultsTitle() << "</div>\n";
3409 t << " </div>\n";
3410 t << "</div>\n";
3411 t << "<div class=\"contents\">\n";
3412
3413 t << "<div id=\"searchresults\"></div>\n";
3414 t << "</div>\n";
3415
3416 if (generateTreeView)
3417 {
3418 t << "</div><!-- doc-content -->\n";
3419 t << "</div><!-- container -->\n";
3420 }
3421
3422 writePageFooter(t,"Search","","");
3423
3424 }
3425 f.close();
3426
3427 DString scriptName = dname+"/search/search.js";
3428 f = Portable::openOutputStream(scriptName);
3429 if (f.is_open())
3430 {
3431 TextStream t(&f);
3432 t << "const searchResultsText=["
3433 << "\"" << theTranslator->trSearchResults(0) << "\","
3434 << "\"" << theTranslator->trSearchResults(1) << "\","
3435 << "\"" << theTranslator->trSearchResults(2) << "\"];\n";
3436 t << "const serverUrl=\"" << Config_getString(SEARCHENGINE_URL) << "\";\n";
3437 t << "const tagMap = {\n";
3438 bool first=true;
3439 // add search mappings
3440 StringVector extraSearchMappings = Config_getList(EXTRA_SEARCH_MAPPINGS);
3441 for (const auto &ml : extraSearchMappings)
3442 {
3443 DString mapLine(ml);
3444 if (size_t eqPos = mapLine.find('='); eqPos!=DString::npos) // tag command contains a destination
3445 {
3446 DString tagName = mapLine.left(eqPos).stripWhiteSpace();
3447 DString destName = mapLine.mid(eqPos+1).stripWhiteSpace();
3448 if (!tagName.empty())
3449 {
3450 if (!first) t << ",\n";
3451 t << " \"" << tagName << "\": \"" << destName << "\"";
3452 first=false;
3453 }
3454 }
3455 }
3456 if (!first) t << "\n";
3457 t << "};\n\n";
3458 t << ResourceMgr::instance().getAsString("extsearch.js");
3459 t << "\n";
3460 t << "document.addEventListener('DOMContentLoaded',() => {\n";
3461 t << " const query = trim(getURLParameter('query'));\n";
3462 t << " if (query) {\n";
3463 t << " searchFor(query,0,20);\n";
3464 t << " } else {\n";
3465 t << " const results = document.getElementById('searchresults');\n";
3466 t << " results.innerHTML = '<p>" << theTranslator->trSearchResults(0) << "</p>';\n";
3467 t << " }\n";
3468 t << "});\n";
3469 }
3470 else
3471 {
3472 err("Failed to open file '{}' for writing...\n",scriptName);
3473 }
3474}
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
Definition dstring.h:178
static void writePageFooter(TextStream &t, const DString &, const DString &, const DString &)
Definition htmlgen.cpp:1736
static DString writeSplitBarAsString(const DString &name, const DString &relpath, const DString &allMembersFile)
Definition htmlgen.cpp:3202
virtual DString trSearchResults(int numDocuments)=0
virtual DString trSearchResultsTitle()=0
#define Config_getList(name)
Definition config.h:38
std::vector< std::string > StringVector
Definition containers.h:33
static void writeDefaultQuickLinks(TextStream &t, HighlightedItem hli, const DString &file, const DString &relPath, bool extraTabs)
Definition htmlgen.cpp:3043
#define err(fmt,...)
Definition message.h:127

References Config_getBool, Config_getList, Config_getString, DString::empty(), err, OutputGenerator::fileName(), DString::find(), g_header, g_header_file, ResourceMgr::getAsString(), Doxygen::htmlFileExtension, ResourceMgr::instance(), DString::left(), DString::mid(), DString::npos, Portable::openOutputStream(), Search, DString::stripWhiteSpace(), substituteHtmlKeywords(), theTranslator, Translator::trGeneratedBy(), Translator::trSearchResults(), Translator::trSearchResultsTitle(), writeDefaultQuickLinks(), writePageFooter(), and writeSplitBarAsString().

Referenced by generateOutput().

◆ writeFooter()

void HtmlGenerator::writeFooter ( const DString & navPath)
overridevirtual

Implements OutputGenIntf.

Definition at line 1742 of file htmlgen.cpp.

1743{
1745}

References m_lastTitle, m_relPath, OutputGenerator::m_t, and writePageFooter().

◆ writeFooterFile()

void HtmlGenerator::writeFooterFile ( TextStream & t)
static

Definition at line 1629 of file htmlgen.cpp.

1630{
1631 t << "<!-- HTML footer for doxygen " << getDoxygenVersion() << "-->\n";
1632 t << ResourceMgr::instance().getAsString("footer.html");
1633}

References ResourceMgr::getAsString(), and ResourceMgr::instance().

Referenced by readConfiguration().

◆ writeGraphicalHierarchy()

void HtmlGenerator::writeGraphicalHierarchy ( DotGfxHierarchyTable & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2701 of file htmlgen.cpp.

2702{
2703 g.writeGraph(m_t,dir(),fileName());
2704}
void writeGraph(TextStream &t, const DString &path, const DString &fileName)

References OutputGenerator::dir(), OutputGenerator::fileName(), OutputGenerator::m_t, and DotGfxHierarchyTable::writeGraph().

◆ writeHeaderFile()

void HtmlGenerator::writeHeaderFile ( TextStream & t,
const DString & cssname )
static

Definition at line 1623 of file htmlgen.cpp.

1624{
1625 t << "<!-- HTML header for doxygen " << getDoxygenVersion() << "-->\n";
1626 t << ResourceMgr::instance().getAsString("header.html");
1627}

References ResourceMgr::getAsString(), and ResourceMgr::instance().

Referenced by readConfiguration().

◆ writeInheritedSectionTitle()

void HtmlGenerator::writeInheritedSectionTitle ( const DString & id,
const DString & ref,
const DString & file,
const DString & anchor,
const DString & title,
const DString & name )
overridevirtual

Implements OutputGenIntf.

Definition at line 3685 of file htmlgen.cpp.

3689{
3690 DBG_HTML(m_t << "<!-- writeInheritedSectionTitle -->\n";)
3691 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
3692 DString a = anchor;
3693 if (!a.empty()) a.prepend("#");
3694 DString classLink = DString("<a class=\"el\" ");
3695 if (!ref.empty())
3696 {
3697 classLink+= externalLinkTarget();
3698 classLink += " href=\"";
3699 classLink+= externalRef(m_relPath,ref);
3700 }
3701 else
3702 {
3703 classLink += "href=\"";
3704 classLink+=m_relPath;
3705 }
3706 DString fn = file;
3708 classLink=classLink+fn+a;
3709 classLink+=DString("\">")+convertToHtml(name,false)+"</a>";
3710 m_t << "<tr class=\"inherit_header " << id << "\">";
3711 if (dynamicSections)
3712 {
3713 m_t << "<td colspan=\"2\" class=\"dyn-inherit\">";
3714 m_t << "<span class=\"dynarrow\"><span class=\"arrowhead closed\"></span></span>";
3715 }
3716 else
3717 {
3718 m_t << "<td colspan=\"2\">";
3719 }
3720 m_t << theTranslator->trInheritedFrom(convertToHtml(title,false),classLink)
3721 << "</td></tr>\n";
3722}
DString & prepend(const char *s)
Definition dstring.h:515
virtual DString trInheritedFrom(const DString &members, const DString &what)=0

References addHtmlExtensionIfMissing(), Config_getBool, convertToHtml(), DBG_HTML, DString::empty(), externalLinkTarget(), externalRef(), m_relPath, OutputGenerator::m_t, DString::prepend(), theTranslator, and Translator::trInheritedFrom().

◆ writeLabel()

void HtmlGenerator::writeLabel ( const DString & l,
bool isLast )
overridevirtual

Implements OutputGenIntf.

Definition at line 3639 of file htmlgen.cpp.

3640{
3641 DBG_HTML(m_t << "<!-- writeLabel(" << label << ") -->\n";)
3642
3643 auto convertLabelToClass = [](const std::string &lab) {
3644 DString input = convertUTF8ToLower(lab);
3645 DString result;
3646 size_t l=input.length();
3647 result.reserve(l);
3648
3649 // Create valid class selector, see 10.2 here https://www.w3.org/TR/selectors-3/#w3cselgrammar
3650 // ident [-]?{nmstart}{nmchar}*
3651 // nmstart [_a-z]|{nonascii}
3652 // nonascii [^\0-\177]
3653 // nmchar [_a-z0-9-]|{nonascii}
3654
3655 bool nmstart=false;
3656 for (size_t i=0; i<l; i++)
3657 {
3658 char c = input.at(i);
3659 if (static_cast<signed char>(c)<0 || (c>='a' && c<='z') || c=='_') // nmstart pattern
3660 {
3661 nmstart=true;
3662 result+=c;
3663 }
3664 else if (nmstart && (static_cast<signed char>(c)<0 || (c>='a' && c<='z') || (c>='0' && c<='9') || c=='_')) // nmchar pattern
3665 {
3666 result+=c;
3667 }
3668 else if (nmstart && (c==' ' || c=='-')) // show whitespace as -
3669 {
3670 result+='-';
3671 }
3672 }
3673 return result;
3674 };
3675
3676 m_t << "<span class=\"mlabel " << convertLabelToClass(label.stripWhiteSpace().str()) << "\">" << label << "</span>";
3677}
char & at(size_t i)
Returns a reference to the character at index i.
Definition dstring.h:686
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition dstring.h:217
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition dstring.h:151
std::string convertUTF8ToLower(const std::string &input)
Converts the input string into a lower case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:191

References DString::at(), convertUTF8ToLower(), DBG_HTML, DString::length(), OutputGenerator::m_t, DString::reserve(), DString::str(), and DString::stripWhiteSpace().

◆ writeLatexSpacing()

void HtmlGenerator::writeLatexSpacing ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 228 of file htmlgen.h.

228{}

◆ writeLogo()

void HtmlGenerator::writeLogo ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1731 of file htmlgen.cpp.

1732{
1734}
static DString writeLogoAsString(const DString &path)
Definition htmlgen.cpp:1709

References m_relPath, OutputGenerator::m_t, and writeLogoAsString().

◆ writeLogoAsString()

DString HtmlGenerator::writeLogoAsString ( const DString & path)
static

Definition at line 1709 of file htmlgen.cpp.

1710{
1711 DString result;
1712 switch (Config_getEnum(TIMESTAMP))
1713 {
1714 case TIMESTAMP_t::NO:
1715 result = theTranslator->trGeneratedBy();
1716 break;
1717 default:
1718 result = theTranslator->trGeneratedAt("<span class=\"timestamp\"></span>",
1719 convertToHtml(Config_getString(PROJECT_NAME)));
1720 break;
1721 }
1722 result += "&#160;\n<a href=\"https://www.doxygen.org/index.html\">\n"
1723 "<img class=\"footer\" src=\"";
1724 result += path;
1725 result += "doxygen.svg\" width=\"104\" height=\"31\" alt=\"doxygen\"/></a> ";
1726 result += getDoxygenVersion();
1727 result += " ";
1728 return result;
1729}
virtual DString trGeneratedAt(const DString &date, const DString &projName)=0

References Config_getEnum, Config_getString, convertToHtml(), theTranslator, Translator::trGeneratedAt(), and Translator::trGeneratedBy().

Referenced by writeLogo(), and writeSearchPage().

◆ writeNavigationPath()

void HtmlGenerator::writeNavigationPath ( const DString & s)
overridevirtual

Implements OutputGenIntf.

Definition at line 3241 of file htmlgen.cpp.

3242{
3243 m_t << substitute(s,"$relpath^",m_relPath);
3244}

References m_relPath, OutputGenerator::m_t, and substitute().

◆ writeNonBreakableSpace()

void HtmlGenerator::writeNonBreakableSpace ( int n)
overridevirtual

Implements OutputGenIntf.

Definition at line 2751 of file htmlgen.cpp.

2752{
2753 for (int i=0; i<n; i++)
2754 {
2755 m_t << "&#160;";
2756 }
2757}

References OutputGenerator::m_t.

◆ writeObjectLink()

void HtmlGenerator::writeObjectLink ( const DString & ref,
const DString & file,
const DString & anchor,
const DString & name )
overridevirtual

Implements OutputGenIntf.

Definition at line 1938 of file htmlgen.cpp.

1940{
1941 if (!ref.empty())
1942 {
1943 m_t << "<a class=\"elRef\" ";
1945 }
1946 else
1947 {
1948 m_t << "<a class=\"el\" ";
1949 }
1950 m_t << "href=\"";
1951 DString fn = f;
1954 fileName() == Config_getString(HTML_OUTPUT)+"/"+fn,
1955 fn,
1956 anchor);
1957 m_t << "\">";
1958 docify(name);
1959 m_t << "</a>";
1960}

References addHtmlExtensionIfMissing(), Config_getString, createHtmlUrl(), docify(), DString::empty(), externalLinkTarget(), OutputGenerator::fileName(), m_relPath, and OutputGenerator::m_t.

◆ writePageFooter()

void HtmlGenerator::writePageFooter ( TextStream & t,
const DString & lastTitle,
const DString & relPath,
const DString & navPath )
staticprivate

Definition at line 1736 of file htmlgen.cpp.

1738{
1739 t << substituteHtmlKeywords(g_footer_file,g_footer,convertToHtml(lastTitle),relPath,navPath);
1740}

References convertToHtml(), g_footer, g_footer_file, and substituteHtmlKeywords().

Referenced by writeExternalSearchPage(), writeFooter(), and writeSearchPage().

◆ writePageLink()

void HtmlGenerator::writePageLink ( const DString & ,
bool  )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 132 of file htmlgen.h.

132{}

◆ writePageOutline()

void HtmlGenerator::writePageOutline ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3751 of file htmlgen.cpp.

3752{
3753 m_t << "<div id=\"page-nav\" class=\"page-nav-panel\">\n";
3754 m_t << "<div id=\"page-nav-resize-handle\"></div>\n";
3755 m_t << "<div id=\"page-nav-tree\">\n";
3756 m_t << "<div id=\"page-nav-contents\">\n";
3757 m_t << "</div><!-- page-nav-contents -->\n";
3758 m_t << "</div><!-- page-nav-tree -->\n";
3759 m_t << "</div><!-- page-nav -->\n";
3760}

References OutputGenerator::m_t.

◆ writeQuickLinks()

void HtmlGenerator::writeQuickLinks ( HighlightedItem hli,
const DString & file,
bool extraTabs )
overridevirtual

Implements OutputGenIntf.

Definition at line 3266 of file htmlgen.cpp.

3267{
3268 writeDefaultQuickLinks(m_t,hli,file,m_relPath,extraTabs);
3269}

References m_relPath, OutputGenerator::m_t, and writeDefaultQuickLinks().

◆ writeRuler()

void HtmlGenerator::writeRuler ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 208 of file htmlgen.h.

208{ m_t << "<hr/>"; }

References OutputGenerator::m_t.

◆ writeSearchData()

void HtmlGenerator::writeSearchData ( const DString & dir)
static

Definition at line 1455 of file htmlgen.cpp.

1456{
1457 //bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
1458 //writeImgData(dname,serverBasedSearch ? search_server_data : search_client_data);
1459 ResourceMgr &mgr = ResourceMgr::instance();
1460
1461 DString searchDirName = dname;
1462 std::ofstream f = Portable::openOutputStream(searchDirName+"/search.css");
1463 if (f.is_open())
1464 {
1465 TextStream t(&f);
1466 DString searchCss;
1467 // the position of the search box depends on a number of settings.
1468 // Insert the right piece of CSS code depending on which options are selected
1469 if (Config_getBool(GENERATE_TREEVIEW) && Config_getBool(FULL_SIDEBAR))
1470 {
1471 searchCss = mgr.getAsString("search_sidebar.css"); // we have a full height side bar
1472 }
1473 else if (Config_getBool(DISABLE_INDEX))
1474 {
1475 if (Config_getBool(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1476 {
1477 searchCss = mgr.getAsString("search_nomenu_toggle.css"); // we have no tabs but do have a darkmode button
1478 }
1479 else
1480 {
1481 searchCss = mgr.getAsString("search_nomenu.css"); // we have no tabs and no darkmode button
1482 }
1483 }
1484 else if (!Config_getBool(HTML_DYNAMIC_MENUS))
1485 {
1486 searchCss = mgr.getAsString("search_fixedtabs.css"); // we have tabs, but they are static
1487 }
1488 else
1489 {
1490 searchCss = mgr.getAsString("search.css"); // default case with a dynamic menu bar
1491 }
1492 // and then add the option independent part of the styling
1493 searchCss += mgr.getAsString("search_common.css");
1494 searchCss = substitute(searchCss,"$doxygenversion",getDoxygenVersion());
1495 t << replaceVariables(searchCss);
1496 Doxygen::indexList->addStyleSheetFile("search/search.css");
1497 }
1498}
void addStyleSheetFile(const DString &name)
Definition indexlist.h:127

References IndexList::addStyleSheetFile(), Config_getBool, ResourceMgr::getAsString(), Doxygen::indexList, ResourceMgr::instance(), Portable::openOutputStream(), replaceVariables(), and substitute().

Referenced by generateOutput().

◆ writeSearchInfo()

void HtmlGenerator::writeSearchInfo ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1703 of file htmlgen.cpp.

1704{
1706}
static void writeSearchInfoStatic(TextStream &t, const DString &relPath)
Definition htmlgen.cpp:1676

References m_relPath, OutputGenerator::m_t, and writeSearchInfoStatic().

◆ writeSearchInfoStatic()

void HtmlGenerator::writeSearchInfoStatic ( TextStream & t,
const DString & relPath )
static

Definition at line 1676 of file htmlgen.cpp.

1677{
1678 bool searchEngine = Config_getBool(SEARCHENGINE);
1679 bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
1680 if (searchEngine && !serverBasedSearch)
1681 {
1682 t << "<!-- window showing the filter options -->\n";
1683 t << "<div id=\"MSearchSelectWindow\">\n";
1684 t << "</div>\n";
1685 t << "\n";
1686 t << "<!-- iframe showing the search results (closed by default) -->\n";
1687 t << "<div id=\"MSearchResultsWindow\">\n";
1688 t << "<div id=\"MSearchResults\">\n";
1689 t << "<div class=\"SRPage\">\n";
1690 t << "<div id=\"SRIndex\">\n";
1691 t << "<div id=\"SRResults\"></div>\n"; // here the results will be inserted
1692 t << "<div class=\"SRStatus\" id=\"Loading\">" << theTranslator->trLoading() << "</div>\n";
1693 t << "<div class=\"SRStatus\" id=\"Searching\">" << theTranslator->trSearching() << "</div>\n";
1694 t << "<div class=\"SRStatus\" id=\"NoMatches\">" << theTranslator->trNoMatches() << "</div>\n";
1695 t << "</div>\n"; // SRIndex
1696 t << "</div>\n"; // SRPage
1697 t << "</div>\n"; // MSearchResults
1698 t << "</div>\n"; // MSearchResultsWindow
1699 t << "\n";
1700 }
1701}
virtual DString trSearching()=0
virtual DString trNoMatches()=0
virtual DString trLoading()=0

References Config_getBool, theTranslator, Translator::trLoading(), Translator::trNoMatches(), and Translator::trSearching().

Referenced by writeSearchInfo().

◆ writeSearchPage()

void HtmlGenerator::writeSearchPage ( )
static

Definition at line 3272 of file htmlgen.cpp.

3273{
3274 bool disableIndex = Config_getBool(DISABLE_INDEX);
3275 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3276 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3277 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3278 DString projectName = Config_getString(PROJECT_NAME);
3279 DString htmlOutput = Config_getString(HTML_OUTPUT);
3280
3281 // OPENSEARCH_PROVIDER {
3282 DString configFileName = htmlOutput+"/search_config.php";
3283 std::ofstream f = Portable::openOutputStream(configFileName);
3284 if (f.is_open())
3285 {
3286 TextStream t(&f);
3287 t << "<?php\n\n";
3288 t << "$config = array(\n";
3289 t << " 'PROJECT_NAME' => \"" << convertToHtml(projectName) << "\",\n";
3290 t << " 'GENERATE_TREEVIEW' => " << (generateTreeView?"true":"false") << ",\n";
3291 t << " 'DISABLE_INDEX' => " << (disableIndex?"true":"false") << ",\n";
3292 t << " 'FULL_SIDEBAR' => " << (fullSidebar?"true":"false") << ",\n";
3293 t << ");\n\n";
3294 t << "$translator = array(\n";
3295 t << " 'search_results_title' => \"" << theTranslator->trSearchResultsTitle() << "\",\n";
3296 t << " 'search_results' => array(\n";
3297 t << " 0 => \"" << theTranslator->trSearchResults(0) << "\",\n";
3298 t << " 1 => \"" << theTranslator->trSearchResults(1) << "\",\n";
3299 t << " 2 => \"" << substitute(theTranslator->trSearchResults(2), "$", "\\$") << "\",\n";
3300 t << " ),\n";
3301 t << " 'search_matches' => \"" << theTranslator->trSearchMatches() << "\",\n";
3302 t << " 'search' => \"" << theTranslator->trSearch() << "\",\n";
3303 t << " 'logo' => \"" << substitute(substitute(writeLogoAsString(""), "\"","\\\""), "\n","\\n") << "\",\n";
3304 t << ");\n\n";
3305 t << "?>\n";
3306 }
3307 f.close();
3308
3309 ResourceMgr::instance().copyResource("search_functions.php",htmlOutput);
3310 ResourceMgr::instance().copyResource("search_opensearch.php",htmlOutput);
3311 // OPENSEARCH_PROVIDER }
3312
3313 DString fileName = htmlOutput+"/search.php";
3315 if (f.is_open())
3316 {
3317 TextStream t(&f);
3319
3320 t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
3321 << getDoxygenVersion() << " -->\n";
3322 t << "<script type=\"text/javascript\">\n";
3323 t << "let searchBox = new SearchBox(\"searchBox\", \""
3324 << "search/\",'" << Doxygen::htmlFileExtension << "');\n";
3325 t << "</script>\n";
3326
3327 if (!disableIndex && !quickLinksAfterSplitbar)
3328 {
3329 writeDefaultQuickLinks(t,HighlightedItem::Search,DString(),DString(),false);
3330 }
3331 if (generateTreeView)
3332 {
3333 t << "</div><!-- top -->\n";
3334 }
3335 t << writeSplitBarAsString("search.php",DString(),DString());
3336 if (quickLinksAfterSplitbar)
3337 {
3338 writeDefaultQuickLinks(t,HighlightedItem::Search,DString(),DString(),false);
3339 }
3340 t << "<!-- generated -->\n";
3341
3342 t << "<?php\n";
3343 t << "require_once \"search_functions.php\";\n";
3344 t << "main();\n";
3345 t << "?>\n";
3346
3347 // Write empty navigation path, to make footer connect properly
3348 if (generateTreeView)
3349 {
3350 t << "</div><!-- doc-content -->\n";
3351 t << "</div><!-- container -->\n";
3352 }
3353
3354 writePageFooter(t,"Search","","");
3355 }
3356 f.close();
3357
3358 DString scriptName = htmlOutput+"/search/search.js";
3359 f = Portable::openOutputStream(scriptName);
3360 if (f.is_open())
3361 {
3362 TextStream t(&f);
3363 t << ResourceMgr::instance().getAsString("extsearch.js");
3364 }
3365 else
3366 {
3367 err("Failed to open file '{}' for writing...\n",scriptName);
3368 }
3369}
virtual DString trSearchMatches()=0
virtual DString trSearch()=0

References Config_getBool, Config_getString, convertToHtml(), ResourceMgr::copyResource(), err, OutputGenerator::fileName(), g_header, g_header_file, ResourceMgr::getAsString(), Doxygen::htmlFileExtension, ResourceMgr::instance(), Portable::openOutputStream(), Search, substitute(), substituteHtmlKeywords(), theTranslator, Translator::trGeneratedBy(), Translator::trSearch(), Translator::trSearchMatches(), Translator::trSearchResults(), Translator::trSearchResultsTitle(), writeDefaultQuickLinks(), writeLogoAsString(), writePageFooter(), and writeSplitBarAsString().

Referenced by generateOutput().

◆ writeSplitBar()

void HtmlGenerator::writeSplitBar ( const DString & name,
const DString & allMembersFile )
overridevirtual

Implements OutputGenIntf.

Definition at line 3236 of file htmlgen.cpp.

3237{
3238 m_t << writeSplitBarAsString(name,m_relPath,allMembersFile);
3239}

References m_relPath, OutputGenerator::m_t, and writeSplitBarAsString().

◆ writeSplitBarAsString()

DString HtmlGenerator::writeSplitBarAsString ( const DString & name,
const DString & relpath,
const DString & allMembersFile )
static

Definition at line 3202 of file htmlgen.cpp.

3203{
3204 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3205 DString result;
3206 // write split bar
3207 if (generateTreeView)
3208 {
3209 DString fn = name;
3211 if (!Config_getBool(FULL_SIDEBAR))
3212 {
3213 result += DString(
3214 "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n");
3215 }
3216 result+=
3217 " <div id=\"nav-tree\">\n"
3218 " <div id=\"nav-tree-contents\">\n"
3219 " <div id=\"nav-sync\" class=\"sync\"></div>\n"
3220 " </div>\n"
3221 " </div>\n"
3222 " <div id=\"splitbar\" class=\"ui-resizable-handle\">\n"
3223 " </div>\n"
3224 "</div>\n"
3225 "<script type=\"text/javascript\">\n"
3226 "document.addEventListener('DOMContentLoaded',() => { initNavTree('" + fn + "','" + relpath + "','" + allMembersFile + "'); });\n"
3227 "</script>\n";
3228 if (Config_getBool(DISABLE_INDEX) || !Config_getBool(FULL_SIDEBAR))
3229 {
3230 result+="<div id=\"container\">\n<div id=\"doc-content\">\n";
3231 }
3232 }
3233 return result;
3234}

References addHtmlExtensionIfMissing(), and Config_getBool.

Referenced by writeExternalSearchPage(), writeSearchPage(), and writeSplitBar().

◆ writeStartAnnoItem()

void HtmlGenerator::writeStartAnnoItem ( const DString & type,
const DString & file,
const DString & path,
const DString & name )
overridevirtual

Implements OutputGenIntf.

Definition at line 1926 of file htmlgen.cpp.

1928{
1929 m_t << "<li>";
1930 if (!path.empty()) docify(path);
1931 DString fn = f;
1933 m_t << "<a class=\"el\" href=\"" << fn << "\">";
1934 docify(name);
1935 m_t << "</a> ";
1936}

References addHtmlExtensionIfMissing(), docify(), DString::empty(), and OutputGenerator::m_t.

◆ writeString()

void HtmlGenerator::writeString ( const DString & text)
overridevirtual

Implements OutputGenIntf.

Definition at line 1868 of file htmlgen.cpp.

1869{
1870 m_t << text;
1871}

References OutputGenerator::m_t.

◆ writeStyleInfo()

void HtmlGenerator::writeStyleInfo ( int part)
overridevirtual

Implements OutputGenIntf.

Definition at line 1762 of file htmlgen.cpp.

1763{
1764 //printf("writeStyleInfo(%d)\n",part);
1765 if (part==0)
1766 {
1767 if (Config_getString(HTML_STYLESHEET).empty()) // write default style sheet
1768 {
1769 //printf("write doxygen.css\n");
1770 startPlainFile("doxygen.css");
1772 endPlainFile();
1773 Doxygen::indexList->addStyleSheetFile("doxygen.css");
1774 }
1775 else // write user defined style sheet
1776 {
1777 DString cssName=Config_getString(HTML_STYLESHEET);
1778 if (!cssName.startsWith("http:") && !cssName.startsWith("https:"))
1779 {
1780 FileInfo cssfi(cssName.str());
1781 if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
1782 {
1783 err("style sheet {} does not exist or is not readable!\n", Config_getString(HTML_STYLESHEET));
1784 }
1785 else
1786 {
1787 // convert style sheet to string
1788 DString fileStr = fileToString(cssName);
1789 // write the string into the output dir
1790 startPlainFile(cssfi.fileName());
1791 m_t << fileStr;
1792 endPlainFile();
1793 }
1794 Doxygen::indexList->addStyleSheetFile(cssfi.fileName());
1795 }
1796 }
1797 StringVector extraCssFiles = Config_getList(HTML_EXTRA_STYLESHEET);
1798 for (const auto &fileName : extraCssFiles)
1799 {
1800 if (!fileName.empty())
1801 {
1802 FileInfo fi(fileName);
1803 if (fi.exists())
1804 {
1805 Doxygen::indexList->addStyleSheetFile(fi.fileName());
1806 }
1807 }
1808 }
1809
1810 Doxygen::indexList->addStyleSheetFile("navtree.css");
1811
1812 if (Config_getBool(HTML_DYNAMIC_SECTIONS) ||
1813 (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS)))
1814 {
1815 Doxygen::indexList->addStyleSheetFile("dynsections.js");
1816 }
1817 if (Config_getBool(HTML_CODE_FOLDING))
1818 {
1819 Doxygen::indexList->addStyleSheetFile("codefolding.js");
1820 }
1821
1822 if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1823 {
1824 Doxygen::indexList->addStyleSheetFile("darkmode_toggle.js");
1825 }
1826
1827 if (Config_getBool(INTERACTIVE_SVG))
1828 {
1830 }
1831
1832 if (!Config_getBool(DISABLE_INDEX) && Config_getBool(HTML_DYNAMIC_MENUS))
1833 {
1835 Doxygen::indexList->addStyleSheetFile("menudata.js");
1836 }
1837 }
1838}
bool startsWith(const char *s) const
Definition dstring.h:600
static void writeDefaultStyleSheet(TextStream &t)
Definition htmlgen.cpp:1500

References IndexList::addStyleSheetFile(), Config_getBool, Config_getEnum, Config_getList, Config_getString, DString::empty(), endPlainFile(), err, FileInfo::exists(), FileInfo::fileName(), OutputGenerator::fileName(), fileToString(), Doxygen::indexList, FileInfo::isFile(), FileInfo::isReadable(), OutputGenerator::m_t, startPlainFile(), DString::startsWith(), DString::str(), and writeDefaultStyleSheet().

◆ writeStyleSheetFile()

void HtmlGenerator::writeStyleSheetFile ( TextStream & t)
static

Definition at line 1617 of file htmlgen.cpp.

1618{
1621}

References fillColorStyleMaps(), and writeDefaultStyleSheet().

Referenced by readConfiguration().

◆ writeSummaryLink()

void HtmlGenerator::writeSummaryLink ( const DString & file,
const DString & anchor,
const DString & title,
bool first )
overridevirtual

Implements OutputGenIntf.

Definition at line 3724 of file htmlgen.cpp.

3725{
3726 if (first)
3727 {
3728 m_t << " <div class=\"summary\">\n";
3729 }
3730 else
3731 {
3732 m_t << " &#124;\n";
3733 }
3734 m_t << "<a href=\"";
3735 if (!file.empty())
3736 {
3737 DString fn = file;
3739 m_t << m_relPath << fn;
3740 }
3741 else if (!anchor.empty())
3742 {
3743 m_t << "#";
3744 m_t << anchor;
3745 }
3746 m_t << "\">";
3747 m_t << title;
3748 m_t << "</a>";
3749}

References addHtmlExtensionIfMissing(), DString::empty(), m_relPath, and OutputGenerator::m_t.

◆ writeSynopsis()

void HtmlGenerator::writeSynopsis ( )
inlineoverridevirtual

Implements OutputGenIntf.

Definition at line 242 of file htmlgen.h.

242{}

◆ writeTabData()

void HtmlGenerator::writeTabData ( )
static

Additional initialization after indices have been created.

Definition at line 1439 of file htmlgen.cpp.

1440{
1442 DString dname=Config_getString(HTML_OUTPUT);
1443 ResourceMgr &mgr = ResourceMgr::instance();
1444 mgr.copyResource("doxygen.svg",dname);
1445 Doxygen::indexList->addImageFile("doxygen.svg");
1446 if (Config_getBool(SEARCHENGINE) && Config_getBool(SERVER_BASED_SEARCH))
1447 {
1448 mgr.copyResource("MaterialSymbolsOutlined.min.woff2",dname);
1449 Doxygen::indexList->addImageFile("MaterialSymbolsOutlined.min.woff2");
1450 mgr.copyResource("MaterialSymbolsOutlined_LICENSE.txt",dname);
1451 Doxygen::indexList->addImageFile("MaterialSymbolsOutlined_LICENSE.txt");
1452 }
1453}
void addImageFile(const DString &name)
Definition indexlist.h:124

References IndexList::addImageFile(), IndexList::addStyleSheetFile(), Config_getBool, Config_getString, ResourceMgr::copyResource(), Doxygen::indexList, and ResourceMgr::instance().

Referenced by generateOutput().

Member Data Documentation

◆ m_codeGen

HtmlCodeGenerator* HtmlGenerator::m_codeGen = nullptr
private

Definition at line 349 of file htmlgen.h.

Referenced by addCodeGen(), HtmlGenerator(), HtmlGenerator(), operator=(), and startFile().

◆ m_codeList

std::unique_ptr<OutputCodeList> HtmlGenerator::m_codeList
private

Definition at line 348 of file htmlgen.h.

Referenced by HtmlGenerator(), HtmlGenerator(), operator=(), and writeDoc().

◆ m_emptySection

◆ m_lastFile

DString HtmlGenerator::m_lastFile
private

Definition at line 344 of file htmlgen.h.

Referenced by HtmlGenerator(), operator=(), and startFile().

◆ m_lastTitle

DString HtmlGenerator::m_lastTitle
private

Definition at line 343 of file htmlgen.h.

Referenced by HtmlGenerator(), operator=(), startFile(), and writeFooter().

◆ m_pageOutlineIndent

int HtmlGenerator::m_pageOutlineIndent = 0
private

Definition at line 350 of file htmlgen.h.

◆ m_relPath

◆ m_sectionCount

◆ m_tocState

TocState HtmlGenerator::m_tocState
private

Definition at line 362 of file htmlgen.h.

Referenced by endLocalToc(), endTocEntry(), startLocalToc(), startTocEntry(), and writeDoc().


The documentation for this class was generated from the following files: