From b70a5b4f9325ec703db37394feeaa9ebc11228b4 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 22 Jun 2009 20:14:03 +0000 Subject: Release-1.5.9-20090622 --- INSTALL | 4 +- README | 4 +- addon/doxywizard/doxywizard.cpp | 12 +- configure | 2 +- doc/config.doc | 19 +- doc/language.doc | 9 +- doc/translator_report.txt | 34 +-- qtools/Doxyfile | 41 ++- src/classdef.cpp | 28 +- src/code.l | 26 +- src/commentscan.l | 43 ++- src/config.l | 4 +- src/config.xml | 24 +- src/configoptions.cpp | 41 +-- src/docparser.cpp | 50 ++-- src/docparser.h | 19 +- src/docsets.cpp | 2 +- src/docvisitor.h | 2 + src/dot.cpp | 11 +- src/doxygen.cpp | 48 ++- src/doxygen.h | 2 +- src/filedef.cpp | 12 +- src/fortrancode.l | 24 +- src/ftvhelp.cpp | 38 ++- src/groupdef.cpp | 2 + src/htmldocvisitor.cpp | 44 +++ src/htmldocvisitor.h | 1 + src/htmlgen.cpp | 272 +++++++++++++++-- src/htmlgen.h | 3 +- src/htmlhelp.cpp | 2 +- src/index.cpp | 634 +++++++++++++++++++++++++++++++++++++++- src/index.h | 5 + src/latexdocvisitor.cpp | 4 + src/latexdocvisitor.h | 1 + src/latexgen.cpp | 2 +- src/layout.cpp | 6 +- src/libdoxygen.pro.in | 2 + src/libdoxygen.t | 6 + src/logos.cpp | 4 + src/mandocvisitor.cpp | 4 + src/mandocvisitor.h | 1 + src/memberdef.cpp | 73 ++++- src/memberdef.h | 8 + src/membergroup.h | 1 + src/memberlist.cpp | 14 +- src/namespacedef.cpp | 10 +- src/pagedef.cpp | 6 +- src/perlmodgen.cpp | 5 + src/printdocvisitor.h | 5 + src/pycode.l | 24 +- src/qhp.cpp | 17 +- src/qhp.h | 3 + src/rtfdocvisitor.cpp | 4 + src/rtfdocvisitor.h | 1 + src/rtfgen.cpp | 2 +- src/scanner.l | 3 +- src/search.css | 210 +++++++++++++ src/search.js | 456 +++++++++++++++++++++++++++++ src/search_css.h | 210 +++++++++++++ src/search_js.h | 456 +++++++++++++++++++++++++++++ src/sortdict.h | 6 +- src/tagreader.cpp | 4 + src/textdocvisitor.h | 1 + src/util.cpp | 6 +- src/util.h | 6 +- src/vhdlcode.l | 24 +- src/vhdldocgen.cpp | 48 ++- src/vhdlscanner.l | 10 + src/xmldocvisitor.cpp | 7 +- src/xmldocvisitor.h | 1 + 70 files changed, 2826 insertions(+), 287 deletions(-) create mode 100644 src/search.css create mode 100644 src/search.js create mode 100644 src/search_css.h create mode 100644 src/search_js.h diff --git a/INSTALL b/INSTALL index 79fd565..81b8294 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ -DOXYGEN Version 1.5.9-20090522 +DOXYGEN Version 1.5.9-20090622 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (22 May 2009) +Dimitri van Heesch (22 June 2009) diff --git a/README b/README index 604f849..8d60917 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.5.9_20090522 +DOXYGEN Version 1.5.9_20090622 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (22 May 2009) +Dimitri van Heesch (dimitri@stack.nl) (22 June 2009) diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 5928524..2c30b14 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -293,16 +293,16 @@ void MainWindow::loadSettings() { QVariant geometry = m_settings.value(QString::fromAscii("main/geometry"), QVariant::Invalid); QVariant state = m_settings.value(QString::fromAscii("main/state"), QVariant::Invalid); - QVariant expState = m_settings.value(QString::fromAscii("expert/state"), QVariant::Invalid); - QVariant expState2 = m_settings.value(QString::fromAscii("expert/state2"), QVariant::Invalid); + //QVariant expState = m_settings.value(QString::fromAscii("expert/state"), QVariant::Invalid); + //QVariant expState2 = m_settings.value(QString::fromAscii("expert/state2"), QVariant::Invalid); QVariant wizState = m_settings.value(QString::fromAscii("wizard/state"), QVariant::Invalid); QVariant loadSettings = m_settings.value(QString::fromAscii("wizard/loadsettings"), QVariant::Invalid); //QVariant workingDir = m_settings.value(QString::fromAscii("main/defdir"), QVariant::Invalid); if (geometry !=QVariant::Invalid) restoreGeometry(geometry.toByteArray()); if (state !=QVariant::Invalid) restoreState (state.toByteArray()); - if (expState !=QVariant::Invalid) m_expert->restoreState(expState.toByteArray()); - if (expState2 !=QVariant::Invalid) m_expert->restoreInnerState(expState2.toByteArray()); + //if (expState !=QVariant::Invalid) m_expert->restoreState(expState.toByteArray()); + //if (expState2 !=QVariant::Invalid) m_expert->restoreInnerState(expState2.toByteArray()); if (wizState !=QVariant::Invalid) m_wizard->restoreState(wizState.toByteArray()); //if (workingDir!=QVariant::Invalid) //{ @@ -330,8 +330,8 @@ void MainWindow::saveSettings() m_settings.setValue(QString::fromAscii("main/geometry"), saveGeometry()); m_settings.setValue(QString::fromAscii("main/state"), saveState()); - m_settings.setValue(QString::fromAscii("expert/state"), m_expert->saveState()); - m_settings.setValue(QString::fromAscii("expert/state2"), m_expert->saveInnerState()); + //m_settings.setValue(QString::fromAscii("expert/state"), m_expert->saveState()); + //m_settings.setValue(QString::fromAscii("expert/state2"), m_expert->saveInnerState()); m_settings.setValue(QString::fromAscii("wizard/state"), m_wizard->saveState()); } diff --git a/configure b/configure index 49102bb..4675673 100755 --- a/configure +++ b/configure @@ -20,7 +20,7 @@ doxygen_version_minor=5 doxygen_version_revision=9 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=NO +doxygen_version_mmn=20090622 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` diff --git a/doc/config.doc b/doc/config.doc index 8525593..7f9fe92 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -1135,7 +1135,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" will point to the HTML generated by the htags(1) tool instead of doxygen built-in source browser. The htags tool is part of GNU's global source tagging system (see http://www.gnu.org/software/global/global.html). - The use it do the following: + To use it do the following: -# Install the latest version of global (i.e. 4.8.6 or better) -# Enable SOURCE_BROWSER and USE_HTAGS in the config file @@ -1478,15 +1478,8 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" If the tag value is set to FRAME, 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 (for instance Mozilla 1.0+, - Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are - probably better off using the HTML help feature. Other possible values - for this tag are: \c HIERARCHIES, which will generate the Groups, Directories, - and Class Hierarchy pages using a tree view instead of an ordered list; - ALL, which combines the behavior of \c FRAME and \c HIERARCHIES, and \c NONE, - which disables this behavior completely. For backwards compatibility - with previous releases of Doxygen, the values YES and NO are equivalent - to FRAME and NONE respectively. + JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). + Windows users are probably better off using the HTML help feature. Via custom stylesheets (see \ref cfg_html_stylesheet "HTML_STYLESHEET") one can further \ref doxygen_finetune "fine tune" the look of the index. @@ -1494,6 +1487,12 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" example that shows how to put an image at the root of the tree instead of the \ref cfg_project_name "project name". +\anchor cfg_use_inline_trees +
\c USE_INLINE_TREES + \addindex USE_INLINE_TREES +By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +and Class Hierarchy pages using a tree view instead of an ordered list. + \anchor cfg_treeview_width
\c TREEVIEW_WIDTH
\addindex TREEVIEW_WIDTH diff --git a/doc/language.doc b/doc/language.doc index a7da0df..2058967 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -216,9 +216,9 @@ when the translator was updated. Polish - Piotr Kaminski
Grzegorz Kowal - Piotr.Kaminski at ctm dot gdynia dot pl
g_kowal at poczta dot onet dot pl - 1.4.6 + Piotr Kaminski
Grzegorz Kowal
Krzysztof Kral + Piotr.Kaminski at ctm dot gdynia dot pl
g_kowal at poczta dot onet dot pl
krzysztof.kral at gmail dot com + up-to-date Portuguese @@ -373,8 +373,9 @@ when the translator was updated. \hline Persian & Ali Nadalizadeh & {\tt\tiny nadalizadeh@gmail.com} & up-to-date \\ \hline - Polish & Piotr Kaminski & {\tt\tiny Piotr.Kaminski@ctm.gdynia.pl} & 1.4.6 \\ + Polish & Piotr Kaminski & {\tt\tiny Piotr.Kaminski@ctm.gdynia.pl} & up-to-date \\ ~ & Grzegorz Kowal & {\tt\tiny g\_kowal@poczta.onet.pl} & ~ \\ + ~ & Krzysztof Kral & {\tt\tiny krzysztof.kral@gmail.com} & ~ \\ \hline Portuguese & Rui Godinho Lopes & {\tt\tiny ruiglopes@yahoo.com} & 1.3.3 \\ \hline diff --git a/doc/translator_report.txt b/doc/translator_report.txt index c6c721d..2d86d6c 100644 --- a/doc/translator_report.txt +++ b/doc/translator_report.txt @@ -10,7 +10,7 @@ Persian, Polish, Portuguese, Romanian, Russian, Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese. -Of them, 24 translators are up-to-date, 14 translators are based on +Of them, 25 translators are up-to-date, 13 translators are based on some adapter class, and 2 are English based. ---------------------------------------------------------------------- @@ -35,6 +35,7 @@ still may be some details listed even for them: TranslatorKorean TranslatorMacedonian TranslatorPersian + TranslatorPolish -- Remove the obsolete methods (never used). TranslatorRomanian TranslatorRussian TranslatorSerbianCyrilic @@ -54,7 +55,6 @@ must be implemented to become up-to-date: TranslatorFrench 1.5.4 22 methods to implement TranslatorDanish 1.5.4 22 methods to implement TranslatorSlovene 1.4.6 24 methods to implement - TranslatorPolish 1.4.6 23 methods to implement TranslatorNorwegian 1.4.6 23 methods to implement TranslatorLithuanian 1.4.6 24 methods to implement TranslatorIndonesian 1.4.6 23 methods to implement @@ -472,36 +472,10 @@ TranslatorNorwegian (TranslatorAdapter_1_4_6) 23 methods to implement virtual QCString trNoDescriptionAvailable() -TranslatorPolish (TranslatorAdapter_1_4_6) 23 methods to implement +TranslatorPolish (Translator) ---------------- - Implements 193 of the required methods. - - Missing methods (should be implemented): - - virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) - virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, bool single) - virtual QCString trSubprograms() - virtual QCString trModulesListDescription(bool extractAll) - virtual QCString trModulesList() - virtual QCString trTypeConstraints() - virtual QCString trMemberFunctionDocumentationFortran() - virtual QCString trCompoundListDescriptionFortran() - virtual QCString trTypeDocumentation() - virtual QCString trModuleReference(const char * namespaceName) - virtual QCString trModulesMemberDescription(bool extractAll) - virtual QCString trModulesMembers() - virtual QCString trModulesIndex() - virtual QCString trCompoundListFortran() - virtual QCString trDataTypes() - virtual QCString trCompoundIndexFortran() - virtual QCString trSubprogram(bool first_capital, bool singular) - virtual QCString trCallerGraph() - virtual QCString trCompoundReferenceFortran(const char * clName, ClassDef::CompoundType compType, bool isTemplate) - virtual QCString trType(bool first_capital, bool singular) - virtual QCString trModule(bool first_capital, bool singular) - virtual QCString trCompoundMembersFortran() - virtual QCString trSubprogramDocumentation() + Implements 216 of the required methods. Obsolete methods (should be removed, never used): diff --git a/qtools/Doxyfile b/qtools/Doxyfile index 16b681e..3ee0cd3 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.5.4 +# Doxyfile 1.5.9 #--------------------------------------------------------------------------- # Project related configuration options @@ -7,7 +7,7 @@ DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = Doxygen PROJECT_NUMBER = OUTPUT_DIRECTORY = ../qtools_docs -CREATE_SUBDIRS = NO +CREATE_SUBDIRS = YES OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES @@ -21,7 +21,6 @@ SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 @@ -29,12 +28,16 @@ ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES TYPEDEF_HIDES_STRUCT = NO +SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -55,6 +58,7 @@ SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO +SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES @@ -62,9 +66,11 @@ GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES SHOW_DIRECTORIES = NO +SHOW_FILES = YES +SHOW_NAMESPACES = YES FILE_VERSION_FILTER = +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- @@ -122,18 +128,31 @@ HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -GENERATE_DOCSET = YES HTML_DYNAMIC_SECTIONS = NO +GENERATE_DOCSET = YES +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO +CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES +USE_INLINE_TREES = NO TREEVIEW_WIDTH = 250 +FORMULA_FONTSIZE = 10 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -149,6 +168,7 @@ PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- @@ -211,6 +231,9 @@ CLASS_DIAGRAMS = YES MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES +DOT_FONTNAME = FreeSans +DOT_FONTSIZE = 10 +DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES @@ -232,6 +255,6 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Options related to the search engine #--------------------------------------------------------------------------- -SEARCHENGINE = NO +SEARCHENGINE = YES diff --git a/src/classdef.cpp b/src/classdef.cpp index 198fc4d..168162b 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -294,7 +294,7 @@ QCString ClassDef::displayName() const } if (m_impl->compType==ClassDef::Protocol && n.right(2)=="-p") { - n="< "+n.left(n.length()-2)+" >"; + n="<"+n.left(n.length()-2)+">"; } return n; } @@ -1442,11 +1442,11 @@ void ClassDef::writeDocumentation(OutputList &ol) } } - if (Config_getBool("SEARCHENGINE")) - { - Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); - Doxygen::searchIndex->addWord(localName(),TRUE); - } + //if (Config_getBool("SEARCHENGINE")) + //{ + // Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); + // Doxygen::searchIndex->addWord(localName(),TRUE); + //} bool exampleFlag=hasExamples(); //---------------------------------------- start flexible part ------------------------------- @@ -1801,7 +1801,9 @@ void ClassDef::writeMemberList(OutputList &ol) ol.writeObjectLink(cd->getReference(), cd->getOutputFileBase(), 0, - cd->displayName()); + md->category() ? + md->category()->displayName() : + cd->displayName()); ol.writeString(""); ol.writeString(""); } @@ -2146,7 +2148,6 @@ static bool isStandardFunc(MemberDef *md) * with that of this class. Must only be called for classes without * subclasses! */ - void ClassDef::mergeMembers() { if (m_impl->membersMerged) return; @@ -2398,6 +2399,7 @@ void ClassDef::mergeMembers() void ClassDef::mergeCategory(ClassDef *category) { category->setCategoryOf(this); + category->setArtificial(TRUE); MemberNameInfoSDict *srcMnd = category->memberNameInfoSDict(); MemberNameInfoSDict *dstMnd = m_impl->allMemberNameInfoSDict; @@ -2415,8 +2417,7 @@ void ClassDef::mergeCategory(ClassDef *category) } else // new method name { - // create a deep copy of the list (only the MemberInfo's will be - // copied, not the actual MemberDef's) + // create a deep copy of the list MemberNameInfo *newMni = 0; newMni = new MemberNameInfo(srcMni->memberName()); @@ -2425,12 +2426,15 @@ void ClassDef::mergeCategory(ClassDef *category) MemberInfo *mi; for (;(mi=mnii.current());++mnii) { - //printf("Adding!\n"); + //printf("Adding '%s'\n",mi->memberDef->name().data()); MemberInfo *newMi=new MemberInfo(mi->memberDef,mi->prot,mi->virt,mi->inherited); newMi->scopePath=mi->scopePath; newMi->ambigClass=mi->ambigClass; - newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope.copy(); + newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope; newMni->append(newMi); + mi->memberDef->moveTo(this); + mi->memberDef->setCategory(category); + internalInsertMember(mi->memberDef,mi->prot,FALSE); } // add it to the dictionary diff --git a/src/code.l b/src/code.l index 27ddf50..02e6858 100644 --- a/src/code.l +++ b/src/code.l @@ -410,22 +410,22 @@ static void popScope() static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="") { - static bool searchEngineEnabled=Config_getBool("SEARCHENGINE") && - Config_getBool("SOURCE_BROWSER"); - if (searchEngineEnabled) - { - Doxygen::searchIndex->setCurrentDoc(name,base,anchor); - } + //static bool searchEngineEnabled=Config_getBool("SEARCHENGINE") && + // Config_getBool("SOURCE_BROWSER"); + //if (searchEngineEnabled) + //{ + // Doxygen::searchIndex->setCurrentDoc(name,base,anchor); + //} } static void addToSearchIndex(const char *text) { - static bool searchEngineEnabled=Config_getBool("SEARCHENGINE") && - Config_getBool("SOURCE_BROWSER"); - if (searchEngineEnabled) - { - Doxygen::searchIndex->addWord(text,FALSE); - } + //static bool searchEngineEnabled=Config_getBool("SEARCHENGINE") && + // Config_getBool("SOURCE_BROWSER"); + //if (searchEngineEnabled) + //{ + // Doxygen::searchIndex->addWord(text,FALSE); + //} } static void setClassScope(const QCString &name) @@ -1928,7 +1928,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} endFontClass(); BEGIN( Body ); } -^[ \t]*"#" { +^[ \t]*"#" { startFontClass("preprocessor"); g_lastSkipCppContext = YY_START; g_code->codify(yytext); diff --git a/src/commentscan.l b/src/commentscan.l index 181a15a..0ddb9fa 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -405,6 +405,7 @@ static int g_memberGroupId = DOX_NOGROUP; static QCString g_memberGroupHeader; static QCString g_memberGroupDocs; static QCString g_memberGroupRelates; +static QCString g_compoundName; //----------------------------------------------------------------------------- @@ -2033,6 +2034,11 @@ static bool handleExample(const QCString &) static bool handleDetails(const QCString &) { + if (inContext!=OutputBrief) + { + addOutput("\n\n"); // treat @details outside brief description + // as a new paragraph + } setOutput(OutputDoc); return FALSE; } @@ -2455,13 +2461,14 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, //--------------------------------------------------------------------------- -void groupEnterFile(const char *,int) +void groupEnterFile(const char *fileName,int) { g_autoGroupStack.setAutoDelete(TRUE); g_autoGroupStack.clear(); g_memberGroupId = DOX_NOGROUP; g_memberGroupDocs.resize(0); g_memberGroupRelates.resize(0); + g_compoundName=fileName; } void groupLeaveFile(const char *fileName,int line) @@ -2488,10 +2495,21 @@ void groupEnterCompound(const char *fileName,int line,const char *name) g_memberGroupId=DOX_NOGROUP; g_memberGroupRelates.resize(0); g_memberGroupDocs.resize(0); + g_compoundName = name; + int i = g_compoundName.find('('); + if (i!=-1) + { + g_compoundName=g_compoundName.left(i); // strip category (Obj-C) + } + if (g_compoundName.isEmpty()) + { + g_compoundName=fileName; + } } void groupLeaveCompound(const char *,int,const char *) { + //printf("groupLeaveCompound(%s)\n",name); //if (g_memberGroupId!=DOX_NOGROUP) //{ // warn(fileName,line,"Warning: end of compound %s while inside a member group\n",name); @@ -2499,8 +2517,27 @@ void groupLeaveCompound(const char *,int,const char *) g_memberGroupId=DOX_NOGROUP; g_memberGroupRelates.resize(0); g_memberGroupDocs.resize(0); + g_compoundName.resize(0); } +static int findExistingGroup(int &groupId,const MemberGroupInfo *info) +{ + //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data()); + QIntDictIterator di(Doxygen::memGrpInfoDict); + MemberGroupInfo *mi; + for (di.toFirst();(mi=di.current());++di) + { + if (g_compoundName==mi->compoundName && // same file or scope + stricmp(mi->header,info->header)==0 // same header + ) + { + //printf("Found it!\n"); + return di.currentKey(); // put the item in this group + } + } + groupId++; // start new group + return groupId; +} void openGroup(Entry *e,const char *,int) { @@ -2515,11 +2552,11 @@ void openGroup(Entry *e,const char *,int) if (g_memberGroupId==DOX_NOGROUP) // no group started yet { static int curGroupId=0; - g_memberGroupId = curGroupId++; - //printf("new group id=%d header=%s\n",g_memberGroupId,g_memberGroupHeader.data()); MemberGroupInfo *info = new MemberGroupInfo; info->header = g_memberGroupHeader.stripWhiteSpace(); + info->compoundName = g_compoundName; + g_memberGroupId = findExistingGroup(curGroupId,info); Doxygen::memGrpInfoDict.insert(g_memberGroupId,info); g_memberGroupRelates = e->relates; diff --git a/src/config.l b/src/config.l index 1f72fe6..2ee393e 100644 --- a/src/config.l +++ b/src/config.l @@ -178,11 +178,11 @@ void ConfigBool::convertStrToVal() QCString val = m_valueString.stripWhiteSpace().lower(); if (!val.isEmpty()) { - if (val=="yes" || val=="true" || val=="1") + if (val=="yes" || val=="true" || val=="1" || val=="all") { m_value=TRUE; } - else if (val=="no" || val=="false" || val=="0") + else if (val=="no" || val=="false" || val=="0" || val=="none") { m_value=FALSE; } diff --git a/src/config.xml b/src/config.xml index 9d6e144..882c96b 100644 --- a/src/config.xml +++ b/src/config.xml @@ -873,27 +873,19 @@ the value YES disables it. This tag can be used to set the number of enum values (range [1..20]) that doxygen will group on one line in the generated HTML documentation. ' minval='1' maxval='20' defval='4' depends='GENERATE_HTML'/> - +JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +Windows users are probably better off using the HTML help feature. +' depends='GENERATE_HTML'/> +
" << endl; + m_t << "
" << endl; +} + //-------------------------------------- // visitor functions for compound nodes //-------------------------------------- @@ -542,6 +548,37 @@ bool isLastChildNode(T *parent, DocNode *node) return parent->children().getLast()==node; } +bool isSeparatedParagraph(DocSimpleSect *parent,DocPara *par) +{ + QList nodes = parent->children(); + int i = nodes.findRef(par); + if (i==-1) return FALSE; + int count = parent->children().count(); + if (count>1 && i==0) + { + if (nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep) + { + return TRUE; + } + } + else if (count>1 && i==count-1) + { + if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep) + { + return TRUE; + } + } + else if (count>2 && i>0 && ikind()==DocNode::Kind_SimpleSectSep && + nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep) + { + return TRUE; + } + } + return FALSE; +} + int getParagraphContext(DocPara *p,bool &isFirst,bool &isLast) { int t=0; @@ -592,6 +629,13 @@ int getParagraphContext(DocPara *p,bool &isFirst,bool &isLast) isLast =isLastChildNode ((DocSimpleSect*)p->parent(),p); if (isFirst) t=2; if (isLast) t=4; + if (isSeparatedParagraph((DocSimpleSect*)p->parent(),p)) + // if the paragraph is enclosed with separators it will + // be included in
..
so avoid addition paragraph + // markers + { + isFirst=isLast=TRUE; + } break; default: break; diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h index 929fb5c..a20d619 100644 --- a/src/htmldocvisitor.h +++ b/src/htmldocvisitor.h @@ -52,6 +52,7 @@ class HtmlDocVisitor : public DocVisitor void visit(DocIncOperator *); void visit(DocFormula *); void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); //-------------------------------------- // visitor functions for compound nodes diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 49dd8e2..0383f55 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -48,9 +48,11 @@ static const char defaultStyleSheet[] = #include "doxygen_css.h" ; +#if 0 // old PHP based search engine static const char search_script[]= #include "search_php.h" ; +#endif static QCString g_header; static QCString g_footer; @@ -347,6 +349,141 @@ static unsigned char tab_r_gif[] = { }; static unsigned int tab_r_gif_len = 2585; +static unsigned char search_png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, + 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, + 0x08, 0x02, 0x00, 0x00, 0x00, 0x99, 0x7a, 0xc8, 0x4c, 0x00, 0x00, 0x01, + 0xd6, 0x49, 0x44, 0x41, 0x54, 0x28, 0x15, 0x8d, 0x92, 0xbb, 0xae, 0x41, + 0x51, 0x10, 0x86, 0xcf, 0x66, 0x0b, 0x22, 0x44, 0x23, 0x4a, 0xb7, 0xd0, + 0x11, 0x09, 0x71, 0x49, 0xbc, 0x82, 0xc2, 0x2b, 0xa0, 0xd6, 0x29, 0x74, + 0x1e, 0x42, 0xeb, 0x11, 0x44, 0x41, 0x43, 0x45, 0x27, 0x48, 0x08, 0x91, + 0x10, 0x51, 0xba, 0x14, 0x42, 0x21, 0x91, 0x10, 0x97, 0xf3, 0xb1, 0x9c, + 0x9d, 0x13, 0x97, 0x93, 0x33, 0xc5, 0xda, 0xb3, 0x66, 0xfe, 0xff, 0x9f, + 0x59, 0x33, 0x5b, 0xba, 0x5e, 0xaf, 0x5f, 0x77, 0xbb, 0x5c, 0x2e, 0xd2, + 0xdd, 0xc4, 0xf5, 0x3f, 0xa7, 0xac, 0x30, 0x3b, 0x9d, 0x4e, 0xbf, 0xdf, + 0x9f, 0x4e, 0xa7, 0x44, 0xdc, 0x6e, 0xb7, 0xdf, 0xef, 0x0f, 0x87, 0xc3, + 0x7f, 0x4b, 0x48, 0xa7, 0xd3, 0x89, 0x7a, 0xd5, 0x6a, 0xb5, 0x5c, 0x2e, + 0x9f, 0xcf, 0x67, 0xea, 0x43, 0x50, 0xa9, 0x54, 0x6a, 0xb5, 0x3a, 0x91, + 0x48, 0xc4, 0xe3, 0x71, 0xb2, 0x9f, 0x24, 0x64, 0x70, 0xad, 0x56, 0xab, + 0x54, 0x2a, 0x19, 0x0c, 0x86, 0x50, 0x28, 0xe4, 0xf5, 0x7a, 0x81, 0x0e, + 0x87, 0xc3, 0x76, 0xbb, 0x4d, 0xd0, 0x62, 0xb1, 0x44, 0xa3, 0xd1, 0x8f, + 0x64, 0x12, 0xdd, 0x6e, 0x97, 0xfa, 0x91, 0x48, 0x84, 0x3a, 0x5a, 0xad, + 0x96, 0x52, 0x4e, 0xa7, 0x13, 0xd1, 0x5a, 0xad, 0x46, 0x8a, 0xe6, 0xf1, + 0xdf, 0xf2, 0x55, 0x0c, 0x6c, 0x32, 0x99, 0x70, 0x52, 0xd6, 0x68, 0x34, + 0xea, 0xf5, 0x7a, 0x9d, 0x4e, 0x87, 0xc3, 0x55, 0xa4, 0xde, 0xd2, 0x44, + 0x50, 0x06, 0x21, 0xde, 0x49, 0x4d, 0x59, 0x7e, 0xcc, 0x8f, 0x07, 0x23, + 0x01, 0x82, 0x14, 0x36, 0x1a, 0x8d, 0x8a, 0xc5, 0xe2, 0x6f, 0x95, 0x54, + 0x2a, 0xc5, 0x03, 0x6f, 0xfd, 0xd0, 0x24, 0x67, 0xaf, 0xd7, 0x43, 0x48, + 0x41, 0x70, 0xc5, 0x77, 0xb9, 0x5c, 0x9c, 0xe0, 0x40, 0x2b, 0xd9, 0x64, + 0x32, 0x29, 0x46, 0x73, 0x23, 0xfb, 0x7c, 0x3e, 0xce, 0x66, 0xb3, 0x59, + 0xa9, 0x54, 0x56, 0xab, 0xd5, 0x72, 0xb9, 0xc4, 0x69, 0x34, 0x1a, 0x04, + 0xd9, 0x99, 0x98, 0x36, 0xe8, 0x74, 0x3a, 0x4d, 0x04, 0xa6, 0xc0, 0xe3, + 0x4b, 0x74, 0xb5, 0xdb, 0xed, 0xd8, 0x53, 0xbd, 0x5e, 0xa7, 0x6d, 0x1a, + 0x26, 0xca, 0xce, 0x18, 0x21, 0xa5, 0x6c, 0x36, 0x5b, 0x2e, 0x97, 0x33, + 0x99, 0x4c, 0x04, 0xb1, 0xc1, 0x60, 0xa0, 0x30, 0xb9, 0xaa, 0xf3, 0xf9, + 0x3c, 0x1c, 0xbb, 0xdd, 0x6e, 0x36, 0x9b, 0x41, 0x23, 0x04, 0xdf, 0xe3, + 0xf1, 0xb0, 0xa1, 0xed, 0x76, 0x4b, 0x17, 0xe3, 0xf1, 0x38, 0x18, 0x0c, + 0x32, 0x11, 0xd0, 0x56, 0xab, 0xf5, 0xa6, 0xf1, 0x63, 0x92, 0x78, 0x09, + 0x75, 0xf6, 0xfb, 0xfd, 0xe1, 0x70, 0x10, 0x05, 0x35, 0x1a, 0x0d, 0x8a, + 0x9b, 0xcd, 0xa6, 0x50, 0x28, 0xac, 0xd7, 0x6b, 0x87, 0xc3, 0x91, 0xcd, + 0x66, 0x59, 0xc1, 0x0f, 0xeb, 0xf1, 0xbd, 0xb5, 0x2d, 0x5e, 0x85, 0x0a, + 0xa6, 0x5c, 0x09, 0xa2, 0xb5, 0x58, 0x2c, 0xe0, 0xa3, 0x92, 0xc9, 0x64, + 0x02, 0x81, 0xc0, 0x33, 0x59, 0x70, 0x04, 0xff, 0x29, 0x47, 0x0a, 0xfe, + 0x7c, 0x3e, 0x9f, 0xcd, 0x66, 0xb1, 0x58, 0x8c, 0x5f, 0xe0, 0x09, 0xf6, + 0x68, 0x1b, 0xdc, 0x53, 0x42, 0x08, 0x11, 0x3f, 0x1e, 0x8f, 0xcc, 0x8f, + 0xb5, 0xbf, 0xfe, 0x67, 0x0f, 0x32, 0xd0, 0xdf, 0x0d, 0xbf, 0xb6, 0xf0, + 0x56, 0xfa, 0x1b, 0x21, 0x36, 0x05, 0xd3, 0x4d, 0xe6, 0x17, 0x7f, 0x00, + 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 +}; +static unsigned int search_png_len = 527; + +static unsigned char close_png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, + 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f, + 0x08, 0x02, 0x00, 0x00, 0x00, 0x5b, 0x76, 0x69, 0x23, 0x00, 0x00, 0x01, + 0xa0, 0x49, 0x44, 0x41, 0x54, 0x28, 0x15, 0x8d, 0x91, 0x3b, 0xaf, 0x01, + 0x51, 0x14, 0x85, 0xef, 0x3c, 0x5c, 0x42, 0xbc, 0x49, 0xbc, 0x12, 0x8d, + 0x02, 0x85, 0x76, 0x42, 0x49, 0xa3, 0x95, 0xe8, 0xfd, 0x1e, 0x9d, 0x9f, + 0x20, 0x51, 0xf2, 0x13, 0x24, 0x3a, 0x85, 0x82, 0x4a, 0xa2, 0x20, 0x9a, + 0x29, 0x86, 0x10, 0xef, 0x47, 0x98, 0xe1, 0x7e, 0x73, 0x8f, 0xea, 0x56, + 0xf7, 0x24, 0x8e, 0x73, 0xd6, 0x59, 0x7b, 0xed, 0xb5, 0xf6, 0x48, 0xcd, + 0x66, 0xf3, 0xeb, 0x7f, 0x4b, 0x95, 0x24, 0x49, 0x30, 0x5f, 0xaf, 0x97, + 0xae, 0xeb, 0xeb, 0xf5, 0xfa, 0x74, 0x3a, 0x01, 0xfa, 0x7c, 0xbe, 0x68, + 0x34, 0x9a, 0x4c, 0x26, 0x65, 0x59, 0x16, 0x84, 0x0f, 0xf5, 0x7e, 0xbf, + 0x4f, 0x26, 0x93, 0xdb, 0xed, 0xa6, 0xaa, 0xaa, 0xcb, 0xe5, 0xe2, 0xf9, + 0xf9, 0x7c, 0x52, 0xb9, 0xd9, 0x6c, 0xf2, 0xf9, 0x3c, 0x08, 0x6c, 0xbb, + 0x02, 0xbd, 0xf1, 0x78, 0x0c, 0xbb, 0x58, 0x2c, 0xa2, 0xf4, 0xfd, 0xbb, + 0x50, 0xd5, 0x34, 0xcd, 0x34, 0xcd, 0xd9, 0x6c, 0x06, 0x01, 0x9a, 0xca, + 0x8f, 0x6a, 0x78, 0xa5, 0x52, 0xa9, 0x5c, 0x2e, 0x1f, 0x0e, 0x87, 0x6e, + 0xb7, 0x0b, 0x58, 0xab, 0xd5, 0xc2, 0xe1, 0x30, 0xf2, 0xa3, 0xd1, 0x68, + 0xb5, 0x5a, 0xc5, 0xe3, 0x71, 0xdb, 0x00, 0xfe, 0x1c, 0x0e, 0xc7, 0x72, + 0xb9, 0x84, 0xe7, 0xf7, 0xfb, 0xeb, 0xf5, 0xba, 0x65, 0x59, 0xf0, 0x2e, + 0x97, 0xcb, 0x74, 0x3a, 0x7d, 0xbf, 0xdf, 0xfb, 0xfd, 0x3e, 0x91, 0x48, + 0xc8, 0x50, 0xc9, 0x81, 0x45, 0x8c, 0xf6, 0x7a, 0xbd, 0xe3, 0xf1, 0x18, + 0x0c, 0x06, 0x23, 0x91, 0x08, 0xbc, 0x4e, 0xa7, 0xb3, 0xdd, 0x6e, 0x11, + 0xa6, 0x27, 0x34, 0xdb, 0x2b, 0x7f, 0x8a, 0xa2, 0x00, 0x71, 0xc0, 0x1c, + 0x08, 0x8b, 0x58, 0x8f, 0xc7, 0x03, 0xdb, 0xa8, 0xf0, 0x0a, 0x62, 0x3f, + 0x87, 0x42, 0x21, 0x4e, 0xc4, 0x14, 0xfe, 0xce, 0xe7, 0x33, 0x4e, 0xd0, + 0x6e, 0x34, 0x1a, 0x84, 0x83, 0xe0, 0xf5, 0x7a, 0xd9, 0x6d, 0x55, 0x86, + 0x47, 0xc6, 0x5c, 0x2e, 0x47, 0x8d, 0xe8, 0xdb, 0x6e, 0xb7, 0xf1, 0x17, + 0x08, 0x04, 0x0a, 0x85, 0x02, 0x7d, 0x18, 0x0b, 0x34, 0xa5, 0x5a, 0xad, + 0x72, 0x32, 0x0c, 0x83, 0x39, 0x90, 0xa0, 0xdf, 0xef, 0xef, 0x76, 0x3b, + 0xcc, 0xcc, 0xe7, 0x73, 0x3c, 0x0c, 0x06, 0x03, 0x0a, 0xb2, 0xd9, 0x2c, + 0x05, 0x52, 0xab, 0xd5, 0xa2, 0xc2, 0xe3, 0xf1, 0x0c, 0x87, 0xc3, 0xeb, + 0xf5, 0x8a, 0x3c, 0x3c, 0xfc, 0x01, 0x32, 0x07, 0xb7, 0xdb, 0xcd, 0x10, + 0xb1, 0xc4, 0xd5, 0x86, 0x58, 0x64, 0xac, 0x54, 0x2a, 0x8b, 0xc5, 0x82, + 0xc1, 0x09, 0x55, 0xc4, 0x62, 0xb1, 0x58, 0x3a, 0x9d, 0xe6, 0x2a, 0x38, + 0x9f, 0x0f, 0x8b, 0x18, 0x73, 0x49, 0xa5, 0x52, 0x99, 0x4c, 0xc6, 0xe9, + 0x74, 0xf2, 0x46, 0x7c, 0xc6, 0x07, 0xc8, 0x99, 0x4c, 0xec, 0x1f, 0x55, + 0x51, 0x47, 0x23, 0xd1, 0x4b, 0x5c, 0xff, 0xec, 0x3f, 0x83, 0x85, 0xe4, + 0x1a, 0x44, 0x83, 0x01, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, + 0x44, 0xae, 0x42, 0x60, 0x82 +}; +static unsigned int close_png_len = 473; + +static unsigned char close_active_png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, + 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f, + 0x08, 0x02, 0x00, 0x00, 0x00, 0x5b, 0x76, 0x69, 0x23, 0x00, 0x00, 0x01, + 0xa0, 0x49, 0x44, 0x41, 0x54, 0x28, 0x15, 0x8d, 0x91, 0x3d, 0x8f, 0x01, + 0x51, 0x14, 0x86, 0x77, 0x3e, 0xd6, 0x47, 0x22, 0xbe, 0x82, 0x10, 0x14, + 0xa2, 0x21, 0x12, 0x09, 0x89, 0x0a, 0x85, 0x4a, 0x68, 0xf4, 0x12, 0x3f, + 0x82, 0x52, 0xaf, 0x92, 0x68, 0x75, 0x5a, 0x7f, 0x41, 0x42, 0x47, 0xa3, + 0xa0, 0x42, 0x68, 0x49, 0x44, 0x47, 0x10, 0xf1, 0x11, 0xec, 0x33, 0x7b, + 0x67, 0xb7, 0xd8, 0x6a, 0x4f, 0x32, 0x33, 0x77, 0xee, 0x79, 0xce, 0x7b, + 0xdf, 0x73, 0xae, 0xd4, 0xe9, 0x74, 0x3e, 0xfe, 0x17, 0xea, 0x2f, 0xf6, + 0x7c, 0x3e, 0x17, 0x8b, 0xc5, 0x66, 0xb3, 0xd9, 0xef, 0xf7, 0x92, 0x24, + 0x39, 0x9d, 0xce, 0x40, 0x20, 0x10, 0x8d, 0x46, 0x15, 0x45, 0x11, 0x8c, + 0x8e, 0x9e, 0xcf, 0xe7, 0xc1, 0x60, 0xc0, 0x5b, 0x55, 0x55, 0xa3, 0xd1, + 0x28, 0xcb, 0xf2, 0xe5, 0x72, 0x59, 0x2e, 0x97, 0x54, 0x66, 0xb3, 0x59, + 0x8b, 0xc5, 0x02, 0x2d, 0xf3, 0xa0, 0xd7, 0xef, 0xf7, 0xc9, 0x55, 0x2a, + 0x95, 0x70, 0x38, 0xfc, 0xf9, 0x1d, 0x7e, 0xbf, 0xbf, 0x5c, 0x2e, 0xdf, + 0x6e, 0xb7, 0xd1, 0x68, 0x04, 0x00, 0xa6, 0x94, 0x4a, 0xa5, 0xf9, 0x7c, + 0x4e, 0x35, 0x5c, 0xb1, 0x58, 0x4c, 0x26, 0x93, 0xb3, 0xd9, 0xcc, 0x6c, + 0x36, 0xd7, 0x6a, 0xb5, 0x58, 0x2c, 0x66, 0xb5, 0x5a, 0x27, 0x93, 0x09, + 0x1e, 0x5c, 0x2e, 0x97, 0x66, 0x60, 0xbd, 0x5e, 0x73, 0xee, 0x78, 0x3c, + 0x4e, 0xa7, 0xd3, 0xe4, 0xaa, 0xd5, 0xea, 0xeb, 0xf5, 0x72, 0x38, 0x1c, + 0x9c, 0x33, 0x1c, 0x0e, 0xdf, 0xef, 0xf7, 0x6e, 0xb7, 0x8b, 0x44, 0x22, + 0x9a, 0x81, 0xc3, 0xe1, 0x00, 0xba, 0xdd, 0x6e, 0x5b, 0xad, 0xd6, 0xf1, + 0x78, 0xb4, 0xd9, 0x6c, 0x82, 0x6b, 0x36, 0x9b, 0xd8, 0xa5, 0xc5, 0xd3, + 0xe9, 0x04, 0xa6, 0xa1, 0x34, 0x21, 0x02, 0x4f, 0xc2, 0x16, 0x9b, 0x8f, + 0xc7, 0x03, 0x55, 0x83, 0xc1, 0x80, 0x0a, 0xa1, 0xa3, 0x1e, 0x8f, 0x87, + 0x15, 0x6f, 0xfc, 0x09, 0x3d, 0xa1, 0x5d, 0xaf, 0xd7, 0x83, 0xc1, 0x20, + 0x29, 0x36, 0x75, 0x34, 0x14, 0x0a, 0x61, 0x2e, 0x97, 0xcb, 0xfd, 0x9e, + 0xdb, 0x68, 0x34, 0x04, 0x9d, 0xcf, 0xe7, 0x39, 0x47, 0x14, 0x68, 0x13, + 0xf0, 0x7a, 0xbd, 0x74, 0x36, 0x9d, 0x4e, 0xed, 0x76, 0x7b, 0xb7, 0xdb, + 0x5d, 0xad, 0x56, 0xd7, 0xeb, 0x95, 0xb1, 0x30, 0xb4, 0x76, 0xbb, 0xed, + 0x76, 0xbb, 0x53, 0xa9, 0x14, 0x05, 0x92, 0xb8, 0x58, 0xc6, 0xde, 0xeb, + 0xf5, 0xb8, 0x27, 0xfa, 0xa5, 0x0f, 0x61, 0x8e, 0x34, 0xc5, 0x85, 0x42, + 0x81, 0x4a, 0x0c, 0x68, 0xaa, 0x7c, 0x20, 0x12, 0x89, 0x84, 0xc9, 0x64, + 0x62, 0x41, 0x37, 0x74, 0xe9, 0xf3, 0xf9, 0xe2, 0xf1, 0x78, 0x26, 0x93, + 0xe1, 0x97, 0x4d, 0x18, 0xfd, 0x62, 0xf1, 0x8a, 0x24, 0x57, 0xc5, 0xd8, + 0xe9, 0x9a, 0xc4, 0xfd, 0x7e, 0x47, 0x8c, 0x4d, 0xd6, 0x22, 0x74, 0x54, + 0xfc, 0x20, 0x40, 0xfc, 0xa4, 0xfe, 0x7e, 0xbf, 0x00, 0xa8, 0x79, 0xe1, + 0x90, 0xdb, 0x2c, 0x9e, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, + 0x44, 0xae, 0x42, 0x60, 0x82 +}; +static unsigned int close_active_png_len = 473; static const char tabs_css[] = "/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */\n" @@ -408,7 +545,7 @@ static const char tabs_css[] = " white-space : nowrap;\n" "}\n" "\n" -"DIV.tabs INPUT\n" +"DIV.tabs #MSearchBox\n" "{\n" " float : right;\n" " display : inline;\n" @@ -456,25 +593,15 @@ static const char tabs_css[] = "}\n" ; -struct tab_data_item +struct img_data_item { const char *name; unsigned char *content; unsigned int len; }; -static tab_data_item tab_data[] = +static void writeImgData(const char *dir,img_data_item *data) { - { "tab_b.gif", tab_b_gif, tab_b_gif_len }, - { "tab_l.gif", tab_l_gif, tab_l_gif_len }, - { "tab_r.gif", tab_r_gif, tab_r_gif_len }, - { "tabs.css", (unsigned char *)tabs_css, 0 }, - { 0, 0, 0 } -}; - -static void writeTabData(const char *dir) -{ - tab_data_item *data = tab_data; while (data->name) { QCString fileName; @@ -493,6 +620,34 @@ static void writeTabData(const char *dir) } } +static img_data_item tab_data[] = +{ + { "tab_b.gif", tab_b_gif, tab_b_gif_len }, + { "tab_l.gif", tab_l_gif, tab_l_gif_len }, + { "tab_r.gif", tab_r_gif, tab_r_gif_len }, + { "tabs.css", (unsigned char *)tabs_css, 0 }, + { 0, 0, 0 } +}; + +static void writeTabData(const char *dir) +{ + writeImgData(dir,tab_data); +} + +static img_data_item search_data[] = +{ + { "search.png", search_png, search_png_len }, + { "close.png", close_png, close_png_len }, + { "close_active.png", close_active_png, close_active_png_len }, + { 0, 0, 0 } +}; + +void HtmlGenerator::writeSearchData(const char *dir) +{ + writeImgData(dir,search_data); +} + + //------------------------------------------------------------------------ unsigned char open_gif[] = { @@ -568,6 +723,12 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title, else relPathStr=relPath; + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool searchEngine = Config_getBool("SEARCHENGINE"); + if (searchEngine && !generateTreeView) + { + t << "" << endl; + } // t << "\n"; // t << "\n"; t << "\n"; @@ -577,6 +738,11 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title, t << convertToHtml(title); t << "\n"; t << "\n"; + if (searchEngine && !generateTreeView) + { + t << "\n"; + t << "\n"; + } t << "\n"; - t << "\n\n"; + t << "\n"; + if (searchEngine && !generateTreeView) + { + t << "\n"; + } + else + { + t << "\n"; + } } @@ -706,12 +880,51 @@ void HtmlGenerator::startFile(const char *name,const char *, } t << "" << endl; + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool searchEngine = Config_getBool("SEARCHENGINE"); + if (searchEngine && !generateTreeView) + { + t << "\n"; + } generateDynamicSections(t,relPath); } +void HtmlGenerator::writeSearchFooter(QTextStream &t,const QCString &relPath) +{ + t << "\n"; + t << "
\n"; + writeSearchCategories(t); + t << "
\n"; + t << "\n"; + t << "\n"; + t << "
\n"; + t << "" + << "\n"; + t << "\n"; + t << "
\n"; + t << "\n"; +} + static void writePageFooter(QTextStream &t,const QCString &lastTitle, const QCString relPath) { + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool searchEngine = Config_getBool("SEARCHENGINE"); + if (searchEngine && !generateTreeView) + { + HtmlGenerator::writeSearchFooter(t,relPath); + } if (g_footer.isEmpty()) { t << "
"; @@ -988,8 +1201,9 @@ void HtmlGenerator::endTextLink() void HtmlGenerator::startHtmlLink(const char *url) { + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); t << ""; @@ -1151,6 +1365,8 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d, t << "_map\" alt=\"\"/>" << endl; t << "" << endl; d.writeImage(t,dir,relPath,fileName); @@ -1273,7 +1489,7 @@ void HtmlGenerator::startMemberSections() { t << "" << endl; // HTML is not recursively decomposable, sorry - t << "" << endl; + //t << "" << endl; } } @@ -1291,7 +1507,7 @@ void HtmlGenerator::startMemberHeader() DBG_HTML(t << "" << endl) if (Config_getBool("HTML_ALIGN_MEMBERS")) { - t << "

"; + t << "

"; } else { @@ -1840,6 +2056,7 @@ static void renderQuickLinksAsTabs(QTextStream &t,const QCString &relPath, } if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) { +#if 0 // old PHP based search engine // last item of the top row -> special case for search engine if (Config_getBool("SEARCHENGINE")) { @@ -1864,6 +2081,25 @@ static void renderQuickLinksAsTabs(QTextStream &t,const QCString &relPath, { endQuickIndexList(t,TRUE); } +#endif + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool searchEngine = Config_getBool("SEARCHENGINE"); + if (searchEngine && !generateTreeView) + { + t << "
  • \n"; + t << "
    \n"; + t << " \"\"/\n"; + t << " \n"; + t << "
    \n"; + t << "
  • \n"; + } + endQuickIndexList(t,TRUE); } else // normal case { @@ -1953,6 +2189,7 @@ void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli) writeDefaultQuickLinks(t,compact,hli,relPath); } +#if 0 // old PHP based search results page void HtmlGenerator::writeSearchPage() { if (Config_getBool("SEARCHENGINE") && Config_getBool("GENERATE_HTML")) @@ -2030,6 +2267,7 @@ void HtmlGenerator::writeSearchPage() } } } +#endif void HtmlGenerator::generateSectionImages() { diff --git a/src/htmlgen.h b/src/htmlgen.h index 76467a2..f710c69 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -244,7 +244,8 @@ class HtmlGenerator : public OutputGenerator { t << ""; } void linkableSymbol(int,const char *,Definition *,Definition *) {} - static void writeSearchPage(); + static void writeSearchFooter(QTextStream &t,const QCString &relPath); + static void writeSearchData(const char *dir); static void generateSectionImages(); private: diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index d11d16d..f120a93 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -464,7 +464,7 @@ void HtmlHelp::createProjectFile() QCString indexName="index"+Doxygen::htmlFileExtension; - if (usingTreeIndex()) indexName="main"+Doxygen::htmlFileExtension; + if (Config_getBool("GENERATE_TREEVIEW")) indexName="main"+Doxygen::htmlFileExtension; t << "[OPTIONS]\n"; if (!Config_getString("CHM_FILE").isEmpty()) { diff --git a/src/index.cpp b/src/index.cpp index bcfe4eb..ae71d93 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -35,6 +35,7 @@ #include "util.h" #include "groupdef.h" #include "language.h" +#include "htmlgen.h" #include "htmlhelp.h" #include "ftvhelp.h" #include "dot.h" @@ -45,6 +46,14 @@ #define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200 #define MAX_ITEMS_BEFORE_QUICK_INDEX 30 +static const char search_styleSheet[] = +#include "search_css.h" +; + +static const char search_script[]= +#include "search_js.h" +; + int annotatedClasses; int hierarchyClasses; int documentedFiles; @@ -632,9 +641,9 @@ void writeHierarchicalIndex(OutputList &ol) ol.parseText(theTranslator->trClassHierarchyDescription()); ol.endTextBlock(); - FTVHelp* ftv = NULL; - QCString& TreeView=Config_getEnum("GENERATE_TREEVIEW"); - if (TreeView=="HIERARCHIES" || TreeView=="ALL") + FTVHelp* ftv = 0; + bool treeView=Config_getBool("USE_INLINE_TREES"); + if (treeView) ftv = new FTVHelp(false); writeClassHierarchy(ol,ftv); @@ -2172,6 +2181,605 @@ void writeNamespaceMemberIndex(OutputList &ol) //---------------------------------------------------------------------------- +#define NUM_SEARCH_INDICES 13 +#define SEARCH_INDEX_ALL 0 +#define SEARCH_INDEX_CLASSES 1 +#define SEARCH_INDEX_NAMESPACES 2 +#define SEARCH_INDEX_FILES 3 +#define SEARCH_INDEX_FUNCTIONS 4 +#define SEARCH_INDEX_VARIABLES 5 +#define SEARCH_INDEX_TYPEDEFS 6 +#define SEARCH_INDEX_ENUMS 7 +#define SEARCH_INDEX_ENUMVALUES 8 +#define SEARCH_INDEX_PROPERTIES 9 +#define SEARCH_INDEX_EVENTS 10 +#define SEARCH_INDEX_RELATED 11 +#define SEARCH_INDEX_DEFINES 12 + +class SearchIndexList : public SDict< QList > +{ + public: + SearchIndexList(int size=17) : SDict< QList >(size,FALSE) {} + ~SearchIndexList() {} + void append(Definition *d) + { + QList *l = find(d->name()); + if (l==0) + { + l=new QList; + SDict< QList >::append(d->name(),l); + } + l->append(d); + } + int compareItems(GCI item1, GCI item2) + { + QList *md1=(QList *)item1; + QList *md2=(QList *)item2; + QCString n1 = md1->first()->localName(); + QCString n2 = md2->first()->localName(); + return stricmp(n1.data(),n2.data()); + } +}; + +static void addMemberToSearchIndex( + SearchIndexList symbols[NUM_SEARCH_INDICES][MEMBER_INDEX_ENTRIES], + int symbolCount[NUM_SEARCH_INDICES], + MemberDef *md) +{ + static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS"); + bool isLinkable = md->isLinkable(); + ClassDef *cd=0; + NamespaceDef *nd=0; + FileDef *fd=0; + if (isLinkable && + (cd=md->getClassDef()) && + cd->isLinkable() && + cd->templateMaster()==0) + { + QCString n = md->name(); + int letter = tolower(n.at(0)) & 0x7f; + if (!n.isEmpty()) + { + bool isFriendToHide = hideFriendCompounds && + (QCString(md->typeString())=="friend class" || + QCString(md->typeString())=="friend struct" || + QCString(md->typeString())=="friend union"); + if (!(md->isFriend() && isFriendToHide)) + { + symbols[SEARCH_INDEX_ALL][letter].append(md); + symbolCount[SEARCH_INDEX_ALL]++; + } + if (md->isFunction() || md->isSlot() || md->isSignal()) + { + symbols[SEARCH_INDEX_FUNCTIONS][letter].append(md); + symbolCount[SEARCH_INDEX_FUNCTIONS]++; + } + else if (md->isVariable()) + { + symbols[SEARCH_INDEX_VARIABLES][letter].append(md); + symbolCount[SEARCH_INDEX_VARIABLES]++; + } + else if (md->isTypedef()) + { + symbols[SEARCH_INDEX_TYPEDEFS][letter].append(md); + symbolCount[SEARCH_INDEX_TYPEDEFS]++; + } + else if (md->isEnumerate()) + { + symbols[SEARCH_INDEX_ENUMS][letter].append(md); + symbolCount[SEARCH_INDEX_ENUMS]++; + } + else if (md->isEnumValue()) + { + symbols[SEARCH_INDEX_ENUMVALUES][letter].append(md); + symbolCount[SEARCH_INDEX_ENUMVALUES]++; + } + else if (md->isProperty()) + { + symbols[SEARCH_INDEX_PROPERTIES][letter].append(md); + symbolCount[SEARCH_INDEX_PROPERTIES]++; + } + else if (md->isEvent()) + { + symbols[SEARCH_INDEX_EVENTS][letter].append(md); + symbolCount[SEARCH_INDEX_EVENTS]++; + } + else if (md->isRelated() || md->isForeign() || + (md->isFriend() && !isFriendToHide)) + { + symbols[SEARCH_INDEX_RELATED][letter].append(md); + symbolCount[SEARCH_INDEX_RELATED]++; + } + } + } + else if (isLinkable && + ((nd=md->getNamespaceDef()) && nd->isLinkable()) || + ((fd=md->getFileDef()) && fd->isLinkable()) + ) + { + QCString n = md->name(); + int letter = tolower(n.at(0)) & 0x7f; + if (!n.isEmpty()) + { + symbols[SEARCH_INDEX_ALL][letter].append(md); + symbolCount[SEARCH_INDEX_ALL]++; + + if (md->isFunction()) + { + symbols[SEARCH_INDEX_FUNCTIONS][letter].append(md); + symbolCount[SEARCH_INDEX_FUNCTIONS]++; + } + else if (md->isVariable()) + { + symbols[SEARCH_INDEX_VARIABLES][letter].append(md); + symbolCount[SEARCH_INDEX_VARIABLES]++; + } + else if (md->isTypedef()) + { + symbols[SEARCH_INDEX_TYPEDEFS][letter].append(md); + symbolCount[SEARCH_INDEX_TYPEDEFS]++; + } + else if (md->isEnumerate()) + { + symbols[SEARCH_INDEX_ENUMS][letter].append(md); + symbolCount[SEARCH_INDEX_ENUMS]++; + } + else if (md->isEnumValue()) + { + symbols[SEARCH_INDEX_ENUMVALUES][letter].append(md); + symbolCount[SEARCH_INDEX_ENUMVALUES]++; + } + else if (md->isDefine()) + { + symbols[SEARCH_INDEX_DEFINES][letter].append(md); + symbolCount[SEARCH_INDEX_DEFINES]++; + } + } + } +} + +static QCString searchId(const QCString &s) +{ + int c; + uint i; + QCString result; + for (i=0;i='0' && c<='9') || (c>='A' && c<='Z') || (c>='a' && c<='z')) + { + result+=(char)tolower(c); + } + else + { + char val[4]; + sprintf(val,"_%02x",c); + result+=val; + } + } + return result; +} + +static int g_searchIndexCount[NUM_SEARCH_INDICES]; +static SearchIndexList g_searchIndexSymbols[NUM_SEARCH_INDICES][MEMBER_INDEX_ENTRIES]; +static const char *g_searchIndexName[NUM_SEARCH_INDICES] = +{ + "all", + "classes", + "namespaces", + "files", + "functions", + "variables", + "typedefs", + "enums", + "enumvalues", + "properties", + "events", + "related", + "defines" +}; + + +class SearchIndexCategoryMapping +{ + public: + SearchIndexCategoryMapping() + { + categoryLabel[SEARCH_INDEX_ALL] = theTranslator->trAll(); + categoryLabel[SEARCH_INDEX_CLASSES] = theTranslator->trClasses(); + categoryLabel[SEARCH_INDEX_NAMESPACES] = theTranslator->trNamespace(TRUE,FALSE); + categoryLabel[SEARCH_INDEX_FILES] = theTranslator->trFile(TRUE,FALSE); + categoryLabel[SEARCH_INDEX_FUNCTIONS] = theTranslator->trFunctions(); + categoryLabel[SEARCH_INDEX_VARIABLES] = theTranslator->trVariables(); + categoryLabel[SEARCH_INDEX_TYPEDEFS] = theTranslator->trTypedefs(); + categoryLabel[SEARCH_INDEX_ENUMS] = theTranslator->trEnumerations(); + categoryLabel[SEARCH_INDEX_ENUMVALUES] = theTranslator->trEnumerationValues(); + categoryLabel[SEARCH_INDEX_PROPERTIES] = theTranslator->trProperties(); + categoryLabel[SEARCH_INDEX_EVENTS] = theTranslator->trEvents(); + categoryLabel[SEARCH_INDEX_RELATED] = theTranslator->trFriends(); + categoryLabel[SEARCH_INDEX_DEFINES] = theTranslator->trDefines(); + } + QString categoryLabel[NUM_SEARCH_INDICES]; +}; + +void writeSearchIndex() +{ + if (!Config_getBool("GENERATE_HTML")) return; + static bool treeView = Config_getBool("GENERATE_TREEVIEW"); + + ClassSDict::Iterator cli(*Doxygen::classSDict); + ClassDef *cd; + for (;(cd=cli.current());++cli) + { + int letter = tolower(cd->localName().at(0)); + if (cd->isLinkable() && isId(letter)) + { + g_searchIndexSymbols[SEARCH_INDEX_ALL][letter].append(cd); + g_searchIndexSymbols[SEARCH_INDEX_CLASSES][letter].append(cd); + g_searchIndexCount[SEARCH_INDEX_ALL]++; + g_searchIndexCount[SEARCH_INDEX_CLASSES]++; + } + } + NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); + NamespaceDef *nd; + for (;(nd=nli.current());++nli) + { + int letter = tolower(nd->name().at(0)); + if (nd->isLinkable() && isId(letter)) + { + g_searchIndexSymbols[SEARCH_INDEX_ALL][letter].append(nd); + g_searchIndexSymbols[SEARCH_INDEX_NAMESPACES][letter].append(nd); + g_searchIndexCount[SEARCH_INDEX_ALL]++; + g_searchIndexCount[SEARCH_INDEX_NAMESPACES]++; + } + } + FileNameListIterator fnli(*Doxygen::inputNameList); + FileName *fn; + for (;(fn=fnli.current());++fnli) + { + FileNameIterator fni(*fn); + FileDef *fd; + for (;(fd=fni.current());++fni) + { + int letter = tolower(fd->name().at(0)); + if (fd->isLinkable() && isId(letter)) + { + g_searchIndexSymbols[SEARCH_INDEX_ALL][letter].append(fd); + g_searchIndexSymbols[SEARCH_INDEX_FILES][letter].append(fd); + g_searchIndexCount[SEARCH_INDEX_ALL]++; + g_searchIndexCount[SEARCH_INDEX_FILES]++; + } + } + } + { + MemberNameSDict::Iterator mnli(*Doxygen::memberNameSDict); + MemberName *mn; + // for each member name + for (mnli.toFirst();(mn=mnli.current());++mnli) + { + MemberDef *md; + MemberNameIterator mni(*mn); + // for each member definition + for (mni.toFirst();(md=mni.current());++mni) + { + addMemberToSearchIndex(g_searchIndexSymbols,g_searchIndexCount,md); + } + } + } + { + MemberNameSDict::Iterator fnli(*Doxygen::functionNameSDict); + MemberName *mn; + // for each member name + for (fnli.toFirst();(mn=fnli.current());++fnli) + { + MemberDef *md; + MemberNameIterator mni(*mn); + // for each member definition + for (mni.toFirst();(md=mni.current());++mni) + { + addMemberToSearchIndex(g_searchIndexSymbols,g_searchIndexCount,md); + } + } + } + + int i,p; + for (i=0;i0) + { + g_searchIndexSymbols[i][p].sort(); + } + } + } + + //ol.pushGeneratorState(); + //ol.disableAllBut(OutputGenerator::Html); + QCString htmlDirName = Config_getString("HTML_OUTPUT")+"/search"; + QDir htmlDir(htmlDirName); + if (!htmlDir.exists() && !htmlDir.mkdir(htmlDirName)) + { + err("Could not create search results directory '%s/search'\n",htmlDirName.data()); + return; + } + + HtmlGenerator::writeSearchData(htmlDirName); + + for (i=0;i0) + { + QCString fileName; + fileName.sprintf("/%s_%02x.html",g_searchIndexName[i],p); + fileName.prepend(htmlDirName); + QFile outFile(fileName); + if (outFile.open(IO_WriteOnly)) + { + QTextStream t(&outFile); + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "
    " << endl; + // TODO: translate "Loading" + t << "
    Loading...
    " << endl; + + SDict >::Iterator li(g_searchIndexSymbols[i][p]); + QList *dl; + for (li.toFirst();(dl=li.current());++li) + { + Definition *d = dl->first(); + QCString id = d->localName(); + t << "
    localName()) << "\">" << endl; + t << "
    \n"; + if (dl->count()==1) // item with a unique name + { + MemberDef *md = 0; + bool isMemberDef = d->definitionType()==Definition::TypeMember; + if (isMemberDef) md = (MemberDef*)d; + t << " getOutputFileBase() << Doxygen::htmlFileExtension; + if (isMemberDef) + { + t << "#" << ((MemberDef *)d)->anchor(); + } + t << "\" target=\""; + if (treeView) t << "basefrm"; else t << "_parent"; + t << "\">" + << convertToXML(d->localName()) + << "" << endl; + if (d->getOuterScope()!=Doxygen::globalScope) + { + t << " " + << convertToXML(d->getOuterScope()->name()) + << "" << endl; + } + else if (isMemberDef) + { + FileDef *fd = ((MemberDef *)d)->getBodyDef(); + if (fd==0) fd = ((MemberDef *)d)->getFileDef(); + if (fd) + { + t << " " + << convertToXML(fd->localName()) + << "" << endl; + } + } + } + else // multiple items with the same name + { + t << " localName()) << "')\">" + << convertToXML(d->localName()) << "" << endl; + t << "
    " << endl; + + QListIterator di(*dl); + bool overloadedFunction = FALSE; + Definition *prevScope = 0; + for (di.toFirst();(d=di.current());) + { + ++di; + Definition *scope = d->getOuterScope(); + Definition *next = di.current(); + Definition *nextScope = 0; + MemberDef *md = 0; + bool isMemberDef = d->definitionType()==Definition::TypeMember; + if (isMemberDef) md = (MemberDef*)d; + if (next) nextScope = next->getOuterScope(); + + t << " getOutputFileBase() << Doxygen::htmlFileExtension; + if (isMemberDef) + { + t << "#" << ((MemberDef *)d)->anchor(); + } + t << "\" target=\""; + if (treeView) t << "basefrm"; else t << "_parent"; + t << "\">"; + bool found=FALSE; + overloadedFunction = ((prevScope!=0 && scope==prevScope) || + (scope && scope==nextScope) + ) && md && + (md->isFunction() || md->isSlot()); + QCString prefix; + if (md) prefix=convertToXML(md->localName()); + if (overloadedFunction) // overloaded member function + { + prefix+=convertToXML(md->argsString()); + // show argument list to disambiguate overloaded functions + } + else if (md) // unique member function + { + prefix+="()"; // only to show it is a function + } + if (d->definitionType()==Definition::TypeClass) + { + t << convertToXML(((ClassDef*)d)->displayName()); + found = TRUE; + } + else if (d->definitionType()==Definition::TypeNamespace) + { + t << convertToXML(((NamespaceDef*)d)->displayName()); + found = TRUE; + } + else if (scope==0 || scope==Doxygen::globalScope) // in global scope + { + if (md) + { + FileDef *fd = md->getBodyDef(); + if (fd==0) fd = md->getFileDef(); + if (fd) + { + if (!prefix.isEmpty()) prefix+=": "; + t << prefix << convertToXML(fd->localName()); + found = TRUE; + } + } + } + else if (md && (md->getClassDef() || md->getNamespaceDef())) + // member in class or namespace scope + { + static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); + t << convertToXML(d->getOuterScope()->qualifiedName()) << (optimizeOutputJava ? "." : "::"); + t << prefix; + found = TRUE; + } + else if (scope) // some thing else? -> show scope + { + t << prefix << convertToXML(scope->name()); + found = TRUE; + } + if (!found) // fallback + { + // TODO: translate "global namespace" + t << prefix << "(global namespace)"; + } + t << "" << endl; + prevScope = scope; + } + t << "
    " << endl; // SRChildren + } + t << "
    " << endl; // SREntry + t << "
    " << endl; // SRResult + } + // TODO: translate "Searching" + t << "
    Searching...
    " << endl; + // TODO: translate "No Matches" + t << "
    No Matches
    " << endl; + + t << "" << endl; + + t << "
    " << endl; // SRIndex + + t << "" << endl; + t << "" << endl; + + } + else + { + err("Failed to open file '%s' for writing...\n",fileName.data()); + } + } + } + } + //ol.popGeneratorState(); + + { + QFile f(htmlDirName+"/search.js"); + if (f.open(IO_WriteOnly)) + { + QTextStream t(&f); + t << "// Search script generated by doxygen" << endl; + t << "// Copyright (C) 2009 by Dimitri van Heesch." << endl << endl; + t << "// The code in this file is loosly based on main.js, part of Natural Docs," << endl; + t << "// which is Copyright (C) 2003-2008 Greg Valure" << endl; + t << "// Natural Docs is licensed under the GPL." << endl << endl; + t << "var indexSectionsWithContent =" << endl; + t << "{" << endl; + bool first=TRUE; + for (i=0;i0) + { + if (!first) t << "," << endl; + t << " \"" << g_searchIndexName[i] << "\": \""; + for (p=32;p0 ? "1" : "0"); + } + t << "\""; + first=FALSE; + } + } + if (!first) t << "\n"; + t << "};" << endl << endl; + + t << search_script; + } + } + { + QFile f(htmlDirName+"/search.css"); + if (f.open(IO_WriteOnly)) + { + QTextStream t(&f); + t << search_styleSheet; + } + } + { + QFile f(htmlDirName+"/nomatches.html"); + if (f.open(IO_WriteOnly)) + { + QTextStream t(&f); + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "
    " << endl; + // TODO: translate "No Matches" + t << "
    No Matches
    " << endl; + t << "
    " << endl; + t << "" << endl; + t << "" << endl; + } + } +} + +void writeSearchCategories(QTextStream &t) +{ + static SearchIndexCategoryMapping map; + int i,j=0; + for (i=0;i0) + { + t << "" + << " " + << convertToXML(map.categoryLabel[i]) + << ""; + j++; + } + } +} + +//---------------------------------------------------------------------------- + void writeExampleIndex(OutputList &ol) { if (Doxygen::exampleSDict->count()==0) return; @@ -2750,9 +3358,9 @@ void writeGroupIndex(OutputList &ol) ol.parseText(theTranslator->trModulesDescription()); ol.endTextBlock(); - FTVHelp* ftv = NULL; - QCString& TreeView=Config_getEnum("GENERATE_TREEVIEW"); - if (TreeView=="HIERARCHIES" || TreeView=="ALL") + FTVHelp* ftv = 0; + bool treeView=Config_getBool("USE_INLINE_TREES"); + if (treeView) ftv = new FTVHelp(false); writeGroupHierarchy(ol,ftv); @@ -2794,9 +3402,9 @@ void writeDirIndex(OutputList &ol) ol.parseText(theTranslator->trDirDescription()); ol.endTextBlock(); - FTVHelp* ftv = NULL; - QCString& TreeView=Config_getEnum("GENERATE_TREEVIEW"); - if (TreeView=="HIERARCHIES" || TreeView=="ALL") + FTVHelp* ftv = 0; + bool treeView=Config_getBool("USE_INLINE_TREES"); + if (treeView) ftv = new FTVHelp(false); writeDirHierarchy(ol,ftv); @@ -2861,7 +3469,7 @@ void writeIndex(OutputList &ol) title = substitute(Doxygen::mainPage->title(),"%",""); } - QCString indexName=usingTreeIndex()?"main":"index"; + QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; ol.startFile(indexName,0,title); if (Doxygen::mainPage) @@ -2901,7 +3509,11 @@ void writeIndex(OutputList &ol) if (!Config_getString("PROJECT_NUMBER").isEmpty()) { ol.startProjectNumber(); - ol.parseDoc(defFileName,defLine,Doxygen::mainPage,0,Config_getString("PROJECT_NUMBER"),TRUE,FALSE); + ol.parseDoc(defFileName,defLine, + Doxygen::mainPage,0, + Config_getString("PROJECT_NUMBER"), + TRUE,FALSE,0, + TRUE,FALSE); ol.endProjectNumber(); } if (Config_getBool("DISABLE_INDEX") && Doxygen::mainPage==0) diff --git a/src/index.h b/src/index.h index 56b0681..72ac764 100644 --- a/src/index.h +++ b/src/index.h @@ -24,6 +24,7 @@ class MemberDef; class OutputList; +class QTextStream; class IndexIntf @@ -252,4 +253,8 @@ void addClassMemberNameToIndex(MemberDef *md); void addFileMemberNameToIndex(MemberDef *md); void addNamespaceMemberNameToIndex(MemberDef *md); +// search engine +void writeSearchIndex(); +void writeSearchCategories(QTextStream &t); + #endif diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 453f5d6..e0831b9 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -462,6 +462,10 @@ void LatexDocVisitor::visit(DocIndexEntry *i) m_t << "}}"; } +void LatexDocVisitor::visit(DocSimpleSectSep *) +{ +} + //-------------------------------------- // visitor functions for compound nodes //-------------------------------------- diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index 1f8f2a9..45faf76 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -53,6 +53,7 @@ class LatexDocVisitor : public DocVisitor void visit(DocIncOperator *); void visit(DocFormula *); void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); //-------------------------------------- // visitor functions for compound nodes diff --git a/src/latexgen.cpp b/src/latexgen.cpp index aca7fac..37a3454 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -659,7 +659,7 @@ void LatexGenerator::endIndexSection(IndexSections is) break; case isMainPage: { - QCString indexName=usingTreeIndex()?"main":"index"; + QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; t << "}\n\\label{index}"; if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}"; t << "\\input{" << indexName << "}\n"; diff --git a/src/layout.cpp b/src/layout.cpp index ab2c130..1594796 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -758,7 +758,9 @@ class LayoutParser : public QXmlDefaultHandler if (!m_rootNav->find(LayoutNavEntry::MainPage)) { // no MainPage node... add one the first item of the root node... - new LayoutNavEntry(m_rootNav,LayoutNavEntry::MainPage, TRUE, usingTreeIndex() ? "main" : "index",theTranslator->trMainPage(),TRUE); + new LayoutNavEntry(m_rootNav,LayoutNavEntry::MainPage, TRUE, + Config_getBool("GENERATE_TREEVIEW") ? "main" : "index", + theTranslator->trMainPage(),TRUE); } } @@ -776,7 +778,7 @@ class LayoutParser : public QXmlDefaultHandler QCString baseFile; // base name of the file containing the index page } mapping[] = { - { "mainpage", LayoutNavEntry::MainPage, theTranslator->trMainPage(), QCString(), usingTreeIndex() ? "main" : "index" }, + { "mainpage", LayoutNavEntry::MainPage, theTranslator->trMainPage(), QCString(), Config_getBool("GENERATE_TREEVIEW") ? "main" : "index" }, { "pages", LayoutNavEntry::Pages, theTranslator->trRelatedPages(), QCString(), "pages" }, { "modules", LayoutNavEntry::Modules, theTranslator->trModules(), QCString(), "modules" }, { "namespaces", LayoutNavEntry::Namespaces, javaOpt ? theTranslator->trPackages() : diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 2eabf69..d66fed1 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -98,6 +98,8 @@ HEADERS = bufstr.h \ scanner.h \ searchindex.h \ search_php.h \ + search_js.h \ + search_css.h \ section.h \ sortdict.h \ store.h \ diff --git a/src/libdoxygen.t b/src/libdoxygen.t index b37eb1b..f9d4d5a 100644 --- a/src/libdoxygen.t +++ b/src/libdoxygen.t @@ -108,6 +108,12 @@ compound_xsd.h: compound.xsd layout_default.h: layout_default.xml cat layout_default.xml | $(TO_C_CMD) >layout_default.h +search_js.h: search.js + cat search.js | $(TO_C_CMD) >search_js.h + +search_css.h: search.css + cat search.css | $(TO_C_CMD) >search_css.h + search_php.h: search.php cat search.php | $(TO_C_CMD) >search_php.h diff --git a/src/logos.cpp b/src/logos.cpp index c682f61..ccb596e 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -133,6 +133,7 @@ unsigned char doxygen_png_data[] = { }; unsigned int doxygen_png_len = 1281; +#if 0 unsigned char search_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x1a, @@ -291,6 +292,7 @@ unsigned char search_png[] = { 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; unsigned int search_png_len = 1857; +#endif // Stripped version of FreeSans.ttf part of FreeFonts package, @@ -2223,6 +2225,7 @@ void writeLogo(const char *dir) f.close(); } +#if 0 void writeSearchButton(const char *dir) { QCString fileName=(QCString)dir+"/search.png"; @@ -2235,6 +2238,7 @@ void writeSearchButton(const char *dir) } f.close(); } +#endif void writeDoxFont(const char *dir) { diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 4dd8010..8f84779 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -337,6 +337,10 @@ void ManDocVisitor::visit(DocIndexEntry *) { } +void ManDocVisitor::visit(DocSimpleSectSep *) +{ +} + //-------------------------------------- // visitor functions for compound nodes //-------------------------------------- diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h index 0be9507..2610557 100644 --- a/src/mandocvisitor.h +++ b/src/mandocvisitor.h @@ -51,6 +51,7 @@ class ManDocVisitor : public DocVisitor void visit(DocIncOperator *); void visit(DocFormula *); void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); //-------------------------------------- // visitor functions for compound nodes diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 7bbfed4..630b6ff 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -449,6 +449,8 @@ class MemberDefImpl bool docsForDefinition; // TRUE => documentation block is put before // definition. // FALSE => block is put before declaration. + + ClassDef *category; }; MemberDefImpl::MemberDefImpl() : @@ -460,7 +462,8 @@ MemberDefImpl::MemberDefImpl() : tArgList(0), typeConstraints(0), defTmpArgLists(0), - classSectionSDict(0) + classSectionSDict(0), + category(0) { } @@ -634,6 +637,24 @@ MemberDef::MemberDef(const char *df,int dl, m_flushPending = FALSE; } +void MemberDef::moveTo(Definition *scope) +{ + setOuterScope(scope); + if (scope->definitionType()==Definition::TypeClass) + { + m_impl->classDef = (ClassDef*)scope; + } + else if (scope->definitionType()==Definition::TypeFile) + { + m_impl->fileDef = (FileDef*)scope; + } + else if (scope->definitionType()==Definition::TypeNamespace) + { + m_impl->nspace = (NamespaceDef*)scope; + } +} + + /*! Destroys the member definition. */ MemberDef::~MemberDef() { @@ -1176,12 +1197,12 @@ void MemberDef::writeDeclaration(OutputList &ol, } // write search index info - if (Config_getBool("SEARCHENGINE") && !isReference()) - { - Doxygen::searchIndex->setCurrentDoc(qualifiedName(),getOutputFileBase(),anchor()); - Doxygen::searchIndex->addWord(localName(),TRUE); - Doxygen::searchIndex->addWord(qualifiedName(),FALSE); - } + //if (Config_getBool("SEARCHENGINE") && !isReference()) + //{ + // Doxygen::searchIndex->setCurrentDoc(qualifiedName(),getOutputFileBase(),anchor()); + // Doxygen::searchIndex->addWord(localName(),TRUE); + // Doxygen::searchIndex->addWord(qualifiedName(),FALSE); + //} QCString cname = d->name(); QCString cfname = getOutputFileBase(); @@ -1496,7 +1517,9 @@ void MemberDef::writeDeclaration(OutputList &ol, ) { ol.startMemberDescription(); - ol.parseDoc(briefFile(),briefLine(),getOuterScope()?getOuterScope():d,this,briefDescription(),TRUE,FALSE); + ol.parseDoc(briefFile(),briefLine(), + getOuterScope()?getOuterScope():d,this,briefDescription(), + TRUE,FALSE,0,TRUE,FALSE); if (detailsVisible) { ol.pushGeneratorState(); @@ -3846,6 +3869,19 @@ void MemberDef::setMemberDeclaration(MemberDef *md) m_impl->memDec=md; } +ClassDef *MemberDef::category() const +{ + makeResident(); + return m_impl->category; +} + +void MemberDef::setCategory(ClassDef *def) +{ + makeResident(); + m_impl->category = def; +} + + void MemberDef::cacheTypedefVal(ClassDef*val, const QCString & templSpec, const QCString &resolvedType) { makeResident(); @@ -3938,6 +3974,7 @@ void MemberDef::flushToDisk() const marshalBool (Doxygen::symbolStorage,m_impl->tspec); marshalBool (Doxygen::symbolStorage,m_impl->groupHasDocs); marshalBool (Doxygen::symbolStorage,m_impl->docsForDefinition); + marshalObjPointer (Doxygen::symbolStorage,m_impl->category); marshalUInt(Doxygen::symbolStorage,END_MARKER); // function doesn't modify the object conceptually but compiler doesn't know this. @@ -4035,6 +4072,7 @@ void MemberDef::loadFromDisk() const m_impl->tspec = unmarshalBool (Doxygen::symbolStorage); m_impl->groupHasDocs = unmarshalBool (Doxygen::symbolStorage); m_impl->docsForDefinition = unmarshalBool (Doxygen::symbolStorage); + m_impl->category = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage); marker = unmarshalUInt(Doxygen::symbolStorage); assert(marker==END_MARKER); } @@ -4150,4 +4188,23 @@ void MemberDef::copyArgumentNames(MemberDef *bmd) } } +static void invalidateCachedTypesInArgumentList(ArgumentList *al) +{ + if (al) + { + ArgumentListIterator ali(*al); + Argument *a; + for (ali.toFirst();(a=ali.current());++ali) + { + a->canType.resize(0); + } + } +} + +void MemberDef::invalidateCachedArgumentTypes() +{ + makeResident(); + invalidateCachedTypesInArgumentList(m_impl->defArgList); + invalidateCachedTypesInArgumentList(m_impl->declArgList); +} diff --git a/src/memberdef.h b/src/memberdef.h index 8f47022..a171220 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -72,6 +72,8 @@ class MemberDef : public Definition const ArgumentList *al); ~MemberDef(); DefType definitionType() const { return TypeMember; } + // move this member into a different scope + void moveTo(Definition *); //----------------------------------------------------------------------------------- // ---- getters ----- @@ -231,6 +233,8 @@ class MemberDef : public Definition MemberDef *inheritsDocsFrom() const; MemberDef *getGroupAlias() const; + ClassDef *category() const; + //----------------------------------------------------------------------------------- // ---- setters ----- //----------------------------------------------------------------------------------- @@ -314,6 +318,8 @@ class MemberDef : public Definition void cacheTypedefVal(ClassDef *val,const QCString &templSpec,const QCString &resolvedType); void invalidateTypedefValCache(); + + void invalidateCachedArgumentTypes(); // declaration <-> definition relation void setMemberDefinition(MemberDef *md); @@ -321,6 +327,8 @@ class MemberDef : public Definition void setAnonymousUsed(); void copyArgumentNames(MemberDef *bmd); + + void setCategory(ClassDef *); //----------------------------------------------------------------------------------- // --- actions ---- diff --git a/src/membergroup.h b/src/membergroup.h index e718176..e7bd457 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -118,6 +118,7 @@ struct MemberGroupInfo QCString header; QCString doc; QCString docFile; + QCString compoundName; }; //class MemberGroupDict : public QIntDict diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 8e8c93c..8091362 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -342,12 +342,16 @@ void MemberList::writeDeclarations(OutputList &ol, ol.parseText(title); ol.endMemberHeader(); } - if (subtitle && subtitle[0]!=0) + if (subtitle) { - //printf("subtitle=`%s'\n",subtitle); - ol.startMemberSubtitle(); - ol.parseDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE); - ol.endMemberSubtitle(); + QCString st=subtitle; + st = st.stripWhiteSpace(); + if (!st.isEmpty()) + { + ol.startMemberSubtitle(); + ol.parseDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE); + ol.endMemberSubtitle(); + } } // TODO: Two things need to be worked out for proper VHDL output: diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index bac6779..689fd26 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -401,11 +401,11 @@ void NamespaceDef::writeDocumentation(OutputList &ol) addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),displayName()); - if (Config_getBool("SEARCHENGINE")) - { - Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); - Doxygen::searchIndex->addWord(localName(),TRUE); - } + //if (Config_getBool("SEARCHENGINE")) + //{ + // Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); + // Doxygen::searchIndex->addWord(localName(),TRUE); + //} bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty(); if (generateTagFile) diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 9091581..1f451cc 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -120,9 +120,9 @@ void PageDef::writeDocumentation(OutputList &ol) { ol.startSection(si->label,si->title,si->type); ol.parseDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); - stringToSearchIndex(getOutputFileBase(), - theTranslator->trPage(TRUE,TRUE)+" "+si->title, - si->title); + //stringToSearchIndex(getOutputFileBase(), + // theTranslator->trPage(TRUE,TRUE)+" "+si->title, + // si->title); ol.endSection(si->label,si->type); } ol.popGeneratorState(); diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index b3018bc..d38b835 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -306,6 +306,7 @@ public: void visit(DocIncOperator *); void visit(DocFormula *); void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); //-------------------------------------- // visitor functions for compound nodes @@ -732,6 +733,10 @@ void PerlModDocVisitor::visit(DocIndexEntry *) #endif } +void PerlModDocVisitor::visit(DocSimpleSectSep *) +{ +} + //-------------------------------------- // visitor functions for compound nodes //-------------------------------------- diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index b0c9b5f..efc1c6c 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -210,6 +210,11 @@ class PrintDocVisitor : public DocVisitor indent_leaf(); printf("%sentry().data()); } + void visit(DocSimpleSectSep *) + { + indent_leaf(); + printf(""); + } //-------------------------------------- diff --git a/src/pycode.l b/src/pycode.l index 5955e85..aa72b43 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -281,20 +281,24 @@ static int countLines() static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="") { - static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); - if (searchEngineEnabled) - { - Doxygen::searchIndex->setCurrentDoc(name,base,anchor); - } + (void)name; + (void)base; + (void)anchor; + //static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); + //if (searchEngineEnabled) + //{ + // Doxygen::searchIndex->setCurrentDoc(name,base,anchor); + //} } static void addToSearchIndex(const char *text) { - static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); - if (searchEngineEnabled) - { - Doxygen::searchIndex->addWord(text,FALSE); - } + (void)text; + //static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); + //if (searchEngineEnabled) + //{ + // Doxygen::searchIndex->addWord(text,FALSE); + //} } diff --git a/src/qhp.cpp b/src/qhp.cpp index ba7983d..15ecdab 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -188,10 +188,25 @@ void Qhp::addIndexItem(const char * level1, const char * level2, const char * contRef, const char * /*memRef*/, const char * anchor, const MemberDef * /*md*/) { + QCString ref; + if ((m_prevIdName!=level1) || (m_prevIdRef!=contRef)) + { + m_prevIdName = level1; + m_prevIdRef = contRef; + + ref = makeFileName(contRef); + const char * attributes[] = + { "name", level1, + "id", level1, + "ref", ref, + 0 + }; + m_index.openClose("keyword", attributes); + } /* */ - QCString ref = makeRef(contRef, anchor); + ref = makeRef(contRef, anchor); QCString id(level1); id += "::"; id += level2; diff --git a/src/qhp.h b/src/qhp.h index 38d17fd..4ab779c 100644 --- a/src/qhp.h +++ b/src/qhp.h @@ -61,6 +61,9 @@ class Qhp : public IndexIntf int m_prevSectionLevel; int m_sectionLevel; + + QCString m_prevIdName; + QCString m_prevIdRef; }; #endif // DOXYGEN_QHP_H diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 4d30b2d..5732bff 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -537,6 +537,10 @@ void RTFDocVisitor::visit(DocIndexEntry *i) m_lastIsPara=FALSE; } +void RTFDocVisitor::visit(DocSimpleSectSep *) +{ +} + //-------------------------------------- // visitor functions for compound nodes //-------------------------------------- diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h index 70c960a..11f7c03 100644 --- a/src/rtfdocvisitor.h +++ b/src/rtfdocvisitor.h @@ -51,6 +51,7 @@ class RTFDocVisitor : public DocVisitor void visit(DocIncOperator *); void visit(DocFormula *); void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); //-------------------------------------- // visitor functions for compound nodes diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 557b3fd..e321508 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -611,7 +611,7 @@ void RTFGenerator::endIndexSection(IndexSections is) t << "{\\tc \\v " << substitute(Doxygen::mainPage->title(),"%","") << "}"<< endl; } t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; - if (usingTreeIndex()) t << "main"; else t << "index"; + if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; break; //case isPackageIndex: diff --git a/src/scanner.l b/src/scanner.l index d189bef..7862507 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1000,7 +1000,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) lineCount() ; } [\-+]{BN}* { - printf("Found - insideObj=%d\n",insideObjC); if (!insideObjC) { REJECT; @@ -4710,7 +4709,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->args += ' '; current->args += name; } -\n/{BN}*[^{,] { +\n/{BN}*[^{, \t\n] { if (!insideObjC) { REJECT; diff --git a/src/search.css b/src/search.css new file mode 100644 index 0000000..7f316ab --- /dev/null +++ b/src/search.css @@ -0,0 +1,210 @@ +/*---------------- Search Box */ + +#MSearchBox { + padding: 0px; + margin: 0px; + border: none; + border: 1px solid #84B0C7; + white-space: nowrap; + -moz-border-radius: 8px; + -webkit-border-top-left-radius: 8px; + -webkit-border-top-right-radius: 8px; + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; +} +#MSearchField { + font: 9pt Arial, Verdana, sans-serif; + color: #999999; + background-color: #FFFFFF; + font-style: normal; + cursor: pointer; + padding: 0px 1px; + margin: 0px 6px 0px 0px; + border: none; + outline: none; +} +#MSearchBox.MSearchBoxInactive:hover #MSearchField { + background-color: #FFFFFF; + padding: 0px 1px; + margin: 0px 6px 0px 0px; + border: none; +} +.MSearchBoxActive #MSearchField { + background-color: #FFFFFF; + color: #000000; + padding: 0px 1px; + margin: 0px 6px 0px 0px; + border: none; +} +#MSearchSelect { + float : none; + display : inline; + background : none; + font: 9pt Verdana, sans-serif; + margin-right: -6px; + padding: 0; + border: none; + margin: 0px 0px 0px 6px; + vertical-align: bottom; + padding: 0px 0px; + background-color: #84B0C7; +} +.MSearchBoxLeft { + display: block; + text-align: left; + float: left; + margin-left: 6px; +} +.MSearchBoxRight { + display: block; + float: right; + text-align: right; + margin-right: 6px; +} +.MSearchBoxSpacer { + font-size: 0px; + clear: both; +} +.MSearchBoxRow { + font-size: 0px; + clear: both; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #A0A0A0; + background-color: #FAFAFA; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + } +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} +a.SelectItem:visited, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} +a.SelectItem:hover { + color: #FFFFFF; + background-color: #2A50E4; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; + } +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000000; + background-color: #EEF3F5; + } +#MSearchResultsWindowClose { + font-weight: bold; + font-size: 8pt; + display: block; + padding: 0px; + margin: 0px; + text-align: right; + text-decoration: none; + outline-style: none; + } +#MSearchResultsWindowClose:link, +#MSearchResultsWindowClose:visited { + color: #8A8A8A; + background-color: #8A8A8A; + } +#MSearchResultsWindowClose:active, +#MSearchResultsWindowClose:hover { + color: #9E9E9E; + background-color: #9E9E9E; + } + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} +.SRPage .SRChildren { + display: none; +} +.SRSymbol { + font-weight: bold; color: #153788; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #153788; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + diff --git a/src/search.js b/src/search.js new file mode 100644 index 0000000..02af28d --- /dev/null +++ b/src/search.js @@ -0,0 +1,456 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + else + { + this.Activate(false); + } + } + + this.OnCloseHighlight = function(active) + { + var close = this.DOMSearchResultWindowClose(); + if (active) + { + close.firstChild.src = this.resultsPath + '/close_active.png'; + } + else + { + close.firstChild.src = this.resultsPath + '/close.png'; + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = "none"; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = "none"; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var hexCode; + if (code<16) + { + hexCode="0"+code.toString(16); + } + else + { + hexCode=code.toString(16); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + // indexSectionsWithContent is defined in searchdata.js + if (indexSectionsWithContent[this.searchTopic].charAt(code-32) == '1') + { + resultsPage = this.resultsPath + '/' + this.searchTopic + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location.href = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!="block") + { + if (this.insideFrame) + { + var domSearchBox = this.DOMSearchBox(); + var domPopupSearchResults = this.DOMPopupSearchResults(); + this.DOMSearchResultWindowClose().style.textAlign = 'left'; + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domSearchField = this.DOMSearchField(); + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchField) + domSearchField.offsetWidth; + var top = getYPos(domSearchField) + domSearchField.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == 'Search') // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = 'Search'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + + // Toggles the visibility of the passed element ID. + this.Toggle = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = "block"; + matches++; + } + else + { + row.style.display = "none"; + } + } + i++; + } + document.getElementById("Searching").style.display="none"; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display="block"; + } + else // at least one result + { + document.getElementById("NoMatches").style.display="none"; + } + this.lastMatchCount = matches; + return true; + } +} diff --git a/src/search_css.h b/src/search_css.h new file mode 100644 index 0000000..177dbe3 --- /dev/null +++ b/src/search_css.h @@ -0,0 +1,210 @@ +"/*---------------- Search Box */\n" +"\n" +"#MSearchBox { \n" +" padding: 0px;\n" +" margin: 0px;\n" +" border: none;\n" +" border: 1px solid #84B0C7;\n" +" white-space: nowrap;\n" +" -moz-border-radius: 8px;\n" +" -webkit-border-top-left-radius: 8px;\n" +" -webkit-border-top-right-radius: 8px;\n" +" -webkit-border-bottom-left-radius: 8px;\n" +" -webkit-border-bottom-right-radius: 8px;\n" +"}\n" +"#MSearchField {\n" +" font: 9pt Arial, Verdana, sans-serif;\n" +" color: #999999;\n" +" background-color: #FFFFFF;\n" +" font-style: normal;\n" +" cursor: pointer;\n" +" padding: 0px 1px;\n" +" margin: 0px 6px 0px 0px;\n" +" border: none;\n" +" outline: none;\n" +"}\n" +"#MSearchBox.MSearchBoxInactive:hover #MSearchField {\n" +" background-color: #FFFFFF;\n" +" padding: 0px 1px;\n" +" margin: 0px 6px 0px 0px;\n" +" border: none;\n" +"}\n" +".MSearchBoxActive #MSearchField {\n" +" background-color: #FFFFFF;\n" +" color: #000000;\n" +" padding: 0px 1px;\n" +" margin: 0px 6px 0px 0px;\n" +" border: none;\n" +"}\n" +"#MSearchSelect {\n" +" float : none;\n" +" display : inline;\n" +" background : none;\n" +" font: 9pt Verdana, sans-serif;\n" +" margin-right: -6px;\n" +" padding: 0;\n" +" border: none;\n" +" margin: 0px 0px 0px 6px;\n" +" vertical-align: bottom;\n" +" padding: 0px 0px;\n" +" background-color: #84B0C7;\n" +"}\n" +".MSearchBoxLeft {\n" +" display: block;\n" +" text-align: left;\n" +" float: left;\n" +" margin-left: 6px;\n" +"}\n" +".MSearchBoxRight {\n" +" display: block;\n" +" float: right;\n" +" text-align: right;\n" +" margin-right: 6px;\n" +"}\n" +".MSearchBoxSpacer {\n" +" font-size: 0px;\n" +" clear: both;\n" +"}\n" +".MSearchBoxRow {\n" +" font-size: 0px;\n" +" clear: both;\n" +"}\n" +"\n" +"/*---------------- Search filter selection */\n" +"\n" +"#MSearchSelectWindow {\n" +" display: none;\n" +" position: absolute;\n" +" left: 0; top: 0;\n" +" border: 1px solid #A0A0A0;\n" +" background-color: #FAFAFA;\n" +" z-index: 1;\n" +" padding-top: 4px;\n" +" padding-bottom: 4px;\n" +" -moz-border-radius: 4px;\n" +" -webkit-border-top-left-radius: 4px;\n" +" -webkit-border-top-right-radius: 4px;\n" +" -webkit-border-bottom-left-radius: 4px;\n" +" -webkit-border-bottom-right-radius: 4px;\n" +" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" +" }\n" +".SelectItem {\n" +" font: 8pt Arial, Verdana, sans-serif;\n" +" padding-left: 2px;\n" +" padding-right: 12px;\n" +" border: 0px;\n" +"}\n" +"span.SelectionMark {\n" +" margin-right: 4px;\n" +" font-family: monospace;\n" +" outline-style: none;\n" +" text-decoration: none;\n" +"}\n" +"a.SelectItem {\n" +" display: block;\n" +" outline-style: none;\n" +" color: #000000; \n" +" text-decoration: none;\n" +" padding-left: 6px;\n" +" padding-right: 12px;\n" +"}\n" +"a.SelectItem:visited,\n" +"a.SelectItem:active {\n" +" color: #000000; \n" +" outline-style: none;\n" +" text-decoration: none;\n" +"}\n" +"a.SelectItem:hover {\n" +" color: #FFFFFF;\n" +" background-color: #2A50E4;\n" +" outline-style: none;\n" +" text-decoration: none;\n" +" cursor: pointer;\n" +" display: block;\n" +"}\n" +"\n" +"/*---------------- Search results window */\n" +"\n" +"iframe#MSearchResults {\n" +" width: 60ex;\n" +" height: 15em;\n" +" }\n" +"#MSearchResultsWindow {\n" +" display: none;\n" +" position: absolute;\n" +" left: 0; top: 0;\n" +" border: 1px solid #000000;\n" +" background-color: #EEF3F5;\n" +" }\n" +"#MSearchResultsWindowClose {\n" +" font-weight: bold;\n" +" font-size: 8pt;\n" +" display: block;\n" +" padding: 0px;\n" +" margin: 0px;\n" +" text-align: right;\n" +" text-decoration: none;\n" +" outline-style: none;\n" +" }\n" +"#MSearchResultsWindowClose:link,\n" +"#MSearchResultsWindowClose:visited {\n" +" color: #8A8A8A;\n" +" background-color: #8A8A8A;\n" +" }\n" +"#MSearchResultsWindowClose:active,\n" +"#MSearchResultsWindowClose:hover {\n" +" color: #9E9E9E;\n" +" background-color: #9E9E9E;\n" +" }\n" +"\n" +"/* ----------------------------------- */\n" +"\n" +"\n" +"#SRIndex {\n" +" clear:both; \n" +" padding-bottom: 15px;\n" +"}\n" +"\n" +".SREntry {\n" +" font-size: 10pt;\n" +" padding-left: 1ex;\n" +"}\n" +".SRPage .SREntry {\n" +" font-size: 8pt;\n" +" padding: 1px 5px;\n" +"}\n" +"body.SRPage {\n" +" margin: 5px 2px;\n" +"}\n" +"\n" +".SRChildren {\n" +" padding-left: 3ex; padding-bottom: .5em \n" +"}\n" +".SRPage .SRChildren {\n" +" display: none;\n" +"}\n" +".SRSymbol {\n" +" font-weight: bold; color: #153788;\n" +" font-family: Arial, Verdana, sans-serif;\n" +" text-decoration: none;\n" +" outline: none;\n" +"}\n" +"\n" +"a.SRScope {\n" +" display: block;\n" +" color: #153788; \n" +" font-family: Arial, Verdana, sans-serif;\n" +" text-decoration: none;\n" +" outline: none;\n" +"}\n" +"\n" +".SRPage .SRStatus {\n" +" padding: 2px 5px;\n" +" font-size: 8pt;\n" +" font-style: italic;\n" +"}\n" +"\n" +".SRResult {\n" +" display: none;\n" +"}\n" +"\n" diff --git a/src/search_js.h b/src/search_js.h new file mode 100644 index 0000000..7a401e6 --- /dev/null +++ b/src/search_js.h @@ -0,0 +1,456 @@ +"function convertToId(search)\n" +"{\n" +" var result = '';\n" +" for (i=0;i do a search\n" +" {\n" +" this.Search();\n" +" }\n" +" }\n" +" else\n" +" {\n" +" this.Activate(false);\n" +" }\n" +" }\n" +"\n" +" this.OnCloseHighlight = function(active)\n" +" {\n" +" var close = this.DOMSearchResultWindowClose();\n" +" if (active)\n" +" {\n" +" close.firstChild.src = this.resultsPath + '/close_active.png';\n" +" }\n" +" else\n" +" {\n" +" close.firstChild.src = this.resultsPath + '/close.png';\n" +" }\n" +" return false;\n" +" }\n" +"\n" +" // --------- Actions\n" +"\n" +" // Closes the results window.\n" +" this.CloseResultsWindow = function()\n" +" {\n" +" this.DOMPopupSearchResultsWindow().style.display = \"none\";\n" +" this.Activate(false);\n" +" }\n" +"\n" +" this.CloseSelectionWindow = function()\n" +" {\n" +" this.DOMSearchSelectWindow().style.display = \"none\";\n" +" }\n" +"\n" +" // Performs a search.\n" +" this.Search = function()\n" +" {\n" +" this.keyTimeout = 0;\n" +"\n" +" // strip leading whitespace\n" +" var searchValue = this.DOMSearchField().value.replace(/^ +/, \"\");\n" +"\n" +" var code = searchValue.toLowerCase().charCodeAt(0);\n" +" var hexCode;\n" +" if (code<16) \n" +" {\n" +" hexCode=\"0\"+code.toString(16);\n" +" }\n" +" else \n" +" {\n" +" hexCode=code.toString(16);\n" +" }\n" +"\n" +" var resultsPage;\n" +" var resultsPageWithSearch;\n" +" var hasResultsPage;\n" +"\n" +" // indexSectionsWithContent is defined in searchdata.js\n" +" if (indexSectionsWithContent[this.searchTopic].charAt(code-32) == '1')\n" +" {\n" +" resultsPage = this.resultsPath + '/' + this.searchTopic + '_' + hexCode + '.html';\n" +" resultsPageWithSearch = resultsPage+'?'+escape(searchValue);\n" +" hasResultsPage = true;\n" +" }\n" +" else // nothing available for this search term\n" +" {\n" +" resultsPage = this.resultsPath + '/nomatches.html';\n" +" resultsPageWithSearch = resultsPage;\n" +" hasResultsPage = false;\n" +" }\n" +"\n" +" window.frames.MSearchResults.location.href = resultsPageWithSearch; \n" +" var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();\n" +"\n" +" if (domPopupSearchResultsWindow.style.display!=\"block\")\n" +" {\n" +" if (this.insideFrame)\n" +" {\n" +" var domSearchBox = this.DOMSearchBox();\n" +" var domPopupSearchResults = this.DOMPopupSearchResults();\n" +" this.DOMSearchResultWindowClose().style.textAlign = 'left';\n" +" domPopupSearchResultsWindow.style.position = 'relative';\n" +" domPopupSearchResultsWindow.style.display = 'block';\n" +" var width = document.body.clientWidth - 8; // the -8 is for IE :-(\n" +" domPopupSearchResultsWindow.style.width = width + 'px';\n" +" domPopupSearchResults.style.width = width + 'px';\n" +" }\n" +" else\n" +" {\n" +" var domSearchField = this.DOMSearchField();\n" +" var domPopupSearchResults = this.DOMPopupSearchResults();\n" +" var left = getXPos(domSearchField) + domSearchField.offsetWidth;\n" +" var top = getYPos(domSearchField) + domSearchField.offsetHeight + 1;\n" +" domPopupSearchResultsWindow.style.display = 'block';\n" +" left -= domPopupSearchResults.offsetWidth;\n" +" domPopupSearchResultsWindow.style.top = top + 'px';\n" +" domPopupSearchResultsWindow.style.left = left + 'px';\n" +" }\n" +" }\n" +"\n" +" this.lastSearchValue = searchValue;\n" +" this.lastResultsPage = resultsPage;\n" +" }\n" +"\n" +" // -------- Activation Functions\n" +"\n" +" // Activates or deactivates the search panel, resetting things to \n" +" // their default values if necessary. \n" +" this.Activate = function(isActive)\n" +" {\n" +" if (isActive || // open it\n" +" this.DOMPopupSearchResultsWindow().style.display == 'block' \n" +" )\n" +" {\n" +" this.DOMSearchBox().className = 'MSearchBoxActive';\n" +"\n" +" var searchField = this.DOMSearchField();\n" +"\n" +" if (searchField.value == 'Search') // clear \"Search\" term upon entry\n" +" { \n" +" searchField.value = ''; \n" +" this.searchActive = true;\n" +" }\n" +" }\n" +" else if (!isActive) // directly remove the panel\n" +" {\n" +" this.DOMSearchBox().className = 'MSearchBoxInactive';\n" +" this.DOMSearchField().value = 'Search';\n" +" this.searchActive = false;\n" +" this.lastSearchValue = ''\n" +" this.lastResultsPage = '';\n" +" }\n" +" }\n" +"}\n" +"\n" +"// -----------------------------------------------------------------------\n" +"\n" +"// The class that handles everything on the search results page.\n" +"function SearchResults(name)\n" +"{\n" +" // The number of matches from the last run of .\n" +" this.lastMatchCount = 0;\n" +"\n" +" // Toggles the visibility of the passed element ID.\n" +" this.Toggle = function(id)\n" +" {\n" +" var parentElement = document.getElementById(id);\n" +" var element = parentElement.firstChild;\n" +"\n" +" while (element && element!=parentElement)\n" +" {\n" +" if (element.nodeName == 'DIV' && element.className == 'SRChildren')\n" +" {\n" +" if (element.style.display == 'block')\n" +" { \n" +" element.style.display = 'none'; \n" +" }\n" +" else\n" +" { \n" +" element.style.display = 'block'; \n" +" }\n" +" }\n" +"\n" +" if (element.nodeName == 'DIV' && element.hasChildNodes())\n" +" { \n" +" element = element.firstChild; \n" +" }\n" +" else if (element.nextSibling)\n" +" { \n" +" element = element.nextSibling; \n" +" }\n" +" else\n" +" {\n" +" do\n" +" {\n" +" element = element.parentNode;\n" +" }\n" +" while (element && element!=parentElement && !element.nextSibling);\n" +"\n" +" if (element && element!=parentElement)\n" +" { \n" +" element = element.nextSibling; \n" +" }\n" +" }\n" +" }\n" +" }\n" +"\n" +" // Searches for the passed string. If there is no parameter, \n" +" // it takes it from the URL query.\n" +" //\n" +" // Always returns true, since other documents may try to call it \n" +" // and that may or may not be possible.\n" +" this.Search = function(search)\n" +" {\n" +" if (!search) // get search word from URL\n" +" {\n" +" search = window.location.search;\n" +" search = search.substring(1); // Remove the leading '?'\n" +" search = unescape(search);\n" +" }\n" +"\n" +" search = search.replace(/^ +/, \"\"); // strip leading spaces\n" +" search = search.replace(/ +$/, \"\"); // strip trailing spaces\n" +" search = search.toLowerCase();\n" +" search = convertToId(search);\n" +"\n" +" var resultRows = document.getElementsByTagName(\"div\");\n" +" var matches = 0;\n" +"\n" +" var i = 0;\n" +" while (i < resultRows.length)\n" +" {\n" +" var row = resultRows.item(i);\n" +" if (row.className == \"SRResult\")\n" +" {\n" +" var rowMatchName = row.id.toLowerCase();\n" +" rowMatchName = rowMatchName.replace(/^sr\\d*_/, ''); // strip 'sr123_'\n" +"\n" +" if (search.length<=rowMatchName.length && \n" +" rowMatchName.substr(0, search.length)==search)\n" +" {\n" +" row.style.display = \"block\";\n" +" matches++;\n" +" }\n" +" else\n" +" { \n" +" row.style.display = \"none\"; \n" +" }\n" +" }\n" +" i++;\n" +" }\n" +" document.getElementById(\"Searching\").style.display=\"none\";\n" +" if (matches == 0) // no results\n" +" { \n" +" document.getElementById(\"NoMatches\").style.display=\"block\"; \n" +" }\n" +" else // at least one result\n" +" { \n" +" document.getElementById(\"NoMatches\").style.display=\"none\"; \n" +" }\n" +" this.lastMatchCount = matches;\n" +" return true;\n" +" }\n" +"}\n" diff --git a/src/sortdict.h b/src/sortdict.h index bc0488d..ddabdcd 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -107,14 +107,14 @@ class SDict * \param size The size of the dictionary. Should be a prime number for * best distribution of elements. */ - SDict(int size) : m_sizeIndex(0) + SDict(int size,bool caseSensitive=TRUE) : m_sizeIndex(0) { m_list = new SList(this); #if AUTORESIZE while ((uint)size>SDict_primes[m_sizeIndex]) m_sizeIndex++; - m_dict = new QDict(SDict_primes[m_sizeIndex]); + m_dict = new QDict(SDict_primes[m_sizeIndex],caseSensitive); #else - m_dict = new QDict(size); + m_dict = new QDict(size,caseSensitive); #endif } diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 1292ac4..6e6f47c 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -1182,6 +1182,10 @@ void TagFileParser::buildLists(Entry *root) case TagClassInfo::Category: ce->spec = Entry::Category; break; } ce->name = tci->name; + if (tci->kind==TagClassInfo::Protocol) + { + ce->name+="-p"; + } addDocAnchors(ce,tci->docAnchors); TagInfo *ti = new TagInfo; ti->tagName = m_tagName; diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h index 321e9c6..1e0d09d 100644 --- a/src/textdocvisitor.h +++ b/src/textdocvisitor.h @@ -50,6 +50,7 @@ class TextDocVisitor : public DocVisitor void visit(DocIncOperator *) {} void visit(DocFormula *) {} void visit(DocIndexEntry *) {} + void visit(DocSimpleSectSep *){} //-------------------------------------- // visitor functions for compound nodes diff --git a/src/util.cpp b/src/util.cpp index 5072721..ec8f8db 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6401,6 +6401,7 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s) return s.mid(li,bi-li); } +#if 0 void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title, const QCString &str,bool priority,const QCString &anchor) { @@ -6417,6 +6418,7 @@ void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title, } } } +#endif //-------------------------------------------------------------------------- @@ -6813,8 +6815,8 @@ void writeTypeConstraints(OutputList &ol,Definition *d,ArgumentList *al) bool usingTreeIndex() { - QCString& TreeView=Config_getEnum("GENERATE_TREEVIEW"); - return TreeView=="FRAME" || TreeView=="ALL" || TreeView=="YES"; + static bool treeView = Config_getBool("USE_INLINE_TREES"); + return treeView; } void stackTrace() diff --git a/src/util.h b/src/util.h index 2b248a3..d3d10fd 100644 --- a/src/util.h +++ b/src/util.h @@ -325,9 +325,9 @@ bool findAndRemoveWord(QCString &s,const QCString &word); QCString stripLeadingAndTrailingEmptyLines(const QCString &s); -void stringToSearchIndex(const QCString &docUrlBase,const QCString &title, - const QCString &str, bool priority=FALSE, - const QCString &anchor=""); +//void stringToSearchIndex(const QCString &docUrlBase,const QCString &title, +// const QCString &str, bool priority=FALSE, +// const QCString &anchor=""); bool updateLanguageMapping(const QCString &extension,const QCString &parser); SrcLangExt getLanguageFromFileName(const QCString fileName); diff --git a/src/vhdlcode.l b/src/vhdlcode.l index 8b442ef..a7f0d7f 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -114,11 +114,14 @@ static void startFontClass(const char *s); static void setCurrentDoc(const QCString &name,const QCString &base,const QCString &anchor="") { - static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); - if (searchEngineEnabled) - { - Doxygen::searchIndex->setCurrentDoc(name,base,anchor); - } + (void)name; + (void)base; + (void)anchor; + //static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); + //if (searchEngineEnabled) + //{ + // Doxygen::searchIndex->setCurrentDoc(name,base,anchor); + //} } static bool checkString(QCString &name) @@ -160,11 +163,12 @@ static bool checkString(QCString &name) static void addToSearchIndex(const char *text) { - static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); - if (searchEngineEnabled) - { - Doxygen::searchIndex->addWord(text,FALSE); - } + (void)text; + //static bool searchEngineEnabled=Config_getBool("SEARCHENGINE"); + //if (searchEngineEnabled) + //{ + // Doxygen::searchIndex->addWord(text,FALSE); + //} } diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 280e068..ad5f8df 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -1745,7 +1745,7 @@ void VhdlDocGen::writeVhdlDeclarations(MemberList* ml, VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,0,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONFIG,FALSE),0,FALSE,VhdlDocGen::CONFIG); } -static void setConfigurationType(MemberList *ml) +static void setGlobalType(MemberList *ml) { if (ml==0) return; MemberDef *mdd=0; @@ -1756,6 +1756,14 @@ static void setConfigurationType(MemberList *ml) { mdd->setMemberSpecifiers(VhdlDocGen::CONFIG); } + else if (strcmp(mdd->typeString(),"library")==0) + { + mdd->setMemberSpecifiers(VhdlDocGen::LIBRARY); + } + else if (strcmp(mdd->typeString(),"package")==0) + { + mdd->setMemberSpecifiers(VhdlDocGen::USE); + } } } @@ -1814,8 +1822,28 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, LockingPtr lock(mdef,mdef); Definition *d=0; - ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something - if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; + + /* some vhdl files contain only a configuration description + + library work; + configuration cfg_tb_jtag_gotoBackup of tb_jtag_gotoBackup is + for RTL + end for; + end cfg_tb_jtag_gotoBackup; + + in this case library work does not belong to an entity, package ... + + */ + + ASSERT(cd!=0 || nd!=0 || fd!=0 || gd!=0 || + mdef->getMemberSpecifiers()==VhdlDocGen::LIBRARY || + mdef->getMemberSpecifiers()==VhdlDocGen::USE + ); // member should belong to something + if (cd) d=cd; + else if (nd) d=nd; + else if (fd) d=fd; + else if (gd) d=gd; + else d=(Definition*)mdef; // write tag file information of this member if (!Config_getString("GENERATE_TAGFILE").isEmpty()) @@ -1862,12 +1890,12 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, } // write search index info - if (Config_getBool("SEARCHENGINE")) - { - Doxygen::searchIndex->setCurrentDoc(mdef->qualifiedName(),mdef->getOutputFileBase(),mdef->anchor()); - Doxygen::searchIndex->addWord(mdef->localName(),TRUE); - Doxygen::searchIndex->addWord(mdef->qualifiedName(),FALSE); - } + //if (Config_getBool("SEARCHENGINE")) + //{ + // Doxygen::searchIndex->setCurrentDoc(mdef->qualifiedName(),mdef->getOutputFileBase(),mdef->anchor()); + // Doxygen::searchIndex->addWord(mdef->localName(),TRUE); + // Doxygen::searchIndex->addWord(mdef->qualifiedName(),FALSE); + //} QCString cname = d->name(); QCString cfname = mdef->getOutputFileBase(); @@ -2187,7 +2215,7 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, const char *title,const char *subtitle,bool /*showEnumValues*/,int type) { - setConfigurationType(ml); + setGlobalType(ml); if (!membersHaveSpecificType(ml,type)) return; if (title) diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l index 2acd2dc..8e7b9de 100644 --- a/src/vhdlscanner.l +++ b/src/vhdlscanner.l @@ -1798,6 +1798,7 @@ static void mergeGrouping(const Entry* ce,int) void mapLibPackage(const Entry* ce) { + Entry *lastComp=0; while (TRUE) { bool found = FALSE; @@ -1820,9 +1821,18 @@ void mapLibPackage(const Entry* ce) found=TRUE; rt->spec=-1; //nullify entry rt->section=0; + lastComp=temp; break; } }//for + if (lastComp && rt->spec!=-1) + { + Entry *ee=new Entry(*rt); //append a copy to entries sublist + lastComp->addSubEntry(ee); + found=TRUE; + rt->spec=-1; //nullify entry + rt->section=0; + } }//if }//for if (!found) // nothing left to do diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 764aa88..76970b0 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -323,6 +323,11 @@ void XmlDocVisitor::visit(DocIndexEntry *ie) ""; } +void XmlDocVisitor::visit(DocSimpleSectSep *) +{ + m_t << ""; +} + //-------------------------------------- // visitor functions for compound nodes //-------------------------------------- @@ -683,7 +688,7 @@ void XmlDocVisitor::visitPre(DocImage *img) inImage.readBlock(buffer,inImage.size()); outImage.writeBlock(buffer,inImage.size()); outImage.flush(); - delete buffer; + delete[] buffer; } } } diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h index 6a12d7b..be505ae 100644 --- a/src/xmldocvisitor.h +++ b/src/xmldocvisitor.h @@ -51,6 +51,7 @@ class XmlDocVisitor : public DocVisitor void visit(DocIncOperator *); void visit(DocFormula *); void visit(DocIndexEntry *); + void visit(DocSimpleSectSep *); //-------------------------------------- // visitor functions for compound nodes -- cgit v0.12