summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/htmlgen.cpp19
-rw-r--r--src/htmlgen.h2
-rw-r--r--src/latexgen.cpp2
-rw-r--r--src/latexgen.h2
-rw-r--r--src/mangen.cpp2
-rw-r--r--src/mangen.h4
-rw-r--r--src/memberdef.cpp4
-rw-r--r--src/outputgen.h6
-rw-r--r--src/outputlist.h4
-rw-r--r--src/rtfgen.cpp2
-rw-r--r--src/rtfgen.h2
-rw-r--r--templates/html/doxygen.css2
13 files changed, 36 insertions, 19 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 657968e..83a29ed 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1013,13 +1013,13 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol)
// write examples
if (hasExamples() && m_impl->exampleSDict)
{
- ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
+ ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples());
ol.startDescForItem();
//ol.startParagraph();
writeExample(ol,m_impl->exampleSDict);
//ol.endParagraph();
ol.endDescForItem();
- ol.endSimpleSect();
+ ol.endSimpleSect(BaseOutputDocInterface::Examples);
}
//ol.newParagraph();
writeSourceDef(ol,name());
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 87bc10a..3f60ade 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1943,10 +1943,20 @@ void HtmlGenerator::endDescTableData()
t << "</td>";
}
-void HtmlGenerator::startSimpleSect(SectionTypes,
+void HtmlGenerator::startSimpleSect(SectionTypes sect,
const char *filename,const char *anchor,
const char *title)
{
+ if (sect == BaseOutputDocInterface::Examples)
+ {
+ QCString className;
+ className="examples";
+ t << "<dl class=\"" << className << "\"><dt>";
+ docify(title);
+ t << "</dt>" << endl;
+ return;
+ }
+
t << "<dl><dt><b>";
if (filename)
{
@@ -1959,8 +1969,13 @@ void HtmlGenerator::startSimpleSect(SectionTypes,
t << "</b></dt>";
}
-void HtmlGenerator::endSimpleSect()
+void HtmlGenerator::endSimpleSect(SectionTypes sect)
{
+ if (sect == BaseOutputDocInterface::Examples)
+ {
+ t << "</dl>" << endl;
+ return;
+ }
t << "</dl>";
}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 2d8d6e0..dad884f 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -249,7 +249,7 @@ class HtmlGenerator : public OutputGenerator
//void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; }
//void endDescList() { t << "</dl>"; }
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
- void endSimpleSect();
+ void endSimpleSect(SectionTypes);
void startParamList(ParamListTypes,const char *);
void endParamList();
//void writeDescItem() { t << "<dd>" << endl; }
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 474d368..a0390be 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -2110,7 +2110,7 @@ void LatexGenerator::startSimpleSect(SectionTypes,const char *file,
t << "]";
}
-void LatexGenerator::endSimpleSect()
+void LatexGenerator::endSimpleSect(SectionTypes)
{
t << "\\end{Desc}" << endl;
}
diff --git a/src/latexgen.h b/src/latexgen.h
index 07c4080..2820b98 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -236,7 +236,7 @@ class LatexGenerator : public OutputGenerator
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; }
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
- void endSimpleSect();
+ void endSimpleSect(SectionTypes);
void startParamList(ParamListTypes,const char *title);
void endParamList();
void startDescForItem() { t << "\\par" << endl; }
diff --git a/src/mangen.cpp b/src/mangen.cpp
index d23b2fe..99be1dc 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -665,7 +665,7 @@ void ManGenerator::startSimpleSect(SectionTypes,const char *,
paragraph=TRUE;
}
-void ManGenerator::endSimpleSect()
+void ManGenerator::endSimpleSect(SectionTypes)
{
}
diff --git a/src/mangen.h b/src/mangen.h
index 0413ffd..55c826d 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -170,7 +170,7 @@ class ManGenerator : public OutputGenerator
void startDescList(SectionTypes);
void endDescList() {}
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
- void endSimpleSect();
+ void endSimpleSect(SectionTypes);
void startParamList(ParamListTypes,const char *title);
void endParamList();
//void writeDescItem();
@@ -199,7 +199,7 @@ class ManGenerator : public OutputGenerator
void startDescTable(const char *t)
{ startSimpleSect(EnumValues,0,0,t); startDescForItem(); }
- void endDescTable() { endDescForItem(); endSimpleSect(); }
+ void endDescTable() { endDescForItem(); endSimpleSect(BaseOutputDocInterface::NONE); }
void startDescTableRow() {}
void endDescTableRow() {}
void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 819904f..83b2791 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -2309,11 +2309,11 @@ void MemberDef::_writeExamples(OutputList &ol)
// write the list of examples that use this member
if (hasExamples())
{
- ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
+ ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples());
ol.startDescForItem();
writeExample(ol,m_impl->exampleSDict);
ol.endDescForItem();
- ol.endSimpleSect();
+ ol.endSimpleSect(BaseOutputDocInterface::Examples);
}
}
diff --git a/src/outputgen.h b/src/outputgen.h
index 44d34b8..a8943c0 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -145,7 +145,9 @@ class BaseOutputDocInterface : public CodeOutputInterface
Since, Date, Bug, Note,
Warning, Par, Deprecated, Pre,
Post, Invar, Remark, Attention,
- Todo, Test, RCS, */ EnumValues,
+ Todo, Test, RCS, */
+ NONE,
+ EnumValues,
Examples
};
@@ -281,7 +283,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void startSimpleSect(SectionTypes t,const char *file,
const char *anchor,const char *title) = 0;
- virtual void endSimpleSect() = 0;
+ virtual void endSimpleSect(SectionTypes t = NONE) = 0;
virtual void startParamList(ParamListTypes t,const char *title) = 0;
virtual void endParamList() = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index 2e89101..07c5207 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -324,8 +324,8 @@ class OutputList : public OutputDocInterface
void startSimpleSect(SectionTypes t,const char *file,const char *anchor,
const char *title)
{ forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); }
- void endSimpleSect()
- { forall(&OutputGenerator::endSimpleSect); }
+ void endSimpleSect(SectionTypes t)
+ { forall(&OutputGenerator::endSimpleSect,t); }
void startParamList(ParamListTypes t,const char *title)
{ forall(&OutputGenerator::startParamList,t,title); }
void endParamList()
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 64da929..4dd4c10 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -2749,7 +2749,7 @@ void RTFGenerator::startSimpleSect(SectionTypes,const char *file,const char *anc
t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
-void RTFGenerator::endSimpleSect()
+void RTFGenerator::endSimpleSect(SectionTypes)
{
DBG_RTF(t << "{\\comment (endSimpleSect)}" << endl)
m_omitParagraph = FALSE;
diff --git a/src/rtfgen.h b/src/rtfgen.h
index bb3146a..ed2a351 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -165,7 +165,7 @@ class RTFGenerator : public OutputGenerator
const char *,const char *,const char *) {}
void startDescList(SectionTypes);
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
- void endSimpleSect();
+ void endSimpleSect(SectionTypes);
void startParamList(ParamListTypes,const char *);
void endParamList();
//void writeDescItem();
diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css
index 8e87381..83cee43 100644
--- a/templates/html/doxygen.css
+++ b/templates/html/doxygen.css
@@ -687,7 +687,7 @@ dl.reflist dd {
line-height: 14px;
}
-.params, .retval, .exception, .tparams {
+.params, .retval, .exception, .tparams, .examples {
margin-left: 0px;
padding-left: 0px;
}