diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-09-25 13:05:36 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-09-25 13:05:36 (GMT) |
commit | bbcf980f4a694461bc9ea7bd2b92b8be3e1d4636 (patch) | |
tree | 5f64338de08ce72826ca0878c754638fed1587d4 /src | |
parent | d71a726489094c4fc1cf94f27a6eaa9a9f56a538 (diff) | |
download | Doxygen-bbcf980f4a694461bc9ea7bd2b92b8be3e1d4636.zip Doxygen-bbcf980f4a694461bc9ea7bd2b92b8be3e1d4636.tar.gz Doxygen-bbcf980f4a694461bc9ea7bd2b92b8be3e1d4636.tar.bz2 |
Release-1.7.5.1-20110925
Diffstat (limited to 'src')
57 files changed, 1910 insertions, 1483 deletions
diff --git a/src/cite.cpp b/src/cite.cpp index 018d9cf..d19dfc1 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -75,10 +75,11 @@ bool CiteDict::writeAux() QFileInfo fi(bibFile); // open file (with .bib extension) if (fi.exists()) { - if (!copyFile(bibFile,m_baseFileName+"_"+bibFile)) + if (!copyFile(bibFile,m_baseFileName+"_"+fi.fileName().data())) { return FALSE; } + bibFile = fi.fileName().data(); if (bibFile.right(4)==".bib") { bibFile = bibFile.left(bibFile.length()-4); @@ -300,9 +301,17 @@ void CiteDict::resolve() { QCString bibFile = bibdata; if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; - if (!bibFile.isEmpty()) + QFileInfo fi(bibFile); + if (fi.exists()) + { + if (!bibFile.isEmpty()) + { + copyFile(bibFile,latexOutputDir+fi.fileName().data()); + } + } + else { - copyFile(bibFile,latexOutputDir+bibFile); + err("Error: bib file %s not found!\n",bibFile.data()); } bibdata = citeDataList.next(); } diff --git a/src/classdef.cpp b/src/classdef.cpp index c69c300..f868037 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2023,7 +2023,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const if (createSubDirs) ol.writeString("../../"); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString("\">"); - ol.writeString(md->name()); + ol.writeString(convertToHtml(md->name())); ol.writeString("</a>"); } ol.writeString("</td></tr>\n"); @@ -2080,7 +2080,7 @@ void ClassDef::writeMemberList(OutputList &ol) { if (getOuterScope()!=Doxygen::globalScope) { - writeNavigationPath(ol); + writeNavigationPath(ol,FALSE); } ol.endQuickIndices(); } @@ -3209,26 +3209,18 @@ QCString ClassDef::getOutputFileBase() const // point to simple struct inside a group return partOfGroups()->at(0)->getOutputFileBase(); } - else if (inlineSimpleClasses && m_impl->isSimple && (scope=getOuterScope()) && - ( - (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || - scope->isLinkableInProject() - ) - ) + else if (inlineSimpleClasses && m_impl->isSimple && (scope=getOuterScope())) { - if (scope==Doxygen::globalScope) // simple struct embedded in file + if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file { return getFileDef()->getOutputFileBase(); } - else // simple struct embedded in other container (namespace/group/class) + else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class) { return getOuterScope()->getOutputFileBase(); } } - else - { - return getXmlOutputFileBase(); - } + return getXmlOutputFileBase(); } QCString ClassDef::getInstanceOutputFileBase() const @@ -3754,7 +3746,7 @@ bool ClassDef::isLocal() const return m_impl->isLocal; } -ClassSDict *ClassDef::getInnerClasses() +ClassSDict *ClassDef::getClassSDict() { return m_impl->innerClasses; } diff --git a/src/classdef.h b/src/classdef.h index 9673ec9..f2d5b3a 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -113,7 +113,7 @@ class ClassDef : public Definition bool isLocal() const; /*! returns the classes nested into this class */ - ClassSDict *getInnerClasses(); + ClassSDict *getClassSDict(); /*! returns TRUE if this class has documentation */ bool hasDocumentation() const; diff --git a/src/config.xml b/src/config.xml index f9bd11c..8f4d36d 100644 --- a/src/config.xml +++ b/src/config.xml @@ -1004,9 +1004,11 @@ the directory name containing the HTML and XML files should also have this name. ' defval='org.doxygen.Project' depends='GENERATE_ECLIPSEHELP'/> <option type='bool' id='DISABLE_INDEX' docs=' -The DISABLE_INDEX tag can be used to turn on/off the condensed index at -top of each HTML page. The value NO (the default) enables the index and -the value YES disables it. +The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +at top of each HTML page. The value NO (the default) enables the index and +the value YES disables it. Since the tabs have the same information as the +navigation tree you can set this option to NO if you already set +GENERATE_TREEVIEW to YES. ' defval='0' depends='GENERATE_HTML'/> <option type='int' id='ENUM_VALUES_PER_LINE' docs=' The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values @@ -1021,7 +1023,9 @@ If the tag value is set to YES, a side panel will be generated containing a tree-like index structure (just like the one that is generated for HTML Help). For this to work a browser that supports JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -Windows users are probably better off using the HTML help feature. +Windows users are probably better off using the HTML help feature. +Since the tree basically has the same information as the tab index you +could consider to set DISABLE_INDEX to NO when enabling this option. ' depends='GENERATE_HTML'/> <option type='bool' id='USE_INLINE_TREES' defval='0' docs=' By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, diff --git a/src/configoptions.cpp b/src/configoptions.cpp index 61fc635..a632acb 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -1474,9 +1474,11 @@ void addConfigOptions(Config *cfg) //---- cb = cfg->addBool( "DISABLE_INDEX", - "The DISABLE_INDEX tag can be used to turn on/off the condensed index at\n" - "top of each HTML page. The value NO (the default) enables the index and\n" - "the value YES disables it.", + "The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)\n" + "at top of each HTML page. The value NO (the default) enables the index and\n" + "the value YES disables it. Since the tabs have the same information as the\n" + "navigation tree you can set this option to NO if you already set\n" + "GENERATE_TREEVIEW to YES.", FALSE ); cb->addDependency("GENERATE_HTML"); @@ -1499,7 +1501,9 @@ void addConfigOptions(Config *cfg) "containing a tree-like index structure (just like the one that\n" "is generated for HTML Help). For this to work a browser that supports\n" "JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).\n" - "Windows users are probably better off using the HTML help feature.", + "Windows users are probably better off using the HTML help feature.\n" + "Since the tree basically has the same information as the tab index you\n" + "could consider to set DISABLE_INDEX to NO when enabling this option.", FALSE ); cb->addDependency("GENERATE_HTML"); diff --git a/src/definition.cpp b/src/definition.cpp index 2abd726..911e156 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -1329,7 +1329,7 @@ void Definition::writePathFragment(OutputList &ol) const ol.writeString(" </li>\n"); } -void Definition::writeNavigationPath(OutputList &ol) const +void Definition::writeNavigationPath(OutputList &ol,bool showSearchInfo) const { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); @@ -1340,6 +1340,10 @@ void Definition::writeNavigationPath(OutputList &ol) const { ol.writeString("</div>\n"); } + if (showSearchInfo) + { + ol.writeSearchInfo(); + } ol.writeString(" <div id=\"nav-path\" class=\"navpath\">\n"); ol.writeString(" <ul>\n"); diff --git a/src/definition.h b/src/definition.h index bf7f38c..a2f00f0 100644 --- a/src/definition.h +++ b/src/definition.h @@ -311,7 +311,7 @@ class Definition : public DefinitionIntf, public LockableObj void writeSourceReffedBy(OutputList &ol,const char *scopeName); void makePartOfGroup(GroupDef *gd); void writePathFragment(OutputList &ol) const; - void writeNavigationPath(OutputList &ol) const; + void writeNavigationPath(OutputList &ol,bool showSearchInfo=TRUE) const; virtual void writeQuickMemberLinks(OutputList &,MemberDef *) const {} virtual void writeSummaryLinks(OutputList &) {} QCString pathFragment() const; diff --git a/src/docsets.cpp b/src/docsets.cpp index 7d7dd2e..fa86dc8 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -211,7 +211,9 @@ void DocSets::addContentsItem(bool isDir, const char *name, const char *ref, const char *file, - const char *anchor) + const char *anchor, + bool /* separateIndex */, + bool /* addToNavIndex */) { (void)isDir; if (file && ref==0) diff --git a/src/docsets.h b/src/docsets.h index 0b6e9af..4a13d88 100644 --- a/src/docsets.h +++ b/src/docsets.h @@ -41,9 +41,11 @@ class DocSets : public IndexIntf void decContentsDepth(); void addContentsItem(bool isDir, const char *name, - const char *ref = 0, - const char *file = 0, - const char *anchor = 0 + const char *ref, + const char *file, + const char *anchor, + bool separateIndex, + bool addToNavIndex ); void addIndexItem(Definition *context,MemberDef *md,const char *title); void addIndexFile(const char *name); diff --git a/src/doctokenizer.l b/src/doctokenizer.l index f68fd40..9fb6b2c 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -294,6 +294,7 @@ NONWS [^ \t\r\n] BLANK [ \t\r] ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]* LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]* +CITEID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-:/]* MAILADR [a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+ OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}* LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS} @@ -538,6 +539,10 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} */ goto find_rule; } +<St_Text>({ID}".")+{ID} { + g_token->name = yytext; + return TK_WORD; + } <St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" { // Special case: word "operator" followed by a HTML command // avoid interpretation as "operator <" g_token->name = yytext; @@ -735,7 +740,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} unput(*yytext); return 0; } -<St_Cite>{LABELID} { // label to cite +<St_Cite>{CITEID} { // label to cite g_token->name=yytext; return TK_WORD; } diff --git a/src/dot.cpp b/src/dot.cpp index 27e559f..66ec988 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -609,14 +609,11 @@ static void checkDotResult(const QCString &imgName) { if (Config_getEnum("DOT_IMAGE_FORMAT")=="png") { - //QFile f(imgName); FILE *f = fopen(imgName,"rb"); - //if (f.open(IO_ReadOnly)) if (f) { char data[4]; if (fread(data,1,4,f)==4) - //if (f.readBlock(data,4)==4) { if (!(data[1]=='P' && data[2]=='N' && data[3]=='G')) { diff --git a/src/doxygen.bst b/src/doxygen.bst index 23479fa..0dd6e28 100644 --- a/src/doxygen.bst +++ b/src/doxygen.bst @@ -153,8 +153,8 @@ FUNCTION {output.nonnull.original} % closeinlinelink to be non-empty. FUNCTION {possibly.setup.inlinelink} { makeinlinelink - { "\rev CITEREF_" quote$ * url * quote$ * " [" * 'openinlinelink := - "]" 'closeinlinelink := + { "<a href=" quote$ * url * quote$ * ">" * 'openinlinelink := + "</a>" 'closeinlinelink := #0 'makeinlinelink := } 'skip$ if$ % makeinlinelink diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 240db24..85cb417 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1333,10 +1333,10 @@ void distributeClassGroupRelations() { //printf("Checking %s\n",cd->name().data()); // distribute the group to nested classes as well - if (!cd->visited && cd->partOfGroups()!=0 && cd->getInnerClasses()) + if (!cd->visited && cd->partOfGroups()!=0 && cd->getClassSDict()) { //printf(" Candidate for merging\n"); - ClassSDict::Iterator ncli(*cd->getInnerClasses()); + ClassSDict::Iterator ncli(*cd->getClassSDict()); ClassDef *ncd; GroupDef *gd = cd->partOfGroups()->at(0); for (ncli.toFirst();(ncd=ncli.current());++ncli) @@ -1441,7 +1441,7 @@ static void processTagLessClasses(ClassDef *rootCd, { //printf("%d: processTagLessClasses %s\n",count,cd->name().data()); //printf("checking members for %s\n",cd->name().data()); - if (cd->getInnerClasses()) + if (cd->getClassSDict()) { MemberList *ml = cd->getMemberList(MemberList::pubAttribs); if (ml) @@ -1453,7 +1453,7 @@ static void processTagLessClasses(ClassDef *rootCd, QCString type = md->typeString(); if (type.find("::@")!=-1) // member of tag less struct/union { - ClassSDict::Iterator it(*cd->getInnerClasses()); + ClassSDict::Iterator it(*cd->getClassSDict()); ClassDef *icd; for (it.toFirst();(icd=it.current());++it) { @@ -1501,9 +1501,9 @@ static void processTagLessClasses(ClassDef *rootCd, static void findTagLessClasses(ClassDef *cd) { - if (cd->getInnerClasses()) + if (cd->getClassSDict()) { - ClassSDict::Iterator it(*cd->getInnerClasses()); + ClassSDict::Iterator it(*cd->getClassSDict()); ClassDef *icd; for (it.toFirst();(icd=it.current());++it) { @@ -7626,25 +7626,17 @@ static void generateClassDocs() writeInstallScript(); } - msg("Generating annotated compound index...\n"); - writeAnnotatedIndex(*g_outputList); + //msg("Generating annotated compound index...\n"); + //writeAnnotatedIndex(*g_outputList); - //if (Config_getBool("ALPHABETICAL_INDEX")) - //{ - msg("Generating alphabetical compound index...\n"); - writeAlphabeticalIndex(*g_outputList); - //} + //msg("Generating alphabetical compound index...\n"); + //writeAlphabeticalIndex(*g_outputList); - msg("Generating hierarchical class index...\n"); - writeHierarchicalIndex(*g_outputList); + //msg("Generating hierarchical class index...\n"); + //writeHierarchicalIndex(*g_outputList); - msg("Generating member index...\n"); - writeClassMemberIndex(*g_outputList); - - if (Doxygen::exampleSDict->count()>0) - { - msg("Generating example index...\n"); - } + //msg("Generating member index...\n"); + //writeClassMemberIndex(*g_outputList); generateClassList(*Doxygen::classSDict); generateClassList(*Doxygen::hiddenClasses); @@ -8516,7 +8508,7 @@ static void generateGroupDocs() static void generateNamespaceDocs() { - writeNamespaceIndex(*g_outputList); + //writeNamespaceIndex(*g_outputList); NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); NamespaceDef *nd; @@ -10749,11 +10741,11 @@ void generateOutput() // count the number of documented elements in the lists we have built. // If the result is 0 we do not generate the lists and omit the // corresponding links in the index. - msg("Generating index page...\n"); - writeIndex(*g_outputList); + //msg("Generating index page...\n"); + //writeIndex(*g_outputList); - msg("Generating page index...\n"); - writePageIndex(*g_outputList); + //msg("Generating page index...\n"); + //writePageIndex(*g_outputList); msg("Generating example documentation...\n"); generateExampleDocs(); @@ -10773,23 +10765,23 @@ void generateOutput() msg("Generating group documentation...\n"); generateGroupDocs(); - msg("Generating group index...\n"); - writeGroupIndex(*g_outputList); + //msg("Generating group index...\n"); + //writeGroupIndex(*g_outputList); msg("Generating class documentation...\n"); generateClassDocs(); - if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY")) - { - msg("Generating graphical class hierarchy...\n"); - writeGraphicalClassHierarchy(*g_outputList); - } + //if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY")) + //{ + // msg("Generating graphical class hierarchy...\n"); + // writeGraphicalClassHierarchy(*g_outputList); + //} msg("Generating namespace index...\n"); generateNamespaceDocs(); - msg("Generating namespace member index...\n"); - writeNamespaceMemberIndex(*g_outputList); + //msg("Generating namespace member index...\n"); + //writeNamespaceMemberIndex(*g_outputList); if (Config_getBool("GENERATE_LEGEND")) { @@ -10803,20 +10795,20 @@ void generateOutput() generateDirDocs(*g_outputList); } - msg("Generating file index...\n"); - writeFileIndex(*g_outputList); + //msg("Generating file index...\n"); + //writeFileIndex(*g_outputList); - if (Config_getBool("SHOW_DIRECTORIES")) - { - msg("Generating directory index...\n"); - writeDirIndex(*g_outputList); - } + //if (Config_getBool("SHOW_DIRECTORIES")) + //{ + // msg("Generating directory index...\n"); + // writeDirIndex(*g_outputList); + //} - msg("Generating example index...\n"); - writeExampleIndex(*g_outputList); + //msg("Generating example index...\n"); + //writeExampleIndex(*g_outputList); - msg("Generating file member index...\n"); - writeFileMemberIndex(*g_outputList); + //msg("Generating file member index...\n"); + //writeFileMemberIndex(*g_outputList); //writeDirDependencyGraph(Config_getString("HTML_OUTPUT")); @@ -10837,6 +10829,8 @@ void generateOutput() // FTVHelp::getInstance()->finalize(); //} + writeIndexHierarchy(*g_outputList); + msg("finalizing index lists...\n"); Doxygen::indexList.finalize(); diff --git a/src/doxygen_bst.h b/src/doxygen_bst.h index 7acf63e..6298713 100644 --- a/src/doxygen_bst.h +++ b/src/doxygen_bst.h @@ -153,8 +153,8 @@ "% closeinlinelink to be non-empty.\n" "FUNCTION {possibly.setup.inlinelink}\n" "{ makeinlinelink\n" -" { \"\\rev CITEREF_\" quote$ * url * quote$ * \" [\" * 'openinlinelink :=\n" -" \"]\" 'closeinlinelink :=\n" +" { \"<a href=\" quote$ * url * quote$ * \">\" * 'openinlinelink :=\n" +" \"</a>\" 'closeinlinelink :=\n" " #0 'makeinlinelink := }\n" " 'skip$\n" " if$ % makeinlinelink\n" diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp index feea0ba..9f708bc 100644 --- a/src/eclipsehelp.cpp +++ b/src/eclipsehelp.cpp @@ -155,13 +155,17 @@ void EclipseHelp::decContentsDepth() * @param ref URL of the item * @param file Name of a file which the item is defined in (without extension) * @param anchor Name of an anchor of the item. + * @param separateIndex not used. + * @param addToNavIndex not used. */ void EclipseHelp::addContentsItem( bool /* isDir */, const char *name, const char * /* ref */, const char *file, - const char *anchor) + const char *anchor, + bool /* separateIndex */, + bool /* addToNavIndex */) { // -- write the topic tag closedTag(); diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h index bfc6d60..7be3502 100644 --- a/src/eclipsehelp.h +++ b/src/eclipsehelp.h @@ -49,8 +49,8 @@ class EclipseHelp : public IndexIntf virtual void finalize(); virtual void incContentsDepth(); virtual void decContentsDepth(); - virtual void addContentsItem(bool isDir, const char *name, const char *ref = 0, - const char *file = 0, const char *anchor = 0); + virtual void addContentsItem(bool isDir, const char *name, const char *ref, + const char *file, const char *anchor,bool separateIndex,bool addToNavIndex); virtual void addIndexItem(Definition *context,MemberDef *md,const char *title); virtual void addIndexFile(const char *name); virtual void addImageFile(const char *name); diff --git a/src/filedef.cpp b/src/filedef.cpp index 0c482d8..04ec5ae 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -261,71 +261,74 @@ void FileDef::writeIncludeFiles(OutputList &ol) IncludeInfo *ii; for (;(ii=ili.current());++ili) { - FileDef *fd=ii->fileDef; - bool isIDLorJava = FALSE; - if (fd) + if (!ii->indirect) { - SrcLangExt lang = fd->getLanguage(); - isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java; - } - ol.startTypewriter(); - if (isIDLorJava) // IDL/Java include - { - ol.docify("import "); - } - else if (ii->imported) // Objective-C include - { - ol.docify("#import "); - } - else // C/C++ include - { - ol.docify("#include "); - } - if (ii->local || isIDLorJava) - ol.docify("\""); - else - ol.docify("<"); - ol.disable(OutputGenerator::Html); - ol.docify(ii->includeName); - ol.enableAll(); - ol.disableAllBut(OutputGenerator::Html); - - // Here we use the include file name as it appears in the file. - // we could also we the name as it is used within doxygen, - // then we should have used fd->docName() instead of ii->includeName - if (fd && fd->isLinkable()) - { - ol.writeObjectLink(fd->getReference(), - fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(), - 0,ii->includeName); - if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference()) + FileDef *fd=ii->fileDef; + bool isIDLorJava = FALSE; + if (fd) { - const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no"; - const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no"; - Doxygen::tagFile << " <includes id=\"" - << convertToXML(fd->getOutputFileBase()) << "\" " - << "name=\"" << convertToXML(fd->name()) << "\" " - << "local=\"" << locStr << "\" " - << "imported=\"" << impStr << "\">" - << convertToXML(ii->includeName) - << "</includes>" - << endl; + SrcLangExt lang = fd->getLanguage(); + isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java; } - } - else - { + ol.startTypewriter(); + if (isIDLorJava) // IDL/Java include + { + ol.docify("import "); + } + else if (ii->imported) // Objective-C include + { + ol.docify("#import "); + } + else // C/C++ include + { + ol.docify("#include "); + } + if (ii->local || isIDLorJava) + ol.docify("\""); + else + ol.docify("<"); + ol.disable(OutputGenerator::Html); ol.docify(ii->includeName); + ol.enableAll(); + ol.disableAllBut(OutputGenerator::Html); + + // Here we use the include file name as it appears in the file. + // we could also we the name as it is used within doxygen, + // then we should have used fd->docName() instead of ii->includeName + if (fd && fd->isLinkable()) + { + ol.writeObjectLink(fd->getReference(), + fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(), + 0,ii->includeName); + if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference()) + { + const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no"; + const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no"; + Doxygen::tagFile << " <includes id=\"" + << convertToXML(fd->getOutputFileBase()) << "\" " + << "name=\"" << convertToXML(fd->name()) << "\" " + << "local=\"" << locStr << "\" " + << "imported=\"" << impStr << "\">" + << convertToXML(ii->includeName) + << "</includes>" + << endl; + } + } + else + { + ol.docify(ii->includeName); + } + + ol.enableAll(); + if (ii->local || isIDLorJava) + ol.docify("\""); + else + ol.docify(">"); + if (isIDLorJava) + ol.docify(";"); + ol.endTypewriter(); + ol.lineBreak(); } - - ol.enableAll(); - if (ii->local || isIDLorJava) - ol.docify("\""); - else - ol.docify(">"); - if (isIDLorJava) - ol.docify(";"); - ol.endTypewriter(); - ol.lineBreak(); } ol.endTextBlock(); } @@ -758,7 +761,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const if (createSubDirs) ol.writeString("../../"); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString("\">"); - ol.writeString(md->localName()); + ol.writeString(convertToHtml(md->localName())); ol.writeString("</a>"); } ol.writeString("</td></tr>\n"); @@ -1034,7 +1037,7 @@ void FileDef::addUsingDeclaration(Definition *d) } void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local, - bool imported) + bool imported,bool indirect) { //printf("FileDef::addIncludeDependency(%p,%s,%d)\n",fd,incName,local); QCString iName = fd ? fd->absFilePath().data() : incName; @@ -1051,6 +1054,7 @@ void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local, ii->includeName = incName; ii->local = local; ii->imported = imported; + ii->indirect = indirect; includeList->append(ii); includeDict->insert(iName,ii); } @@ -1148,6 +1152,7 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName, ii->includeName = incName; ii->local = local; ii->imported = imported; + ii->indirect = FALSE; includedByList->append(ii); includedByDict->insert(iName,ii); } @@ -1647,8 +1652,8 @@ bool FileDef::isLinkableInProject() const bool FileDef::includes(FileDef *incFile,QDict<FileDef> *includedFiles) const { - if (incFile==this) return TRUE; //printf("%s::includes(%s)\n",name().data(),incFile->name().data()); + if (incFile==this) return TRUE; includedFiles->insert(absFilePath(),this); if (includeList) { @@ -1656,12 +1661,30 @@ bool FileDef::includes(FileDef *incFile,QDict<FileDef> *includedFiles) const IncludeInfo *ii; for (;(ii=ili.current());++ili) { - if (ii->fileDef && - includedFiles->find(ii->fileDef->absFilePath())==0 && - ii->fileDef->includes(incFile,includedFiles)) return TRUE; + //printf("ii=%s\n",ii->includeName.data()); + if ((ii->fileDef && + includedFiles->find(ii->fileDef->absFilePath())==0 && + ii->fileDef->includes(incFile,includedFiles) + ) || + incFile->absFilePath()==ii->includeName + ) return TRUE; } } return FALSE; } +bool FileDef::includesByName(const QCString &fileName) const +{ + if (includeList) + { + QListIterator<IncludeInfo> ili(*includeList); + IncludeInfo *ii; + for (;(ii=ili.current());++ili) + { + //printf("ii=%s\n",ii->includeName.data()); + if (fileName==ii->includeName) return TRUE; + } + } + return FALSE; +} diff --git a/src/filedef.h b/src/filedef.h index 502a957..c34b633 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -42,12 +42,13 @@ class DirDef; struct IncludeInfo { - IncludeInfo() { fileDef=0; local=FALSE; } + IncludeInfo() { fileDef=0; local=FALSE; indirect=FALSE; } ~IncludeInfo() {} FileDef *fileDef; QCString includeName; bool local; bool imported; + bool indirect; }; /*! \class FileDef filedef.h @@ -155,7 +156,7 @@ class FileDef : public Definition bool generateSourceFile() const; void sortMemberLists(); - void addIncludeDependency(FileDef *fd,const char *incName,bool local,bool imported); + void addIncludeDependency(FileDef *fd,const char *incName,bool local,bool imported,bool indirect); void addIncludedByDependency(FileDef *fd,const char *incName,bool local,bool imported); QList<IncludeInfo> *includeFileList() const { return includeList; } QList<IncludeInfo> *includedByFileList() const { return includedByList; } @@ -168,6 +169,7 @@ class FileDef : public Definition void addListReferences(); bool isDocumentationFile() const; bool includes(FileDef *incFile,QDict<FileDef> *includedFiles) const; + bool includesByName(const QCString &name) const; MemberList *getMemberList(MemberList::ListType lt) const; const QList<MemberList> &getMemberLists() const { return m_memberLists; } diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 7231ddc..9ed02c9 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -12,7 +12,7 @@ * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * - * Contributed by Kenney Wong <kwong@ea.com> + * Original version contributed by Kenney Wong <kwong@ea.com> * Modified by Dimitri van Heesch * * Folder Tree View for offline help on browsers that do not support HTML Help. @@ -47,279 +47,6 @@ static const char navtree_css[]= #include "navtree_css.h" ; - -#if 0 -unsigned char ftv2blank_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x01, 0x00, 0x00, 0x00, 0x01, 0x96, 0xd6, 0x11, 0x47, 0x00, 0x00, 0x00, - 0x02, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x01, 0x01, 0x94, 0xfd, 0xae, 0x00, - 0x00, 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, - 0x61, 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, - 0x32, 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, - 0x25, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x00, 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, - 0x6d, 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, - 0x72, 0x20, 0x32, 0x2e, 0x30, 0x21, 0xf8, 0xd7, 0x5e, 0x53, 0x00, 0x00, - 0x00, 0x14, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x38, 0xc0, 0x80, - 0x80, 0x1f, 0x30, 0xe0, 0x7f, 0x42, 0x90, 0x00, 0x02, 0x00, 0x78, 0x3c, - 0x32, 0xcb, 0x72, 0x8f, 0x7c, 0x12, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, - 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2doc_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00, - 0x15, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, - 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xb3, 0xbd, 0xfb, 0xc8, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52, - 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74, - 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, - 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e, - 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x76, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x63, 0x60, 0x60, 0x60, 0x60, 0x63, 0x60, 0x60, 0x64, - 0x00, 0x01, 0x27, 0x30, 0x62, 0x71, 0x01, 0xe2, 0x24, 0x06, 0x38, 0x60, - 0x71, 0x00, 0xca, 0x27, 0x33, 0x30, 0x30, 0x01, 0x31, 0xa3, 0x32, 0x03, - 0x0a, 0x70, 0x54, 0x32, 0x01, 0x53, 0x69, 0x60, 0x71, 0x27, 0x08, 0x15, - 0x1a, 0x1a, 0xca, 0x80, 0x01, 0x5c, 0x5c, 0xc0, 0x94, 0xa2, 0x90, 0x02, - 0x88, 0x52, 0x4b, 0x52, 0x05, 0x53, 0x69, 0xc8, 0x94, 0x18, 0x84, 0x52, - 0x52, 0x12, 0xc5, 0x69, 0x0a, 0x36, 0xe0, 0xa4, 0xa4, 0xa4, 0x68, 0x82, - 0xc4, 0x51, 0x82, 0x6b, 0x04, 0x71, 0x14, 0x4d, 0x61, 0x4e, 0x55, 0x04, - 0xf2, 0x60, 0x1c, 0x27, 0x45, 0x24, 0x19, 0x90, 0x01, 0x70, 0x19, 0x67, - 0x63, 0x20, 0x30, 0xc5, 0x6f, 0x23, 0x00, 0xf5, 0xd0, 0x11, 0xe0, 0x55, - 0x83, 0x47, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, - 0x42, 0x60, 0x82 -}; - -unsigned char ftv2folderclosed_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00, - 0x12, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, - 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x42, - 0xee, 0x40, 0xe1, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, - 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, - 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, - 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, - 0x47, 0x0e, 0x00, 0x00, 0x00, 0x7d, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, - 0x8d, 0x8e, 0xc1, 0x0a, 0x84, 0x30, 0x10, 0x43, 0x23, 0x8c, 0x77, 0x0f, - 0xfb, 0x03, 0x42, 0xbd, 0x2b, 0xf8, 0x01, 0x65, 0x6d, 0xef, 0xa2, 0xcd, - 0xff, 0xff, 0x8a, 0x33, 0xad, 0xee, 0x5a, 0xf6, 0xb0, 0x06, 0xda, 0xf0, - 0x86, 0xa6, 0x13, 0x00, 0x88, 0x40, 0x03, 0x53, 0x02, 0x82, 0x9a, 0xd7, - 0x51, 0x42, 0x25, 0xae, 0x7a, 0x76, 0xa0, 0xed, 0xea, 0x79, 0x79, 0x17, - 0x49, 0x73, 0xe1, 0xf2, 0x32, 0x14, 0x8f, 0x5f, 0x49, 0xb9, 0xed, 0x23, - 0x60, 0x20, 0xcd, 0x36, 0x66, 0xe4, 0x40, 0x4b, 0xb4, 0xdb, 0xdb, 0xe5, - 0x16, 0xee, 0x16, 0x78, 0x20, 0xf9, 0x96, 0x15, 0x6d, 0xc2, 0x8b, 0xa2, - 0x6e, 0xf9, 0x50, 0x64, 0xa6, 0x70, 0xb6, 0x50, 0x0a, 0xd3, 0x78, 0x86, - 0x98, 0xa6, 0xde, 0x5d, 0x9d, 0x25, 0xcd, 0xfe, 0xdf, 0xc6, 0x03, 0xa0, - 0x13, 0x15, 0x98, 0x60, 0xbd, 0x81, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2folderopen_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00, - 0x15, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, - 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x80, 0x92, 0x32, 0x8c, 0xe5, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52, - 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74, - 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, - 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e, - 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x7c, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x85, 0x8d, 0x41, 0x0e, 0x82, 0x30, 0x10, 0x45, 0x5f, - 0x08, 0xf5, 0x1e, 0x2d, 0x53, 0xd6, 0xc6, 0x18, 0xd7, 0x8d, 0x18, 0xd7, - 0x06, 0xd2, 0x1e, 0xa0, 0xb1, 0xde, 0xff, 0x08, 0x3a, 0x20, 0x21, 0x10, - 0xa2, 0x6f, 0xf3, 0xfe, 0xff, 0x8b, 0x19, 0x80, 0x0a, 0x6a, 0x14, 0x81, - 0x3c, 0x06, 0x2a, 0x61, 0xc5, 0xd3, 0x43, 0x69, 0xc1, 0xb4, 0xab, 0xf9, - 0x70, 0xac, 0x83, 0xca, 0xbb, 0xfb, 0xa4, 0x8b, 0xae, 0x26, 0x46, 0xb6, - 0x4c, 0x0f, 0xe8, 0xc3, 0x18, 0xfa, 0xb3, 0x7d, 0xa8, 0x1a, 0xeb, 0x17, - 0xa5, 0x46, 0x54, 0x46, 0x4e, 0x2a, 0xe2, 0xce, 0x95, 0x3d, 0xba, 0xb0, - 0x64, 0x93, 0x85, 0x9b, 0x0b, 0x73, 0x71, 0x83, 0x75, 0xd7, 0xf2, 0xa7, - 0x90, 0xf2, 0x20, 0x9d, 0xfb, 0x16, 0xd2, 0xeb, 0x43, 0xf9, 0xfd, 0xf2, - 0x0d, 0xa4, 0x29, 0x14, 0xcb, 0xda, 0x47, 0xac, 0x44, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2lastnode_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00, - 0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x18, 0xd3, 0xa0, 0x90, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, - 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, - 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26, - 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, - 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, - 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, - 0x20, 0x32, 0x2e, 0x30, 0x69, 0x01, 0x6f, 0x3f, 0xcd, 0x06, 0x00, 0x00, - 0x00, 0x13, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x18, 0x30, - 0xc0, 0x4f, 0x0c, 0x03, 0x04, 0xc8, 0x33, 0x1e, 0x00, 0x24, 0xa7, 0x00, - 0x88, 0x10, 0xca, 0x33, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, - 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2link_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00, - 0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x80, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x00, 0x80, 0x80, 0x80, - 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x7e, 0x9b, 0x08, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, - 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, - 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26, - 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, - 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, - 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, - 0x20, 0x32, 0x2e, 0x30, 0x19, 0x02, 0xd9, 0x09, 0xe5, 0x4a, 0x00, 0x00, - 0x00, 0x90, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x7d, 0x8c, 0xb1, 0x0a, - 0xc2, 0x30, 0x14, 0x45, 0x6f, 0x33, 0xb4, 0x63, 0x7e, 0xa1, 0x53, 0x57, - 0x8b, 0x7e, 0x80, 0x6e, 0xae, 0x16, 0x5a, 0xb2, 0xbe, 0x3a, 0x64, 0x35, - 0xb8, 0x64, 0xec, 0x2f, 0x07, 0x05, 0x1d, 0x9f, 0x79, 0x8d, 0x21, 0x50, - 0xd0, 0x03, 0xc9, 0xcd, 0xe1, 0xbe, 0x17, 0x00, 0xa8, 0x00, 0x82, 0xe0, - 0x81, 0x66, 0x7d, 0xc0, 0x9e, 0x51, 0x70, 0x40, 0x1d, 0xcf, 0xad, 0x07, - 0x18, 0x1b, 0x74, 0x90, 0xdb, 0x1c, 0x62, 0x0f, 0xe2, 0x20, 0xc1, 0xcc, - 0x61, 0x3b, 0x06, 0x6a, 0xbb, 0x14, 0x3b, 0xe9, 0x68, 0xba, 0xac, 0x51, - 0x9d, 0x24, 0xec, 0xdc, 0x4b, 0x68, 0xed, 0xd2, 0x5e, 0x1b, 0x7e, 0xfd, - 0x92, 0xa8, 0x6d, 0x84, 0xb2, 0x28, 0x28, 0x38, 0xca, 0xd2, 0x4c, 0x46, - 0x2d, 0x59, 0xcc, 0x38, 0x5c, 0x8b, 0xcc, 0xe3, 0xfe, 0x2b, 0x71, 0xfa, - 0x79, 0xbc, 0x67, 0x79, 0x85, 0x07, 0x54, 0x69, 0xde, 0xde, 0x2f, 0xf8, - 0xcf, 0x07, 0x71, 0x95, 0x2b, 0xa1, 0x10, 0x78, 0xd0, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2mlastnode_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x02, 0x03, 0x00, 0x00, 0x01, 0xc3, 0xc3, 0xc4, 0x79, 0x00, 0x00, 0x00, - 0x09, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x00, - 0x00, 0x00, 0x3c, 0x5e, 0xbb, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52, - 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74, - 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, - 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e, - 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x23, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x63, 0x60, 0x20, 0x0b, 0x08, 0x08, 0x20, 0x10, 0x0a, - 0x60, 0x84, 0x11, 0x8c, 0xa1, 0xa1, 0x20, 0x06, 0x90, 0xc9, 0xa8, 0xb5, - 0x50, 0x10, 0xca, 0x02, 0x89, 0x61, 0x01, 0x00, 0x6d, 0x17, 0x02, 0xba, - 0xc0, 0xdc, 0x69, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, - 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2mnode_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00, - 0x24, 0x50, 0x4c, 0x54, 0x45, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x53, 0xbe, 0x1e, 0x99, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, - 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, - 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x2a, - 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0xa0, 0x2e, 0xe0, 0x06, - 0x42, 0x74, 0x02, 0xa7, 0x52, 0x54, 0x06, 0xf7, 0x6e, 0x20, 0x80, 0xf1, - 0xc1, 0x62, 0xdc, 0x4c, 0x4a, 0x4a, 0xdc, 0xdc, 0xdc, 0xc8, 0x22, 0x30, - 0x35, 0x98, 0xda, 0xd1, 0x19, 0x00, 0xb7, 0x79, 0x07, 0x27, 0xaa, 0xf7, - 0x96, 0x03, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82 -}; - -unsigned char ftv2node_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00, - 0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x18, 0xd3, 0xa0, 0x90, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, - 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, - 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26, - 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, - 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, - 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, - 0x20, 0x32, 0x2e, 0x30, 0x69, 0x01, 0x6f, 0x3f, 0xcd, 0x06, 0x00, 0x00, - 0x00, 0x15, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x18, 0x30, - 0xc0, 0x4f, 0x0c, 0x03, 0x04, 0x88, 0x56, 0x8c, 0xc2, 0x00, 0x00, 0x2e, - 0x52, 0x00, 0xe2, 0xfa, 0x45, 0x3a, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2plastnode_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x02, 0x03, 0x00, 0x00, 0x01, 0xc3, 0xc3, 0xc4, 0x79, 0x00, 0x00, 0x00, - 0x09, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x00, - 0x00, 0x00, 0x3c, 0x5e, 0xbb, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52, - 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74, - 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, - 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e, - 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x28, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x63, 0x60, 0x20, 0x0b, 0x08, 0x08, 0x30, 0x08, 0x81, - 0x11, 0x90, 0x81, 0x02, 0x18, 0x61, 0x04, 0x63, 0x68, 0x28, 0x90, 0x60, - 0x02, 0x32, 0x19, 0xb5, 0x16, 0x0a, 0x42, 0x59, 0x20, 0x31, 0x2c, 0x00, - 0x00, 0x6e, 0xc1, 0x02, 0xc2, 0xe5, 0xed, 0x75, 0xa7, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2pnode_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00, - 0x24, 0x50, 0x4c, 0x54, 0x45, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x53, 0xbe, 0x1e, 0x99, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, - 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, - 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x30, - 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0xa0, 0x2e, 0xe0, 0x06, - 0x42, 0x06, 0x6e, 0x26, 0x38, 0x01, 0xe2, 0xe2, 0x54, 0x8a, 0xca, 0xe0, - 0xde, 0x0d, 0x04, 0x10, 0x3e, 0x13, 0x44, 0x8c, 0x9b, 0x49, 0x49, 0x89, - 0x9b, 0x9b, 0x1b, 0x59, 0x04, 0xa6, 0x06, 0x53, 0x3b, 0x3a, 0x03, 0x00, - 0xba, 0x6b, 0x07, 0x2f, 0xaa, 0xcb, 0x1f, 0x6f, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned char ftv2vertline_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00, - 0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x18, 0xd3, 0xa0, 0x90, 0x00, 0x00, 0x00, - 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, - 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, - 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26, - 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, - 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, - 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, - 0x20, 0x32, 0x2e, 0x30, 0x69, 0x01, 0x6f, 0x3f, 0xcd, 0x06, 0x00, 0x00, - 0x00, 0x0f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x18, 0x30, - 0xc0, 0x4f, 0x5b, 0x06, 0x00, 0x21, 0x14, 0x00, 0xa6, 0xe5, 0x3c, 0xe8, - 0x3a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82 -}; -#endif - - static unsigned char blank_png[352] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -728,19 +455,24 @@ static ColoredImgDataItem ftv_image_data[] = { 0, 0, 0, 0, 0 } }; +static int folderId=1; + struct FTVNode { - FTVNode(bool dir,const char *r,const char *f,const char *a,const char *n) - : isLast(TRUE), isDir(dir),ref(r),file(f),anchor(a),name(n), - parent(0) { children.setAutoDelete(TRUE); } + FTVNode(bool dir,const char *r,const char *f,const char *a,const char *n,bool sepIndex,bool navIndex) + : isLast(TRUE), isDir(dir),ref(r),file(f),anchor(a),name(n), index(0), + parent(0), separateIndex(sepIndex), addToNavIndex(navIndex) { children.setAutoDelete(TRUE); } bool isLast; bool isDir; QCString ref; QCString file; QCString anchor; QCString name; + int index; QList<FTVNode> children; FTVNode *parent; + bool separateIndex; + bool addToNavIndex; }; @@ -759,6 +491,7 @@ FTVHelp::FTVHelp(bool TLI) m_topLevelIndex = TLI; } +/*! Destroys the ftv help object. */ FTVHelp::~FTVHelp() { delete[] m_indentNodes; @@ -816,21 +549,27 @@ void FTVHelp::decContentsDepth() * \param file the file containing the definition of the item * \param anchor the anchor within the file. * \param name the name of the item. + * \param separateIndex put the entries in a separate index file + * \param addToNavIndex add this entry to the quick navigation index */ void FTVHelp::addContentsItem(bool isDir, const char *name, const char *ref, const char *file, - const char *anchor + const char *anchor, + bool separateIndex, + bool addToNavIndex ) { + //printf("addContentsItem(%s,%s,%s,%s)\n",name,ref,file,anchor); QList<FTVNode> *nl = &m_indentNodes[m_indent]; - FTVNode *newNode = new FTVNode(isDir,ref,file,anchor,name); + FTVNode *newNode = new FTVNode(isDir,ref,file,anchor,name,separateIndex,addToNavIndex); if (!nl->isEmpty()) { nl->getLast()->isLast=FALSE; } nl->append(newNode); + newNode->index = nl->count()-1; if (m_indent>0) { QList<FTVNode> *pnl = &m_indentNodes[m_indent-1]; @@ -839,7 +578,6 @@ void FTVHelp::addContentsItem(bool isDir, } -static int folderId=1; void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,int level) { @@ -969,7 +707,33 @@ void FTVHelp::generateTree(FTextStream &t, const QList<FTVNode> &nl,int level) } } -bool FTVHelp::generateJSTree(FTextStream &t, const QList<FTVNode> &nl,int level,bool &first) +static void writePathToNode(FTextStream &tidx,FTVNode *leaf,FTVNode *n) +{ + if (n->parent) + { + writePathToNode(tidx,leaf,n->parent); + } + tidx << n->index; + if (leaf!=n) tidx << ","; +} + +bool childOfHierarchy(const FTVNode *n) +{ + if (n==0) return FALSE; + if (n->file=="hierarchy") + return TRUE; + else + return childOfHierarchy(n->parent); +} + +bool dupOfParent(const FTVNode *n) +{ + if (n->parent==0) return FALSE; + if (n->file==n->parent->file) return TRUE; + return FALSE; +} + +bool FTVHelp::generateJSTree(FTextStream &tidx,FTextStream &t, const QList<FTVNode> &nl,int level,bool &first) { QCString indentStr; indentStr.fill(' ',level*2); @@ -989,45 +753,59 @@ bool FTVHelp::generateJSTree(FTextStream &t, const QList<FTVNode> &nl,int level, } found=TRUE; - bool firstChild=TRUE; - t << indentStr << " [ "; - generateJSLink(t,n); - bool emptySection = !generateJSTree(t,n->children,level+1,firstChild); - if (emptySection) - t << "null ]"; - else - t << endl << indentStr << " ] ]"; - } - return found; -} - - -#if 0 -void FTVHelp::generateTreeViewImages() -{ - static bool done=FALSE; - if (done) return; - done=TRUE; + //if (!n->file.isEmpty() && !childOfHierarchy(n->parent)) + if (n->addToNavIndex) + { + tidx << "," << endl << "\"" << n->file << Doxygen::htmlFileExtension; + if (!n->anchor.isEmpty()) tidx << "#" << n->anchor; + tidx << "\":["; + writePathToNode(tidx,n,n); + tidx << "]"; + } - // Generate tree view images - FTVImageInfo *p = image_info; - while (p->name) - { - QCString fileName=Config_getString("HTML_OUTPUT")+"/"+p->name; - QFile f(fileName); - if (f.open(IO_WriteOnly)) + if (n->separateIndex) // store items in a separate file for dynamic loading { - f.writeBlock((char *)p->data,p->len); + bool firstChild=TRUE; + t << indentStr << " [ "; + generateJSLink(t,n); + if (n->children.count()>0) // write children to separate file for dynamic loading + { + QCString fileId = n->file; + if (dupOfParent(n)) fileId+="_dup"; + QFile f(Config_getString("HTML_OUTPUT")+"/"+fileId+".js"); + if (f.open(IO_WriteOnly)) + { + FTextStream tt(&f); + QCString varId = fileId; + int i=fileId.findRev('/'); + if (i>=0) varId = varId.mid(i+1); + tt << "var " << varId << " =" << endl; + generateJSTree(tidx,tt,n->children,1,firstChild); + tt << endl << "];"; + } + // write file name without extension as marker + t << "\"" << fileId << "\" ]"; + //if (n->file!="hierarchy") addFilesToIndex(tidx,n); + } + else // no children + { + t << "null ]"; + } } - else + else // show items in this file { - fprintf(stderr,"warning: Cannot open file %s for writing\n",fileName.data()); + bool firstChild=TRUE; + t << indentStr << " [ "; + generateJSLink(t,n); + bool emptySection = !generateJSTree(tidx,t,n->children,level+1,firstChild); + if (emptySection) + t << "null ]"; + else + t << endl << indentStr << " ] ]"; } - f.close(); - p++; } -} -#endif + return found; +} // new style images void FTVHelp::generateTreeViewImages() @@ -1041,9 +819,14 @@ void FTVHelp::generateTreeViewScripts() { // generate navtree.js { - QFile f(Config_getString("HTML_OUTPUT")+"/navtree.js"); - if (f.open(IO_WriteOnly)) + QCString htmlOutput = Config_getString("HTML_OUTPUT"); + QFile f(htmlOutput+"/navtree.js"); + QFile fidx(htmlOutput+"/navtreeindex.js"); + if (f.open(IO_WriteOnly) && fidx.open(IO_WriteOnly)) { + FTextStream tidx(&fidx); + tidx << "var NAVTREEINDEX =" << endl; + tidx << "{" << endl; FTextStream t(&f); t << "var NAVTREE =" << endl; t << "[" << endl; @@ -1060,13 +843,17 @@ void FTVHelp::generateTreeViewScripts() } t << "\"index" << Doxygen::htmlFileExtension << "\", "; + tidx << "\"index" << Doxygen::htmlFileExtension << "\":[]"; + bool first=TRUE; - generateJSTree(t,m_indentNodes[0],1,first); + generateJSTree(tidx,t,m_indentNodes[0],1,first); if (first) t << "]"; t << endl << " ] ]" << endl; t << "];" << endl; t << endl << navtree_script; + + tidx << endl << "};" << endl; } } // generate resize.js @@ -1078,17 +865,6 @@ void FTVHelp::generateTreeViewScripts() t << resize_script; } } -#if 0 - // generate jquery.js - { - QFile f(Config_getString("HTML_OUTPUT")+"/jquery.js"); - if (f.open(IO_WriteOnly)) - { - FTextStream t(&f); - t << jquery_script1 << jquery_script2 << jquery_script3; - } - } -#endif // generate navtree.css { QFile f(Config_getString("HTML_OUTPUT")+"/navtree.css"); @@ -1182,171 +958,5 @@ void FTVHelp::generateTreeView() { generateTreeViewImages(); generateTreeViewScripts(); -#if 0 - QCString fileName; - QFile f; - static bool searchEngine = Config_getBool("SEARCHENGINE"); - static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); - - fileName=Config_getString("HTML_OUTPUT")+"/index"+Doxygen::htmlFileExtension; - f.setName(fileName); - if (!f.open(IO_WriteOnly)) - { - err("Cannot open file %s for writing!\n",fileName.data()); - return; - } - else - { - FTextStream t(&f); - //t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n"; - t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n"; - t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n"; - t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"; - t << "<title>"; - if (Config_getString("PROJECT_NAME").isEmpty()) - { - t << "Doxygen Documentation"; - } - else - { - t << Config_getString("PROJECT_NAME"); - } - t << "</title>\n</head>" << endl; - t << "<frameset cols=\"" << Config_getInt("TREEVIEW_WIDTH") << ",*\">" << endl; - t << " <frame src=\"tree" << Doxygen::htmlFileExtension << "\" name=\"treefrm\"/>" << endl; - t << " <frame src=\"main" << Doxygen::htmlFileExtension << "\" name=\"basefrm\"/>" << endl; - t << " <noframes>" << endl; - t << " <body>" << endl; - t << " <a href=\"main" << Doxygen::htmlFileExtension << "\">Frames are disabled. Click here to go to the main page.</a>" << endl; - t << " </body>" << endl; - t << " </noframes>" << endl; - t << "</frameset>" << endl; - t << "</html>" << endl; - f.close(); - } - - // Generate tree view - fileName=Config_getString("HTML_OUTPUT")+"/tree"+Doxygen::htmlFileExtension; - f.setName(fileName); - if (!f.open(IO_WriteOnly)) - { - err("Cannot open file %s for writing!\n",fileName.data()); - return; - } - else - { - FTextStream t(&f); - - //if (searchEngine) - //{ - // t << "<!-- This comment will put IE 6, 7 and 8 in quirks mode -->" << endl; - //} - t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; - t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"; - t << " <head>\n"; - t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"; - t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n"; - t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n"; - if (searchEngine) - { - t << " <link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>" << endl; - t << " <script type=\"text/javaScript\" src=\"search/search.js\"></script>" << endl; - } - t << " <link rel=\"stylesheet\" href=\""; - QCString cssname=Config_getString("HTML_STYLESHEET"); - if (cssname.isEmpty()) - { - t << "doxygen.css"; - } - else - { - QFileInfo cssfi(cssname); - if (!cssfi.exists()) - { - err("Error: user specified HTML style sheet file does not exist!\n"); - } - t << cssfi.fileName(); - } - t << "\"/>" << endl; - t << " <title>TreeView</title>\n"; - generateScript(t); - t << " </head>\n"; - t << "\n"; - t << " <body class=\"ftvtree\""; - if (searchEngine && !serverBasedSearch) - { - t << " onload='searchBox.OnSelectItem(0);'"; - } - t << ">\n"; - if (searchEngine) - { - t << " <script type=\"text/javascript\"><!--\n"; - t << " var searchBox = new SearchBox(\"searchBox\", \"search\", true, '" - << theTranslator->trSearch() << "');\n"; - t << " --></script>\n"; - if (!serverBasedSearch) - { - t << " <div class=\"tabsearch\">\n"; - t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n"; - t << " <span class=\"left\">\n"; - t << " <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">" - << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"search/close.png\" alt=\"\"/></a>\n"; - t << " <input type=\"text\" id=\"MSearchField\" value=\"" - << theTranslator->trSearch() << "\" accesskey=\"S\"\n"; - t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n"; - t << " onblur=\"searchBox.OnSearchFieldFocus(false)\" \n"; - t << " onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n"; - t << " </span><span class=\"right\">\n"; - t << " <img id=\"MSearchSelect\" src=\"search/mag_sel.png\"\n"; - t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n"; - t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n"; - t << " alt=\"\"/>\n"; - t << " </span>\n"; - t << " </div>\n"; - t << " </div>\n"; - HtmlGenerator::writeSearchFooter(t,QCString()); - } - else - { - t << " <div class=\"tabsearch\">\n"; - t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n"; - t << " <span class=\"left\">\n"; - t << " <form id=\"FSearchBox\" action=\"search.php\" method=\"get\" target=\"basefrm\">\n"; - t << " <img id=\"MSearchSelect\" src=\"search/mag.png\" alt=\"\"/>\n"; - t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"" - << theTranslator->trSearch() << "\" size=\"20\" accesskey=\"S\" \n"; - t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n"; - t << " onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n"; - t << " </form>\n"; - t << " </span><span class=\"right\"></span>\n"; - t << " </div>\n"; - t << " </div>\n"; - } - } - t << " <div class=\"directory\">\n"; - t << " <h3 class=\"swap\"><span>"; - QCString &projName = Config_getString("PROJECT_NAME"); - if (projName.isEmpty()) - { - t << "Root"; - } - else - { - t << projName; - } - t << "</span></h3>\n"; - t << " <div style=\"display: block;\">\n"; - - generateTree(t,m_indentNodes[0],0); - - t << " </div>\n"; - t << " </div>\n"; - - t << " </body>\n"; - t << "</html>\n"; - - f.close(); - } -#endif } diff --git a/src/ftvhelp.h b/src/ftvhelp.h index 5ec0d0d..78e8b7b 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -48,7 +48,9 @@ class FTVHelp : public IndexIntf const char *name, const char *ref, const char *file, - const char *anchor); + const char *anchor, + bool separateIndex=FALSE, + bool addToNavIndex=FALSE); //void addIndexItem(const char *, const char *, // const char *, const char *, // const char *, const MemberDef *) {} @@ -63,7 +65,8 @@ class FTVHelp : public IndexIntf private: void generateScript(FTextStream &t); void generateTree(FTextStream &t,const QList<FTVNode> &nl,int level); - bool generateJSTree(FTextStream &t,const QList<FTVNode> &nl,int level,bool &first); + bool generateJSTree(FTextStream &tidx,FTextStream &t,const QList<FTVNode> &nl,int level,bool &first); + //bool generateJSTreeTopLevel(FTextStream &tidx,FTextStream &t,const QList<FTVNode> &nl,int level,bool &first); void generateIndent(FTextStream &t,FTVNode *n,int level); void generateLink(FTextStream &t,FTVNode *n); void generateJSLink(FTextStream &t,FTVNode *n); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 12de564..1c4567e 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -887,7 +887,7 @@ void GroupDef::writeDocumentation(OutputList &ol) { //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); ol.pushGeneratorState(); - startFile(ol,getOutputFileBase(),name(),title); + startFile(ol,getOutputFileBase(),name(),title,HLI_None); ol.startHeaderSection(); writeSummaryLinks(ol); @@ -1105,7 +1105,7 @@ void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const if (createSubDirs) ol.writeString("../../"); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString("\">"); - ol.writeString(md->localName()); + ol.writeString(convertToHtml(md->localName())); ol.writeString("</a>"); } ol.writeString("</td></tr>\n"); diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 2c5ffb7..8795bb4 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -1657,7 +1657,7 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file, if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension; if (!anchor.isEmpty()) m_t << "#" << anchor; m_t << "\""; - if (!tooltip.isEmpty()) m_t << " title=\"" << tooltip << "\""; + if (!tooltip.isEmpty()) m_t << " title=\"" << substitute(tooltip,"\"",""") << "\""; m_t << ">"; } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index c9ff1f0..0e3a158 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -81,6 +81,10 @@ static const char search_jquery_script3[]= #include "jquery_ui_js.h" ; +static const char search_jquery_script4[]= +#include "jquery_fx_js.h" +; + static const char svgpan_script[]= #include "svgpan_js.h" ; @@ -1095,6 +1099,10 @@ void HtmlGenerator::init() { FTextStream t(&f); t << search_jquery_script1 << search_jquery_script2 << search_jquery_script3; + if (Config_getBool("GENERATE_TREEVIEW")) + { + t << search_jquery_script4; + } } } @@ -1178,7 +1186,13 @@ void HtmlGenerator::writeSearchData(const char *dir) if (f.open(IO_WriteOnly)) { FTextStream t(&f); - t << replaceColorMarkers(search_styleSheet); + QCString searchCss = replaceColorMarkers(search_styleSheet); + if (Config_getBool("DISABLE_INDEX")) + { + // move up the search box if there are no tabs + searchCss = substitute(searchCss,"margin-top: 8px;","margin-top: 0px;"); + } + t << searchCss; } Doxygen::indexList.addStyleSheetFile("search/search.css"); } @@ -1260,24 +1274,34 @@ void HtmlGenerator::startFile(const char *name,const char *, m_sectionCount=0; } -void HtmlGenerator::writeSearchFooter(FTextStream &t,const QCString &relPath) +void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &relPath) +{ + static bool searchEngine = Config_getBool("SEARCHENGINE"); + static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); + if (searchEngine && !serverBasedSearch) + { + (void)relPath; + t << "<!-- window showing the filter options -->\n"; + t << "<div id=\"MSearchSelectWindow\"\n"; + t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n"; + t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n"; + t << " onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n"; + writeSearchCategories(t); + t << "</div>\n"; + t << "\n"; + t << "<!-- iframe showing the search results (closed by default) -->\n"; + t << "<div id=\"MSearchResultsWindow\">\n"; + t << "<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n"; + t << " name=\"MSearchResults\" id=\"MSearchResults\">\n"; + t << "</iframe>\n"; + t << "</div>\n"; + t << "\n"; + } +} + +void HtmlGenerator::writeSearchInfo() { - (void)relPath; - t << "<!-- window showing the filter options -->\n"; - t << "<div id=\"MSearchSelectWindow\"\n"; - t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n"; - t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n"; - t << " onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n"; - writeSearchCategories(t); - t << "</div>\n"; - t << "\n"; - t << "<!-- iframe showing the search results (closed by default) -->\n"; - t << "<div id=\"MSearchResultsWindow\">\n"; - t << "<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n"; - t << " name=\"MSearchResults\" id=\"MSearchResults\">\n"; - t << "</iframe>\n"; - t << "</div>\n"; - t << "\n"; + writeSearchInfo(t,relPath); } @@ -1312,13 +1336,6 @@ void HtmlGenerator::writeLogo() void HtmlGenerator::writePageFooter(FTextStream &t,const QCString &lastTitle,const QCString &relPath) { - static bool searchEngine = Config_getBool("SEARCHENGINE"); - static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); - if (searchEngine /*&& !generateTreeView*/ && !serverBasedSearch) - { - HtmlGenerator::writeSearchFooter(t,relPath); - } - t << substituteHtmlKeywords(g_footer,convertToHtml(lastTitle),relPath); } @@ -2423,15 +2440,10 @@ static void startQuickIndexItem(FTextStream &t,const char *l, bool hl,bool /*compact*/, const QCString &relPath) { - //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); t << " <li"; if (hl) { t << " class=\"current\""; - //if (generateTreeView) - //{ - // t << " onmouseover=\"return navShow('" << l << "')\""; - //} } t << "><a "; t << "href=\"" << relPath << l << "\">"; @@ -2459,12 +2471,15 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind) case LayoutNavEntry::Pages: return indexedPages>0; case LayoutNavEntry::Modules: return documentedGroups>0; case LayoutNavEntry::Namespaces: return documentedNamespaces>0; + case LayoutNavEntry::NamespaceList: return documentedNamespaces>0; case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0; case LayoutNavEntry::Classes: return annotatedClasses>0; - case LayoutNavEntry::ClassAnnotated: return annotatedClasses>0; + case LayoutNavEntry::ClassList: return annotatedClasses>0; + case LayoutNavEntry::ClassIndex: return annotatedClasses>0; case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0; case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0; case LayoutNavEntry::Files: return documentedHtmlFiles>0; + case LayoutNavEntry::FileList: return documentedHtmlFiles>0; case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0; case LayoutNavEntry::Dirs: return documentedDirs>0; case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0; @@ -2494,11 +2509,16 @@ static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,Layout { url+=Doxygen::htmlFileExtension; } - startQuickIndexItem(t,url,FALSE,FALSE,relPath); + t << "<li"; + t << "><a "; + t << "href=\"" << relPath << url << "\">"; + t << "<span>"; t << fixSpaces(entry->title()); + t << "</span>"; + t << "</a>\n"; // recursive into child list renderQuickLinksAsTree(t,relPath,entry); - endQuickIndexItem(t); + t << "</li>"; } } endQuickIndexList(t,FALSE); @@ -2548,7 +2568,7 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath, endQuickIndexItem(t); } } - if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) + if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row { //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool searchEngine = Config_getBool("SEARCHENGINE"); @@ -2584,18 +2604,6 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath, endQuickIndexList(t,TRUE); } } -#if 0 - if (generateTreeView) - { - // add empty rows for the dynamic menus (max 4 levels) - t << " <div id=\"navrow2\" class=\"tabs2\">\n"; - t << " </div>\n"; - t << " <div id=\"navrow3\" class=\"tabs3\">\n"; - t << " </div>\n"; - t << " <div id=\"navrow4\" class=\"tabs3\">\n"; - t << " </div>\n"; - } -#endif } } @@ -2604,25 +2612,29 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, { LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry(); LayoutNavEntry::Kind kind = (LayoutNavEntry::Kind)-1; + LayoutNavEntry::Kind altKind = (LayoutNavEntry::Kind)-1; // fall back for the old layout file bool highlightParent=FALSE; switch (hli) // map HLI enums to LayoutNavEntry::Kind enums { case HLI_Main: kind = LayoutNavEntry::MainPage; break; case HLI_Modules: kind = LayoutNavEntry::Modules; break; case HLI_Directories: kind = LayoutNavEntry::Dirs; break; - case HLI_Namespaces: kind = LayoutNavEntry::Namespaces; break; + case HLI_Namespaces: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces; break; case HLI_Hierarchy: kind = LayoutNavEntry::ClassHierarchy; break; - case HLI_Classes: kind = LayoutNavEntry::Classes; break; - case HLI_Annotated: kind = LayoutNavEntry::ClassAnnotated; break; - case HLI_Files: kind = LayoutNavEntry::Files; break; + case HLI_Classes: kind = LayoutNavEntry::ClassIndex; altKind = LayoutNavEntry::Classes; break; + case HLI_Annotated: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; break; + case HLI_Files: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; break; case HLI_NamespaceMembers: kind = LayoutNavEntry::NamespaceMembers; break; case HLI_Functions: kind = LayoutNavEntry::ClassMembers; break; case HLI_Globals: kind = LayoutNavEntry::FileGlobals; break; case HLI_Pages: kind = LayoutNavEntry::Pages; break; case HLI_Examples: kind = LayoutNavEntry::Examples; break; - case HLI_ClassVisible: kind = LayoutNavEntry::Classes; highlightParent = TRUE; break; - case HLI_NamespaceVisible: kind = LayoutNavEntry::Namespaces; highlightParent = TRUE; break; - case HLI_FileVisible: kind = LayoutNavEntry::Files; highlightParent = TRUE; break; + case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; + highlightParent = TRUE; break; + case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces; + highlightParent = TRUE; break; + case HLI_FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; + highlightParent = TRUE; break; case HLI_None: break; case HLI_Search: break; } @@ -2631,6 +2643,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, { // find highlighted index item LayoutNavEntry *hlEntry = root->find(kind); + if (!hlEntry && altKind!=(LayoutNavEntry::Kind)-1) { hlEntry=root->find(altKind); kind=altKind; } if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index... { highlightParent=TRUE; @@ -2784,70 +2797,13 @@ void HtmlGenerator::writeSearchPage() t << "</div>" << endl; } - // OPENSEARCH_PROVIDER { -#if 0 - t << "\n<script language=\"php\">\n\n"; - t << "function search_results()\n"; - t << "{\n"; - t << " return \"" << theTranslator->trSearchResultsTitle() << "\";\n"; - t << "}\n"; - t << "\n"; - t << "function matches_text($num)\n"; - t << "{\n"; - t << " if ($num==0)\n"; - t << " {\n"; - t << " return \"" << theTranslator->trSearchResults(0) << "\";\n"; - t << " }\n"; - t << " else if ($num==1)\n"; - t << " {\n"; - t << " return \"" << theTranslator->trSearchResults(1) << "\";\n"; - t << " }\n"; - t << " else // $num>1\n"; - t << " {\n"; - t << " return \"" << theTranslator->trSearchResults(2) << "\";\n"; - t << " }\n"; - t << "}\n"; - t << "\n"; - t << "function report_matches()\n"; - t << "{\n"; - t << " return \"" << theTranslator->trSearchMatches() << " \";\n"; - t << "}\n"; - t << "function end_form($value)\n"; - t << "{\n"; - t << " echo \""; - if (!Config_getBool("DISABLE_INDEX")) - { - t << " <input type=\\\"text\\\" id=\\\"MSearchField\\\" name=\\\"query\\\" value=\\\"$value\\\" size=\\\"20\\\" accesskey=\\\"S\\\" " - << "onfocus=\\\"searchBox.OnSearchFieldFocus(true)\\\" " - << "onblur=\\\"searchBox.OnSearchFieldFocus(false)\\\"/>\\n" - << " </form>\\n" - << " </div><div class=\\\"right\\\"></div>\\n" - << " </div>\\n" - << " </li>\\n" - << " </ul>\\n" - << " </div>\\n"; - t << "</div>\\n"; - } - if (generateTreeView) - { - t << substitute(substitute(writeSplitBarAsString("",""), - "\"","\\\""), - "\n","\\n"); - } - t << "\";\n"; - t << "}\n"; - t << "\n"; - t << search_script; - t << "\n"; - t << "</script>\n"; -#endif - // OPENSEARCH_PROVIDER } - t << "<script language=\"php\">\n"; t << "require_once \"search-functions.php\";\n"; t << "main();\n"; t << "</script>\n"; + writeSearchInfo(t,""); + // Write empty navigation path, to make footer connect properly if (generateTreeView) { @@ -2895,30 +2851,6 @@ void HtmlGenerator::writeSearchPage() } -#if 0 -void HtmlGenerator::generateSectionImages() -{ - { - QCString fileName = Config_getString("HTML_OUTPUT")+"/open.png"; - QFile f(fileName); - if (f.open(IO_WriteOnly)) - { - f.writeBlock((char*)open_gif,open_gif_len); - } - Doxygen::indexList.addImageFile("open.png"); - } - { - QCString fileName = Config_getString("HTML_OUTPUT")+"/closed.png"; - QFile f(fileName); - if (f.open(IO_WriteOnly)) - { - f.writeBlock((char*)closed_gif,closed_gif_len); - } - Doxygen::indexList.addImageFile("closed.png"); - } -} -#endif - void HtmlGenerator::startConstraintList(const char *header) { t << "<div class=\"typeconstraint\">" << endl; diff --git a/src/htmlgen.h b/src/htmlgen.h index aa4c0b1..b31f6e1 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -37,7 +37,7 @@ class HtmlGenerator : public OutputGenerator static void writeHeaderFile(QFile &f, const char *cssname); static void writeFooterFile(QFile &f); static void writeTabData(); - static void writeSearchFooter(FTextStream &t,const QCString &relPath); + static void writeSearchInfo(FTextStream &t,const QCString &relPath); static void writeSearchData(const char *dir); static void writeSearchPage(); static QCString writeLogoAsString(const char *path); @@ -58,6 +58,7 @@ class HtmlGenerator : public OutputGenerator void writeFooter(); void endFile(); void clearBuffer(); + void writeSearchInfo(); void startIndexSection(IndexSections) {} void endIndexSection(IndexSections) {} diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 4d16c14..21cdbcc 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -13,9 +13,8 @@ * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * - * The code is this file is largely based on a contribution from - * Harm van der Heijden <H.v.d.Heijden@phys.tue.nl> - * Please send thanks to him and bug reports to me :-) + * The original version of this file is largely based on a contribution from + * Harm van der Heijden. */ #include <stdio.h> @@ -629,12 +628,16 @@ QCString HtmlHelp::recode(const QCString &s) * \param ref the URL of to the item. * \param file the file in which the item is defined. * \param anchor the anchor of the item. + * \param separateIndex not used. + * \param addToNavIndex not used. */ void HtmlHelp::addContentsItem(bool isDir, const char *name, const char * /*ref*/, const char *file, - const char *anchor) + const char *anchor, + bool /* separateIndex */, + bool /* addToNavIndex */) { // If we're using a binary toc then folders cannot have links. if(Config_getBool("BINARY_TOC") && isDir) diff --git a/src/htmlhelp.h b/src/htmlhelp.h index a600e77..bba4efe 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -71,9 +71,11 @@ class HtmlHelp : public IndexIntf void decContentsDepth(); void addContentsItem(bool isDir, const char *name, - const char *ref = 0, - const char *file = 0, - const char *anchor = 0); + const char *ref, + const char *file, + const char *anchor, + bool separateIndex, + bool addToNavIndex); //void addIndexItem(const char *level1, const char *level2, // const char *contRef, const char *memRef, // const char *anchor,const MemberDef *md); diff --git a/src/index.cpp b/src/index.cpp index a72a0c6..f244c47 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -69,17 +69,17 @@ int documentedHtmlFiles; int documentedPages; int documentedDirs; -int countClassHierarchy(); -int countClassMembers(int filter=CMHL_All); -int countFileMembers(int filter=FMHL_All); -void countFiles(int &htmlFiles,int &files); -int countGroups(); -int countDirs(); -int countNamespaces(); -int countAnnotatedClasses(int *cp); -int countNamespaceMembers(int filter=NMHL_All); -int countIncludeFiles(); -void countRelatedPages(int &docPages,int &indexPages); +static int countClassHierarchy(); +//static int countClassMembers(int filter=CMHL_All); +//static int countFileMembers(int filter=FMHL_All); +static void countFiles(int &htmlFiles,int &files); +static int countGroups(); +static int countDirs(); +static int countNamespaces(); +static int countAnnotatedClasses(int *cp); +//static int countNamespaceMembers(int filter=NMHL_All); +//static int countIncludeFiles(); +static void countRelatedPages(int &docPages,int &indexPages); void countDataStructures() { @@ -149,7 +149,7 @@ const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX; //---------------------------------------------------------------------------- // strips w from s iff s starts with w -bool stripWord(QCString &s,QCString w) +static bool stripWord(QCString &s,QCString w) { bool success=FALSE; if (s.left(w.length())==w) @@ -162,7 +162,7 @@ bool stripWord(QCString &s,QCString w) //---------------------------------------------------------------------------- // some quasi intelligent brief description abbreviator :^) -QCString abbreviate(const char *s,const char *name) +static QCString abbreviate(const char *s,const char *name) { QCString scopelessName=name; int i=scopelessName.findRev("::"); @@ -322,6 +322,7 @@ void endFile(OutputList &ol,bool skipNavIndex) if (!skipNavIndex) { ol.endContents(); + ol.writeSearchInfo(); if (generateTreeView) { ol.writeString("</div>\n"); @@ -334,6 +335,61 @@ void endFile(OutputList &ol,bool skipNavIndex) ol.endFile(); } +//---------------------------------------------------------------------- +template<class T> void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,const QCString &name,const QCString &anchor) +{ + bool hasMembers = def->getMemberLists().count()>0 || def->getMemberGroupSDict()!=0; + Doxygen::indexList.addContentsItem(hasMembers,name,def->getReference(),def->getOutputFileBase(),anchor,hasMembers,TRUE); + if (hasMembers) + { + Doxygen::indexList.incContentsDepth(); + QListIterator<LayoutDocEntry> eli(LayoutDocManager::instance().docEntries(part)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + if (lde->kind()==LayoutDocEntry::MemberDef) + { + LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde; + MemberList *ml = def->getMemberList(lmd->type); + if (ml) + { + MemberListIterator mi(*ml); + MemberDef *md; + for (mi.toFirst();(md=mi.current());++mi) + { + if (md->name().find('@')==-1) + { + Doxygen::indexList.addContentsItem(FALSE, + md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE); + } + } + } + } + else if (lde->kind()==LayoutDocEntry::NamespaceClasses || + lde->kind()==LayoutDocEntry::FileClasses) + { + ClassSDict *classes = def->getClassSDict(); + if (classes) + { + ClassDef *cd; + ClassSDict::Iterator it(*classes); + for (;(cd=it.current());++it) + { + if (cd->getOuterScope()==def) + { + Doxygen::indexList.addContentsItem(FALSE, + cd->localName(), + cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE); + } + } + } + } + } + + Doxygen::indexList.decContentsDepth(); + } +} + //---------------------------------------------------------------------------- static bool classHasVisibleChildren(ClassDef *cd) @@ -362,7 +418,7 @@ static bool classHasVisibleChildren(ClassDef *cd) return FALSE; } -void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,FTVHelp* ftv) +static void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,FTVHelp* ftv) { if (bcl==0) return; BaseClassListIterator bcli(*bcl); @@ -449,7 +505,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,F //---------------------------------------------------------------------------- /*! Generates HTML Help tree of classes */ -void writeClassTree(BaseClassList *cl,int level) +static void writeClassTree(BaseClassList *cl,int level) { if (cl==0) return; BaseClassListIterator cli(*cl); @@ -484,10 +540,11 @@ void writeClassTree(BaseClassList *cl,int level) } } +#if 0 //---------------------------------------------------------------------------- /*! Generates HTML Help tree of classes */ -void writeClassTreeNode(ClassDef *cd,bool &started,int level) +static void writeClassTreeNode(ClassDef *cd,bool &started,int level) { //printf("writeClassTreeNode(%s) visited=%d\n",cd->name().data(),cd->visited); if (cd->isVisibleInHierarchy() && !cd->visited) @@ -517,7 +574,7 @@ void writeClassTreeNode(ClassDef *cd,bool &started,int level) } } -void writeClassTree(ClassList *cl,int level) +static void writeClassTree(ClassList *cl,int level) { if (cl==0) return; ClassListIterator cli(*cl); @@ -532,7 +589,7 @@ void writeClassTree(ClassList *cl,int level) } } -void writeClassTree(ClassSDict *d,int level) +static void writeClassTree(ClassSDict *d,int level) { if (d==0) return; ClassSDict::Iterator cli(*d); @@ -546,6 +603,7 @@ void writeClassTree(ClassSDict *d,int level) writeClassTreeNode(cli.current(),started,level); } } +#endif //---------------------------------------------------------------------------- @@ -601,7 +659,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT ol.docify(" [external]"); ol.endTypewriter(); } - Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor()); + Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE); if (ftv) ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor()); } @@ -610,7 +668,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT ol.startIndexItem(0,0); ol.parseText(cd->displayName()); ol.endIndexItem(0,0); - Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),0,0,0); + Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE); if (ftv) ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0); } @@ -630,7 +688,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT } } -void writeClassHierarchy(OutputList &ol, FTVHelp* ftv) +static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv) { initClassHierarchy(Doxygen::classSDict); initClassHierarchy(Doxygen::hiddenClasses); @@ -674,7 +732,7 @@ static int countClassesInTreeList(const ClassSDict &cl) return count; } -int countClassHierarchy() +static int countClassHierarchy() { int count=0; initClassHierarchy(Doxygen::classSDict); @@ -686,20 +744,20 @@ int countClassHierarchy() //---------------------------------------------------------------------------- -void writeHierarchicalIndex(OutputList &ol) +static void writeHierarchicalIndex(OutputList &ol) { if (hierarchyClasses==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trClassHierarchy(); startFile(ol,"hierarchy",0, title, HLI_Hierarchy); startTitle(ol,0); ol.parseText(title); endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"hierarchy",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"hierarchy",0,TRUE,TRUE); if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY")) { ol.disable(OutputGenerator::Latex); @@ -712,7 +770,7 @@ void writeHierarchicalIndex(OutputList &ol) ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::RTF); } - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription()); ol.endTextBlock(); FTVHelp* ftv = 0; @@ -741,30 +799,23 @@ void writeHierarchicalIndex(OutputList &ol) //---------------------------------------------------------------------------- -void writeGraphicalClassHierarchy(OutputList &ol) +static void writeGraphicalClassHierarchy(OutputList &ol) { if (hierarchyClasses==0) return; ol.disableAllBut(OutputGenerator::Html); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trClassHierarchy(); startFile(ol,"inherits",0,title,HLI_Hierarchy,FALSE,"hierarchy"); startTitle(ol,0); - //if (!Config_getString("PROJECT_NAME").isEmpty()) - //{ - // title.prepend(Config_getString("PROJECT_NAME")+" "); - //} ol.parseText(title); endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - //Doxygen::indexList.addContentsItem(FALSE,theTranslator->trGraphicalHierarchy(),0,"inherits",0); ol.startParagraph(); ol.startTextLink("hierarchy",0); ol.parseText(theTranslator->trGotoTextualHierarchy()); ol.endTextLink(); ol.endParagraph(); - //parseText(ol,theTranslator->trClassHierarchyDescription()); - //ol.newParagraph(); ol.endTextBlock(); DotGfxHierarchyTable g; ol.writeGraphicalHierarchy(g); @@ -774,7 +825,7 @@ void writeGraphicalClassHierarchy(OutputList &ol) //---------------------------------------------------------------------------- -void countFiles(int &htmlFiles,int &files) +static void countFiles(int &htmlFiles,int &files) { htmlFiles=0; files=0; @@ -806,14 +857,15 @@ void countFiles(int &htmlFiles,int &files) //---------------------------------------------------------------------------- -void writeFileIndex(OutputList &ol) +static void writeFileIndex(OutputList &ol) { if (documentedHtmlFiles==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); if (documentedFiles==0) ol.disableAllBut(OutputGenerator::Html); - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); - QCString title = lne->title(); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList); + if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back + QCString title = lne ? lne->title() : theTranslator->trFileList(); startFile(ol,"files",0,title,HLI_Files); startTitle(ol,0); //if (!Config_getString("PROJECT_NAME").isEmpty()) @@ -824,9 +876,9 @@ void writeFileIndex(OutputList &ol) endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"files",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"files",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool("EXTRACT_ALL"))); ol.endTextBlock(); OutputNameDict outputNameDict(1009); @@ -903,7 +955,7 @@ void writeFileIndex(OutputList &ol) if (doc) { ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name()); - Doxygen::indexList.addContentsItem(FALSE,fullName,fd->getReference(),fd->getOutputFileBase(),0); + addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString()); } else { @@ -964,7 +1016,7 @@ void writeFileIndex(OutputList &ol) } //---------------------------------------------------------------------------- -int countNamespaces() +static int countNamespaces() { int count=0; NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); @@ -978,13 +1030,14 @@ int countNamespaces() //---------------------------------------------------------------------------- -void writeNamespaceIndex(OutputList &ol) +static void writeNamespaceIndex(OutputList &ol) { if (documentedNamespaces==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); - QCString title = lne->title(); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList); + if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back + QCString title = lne ? lne->title() : theTranslator->trNamespaceList(); startFile(ol,"namespaces",0,title,HLI_Namespaces); startTitle(ol,0); //if (!Config_getString("PROJECT_NAME").isEmpty()) @@ -995,9 +1048,9 @@ void writeNamespaceIndex(OutputList &ol) endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"namespaces",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"namespaces",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool("EXTRACT_ALL"))); ol.endTextBlock(); bool first=TRUE; @@ -1036,7 +1089,8 @@ void writeNamespaceIndex(OutputList &ol) } ol.endIndexValue(nd->getOutputFileBase(),hasBrief); //ol.writeEndAnnoItem(nd->getOutputFileBase()); - Doxygen::indexList.addContentsItem(FALSE,nd->displayName(),nd->getReference(),nd->getOutputFileBase(),0); + //Doxygen::indexList.addContentsItem(FALSE,nd->displayName(),nd->getReference(),nd->getOutputFileBase(),0); + addMembersToIndex(nd,LayoutDocManager::Namespace,nd->displayName(),QCString()); } } if (!first) ol.endIndexList(); @@ -1047,7 +1101,7 @@ void writeNamespaceIndex(OutputList &ol) //---------------------------------------------------------------------------- -int countAnnotatedClasses(int *cp) +static int countAnnotatedClasses(int *cp) { int count=0; int countPrinted=0; @@ -1069,9 +1123,7 @@ int countAnnotatedClasses(int *cp) } -//---------------------------------------------------------------------- - -void writeAnnotatedClassList(OutputList &ol) +static void writeAnnotatedClassList(OutputList &ol) { ol.startIndexList(); ClassSDict::Iterator cli(*Doxygen::classSDict); @@ -1160,8 +1212,8 @@ void writeAnnotatedClassList(OutputList &ol) ); } ol.endIndexValue(cd->getOutputFileBase(),hasBrief); - //ol.writeEndAnnoItem(cd->getOutputFileBase()); - Doxygen::indexList.addContentsItem(FALSE,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor()); + + addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor()); } ol.popGeneratorState(); } @@ -1244,7 +1296,7 @@ class AlphaIndexTableColumns : public QList<AlphaIndexTableRows> }; // write an alphabetical index of all class with a header for each letter -void writeAlphabeticalClassList(OutputList &ol) +static void writeAlphabeticalClassList(OutputList &ol) { //ol.startAlphabeticalIndexList(); // What starting letters are used @@ -1478,17 +1530,17 @@ void writeAlphabeticalClassList(OutputList &ol) //---------------------------------------------------------------------------- -void writeAlphabeticalIndex(OutputList &ol) +static void writeAlphabeticalIndex(OutputList &ol) { if (annotatedClasses==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes); - QCString title = lne->title(); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex); + QCString title = lne ? lne->title() : theTranslator->trCompoundIndex(); startFile(ol,"classes",0,title,HLI_Classes); startTitle(ol,0); ol.parseText(title); - Doxygen::indexList.addContentsItem(TRUE,title,0,"classes",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"classes",0,TRUE,TRUE); //ol.parseText(/*Config_getString("PROJECT_NAME")+" "+*/ // (fortranOpt ? theTranslator->trCompoundIndexFortran() : // vhdlOpt ? VhdlDocGen::trDesignUnitIndex() : @@ -1503,7 +1555,7 @@ void writeAlphabeticalIndex(OutputList &ol) //---------------------------------------------------------------------------- -void writeAnnotatedIndex(OutputList &ol) +static void writeAnnotatedIndex(OutputList &ol) { //printf("writeAnnotatedIndex: count=%d printed=%d\n", // annotatedClasses,annotatedClassesPrinted); @@ -1516,8 +1568,9 @@ void writeAnnotatedIndex(OutputList &ol) ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); } - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassAnnotated); - QCString title = lne->title(); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList); + if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes); // fall back + QCString title = lne ? lne->title() : theTranslator->trCompoundList(); startFile(ol,"annotated",0,title,HLI_Annotated); startTitle(ol,0); //QCString longTitle = title; @@ -1529,9 +1582,9 @@ void writeAnnotatedIndex(OutputList &ol) endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"annotated",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"annotated",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trCompoundListDescription()); ol.endTextBlock(); writeAnnotatedClassList(ol); Doxygen::indexList.decContentsDepth(); @@ -1893,7 +1946,7 @@ void addFileMemberNameToIndex(MemberDef *md) //---------------------------------------------------------------------------- -void writeQuickMemberIndex(OutputList &ol, +static void writeQuickMemberIndex(OutputList &ol, MemberIndexList charUsed[MEMBER_INDEX_ENTRIES],int page, QCString fullName,bool multiPage) { @@ -1974,9 +2027,13 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h QCString extension=Doxygen::htmlFileExtension; LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trCompoundMembers(); if (hl!=CMHL_All) title+=(QCString)" - "+getCmhlInfo(hl)->title; + Doxygen::indexList.addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,0, + getCmhlInfo(hl)->fname,0,multiPageIndex,TRUE); + if (multiPageIndex) Doxygen::indexList.incContentsDepth(); + int page; bool first=TRUE; for (page=0;page<numPages;page++) @@ -1984,9 +2041,16 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h if (!multiPageIndex || g_memberIndexLetterUsed[hl][page].count()>0) { QCString fileName = getCmhlInfo(hl)->fname; - if (multiPageIndex && !first) + if (multiPageIndex) { - fileName+=QCString().sprintf("_0x%02x",page); + if (!first) + { + fileName+=QCString().sprintf("_0x%02x",page); + } + char cs[2]; + cs[0]=page; + cs[1]=0; + Doxygen::indexList.addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); } bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex; @@ -1995,50 +2059,52 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h if (!disableIndex) { ol.writeQuickLinks(TRUE,HLI_Functions); - } - startQuickIndexList(ol); + startQuickIndexList(ol); - // index item for global member list - startQuickIndexItem(ol, - getCmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first); - ol.writeString(fixSpaces(getCmhlInfo(0)->title)); - endQuickIndexItem(ol); + // index item for global member list + startQuickIndexItem(ol, + getCmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first); + ol.writeString(fixSpaces(getCmhlInfo(0)->title)); + endQuickIndexItem(ol); - // index items per category member lists - int i; - for (i=1;i<CMHL_Total;i++) - { - if (documentedClassMembers[i]>0) + int i; + // index items per category member lists + for (i=1;i<CMHL_Total;i++) { - startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first); - ol.writeString(fixSpaces(getCmhlInfo(i)->title)); - //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n", - // multiPageIndex,first,fileName.data(),getCmhlInfo(i)->fname,getCmhlInfo(i)->title.data()); - endQuickIndexItem(ol); + if (documentedClassMembers[i]>0) + { + startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first); + ol.writeString(fixSpaces(getCmhlInfo(i)->title)); + //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n", + // multiPageIndex,first,fileName.data(),getCmhlInfo(i)->fname,getCmhlInfo(i)->title.data()); + endQuickIndexItem(ol); + } } - } - endQuickIndexList(ol); + endQuickIndexList(ol); - // quick alphabetical index - if (quickIndex) - { - writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl],page, - getCmhlInfo(hl)->fname,multiPageIndex); + // quick alphabetical index + if (quickIndex) + { + writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl],page, + getCmhlInfo(hl)->fname,multiPageIndex); + } } ol.endQuickIndices(); if (generateTreeView) { - ol.writeSplitBar(getCmhlInfo(0)->fname); + ol.writeSplitBar(fileName); } + //Doxygen::indexList.addContentsItem(FALSE,title,0,fileName,0); + ol.startContents(); if (hl==CMHL_All) { ol.startTextBlock(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL"))); ol.endTextBlock(); } else @@ -2056,12 +2122,20 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h first=FALSE; } } + + if (multiPageIndex) Doxygen::indexList.decContentsDepth(); ol.popGeneratorState(); } -void writeClassMemberIndex(OutputList &ol) +static void writeClassMemberIndex(OutputList &ol) { + if (documentedClassMembers[CMHL_All]>0) + { + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers); + Doxygen::indexList.addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0); + Doxygen::indexList.incContentsDepth(); + } writeClassMemberIndexFiltered(ol,CMHL_All); writeClassMemberIndexFiltered(ol,CMHL_Functions); writeClassMemberIndexFiltered(ol,CMHL_Variables); @@ -2071,12 +2145,11 @@ void writeClassMemberIndex(OutputList &ol) writeClassMemberIndexFiltered(ol,CMHL_Properties); writeClassMemberIndexFiltered(ol,CMHL_Events); writeClassMemberIndexFiltered(ol,CMHL_Related); - if (documentedClassMembers[CMHL_All]>0) { - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers); - Doxygen::indexList.addContentsItem(FALSE,lne->title(),0,"functions",0); + Doxygen::indexList.decContentsDepth(); } + } //---------------------------------------------------------------------------- @@ -2128,7 +2201,11 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) QCString extension=Doxygen::htmlFileExtension; LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trFileMembers(); + + Doxygen::indexList.addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,0, + getFmhlInfo(hl)->fname,0,multiPageIndex,TRUE); + if (multiPageIndex) Doxygen::indexList.incContentsDepth(); int page; bool first=TRUE; @@ -2137,9 +2214,16 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) if (!multiPageIndex || g_fileIndexLetterUsed[hl][page].count()>0) { QCString fileName = getFmhlInfo(hl)->fname; - if (multiPageIndex && !first) + if (multiPageIndex) { - fileName+=QCString().sprintf("_0x%02x",page); + if (!first) + { + fileName+=QCString().sprintf("_0x%02x",page); + } + char cs[2]; + cs[0]=page; + cs[1]=0; + Doxygen::indexList.addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); } bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex; @@ -2148,40 +2232,40 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) if (!disableIndex) { ol.writeQuickLinks(TRUE,HLI_Globals); - } - startQuickIndexList(ol); + startQuickIndexList(ol); - // index item for all member lists - startQuickIndexItem(ol, - getFmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==FMHL_All,TRUE,first); - ol.writeString(fixSpaces(getFmhlInfo(0)->title)); - endQuickIndexItem(ol); + // index item for all file member lists + startQuickIndexItem(ol, + getFmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==FMHL_All,TRUE,first); + ol.writeString(fixSpaces(getFmhlInfo(0)->title)); + endQuickIndexItem(ol); - int i; - // index items for per category member lists - for (i=1;i<FMHL_Total;i++) - { - if (documentedFileMembers[i]>0) + int i; + // index items for per category member lists + for (i=1;i<FMHL_Total;i++) { - startQuickIndexItem(ol, - getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first); - ol.writeString(fixSpaces(getFmhlInfo(i)->title)); - endQuickIndexItem(ol); + if (documentedFileMembers[i]>0) + { + startQuickIndexItem(ol, + getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first); + ol.writeString(fixSpaces(getFmhlInfo(i)->title)); + endQuickIndexItem(ol); + } } - } - endQuickIndexList(ol); + endQuickIndexList(ol); - if (quickIndex) - { - writeQuickMemberIndex(ol,g_fileIndexLetterUsed[hl],page, - getFmhlInfo(hl)->fname,multiPageIndex); + if (quickIndex) + { + writeQuickMemberIndex(ol,g_fileIndexLetterUsed[hl],page, + getFmhlInfo(hl)->fname,multiPageIndex); + } } ol.endQuickIndices(); if (generateTreeView) { - ol.writeSplitBar(getFmhlInfo(0)->fname); + ol.writeSplitBar(fileName); } ol.startContents(); @@ -2189,7 +2273,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) if (hl==FMHL_All) { ol.startTextBlock(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL"))); ol.endTextBlock(); } else @@ -2208,11 +2292,18 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) first=FALSE; } } + if (multiPageIndex) Doxygen::indexList.decContentsDepth(); ol.popGeneratorState(); } -void writeFileMemberIndex(OutputList &ol) +static void writeFileMemberIndex(OutputList &ol) { + if (documentedFileMembers[FMHL_All]>0) + { + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals); + Doxygen::indexList.addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0); + Doxygen::indexList.incContentsDepth(); + } writeFileMemberIndexFiltered(ol,FMHL_All); writeFileMemberIndexFiltered(ol,FMHL_Functions); writeFileMemberIndexFiltered(ol,FMHL_Variables); @@ -2220,12 +2311,11 @@ void writeFileMemberIndex(OutputList &ol) writeFileMemberIndexFiltered(ol,FMHL_Enums); writeFileMemberIndexFiltered(ol,FMHL_EnumValues); writeFileMemberIndexFiltered(ol,FMHL_Defines); - if (documentedFileMembers[FMHL_All]>0) { - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals); - Doxygen::indexList.addContentsItem(FALSE,lne->title(),0,"globals",0); + Doxygen::indexList.decContentsDepth(); } + } //---------------------------------------------------------------------------- @@ -2279,7 +2369,11 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, QCString extension=Doxygen::htmlFileExtension; LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers(); + + Doxygen::indexList.addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,0, + getNmhlInfo(hl)->fname,0,multiPageIndex,TRUE); + if (multiPageIndex) Doxygen::indexList.incContentsDepth(); int page; bool first=TRUE; @@ -2288,9 +2382,16 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, if (!multiPageIndex || g_namespaceIndexLetterUsed[hl][page].count()>0) { QCString fileName = getNmhlInfo(hl)->fname; - if (multiPageIndex && !first) + if (multiPageIndex) { - fileName+=QCString().sprintf("_0x%02x",page); + if (!first) + { + fileName+=QCString().sprintf("_0x%02x",page); + } + char cs[2]; + cs[0]=page; + cs[1]=0; + Doxygen::indexList.addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); } bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex; @@ -2299,39 +2400,41 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, if (!disableIndex) { ol.writeQuickLinks(TRUE,HLI_NamespaceMembers); - } - startQuickIndexList(ol); + startQuickIndexList(ol); - startQuickIndexItem(ol, - getNmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==NMHL_All,TRUE,first); - ol.writeString(fixSpaces(getNmhlInfo(0)->title)); - endQuickIndexItem(ol); + // index item for all namespace member lists + startQuickIndexItem(ol, + getNmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==NMHL_All,TRUE,first); + ol.writeString(fixSpaces(getNmhlInfo(0)->title)); + endQuickIndexItem(ol); - int i; - for (i=1;i<NMHL_Total;i++) - { - if (documentedNamespaceMembers[i]>0) + int i; + // index items per category member lists + for (i=1;i<NMHL_Total;i++) { - startQuickIndexItem(ol, - getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first); - ol.writeString(fixSpaces(getNmhlInfo(i)->title)); - endQuickIndexItem(ol); + if (documentedNamespaceMembers[i]>0) + { + startQuickIndexItem(ol, + getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first); + ol.writeString(fixSpaces(getNmhlInfo(i)->title)); + endQuickIndexItem(ol); + } } - } - endQuickIndexList(ol); + endQuickIndexList(ol); - if (quickIndex) - { - writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed[hl],page, - getNmhlInfo(hl)->fname,multiPageIndex); - } + if (quickIndex) + { + writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed[hl],page, + getNmhlInfo(hl)->fname,multiPageIndex); + } + } ol.endQuickIndices(); if (generateTreeView) { - ol.writeSplitBar(getNmhlInfo(0)->fname); + ol.writeSplitBar(fileName); } ol.startContents(); @@ -2339,7 +2442,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, if (hl==NMHL_All) { ol.startTextBlock(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL"))); ol.endTextBlock(); } else @@ -2358,11 +2461,18 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, endFile(ol); } } + if (multiPageIndex) Doxygen::indexList.decContentsDepth(); ol.popGeneratorState(); } -void writeNamespaceMemberIndex(OutputList &ol) +static void writeNamespaceMemberIndex(OutputList &ol) { + if (documentedNamespaceMembers[NMHL_All]>0) + { + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers); + Doxygen::indexList.addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0); + Doxygen::indexList.incContentsDepth(); + } //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); writeNamespaceMemberIndexFiltered(ol,NMHL_All); writeNamespaceMemberIndexFiltered(ol,NMHL_Functions); @@ -2370,12 +2480,11 @@ void writeNamespaceMemberIndex(OutputList &ol) writeNamespaceMemberIndexFiltered(ol,NMHL_Typedefs); writeNamespaceMemberIndexFiltered(ol,NMHL_Enums); writeNamespaceMemberIndexFiltered(ol,NMHL_EnumValues); - if (documentedNamespaceMembers[NMHL_All]>0) { - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers); - Doxygen::indexList.addContentsItem(FALSE,lne->title(),0,"namespacemembers",0); + Doxygen::indexList.decContentsDepth(); } + } //---------------------------------------------------------------------------- @@ -3035,22 +3144,22 @@ void writeSearchCategories(FTextStream &t) //---------------------------------------------------------------------------- -void writeExampleIndex(OutputList &ol) +static void writeExampleIndex(OutputList &ol) { if (Doxygen::exampleSDict->count()==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trExamples(); startFile(ol,"examples",0,title,HLI_Examples); startTitle(ol,0); ol.parseText(title); endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"examples",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription()); ol.endTextBlock(); ol.startItemList(); PageSDict::Iterator pdi(*Doxygen::exampleSDict); @@ -3062,12 +3171,12 @@ void writeExampleIndex(OutputList &ol) if (!pd->title().isEmpty()) { ol.writeObjectLink(0,n,0,pd->title()); - Doxygen::indexList.addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,0); + Doxygen::indexList.addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,0,FALSE,TRUE); } else { ol.writeObjectLink(0,n,0,pd->name()); - Doxygen::indexList.addContentsItem(FALSE,pd->name(),pd->getReference(),n,0); + Doxygen::indexList.addContentsItem(FALSE,pd->name(),pd->getReference(),n,0,FALSE,TRUE); } ol.endItemListItem(); ol.writeString("\n"); @@ -3156,7 +3265,7 @@ bool writeMemberNavIndex(FTextStream &t, //---------------------------------------------------------------------------- -bool writeFullNavIndex(FTextStream &t, LayoutNavEntry *root,int indent,bool &first) +static bool writeFullNavIndex(FTextStream &t, LayoutNavEntry *root,int indent,bool &first) { static struct NavEntryCountMap { @@ -3168,12 +3277,15 @@ bool writeFullNavIndex(FTextStream &t, LayoutNavEntry *root,int indent,bool &fir { LayoutNavEntry::Pages, indexedPages>0 }, { LayoutNavEntry::Modules, documentedGroups>0 }, { LayoutNavEntry::Namespaces, documentedNamespaces>0 }, + { LayoutNavEntry::NamespaceList, documentedNamespaces>0 }, { LayoutNavEntry::NamespaceMembers, documentedNamespaceMembers[NMHL_All]>0 }, { LayoutNavEntry::Classes, annotatedClasses>0 }, - { LayoutNavEntry::ClassAnnotated, annotatedClasses>0 }, + { LayoutNavEntry::ClassList, annotatedClasses>0 }, + { LayoutNavEntry::ClassIndex, annotatedClasses>0 }, { LayoutNavEntry::ClassHierarchy, hierarchyClasses>0 }, { LayoutNavEntry::ClassMembers, documentedClassMembers[CMHL_All]>0 }, { LayoutNavEntry::Files, documentedFiles>0 }, + { LayoutNavEntry::FileList, documentedFiles>0 }, { LayoutNavEntry::FileGlobals, documentedFileMembers[FMHL_All]>0 }, { LayoutNavEntry::Dirs, documentedDirs>0 }, { LayoutNavEntry::Examples, Doxygen::exampleSDict->count()>0 } @@ -3237,7 +3349,7 @@ bool writeFullNavIndex(FTextStream &t, LayoutNavEntry *root,int indent,bool &fir //---------------------------------------------------------------------------- -void countRelatedPages(int &docPages,int &indexPages) +static void countRelatedPages(int &docPages,int &indexPages) { docPages=indexPages=0; PageSDict::Iterator pdi(*Doxygen::pageSDict); @@ -3278,7 +3390,7 @@ static void writeSubPages(PageDef *pd) bool hasSubPages = subPage->hasSubPages(); - Doxygen::indexList.addContentsItem(hasSubPages,pageTitle,subPage->getReference(),subPage->getOutputFileBase(),0); + Doxygen::indexList.addContentsItem(hasSubPages,pageTitle,subPage->getReference(),subPage->getOutputFileBase(),0,hasSubPages,TRUE); writeSubPages(subPage); } } @@ -3286,13 +3398,13 @@ static void writeSubPages(PageDef *pd) } -void writePageIndex(OutputList &ol) +static void writePageIndex(OutputList &ol) { if (indexedPages==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trRelatedPages(); startFile(ol,"pages",0,title,HLI_Pages); startTitle(ol,0); //if (!Config_getString("PROJECT_NAME").isEmpty()) @@ -3303,9 +3415,9 @@ void writePageIndex(OutputList &ol) endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"pages",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"pages",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription()); ol.endTextBlock(); startIndexHierarchy(ol,0); PageSDict::Iterator pdi(*Doxygen::pageSDict); @@ -3334,7 +3446,7 @@ void writePageIndex(OutputList &ol) ol.endTypewriter(); } ol.writeString("\n"); - Doxygen::indexList.addContentsItem(hasSubPages,filterTitle(pageTitle),pd->getReference(),pd->getOutputFileBase(),0); + Doxygen::indexList.addContentsItem(hasSubPages,filterTitle(pageTitle),pd->getReference(),pd->getOutputFileBase(),0,hasSubPages,TRUE); writeSubPages(pd); ol.endIndexListItem(); } @@ -3347,7 +3459,7 @@ void writePageIndex(OutputList &ol) //---------------------------------------------------------------------------- -int countGroups() +static int countGroups() { int count=0; GroupSDict::Iterator gli(*Doxygen::groupSDict); @@ -3365,7 +3477,7 @@ int countGroups() //---------------------------------------------------------------------------- -int countDirs() +static int countDirs() { int count=0; SDict<DirDef>::Iterator dli(*Doxygen::directories); @@ -3413,7 +3525,7 @@ void writeGraphInfo(OutputList &ol) ol.popGeneratorState(); } -void writeGroupIndexItem(GroupDef *gd,MemberList *ml,const QCString &title) +static void writeGroupIndexItem(GroupDef *gd,MemberList *ml,const QCString &title) { if (ml && ml->count()>0) { @@ -3426,10 +3538,10 @@ void writeGroupIndexItem(GroupDef *gd,MemberList *ml,const QCString &title) if (first) { first=FALSE; - Doxygen::indexList.addContentsItem(TRUE, convertToHtml(title,TRUE), gd->getReference(), gd->getOutputFileBase(), 0); + Doxygen::indexList.addContentsItem(TRUE, convertToHtml(title,TRUE), gd->getReference(), gd->getOutputFileBase(), 0,TRUE,FALSE); Doxygen::indexList.incContentsDepth(); } - Doxygen::indexList.addContentsItem(FALSE,md->name(),md->getReference(),md->getOutputFileBase(),md->anchor()); + Doxygen::indexList.addContentsItem(FALSE,md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,TRUE); } md=ml->next(); } @@ -3488,7 +3600,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ftv) bool isDir = hasSubGroups || hasSubPages || numSubItems>0; //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count()); - Doxygen::indexList.addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0); + Doxygen::indexList.addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE); Doxygen::indexList.incContentsDepth(); if (ftv) { @@ -3524,7 +3636,9 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ftv) convertToHtml(pd->title(),TRUE), gd->getReference(), gd->getOutputFileBase(), - si ? si->label.data() : 0); + si ? si->label.data() : 0, + FALSE, + TRUE); // addToNavIndex } // write subgroups @@ -3643,7 +3757,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ftv) } } -void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv) +static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv) { if (ftv) { @@ -3667,7 +3781,7 @@ void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv) } //---------------------------------------------------------------------------- -void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv) +static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv) { if (level>20) { @@ -3684,7 +3798,7 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv) dd->getFiles() && dd->getFiles()->count()>0 // there are files ); //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count()); - Doxygen::indexList.addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0); + Doxygen::indexList.addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); if (ftv) { @@ -3725,7 +3839,10 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv) FileDef *fd=fileList->first(); while (fd) { - Doxygen::indexList.addContentsItem(FALSE, convertToHtml(fd->name(),TRUE),fd->getReference(), fd->getOutputFileBase(), 0); + if (fd->isLinkable()) + { + Doxygen::indexList.addContentsItem(FALSE, convertToHtml(fd->name(),TRUE),fd->getReference(), fd->getOutputFileBase(), 0); + } fd=fileList->next(); } } @@ -3737,7 +3854,7 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv) ftv->decContentsDepth(); } -void writeDirHierarchy(OutputList &ol, FTVHelp* ftv) +static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv) { if (ftv) { @@ -3758,13 +3875,13 @@ void writeDirHierarchy(OutputList &ol, FTVHelp* ftv) //---------------------------------------------------------------------------- -void writeGroupIndex(OutputList &ol) +static void writeGroupIndex(OutputList &ol) { if (documentedGroups==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trModules(); startFile(ol,"modules",0,title,HLI_Modules); startTitle(ol,0); //QCString title = theTranslator->trModules(); @@ -3776,9 +3893,9 @@ void writeGroupIndex(OutputList &ol) endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"modules",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trModulesDescription()); ol.endTextBlock(); FTVHelp* ftv = 0; @@ -3808,13 +3925,13 @@ void writeGroupIndex(OutputList &ol) //---------------------------------------------------------------------------- -void writeDirIndex(OutputList &ol) +static void writeDirIndex(OutputList &ol) { if (documentedDirs==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Dirs); - QCString title = lne->title(); + QCString title = lne ? lne->title() : theTranslator->trDirectories(); startFile(ol,"dirs",0,title,HLI_Directories); startTitle(ol,0); //if (!Config_getString("PROJECT_NAME").isEmpty()) @@ -3825,9 +3942,9 @@ void writeDirIndex(OutputList &ol) endTitle(ol,0,0); ol.startContents(); ol.startTextBlock(); - Doxygen::indexList.addContentsItem(TRUE,title,0,"dirs",0); + Doxygen::indexList.addContentsItem(TRUE,title,0,"dirs",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); - ol.parseText(lne->intro()); + ol.parseText(lne ? lne->intro() : theTranslator->trDirDescription()); ol.endTextBlock(); FTVHelp* ftv = 0; @@ -3867,7 +3984,7 @@ static bool mainPageHasTitle() //---------------------------------------------------------------------------- -void writeIndex(OutputList &ol) +static void writeIndex(OutputList &ol) { static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); @@ -3923,7 +4040,7 @@ void writeIndex(OutputList &ol) if (Doxygen::mainPage) { - Doxygen::indexList.addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0); + Doxygen::indexList.addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); if (Doxygen::mainPage->hasSubPages()) { @@ -4183,7 +4300,7 @@ void writeIndex(OutputList &ol) ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation())); ol.endIndexSection(isNamespaceDocumentation); } - if (annotatedClasses>0) + if (annotatedClassesPrinted>0) { ol.startIndexSection(isClassDocumentation); ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation())); @@ -4223,5 +4340,160 @@ void writeIndex(OutputList &ol) ol.popGeneratorState(); } +static QArray<bool> indexWritten; + +static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry> &entries) +{ + QListIterator<LayoutNavEntry> li(entries); + LayoutNavEntry *lne; + for (li.toFirst();(lne=li.current());++li) + { + LayoutNavEntry::Kind kind = lne->kind(); + uint index = (uint)kind; + if (index>=indexWritten.size()) + { + uint i; + uint oldSize = indexWritten.size(); + uint newSize = index+1; + indexWritten.resize(newSize); + for (i=oldSize;i<newSize;i++) indexWritten.at(i)=FALSE; + } + //printf("starting %s kind=%d\n",lne->title().data(),lne->kind()); + bool needsClosing=FALSE; + if (!indexWritten.at(index)) + { + switch(kind) + { + case LayoutNavEntry::MainPage: + msg("Generating index page...\n"); + writeIndex(ol); + break; + case LayoutNavEntry::Pages: + msg("Generating page index...\n"); + writePageIndex(ol); + break; + case LayoutNavEntry::Modules: + msg("Generating module index...\n"); + writeGroupIndex(ol); + break; + case LayoutNavEntry::Namespaces: + { + if (documentedNamespaces>0) + { + Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList.incContentsDepth(); + needsClosing=TRUE; + } + if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne) // for backward compatibility with old layout file + { + msg("Generating namespace index...\n"); + writeNamespaceIndex(ol); + } + } + break; + case LayoutNavEntry::NamespaceList: + msg("Generating namespace index...\n"); + writeNamespaceIndex(ol); + break; + case LayoutNavEntry::NamespaceMembers: + msg("Generating namespace member index...\n"); + writeNamespaceMemberIndex(ol); + break; + case LayoutNavEntry::Classes: + if (annotatedClasses>0) + { + Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList.incContentsDepth(); + needsClosing=TRUE; + } + if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne) // for backward compatibility with old layout file + { + msg("Generating annotated compound index...\n"); + writeAnnotatedIndex(ol); + } + break; + case LayoutNavEntry::ClassList: + msg("Generating annotated compound index...\n"); + writeAnnotatedIndex(ol); + break; + case LayoutNavEntry::ClassIndex: + msg("Generating alphabetical compound index...\n"); + writeAlphabeticalIndex(ol); + break; + case LayoutNavEntry::ClassHierarchy: + msg("Generating hierarchical class index...\n"); + writeHierarchicalIndex(ol); + if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY")) + { + msg("Generating graphical class hierarchy...\n"); + writeGraphicalClassHierarchy(ol); + } + break; + case LayoutNavEntry::ClassMembers: + msg("Generating member index...\n"); + writeClassMemberIndex(ol); + break; + case LayoutNavEntry::Files: + if (documentedHtmlFiles>0) + { + Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList.incContentsDepth(); + needsClosing=TRUE; + } + if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne) // for backward compatibility with old layout file + { + msg("Generating file index...\n"); + writeFileIndex(ol); + } + break; + case LayoutNavEntry::FileList: + msg("Generating file index...\n"); + writeFileIndex(ol); + break; + case LayoutNavEntry::FileGlobals: + msg("Generating file member index...\n"); + writeFileMemberIndex(ol); + break; + case LayoutNavEntry::Dirs: + if (Config_getBool("SHOW_DIRECTORIES")) + { + msg("Generating directory index...\n"); + writeDirIndex(ol); + } + break; + case LayoutNavEntry::Examples: + msg("Generating example index...\n"); + writeExampleIndex(ol); + break; + case LayoutNavEntry::User: + break; + } + indexWritten.at(index)=TRUE; + } + writeIndexHierarchyEntries(ol,lne->children()); + if (needsClosing) + { + switch(kind) + { + case LayoutNavEntry::Namespaces: + case LayoutNavEntry::Classes: + case LayoutNavEntry::Files: + Doxygen::indexList.decContentsDepth(); + break; + default: + break; + } + } + //printf("ending %s kind=%d\n",lne->title().data(),lne->kind()); + } +} +void writeIndexHierarchy(OutputList &ol) +{ + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry(); + if (lne) + { + writeIndexHierarchyEntries(ol,lne->children()); + } +} diff --git a/src/index.h b/src/index.h index 51a31c5..b307dca 100644 --- a/src/index.h +++ b/src/index.h @@ -36,8 +36,9 @@ class IndexIntf virtual void finalize() = 0; virtual void incContentsDepth() = 0; virtual void decContentsDepth() = 0; - virtual void addContentsItem(bool isDir, const char *name, const char *ref = 0, - const char *file = 0, const char *anchor = 0) = 0; + virtual void addContentsItem(bool isDir, const char *name, const char *ref, + const char *file, const char *anchor, bool separateIndex, + bool addToNavIndex) = 0; virtual void addIndexItem(Definition *context,MemberDef *md,const char *title) = 0; virtual void addIndexFile(const char *name) = 0; virtual void addImageFile(const char *name) = 0; @@ -90,6 +91,20 @@ class IndexList : public IndexIntf for (li.toFirst();li.current();++li) (li.current()->*methodPtr)(a1,a2,a3,a4,a5); } + template<typename A1,typename A2,typename A3,typename A4,typename A5,typename A6> + void foreach(void (IndexIntf::*methodPtr)(A1,A2,A3,A4,A5,A6),A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6) + { + QListIterator<IndexIntf> li(m_intfs); + for (li.toFirst();li.current();++li) (li.current()->*methodPtr)(a1,a2,a3,a4,a5,a6); + } + + template<typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7> + void foreach(void (IndexIntf::*methodPtr)(A1,A2,A3,A4,A5,A6,A7),A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7) + { + QListIterator<IndexIntf> li(m_intfs); + for (li.toFirst();li.current();++li) (li.current()->*methodPtr)(a1,a2,a3,a4,a5,a6,a7); + } + public: /** Creates a list of indexes */ IndexList() { m_intfs.setAutoDelete(TRUE); } @@ -106,10 +121,10 @@ class IndexList : public IndexIntf { foreach(&IndexIntf::incContentsDepth); } void decContentsDepth() { foreach(&IndexIntf::decContentsDepth); } - void addContentsItem(bool isDir, const char *name, const char *ref = 0, - const char *file = 0, const char *anchor = 0) - { foreach<bool,const char *,const char *,const char *,const char*> - (&IndexIntf::addContentsItem,isDir,name,ref,file,anchor); } + void addContentsItem(bool isDir, const char *name, const char *ref, + const char *file, const char *anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE) + { foreach<bool,const char *,const char *,const char *,const char*,bool,bool> + (&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex); } void addIndexItem(Definition *context,MemberDef *md,const char *title=0) { foreach<Definition *,MemberDef *> (&IndexIntf::addIndexItem,context,md,title); } @@ -219,28 +234,8 @@ enum ClassHighlight CHL_Total = CHL_Exceptions+1 }; -void writeIndex(OutputList &ol); -void writeHierarchicalIndex(OutputList &ol); -void writeAlphabeticalIndex(OutputList &ol); -void writeClassHierarchy(OutputList &ol); -void writeAnnotatedIndex(OutputList &ol); -void writeAnnotatedClassList(OutputList &ol); -void writeMemberList(OutputList &ol,bool useSections); -void writeSourceIndex(OutputList &ol); -void writeHeaderIndex(OutputList &ol); -void writeHeaderFileList(OutputList &ol); -void writeExampleIndex(OutputList &ol); -void writePageIndex(OutputList &ol); -void writeFileIndex(OutputList &ol); -void writeNamespaceIndex(OutputList &ol); -void writeGroupIndex(OutputList &ol); -void writeDirIndex(OutputList &ol); -void writePackageIndex(OutputList &ol); -void writeClassMemberIndex(OutputList &ol); -void writeFileMemberIndex(OutputList &ol); -void writeNamespaceMemberIndex(OutputList &ol); -void writeGraphicalClassHierarchy(OutputList &ol); void writeGraphInfo(OutputList &ol); +void writeIndexHierarchy(OutputList &ol); void countDataStructures(); @@ -253,9 +248,9 @@ extern int indexedPages; extern int documentedClassMembers[CMHL_Total]; extern int documentedFileMembers[FMHL_Total]; extern int documentedNamespaceMembers[NMHL_Total]; +extern int documentedDirs; extern int documentedHtmlFiles; extern int documentedPages; -extern int documentedDirs; void startTitle(OutputList &ol,const char *fileName,Definition *def=0); void endTitle(OutputList &ol,const char *fileName,const char *name); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index d28f5e0..c3b9c6f 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1606,7 +1606,7 @@ void LatexGenerator::startTitleHead(const char *fileName) static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); if (usePDFLatex && pdfHyperlinks && fileName) { - t << "\\hypertarget{" << stripPath(fileName) << "}{" << endl; + t << "\\hypertarget{" << stripPath(fileName) << "}{"; } if (Config_getBool("COMPACT_LATEX")) { @@ -2514,7 +2514,7 @@ void LatexGenerator::lineBreak(const char *) void LatexGenerator::startMemberDocSimple() { - t << "\\begin{DoxyFields}{" << endl; + t << "\\begin{DoxyFields}{"; docify(theTranslator->trCompoundMembers()); t << "}" << endl; } diff --git a/src/latexgen.h b/src/latexgen.h index cfa7375..85c0b3f 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -47,6 +47,7 @@ class LatexGenerator : public OutputGenerator void printDoc(DocNode *,const char *); void startFile(const char *name,const char *manName,const char *title); + void writeSearchInfo() {} void writeFooter() {} void endFile(); void clearBuffer(); diff --git a/src/layout.cpp b/src/layout.cpp index 011141b..e108046 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -832,6 +832,13 @@ class LayoutParser : public QXmlDefaultHandler javaOpt ? theTranslator->trPackageListDescription() : fortranOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll), "namespaces" }, + { "namespacelist", + LayoutNavEntry::NamespaceList, + javaOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(), + QCString(), + javaOpt ? theTranslator->trPackageListDescription() : fortranOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll), + "namespaces" + }, { "namespacemembers", LayoutNavEntry::NamespaceMembers, javaOpt ? theTranslator->trPackageMembers() : fortranOpt ? theTranslator->trModulesMembers() : theTranslator->trNamespaceMembers(), @@ -840,19 +847,26 @@ class LayoutParser : public QXmlDefaultHandler "namespacemembers" }, { "classindex", - LayoutNavEntry::Classes, + LayoutNavEntry::ClassIndex, fortranOpt ? theTranslator->trDataTypes() : vhdlOpt ? VhdlDocGen::trDesignUnits() : theTranslator->trCompoundIndex(), QCString(), QCString(), "classes" }, { "classes", - LayoutNavEntry::ClassAnnotated, + LayoutNavEntry::Classes, fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trClasses(), theTranslator->trCompoundList(), fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(), "annotated" }, + { "classlist", + LayoutNavEntry::ClassList, + theTranslator->trCompoundList(), + QCString(), + fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(), + "annotated" + }, { "hierarchy", LayoutNavEntry::ClassHierarchy, vhdlOpt ? VhdlDocGen::trDesignUnitHierarchy() : theTranslator->trClassHierarchy(), @@ -874,6 +888,13 @@ class LayoutParser : public QXmlDefaultHandler theTranslator->trFileListDescription(extractAll), "files" }, + { "filelist", + LayoutNavEntry::FileList, + theTranslator->trFileList(), + QCString(), + theTranslator->trFileListDescription(extractAll), + "files" + }, { "globals", LayoutNavEntry::FileGlobals, theTranslator->trFileMembers(), diff --git a/src/layout.h b/src/layout.h index 47ba5f3..867a058 100644 --- a/src/layout.h +++ b/src/layout.h @@ -115,12 +115,15 @@ struct LayoutNavEntry Pages, Modules, Namespaces, + NamespaceList, NamespaceMembers, - Classes, - ClassAnnotated, + Classes, + ClassList, + ClassIndex, ClassHierarchy, ClassMembers, Files, + FileList, FileGlobals, Dirs, Examples, diff --git a/src/layout_default.h b/src/layout_default.h index 06af510..7ed1629 100644 --- a/src/layout_default.h +++ b/src/layout_default.h @@ -5,17 +5,17 @@ " <tab type=\"pages\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " <tab type=\"modules\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " <tab type=\"namespaces\" visible=\"yes\" title=\"\">\n" -" <tab type=\"namespaces\" visible=\"yes\" title=\"\" intro=\"\"/>\n" +" <tab type=\"namespacelist\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " <tab type=\"namespacemembers\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " </tab>\n" " <tab type=\"classes\" visible=\"yes\" title=\"\">\n" -" <tab type=\"classes\" visible=\"yes\" title=\"\" intro=\"\"/>\n" +" <tab type=\"classlist\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " <tab type=\"classindex\" visible=\"$ALPHABETICAL_INDEX\" title=\"\"/> \n" " <tab type=\"hierarchy\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " <tab type=\"classmembers\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " </tab>\n" " <tab type=\"files\" visible=\"yes\" title=\"\">\n" -" <tab type=\"files\" visible=\"yes\" title=\"\" intro=\"\"/>\n" +" <tab type=\"filelist\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " <tab type=\"globals\" visible=\"yes\" title=\"\" intro=\"\"/>\n" " </tab>\n" " <tab type=\"dirs\" visible=\"yes\" title=\"\" intro=\"\"/>\n" diff --git a/src/layout_default.xml b/src/layout_default.xml index 8ef0c12..5b60278 100644 --- a/src/layout_default.xml +++ b/src/layout_default.xml @@ -5,17 +5,17 @@ <tab type="pages" visible="yes" title="" intro=""/> <tab type="modules" visible="yes" title="" intro=""/> <tab type="namespaces" visible="yes" title=""> - <tab type="namespaces" visible="yes" title="" intro=""/> + <tab type="namespacelist" visible="yes" title="" intro=""/> <tab type="namespacemembers" visible="yes" title="" intro=""/> </tab> <tab type="classes" visible="yes" title=""> - <tab type="classes" visible="yes" title="" intro=""/> + <tab type="classlist" visible="yes" title="" intro=""/> <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="hierarchy" visible="yes" title="" intro=""/> <tab type="classmembers" visible="yes" title="" intro=""/> </tab> <tab type="files" visible="yes" title=""> - <tab type="files" visible="yes" title="" intro=""/> + <tab type="filelist" visible="yes" title="" intro=""/> <tab type="globals" visible="yes" title="" intro=""/> </tab> <tab type="dirs" visible="yes" title="" intro=""/> diff --git a/src/libdoxygen.t b/src/libdoxygen.t index cc69203..e2c17b7 100644 --- a/src/libdoxygen.t +++ b/src/libdoxygen.t @@ -149,6 +149,9 @@ jquery_js.h: jquery.js jquery_ui_js.h: jquery_ui.js cat jquery_ui.js | $(TO_C_CMD) >jquery_ui_js.h +jquery_fx_js.h: jquery_fx.js + cat jquery_fx.js | $(TO_C_CMD) >jquery_fx_js.h + sizzle_js.h: sizzle.js cat sizzle.js | $(TO_C_CMD) >sizzle_js.h diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index ff56f2c..541a5e1 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -965,7 +965,7 @@ void ManDocVisitor::filter(const char *str) { switch(c) { - case '.': m_t << "'\\&."; break; // see bug652277 + case '.': m_t << "\\&."; break; // see bug652277 case '\\': m_t << "\\\\"; break; case '"': c = '\''; // fall through default: m_t << c; break; diff --git a/src/mangen.h b/src/mangen.h index d312ecc..c2c1ba2 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -44,6 +44,7 @@ class ManGenerator : public OutputGenerator static void init(); void startFile(const char *name,const char *manName,const char *title); + void writeSearchInfo() {} void writeFooter() {} void endFile(); void clearBuffer(); diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 3cca845..1ef623c 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -542,6 +542,7 @@ void MemberList::writeDocumentation(OutputList &ol, ol.endMemberDocList(); } +// members in a table void MemberList::writeSimpleDocumentation(OutputList &ol, Definition *container) { @@ -559,6 +560,7 @@ void MemberList::writeSimpleDocumentation(OutputList &ol, ol.endMemberDocSimple(); } +// separate member pages void MemberList::writeDocumentationPage(OutputList &ol, const char *scopeName, Definition *container) { @@ -573,35 +575,36 @@ void MemberList::writeDocumentationPage(OutputList &ol, container->getOutputFileBase()); if (!generateTreeView) { - container->writeNavigationPath(ol); + container->writeNavigationPath(ol,FALSE); ol.endQuickIndices(); } ol.startContents(); - ol.writeString("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n" - " <tr>\n" - " <td valign=\"top\">\n"); - - container->writeQuickMemberLinks(ol,md); - - ol.writeString(" </td>\n"); - ol.writeString(" <td valign=\"top\" class=\"mempage\">\n"); - - md->writeDocumentation(this,ol,scopeName,container,m_inGroup); - - ol.writeString(" </td>\n"); - ol.writeString(" </tr>\n"); - ol.writeString("</table>\n"); - if (generateTreeView) { + md->writeDocumentation(this,ol,scopeName,container,m_inGroup); ol.endContents(); container->writeNavigationPath(ol); endFile(ol,TRUE); } else { + ol.writeString("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n" + " <tr>\n" + " <td valign=\"top\">\n"); + + container->writeQuickMemberLinks(ol,md); + + ol.writeString(" </td>\n"); + ol.writeString(" <td valign=\"top\" class=\"mempage\">\n"); + + md->writeDocumentation(this,ol,scopeName,container,m_inGroup); + + ol.writeString(" </td>\n"); + ol.writeString(" </tr>\n"); + ol.writeString("</table>\n"); + endFile(ol); } } diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 69e016e..39904f0 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -633,7 +633,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co if (createSubDirs) ol.writeString("../../"); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString("\">"); - ol.writeString(md->localName()); + ol.writeString(convertToHtml(md->localName())); ol.writeString("</a>"); } ol.writeString("</td></tr>\n"); diff --git a/src/navtree.css b/src/navtree.css index a87fa62..2166b6f 100644 --- a/src/navtree.css +++ b/src/navtree.css @@ -119,5 +119,9 @@ background-color: ##FA; } - +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} diff --git a/src/navtree.js b/src/navtree.js index 1301083..ed37aa7 100644 --- a/src/navtree.js +++ b/src/navtree.js @@ -1,3 +1,29 @@ +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + script.onreadystatechange = function() { + if (script.readyState == 'complete') { func(); if (show) showRoot(); } + }; + head.appendChild(script); +} + function createIndent(o,domNode,node,level) { if (node.parentNode && node.parentNode.parentNode) @@ -5,6 +31,8 @@ function createIndent(o,domNode,node,level) createIndent(o,domNode,node.parentNode,level+1); } var imgNode = document.createElement("img"); + imgNode.width = 16; + imgNode.height = 22; if (level==0 && node.childrenData) { node.plus_img = imgNode; @@ -27,7 +55,7 @@ function createIndent(o,domNode,node,level) } else { - expandNode(o, node, false); + expandNode(o, node, false, false); } } node.expandToggle.appendChild(imgNode); @@ -104,10 +132,38 @@ function newNode(o, po, text, link, childrenData, lastNode) var a = document.createElement("a"); node.labelSpan.appendChild(a); node.label = document.createTextNode(text); + node.expanded = false; a.appendChild(node.label); if (link) { - a.href = node.relpath+link; + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) + { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath($(location).attr('pathname')); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? node.relpath+link : '#'; + a.onclick = function(){ + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + var anchor = $(aname); + var targetDiv = anchor.next(); + $(targetDiv).children('.memproto,.memdoc').effect("highlight",{},3000); + $("#doc-content").animate({ + scrollTop: anchor.position().top + + $('#doc-content').scrollTop() - + $('#doc-content').offset().top + },500,function(){ + $(location).attr('href',aname); + }); + }; + } + else + { + a.href = node.relpath+link; + } } else { @@ -116,7 +172,6 @@ function newNode(o, po, text, link, childrenData, lastNode) a.className = "nolink"; a.href = "javascript:void(0)"; a.onclick = node.expandToggle.onclick; - node.expanded = false; } } @@ -141,34 +196,128 @@ function showRoot() var headerHeight = $("#top").height(); var footerHeight = $("#nav-path").height(); var windowHeight = $(window).height() - headerHeight - footerHeight; - navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + (function (){ // retry until we can scroll to the selected item + try { + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); } -function expandNode(o, node, imm) +function expandNode(o, node, imm, showRoot) { if (node.childrenData && !node.expanded) { - if (!node.childrenVisited) + if (typeof(node.childrenData)==='string') { - getNode(o, node); + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); } - if (imm) - { - $(node.getChildrenUL()).show(); - } - else + else { - $(node.getChildrenUL()).slideDown("fast",showRoot); + if (!node.childrenVisited) + { + getNode(o, node); + } + if (imm) + { + $(node.getChildrenUL()).show(); + } + else + { + $(node.getChildrenUL()).slideDown("fast"); + } + if (node.isLast) + { + node.plus_img.src = node.relpath+"ftv2mlastnode.png"; + } + else + { + node.plus_img.src = node.relpath+"ftv2mnode.png"; + } + node.expanded = true; } - if (node.isLast) + } +} + +function showNode(o, node, index) +{ + if (node.childrenData && !node.expanded) + { + if (typeof(node.childrenData)==='string') { - node.plus_img.src = node.relpath+"ftv2mlastnode.png"; + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index); + },true); } else { - node.plus_img.src = node.relpath+"ftv2mnode.png"; + if (!node.childrenVisited) + { + getNode(o, node); + } + $(node.getChildrenUL()).show(); + if (node.isLast) + { + node.plus_img.src = node.relpath+"ftv2mlastnode.png"; + } + else + { + node.plus_img.src = node.relpath+"ftv2mnode.png"; + } + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+1<o.breadcrumbs.length) + { + showNode(o,n,index+1); + } + else + { + if (typeof(n.childrenData)==='string') + { + var varName = n.childrenData; + getScript(n.relpath+varName,function(){ + n.childrenData = getData(varName); + node.expanded=false; + showNode(o,node,index); // retry with child node expanded + },true); + } + else + { + if (o.toroot=="index.html" || n.childrenData) + { + expandNode(o, n, true, true); + } + var a; + if ($(location).attr('hash')) + { + var link=stripPath($(location).attr('pathname'))+':'+ + $(location).attr('hash').substring(1); + a=$('.item a[class*=\""'+link+'"\"]'); + } + if (a && a.length) + { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + var anchor = $($(location).attr('hash')); + var targetDiv = anchor.next(); + $(targetDiv).children('.memproto,.memdoc'). + effect("highlight", {}, 3000); + } + else + { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + } + } } - node.expanded = true; } } @@ -180,33 +329,10 @@ function getNode(o, po) { var nodeData = po.childrenData[i]; po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], - i==l); + i==l); } } -function findNavTreePage(url, data) -{ - var nodes = data; - var result = null; - for (var i in nodes) - { - var d = nodes[i]; - if (d[1] == url) - { - return new Array(i); - } - else if (d[2] != null) // array of children - { - result = findNavTreePage(url, d[2]); - if (result != null) - { - return (new Array(i).concat(result)); - } - } - } - return null; -} - function initNavTree(toroot,relpath) { var o = new Object(); @@ -220,26 +346,23 @@ function initNavTree(toroot,relpath) o.node.li.appendChild(o.node.childrenUL); o.node.depth = 0; o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("img"); + o.node.plus_img.src = relpath+"ftv2pnode.png"; + o.node.plus_img.width = 16; + o.node.plus_img.height = 22; - getNode(o, o.node); - - o.breadcrumbs = findNavTreePage(toroot, NAVTREE); - if (o.breadcrumbs == null) - { - o.breadcrumbs = findNavTreePage("index.html",NAVTREE); - } - if (o.breadcrumbs != null && o.breadcrumbs.length>0) - { - var p = o.node; - for (var i in o.breadcrumbs) - { - var j = o.breadcrumbs[i]; - p = p.children[j]; - expandNode(o,p,true); + getScript(relpath+"navtreeindex",function(){ + var navTreeIndex = eval('NAVTREEINDEX'); + if (navTreeIndex) { + o.breadcrumbs = navTreeIndex[toroot]; + if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex["index.html"]; + o.breadcrumbs.unshift(0); + showNode(o, o.node, 0); } - p.itemDiv.className = p.itemDiv.className + " selected"; - p.itemDiv.id = "selected"; - $(window).load(showRoot); - } + },true); + + $(window).load(showRoot); } diff --git a/src/navtree_css.h b/src/navtree_css.h index 57f119f..82955e2 100644 --- a/src/navtree_css.h +++ b/src/navtree_css.h @@ -119,5 +119,9 @@ " background-color: ##FA;\n" "}\n" "\n" -"\n" +"@media print\n" +"{\n" +" #nav-tree { display: none; }\n" +" div.ui-resizable-handle { display: none; position: relative; }\n" +"}\n" "\n" diff --git a/src/navtree_js.h b/src/navtree_js.h index 8e81d55..6456eb6 100644 --- a/src/navtree_js.h +++ b/src/navtree_js.h @@ -1,3 +1,29 @@ +"function getData(varName)\n" +"{\n" +" var i = varName.lastIndexOf('/');\n" +" var n = i>=0 ? varName.substring(i+1) : varName;\n" +" return eval(n);\n" +"}\n" +"\n" +"function stripPath(uri)\n" +"{\n" +" return uri.substring(uri.lastIndexOf('/')+1);\n" +"}\n" +"\n" +"function getScript(scriptName,func,show)\n" +"{\n" +" var head = document.getElementsByTagName(\"head\")[0]; \n" +" var script = document.createElement('script');\n" +" script.id = scriptName;\n" +" script.type = 'text/javascript';\n" +" script.onload = func; \n" +" script.src = scriptName+'.js'; \n" +" script.onreadystatechange = function() {\n" +" if (script.readyState == 'complete') { func(); if (show) showRoot(); }\n" +" };\n" +" head.appendChild(script); \n" +"}\n" +"\n" "function createIndent(o,domNode,node,level)\n" "{\n" " if (node.parentNode && node.parentNode.parentNode)\n" @@ -5,6 +31,8 @@ " createIndent(o,domNode,node.parentNode,level+1);\n" " }\n" " var imgNode = document.createElement(\"img\");\n" +" imgNode.width = 16;\n" +" imgNode.height = 22;\n" " if (level==0 && node.childrenData)\n" " {\n" " node.plus_img = imgNode;\n" @@ -27,7 +55,7 @@ " } \n" " else \n" " {\n" -" expandNode(o, node, false);\n" +" expandNode(o, node, false, false);\n" " }\n" " }\n" " node.expandToggle.appendChild(imgNode);\n" @@ -104,10 +132,38 @@ " var a = document.createElement(\"a\");\n" " node.labelSpan.appendChild(a);\n" " node.label = document.createTextNode(text);\n" +" node.expanded = false;\n" " a.appendChild(node.label);\n" " if (link) \n" " {\n" -" a.href = node.relpath+link;\n" +" a.className = stripPath(link.replace('#',':'));\n" +" if (link.indexOf('#')!=-1)\n" +" {\n" +" var aname = '#'+link.split('#')[1];\n" +" var srcPage = stripPath($(location).attr('pathname'));\n" +" var targetPage = stripPath(link.split('#')[0]);\n" +" a.href = srcPage!=targetPage ? node.relpath+link : '#';\n" +" a.onclick = function(){\n" +" $('.item').removeClass('selected');\n" +" $('.item').removeAttr('id');\n" +" $(a).parent().parent().addClass('selected');\n" +" $(a).parent().parent().attr('id','selected');\n" +" var anchor = $(aname);\n" +" var targetDiv = anchor.next();\n" +" $(targetDiv).children('.memproto,.memdoc').effect(\"highlight\",{},3000);\n" +" $(\"#doc-content\").animate({\n" +" scrollTop: anchor.position().top +\n" +" $('#doc-content').scrollTop() -\n" +" $('#doc-content').offset().top\n" +" },500,function(){\n" +" $(location).attr('href',aname);\n" +" });\n" +" };\n" +" }\n" +" else\n" +" {\n" +" a.href = node.relpath+link;\n" +" }\n" " } \n" " else \n" " {\n" @@ -116,7 +172,6 @@ " a.className = \"nolink\";\n" " a.href = \"javascript:void(0)\";\n" " a.onclick = node.expandToggle.onclick;\n" -" node.expanded = false;\n" " }\n" " }\n" "\n" @@ -141,34 +196,128 @@ " var headerHeight = $(\"#top\").height();\n" " var footerHeight = $(\"#nav-path\").height();\n" " var windowHeight = $(window).height() - headerHeight - footerHeight;\n" -" navtree.scrollTo('#selected',0,{offset:-windowHeight/2});\n" +" (function (){ // retry until we can scroll to the selected item\n" +" try {\n" +" navtree.scrollTo('#selected',0,{offset:-windowHeight/2});\n" +" } catch (err) {\n" +" setTimeout(arguments.callee, 0);\n" +" }\n" +" })();\n" "}\n" "\n" -"function expandNode(o, node, imm)\n" +"function expandNode(o, node, imm, showRoot)\n" "{\n" " if (node.childrenData && !node.expanded) \n" " {\n" -" if (!node.childrenVisited) \n" +" if (typeof(node.childrenData)==='string')\n" " {\n" -" getNode(o, node);\n" +" var varName = node.childrenData;\n" +" getScript(node.relpath+varName,function(){\n" +" node.childrenData = getData(varName);\n" +" expandNode(o, node, imm, showRoot);\n" +" }, showRoot);\n" " }\n" -" if (imm)\n" -" {\n" -" $(node.getChildrenUL()).show();\n" -" } \n" -" else \n" +" else\n" " {\n" -" $(node.getChildrenUL()).slideDown(\"fast\",showRoot);\n" +" if (!node.childrenVisited) \n" +" {\n" +" getNode(o, node);\n" +" }\n" +" if (imm)\n" +" {\n" +" $(node.getChildrenUL()).show();\n" +" } \n" +" else \n" +" {\n" +" $(node.getChildrenUL()).slideDown(\"fast\");\n" +" }\n" +" if (node.isLast)\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2mlastnode.png\";\n" +" }\n" +" else\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2mnode.png\";\n" +" }\n" +" node.expanded = true;\n" " }\n" -" if (node.isLast)\n" +" }\n" +"}\n" +"\n" +"function showNode(o, node, index)\n" +"{\n" +" if (node.childrenData && !node.expanded) \n" +" {\n" +" if (typeof(node.childrenData)==='string')\n" " {\n" -" node.plus_img.src = node.relpath+\"ftv2mlastnode.png\";\n" +" var varName = node.childrenData;\n" +" getScript(node.relpath+varName,function(){\n" +" node.childrenData = getData(varName);\n" +" showNode(o,node,index);\n" +" },true);\n" " }\n" " else\n" " {\n" -" node.plus_img.src = node.relpath+\"ftv2mnode.png\";\n" +" if (!node.childrenVisited) \n" +" {\n" +" getNode(o, node);\n" +" }\n" +" $(node.getChildrenUL()).show();\n" +" if (node.isLast)\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2mlastnode.png\";\n" +" }\n" +" else\n" +" {\n" +" node.plus_img.src = node.relpath+\"ftv2mnode.png\";\n" +" }\n" +" node.expanded = true;\n" +" var n = node.children[o.breadcrumbs[index]];\n" +" if (index+1<o.breadcrumbs.length)\n" +" {\n" +" showNode(o,n,index+1);\n" +" }\n" +" else\n" +" {\n" +" if (typeof(n.childrenData)==='string')\n" +" {\n" +" var varName = n.childrenData;\n" +" getScript(n.relpath+varName,function(){\n" +" n.childrenData = getData(varName);\n" +" node.expanded=false;\n" +" showNode(o,node,index); // retry with child node expanded\n" +" },true);\n" +" }\n" +" else\n" +" {\n" +" if (o.toroot==\"index.html\" || n.childrenData)\n" +" {\n" +" expandNode(o, n, true, true);\n" +" }\n" +" var a;\n" +" if ($(location).attr('hash'))\n" +" {\n" +" var link=stripPath($(location).attr('pathname'))+':'+\n" +" $(location).attr('hash').substring(1);\n" +" a=$('.item a[class*=\\\"\"'+link+'\"\\\"]');\n" +" }\n" +" if (a && a.length)\n" +" {\n" +" a.parent().parent().addClass('selected');\n" +" a.parent().parent().attr('id','selected');\n" +" var anchor = $($(location).attr('hash'));\n" +" var targetDiv = anchor.next();\n" +" $(targetDiv).children('.memproto,.memdoc').\n" +" effect(\"highlight\", {}, 3000);\n" +" }\n" +" else\n" +" {\n" +" $(n.itemDiv).addClass('selected');\n" +" $(n.itemDiv).attr('id','selected');\n" +" }\n" +" }\n" +" }\n" " }\n" -" node.expanded = true;\n" " }\n" "}\n" "\n" @@ -180,33 +329,10 @@ " {\n" " var nodeData = po.childrenData[i];\n" " po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],\n" -" i==l);\n" +" i==l);\n" " }\n" "}\n" "\n" -"function findNavTreePage(url, data)\n" -"{\n" -" var nodes = data;\n" -" var result = null;\n" -" for (var i in nodes) \n" -" {\n" -" var d = nodes[i];\n" -" if (d[1] == url) \n" -" {\n" -" return new Array(i);\n" -" }\n" -" else if (d[2] != null) // array of children\n" -" {\n" -" result = findNavTreePage(url, d[2]);\n" -" if (result != null) \n" -" {\n" -" return (new Array(i).concat(result));\n" -" }\n" -" }\n" -" }\n" -" return null;\n" -"}\n" -"\n" "function initNavTree(toroot,relpath)\n" "{\n" " var o = new Object();\n" @@ -220,26 +346,23 @@ " o.node.li.appendChild(o.node.childrenUL);\n" " o.node.depth = 0;\n" " o.node.relpath = relpath;\n" +" o.node.expanded = false;\n" +" o.node.isLast = true;\n" +" o.node.plus_img = document.createElement(\"img\");\n" +" o.node.plus_img.src = relpath+\"ftv2pnode.png\";\n" +" o.node.plus_img.width = 16;\n" +" o.node.plus_img.height = 22;\n" "\n" -" getNode(o, o.node);\n" -"\n" -" o.breadcrumbs = findNavTreePage(toroot, NAVTREE);\n" -" if (o.breadcrumbs == null)\n" -" {\n" -" o.breadcrumbs = findNavTreePage(\"index.html\",NAVTREE);\n" -" }\n" -" if (o.breadcrumbs != null && o.breadcrumbs.length>0)\n" -" {\n" -" var p = o.node;\n" -" for (var i in o.breadcrumbs) \n" -" {\n" -" var j = o.breadcrumbs[i];\n" -" p = p.children[j];\n" -" expandNode(o,p,true);\n" +" getScript(relpath+\"navtreeindex\",function(){\n" +" var navTreeIndex = eval('NAVTREEINDEX');\n" +" if (navTreeIndex) {\n" +" o.breadcrumbs = navTreeIndex[toroot];\n" +" if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex[\"index.html\"];\n" +" o.breadcrumbs.unshift(0);\n" +" showNode(o, o.node, 0);\n" " }\n" -" p.itemDiv.className = p.itemDiv.className + \" selected\";\n" -" p.itemDiv.id = \"selected\";\n" -" $(window).load(showRoot);\n" -" }\n" +" },true);\n" +"\n" +" $(window).load(showRoot);\n" "}\n" "\n" diff --git a/src/outputgen.h b/src/outputgen.h index acbaef9..740940e 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -301,6 +301,7 @@ class OutputGenerator : public BaseOutputDocInterface /////////////////////////////////////////////////////////////// virtual void startFile(const char *name,const char *manName, const char *title) = 0; + virtual void writeSearchInfo() = 0; virtual void writeFooter() = 0; virtual void endFile() = 0; virtual void startIndexSection(IndexSections) = 0; diff --git a/src/outputlist.h b/src/outputlist.h index debea2e..e832175 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -85,6 +85,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::writeStyleInfo,part); } void startFile(const char *name,const char *manName,const char *title) { forall(&OutputGenerator::startFile,name,manName,title); } + void writeSearchInfo() + { forall(&OutputGenerator::writeSearchInfo); } void writeFooter() { forall(&OutputGenerator::writeFooter); } void endFile() diff --git a/src/pagedef.cpp b/src/pagedef.cpp index dc78179..5786bc1 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -98,7 +98,7 @@ void PageDef::writeDocumentation(OutputList &ol) { if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX")) { - getOuterScope()->writeNavigationPath(ol); + getOuterScope()->writeNavigationPath(ol,FALSE); } ol.endQuickIndices(); } diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 443e24b..ebe09e8 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1703,7 +1703,7 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd) m_output.closeList(); } - ClassSDict *cl = cd->getInnerClasses(); + ClassSDict *cl = cd->getClassSDict(); if (cl) { m_output.openList("inner"); @@ -205,6 +205,13 @@ static bool macroIsAccessible(Define *def) // g_inputFileDef->name().data(),def->name.data(),def->fileDef->name().data(),b); return b; } + if (g_inputFileDef && def && !def->fileName.isEmpty()) + { + bool b = g_inputFileDef->includesByName(def->fileName); + //printf("%s: Checking for accessibility of define '%s' (defined in %s): result=%d\n", + // g_inputFileDef->name().data(),def->name.data(),def->fileName.data(),b); + return b; + } //printf("not accessible!\n"); return FALSE; } @@ -215,11 +222,10 @@ static Define *isDefined(const char *name) if (name) { def=g_globalDefineDict->find(name); - //if ((def=fileDefineCache->findDefine(g_yyFileName,name)) && !def->undef) - // return def; if (def && def->undef) def=0; if (def && !macroIsAccessible(def)) def=0; } + //printf("isDefined(%s)=%p\n",name,def); return def; } @@ -786,20 +792,22 @@ static int getNextId(const QCString &expr,int p,int *l) } else if (c=='/') // skip C Comment { + //printf("Found C comment at p=%d\n",p); char pc=c; if (p<(int)expr.length()) { - c=expr.at(++p); + c=expr.at(p); if (c=='*') // Start of C comment { + p++; while (p<(int)expr.length() && !(pc=='*' && c=='/')) { pc=c; - c=expr.at(++p); + c=expr.at(p++); } - p++; } } + //printf("Found end of C comment at p=%d\n",p); } } return -1; @@ -822,6 +830,7 @@ static void expandExpression(QCString &expr,QCString *rest,int pos) { bool replaced=FALSE; macroName=expr.mid(p,l); + //printf("macroName=%s\n",macroName.data()); if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker? { if (g_expandedDict->find(macroName)==0) // expand macro @@ -1138,8 +1147,8 @@ Define *newDefine() def->fileDef = g_yyFileDef; def->lineNr = g_yyLineNr; def->varArgs = g_defVarArgs; - //printf("newDefine: %s->%s\n",def->name.data(), - // def->fileDef ? def->fileDef->name().data() : "<none>"); + //printf("newDefine: %s %s file: %s\n",def->name.data(),def->definition.data(), + // def->fileDef ? def->fileDef->name().data() : def->fileName.data()); //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data()); if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name]) { @@ -1218,7 +1227,8 @@ static inline void outputArray(const char *a,int len) static void readIncludeFile(const QCString &inc) { - if (!Config_getBool("SEARCH_INCLUDES")) return; // do not read include files + static bool searchIncludes = Config_getBool("SEARCH_INCLUDES"); + if (!searchIncludes) return; // do not read include files uint i=0; // find the start of the include file name @@ -1250,6 +1260,22 @@ static void readIncludeFile(const QCString &inc) int oldLineNr = g_yyLineNr; //printf("Searching for `%s'\n",incFileName.data()); + // absIncFileName avoids difficulties for incFileName starting with "../" (bug 641336) + QCString absIncFileName = incFileName; + { + QFileInfo fi(g_yyFileName); + if (fi.exists()) + { + QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+incFileName; + QFileInfo fi2(absName); + if (fi2.exists()) + { + absIncFileName=fi2.absFilePath(); + } + //printf( "absIncFileName = %s\n", absIncFileName.data() ); + } + } + // findFile will overwrite g_yyFileDef if found FileState *fs; bool alreadyIncluded = FALSE; @@ -1266,9 +1292,9 @@ static void readIncludeFile(const QCString &inc) { // add include dependency to the file in which the #include was found bool ambig; - // change to local name for bug 641336 - FileDef *incFd = findFileDef(Doxygen::inputNameDict,incFileName,ambig); - oldFileDef->addIncludeDependency(ambig ? 0 : incFd,incFileName,localInclude,g_isImported); + // change to absolute name for bug 641336 + FileDef *incFd = findFileDef(Doxygen::inputNameDict,absIncFileName,ambig); + oldFileDef->addIncludeDependency(ambig ? 0 : incFd,incFileName,localInclude,g_isImported,FALSE); // add included by dependency if (g_yyFileDef) { @@ -1276,6 +1302,10 @@ static void readIncludeFile(const QCString &inc) g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); } } + else if (g_inputFileDef) + { + g_inputFileDef->addIncludeDependency(0,absIncFileName,localInclude,g_isImported,TRUE); + } fs->bufState = YY_CURRENT_BUFFER; fs->lineNr = oldLineNr; fs->fileName = oldFileName; @@ -1308,11 +1338,11 @@ static void readIncludeFile(const QCString &inc) // //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data()); //} - // change to local name for bug 641336 - FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig); + // change to absolute name for bug 641336 + FileDef *fd = findFileDef(Doxygen::inputNameDict,absIncFileName,ambig); //printf("%s::findFileDef(%s)=%p\n",oldFileDef->name().data(),incFileName.data(),fd); // add include dependency to the file in which the #include was found - oldFileDef->addIncludeDependency(ambig ? 0 : fd,incFileName,localInclude,g_isImported); + oldFileDef->addIncludeDependency(ambig ? 0 : fd,incFileName,localInclude,g_isImported,FALSE); // add included by dependency if (fd) { @@ -1320,6 +1350,10 @@ static void readIncludeFile(const QCString &inc) fd->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); } } + else if (g_inputFileDef) + { + g_inputFileDef->addIncludeDependency(0,absIncFileName,localInclude,g_isImported,TRUE); + } if (Debug::isFlagSet(Debug::Preprocessor)) { msg("#include %s: not found or already included! skipping...\n",incFileName.data()); @@ -1957,7 +1991,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) g_defExtraSpacing.resize(0); BEGIN(DefineArg); } -<DefName>{ID}{B}+"1" { // special case: define with 1 -> can be "guard" +<DefName>{ID}{B}+"1"/[ \r\t\n] { // special case: define with 1 -> can be "guard" //printf("Define `%s'\n",yytext); g_argDict = 0; g_defArgs = -1; @@ -2340,7 +2374,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(SkipSingleQuote); } } -<SkipDoubleQuote>"//" { g_defText += yytext; g_defLitText+=yytext; } +<SkipDoubleQuote>"//"[/]? { g_defText += yytext; g_defLitText+=yytext; } <SkipDoubleQuote>"/*" { g_defText += yytext; g_defLitText+=yytext; } <SkipDoubleQuote>\" { g_defText += *yytext; g_defLitText+=yytext; diff --git a/src/qhp.cpp b/src/qhp.cpp index 07230d9..bba308a 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -173,7 +173,8 @@ void Qhp::decContentsDepth() void Qhp::addContentsItem(bool /*isDir*/, const char * name, const char * /*ref*/, const char * file, - const char * /*anchor*/) + const char * /*anchor*/,bool /* separateIndex */, + bool /* addToNavIndex */) { // Backup difference before modification int diff = m_prevSectionLevel - m_sectionLevel; @@ -32,7 +32,8 @@ class Qhp : public IndexIntf void incContentsDepth(); void decContentsDepth(); void addContentsItem(bool isDir, const char * name, const char * ref, - const char * file, const char * anchor); + const char * file, const char * anchor, + bool separateIndex,bool addToNavIndex); void addIndexItem(Definition *context,MemberDef *md,const char *title); void addIndexFile(const char * name); void addImageFile(const char * name); diff --git a/src/rtfgen.h b/src/rtfgen.h index 406519c..33798d5 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -43,6 +43,7 @@ class RTFGenerator : public OutputGenerator void printDoc(DocNode *,const char *); void startFile(const char *name,const char *manName,const char *title); + void writeSearchInfo() {} void writeFooter() {} void endFile(); void clearBuffer(); diff --git a/src/svgpan.js b/src/svgpan.js index da381fd..7c0c916 100644 --- a/src/svgpan.js +++ b/src/svgpan.js @@ -173,30 +173,15 @@ function handleMouseWheel(evt) if (state!='pan') { - var delta; - - if(evt.wheelDelta) + if (evt.wheelDelta) { - if (window.opera) - { - delta = evt.wheelDelta / 720; // Opera - } - else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || - navigator.appVersion.indexOf("MSIE") != -1) - { - delta = evt.wheelDelta / 7200; // Chrome/IE9 - } - else - { - delta = evt.wheelDelta / 72000; // Safari - } + delta = evt.wheelDelta / 7200; // Opera/Chrome/IE9/Safari } else { delta = evt.detail / -180; // Mozilla } - var svgDoc = evt.target.ownerDocument; var g = svgDoc.getElementById("viewport"); var p = getEventPoint(evt); diff --git a/src/svgpan_js.h b/src/svgpan_js.h index ddc3eac..7cbbdfc 100644 --- a/src/svgpan_js.h +++ b/src/svgpan_js.h @@ -173,30 +173,15 @@ "\n" " if (state!='pan')\n" " {\n" -"\n" " var delta;\n" -"\n" -" if(evt.wheelDelta)\n" +" if (evt.wheelDelta)\n" " {\n" -" if (window.opera)\n" -" {\n" -" delta = evt.wheelDelta / 720; // Opera\n" -" }\n" -" else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ||\n" -" navigator.appVersion.indexOf(\"MSIE\") != -1)\n" -" {\n" -" delta = evt.wheelDelta / 7200; // Chrome/IE9\n" -" }\n" -" else\n" -" {\n" -" delta = evt.wheelDelta / 72000; // Safari\n" -" }\n" +" delta = evt.wheelDelta / 7200; // Opera/Chrome/IE9/Safari\n" " }\n" " else\n" " {\n" " delta = evt.detail / -180; // Mozilla\n" " }\n" -"\n" " var svgDoc = evt.target.ownerDocument;\n" " var g = svgDoc.getElementById(\"viewport\");\n" " var p = getEventPoint(evt);\n" diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 1934903..b7a7b7a 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -1374,7 +1374,7 @@ void TagFileParser::addIncludes() // ifd->getOutputFileBase().data(),ii->id.data()); if (ifd->getOutputFileBase()==QCString(ii->id)) { - fd->addIncludeDependency(ifd,ii->text,ii->isLocal,ii->isImported); + fd->addIncludeDependency(ifd,ii->text,ii->isLocal,ii->isImported,FALSE); } } } diff --git a/src/translator_am.h b/src/translator_am.h index 08217ba..f935c5f 100644 --- a/src/translator_am.h +++ b/src/translator_am.h @@ -22,7 +22,7 @@ #ifndef TRANSLATOR_AM_H
#define TRANSLATOR_AM_H
-class TranslatorArmenian : public TranslatorAdapter_1_7_5
+class TranslatorArmenian : public Translator
{
public:
/*! Used for identification of the language. */
diff --git a/src/translator_id.h b/src/translator_id.h index b139650..f0d7afc 100644 --- a/src/translator_id.h +++ b/src/translator_id.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2011 by Dimitri van Heesch. + * Copyright (C) 1997-2007 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -18,12 +18,13 @@ #ifndef TRANSLATOR_ID_H #define TRANSLATOR_ID_H -/*! - Indonesian translator based on Doxygen 1.4.2. - - \author Hendy Irawan <ceefour@gauldong.net> +/** + * Translasi berikut didasarkan pada versi translator_en.h dalam + * Doxygen 1.7.5.1. + * + * Penterjemah: Adhi Hargo <cadmus_sw at yahoo.com> */ -class TranslatorIndonesian : public TranslatorAdapter_1_4_6 +class TranslatorIndonesian : public Translator { public: @@ -54,7 +55,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 */ virtual QCString latexLanguageSupportCommand() { - return "\\usepackage[indonesian]{babel}"; + return "\\usepackage[bahasa]{babel}"; } /*! return the language charset. This will be used for the HTML output */ @@ -71,7 +72,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! subscript for the related functions. */ virtual QCString trRelatedSubscript() - { return "(Catatan: Fungsi-fungsi tersebut bukan fungsi anggota.)"; } + { return "(Perhatikan bahwa fungsi-fungsi tersebut bukan fungsi anggota.)"; } /*! header that is put before the detailed description of files, classes and namespaces. */ virtual QCString trDetailedDescription() @@ -126,7 +127,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 * parameter s is name of the project name. */ virtual QCString trGeneratedAutomatically(const char *s) - { QCString result="Dihasilkan secara otomatis oleh Doxygen"; + { QCString result="Dibangkitkan secara otomatis oleh Doxygen"; if (s) result+=(QCString)" untuk "+s; result+=" dari kode sumber."; return result; @@ -154,7 +155,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! This is put above each page as a link to the class hierarchy */ virtual QCString trClassHierarchy() - { return "Struktur Kelas"; } + { return "Hierarki Kelas"; } /*! This is put above each page as a link to the list of annotated classes */ virtual QCString trCompoundList() @@ -173,10 +174,6 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trFileList() { return "Daftar File"; } - /*! This is put above each page as a link to the list of all verbatim headers */ - virtual QCString trHeaderFiles() - { return "File Header"; } - /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() { @@ -186,7 +183,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 } else { - return "Daftar Anggota: Kelas"; + return "Daftar Anggota Kelas"; } } @@ -195,11 +192,11 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Daftar Global"; + return "Daftar Definisi Global"; } else { - return "Daftar File"; + return "Daftar Anggota File"; } } @@ -217,15 +214,16 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "Struktur kelas ini diurutkan hampir sepenuhnya diurutkan berdasarkan abjad:"; + { return "Hierarki kelas ini diurutkan kurang-lebih" + " berdasarkan abjad:"; } /*! This is an introduction to the list with all files. */ virtual QCString trFileListDescription(bool extractAll) { - QCString result="Berikut ini daftar seluruh file dengan penjelasan singkat"; + QCString result="Berikut ini daftar seluruh file"; if (!extractAll) result+=" yang didokumentasikan"; - result += ":"; + result += ", dengan penjelasan singkat:"; return result; } @@ -235,11 +233,11 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Berikut ini daftar struktur data beserta penjelasan singkat:"; + return "Berikut ini daftar struktur data, dengan penjelasan singkat:"; } else { - return "Berikut ini daftar kelas, struktur, gabungan, dan interface beserta penjelasan singkat:"; + return "Berikut ini daftar kelas, struct, union, dan interface, dengan penjelasan singkat:"; } } @@ -249,7 +247,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 QCString result="Berikut ini daftar seluruh "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="variabel struktur dan gabungan"; + result+="variabel anggota struct dan union"; } else { @@ -259,27 +257,27 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 { result+=" yang didokumentasikan"; } - result+=" dengan link ke "; + result+=", dengan tautan ke "; if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="dokumentasi struktur/gabungan untuk tiap variabel:"; + result+="dokumentasi struct/union untuk setiap variabel:"; } else { - result+="dokumentasi kelas untuk tiap anggota:"; + result+="dokumentasi kelas untuk setiap anggota:"; } } else { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="struktur/gabungan induk:"; + result+="struct/union yang memuatnya:"; } else { - result+="kelas induk:"; + result+="kelas yang memuatnya:"; } } return result; @@ -292,25 +290,21 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="fungsi, variabel, konstanta, enumerasi, dan tipe"; + result+="fungsi, variabel, makro definisi, enumerasi, dan tipe"; } else { result+="file"; } if (!extractAll) result+=" yang didokumentasikan"; - result+=" dengan link ke "; + result+=", dengan tautan ke "; if (extractAll) - result+="file induk:"; + result+="file yang memuatnya:"; else - result+="dokumentasi:"; + result+="dokumentasinya:"; return result; } - /*! This is an introduction to the page with the list of all header files. */ - virtual QCString trHeaderFilesDescription() - { return "Berikut ini daftar file header yang melingkupi API (Application Programming Interface) ini:"; } - /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() { return "Berikut ini daftar semua contoh:"; } @@ -323,15 +317,8 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trModulesDescription() { return "Berikut ini daftar semua modul:"; } - /*! This sentences is used in the annotated class/file lists if no brief - * description is given. - */ - virtual QCString trNoDescriptionAvailable() - { return "Tidak ada keterangan tersedia"; } - // index titles (the project name is prepended for these) - /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() { return "Dokumentasi"; } @@ -346,7 +333,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 * class hierarchy. */ virtual QCString trHierarchicalIndex() - { return "Indeks Struktur Kelas"; } + { return "Indeks Hierarki Kelas"; } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. @@ -410,13 +397,13 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! This is used in LaTeX as the title of the document */ virtual QCString trReferenceManual() - { return "Dokumentasi Referensi"; } + { return "Dokumen Referensi"; } /*! This is used in the documentation of a file as a header before the * list of defines */ virtual QCString trDefines() - { return "Konstanta"; } + { return "Makro Definisi"; } /*! This is used in the documentation of a file as a header before the * list of function prototypes @@ -458,7 +445,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 * documentation blocks for defines */ virtual QCString trDefineDocumentation() - { return "Dokumentasi Konstanta"; } + { return "Dokumentasi Makro Definisi"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes @@ -479,12 +466,6 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 { return "Dokumentasi Tipe Enumerasi"; } /*! This is used in the documentation of a file/namespace before the list - * of documentation blocks for enumeration values - */ - virtual QCString trEnumerationValueDocumentation() - { return "Dokumentasi Nilai Enumerasi"; } - - /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ virtual QCString trFunctionDocumentation() @@ -516,7 +497,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 */ virtual QCString trGeneratedAt(const char *date,const char *projName) { - QCString result=(QCString)"Dihasilkan pada tanggal "+date; + QCString result=(QCString)"Dibangkitkan pada tanggal "+date; if (projName) result+=(QCString)" untuk "+projName; result+=(QCString)" oleh"; return result; @@ -531,25 +512,17 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) { - return (QCString)"Diagram struktur kelas untuk "+clName+":"; + return (QCString)"Diagram hierarki kelas untuk "+clName+":"; } /*! this text is generated when the \\internal command is used. */ virtual QCString trForInternalUseOnly() - { return "Untuk kalangan sendiri."; } - - /*! this text is generated when the \\reimp command is used. */ - virtual QCString trReimplementedForInternalReasons() - { return "Di-reimplementasikan karena alasan internal; API tidak berubah."; } + { return "Hanya untuk digunakan secara internal."; } /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() { return "Peringatan"; } - /*! this text is generated when the \\bug command is used. */ - virtual QCString trBugsAndLimitations() - { return "Bug dan keterbatasan"; } - /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() { return "Versi"; } @@ -572,15 +545,15 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! this text is generated when the \\exception command is used. */ virtual QCString trExceptions() - { return "Exception"; } + { return "Eksepsi"; } /*! this text is used in the title page of a LaTeX document. */ virtual QCString trGeneratedBy() - { return "Dihasilkan oleh"; } + { return "Dibangkitkan oleh"; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-990307 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// /*! used as the title of page containing all the index of all namespaces. */ virtual QCString trNamespaceList() @@ -589,9 +562,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! used as an introduction to the namespace list */ virtual QCString trNamespaceListDescription(bool extractAll) { - QCString result="Berikut ini daftar namespace beserta keterangan singkat"; + QCString result="Berikut ini daftar namespace"; if (!extractAll) result+=" yang didokumentasikan"; - result+=":"; + result+=", dengan keterangan singkat:"; return result; } @@ -601,9 +574,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trFriends() { return "Friend"; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-990405 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// /*! used in the class documentation as a header before the list of all * related classes @@ -611,44 +584,44 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trRelatedFunctionDocumentation() { return "Dokumentasi Friend Dan Fungsi Terkait"; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-990425 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// /*! used as the title of the HTML page of a class/struct/union */ virtual QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) { - QCString result=(QCString)clName; + QCString result="Referensi"; switch(compType) { - case ClassDef::Class: result+=" Kelas"; break; - case ClassDef::Struct: result+=" Struktur"; break; - case ClassDef::Union: result+=" Gabungan"; break; - case ClassDef::Interface: result+=" Interface"; break; - case ClassDef::Protocol: result+=" Protokol"; break; - case ClassDef::Category: result+=" Kategori"; break; - case ClassDef::Exception: result+=" Exception"; break; + case ClassDef::Class: result+=" Kelas "; break; + case ClassDef::Struct: result+=" Struct "; break; + case ClassDef::Union: result+=" Union "; break; + case ClassDef::Interface: result+=" Interface "; break; + case ClassDef::Protocol: result+=" Protokol "; break; + case ClassDef::Category: result+=" Kategori "; break; + case ClassDef::Exception: result+=" Eksepsi "; break; } - if (isTemplate) result+=" Template"; - result+=" Referensi"; + if (isTemplate) result+=" Template "; + result+=(QCString)clName; return result; } /*! used as the title of the HTML page of a file */ virtual QCString trFileReference(const char *fileName) { - QCString result=fileName; - result+=" Referensi File"; + QCString result="Referensi File "; + result+=fileName; return result; } /*! used as the title of the HTML page of a namespace */ virtual QCString trNamespaceReference(const char *namespaceName) { - QCString result=namespaceName; - result+=" Referensi Namespace"; + QCString result="Referensi Namespace "; + result+=namespaceName; return result; } @@ -727,7 +700,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 */ virtual QCString trReimplementedInList(int numEntries) { - return "Di-reimplementasikan di "+trWriteList(numEntries)+"."; + return "Diimplementasikan ulang di "+trWriteList(numEntries)+"."; } /*! This is put above each page as a link to all members of namespaces. */ @@ -737,13 +710,13 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! This is an introduction to the page with all namespace members */ virtual QCString trNamespaceMemberDescription(bool extractAll) { - QCString result="Berikut ini daftar anggota namespace "; - if (!extractAll) result+="yang didokumentasikan "; - result+="dengan link ke "; + QCString result="Berikut ini daftar anggota namespace"; + if (!extractAll) result+=" yang didokumentasikan"; + result+=", dengan tautan ke "; if (extractAll) - result+="dokumentasi namespace untuk tiap anggota:"; + result+="dokumentasi namespace untuk setiap anggota:"; else - result+="namespace induk:"; + result+="namespace yang memuatnya:"; return result; } /*! This is used in LaTeX as the title of the chapter with the @@ -758,9 +731,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trNamespaceDocumentation() { return "Dokumentasi Namespace"; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-990522 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// /*! This is used in the documentation before the list of all * namespaces in a file. @@ -768,9 +741,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trNamespaces() { return "Daftar Namespace"; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-990728 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// /*! This is put at the bottom of a class documentation page and is * followed by a list of files that were used to generate the page. @@ -783,14 +756,14 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 switch(compType) { case ClassDef::Class: result+="kelas"; break; - case ClassDef::Struct: result+="struktur"; break; - case ClassDef::Union: result+="gabungan"; break; + case ClassDef::Struct: result+="struct"; break; + case ClassDef::Union: result+="union"; break; case ClassDef::Interface: result+="interface"; break; case ClassDef::Protocol: result+="protokol"; break; case ClassDef::Category: result+="kategori"; break; - case ClassDef::Exception: result+="exception"; break; + case ClassDef::Exception: result+="eksepsi"; break; } - result+=" ini dihasilkan dari file"; + result+=" ini dibangkitkan dari file"; result+=single ? "" : "-file"; result+=" berikut:"; return result; @@ -802,9 +775,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trAlphabeticalList() { return "Daftar Berdasarkan Abjad"; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-990901 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// /*! This is used as the heading text for the retval command. */ virtual QCString trReturnValues() @@ -821,35 +794,31 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trPageAbbreviation() { return "hal."; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-991003 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// - virtual QCString trSources() - { - return "Sumber"; - } virtual QCString trDefinedAtLineInSourceFile() { - return "Definisi pada baris @0 di file @1."; + return "Definisi pada baris @0 dalam file @1."; } virtual QCString trDefinedInSourceFile() { - return "Definisi pada baris @0."; + return "Definisi dalam file @0."; } - ////////////////////////////////////////////////////////////////////////// - // new since 0.49-991205 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// virtual QCString trDeprecated() { return "Kadaluarsa"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.0.0 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// /*! this text is put before a collaboration diagram */ virtual QCString trCollaborationDiagram(const char *clName) @@ -859,7 +828,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! this text is put before an include dependency graph */ virtual QCString trInclDepGraph(const char *fName) { - return (QCString)"Diagram ketergantungan untuk "+fName+":"; + return (QCString)"Bagan kebergantungan pemuatan untuk "+fName+":"; } /*! header that is put before the list of constructor/destructors. */ virtual QCString trConstructorDocumentation() @@ -889,7 +858,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! Text for the \\invariant command */ virtual QCString trInvariant() { - return "Invariant"; + return "Invarian"; } /*! Text shown before a multi-line variable/enum initialization */ virtual QCString trInitialValue() @@ -903,24 +872,24 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 } virtual QCString trGraphicalHierarchy() { - return "Struktur Kelas Berbasis Grafis"; + return "Hierarki Kelas Secara Grafis"; } virtual QCString trGotoGraphicalHierarchy() { - return "Ke struktur kelas berbasis grafis"; + return "Ke bagan grafis hierarki kelas"; } virtual QCString trGotoTextualHierarchy() { - return "Ke struktur kelas berbasis teks"; + return "Ke bagan tekstual hierarki kelas"; } virtual QCString trPageIndex() { return "Indeks Halaman"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.1.0 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// virtual QCString trNote() { @@ -970,9 +939,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Atribut Privat Statis"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.1.3 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a \\todo item */ virtual QCString trTodo() @@ -985,9 +954,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Daftar Tugas"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.1.4 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// virtual QCString trReferencedBy() { @@ -1003,21 +972,23 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 } virtual QCString trInclByDepGraph() { - return "Diagram ini menampilkan file-file yang membutuhkan file ini baik secara langsung maupun tidak langsung:"; + return "Bagan ini menunjukkan file-file yang memuat" + " atau menggunakan file ini baik secara langsung maupun" + " tidak langsung:"; } virtual QCString trSince() { return "Sejak"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.1.5 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// /*! title of the graph legend page */ virtual QCString trLegendTitle() { - return "Legenda Diagram"; + return "Keterangan Bagan"; } /*! page explaining how the dot graph's should be interpreted * The %A in the text below are to prevent link to classes called "A". @@ -1025,7 +996,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trLegendDocs() { return - "Halaman ini berisi keterangan cara membaca diagram yang dihasilkan " + "Halaman ini berisi keterangan cara membaca bagan yang dibangkitkan " "oleh doxygen.<p>\n" "Contoh:\n" "\\code\n" @@ -1057,16 +1028,16 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 "};\n" "\\endcode\n" "Apabila tag \\c MAX_DOT_GRAPH_HEIGHT di file konfigurasi " - "diset ke 240 kode di atas akan menghasilkan diagram berikut:" + "diset ke 240 kode di atas akan menghasilkan bagan berikut:" "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" "<p>\n" - "Kotak-kotak pada diagram di atas mempunyai arti sebagai berikut:\n" + "Kotak-kotak pada bagan di atas mempunyai arti sebagai berikut:\n" "<ul>\n" - "<li>%Kotak hitam merupakan struktur atau kelas yang bersangkutan.\n" - "<li>%Kotak berbingkai hitam adalah struktur atau kelas yang mempunyai dokumentasi.\n" - "<li>%Kotak dengan bingkai abu-abu adalah struktur atau kelas tanpa dokumentasi.\n" - "<li>%Kotak dengan bingkai merah merupakan struktur atau kelas yang didokumentasikan tetapi" - "tidak semua relasinya ditampilkan. %Sebuah diagram " + "<li>%Kotak hitam merupakan struct atau kelas yang bersangkutan.\n" + "<li>%Kotak berbingkai hitam adalah struct atau kelas yang mempunyai dokumentasi.\n" + "<li>%Kotak dengan bingkai abu-abu adalah struct atau kelas tanpa dokumentasi.\n" + "<li>%Kotak dengan bingkai merah merupakan struct atau kelas yang didokumentasikan tetapi" + "tidak semua relasinya ditampilkan. %Sebuah bagan " "akan terpotong apabila lebih besar daripada ukuran yang ditentukan.\n" "</ul>\n" "Arti dari tanda-tanda panah adalah sebagai berikut:\n" @@ -1075,7 +1046,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 "<li>%Panah hijau tua untuk pewarisan diproteksi.\n" "<li>%Panah merah tua untuk pewarisan privat.\n" "<li>%Panah ungu putus-putus menandakan kelas tersebut berhubungan dengan kelas lain. " - "Panah tersebut diberi judul sesuai dengan kelas atau struktur tujuan.\n" + "Panah tersebut diberi judul sesuai dengan kelas atau struct tujuan.\n" "<li>%Panah kuning putus-putus menandakan hubungan antara sebuah template kelas dan " "instance dari template tersebut. Panah tersebut diberi judul sesuai dengan " "parameter template yang digunakan.\n" @@ -1084,12 +1055,12 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! text for the link to the legend page */ virtual QCString trLegend() { - return "legenda"; + return "keterangan"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.0 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a test item */ virtual QCString trTest() @@ -1102,9 +1073,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Daftar Tes"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.1 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// /*! Used as a section header for KDE-2 IDL methods */ virtual QCString trDCOPMethods() @@ -1112,9 +1083,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Fungsi Anggota: DCOP"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.2 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// /*! Used as a section header for IDL properties */ virtual QCString trProperties() @@ -1127,15 +1098,10 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Dokumentasi Property"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.4 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// - /*! Used for Java interfaces in the summary section of Java packages */ - virtual QCString trInterfaces() - { - return "Daftar Interface"; - } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() { @@ -1161,27 +1127,22 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return "Berikut ini daftar paket beserta keterangan singkat (apabila tersedia):"; + return "Berikut ini daftar paket, dengan keterangan singkat (apabila tersedia):"; } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() { return "Daftar Paket"; } - /*! Used as a chapter title for Latex & RTF output */ - virtual QCString trPackageDocumentation() - { - return "Dokumentasi Paket"; - } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { return "Nilai:"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.5 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a \\bug item */ virtual QCString trBug() @@ -1194,9 +1155,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Daftar Bug"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.6 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// /*! Used as ansicpg for RTF file * @@ -1250,7 +1211,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trClass(bool first_capital, bool singular) { QCString result((first_capital ? "Kelas" : "kelas")); - if (!singular) result+="-kelas"; + if (!singular) result+="-kelas"; return result; } @@ -1261,7 +1222,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trFile(bool first_capital, bool singular) { QCString result((first_capital ? "File" : "file")); - if (!singular) result+="-file"; + if (!singular) result+="-file"; return result; } @@ -1272,7 +1233,6 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trNamespace(bool first_capital, bool) { QCString result((first_capital ? "Namespace" : "namespace")); - //if (!singular) result+="s"; return result; } @@ -1283,7 +1243,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 virtual QCString trGroup(bool first_capital, bool singular) { QCString result((first_capital ? "Kelompok" : "kelompok")); - if (!singular) result+="-kelompok"; + if (!singular) result+="-kelompok"; return result; } @@ -1291,10 +1251,10 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 * be followed by a single name or by a list of names * of the category. */ - virtual QCString trPage(bool first_capital, bool ) + virtual QCString trPage(bool first_capital, bool singular) { QCString result((first_capital ? "Halaman" : "halaman")); - //if (!singular) result+="s"; + if (!singular) result+="-halaman"; return result; } @@ -1302,21 +1262,10 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 * be followed by a single name or by a list of names * of the category. */ - virtual QCString trMember(bool first_capital, bool ) + virtual QCString trMember(bool first_capital, bool singular) { QCString result((first_capital ? "Anggota" : "anggota")); - //if (!singular) result+="s"; - return result; - } - - /*! This is used for translation of the word that will possibly - * be followed by a single name or by a list of names - * of the category. - */ - virtual QCString trField(bool first_capital, bool) - { - QCString result((first_capital ? "Variabel" : "variabel")); - //if (!singular) result+="s"; + if (!singular) result+="-anggota"; return result; } @@ -1324,16 +1273,17 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 * be followed by a single name or by a list of names * of the category. */ - virtual QCString trGlobal(bool first_capital, bool) + virtual QCString trGlobal(bool first_capital, bool singular) { - QCString result((first_capital ? "Global" : "global")); - //if (!singular) result+="s"; + QCString result((first_capital ? "Definisi" : "definisi")); + if (!singular) result+="-definisi"; + result += " global"; return result; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.7 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// /*! This text is generated when the \\author command is used and * for the author section in man pages. */ @@ -1344,9 +1294,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return result; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.11 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// /*! This text is put before the list of members referenced by a member */ @@ -1355,9 +1305,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Referensi"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.13 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// /*! used in member documentation blocks to produce a list of * members that are implemented by this one. @@ -1375,9 +1325,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Diimplementasikan di "+trWriteList(numEntries)+"."; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.16 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// /*! used in RTF documentation as a heading for the Table * of Contents. @@ -1387,9 +1337,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Daftar Isi"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.17 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// /*! Used as the header of the list of item that have been * flagged deprecated @@ -1399,9 +1349,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Daftar Kadaluarsa"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.2.18 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// /*! Used as a header for declaration section of the events found in * a C# program @@ -1416,9 +1366,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Dokumentasi Event"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.3 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// /*! Used as a heading for a list of Java class types with package scope. */ @@ -1455,9 +1405,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Daftar Atribut Statis Paket"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.3.1 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// /*! Used in the quick index of a class/file/namespace member list page * to link to the unfiltered list of all members. @@ -1469,12 +1419,12 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 /*! Put in front of the call graph for a function. */ virtual QCString trCallGraph() { - return "Berikut ini diagram pemanggilan untuk fungsi ini:"; + return "Berikut ini bagan fungsi-terpanggil untuk fungsi ini:"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.3.3 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// /*! When the search engine is enabled this text is put in the header * of each page before the field where one can enter the text to search @@ -1523,9 +1473,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Kecocokan:"; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.3.8 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// /*! This is used in HTML as the title of page with source code for file filename */ @@ -1534,15 +1484,15 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return "Kode Sumber:" + filename; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.3.9 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// /*! This is used as the name of the chapter containing the directory * hierarchy. */ virtual QCString trDirIndex() - { return "Struktur Direktori"; } + { return "Hierarki Direktori"; } /*! This is used as the name of the chapter containing the documentation * of the directories. @@ -1579,18 +1529,339 @@ class TranslatorIndonesian : public TranslatorAdapter_1_4_6 return result; } - ////////////////////////////////////////////////////////////////////////// - // new since 1.4.1 - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// /*! This text is added to the documentation when the \\overload command * is used for a overloaded function. */ virtual QCString trOverloadText() { - return "Ini adalah fungsi yang di-overload. Perbedaannya dengan fungsi di atas hanya pada " - "parameter-parameter yang diterima."; + return "Ini adalah fungsi anggota yang di-overload" + " untuk kemudahan. Perbedaannya dengan fungsi di atas" + " hanya pada parameter-parameter yang diterima."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.6 +////////////////////////////////////////////////////////////////////////// + + /*! This is used to introduce a caller (or called-by) graph */ + virtual QCString trCallerGraph() + { + return "Berikut ini bagan fungsi-pemanggil untuk fungsi ini:"; + } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Dokumentasi Nilai Enumerasi"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Dokumentasi Fungsi/Subrutin Anggota"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "Daftar Tipe Data"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Variabel Data"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Berikut daftar tipe data, dengan penjelasan singkat:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result="Berikut daftar semua anggota tipe data "; + if (!extractAll) + { + result+="terdokumentasi "; + } + result+=" dengan tautan ke "; + if (!extractAll) + { + result+="dokumentasi struktur data untuk setiap anggota:"; + } + else + { + result+="tipe data yang memuatnya:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Indeks Tipe Data"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Dokumentasi Tipe Data"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Fungsi/Subrutin"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Dokumentasi Fungsi/Subrutin"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Tipe Data"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Modules List"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Berikut daftar semua modul"; + if (!extractAll) result+=" terdokumentasi"; + result+=", dengan penjelasan singkat:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result="Referensi "; + if (isTemplate) result+="Template "; + switch(compType) + { + case ClassDef::Class: result+="Modul "; break; + case ClassDef::Struct: result+="Tipe "; break; + case ClassDef::Union: result+="Union "; break; + case ClassDef::Interface: result+="Antarmuka "; break; + case ClassDef::Protocol: result+="Protokol "; break; + case ClassDef::Category: result+="Kategori "; break; + case ClassDef::Exception: result+="Eksepsi "; break; + } + result+=(QCString)clName; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result="Referensi Modul "; + result+=namespaceName; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Anggota Modul"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Berikut daftar semua anggota modul "; + if (!extractAll) result+="terdokumentasi "; + result+="dengan tautan ke "; + if (extractAll) + { + result+="dokumentasi modul untuk setiap anggota:"; + } + else + { + result+="modul yang memuatnya:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Indeks Modul"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Modul" : "modul")); + if (!singular) result+="-modul"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Dokumentasi untuk "; + switch(compType) + { + case ClassDef::Class: result+="module"; break; + case ClassDef::Struct: result+="type"; break; + case ClassDef::Union: result+="union"; break; + case ClassDef::Interface: result+="interface"; break; + case ClassDef::Protocol: result+="protocol"; break; + case ClassDef::Category: result+="category"; break; + case ClassDef::Exception: result+="exception"; break; + } + result+=" ini dibangkitkan dari file"; + if (!single) result+="-file "; + result+="berikut:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Tipe" : "tipe")); + if (!singular) result+="-tipe"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Subprogram" : "subprogram")); + if (!singular) result+="-subprogram"; + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "Batasan Tipe"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return "Relasi "+QCString(name); + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "Memuat..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Namespace Global"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Mencari..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Tidak Ditemukan"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Bagan dependensi direktori untuk "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"File dimuat dalam "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Memuat file dalam "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu" }; + static const char *months[] = { "Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember" }; + QCString sdate; + sdate.sprintf("%s %d %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.7.5 +////////////////////////////////////////////////////////////////////////// + + /*! Header for the page with bibliographic citations */ + virtual QCString trCiteReferences() + { return "Daftar Pustaka"; } + + /*! Text for copyright paragraph */ + virtual QCString trCopyright() + { return "Hak Cipta"; } + + /*! Header for the graph showing the directory dependencies */ + virtual QCString trDirDepGraph(const char *name) + { return QCString("Bagan dependensi directori untuk ")+name+":"; } + }; #endif diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index d4e8fef..764ab71 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1092,7 +1092,7 @@ static void writeInnerClasses(const ClassSDict *cl,FTextStream &t) { if (!cd->isHidden() && cd->name().find('@')==-1) // skip anonymous scopes { - t << " <innerclass refid=\"" << cd->getOutputFileBase() + t << " <innerclass refid=\"" << classOutputFileBase(cd) << "\" prot=\""; switch(cd->protection()) { @@ -1327,7 +1327,7 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti) } } - writeInnerClasses(cd->getInnerClasses(),t); + writeInnerClasses(cd->getClassSDict(),t); writeTemplateList(cd,t); if (cd->getMemberGroupSDict()) |