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 &)
HtmlGenerator & operator= (const HtmlGenerator &)
 HtmlGenerator (HtmlGenerator &&)=delete
HtmlGenerator & operator= (HtmlGenerator &&)=delete
 ~HtmlGenerator ()
void clearBuffer ()
OutputType type () const override
std::unique_ptr< OutputGenIntf > clone () 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< OutputCodeList > m_codeList
HtmlCodeGenerator * m_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 1226 of file htmlgen.cpp.

1227 : OutputGenerator(Config_getString(HTML_OUTPUT))
1228 , m_codeList(std::make_unique<OutputCodeList>())
1229{
1230 //printf("%p:HtmlGenerator()\n",(void*)this);
1231 m_codeGen = m_codeList->add<HtmlCodeGenerator>(&m_t);
1232}
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 1234 of file htmlgen.cpp.

1234 : OutputGenerator(og.m_dir), OutputGenIntf()
1235{
1236 //printf("%p:HtmlGenerator(copy %p)\n",(void*)this,(void*)&og);
1237 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
1238 m_codeGen = m_codeList->get<HtmlCodeGenerator>(OutputType::Html);
1242 m_relPath = og.m_relPath;
1245}
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 1267 of file htmlgen.cpp.

1268{
1270}
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 2771 of file htmlgen.cpp.

2772{
2773}

◆ addLabel()

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

Implements OutputGenIntf.

Definition at line 1875 of file htmlgen.cpp.

1876{
1877}

◆ cleanup()

void HtmlGenerator::cleanup ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1437 of file htmlgen.cpp.

1438{
1439 DString dname = Config_getString(HTML_OUTPUT);
1440 Dir d(dname.str());
1441 clearSubDirs(d);
1442}
const std::string & str() const
Definition dstring.h:645
void clearSubDirs(const Dir &d)
Definition util.cpp:3002

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

2072{
2073 docify_(str,false);
2074}
void docify_(const DString &text, bool inHtmlComment)
Definition htmlgen.cpp:2076

References docify_().

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

◆ docify_()

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

Definition at line 2076 of file htmlgen.cpp.

2077{
2078 if (!str.empty())
2079 {
2080 const char *p=str.data();
2081 while (*p)
2082 {
2083 char c=*p++;
2084 switch(c)
2085 {
2086 case '<': m_t << "&lt;"; break;
2087 case '>': m_t << "&gt;"; break;
2088 case '&': m_t << "&amp;"; break;
2089 case '"': m_t << "&quot;"; break;
2090 case '-': if (inHtmlComment) m_t << "&#45;"; else m_t << "-"; break;
2091 case '\\':
2092 if (*p=='<')
2093 { m_t << "&lt;"; p++; }
2094 else if (*p=='>')
2095 { m_t << "&gt;"; p++; }
2096 else if (*p=='[')
2097 { m_t << "\\&zwj;["; p++; }
2098 else if (*p==']')
2099 { m_t << "\\&zwj;]"; p++; }
2100 else if (*p=='(')
2101 { m_t << "\\&zwj;("; p++; }
2102 else if (*p==')')
2103 { m_t << "\\&zwj;)"; p++; }
2104 else
2105 m_t << "\\";
2106 break;
2107 default: m_t << c;
2108 }
2109 }
2110 }
2111}

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

2695{
2700
2702
2705}
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:2167
static void startSectionSummary(TextStream &t, int sectionCount)
Definition htmlgen.cpp:2146
static void endSectionContent(TextStream &t)
Definition htmlgen.cpp:2182
static void endSectionHeader(TextStream &t)
Definition htmlgen.cpp:2140
static void endSectionSummary(TextStream &t)
Definition htmlgen.cpp:2157

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

2197{
2202 TextStream tt;
2203 d.writeImage(tt,dir(),m_relPath,fileName,true,true);
2204 if (!tt.empty())
2205 {
2206 m_t << " <div class=\"center\">\n";
2207 m_t << " <img src=\"";
2208 m_t << m_relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
2209 m_t << "_map\" alt=\"\"/>\n";
2210 m_t << " <map id=\"" << convertToId(name);
2211 m_t << "_map\" name=\"" << convertToId(name);
2212 m_t << "_map\">\n";
2213 m_t << tt.str();
2214 m_t << " </map>\n";
2215 m_t << "</div>";
2216 }
2217 else
2218 {
2219 m_t << " <div class=\"center\">\n";
2220 m_t << " <img src=\"";
2221 m_t << m_relPath << fileName << ".png\" alt=\"\"/>\n";
2222 m_t << " </div>";
2223 }
2226}
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:3208

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

2299{
2300 m_t << "</div>";
2301}

References OutputGenerator::m_t.

◆ endConstraintDocs()

void HtmlGenerator::endConstraintDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3522 of file htmlgen.cpp.

3523{
3524 m_t << "</td></tr>\n";
3525}

References OutputGenerator::m_t.

◆ endConstraintList()

void HtmlGenerator::endConstraintList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3527 of file htmlgen.cpp.

3528{
3529 m_t << "</table>\n";
3530 m_t << "</dd>\n";
3531 m_t << "</dl>\n";
3532 m_t << "</div>\n";
3533}

References OutputGenerator::m_t.

◆ endConstraintParam()

void HtmlGenerator::endConstraintParam ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3502 of file htmlgen.cpp.

3503{
3504 m_t << "</em></td>";
3505}

References OutputGenerator::m_t.

◆ endConstraintType()

void HtmlGenerator::endConstraintType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3512 of file htmlgen.cpp.

3513{
3514 m_t << "</em></td>";
3515}

References OutputGenerator::m_t.

◆ endContents()

void HtmlGenerator::endContents ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3263 of file htmlgen.cpp.

3264{
3265 m_t << "</div><!-- contents -->\n";
3266}

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

2789{
2790 m_t << "</table>\n";
2791}

References OutputGenerator::m_t.

◆ endDescTableData()

void HtmlGenerator::endDescTableData ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2828 of file htmlgen.cpp.

2829{
2830 m_t << "</td>";
2831}

References OutputGenerator::m_t.

◆ endDescTableInit()

void HtmlGenerator::endDescTableInit ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2818 of file htmlgen.cpp.

2819{
2820 m_t << "&#160;</td>";
2821}

References OutputGenerator::m_t.

◆ endDescTableRow()

void HtmlGenerator::endDescTableRow ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2798 of file htmlgen.cpp.

2799{
2800 m_t << "</tr>\n";
2801}

References OutputGenerator::m_t.

◆ endDescTableTitle()

void HtmlGenerator::endDescTableTitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2808 of file htmlgen.cpp.

2809{
2810 m_t << "&#160;</td>";
2811}

References OutputGenerator::m_t.

◆ endDirDepGraph()

