Skip to content

Commit

Permalink
Bug 774138 - Please add HTML classes to "Definition at..." & "Referen…
Browse files Browse the repository at this point in the history
…ced by..." for CSS

Added class= to html output for "Definition at..." resulting in p.definition in the css file and for "Referenced by .. " and "References ..." resulting in p.definition in css file.
(also corrected some error messages).
  • Loading branch information
albert-github committed Nov 13, 2016
1 parent 5f01f78 commit d2593e5
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/definition.cpp
Expand Up @@ -933,7 +933,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
QCString lineStr;
lineStr.sprintf("%d",m_impl->body->startLine);
QCString anchorStr = getSourceAnchor();
ol.startParagraph();
ol.startParagraph("definition");
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
// write text left from linePos marker
Expand Down Expand Up @@ -1067,7 +1067,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
}
else
{
err("translation error: invalid markers in trDefinedInSourceFile()\n");
err("translation error: invalid markers in trDefinedAtLineInSourceFile()\n");
}
}
ol.popGeneratorState();
Expand Down Expand Up @@ -1152,7 +1152,7 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
{
members->sort();

ol.startParagraph();
ol.startParagraph("reference");
ol.parseText(text);
ol.docify(" ");

Expand Down
6 changes: 5 additions & 1 deletion src/filedef.cpp
Expand Up @@ -344,7 +344,7 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.disable(OutputGenerator::RTF);
}

ol.startParagraph();
ol.startParagraph("definition");
QCString refText = theTranslator->trDefinedInSourceFile();
int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this.
Expand All @@ -355,6 +355,10 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
else
{
err("translation error: invalid marker in trDefinedInSourceFile()\n");
}
ol.endParagraph();
//Restore settings, bug_738548
ol.popGeneratorState();
Expand Down
7 changes: 5 additions & 2 deletions src/htmlgen.cpp
Expand Up @@ -1052,9 +1052,12 @@ void HtmlGenerator::endDoxyAnchor(const char *,const char *)
// t << endl << "<p>" << endl;
//}

void HtmlGenerator::startParagraph()
void HtmlGenerator::startParagraph(const char *classDef)
{
t << endl << "<p>";
if (classDef)
t << endl << "<p class=\"" << classDef << "\">";
else
t << endl << "<p>";
}

void HtmlGenerator::endParagraph()
Expand Down
2 changes: 1 addition & 1 deletion src/htmlgen.h
Expand Up @@ -140,7 +140,7 @@ class HtmlGenerator : public OutputGenerator
void startTitle() { t << "<div class=\"title\">"; }
void endTitle() { t << "</div>"; }

void startParagraph();
void startParagraph(const char *classDef = NULL);
void endParagraph();
void writeString(const char *text);
void startIndexListItem();
Expand Down
2 changes: 1 addition & 1 deletion src/latexgen.cpp
Expand Up @@ -1256,7 +1256,7 @@ void LatexGenerator::newParagraph()
t << endl << endl;
}

void LatexGenerator::startParagraph()
void LatexGenerator::startParagraph(const char *)
{
t << endl << endl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/latexgen.h
Expand Up @@ -135,7 +135,7 @@ class LatexGenerator : public OutputGenerator
void endTitle() { t << "}"; }

void newParagraph();
void startParagraph();
void startParagraph(const char *classDef = NULL);
void endParagraph();
void writeString(const char *text);
void startIndexListItem() {}
Expand Down
2 changes: 1 addition & 1 deletion src/mangen.cpp
Expand Up @@ -208,7 +208,7 @@ void ManGenerator::newParagraph()
paragraph=TRUE;
}

void ManGenerator::startParagraph()
void ManGenerator::startParagraph(const char *)
{
if (!paragraph)
{
Expand Down
2 changes: 1 addition & 1 deletion src/mangen.h
Expand Up @@ -62,7 +62,7 @@ class ManGenerator : public OutputGenerator
void endTitle();

void newParagraph();
void startParagraph();
void startParagraph(const char *classDef = NULL);
void endParagraph();
void writeString(const char *text);
void startIndexListItem() {}
Expand Down
2 changes: 1 addition & 1 deletion src/outputgen.h
Expand Up @@ -188,7 +188,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
//virtual void newParagraph() = 0;

/*! Starts a new paragraph */
virtual void startParagraph() = 0;
virtual void startParagraph(const char *classDef = NULL) = 0;
/*! Ends a paragraph */
virtual void endParagraph() = 0;

Expand Down
4 changes: 2 additions & 2 deletions src/outputlist.h
Expand Up @@ -112,8 +112,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endTitle); }
//void newParagraph()
//{ forall(&OutputGenerator::newParagraph); }
void startParagraph()
{ forall(&OutputGenerator::startParagraph); }
void startParagraph(const char *classDef = NULL)
{ forall(&OutputGenerator::startParagraph,classDef); }
void endParagraph()
{ forall(&OutputGenerator::endParagraph); }
void writeString(const char *text)
Expand Down
2 changes: 1 addition & 1 deletion src/rtfgen.cpp
Expand Up @@ -2144,7 +2144,7 @@ void RTFGenerator::newParagraph()
m_omitParagraph = FALSE;
}

void RTFGenerator::startParagraph()
void RTFGenerator::startParagraph(const char *)
{
DBG_RTF(t << "{\\comment startParagraph}" << endl)
newParagraph();
Expand Down
2 changes: 1 addition & 1 deletion src/rtfgen.h
Expand Up @@ -62,7 +62,7 @@ class RTFGenerator : public OutputGenerator
void endTitle() {}

void newParagraph();
void startParagraph();
void startParagraph(const char *classDef = NULL);
void endParagraph();
void writeString(const char *text);
void startIndexListItem();
Expand Down
4 changes: 4 additions & 0 deletions templates/html/doxygen.css
Expand Up @@ -4,6 +4,10 @@ body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
}

p.reference, p.definition {
font: 400 14px/22px Roboto,sans-serif;
}

/* @group Heading Levels */

h1.groupheader {
Expand Down

0 comments on commit d2593e5

Please sign in to comment.