summaryrefslogtreecommitdiffstats
path: root/src/htmlgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-12-25 20:54:44 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-12-25 20:54:44 (GMT)
commitd5c952f0b08df72f4a11585516d7c14759192293 (patch)
tree64b7da0b56bbee19e999a23f69d13372807211d5 /src/htmlgen.cpp
parent752d21c112291e2a2e3bfa82a915b3c091965bfb (diff)
downloadDoxygen-d5c952f0b08df72f4a11585516d7c14759192293.zip
Doxygen-d5c952f0b08df72f4a11585516d7c14759192293.tar.gz
Doxygen-d5c952f0b08df72f4a11585516d7c14759192293.tar.bz2
Release-1.5.7.1-20081225
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r--src/htmlgen.cpp324
1 files changed, 1 insertions, 323 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index bca8fc6..9aa8174 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1081,7 +1081,7 @@ void HtmlGenerator::codify(const char *str)
{
case '\t': spacesToNextTabStop =
Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
- t << spaces.left(spacesToNextTabStop);
+ t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
case '\n': t << "\n"; col=0;
@@ -1740,9 +1740,6 @@ static QCString fixSpaces(const QCString &s)
return substitute(s," ","&nbsp;");
}
-#define NEW_LAYOUT
-#ifdef NEW_LAYOUT
-
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
{
switch (kind)
@@ -1910,325 +1907,6 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
}
}
-#else // old fixed layout
-
-static void writeNamespaceSubIndex(QTextStream &t,bool compact,
- HighlightedItem hli,const QCString &relPath
- )
-{
- bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- startQuickIndexList(t,compact);
- if (documentedNamespaces>0)
- {
- startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
- hli==HLI_Namespaces,compact,relPath);
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
- {
- t << fixSpaces(theTranslator->trPackages());
- }
- else if(fortranOpt)
- {
- t << theTranslator->trModulesList();
- }
- else
- {
- t << theTranslator->trNamespaceList();
- }
- endQuickIndexItem(t);
- }
- if (documentedNamespaceMembers[NMHL_All]>0)
- {
- startQuickIndexItem(t,"namespacemembers"+Doxygen::htmlFileExtension,
- hli==HLI_NamespaceMembers,compact,relPath);
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
- {
- t << fixSpaces(theTranslator->trPackageMembers());
- }
- else if(fortranOpt)
- {
- t << fixSpaces(theTranslator->trModulesMembers());
- }
- else
- {
- t << fixSpaces(theTranslator->trNamespaceMembers());
- }
- endQuickIndexItem(t);
- }
- endQuickIndexList(t,compact);
-}
-
-static void writeClassSubIndex(QTextStream &t,bool compact,
- HighlightedItem hli,const QCString &relPath
- )
-{
- bool fortranOpt=Config_getBool("OPTIMIZE_FOR_FORTRAN");
- bool vhdlOpt=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- startQuickIndexList(t,compact);
- if (annotatedClasses>0)
- {
- if (Config_getBool("ALPHABETICAL_INDEX"))
- {
- startQuickIndexItem(t,"classes"+Doxygen::htmlFileExtension,
- hli==HLI_Classes,compact,relPath);
- t << fixSpaces(theTranslator->trAlphabeticalList());
- endQuickIndexItem(t);
- }
- startQuickIndexItem(t,"annotated"+Doxygen::htmlFileExtension,
- hli==HLI_Annotated,compact,relPath);
- if (fortranOpt)
- {
- t << fixSpaces(theTranslator->trCompoundListFortran());
- }
- else if (vhdlOpt)
- {
- t << fixSpaces(VhdlDocGen::trDesignUnitList());
- }
- else
- {
- t << fixSpaces(theTranslator->trCompoundList());
- }
-
- endQuickIndexItem(t);
- }
- if (hierarchyClasses>0)
- {
- QCString title = theTranslator->trClassHierarchy();
- if (vhdlOpt) title = VhdlDocGen::trDesignUnitHierarchy();
- startQuickIndexItem(t,"hierarchy"+Doxygen::htmlFileExtension,
- hli==HLI_Hierarchy,compact,relPath);
- t << fixSpaces(title);
- endQuickIndexItem(t);
- }
- if (documentedClassMembers[CMHL_All]>0)
- {
- startQuickIndexItem(t,"functions"+Doxygen::htmlFileExtension,
- hli==HLI_Functions,compact,relPath);
- if (fortranOpt)
- {
- t << fixSpaces(theTranslator->trCompoundMembersFortran());
- }
- else if (vhdlOpt)
- {
- t << fixSpaces(VhdlDocGen::trDesignUnitMembers());
- }
- else
- {
- t << fixSpaces(theTranslator->trCompoundMembers());
- }
- endQuickIndexItem(t);
- }
- endQuickIndexList(t,compact);
-}
-
-static void writeFileSubIndex(QTextStream &t,bool compact,
- HighlightedItem hli,const QCString &relPath)
-{
- startQuickIndexList(t,compact);
- if (documentedHtmlFiles>0)
- {
- startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
- hli==HLI_Files,compact,relPath);
- t << fixSpaces(theTranslator->trFileList());
- endQuickIndexItem(t);
- }
- if (documentedFileMembers[FMHL_All]>0)
- {
- startQuickIndexItem(t,"globals"+Doxygen::htmlFileExtension,
- hli==HLI_Globals,compact,relPath);
- t << fixSpaces(theTranslator->trFileMembers());
- endQuickIndexItem(t);
- }
- endQuickIndexList(t,compact);
-}
-
-static void writeDefaultQuickLinks(QTextStream &t,bool compact,
- HighlightedItem hli,const QCString &relPath)
-{
- bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- startQuickIndexList(t,compact);
-
- if (usingTreeIndex())
- {
- startQuickIndexItem(t,"main"+Doxygen::htmlFileExtension,
- hli==HLI_Main,compact,relPath);
- }
- else
- {
- startQuickIndexItem(t,"index"+Doxygen::htmlFileExtension,
- hli==HLI_Main,compact,relPath);
- }
- t << fixSpaces(theTranslator->trMainPage());
- endQuickIndexItem(t);
-
- // -------------- Related pages
-
- if (indexedPages>0)
- {
- startQuickIndexItem(t,"pages"+Doxygen::htmlFileExtension,
- hli==HLI_Pages,compact,relPath);
- t << fixSpaces(theTranslator->trRelatedPages());
- endQuickIndexItem(t);
- }
-
- // --------------- Modules
-
- if (documentedGroups>0)
- {
- startQuickIndexItem(t,"modules"+Doxygen::htmlFileExtension,
- hli==HLI_Modules,compact,relPath);
- t << fixSpaces(theTranslator->trModules());
- endQuickIndexItem(t);
- }
-
- // --------------- Namespace indices
-
- if (documentedNamespaces>0)
- {
- startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
- hli==HLI_Namespaces || hli==HLI_NamespaceMembers || hli==HLI_NamespaceVisible,
- compact,relPath);
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
- {
- t << fixSpaces(theTranslator->trPackages());
- }
- else if (fortranOpt)
- {
- t << theTranslator->trModules();
- }
- else
- {
- t << theTranslator->trNamespaces();
- }
- endQuickIndexItem(t);
- if (!compact)
- {
- writeNamespaceSubIndex(t,compact,hli,relPath);
- }
- }
-
-
- // -------------- Class indices
-
- if (annotatedClasses>0)
- {
- static bool alphaIndex=Config_getBool("ALPHABETICAL_INDEX");
- {
- startQuickIndexItem(t,QCString(alphaIndex?"classes":"annotated")+Doxygen::htmlFileExtension,
- hli==HLI_Hierarchy || hli==HLI_Classes ||
- hli==HLI_Annotated || hli==HLI_Functions || hli==HLI_ClassVisible,
- compact,relPath);
- }
- if (fortranOpt)
- {
- t << fixSpaces(theTranslator->trDataTypes());
- }
- else if (vhdlOpt)
- {
- t << fixSpaces(VhdlDocGen::trDesignUnits());
- }
- else
- {
- t << fixSpaces(theTranslator->trClasses());
- }
- endQuickIndexItem(t);
- if (!compact)
- {
- writeClassSubIndex(t,compact,hli,relPath);
- }
- }
-
- // -------------- File
-
- if (documentedHtmlFiles>0)
- {
- startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
- hli==HLI_Files || hli==HLI_Globals || hli==HLI_FileVisible,
- compact,relPath);
- t << fixSpaces(theTranslator->trFile(TRUE,FALSE));
- endQuickIndexItem(t);
- if (!compact)
- {
- writeFileSubIndex(t,compact,hli,relPath);
- }
- }
-
- // -------------- Directories
-
- if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
- {
- startQuickIndexItem(t,"dirs"+Doxygen::htmlFileExtension,
- hli==HLI_Directories,compact,relPath);
- t << fixSpaces(theTranslator->trDirectories());
- endQuickIndexItem(t);
- }
-
- // -------------- Examples
-
- if (Doxygen::exampleSDict->count()>0)
- {
- startQuickIndexItem(t,"examples"+Doxygen::htmlFileExtension,
- hli==HLI_Examples,compact,relPath);
- t << fixSpaces(theTranslator->trExamples());
- endQuickIndexItem(t);
- }
-
- // -------------- Search field
-
- if (Config_getBool("SEARCHENGINE"))
- {
- QCString searchFor = fixSpaces(theTranslator->trSearchForIndex());
- if (searchFor.at(0)=='S') searchFor="<u>S</u>"+searchFor.mid(1);
- t << " <li>\n";
- t << " <form action=\"" << relPath << "search.php\" method=\"get\">\n";
- t << " <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
- t << " <tr>\n";
- t << " <td><label>&nbsp;" << searchFor << "&nbsp;</label></td>\n";
- if (hli!=HLI_Search)
- {
- t << " <td><input type=\"text\" name=\"query\" value=\"\" size=\"20\" accesskey=\"s\"/></td>\n";
- t << " </tr>\n";
- t << " </table>\n";
- t << " </form>\n";
- t << " </li>\n";
- }
- }
- if (hli!=HLI_Search) // on the search page the page will be ended by the
- // page itself
- {
- endQuickIndexList(t,compact);
- }
-
- //-------------------------------------------------------------------------
- // write sub indices in compact mode
-
- if ((hli==HLI_Namespaces || hli==HLI_NamespaceMembers ||
- hli==HLI_NamespaceVisible
- ) &&
- documentedNamespaces>0 &&
- documentedNamespaceMembers[NMHL_All]>0)
- {
- writeNamespaceSubIndex(t,compact,hli,relPath);
- }
- else if ((hli==HLI_Hierarchy || hli==HLI_Classes ||
- hli==HLI_Annotated || hli==HLI_Functions ||
- hli==HLI_ClassVisible || !compact
- ) && annotatedClasses>0
- )
- {
- writeClassSubIndex(t,compact,hli,relPath);
- }
- else if ((hli==HLI_Files || hli==HLI_Globals ||
- hli==HLI_FileVisible || !compact
- ) && documentedHtmlFiles>0 && documentedFileMembers[FMHL_All]>0
- )
- {
- writeFileSubIndex(t,compact,hli,relPath);
- }
-
-}
-#endif
-
void HtmlGenerator::startQuickIndices()
{
if (!Config_getBool("DISABLE_INDEX"))