void HtmlGenerator::endDirDepGraph ( DotDirDeps & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2712 of file htmlgen.cpp.

2713{
2718
2720
2723}
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 2624 of file htmlgen.cpp.

2625{
2626 bool generateLegend = Config_getBool(GENERATE_LEGEND);
2627 bool umlLook = Config_getBool(UML_LOOK);
2632
2634 if (generateLegend && !umlLook)
2635 {
2636 DString url = m_relPath+"graph_legend"+Doxygen::htmlFileExtension;
2637 m_t << "<center><span class=\"legend\">[";
2638 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2639 m_t << "<a ";
2640 if (generateTreeView) m_t << "target=\"top\" ";
2641 m_t << "href=\"";
2642 if (!url.empty()) m_t << url;
2643 m_t << "\">";
2645 m_t << "</a>";
2646 m_t << "]</span></center>";
2647 }
2648
2651}
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 1871 of file htmlgen.cpp.

1872{
1873}

◆ endEmbeddedDoc()

void HtmlGenerator::endEmbeddedDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3641 of file htmlgen.cpp.

3642{
3643 DBG_HTML(m_t << "<!-- endEmbeddedDoc -->\n";)
3644 m_t << "</div>";
3645}
#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 2840 of file htmlgen.cpp.

2841{
2842 m_t << "</dl>\n";
2843}

References OutputGenerator::m_t.

◆ endFile()

void HtmlGenerator::endFile ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1772 of file htmlgen.cpp.

1773{
1774 endPlainFile();
1775}
void endPlainFile() override
Definition htmlgen.h:332

References endPlainFile().

◆ endGroupCollaboration()

void HtmlGenerator::endGroupCollaboration ( DotGroupCollaboration & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2676 of file htmlgen.cpp.

2677{
2682
2684
2687}
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 2024 of file htmlgen.cpp.

2025{
2026 if (extraIndentLevel==2)
2027 {
2028 m_t << "</h4>\n";
2029 }
2030 else if (extraIndentLevel==1)
2031 {
2032 m_t << "</h3>\n";
2033 }
2034 else
2035 {
2036 m_t << "</h2>\n";
2037 }
2038}

References OutputGenerator::m_t.

◆ endHeaderSection()

void HtmlGenerator::endHeaderSection ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3564 of file htmlgen.cpp.

3565{
3566 m_t << "</div><!--header-->\n";
3567}

References OutputGenerator::m_t.

◆ endInclDepGraph()

void HtmlGenerator::endInclDepGraph ( DotInclDepGraph & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2658 of file htmlgen.cpp.

2659{
2664
2666
2669}
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 2765 of file htmlgen.cpp.

2766{
2767 DBG_HTML(m_t << "<!-- endIndent -->\n";)
2768 m_t << "\n</div>\n" << "</div>\n";
2769}

References DBG_HTML, and OutputGenerator::m_t.

◆ endIndexItem()

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

Implements OutputGenIntf.

Definition at line 1937 of file htmlgen.cpp.

1938{
1939 //printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
1940 if (!ref.empty() || !f.empty())
1941 {
1942 m_t << "</a>";
1943 }
1944 else
1945 {
1946 m_t << "</b>";
1947 }
1948}

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

◆ endIndexKey()

void HtmlGenerator::endIndexKey ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2428 of file htmlgen.cpp.

2429{
2430 //m_t << "</td>";
2431}

◆ endIndexList()

void HtmlGenerator::endIndexList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2418 of file htmlgen.cpp.

2419{
2420 m_t << "</table>\n";
2421}

References OutputGenerator::m_t.

◆ endIndexListItem()

void HtmlGenerator::endIndexListItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1902 of file htmlgen.cpp.

1903{
1904 m_t << "</li>\n";
1905}

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

2439{
2440 //m_t << "</td></tr>\n";
2441}

◆ endInlineHeader()

void HtmlGenerator::endInlineHeader ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3579 of file htmlgen.cpp.

3580{
3581 m_t << "</h3></th></tr>\n";
3582}

References OutputGenerator::m_t.

◆ endInlineMemberDoc()

void HtmlGenerator::endInlineMemberDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3629 of file htmlgen.cpp.

3630{
3631 DBG_HTML(m_t << "<!-- endInlineMemberDoc -->\n";)
3632 m_t << "</td></tr>\n";
3633}

References DBG_HTML, and OutputGenerator::m_t.

◆ endInlineMemberName()

void HtmlGenerator::endInlineMemberName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3617 of file htmlgen.cpp.

3618{
3619 DBG_HTML(m_t << "<!-- endInlineMemberName -->\n";)
3620 m_t << "</td>\n";
3621}

References DBG_HTML, and OutputGenerator::m_t.

◆ endInlineMemberType()

void HtmlGenerator::endInlineMemberType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3605 of file htmlgen.cpp.

3606{
3607 DBG_HTML(m_t << "<!-- endInlineMemberType -->\n";)
3608 m_t << "</td>\n";
3609}

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

3694{
3695 DBG_HTML(m_t << "<!-- endLabels -->\n";)
3696 m_t << "</span>";
3697}

References DBG_HTML, and OutputGenerator::m_t.

◆ endLocalToc()

void HtmlGenerator::endLocalToc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3801 of file htmlgen.cpp.

3802{
3804 while (m_tocState.level>0)
3805 {
3806 m_tocState.decIndent(m_t,"</li>");
3807 m_tocState.decIndent(m_t,"</ul>");
3808 m_tocState.level--;
3809 }
3810 m_t << "</div>\n";
3811}
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 3776 of file htmlgen.cpp.

3777{
3778}

◆ endMemberDescription()

void HtmlGenerator::endMemberDescription ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2342 of file htmlgen.cpp.

2343{
2344 DBG_HTML(m_t << "<!-- endMemberDescription -->\n")
2345 m_t << "<br /></td></tr>\n";
2346}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDoc()

void HtmlGenerator::endMemberDoc ( bool hasArgs)
overridevirtual

Implements OutputGenIntf.

Definition at line 2608 of file htmlgen.cpp.

2609{
2610 DBG_HTML(m_t << "<!-- endMemberDoc -->\n";)
2611 if (!hasArgs)
2612 {
2613 m_t << " </tr>\n";
2614 }
2615 m_t << " </table>\n";
2616 // m_t << "</div>\n";
2617}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocList()

void HtmlGenerator::endMemberDocList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2448 of file htmlgen.cpp.

2449{
2450 DBG_HTML(m_t << "<!-- endMemberDocList -->\n";)
2451}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocName()

void HtmlGenerator::endMemberDocName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2492 of file htmlgen.cpp.

2493{
2494 DBG_HTML(m_t << "<!-- endMemberDocName -->\n";)
2495 m_t << "</td>\n";
2496}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocPrefixItem()

void HtmlGenerator::endMemberDocPrefixItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2476 of file htmlgen.cpp.

2477{
2478 DBG_HTML(m_t << "<!-- endMemberDocPrefixItem -->\n";)
2479 m_t << "</div>\n";
2480}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberDocSimple()

void HtmlGenerator::endMemberDocSimple ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 3593 of file htmlgen.cpp.

3594{
3595 DBG_HTML(m_t << "<!-- endMemberDocSimple -->\n";)
3596 m_t << "</table>\n";
3597}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberGroup()

void HtmlGenerator::endMemberGroup ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2754 of file htmlgen.cpp.

2755{
2756}

◆ endMemberGroupDocs()

void HtmlGenerator::endMemberGroupDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2745 of file htmlgen.cpp.

2746{
2747 m_t << "</div></td></tr>\n";
2748}

References OutputGenerator::m_t.

◆ endMemberGroupHeader()

void HtmlGenerator::endMemberGroupHeader ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2735 of file htmlgen.cpp.

2736{
2737 m_t << "</div></td></tr>\n";
2738}

References OutputGenerator::m_t.

◆ endMemberHeader()

void HtmlGenerator::endMemberHeader ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2390 of file htmlgen.cpp.

2391{
2392 DBG_HTML(m_t << "<!-- endMemberHeader -->\n")
2393 m_t << "</h2></td></tr>\n";
2394}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberItem()

void HtmlGenerator::endMemberItem ( MemberItemType type)
overridevirtual

Implements OutputGenIntf.

Definition at line 2267 of file htmlgen.cpp.

2268{
2270 {
2271 insertMemberAlign(false);
2272 }
2273 m_t << "</td></tr>\n";
2274}
OutputType type() const override
Definition htmlgen.h:119
void insertMemberAlign(bool) override
Definition htmlgen.cpp:2303

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

◆ endMemberList()

void HtmlGenerator::endMemberList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2234 of file htmlgen.cpp.

2235{
2236 DBG_HTML(m_t << "<!-- endMemberList -->\n")
2237}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberSections()

void HtmlGenerator::endMemberSections ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2356 of file htmlgen.cpp.

2357{
2358 DBG_HTML(m_t << "<!-- endMemberSections -->\n")
2359 if (!m_emptySection)
2360 {
2361 m_t << "</table>\n";
2362 }
2363}

References DBG_HTML, m_emptySection, and OutputGenerator::m_t.

◆ endMemberSubtitle()

void HtmlGenerator::endMemberSubtitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2407 of file htmlgen.cpp.

2408{
2409 DBG_HTML(m_t << "<!-- endMemberSubtitle -->\n")
2410 m_t << "</td></tr>\n";
2411}

References DBG_HTML, and OutputGenerator::m_t.

◆ endMemberTemplateParams()

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

Implements OutputGenIntf.

Definition at line 2280 of file htmlgen.cpp.

2281{
2282 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2283 m_t << "</td></tr>\n";
2284 m_t << "<tr class=\"memitem:" << convertToId(anchor);
2285 if (!inheritId.empty())
2286 {
2287 if (dynamicSections) m_t << " inherit";
2288 m_t << " " << inheritId;
2289 }
2290 m_t << " template\"><td class=\"memItemLeft\">";
2291}

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

◆ endPageDoc()

void HtmlGenerator::endPageDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3273 of file htmlgen.cpp.

3274{
3275 m_t << "</div><!-- PageDoc -->\n";
3276}

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

1888{
1889 m_t << "</p>\n";
1890}

References OutputGenerator::m_t.

◆ endParameterDefVal()

void HtmlGenerator::endParameterDefVal ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2577 of file htmlgen.cpp.

2578{
2579 m_t << "</span>";
2580}

References OutputGenerator::m_t.

◆ endParameterExtra()

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

Implements OutputGenIntf.

Definition at line 2546 of file htmlgen.cpp.

2547{
2548 DBG_HTML(m_t << "<!-- endParameterExtra -->\n";)
2549 if (last)
2550 {
2551 if (emptyList)
2552 {
2553 if (closeBracket) m_t << "</td><td>)";
2554 m_t << "</td>\n";
2555 m_t << " <td>";
2556 }
2557 else
2558 {
2559 m_t << "&#160;";
2560 if (closeBracket) m_t << ")";
2561 }
2562 }
2563 else
2564 {
2565 m_t << "</td>\n";
2566 m_t << " </tr>\n";
2567 }
2568}

References DBG_HTML, and OutputGenerator::m_t.

◆ endParameterList()

void HtmlGenerator::endParameterList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2582 of file htmlgen.cpp.

2583{
2584 DBG_HTML(m_t << "<!-- endParameterList -->\n";)
2585 m_t << "</td>\n";
2586 m_t << " </tr>\n";
2587}

References DBG_HTML, and OutputGenerator::m_t.

◆ endParameterName()

void HtmlGenerator::endParameterName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2535 of file htmlgen.cpp.

2536{
2537 DBG_HTML(m_t << "<!-- endParameterName -->\n";)
2538 m_t << "</em></span>";
2539}

References DBG_HTML, and OutputGenerator::m_t.

◆ endParameterType()

void HtmlGenerator::endParameterType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2523 of file htmlgen.cpp.

2524{
2525 DBG_HTML(m_t << "<!-- endParameterType -->\n";)
2526 m_t << "</td>";
2527}

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

1783{
1784 m_t << "</h3>";
1785}

References OutputGenerator::m_t.

◆ endQuickIndices()

void HtmlGenerator::endQuickIndices ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3204 of file htmlgen.cpp.

3205{
3206 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3207 m_t << "</div><!-- top -->\n";
3208 if (!generateTreeView)
3209 {
3210 m_t << "<div id=\"doc-content\">\n";
3211 }
3212}

References Config_getBool, and OutputGenerator::m_t.

◆ endSection()

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

Implements OutputGenIntf.

Definition at line 2056 of file htmlgen.cpp.

2057{
2058 switch(type.level())
2059 {
2060 case SectionType::Page: m_t << "</h1>"; break;
2061 case SectionType::Section: m_t << "</h2>"; break;
2062 case SectionType::Subsection: m_t << "</h3>"; break;
2063 case SectionType::Subsubsection: m_t << "</h4>"; break;
2064 case SectionType::Paragraph: m_t << "</h5>"; break;
2065 case SectionType::Subparagraph: m_t << "</h6>"; break;
2066 case SectionType::Subsubparagraph: m_t << "</h6>"; break;
2067 default: ASSERT(0); break;
2068 }
2069}
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 1998 of file htmlgen.cpp.

1999{
2000 m_t << "</a>";
2001}

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

3559{
3560 endTitle();
3561 m_t << "</div>\n";
3562}
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 3857 of file htmlgen.cpp.

3858{
3859 SectionType type = si->type();
3860 int nextLevel = type.level();
3861 if (type.isSection() && nextLevel<=m_tocState.maxLevel)
3862 {
3863 m_t << "</a>\n";
3864 m_tocState.inLi[nextLevel]=true;
3865 m_tocState.level = nextLevel;
3866 }
3867}
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 2589 of file htmlgen.cpp.

2590{
2591 DBG_HTML(m_t << "<!-- exceptionEntry -->\n";)
2592 if (!closeBracket)
2593 {
2594 m_t << "</td>\n";
2595 m_t << " </tr>\n";
2596 m_t << " <tr>\n";
2597 m_t << " <td align=\"right\">";
2598 }
2599 // colspan 2 so it gets both parameter type and parameter name columns
2600 if (!prefix.empty())
2601 m_t << prefix << "</td><td>(</td><td colspan=\"2\">";
2602 else if (closeBracket)
2603 m_t << "&#160;)</td><td></td><td></td><td>";
2604 else
2605 m_t << "</td><td></td><td colspan=\"2\">";
2606}
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 3786 of file htmlgen.cpp.

3787{
3788 return substitute(s," ","&#160;");
3789}
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 3780 of file htmlgen.cpp.

3781{
3782 ResourceMgr &mgr = ResourceMgr::instance();
3783 return replaceVariables(mgr.getAsString("navtree.css"));
3784}
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:784

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

Referenced by init().

◆ init()

void HtmlGenerator::init ( )
static

Definition at line 1281 of file htmlgen.cpp.

1282{
1283 DString dname = Config_getString(HTML_OUTPUT);
1284 Dir d(dname.str());
1285 if (!d.exists() && !d.mkdir(dname.str()))
1286 {
1287 term("Could not create output directory {}\n",dname);
1288 }
1289 //writeLogo(dname);
1290 if (!Config_getString(HTML_HEADER).empty())
1291 {
1292 g_header_file=Config_getString(HTML_HEADER);
1295 //printf("g_header='%s'\n",qPrint(g_header));
1296 DString result = substituteHtmlKeywords(g_header_file,g_header,DString(),DString());
1297 checkBlocks(result,Config_getString(HTML_HEADER),htmlMarkerInfo);
1298 }
1299 else
1300 {
1301 g_header_file="header.html";
1304 DString result = substituteHtmlKeywords(g_header_file,g_header,DString(),DString());
1305 checkBlocks(result,"<default header.html>",htmlMarkerInfo);
1306 }
1307
1308 if (!Config_getString(HTML_FOOTER).empty())
1309 {
1310 g_footer_file=Config_getString(HTML_FOOTER);
1313 //printf("g_footer='%s'\n",qPrint(g_footer));
1314 DString result = substituteHtmlKeywords(g_footer_file,g_footer,DString(),DString());
1315 checkBlocks(result,Config_getString(HTML_FOOTER),htmlMarkerInfo);
1316 }
1317 else
1318 {
1319 g_footer_file = "footer.html";
1322 DString result = substituteHtmlKeywords(g_footer_file,g_footer,DString(),DString());
1323 checkBlocks(result,"<default footer.html>",htmlMarkerInfo);
1324 }
1325
1326 if (Config_getBool(USE_MATHJAX))
1327 {
1328 if (!Config_getString(MATHJAX_CODEFILE).empty())
1329 {
1330 g_mathjax_code=fileToString(Config_getString(MATHJAX_CODEFILE));
1331 //printf("g_mathjax_code='%s'\n",qPrint(g_mathjax_code));
1332 }
1334 //printf("converted g_latex_macro='%s'\n",qPrint(g_latex_macro));
1335 }
1336 createSubDirs(d);
1337
1339
1340 ResourceMgr &mgr = ResourceMgr::instance();
1341
1342 {
1343 DString tabsCss;
1344 if (Config_getBool(HTML_DYNAMIC_MENUS))
1345 {
1346 tabsCss = mgr.getAsString("tabs.css");
1347 }
1348 else // stylesheet for the 'old' static tabs
1349 {
1350 tabsCss = mgr.getAsString("fixed_tabs.css");
1351 }
1352
1353 std::ofstream f = Portable::openOutputStream(dname+"/tabs.css");
1354 if (f.is_open())
1355 {
1356 TextStream t(&f);
1357 t << replaceVariables(tabsCss);
1358 }
1359 }
1360
1361
1362 if (Config_getBool(INTERACTIVE_SVG))
1363 {
1364 mgr.copyResource("svg.min.js",dname);
1365 }
1366
1367 if (!Config_getBool(DISABLE_INDEX) && Config_getBool(HTML_DYNAMIC_MENUS))
1368 {
1369 mgr.copyResource("menu.js",dname);
1370 }
1371
1372 // copy navtree.css
1373 {
1374 std::ofstream f = Portable::openOutputStream(dname+"/navtree.css");
1375 if (f.is_open())
1376 {
1377 TextStream t(&f);
1378 t << getNavTreeCss();
1379 }
1380 }
1381
1382 if (Config_getBool(HTML_COPY_CLIPBOARD))
1383 {
1384 std::ofstream f = Portable::openOutputStream(dname+"/clipboard.js");
1385 if (f.is_open())
1386 {
1387 TextStream t(&f);
1388 t << substitute(mgr.getAsString("clipboard.js"),"$copy_to_clipboard_text",theTranslator->trCopyToClipboard());
1389 }
1390 }
1391
1392 bool hasCookie = Config_getBool(GENERATE_TREEVIEW) || Config_getBool(SEARCHENGINE) || Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE;
1393 if (hasCookie)
1394 {
1395 mgr.copyResource("cookie.js",dname);
1396 }
1397
1398 if (Config_getBool(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1399 {
1400 std::ofstream f = Portable::openOutputStream(dname+"/darkmode_toggle.js");
1401 if (f.is_open())
1402 {
1403 TextStream t(&f);
1404 t << substitute(replaceColorMarkers(mgr.getAsString("darkmode_toggle.js")),
1405 "$PROJECTID",getProjectId());
1406 }
1407 }
1408
1409 if (useDynamicSections())
1410 {
1411 std::ofstream f = Portable::openOutputStream(dname+"/dynsections.js");
1412 if (f.is_open())
1413 {
1414 TextStream t(&f);
1415 if (Config_getBool(HTML_DYNAMIC_SECTIONS) ||
1416 (Config_getBool(OBFUSCATE_EMAILS) && !Config_getBool(GENERATE_HTMLHELP)))
1417 {
1418 t << replaceVariables(mgr.getAsString("dynsections.js"));
1419 }
1420 if (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS))
1421 {
1422 t << replaceVariables(mgr.getAsString("dynsections_tooltips.js"));
1423 }
1424 }
1425 }
1426 if (Config_getBool(HTML_CODE_FOLDING))
1427 {
1428 std::ofstream f = Portable::openOutputStream(dname+"/codefolding.js");
1429 if (f.is_open())
1430 {
1431 TextStream t(&f);
1432 t << replaceVariables(mgr.getAsString("codefolding.js"));
1433 }
1434 }
1435}
static DString getNavTreeCss()
Definition htmlgen.cpp:3780
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:1272
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:308
static bool useDynamicSections()
Definition htmlgen.cpp:70
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:770
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:143
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:4578
DString getProjectId()
Definition util.cpp:5301
void createSubDirs(const Dir &d)
Definition util.cpp:2975
void checkBlocks(const DString &s, const DString fileName, const SelectionMarkerInfo &markerInfo)
Definition util.cpp:5139
DString fileToString(const DString &name, bool filter, bool isSourceCode)
Definition util.cpp:1058

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, Translator::trCopyToClipboard(), and useDynamicSections().

Referenced by generateOutput().

◆ insertMemberAlign()

void HtmlGenerator::insertMemberAlign ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2303 of file htmlgen.cpp.

2304{
2305 DBG_HTML(m_t << "<!-- insertMemberAlign -->\n")
2306 m_t << "&#160;</td><td class=\"memItemRight\">";
2307}

References DBG_HTML, and OutputGenerator::m_t.

Referenced by endMemberItem().

◆ insertMemberAlignLeft()

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

Implements OutputGenIntf.

Definition at line 2309 of file htmlgen.cpp.

2310{
2311 if (!initTag) m_t << "&#160;</td>";
2312 switch (type)
2313 {
2314 case MemberItemType::Normal: m_t << "<td class=\"memItemLeft\">"; break;
2315 case MemberItemType::AnonymousStart: m_t << "<td class=\"memItemLeft anon\">"; break;
2316 case MemberItemType::AnonymousEnd: m_t << "<td class=\"memItemLeft anonEnd\">"; break;
2317 case MemberItemType::Templated: m_t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
2318 }
2319}

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

3536{
3537 if (!style.empty())
3538 {
3539 m_t << "<br class=\"" << style << "\" />\n";
3540 }
3541 else
3542 {
3543 m_t << "<br />\n";
3544 }
3545}

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

◆ operator=() [1/2]

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

Definition at line 1247 of file htmlgen.cpp.

1248{
1249 //printf("%p:HtmlGenerator(copy assign %p)\n",(void*)this,(void*)&og);
1250 if (this!=&og)
1251 {
1252 m_dir = og.m_dir;
1253 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
1254 m_codeGen = m_codeList->get<HtmlCodeGenerator>(OutputType::Html);
1258 m_relPath = og.m_relPath;
1261 }
1262 return *this;
1263}

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

2690{
2692}
static void startSectionHeader(TextStream &t, const DString &relPath, int sectionCount)
Definition htmlgen.cpp:2123

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

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

◆ startCompoundTemplateParams()

void HtmlGenerator::startCompoundTemplateParams ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2293 of file htmlgen.cpp.

2294{
2295 m_t << "<div class=\"compoundTemplParams\">";
2296}

References OutputGenerator::m_t.

◆ startConstraintDocs()

void HtmlGenerator::startConstraintDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3517 of file htmlgen.cpp.

3518{
3519 m_t << "<td>&#160;";
3520}

References OutputGenerator::m_t.

◆ startConstraintList()

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

Implements OutputGenIntf.

Definition at line 3490 of file htmlgen.cpp.

3491{
3492 m_t << "<div class=\"typeconstraint\">\n";
3493 m_t << "<dl><dt><b>" << header << "</b></dt><dd>\n";
3494 m_t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n";
3495}

References OutputGenerator::m_t.

◆ startConstraintParam()

void HtmlGenerator::startConstraintParam ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3497 of file htmlgen.cpp.

3498{
3499 m_t << "<tr><td valign=\"top\"><em>";
3500}

References OutputGenerator::m_t.

◆ startConstraintType()

void HtmlGenerator::startConstraintType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3507 of file htmlgen.cpp.

3508{
3509 m_t << "<td>&#160;:</td><td valign=\"top\"><em>";
3510}

References OutputGenerator::m_t.

◆ startContents()

void HtmlGenerator::startContents ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3258 of file htmlgen.cpp.

3259{
3260 m_t << "<div class=\"contents\">\n";
3261}

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

2784{
2785 m_t << "<table class=\"fieldtable\">\n"
2786 << "<tr><th colspan=\"" << (hasInits?3:2) << "\">" << title << "</th></tr>";
2787}

References OutputGenerator::m_t.

◆ startDescTableData()

void HtmlGenerator::startDescTableData ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2823 of file htmlgen.cpp.

2824{
2825 m_t << "<td class=\"fielddoc\">";
2826}

References OutputGenerator::m_t.

◆ startDescTableInit()

void HtmlGenerator::startDescTableInit ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2813 of file htmlgen.cpp.

2814{
2815 m_t << "<td class=\"fieldinit\">";
2816}

References OutputGenerator::m_t.

◆ startDescTableRow()

void HtmlGenerator::startDescTableRow ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2793 of file htmlgen.cpp.

2794{
2795 m_t << "<tr>";
2796}

References OutputGenerator::m_t.

◆ startDescTableTitle()

void HtmlGenerator::startDescTableTitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2803 of file htmlgen.cpp.

2804{
2805 m_t << "<td class=\"fieldname\">";
2806}

References OutputGenerator::m_t.

◆ startDirDepGraph()

void HtmlGenerator::startDirDepGraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2707 of file htmlgen.cpp.

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

◆ startDotGraph()

void HtmlGenerator::startDotGraph ( )
overridevirtual

Implements OutputGenIntf.

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

1867{
1868 m_t << "<a id=\"" << anchor << "\" name=\"" << anchor << "\"></a>";
1869}

References OutputGenerator::m_t.

◆ startEmbeddedDoc()

void HtmlGenerator::startEmbeddedDoc ( size_t indent)
overridevirtual

Implements OutputGenIntf.

Definition at line 3635 of file htmlgen.cpp.

3636{
3637 DBG_HTML(m_t << "<!-- startEmbeddedDoc -->\n";)
3638 m_t << "<div class=\"embeddoc indent-" << indent << "\">";
3639}

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

2834{
2835 m_t << "<dl class=\"section examples\"><dt>";
2837 m_t << "</dt>";
2838}
void docify(const DString &text) override
Definition htmlgen.cpp:2071
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 1643 of file htmlgen.cpp.

1645{
1646 //printf("HtmlGenerator::startFile(%s)\n",qPrint(name));
1648 DString fileName = name;
1650 m_lastTitle=title;
1651
1655 {
1656 std::lock_guard<std::mutex> lock(g_indexLock);
1658 }
1659
1662
1663 m_t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
1664 << getDoxygenVersion() << " -->\n";
1665
1666 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
1667 bool searchEngine = Config_getBool(SEARCHENGINE);
1668 bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
1669 bool disableIndex = Config_getBool(DISABLE_INDEX);
1670 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
1671 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
1672
1673 m_t << "<script type=\"application/json\" id=\"doxygen-config\">\n";
1674 m_t << "{\n";
1675 m_t << " \"relPath\": \"" << m_relPath << "\",\n";
1676 m_t << " \"generateTreeView\": " << (generateTreeView?"true":"false") << ",\n";
1677 m_t << " \"searchEngine\": " << (searchEngine?"true":"false") << ",\n";
1678 m_t << " \"serverBasedSearch\": " << (serverBasedSearch?"true":"false") << ",\n";
1679 m_t << " \"disableIndex\": " << (disableIndex?"true":"false") << ",\n";
1680 m_t << " \"dynamicMenus\": " << (dynamicMenus?"true":"false") << ",\n";
1681 m_t << " \"fullSidebar\": " << (fullSidebar?"true":"false") << "\n";
1682 m_t << "}\n";
1683 m_t << "</script>\n";
1684
1685 if (searchEngine /*&& !generateTreeView*/)
1686 {
1687 m_t << "<script type=\"text/javascript\">\n";
1688 m_t << "let searchBox = new SearchBox(\"searchBox\", \""
1689 << m_relPath<< "search/\",'" << Doxygen::htmlFileExtension << "');\n";
1690 m_t << "</script>\n";
1691 }
1692 if (Config_getBool(HTML_CODE_FOLDING))
1693 {
1694 m_t << "<script type=\"text/javascript\">\n";
1695 m_t << "document.addEventListener('DOMContentLoaded', codefold.init);\n";
1696 m_t << "</script>\n";
1697 }
1699}
static IndexList * indexList
Definition doxygen.h:125
void setFileName(const DString fileName)
Definition htmlgen.h:29
void setRelativePath(const DString &path)
Definition htmlgen.cpp:843
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:1641
const char * name(int level)
Definition latexgen.h:368
DString filterTitle(const DString &title)
Definition util.cpp:4464
DString convertToHtml(const DString &s, bool keepEntities)
Definition util.cpp:3297
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3937
DString relativePathToRoot(const DString &name)
Definition util.cpp:2918

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

2004{
2005 if (extraIndentLevel==2)
2006 {
2007 m_t << "<h4";
2008 }
2009 else if (extraIndentLevel==1)
2010 {
2011 m_t << "<h3";
2012 }
2013 else // extraIndentLevel==0
2014 {
2015 m_t << "<h2";
2016 }
2017 if (!id.empty())
2018 {
2019 m_t <<" id=\"header-"+convertToId(id)+"\"";
2020 }
2021 m_t << " class=\"groupheader\">";
2022}

References convertToId(), and OutputGenerator::m_t.

◆ startHeaderSection()

void HtmlGenerator::startHeaderSection ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3547 of file htmlgen.cpp.

3548{
3549 m_t << "<div class=\"header\">\n";
3550}

References OutputGenerator::m_t.

◆ startInclDepGraph()

void HtmlGenerator::startInclDepGraph ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2653 of file htmlgen.cpp.

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

◆ startIndent()

void HtmlGenerator::startIndent ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2758 of file htmlgen.cpp.

2759{
2760 DBG_HTML(m_t << "<!-- startIndent -->\n";)
2761
2762 m_t << "<div class=\"memdoc\">\n";
2763}

References DBG_HTML, and OutputGenerator::m_t.

◆ startIndexItem()

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

Implements OutputGenIntf.

Definition at line 1907 of file htmlgen.cpp.

1908{
1909 //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
1910 if (!ref.empty() || !f.empty())
1911 {
1912 if (!ref.empty())
1913 {
1914 m_t << "<a class=\"elRef\" ";
1916 }
1917 else
1918 {
1919 m_t << "<a class=\"el\" ";
1920 }
1921 m_t << "href=\"";
1922 m_t << externalRef(m_relPath,ref);
1923 if (!f.empty())
1924 {
1925 DString fn=f;
1927 m_t << fn;
1928 }
1929 m_t << "\">";
1930 }
1931 else
1932 {
1933 m_t << "<b>";
1934 }
1935}
DString externalLinkTarget(const bool parent)
Definition util.cpp:4501
DString externalRef(const DString &relPath, const DString &ref)
Definition util.cpp:4548

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

◆ startIndexKey()

void HtmlGenerator::startIndexKey ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2423 of file htmlgen.cpp.

2424{
2425 //m_t << " <tr><td class=\"indexkey\">";
2426}

◆ startIndexList()

void HtmlGenerator::startIndexList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2413 of file htmlgen.cpp.

2414{
2415 m_t << "<table>\n";
2416}

References OutputGenerator::m_t.

◆ startIndexListItem()

void HtmlGenerator::startIndexListItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 1897 of file htmlgen.cpp.

1898{
1899 m_t << "<li>";
1900}

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

2434{
2435 //m_t << "<td class=\"indexvalue\">";
2436}

◆ startInlineHeader()

void HtmlGenerator::startInlineHeader ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3569 of file htmlgen.cpp.

3570{
3571 if (m_emptySection)
3572 {
3573 m_t << "<table class=\"memberdecls memberdecls-inline\">\n";
3574 m_emptySection=false;
3575 }
3576 m_t << "<tr><th colspan=\"2\"><h3>";
3577}

References m_emptySection, and OutputGenerator::m_t.

◆ startInlineMemberDoc()

void HtmlGenerator::startInlineMemberDoc ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3623 of file htmlgen.cpp.

3624{
3625 DBG_HTML(m_t << "<!-- startInlineMemberDoc -->\n";)
3626 m_t << "<td class=\"fielddoc\">\n";
3627}

References DBG_HTML, and OutputGenerator::m_t.

◆ startInlineMemberName()

void HtmlGenerator::startInlineMemberName ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3611 of file htmlgen.cpp.

3612{
3613 DBG_HTML(m_t << "<!-- startInlineMemberName -->\n";)
3614 m_t << "<td class=\"fieldname\">\n";
3615}

References DBG_HTML, and OutputGenerator::m_t.

◆ startInlineMemberType()

void HtmlGenerator::startInlineMemberType ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 3599 of file htmlgen.cpp.

3600{
3601 DBG_HTML(m_t << "<!-- startInlineMemberType -->\n";)
3602 m_t << "<tr><td class=\"fieldtype\">\n";
3603}

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

3648{
3649 DBG_HTML(m_t << "<!-- startLabels -->\n";)
3650 m_t << "<span class=\"mlabels\">";
3651}

References DBG_HTML, and OutputGenerator::m_t.

◆ startLocalToc()

void HtmlGenerator::startLocalToc ( int level)
overridevirtual

Implements OutputGenIntf.

Definition at line 3791 of file htmlgen.cpp.

3792{
3793 m_tocState.level=0;
3795 m_tocState.maxLevel=level;
3796 m_tocState.inLi = BoolVector(level+1,false);
3797 m_t << "<div class=\"toc\">";
3798 m_t << "<h3>" << theTranslator->trRTFTableOfContents() << "</h3>\n";
3799}
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 2321 of file htmlgen.cpp.

2322{
2323 DBG_HTML(m_t << "<!-- startMemberDescription -->\n")
2324 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2325 if (m_emptySection)
2326 {
2327 m_t << "<table class=\"memberdecls\">\n";
2328 m_emptySection=false;
2329 }
2330 m_t << "<tr class=\"memdesc:" << anchor;
2331 if (!inheritId.empty())
2332 {
2333 if (dynamicSections) m_t << " inherit";
2334 m_t << " " << inheritId;
2335 }
2336 m_t << "\">";
2337 m_t << "<td class=\"mdescLeft\">&#160;</td>";
2338 if (typ) m_t << "<td class=\"mdescLeft\">&#160;</td>";
2339 m_t << "<td class=\"mdescRight\">";
2340}

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

2456{
2457 DBG_HTML(m_t << "<!-- startMemberDoc -->\n";)
2458 m_t << "\n<h2 class=\"memtitle\">"
2459 << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&#160;</a></span>";
2460 docify(title);
2461 if (memTotal>1)
2462 {
2463 m_t << " <span class=\"overload\">[" << memCount << "/" << memTotal <<"]</span>";
2464 }
2465 m_t << "</h2>\n";
2466 m_t << "\n<div class=\"memitem\">\n";
2467 m_t << "<div class=\"memproto\">\n";
2468}

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

◆ startMemberDocList()

void HtmlGenerator::startMemberDocList ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2443 of file htmlgen.cpp.

2444{
2445 DBG_HTML(m_t << "<!-- startMemberDocList -->\n";)
2446}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberDocName()

void HtmlGenerator::startMemberDocName ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2482 of file htmlgen.cpp.

2483{
2484 DBG_HTML(m_t << "<!-- startMemberDocName -->\n";)
2485
2486 m_t << " <table class=\"memname\">\n";
2487
2488 m_t << " <tr>\n";
2489 m_t << " <td class=\"memname\">";
2490}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberDocPrefixItem()

void HtmlGenerator::startMemberDocPrefixItem ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2470 of file htmlgen.cpp.

2471{
2472 DBG_HTML(m_t << "<!-- startMemberDocPrefixItem -->\n";)
2473 m_t << "<div class=\"memtemplate\">\n";
2474}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberDocSimple()

void HtmlGenerator::startMemberDocSimple ( bool isEnum)
overridevirtual

Implements OutputGenIntf.

Definition at line 3584 of file htmlgen.cpp.

3585{
3586 DBG_HTML(m_t << "<!-- startMemberDocSimple -->\n";)
3587 m_t << "<table class=\"fieldtable\">\n";
3588 m_t << "<tr><th colspan=\"" << (isEnum?"2":"3") << "\">";
3589 m_t << (isEnum? theTranslator->trEnumerationValues() :
3590 theTranslator->trCompoundMembers()) << "</th></tr>\n";
3591}
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 2750 of file htmlgen.cpp.

2751{
2752}

◆ startMemberGroupDocs()

void HtmlGenerator::startMemberGroupDocs ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2740 of file htmlgen.cpp.

2741{
2742 m_t << "<tr><td colspan=\"2\" class=\"ititle\"><div class=\"groupText\">";
2743}

References OutputGenerator::m_t.

◆ startMemberGroupHeader()

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

Implements OutputGenIntf.

Definition at line 2730 of file htmlgen.cpp.

2731{
2732 m_t << "<tr id=\"" << id << "\" class=\"groupHeader\"><td colspan=\"2\"><div class=\"groupHeader\">";
2733}

References OutputGenerator::m_t.

◆ startMemberHeader()

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

Implements OutputGenIntf.

Definition at line 2365 of file htmlgen.cpp.

2366{
2367 DBG_HTML(m_t << "<!-- startMemberHeader -->\n")
2368 if (!m_emptySection)
2369 {
2370 m_t << "</table>";
2371 m_emptySection=true;
2372 }
2373 if (m_emptySection)
2374 {
2375 m_t << "<table class=\"memberdecls\">\n";
2376 m_emptySection=false;
2377 }
2378 m_t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2";
2379 if (!anchor.empty())
2380 {
2381 m_t << " id=\"header-" << anchor << "\"";
2382 }
2383 m_t << " class=\"groupheader\">";
2384 if (!anchor.empty())
2385 {
2386 m_t << "<a id=\"" << anchor << "\" name=\"" << anchor << "\"></a>\n";
2387 }
2388}

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

2244{
2245 DBG_HTML(m_t << "<!-- startMemberItem() -->\n")
2246 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
2247 if (m_emptySection)
2248 {
2249 m_t << "<table class=\"memberdecls\">\n";
2250 m_emptySection=false;
2251 }
2252 m_t << "<tr class=\"memitem:" << convertToId(anchor);
2253 if (!inheritId.empty())
2254 {
2255 if (dynamicSections) m_t << " inherit";
2256 m_t << " " << inheritId;
2257 }
2258 m_t << "\"";
2259 if (!anchor.empty())
2260 {
2261 m_t << " id=\"r_" << convertToId(anchor) << "\"";
2262 }
2263 m_t << ">";
2265}
void insertMemberAlignLeft(MemberItemType, bool) override
Definition htmlgen.cpp:2309

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

2230{
2231 DBG_HTML(m_t << "<!-- startMemberList -->\n")
2232}

References DBG_HTML, and OutputGenerator::m_t.

◆ startMemberSections()

void HtmlGenerator::startMemberSections ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2348 of file htmlgen.cpp.

2349{
2350 DBG_HTML(m_t << "<!-- startMemberSections -->\n")
2351 m_emptySection=true; // we postpone writing <table> until we actually
2352 // write a row to prevent empty tables, which
2353 // are not valid XHTML!
2354}

References DBG_HTML, m_emptySection, and OutputGenerator::m_t.

◆ startMemberSubtitle()

void HtmlGenerator::startMemberSubtitle ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2396 of file htmlgen.cpp.

2397{
2398 DBG_HTML(m_t << "<!-- startMemberSubtitle -->\n")
2399 if (m_emptySection)
2400 {
2401 m_t << "<table class=\"memberdecls\">\n";
2402 m_emptySection=false;
2403 }
2404 m_t << "<tr><td class=\"ititle\" colspan=\"2\">";
2405}

References DBG_HTML, m_emptySection, and OutputGenerator::m_t.

◆ startMemberTemplateParams()

void HtmlGenerator::startMemberTemplateParams ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2276 of file htmlgen.cpp.

2277{
2278}

◆ startPageDoc()

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

Implements OutputGenIntf.

Definition at line 3268 of file htmlgen.cpp.

3269{
3270 m_t << "<div>";
3271}

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

1880{
1881 if (!classDef.empty())
1882 m_t << "\n<p class=\"" << classDef << "\">";
1883 else
1884 m_t << "\n<p>";
1885}

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

◆ startParameterDefVal()

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

Implements OutputGenIntf.

Definition at line 2570 of file htmlgen.cpp.

2571{
2572 m_t << "<span class=\"paramdefsep\">";
2573 docify(s);
2574 m_t << "</span><span class=\"paramdefval\">";
2575}

References docify(), and OutputGenerator::m_t.

◆ startParameterExtra()

void HtmlGenerator::startParameterExtra ( )
overridevirtual

Implements OutputGenIntf.

Definition at line 2541 of file htmlgen.cpp.

2542{
2543 DBG_HTML(m_t << "<!-- startParameterExtra -->\n";)
2544}

References DBG_HTML, and OutputGenerator::m_t.

◆ startParameterList()

void HtmlGenerator::startParameterList ( bool openBracket)
overridevirtual

Implements OutputGenIntf.

Definition at line 2498 of file htmlgen.cpp.

2499{
2500 DBG_HTML(m_t << "<!-- startParameterList -->\n";)
2501 m_t << " <td>";
2502 if (openBracket) m_t << "(";
2503 m_t << "</td>\n";
2504}

References DBG_HTML, and OutputGenerator::m_t.

◆ startParameterName()

void HtmlGenerator::startParameterName ( bool )
overridevirtual

Implements OutputGenIntf.

Definition at line 2529 of file htmlgen.cpp.

2530{
2531 DBG_HTML(m_t << "<!-- startParameterName -->\n";)
2532 m_t << " <td class=\"paramname\"><span class=\"paramname\"><em>";
2533}

References DBG_HTML, and OutputGenerator::m_t.

◆ startParameterType()

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

Implements OutputGenIntf.

Definition at line 2506 of file htmlgen.cpp.

2507{
2508 if (first)
2509 {
2510 DBG_HTML(m_t << "<!-- startFirstParameterType -->\n";)
2511 m_t << " <td class=\"paramtype\">";
2512 }
2513 else
2514 {
2515 DBG_HTML(m_t << "<!-- startParameterType -->\n";)
2516 m_t << " <tr>\n";
2517 m_t << " <td class=\"paramkey\">" << key << "</td>\n";
2518 m_t << " <td></td>\n";
2519 m_t << " <td class=\"paramtype\">";
2520 }
2521}

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

1778{
1779 m_t << "<h3 class=\"version\">";
1780}

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

2041{
2042 switch(type.level())
2043 {
2044 case SectionType::Page: m_t << "\n\n<h1 class=\"doxsection\">"; break;
2045 case SectionType::Section: m_t << "\n\n<h2 class=\"doxsection\">"; break;
2046 case SectionType::Subsection: m_t << "\n\n<h3 class=\"doxsection\">"; break;
2047 case SectionType::Subsubsection: m_t << "\n\n<h4 class=\"doxsection\">"; break;
2048 case SectionType::Paragraph: m_t << "\n\n<h5 class=\"doxsection\">"; break;
2049 case SectionType::Subparagraph: m_t << "\n\n<h6 class=\"doxsection\">"; break;
2050 case SectionType::Subsubparagraph: m_t << "\n\n<h6 class=\"doxsection\">"; break;
2051 default: ASSERT(0); break;
2052 }
2053 m_t << "<a id=\"" << lab << "\" name=\"" << lab << "\"></a>";
2054}

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

1987{
1988 m_t << "<a href=\"";
1989 DString fn = f;
1992 fileName() == Config_getString(HTML_OUTPUT)+"/"+fn,
1993 fn,
1994 anchor);
1995 m_t << "\">";
1996}
DString createHtmlUrl(const DString &relPath, const DString &ref, bool isLocalFile, const DString &targetFileName, const DString &anchor)
Definition util.cpp:4512

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

3553{
3554 m_t << " <div class=\"headertitle\">";
3555 startTitle();
3556}
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 3813 of file htmlgen.cpp.

3814{
3815 SectionType type = si->type();
3816 if (type.isSection())
3817 {
3818 //printf(" level=%d title=%s maxLevel=%d\n",level,qPrint(si->title()),maxLevel);
3819 int nextLevel = type.level();
3820 if (nextLevel>m_tocState.level)
3821 {
3822 for (int l=m_tocState.level;l<nextLevel;l++)
3823 {
3824 if (l < m_tocState.maxLevel)
3825 {
3826 m_tocState.incIndent(m_t,"<ul>");
3827 char cs[2] = { static_cast<char>('0'+l+1), 0 };
3828 const char *empty = (l!=nextLevel-1) ? " empty" : "";
3829 m_tocState.incIndent(m_t,"<li class=\"level" + DString(cs) + empty + "\">");
3830 }
3831 }
3832 }
3833 else if (nextLevel<m_tocState.level)
3834 {
3835 for (int l=m_tocState.level;l>nextLevel;l--)
3836 {
3837 if (l <= m_tocState.maxLevel) m_tocState.decIndent(m_t,"</li>");
3838 m_tocState.inLi[l] = false;
3839 if (l <= m_tocState.maxLevel) m_tocState.decIndent(m_t,"</ul>");
3840 }
3841 }
3842 if (nextLevel <= m_tocState.maxLevel)
3843 {
3844 if (m_tocState.inLi[nextLevel] || m_tocState.level>nextLevel)
3845 {
3846 m_tocState.decIndent(m_t,"</li>");
3847 char cs[2] = { static_cast<char>('0'+nextLevel), 0 };
3848 m_tocState.incIndent(m_t,"<li class=\"level" + DString(cs) + "\">");
3849 }
3850 DString label = si->label();
3852 m_t << "<a href=\"#"+label+"\">";
3853 }
3854 }
3855}
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 2113 of file htmlgen.cpp.

2114{
2115 char cs[2];
2116 cs[0]=c;
2117 cs[1]=0;
2118 docify(cs);
2119}

References docify().

◆ writeDoc()

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

Implements OutputGenIntf.

Definition at line 2845 of file htmlgen.cpp.

2846{
2847 const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST*>(ast);
2848 if (astImpl && sectionLevel<=m_tocState.maxLevel)
2849 {
2850 m_codeList->setId(id);
2851 HtmlDocVisitor visitor(m_t,*m_codeList,ctx,fileName());
2852 std::visit(visitor,astImpl->root);
2853 }
2854}
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 3383 of file htmlgen.cpp.

3384{
3385 bool disableIndex = Config_getBool(DISABLE_INDEX);
3386 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3387 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3388 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3389 DString dname = Config_getString(HTML_OUTPUT);
3390 DString fileName = dname+"/search"+Doxygen::htmlFileExtension;
3391 std::ofstream f = Portable::openOutputStream(fileName);
3392 if (f.is_open())
3393 {
3394 TextStream t(&f);
3396
3397 t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
3398 << getDoxygenVersion() << " -->\n";
3399 t << "<script type=\"text/javascript\">\n";
3400 t << "let searchBox = new SearchBox(\"searchBox\", \""
3401 << "search/\",'" << Doxygen::htmlFileExtension << "');\n";
3402 t << "</script>\n";
3403
3404 if (!disableIndex && !quickLinksAfterSplitbar)
3405 {
3406 writeDefaultQuickLinks(t,HighlightedItem::Search,DString(),DString(),false);
3407 }
3408 if (generateTreeView)
3409 {
3410 t << "</div><!-- top -->\n";
3411 }
3412 t << writeSplitBarAsString("search.php",DString(),DString());
3413 if (quickLinksAfterSplitbar)
3414 {
3415 writeDefaultQuickLinks(t,HighlightedItem::Search,DString(),DString(),false);
3416 }
3417
3418 t << "<div class=\"header\">\n";
3419 t << " <div class=\"headertitle\">\n";
3420 t << " <div class=\"title\">" << theTranslator->trSearchResultsTitle() << "</div>\n";
3421 t << " </div>\n";
3422 t << "</div>\n";
3423 t << "<div class=\"contents\">\n";
3424
3425 t << "<div id=\"searchresults\"></div>\n";
3426 t << "</div>\n";
3427
3428 if (generateTreeView)
3429 {
3430 t << "</div><!-- doc-content -->\n";
3431 t << "</div><!-- container -->\n";
3432 }
3433
3434 writePageFooter(t,"Search","","");
3435
3436 }
3437 f.close();
3438
3439 DString scriptName = dname+"/search/search.js";
3440 f = Portable::openOutputStream(scriptName);
3441 if (f.is_open())
3442 {
3443 TextStream t(&f);
3444 t << "const searchResultsText=["
3445 << "\"" << theTranslator->trSearchResults(0) << "\","
3446 << "\"" << theTranslator->trSearchResults(1) << "\","
3447 << "\"" << theTranslator->trSearchResults(2) << "\"];\n";
3448 t << "const serverUrl=\"" << Config_getString(SEARCHENGINE_URL) << "\";\n";
3449 t << "const tagMap = {\n";
3450 bool first=true;
3451 // add search mappings
3452 StringVector extraSearchMappings = Config_getList(EXTRA_SEARCH_MAPPINGS);
3453 for (const auto &ml : extraSearchMappings)
3454 {
3455 DString mapLine(ml);
3456 if (size_t eqPos = mapLine.find('='); eqPos!=DString::npos) // tag command contains a destination
3457 {
3458 DString tagName = mapLine.left(eqPos).stripWhiteSpace();
3459 DString destName = mapLine.mid(eqPos+1).stripWhiteSpace();
3460 if (!tagName.empty())
3461 {
3462 if (!first) t << ",\n";
3463 t << " \"" << tagName << "\": \"" << destName << "\"";
3464 first=false;
3465 }
3466 }
3467 }
3468 if (!first) t << "\n";
3469 t << "};\n\n";
3470 t << ResourceMgr::instance().getAsString("extsearch.js");
3471 t << "\n";
3472 t << "document.addEventListener('DOMContentLoaded',() => {\n";
3473 t << " const query = trim(getURLParameter('query'));\n";
3474 t << " if (query) {\n";
3475 t << " searchFor(query,0,20);\n";
3476 t << " } else {\n";
3477 t << " const results = document.getElementById('searchresults');\n";
3478 t << " if (results) {\n";
3479 t << " results.innerHTML = '<p>" << theTranslator->trSearchResults(0) << "</p>';\n";
3480 t << " }\n";
3481 t << " }\n";
3482 t << "});\n";
3483 }
3484 else
3485 {
3486 err("Failed to open file '{}' for writing...\n",scriptName);
3487 }
3488}
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:1761
static DString writeSplitBarAsString(const DString &name, const DString &relpath, const DString &allMembersFile)
Definition htmlgen.cpp:3214
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:3067
#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 1767 of file htmlgen.cpp.

1768{
1770}

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

◆ writeFooterFile()

void HtmlGenerator::writeFooterFile ( TextStream & t)
static

Definition at line 1635 of file htmlgen.cpp.

1636{
1637 t << "<!-- HTML footer for doxygen " << getDoxygenVersion() << "-->\n";
1638 t << ResourceMgr::instance().getAsString("footer.html");
1639}

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

Referenced by readConfiguration().

◆ writeGraphicalHierarchy()

void HtmlGenerator::writeGraphicalHierarchy ( DotGfxHierarchyTable & g)
overridevirtual

Implements OutputGenIntf.

Definition at line 2725 of file htmlgen.cpp.

2726{
2727 g.writeGraph(m_t,dir(),fileName());
2728}
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 1629 of file htmlgen.cpp.

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

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

3703{
3704 DBG_HTML(m_t << "<!-- writeInheritedSectionTitle -->\n";)
3705 bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
3706 DString a = anchor;
3707 if (!a.empty()) a.prepend("#");
3708 DString classLink = DString("<a class=\"el\" ");
3709 if (!ref.empty())
3710 {
3711 classLink+= externalLinkTarget();
3712 classLink += " href=\"";
3713 classLink+= externalRef(m_relPath,ref);
3714 }
3715 else
3716 {
3717 classLink += "href=\"";
3718 classLink+=m_relPath;
3719 }
3720 DString fn = file;
3722 classLink=classLink+fn+a;
3723 classLink+=DString("\">")+convertToHtml(name,false)+"</a>";
3724 m_t << "<tr class=\"inherit_header " << id << "\">";
3725 if (dynamicSections)
3726 {
3727 m_t << "<td colspan=\"2\" class=\"dyn-inherit\">";
3728 m_t << "<span class=\"dynarrow\"><span class=\"arrowhead closed\"></span></span>";
3729 }
3730 else
3731 {
3732 m_t << "<td colspan=\"2\">";
3733 }
3734 m_t << theTranslator->trInheritedFrom(convertToHtml(title,false),classLink)
3735 << "</td></tr>\n";
3736}
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 3653 of file htmlgen.cpp.

3654{
3655 DBG_HTML(m_t << "<!-- writeLabel(" << label << ") -->\n";)
3656
3657 auto convertLabelToClass = [](const std::string &lab) {
3658 DString input = convertUTF8ToLower(lab);
3659 DString result;
3660 size_t l=input.length();
3661 result.reserve(l);
3662
3663 // Create valid class selector, see 10.2 here https://www.w3.org/TR/selectors-3/#w3cselgrammar
3664 // ident [-]?{nmstart}{nmchar}*
3665 // nmstart [_a-z]|{nonascii}
3666 // nonascii [^\0-\177]
3667 // nmchar [_a-z0-9-]|{nonascii}
3668
3669 bool nmstart=false;
3670 for (size_t i=0; i<l; i++)
3671 {
3672 char c = input.at(i);
3673 if (static_cast<signed char>(c)<0 || (c>='a' && c<='z') || c=='_') // nmstart pattern
3674 {
3675 nmstart=true;
3676 result+=c;
3677 }
3678 else if (nmstart && (static_cast<signed char>(c)<0 || (c>='a' && c<='z') || (c>='0' && c<='9') || c=='_')) // nmchar pattern
3679 {
3680 result+=c;
3681 }
3682 else if (nmstart && (c==' ' || c=='-')) // show whitespace as -
3683 {
3684 result+='-';
3685 }
3686 }
3687 return result;
3688 };
3689
3690 m_t << "<span class=\"mlabel " << convertLabelToClass(label.stripWhiteSpace().str()) << "\">" << label << "</span>";
3691}
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 1756 of file htmlgen.cpp.

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

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

◆ writeLogoAsString()

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

Definition at line 1734 of file htmlgen.cpp.

1735{
1736 DString result;
1737 switch (Config_getEnum(TIMESTAMP))
1738 {
1739 case TIMESTAMP_t::NO:
1740 result = theTranslator->trGeneratedBy();
1741 break;
1742 default:
1743 result = theTranslator->trGeneratedAt("<span class=\"timestamp\"></span>",
1744 convertToHtml(Config_getString(PROJECT_NAME)));
1745 break;
1746 }
1747 result += "&#160;\n<a href=\"https://www.doxygen.org/index.html\">\n"
1748 "<img class=\"footer\" src=\"";
1749 result += path;
1750 result += "doxygen.svg\" width=\"104\" height=\"31\" alt=\"doxygen\"/></a> ";
1751 result += getDoxygenVersion();
1752 result += " ";
1753 return result;
1754}
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 3253 of file htmlgen.cpp.

3254{
3255 m_t << substitute(s,"$relpath^",m_relPath);
3256}

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

◆ writeNonBreakableSpace()

void HtmlGenerator::writeNonBreakableSpace ( int n)
overridevirtual

Implements OutputGenIntf.

Definition at line 2775 of file htmlgen.cpp.

2776{
2777 for (int i=0; i<n; i++)
2778 {
2779 m_t << "&#160;";
2780 }
2781}

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

1964{
1965 if (!ref.empty())
1966 {
1967 m_t << "<a class=\"elRef\" ";
1969 }
1970 else
1971 {
1972 m_t << "<a class=\"el\" ";
1973 }
1974 m_t << "href=\"";
1975 DString fn = f;
1978 fileName() == Config_getString(HTML_OUTPUT)+"/"+fn,
1979 fn,
1980 anchor);
1981 m_t << "\">";
1982 docify(name);
1983 m_t << "</a>";
1984}

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

1763{
1764 t << substituteHtmlKeywords(g_footer_file,g_footer,convertToHtml(lastTitle),relPath,navPath);
1765}

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

3766{
3767 m_t << "<div id=\"page-nav\" class=\"page-nav-panel\">\n";
3768 m_t << "<div id=\"page-nav-resize-handle\"></div>\n";
3769 m_t << "<div id=\"page-nav-tree\">\n";
3770 m_t << "<div id=\"page-nav-contents\">\n";
3771 m_t << "</div><!-- page-nav-contents -->\n";
3772 m_t << "</div><!-- page-nav-tree -->\n";
3773 m_t << "</div><!-- page-nav -->\n";
3774}

References OutputGenerator::m_t.

◆ writeQuickLinks()

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

Implements OutputGenIntf.

Definition at line 3278 of file htmlgen.cpp.

3279{
3280 writeDefaultQuickLinks(m_t,hli,file,m_relPath,extraTabs);
3281}

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

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

1729{
1731}
static void writeSearchInfoStatic(TextStream &t, const DString &relPath)
Definition htmlgen.cpp:1701

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

◆ writeSearchInfoStatic()

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

Definition at line 1701 of file htmlgen.cpp.

1702{
1703 bool searchEngine = Config_getBool(SEARCHENGINE);
1704 bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
1705 if (searchEngine && !serverBasedSearch)
1706 {
1707 t << "<!-- window showing the filter options -->\n";
1708 t << "<div id=\"MSearchSelectWindow\">\n";
1709 t << "</div>\n";
1710 t << "\n";
1711 t << "<!-- iframe showing the search results (closed by default) -->\n";
1712 t << "<div id=\"MSearchResultsWindow\">\n";
1713 t << "<div id=\"MSearchResults\">\n";
1714 t << "<div class=\"SRPage\">\n";
1715 t << "<div id=\"SRIndex\">\n";
1716 t << "<div id=\"SRResults\"></div>\n"; // here the results will be inserted
1717 t << "<div class=\"SRStatus\" id=\"Loading\">" << theTranslator->trLoading() << "</div>\n";
1718 t << "<div class=\"SRStatus\" id=\"Searching\">" << theTranslator->trSearching() << "</div>\n";
1719 t << "<div class=\"SRStatus\" id=\"NoMatches\">" << theTranslator->trNoMatches() << "</div>\n";
1720 t << "</div>\n"; // SRIndex
1721 t << "</div>\n"; // SRPage
1722 t << "</div>\n"; // MSearchResults
1723 t << "</div>\n"; // MSearchResultsWindow
1724 t << "\n";
1725 }
1726}
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 3284 of file htmlgen.cpp.

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

3249{
3250 m_t << writeSplitBarAsString(name,m_relPath,allMembersFile);
3251}

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

3215{
3216 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3217 DString result;
3218 // write split bar
3219 if (generateTreeView)
3220 {
3221 DString fn = name;
3223 if (!Config_getBool(FULL_SIDEBAR))
3224 {
3225 result += DString(
3226 "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n");
3227 }
3228 result+=
3229 " <div id=\"nav-tree\">\n"
3230 " <div id=\"nav-tree-contents\">\n"
3231 " <div id=\"nav-sync\" class=\"sync\"></div>\n"
3232 " </div>\n"
3233 " </div>\n"
3234 " <div id=\"splitbar\" class=\"ui-resizable-handle\">\n"
3235 " </div>\n"
3236 "</div>\n"
3237 "<script type=\"text/javascript\">\n"
3238 "document.addEventListener('DOMContentLoaded',() => { initNavTree('" + fn + "','" + relpath + "','" + allMembersFile + "'); });\n"
3239 "</script>\n";
3240 if (Config_getBool(DISABLE_INDEX) || !Config_getBool(FULL_SIDEBAR))
3241 {
3242 result+="<div id=\"container\">\n<div id=\"doc-content\">\n";
3243 }
3244 }
3245 return result;
3246}

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

1952{
1953 m_t << "<li>";
1954 if (!path.empty()) docify(path);
1955 DString fn = f;
1957 m_t << "<a class=\"el\" href=\"" << fn << "\">";
1958 docify(name);
1959 m_t << "</a> ";
1960}

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

◆ writeString()

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

Implements OutputGenIntf.

Definition at line 1892 of file htmlgen.cpp.

1893{
1894 m_t << text;
1895}

References OutputGenerator::m_t.

◆ writeStyleInfo()

void HtmlGenerator::writeStyleInfo ( int part)
overridevirtual

Implements OutputGenIntf.

Definition at line 1787 of file htmlgen.cpp.

1788{
1789 //printf("writeStyleInfo(%d)\n",part);
1790 if (part==0)
1791 {
1792 if (Config_getString(HTML_STYLESHEET).empty()) // write default style sheet
1793 {
1794 //printf("write doxygen.css\n");
1795 startPlainFile("doxygen.css");
1797 endPlainFile();
1798 Doxygen::indexList->addStyleSheetFile("doxygen.css");
1799 }
1800 else // write user defined style sheet
1801 {
1802 DString cssName=Config_getString(HTML_STYLESHEET);
1803 if (!cssName.startsWith("http:") && !cssName.startsWith("https:"))
1804 {
1805 FileInfo cssfi(cssName.str());
1806 if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
1807 {
1808 err("style sheet {} does not exist or is not readable!\n", Config_getString(HTML_STYLESHEET));
1809 }
1810 else
1811 {
1812 // convert style sheet to string
1813 DString fileStr = fileToString(cssName);
1814 // write the string into the output dir
1815 startPlainFile(cssfi.fileName());
1816 m_t << fileStr;
1817 endPlainFile();
1818 }
1819 Doxygen::indexList->addStyleSheetFile(cssfi.fileName());
1820 }
1821 }
1822 StringVector extraCssFiles = Config_getList(HTML_EXTRA_STYLESHEET);
1823 for (const auto &fileName : extraCssFiles)
1824 {
1825 if (!fileName.empty())
1826 {
1827 FileInfo fi(fileName);
1828 if (fi.exists())
1829 {
1830 Doxygen::indexList->addStyleSheetFile(fi.fileName());
1831 }
1832 }
1833 }
1834
1835 Doxygen::indexList->addStyleSheetFile("navtree.css");
1836
1837 if (useDynamicSections())
1838 {
1839 Doxygen::indexList->addStyleSheetFile("dynsections.js");
1840 }
1841 if (Config_getBool(HTML_CODE_FOLDING))
1842 {
1843 Doxygen::indexList->addStyleSheetFile("codefolding.js");
1844 }
1845
1846 if (Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1847 {
1848 Doxygen::indexList->addStyleSheetFile("darkmode_toggle.js");
1849 }
1850
1851 if (Config_getBool(INTERACTIVE_SVG))
1852 {
1854 }
1855
1856 if (!Config_getBool(DISABLE_INDEX) && Config_getBool(HTML_DYNAMIC_MENUS))
1857 {
1859 Doxygen::indexList->addStyleSheetFile("menudata.js");
1860 }
1861 }
1862}
bool startsWith(const char *s) const
Definition dstring.h:600
static void writeDefaultStyleSheet(TextStream &t)
Definition htmlgen.cpp:1506

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(), useDynamicSections(), and writeDefaultStyleSheet().

◆ writeStyleSheetFile()

void HtmlGenerator::writeStyleSheetFile ( TextStream & t)
static

Definition at line 1623 of file htmlgen.cpp.

1624{
1627}

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

3739{
3740 if (first)
3741 {
3742 m_t << " <div class=\"summary\">\n";
3743 }
3744 else
3745 {
3746 m_t << " &#124;\n";
3747 }
3748 m_t << "<a href=\"";
3749 if (!file.empty())
3750 {
3751 DString fn = file;
3753 m_t << m_relPath << fn;
3754 }
3755 else if (!anchor.empty())
3756 {
3757 m_t << "#";
3758 m_t << anchor;
3759 }
3760 m_t << "\">";
3761 m_t << title;
3762 m_t << "</a>";
3763}

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

1446{
1448 DString dname=Config_getString(HTML_OUTPUT);
1449 ResourceMgr &mgr = ResourceMgr::instance();
1450 mgr.copyResource("doxygen.svg",dname);
1451 Doxygen::indexList->addImageFile("doxygen.svg");
1452 if (Config_getBool(SEARCHENGINE) && Config_getBool(SERVER_BASED_SEARCH))
1453 {
1454 mgr.copyResource("MaterialSymbolsOutlined.min.woff2",dname);
1455 Doxygen::indexList->addImageFile("MaterialSymbolsOutlined.min.woff2");
1456 mgr.copyResource("MaterialSymbolsOutlined_LICENSE.txt",dname);
1457 Doxygen::indexList->addImageFile("MaterialSymbolsOutlined_LICENSE.txt");
1458 }
1459}
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: