diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2010-09-20 18:19:55 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2010-09-20 18:19:55 (GMT) |
commit | 6dbef217c477d43fb61e90b429531ee109bf0e75 (patch) | |
tree | c3964e8a42bc4dfecf5a99d6de94650878e67a0f /src/htmldocvisitor.cpp | |
parent | 20bc00a80ad6bcda730a1762c3700c8f63fa16eb (diff) | |
download | Doxygen-6dbef217c477d43fb61e90b429531ee109bf0e75.zip Doxygen-6dbef217c477d43fb61e90b429531ee109bf0e75.tar.gz Doxygen-6dbef217c477d43fb61e90b429531ee109bf0e75.tar.bz2 |
Release-1.7.1-20100920
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r-- | src/htmldocvisitor.cpp | 103 |
1 files changed, 80 insertions, 23 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index a5900cc..7de6e52 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -638,14 +638,12 @@ static int getParagraphContext(DocPara *p,bool &isFirst,bool &isLast) case DocNode::Kind_AutoListItem: isFirst=TRUE; isLast =TRUE; - if (isFirst) t=1; - if (isLast) t=3; + t=1; // not used break; case DocNode::Kind_SimpleListItem: isFirst=TRUE; isLast =TRUE; - if (isFirst) t=1; - if (isLast) t=3; + t=1; // not used break; case DocNode::Kind_HtmlListItem: isFirst=isFirstChildNode((DocHtmlListItem*)p->parent(),p); @@ -1172,7 +1170,8 @@ void HtmlDocVisitor::visitPre(DocImage *img) } m_t << "<div align=\"center\">" << endl; m_t << "<img src=\"" << img->relPath() << img->name() << "\" alt=\"" - << baseName << "\"" << "/>" << endl; + << baseName << "\"" << htmlAttribsToString(img->attribs()) + << "/>" << endl; if (img->hasCaption()) { m_t << "<p><strong>"; @@ -1224,6 +1223,26 @@ void HtmlDocVisitor::visitPost(DocDotFile *df) m_t << "</div>" << endl; } +void HtmlDocVisitor::visitPre(DocMscFile *df) +{ + if (m_hide) return; + writeMscFile(df->file(),df->relPath(),df->context()); + m_t << "<div align=\"center\">" << endl; + if (df->hasCaption()) + { + m_t << "<p><strong>"; + } +} +void HtmlDocVisitor::visitPost(DocMscFile *df) +{ + if (m_hide) return; + if (df->hasCaption()) + { + m_t << "</strong></p>" << endl; + } + m_t << "</div>" << endl; +} + void HtmlDocVisitor::visitPre(DocLink *lnk) { if (m_hide) return; @@ -1312,25 +1331,33 @@ void HtmlDocVisitor::visitPre(DocParamSect *s) if (m_hide) return; forceEndParagraph(s); m_t << "<dl><dt><b>"; + QCString className; switch(s->type()) { case DocParamSect::Param: - m_t << theTranslator->trParameters(); break; + m_t << theTranslator->trParameters(); + className="params"; + break; case DocParamSect::RetVal: - m_t << theTranslator->trReturnValues(); break; + m_t << theTranslator->trReturnValues(); + className="retval"; + break; case DocParamSect::Exception: - m_t << theTranslator->trExceptions(); break; + m_t << theTranslator->trExceptions(); + className="exception"; + break; case DocParamSect::TemplateParam: /* TODO: add this m_t << theTranslator->trTemplateParam(); break; */ m_t << "Template Parameters"; break; + className="tparams"; default: ASSERT(0); } m_t << ":"; m_t << "</b></dt><dd>" << endl; - m_t << " <table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl; + m_t << " <table class=\"" << className << "\">" << endl; } void HtmlDocVisitor::visitPost(DocParamSect *s) @@ -1345,25 +1372,55 @@ void HtmlDocVisitor::visitPost(DocParamSect *s) void HtmlDocVisitor::visitPre(DocParamList *pl) { if (m_hide) return; - m_t << " <tr><td valign=\"top\">"; - if (pl->direction()!=DocParamSect::Unspecified) + m_t << " <tr>"; + DocParamSect *sect = 0; + if (pl->parent()->kind()==DocNode::Kind_ParamSect) { - m_t << "<tt>["; - if (pl->direction()==DocParamSect::In) - { - m_t << "in"; - } - else if (pl->direction()==DocParamSect::Out) + sect=(DocParamSect*)pl->parent(); + } + if (sect && sect->hasInOutSpecifier()) + { + m_t << "<td class=\"paramdir\">"; + if (pl->direction()!=DocParamSect::Unspecified) { - m_t << "out"; + m_t << "["; + if (pl->direction()==DocParamSect::In) + { + m_t << "in"; + } + else if (pl->direction()==DocParamSect::Out) + { + m_t << "out"; + } + else if (pl->direction()==DocParamSect::InOut) + { + m_t << "in,out"; + } + m_t << "]"; } - else if (pl->direction()==DocParamSect::InOut) + m_t << "</td>"; + } + if (sect && sect->hasTypeSpecifier()) + { + m_t << "<td class=\"paramtype\">"; + QListIterator<DocNode> li(pl->paramTypes()); + DocNode *type; + bool first=TRUE; + for (li.toFirst();(type=li.current());++li) { - m_t << "in,out"; + if (!first) m_t << " | "; else first=FALSE; + if (type->kind()==DocNode::Kind_Word) + { + visit((DocWord*)type); + } + else if (type->kind()==DocNode::Kind_LinkedWord) + { + visit((DocLinkedWord*)type); + } } - m_t << "]</tt> "; + m_t << "</td>"; } - m_t << "</td><td valign=\"top\"><em>"; + m_t << "<td class=\"paramname\">"; //QStrListIterator li(pl->parameters()); //const char *s; QListIterator<DocNode> li(pl->parameters()); @@ -1381,7 +1438,7 @@ void HtmlDocVisitor::visitPre(DocParamList *pl) visit((DocLinkedWord*)param); } } - m_t << "</em> </td><td>"; + m_t << "</td><td>"; } void HtmlDocVisitor::visitPost(DocParamList *) |