Commit b6550378 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.7.4-20110629

parent de297f6d
DOXYGEN Version 1.7.4-20110606 DOXYGEN Version 1.7.4-20110629
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (06 June 2011) Dimitri van Heesch (29 June 2011)
DOXYGEN Version 1.7.4_20110606 DOXYGEN Version 1.7.4_20110629
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -26,4 +26,4 @@ forum. ...@@ -26,4 +26,4 @@ forum.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (06 June 2011) Dimitri van Heesch (dimitri@stack.nl) (29 June 2011)
...@@ -20,7 +20,7 @@ doxygen_version_minor=7 ...@@ -20,7 +20,7 @@ doxygen_version_minor=7
doxygen_version_revision=4 doxygen_version_revision=4
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20110606 doxygen_version_mmn=20110629
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
...@@ -2282,14 +2282,13 @@ install and use dot, since it yields more powerful graphs. ...@@ -2282,14 +2282,13 @@ install and use dot, since it yields more powerful graphs.
\anchor cfg_dot_fontname \anchor cfg_dot_fontname
<dt>\c DOT_FONTNAME <dd> <dt>\c DOT_FONTNAME <dd>
\addindex DOT_FONTNAME \addindex DOT_FONTNAME
By default doxygen will write a font called \c FreeSans.ttf to the output By default doxygen will use the Helvetica font for all dot files that
directory and reference it in all dot files that doxygen generates. This doxygen generates.
font does not include all possible unicode characters however, so when you need When you want a differently looking font you can specify the font name
these (or just want a differently looking font) you can specify the font name using \c DOT_FONTNAME. You need to make sure dot is able to find the font,
using \c DOT_FONTNAME. You need to make sure dot is able to find the font, which can be done by putting it in a standard location or by setting the
which can be done by putting it in a standard location or by setting the \c DOTFONTPATH environment variable or by setting \c DOT_FONTPATH to the
\c DOTFONTPATH environment variable or by setting \c DOT_FONTPATH to the directory directory containing the font.
containing the font.
\anchor cfg_dot_fontsize \anchor cfg_dot_fontsize
<dt>\c DOT_FONTSIZE <dd> <dt>\c DOT_FONTSIZE <dd>
...@@ -2422,13 +2421,18 @@ The default size is 10pt. ...@@ -2422,13 +2421,18 @@ The default size is 10pt.
The \c DOT_IMAGE_FORMAT tag can be used to set the image format of the images The \c DOT_IMAGE_FORMAT tag can be used to set the image format of the images
generated by dot. Possible values are svg, png, jpg, or gif. generated by dot. Possible values are svg, png, jpg, or gif.
If left blank png will be used. If left blank png will be used.
\note If you choose \c svg you need to set
HTML_FILE_EXTENSION to xhtml in order to make the SVG files
visible in IE 9+ (other browsers do not have this requirement).
\anchor cfg_interactive_svg \anchor cfg_interactive_svg
<dt>\c INTERACTIVE_SVG <dt>\c INTERACTIVE_SVG
If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
enable generation of interactive SVG images that allow zooming and panning. enable generation of interactive SVG images that allow zooming and panning.
Note that this requires a modern browser. For Internet Explorer you will need Note that this requires a modern browser other than Internet Explorer.
at least version 9. Tested and working are Firefox, Chrome, Safari, and Opera.
\note For IE 9+ you need to set \c HTML_FILE_EXTENSION to xhtml in order
to make the SVG files visible. Older versions of IE do not have SVG support.
\anchor cfg_dot_path \anchor cfg_dot_path
<dt>\c DOT_PATH <dd> <dt>\c DOT_PATH <dd>
......
...@@ -204,7 +204,7 @@ In this case the \c Makefile will only contain a target to build ...@@ -204,7 +204,7 @@ In this case the \c Makefile will only contain a target to build
\addindex RTF \addindex RTF
Doxygen combines the RTF output to a single file called refman.rtf. This Doxygen combines the RTF output to a single file called refman.rtf. This
file is optimized for importing into the Microsoft Word. Certain information file is optimized for importing into the Microsoft Word. Certain information
is encoded using field. To show the actual value you need to is encoded using so called fields. To show the actual value you need to
select all (Edit - select all) and then toggle fields (right click and select select all (Edit - select all) and then toggle fields (right click and select
the option from the drop down menu). the option from the drop down menu).
......
# Doxyfile 1.7.2 # Doxyfile 1.7.4
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Project related configuration options # Project related configuration options
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
DOXYFILE_ENCODING = UTF-8 DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = Qtools PROJECT_NAME = Qtools
PROJECT_NUMBER = PROJECT_NUMBER =
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = ../qtools_docs OUTPUT_DIRECTORY = ../qtools_docs
CREATE_SUBDIRS = NO CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
...@@ -36,6 +38,7 @@ SIP_SUPPORT = NO ...@@ -36,6 +38,7 @@ SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
TYPEDEF_HIDES_STRUCT = NO TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0 SYMBOL_CACHE_SIZE = 0
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
...@@ -128,16 +131,17 @@ IGNORE_PREFIX = Q ...@@ -128,16 +131,17 @@ IGNORE_PREFIX = Q
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_HTML = YES GENERATE_HTML = YES
HTML_OUTPUT = HTML_OUTPUT =
HTML_FILE_EXTENSION = .html HTML_FILE_EXTENSION = .xhtml
HTML_HEADER = HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
HTML_STYLESHEET = HTML_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80 HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES HTML_TIMESTAMP = YES
HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO HTML_DYNAMIC_SECTIONS = YES
GENERATE_DOCSET = YES GENERATE_DOCSET = YES
DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project DOCSET_BUNDLE_ID = org.doxygen.Project
...@@ -171,7 +175,7 @@ FORMULA_TRANSPARENT = YES ...@@ -171,7 +175,7 @@ FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO USE_MATHJAX = NO
MATHJAX_RELPATH = http://www.mathjax.org/mathjax MATHJAX_RELPATH = http://www.mathjax.org/mathjax
SEARCHENGINE = YES SEARCHENGINE = YES
SERVER_BASED_SEARCH = YES SERVER_BASED_SEARCH = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the LaTeX output # configuration options related to the LaTeX output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
...@@ -183,6 +187,7 @@ COMPACT_LATEX = NO ...@@ -183,6 +187,7 @@ COMPACT_LATEX = NO
PAPER_TYPE = a4wide PAPER_TYPE = a4wide
EXTRA_PACKAGES = EXTRA_PACKAGES =
LATEX_HEADER = LATEX_HEADER =
LATEX_FOOTER =
PDF_HYPERLINKS = YES PDF_HYPERLINKS = YES
USE_PDFLATEX = YES USE_PDFLATEX = YES
LATEX_BATCHMODE = NO LATEX_BATCHMODE = NO
...@@ -249,9 +254,9 @@ PERL_PATH = /usr/bin/perl ...@@ -249,9 +254,9 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = NO CLASS_DIAGRAMS = NO
MSCGEN_PATH = MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO HAVE_DOT = YES
DOT_NUM_THREADS = 0 DOT_NUM_THREADS = 0
DOT_FONTNAME = FreeSans.ttf DOT_FONTNAME =
DOT_FONTSIZE = 10 DOT_FONTSIZE = 10
DOT_FONTPATH = DOT_FONTPATH =
CLASS_GRAPH = YES CLASS_GRAPH = YES
...@@ -265,7 +270,8 @@ CALL_GRAPH = NO ...@@ -265,7 +270,8 @@ CALL_GRAPH = NO
CALLER_GRAPH = NO CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png DOT_IMAGE_FORMAT = svg
INTERACTIVE_SVG = YES
DOT_PATH = DOT_PATH =
DOTFILE_DIRS = DOTFILE_DIRS =
MSCFILE_DIRS = MSCFILE_DIRS =
......
...@@ -64,6 +64,8 @@ static QCString g_blockName; ...@@ -64,6 +64,8 @@ static QCString g_blockName;
static int g_lastCommentContext; static int g_lastCommentContext;
static bool g_inSpecialComment; static bool g_inSpecialComment;
static bool g_inRoseComment; static bool g_inRoseComment;
static int g_stringContext;
static int g_charContext;
static int g_javaBlock; static int g_javaBlock;
static bool g_specialComment; static bool g_specialComment;
...@@ -310,10 +312,12 @@ void replaceComment(int offset); ...@@ -310,10 +312,12 @@ void replaceComment(int offset);
} }
<Scan>"\"" { /* start of a string */ <Scan>"\"" { /* start of a string */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
g_stringContext = YY_START;
BEGIN(SkipString); BEGIN(SkipString);
} }
<Scan>' { <Scan>' {
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
g_charContext = YY_START;
BEGIN(SkipChar); BEGIN(SkipChar);
} }
<Scan>\n { /* new line */ <Scan>\n { /* new line */
...@@ -506,7 +510,7 @@ void replaceComment(int offset); ...@@ -506,7 +510,7 @@ void replaceComment(int offset);
} }
<SkipString>"\"" { /* end of string */ <SkipString>"\"" { /* end of string */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
BEGIN(Scan); BEGIN(g_stringContext);
} }
<SkipString>. { /* any other string character */ <SkipString>. { /* any other string character */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
...@@ -519,7 +523,7 @@ void replaceComment(int offset); ...@@ -519,7 +523,7 @@ void replaceComment(int offset);
} }
<SkipChar>' { /* end of character literal */ <SkipChar>' { /* end of character literal */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
BEGIN(Scan); BEGIN(g_charContext);
} }
<SkipChar>. { /* any other string character */ <SkipChar>. { /* any other string character */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
...@@ -528,10 +532,10 @@ void replaceComment(int offset); ...@@ -528,10 +532,10 @@ void replaceComment(int offset);
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<CComment>[^\\!@*\n{]* { /* anything that is not a '*' or command */ <CComment>[^\\!@*\n{\"]* { /* anything that is not a '*' or command */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<CComment>"*"+[^*/\\@\n]* { /* stars without slashes */ <CComment>"*"+[^*/\\@\n{\"]* { /* stars without slashes */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<CComment>"\"\"\"" { /* end of Python docstring */ <CComment>"\"\"\"" { /* end of Python docstring */
...@@ -593,6 +597,16 @@ void replaceComment(int offset); ...@@ -593,6 +597,16 @@ void replaceComment(int offset);
BEGIN(Scan); BEGIN(Scan);
} }
} }
<CComment>"'" {
g_charContext = YY_START;
copyToOutput(yytext,yyleng);
BEGIN(SkipChar);
}
<CComment>"\"" {
g_stringContext = YY_START;
copyToOutput(yytext,yyleng);
BEGIN(SkipString);
}
<CComment>. { <CComment>. {
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
...@@ -734,6 +748,18 @@ void replaceComment(int offset); ...@@ -734,6 +748,18 @@ void replaceComment(int offset);
} }
<ReadAliasArgs>^[ \t]*"//"[/!]/[^\n]+ { // skip leading special comments (see bug 618079) <ReadAliasArgs>^[ \t]*"//"[/!]/[^\n]+ { // skip leading special comments (see bug 618079)
} }
<ReadAliasArgs>"*/" { // oops, end of comment in the middle of an alias?
if (g_lang==SrcLangExt_Python)
{
REJECT;
}
else // abort the alias, restart scanning
{
copyToOutput(g_aliasString,g_aliasString.length());
copyToOutput(yytext,yyleng);
BEGIN(Scan);
}
}
<ReadAliasArgs>[^{}\n\\\*]+ { <ReadAliasArgs>[^{}\n\\\*]+ {
g_aliasString+=yytext; g_aliasString+=yytext;
g_lastEscaped=FALSE; g_lastEscaped=FALSE;
......
...@@ -1405,23 +1405,21 @@ explicitly to a value larger than 0 to get control over the balance ...@@ -1405,23 +1405,21 @@ explicitly to a value larger than 0 to get control over the balance
between CPU load and processing speed. between CPU load and processing speed.
' defval='0' minval='0' maxval='32'/> ' defval='0' minval='0' maxval='32'/>
<option type='string' id='DOT_FONTNAME' format='string' docs=' <option type='string' id='DOT_FONTNAME' format='string' docs='
By default doxygen will write a font called Helvetica to the output By default doxygen will use the Helvetica font for all dot files that
directory and reference it in all dot files that doxygen generates. doxygen generates. When you want a differently looking font you can specify
When you want a differently looking font you can specify the font name the font name using DOT_FONTNAME. You need to make sure dot is able to find
using DOT_FONTNAME. You need to make sure dot is able to find the font, the font, which can be done by putting it in a standard location or by setting
which can be done by putting it in a standard location or by setting the the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory directory containing the font.
containing the font.
' defval='Helvetica' depends='HAVE_DOT'/> ' defval='Helvetica' depends='HAVE_DOT'/>
<option type='int' id='DOT_FONTSIZE' docs=' <option type='int' id='DOT_FONTSIZE' docs='
The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
The default size is 10pt. The default size is 10pt.
' minval='4' maxval='24' defval='10' depends='HAVE_DOT'/> ' minval='4' maxval='24' defval='10' depends='HAVE_DOT'/>
<option type='string' id='DOT_FONTPATH' format='string' docs=' <option type='string' id='DOT_FONTPATH' format='string' docs='
By default doxygen will tell dot to use the output directory to look for the By default doxygen will tell dot to use the Helvetica font.
FreeSans.ttf font (which doxygen will put there itself). If you specify a If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
different font using DOT_FONTNAME you can set the path where dot set the path where dot can find it.
can find it using this tag.
' defval='' depends='HAVE_DOT'/> ' defval='' depends='HAVE_DOT'/>
<option type='bool' id='CLASS_GRAPH' docs=' <option type='bool' id='CLASS_GRAPH' docs='
If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
...@@ -1487,7 +1485,9 @@ relations between the files in the directories. ...@@ -1487,7 +1485,9 @@ relations between the files in the directories.
<option type='enum' id='DOT_IMAGE_FORMAT' defval='png' docs=' <option type='enum' id='DOT_IMAGE_FORMAT' defval='png' docs='
The DOT_IMAGE_FORMAT tag can be used to set the image format of the images The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
generated by dot. Possible values are svg, png, jpg, or gif. generated by dot. Possible values are svg, png, jpg, or gif.
If left blank png will be used. If left blank png will be used. If you choose svg you need to set
HTML_FILE_EXTENSION to xhtml in order to make the SVG files
visible in IE 9+ (other browsers do not have this requirement).
' depends='HAVE_DOT'> ' depends='HAVE_DOT'>
<value name='png'/> <value name='png'/>
<value name='jpg'/> <value name='jpg'/>
...@@ -1497,8 +1497,10 @@ If left blank png will be used. ...@@ -1497,8 +1497,10 @@ If left blank png will be used.
<option type='bool' id='INTERACTIVE_SVG' doc=' <option type='bool' id='INTERACTIVE_SVG' doc='
If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
enable generation of interactive SVG images that allow zooming and panning. enable generation of interactive SVG images that allow zooming and panning.
Note that this requires a modern browser. For Internet Explorer you will need Note that this requires a modern browser other than Internet Explorer.
at least version 9. Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
visible. Older versions of IE do not have SVG support.
' defval='0' depends='HAVE_DOT'/> ' defval='0' depends='HAVE_DOT'/>
<option type='string' id='DOT_PATH' format='dir' docs=' <option type='string' id='DOT_PATH' format='dir' docs='
The tag DOT_PATH can be used to specify the path where the dot tool can be The tag DOT_PATH can be used to specify the path where the dot tool can be
......
...@@ -2123,13 +2123,11 @@ void addConfigOptions(Config *cfg) ...@@ -2123,13 +2123,11 @@ void addConfigOptions(Config *cfg)
//---- //----
cs = cfg->addString( cs = cfg->addString(
"DOT_FONTNAME", "DOT_FONTNAME",
"By default doxygen will write a font called Helvetica to the output\n" "By default doxygen will use the Helvetica font for all dot files that doxygen generates. When you want a differently looking font you can specify\n"
"directory and reference it in all dot files that doxygen generates.\n" "the font name using DOT_FONTNAME. You need to make sure dot is able to find\n"
"When you want a differently looking font you can specify the font name\n" "the font, which can be done by putting it in a standard location or by setting\n"
"using DOT_FONTNAME. You need to make sure dot is able to find the font,\n" "the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n"
"which can be done by putting it in a standard location or by setting the\n" "directory containing the font."
"DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory\n"
"containing the font."
); );
cs->setDefaultValue("Helvetica"); cs->setDefaultValue("Helvetica");
cs->addDependency("HAVE_DOT"); cs->addDependency("HAVE_DOT");
...@@ -2144,10 +2142,8 @@ void addConfigOptions(Config *cfg) ...@@ -2144,10 +2142,8 @@ void addConfigOptions(Config *cfg)
//---- //----
cs = cfg->addString( cs = cfg->addString(
"DOT_FONTPATH", "DOT_FONTPATH",
"By default doxygen will tell dot to use the output directory to look for the\n" "By default doxygen will tell dot to use the Helvetica font.\n"
"FreeSans.ttf font (which doxygen will put there itself). If you specify a\n" "If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to set the path where dot can find it."
"different font using DOT_FONTNAME you can set the path where dot\n"
"can find it using this tag."
); );
cs->addDependency("HAVE_DOT"); cs->addDependency("HAVE_DOT");
//---- //----
...@@ -2260,7 +2256,8 @@ void addConfigOptions(Config *cfg) ...@@ -2260,7 +2256,8 @@ void addConfigOptions(Config *cfg)
"DOT_IMAGE_FORMAT", "DOT_IMAGE_FORMAT",
"The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n" "The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n"
"generated by dot. Possible values are svg, png, jpg, or gif.\n" "generated by dot. Possible values are svg, png, jpg, or gif.\n"
"If left blank png will be used.", "If left blank png will be used. If you choose svg you need to set\n"
"HTML_FILE_EXTENSION to xhtml in order to make the SVG files visible in IE 9+ (other browsers do not have this requirement).",
"png" "png"
); );
ce->addValue("png"); ce->addValue("png");
......
This diff is collapsed.
...@@ -166,7 +166,7 @@ class DotClassGraph ...@@ -166,7 +166,7 @@ class DotClassGraph
bool isTooBig() const; bool isTooBig() const;
QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path, QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path,
const char *fileName, const char *relPath, const char *fileName, const char *relPath,
bool TBRank=TRUE,bool imageMap=TRUE) const; bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1) const;
void writeXML(FTextStream &t); void writeXML(FTextStream &t);
void writeDEF(FTextStream &t); void writeDEF(FTextStream &t);
...@@ -196,7 +196,7 @@ class DotInclDepGraph ...@@ -196,7 +196,7 @@ class DotInclDepGraph
~DotInclDepGraph(); ~DotInclDepGraph();
QCString writeGraph(FTextStream &t, GraphOutputFormat f, QCString writeGraph(FTextStream &t, GraphOutputFormat f,
const char *path,const char *fileName,const char *relPath, const char *path,const char *fileName,const char *relPath,
bool writeImageMap=TRUE) const; bool writeImageMap=TRUE,int graphId=-1) const;
bool isTrivial() const; bool isTrivial() const;
bool isTooBig() const; bool isTooBig() const;
QCString diskName() const; QCString diskName() const;
...@@ -223,7 +223,8 @@ class DotCallGraph ...@@ -223,7 +223,8 @@ class DotCallGraph
~DotCallGraph(); ~DotCallGraph();
QCString writeGraph(FTextStream &t, GraphOutputFormat f, QCString writeGraph(FTextStream &t, GraphOutputFormat f,
const char *path,const char *fileName, const char *path,const char *fileName,
const char *relPath,bool writeImageMap=TRUE) const; const char *relPath,bool writeImageMap=TRUE,
int graphId=-1) const;
void buildGraph(DotNode *n,MemberDef *md,int distance); void buildGraph(DotNode *n,MemberDef *md,int distance);
bool isTrivial() const; bool isTrivial() const;
bool isTooBig() const; bool isTooBig() const;
...@@ -253,7 +254,8 @@ class DotDirDeps ...@@ -253,7 +254,8 @@ class DotDirDeps
const char *path, const char *path,
const char *fileName, const char *fileName,
const char *relPath, const char *relPath,
bool writeImageMap=TRUE) const; bool writeImageMap=TRUE,
int graphId=-1) const;
private: private:
DirDef *m_dir; DirDef *m_dir;
}; };
...@@ -299,7 +301,7 @@ class DotGroupCollaboration ...@@ -299,7 +301,7 @@ class DotGroupCollaboration
~DotGroupCollaboration(); ~DotGroupCollaboration();
QCString writeGraph(FTextStream &t, GraphOutputFormat format, QCString writeGraph(FTextStream &t, GraphOutputFormat format,
const char *path,const char *fileName,const char *relPath, const char *path,const char *fileName,const char *relPath,
bool writeImageMap=TRUE) const; bool writeImageMap=TRUE,int graphId=-1) const;
void buildGraph(GroupDef* gd); void buildGraph(GroupDef* gd);
bool isTrivial() const; bool isTrivial() const;
private : private :
...@@ -368,13 +370,15 @@ class DotFilePatcher ...@@ -368,13 +370,15 @@ class DotFilePatcher
QCString context; QCString context;
QCString label; QCString label;
bool zoomable; bool zoomable;
int graphId;
}; };
DotFilePatcher(const char *patchFile); DotFilePatcher(const char *patchFile);
int addMap(const QCString &mapFile,const QCString &relPath, int addMap(const QCString &mapFile,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &label); bool urlOnly,const QCString &context,const QCString &label);
int addFigure(const QCString &baseName, int addFigure(const QCString &baseName,
const QCString &figureName,bool heightCheck); const QCString &figureName,bool heightCheck);
int addSVGConversion(const QCString &relPath,bool urlOnly,const QCString &context,bool zoomable); int addSVGConversion(const QCString &relPath,bool urlOnly,
const QCString &context,bool zoomable,int graphId);
int addSVGObject(const QCString &baseName, const QCString &figureName, int addSVGObject(const QCString &baseName, const QCString &figureName,
const QCString &relPath); const QCString &relPath);
bool run(); bool run();
...@@ -421,7 +425,7 @@ class DotManager ...@@ -421,7 +425,7 @@ class DotManager
int addFigure(const QCString &file,const QCString &baseName, int addFigure(const QCString &file,const QCString &baseName,
const QCString &figureName,bool heightCheck); const QCString &figureName,bool heightCheck);
int addSVGConversion(const QCString &file,const QCString &relPath, int addSVGConversion(const QCString &file,const QCString &relPath,
bool urlOnly,const QCString &context,bool zoomable); bool urlOnly,const QCString &context,bool zoomable,int graphId);
int addSVGObject(const QCString &file,const QCString &baseName, int addSVGObject(const QCString &file,const QCString &baseName,
const QCString &figureNAme,const QCString &relPath); const QCString &figureNAme,const QCString &relPath);
bool run(); bool run();
...@@ -445,7 +449,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, ...@@ -445,7 +449,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
void writeDotImageMapFromFile(FTextStream &t, void writeDotImageMapFromFile(FTextStream &t,
const QCString& inFile, const QCString& outDir, const QCString& inFile, const QCString& outDir,
const QCString& relPath,const QCString& baseName, const QCString& relPath,const QCString& baseName,
const QCString& context); const QCString& context,int graphId=-1);
void writeDotDirDepGraph(FTextStream &t,DirDef *dd); void writeDotDirDepGraph(FTextStream &t,DirDef *dd);
......
...@@ -9261,6 +9261,8 @@ extern void commentScanTest(); ...@@ -9261,6 +9261,8 @@ extern void commentScanTest();
void initDoxygen() void initDoxygen()
{ {
const char *lang = portable_getenv("LC_ALL");
if (lang) portable_setenv("LANG",lang);
setlocale(LC_ALL,""); setlocale(LC_ALL,"");
setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8 setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
setlocale(LC_NUMERIC,"C"); setlocale(LC_NUMERIC,"C");
......
...@@ -181,7 +181,7 @@ div.groupText { ...@@ -181,7 +181,7 @@ div.groupText {
} }
body { body {
background: white; background-color: white;
color: black; color: black;
margin: 0; margin: 0;
} }
...@@ -846,3 +846,32 @@ div.zoom ...@@ -846,3 +846,32 @@ div.zoom
border: 1px solid ##A0; border: 1px solid ##A0;
} }
@media print
{
#top { display: none; }
#side-nav { display: none; }
#nav-path { display: none; }
body { overflow:visible; }
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
.summary { display: none; }
.memitem { page-break-inside: avoid; }
#doc-content
{
margin-left:0 !important;
height:auto !important;
width:auto !important;
overflow:inherit;
display:inline;
}
pre.fragment
{
overflow: visible;
text-wrap: unrestricted;
white-space: -moz-pre-wrap; /* Moz */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
}
}
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
"}\n" "}\n"
"\n" "\n"
"body {\n" "body {\n"
" background: white;\n" " background-color: white;\n"
" color: black;\n" " color: black;\n"
" margin: 0;\n" " margin: 0;\n"
"}\n" "}\n"
...@@ -846,3 +846,32 @@ ...@@ -846,3 +846,32 @@
" border: 1px solid ##A0;\n" " border: 1px solid ##A0;\n"
"}\n" "}\n"
"\n" "\n"
"@media print\n"
"{\n"
" #top { display: none; }\n"
" #side-nav { display: none; }\n"
" #nav-path { display: none; }\n"
" body { overflow:visible; }\n"
" h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }\n"
" .summary { display: none; }\n"
" .memitem { page-break-inside: avoid; }\n"
" #doc-content\n"
" {\n"
" margin-left:0 !important;\n"
" height:auto !important;\n"
" width:auto !important;\n"
" overflow:inherit;\n"
" display:inline;\n"
" }\n"
" pre.fragment\n"
" {\n"
" overflow: visible;\n"
" text-wrap: unrestricted;\n"
" white-space: -moz-pre-wrap; /* Moz */\n"
" white-space: -pre-wrap; /* Opera 4-6 */\n"
" white-space: -o-pre-wrap; /* Opera 7 */\n"
" white-space: pre-wrap; /* CSS3 */\n"
" word-wrap: break-word; /* IE 5.5+ */\n"
" }\n"
"}\n"
"\n"
...@@ -748,25 +748,72 @@ private { ...@@ -748,25 +748,72 @@ private {
addCurrentEntry(); addCurrentEntry();
} }
else if (!argType.isEmpty()) else if (!argType.isEmpty())
{ // deklaration of parameter list: add type for corr. parameter { // declaration of parameter list: add type for corr. parameter
parameter = getParameter(argName); parameter = getParameter(argName);
if (parameter) { if (parameter)
{
v_type= V_PARAMETER; v_type= V_PARAMETER;
if (!argType.isNull()) if (!argType.isNull()) parameter->type=argType.stripWhiteSpace();
parameter->type=argType.stripWhiteSpace(); if (!docBlock.isNull())
if (!docBlock.isNull()) { {
parameter->docs += "\n"; parameter->docs += "\n";
parameter->docs += docBlock; parameter->docs += docBlock;
} }
} }
// save, it may be function return type // save, it may be function return type
modifiers[current_root][name.lower()].type = argType; if (parameter)
{
modifiers[current_root][name.lower()].type = argType;
}
else
{
if ((current_root->name.lower() == argName.lower()) ||
(modifiers[current_root->parent()][current_root->name.lower()].returnName == argName.lower()))
{
int strt = current_root->type.find("function");
QString lft;
QString rght;
if (strt != -1)
{
lft = "";
rght = "";
if (strt != 0) lft = current_root->type.left(strt).stripWhiteSpace();
if ((current_root->type.length() - strt - strlen("function"))!= 0)
{
rght = current_root->type.right(current_root->type.length() - strt - strlen("function")).stripWhiteSpace();
}
current_root->type = lft;
if (rght.length() > 0)
{
if (current_root->type.length() > 0) current_root->type += " ";
current_root->type += rght;
}
if (argType.stripWhiteSpace().length() > 0)
{
if (current_root->type.length() > 0) current_root->type += " ";
current_root->type += argType.stripWhiteSpace();
}
if (current_root->type.length() > 0) current_root->type += " ";
current_root->type += "function";
}
else
{
current_root->type += " " + argType.stripWhiteSpace();
}
current_root->type = current_root->type.stripWhiteSpace();
modifiers[current_root][name.lower()].type = current_root->type;
}
else
{
modifiers[current_root][name.lower()].type = argType;
}
}
// any accumulated doc for argument should be emptied, // any accumulated doc for argument should be emptied,
// because it is handled other way and this doc can be // because it is handled other way and this doc can be
// unexpectedly passed to the next member. // unexpectedly passed to the next member.
current->doc.resize(0); current->doc.resize(0);
current->brief.resize(0); current->brief.resize(0);
} }
} }
<Variable>{ARGS} { /* dimension of the previous entry. */ <Variable>{ARGS} { /* dimension of the previous entry. */
QCString name(argName); QCString name(argName);
...@@ -784,12 +831,12 @@ private { ...@@ -784,12 +831,12 @@ private {
BEGIN(Initialization); BEGIN(Initialization);
} }
<Variable>"\n" { currentModifiers = SymbolModifiers(); <Variable>"\n" { currentModifiers = SymbolModifiers();
yy_pop_state(); // end variable deklaration list yy_pop_state(); // end variable declaration list
newLine(); newLine();
docBlock.resize(0); docBlock.resize(0);
} }
<Variable>";".*"\n" { currentModifiers = SymbolModifiers(); <Variable>";".*"\n" { currentModifiers = SymbolModifiers();
yy_pop_state(); // end variable deklaration list yy_pop_state(); // end variable declaration list
docBlock.resize(0); docBlock.resize(0);
inputStringSemi =(const char*)(yytext+1); inputStringSemi =(const char*)(yytext+1);
pushBuffer(inputStringSemi); pushBuffer(inputStringSemi);
...@@ -856,12 +903,15 @@ private { ...@@ -856,12 +903,15 @@ private {
<SubprogPrefix>{BS}{SUBPROG}{BS_} { <SubprogPrefix>{BS}{SUBPROG}{BS_} {
// Fortran subroutine or function found // Fortran subroutine or function found
addSubprogram(yytext); result=yytext;
result=result.stripWhiteSpace();
addSubprogram(result);
BEGIN(Subprog); BEGIN(Subprog);
} }
<Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{SUBPROG}{BS_} { <Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{SUBPROG}{BS_} {
// Fortran subroutine or function found // Fortran subroutine or function found
v_type = V_IGNORE;
if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC) if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
{ {
addInterface("$interface$", ifType); addInterface("$interface$", ifType);
...@@ -1820,7 +1870,8 @@ static void addSubprogram(const char *text) ...@@ -1820,7 +1870,8 @@ static void addSubprogram(const char *text)
//fprintf(stderr,"1=========> got subprog, type: %s\n",text); //fprintf(stderr,"1=========> got subprog, type: %s\n",text);
current->section = Entry::FUNCTION_SEC ; current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace(); QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
if (!current->type) current->type = subtype; current->type += " " + subtype;
current->type = current->type.stripWhiteSpace();
current->fileName = yyFileName; current->fileName = yyFileName;
current->bodyLine = yyLineNr; // used for source reference current->bodyLine = yyLineNr; // used for source reference
current->startLine = -1; // ??? what is startLine for? current->startLine = -1; // ??? what is startLine for?
...@@ -2062,8 +2113,7 @@ void FortranLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf, ...@@ -2062,8 +2113,7 @@ void FortranLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
bool FortranLanguageScanner::needsPreprocessing(const QCString &extension) bool FortranLanguageScanner::needsPreprocessing(const QCString &extension)
{ {
return !(extension==".f"||extension==".f90"|| return extension!=extension.lower(); // use preprocessor only for upper case extensions
extension==".f95"||extension==".f03");
} }
void FortranLanguageScanner::resetCodeParserState() void FortranLanguageScanner::resetCodeParserState()
{ {
......
...@@ -1109,6 +1109,58 @@ void HtmlGenerator::init() ...@@ -1109,6 +1109,58 @@ void HtmlGenerator::init()
t << svgpan_script; t << svgpan_script;
} }
} }
if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
{
QFile f(dname+"/dynsections.js");
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
t <<
"var showTriggers = new Array();\n"
"\n"
"function registerShow(sectId,showFunc) {\n"
" showTriggers[sectId] = showFunc;\n"
"}\n"
"\n"
"function hasClass(ele,cls) {\n"
" return ele.className.match(new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)'));\n"
"}\n"
"\n"
"function addClass(ele,cls) {\n"
" if (!this.hasClass(ele,cls)) ele.className += \" \"+cls;\n"
"}\n"
"\n"
"function removeClass(ele,cls) {\n"
" if (hasClass(ele,cls)) {\n"
" var reg = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n"
" ele.className=ele.className.replace(reg,' ');\n"
" }\n"
"}\n"
"\n"
"function toggleVisibility(linkObj) {\n"
" var base = linkObj.getAttribute('id');\n"
" var summary = document.getElementById(base + '-summary');\n"
" var content = document.getElementById(base + '-content');\n"
" var trigger = document.getElementById(base + '-trigger');\n"
" if ( hasClass(linkObj,'closed') ) {\n"
" summary.style.display = 'none';\n"
" content.style.display = 'block';\n"
" trigger.src = trigger.src.substring(0,trigger.src.length-10)+'open.png';\n"
" removeClass(linkObj,'closed');\n"
" addClass(linkObj,'opened');\n"
" if (showTriggers[base]) { showTriggers[base](); }\n"
" } else if ( hasClass(linkObj,'opened') ) {\n"
" summary.style.display = 'block';\n"
" content.style.display = 'none';\n"
" trigger.src = trigger.src.substring(0,trigger.src.length-8)+'closed.png';\n"
" removeClass(linkObj,'opened');\n"
" addClass(linkObj,'closed');\n"
" }\n"
" return false;\n"
"}\n";
}
}
} }
/// Additional initialization after indices have been created /// Additional initialization after indices have been created
...@@ -1352,87 +1404,8 @@ static void generateDynamicSections(FTextStream &t,const QCString &relPath) ...@@ -1352,87 +1404,8 @@ static void generateDynamicSections(FTextStream &t,const QCString &relPath)
{ {
if (Config_getBool("HTML_DYNAMIC_SECTIONS")) if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
{ {
t << t << "<script type=\"text/javascript\" src=\"" << relPath
#if 0 << "dynsections.js\"></script>\n";
"<script type=\"text/javascript\">\n"
"<!--\n"
"function changeDisplayState (e){\n"
" var num=this.id.replace(/[^[0-9]/g,'');\n"
" var button=this.firstChild;\n"
" var sectionDiv=document.getElementById('dynsection'+num);\n"
" if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){\n"
" sectionDiv.style.display='block';\n"
" button.src='" << relPath << "open.png';\n"
" }else{\n"
" sectionDiv.style.display='none';\n"
" button.src='" << relPath << "closed.png';\n"
" }\n"
"}\n"
"function initDynSections(){\n"
" var divs=document.getElementsByTagName('div');\n"
" var sectionCounter=1;\n"
" for(var i=0;i<divs.length-1;i++){\n"
" if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){\n"
" var header=divs[i];\n"
" var section=divs[i+1];\n"
" var button=header.firstChild;\n"
" if (button!='IMG'){\n"
" divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);\n"
" button=document.createElement('img');\n"
" divs[i].insertBefore(button,divs[i].firstChild);\n"
" }\n"
" header.style.cursor='pointer';\n"
" header.onclick=changeDisplayState;\n"
" header.id='dynheader'+sectionCounter;\n"
" button.src='" << relPath << "closed.png';\n"
" section.id='dynsection'+sectionCounter;\n"
" section.style.display='none';\n"
" section.style.marginLeft='14px';\n"
" sectionCounter++;\n"
" }\n"
" }\n"
"}\n"
"window.onload = initDynSections;\n"
"-->\n"
"</script>\n";
#endif
"<script type=\"text/javascript\">\n"
"function hasClass(ele,cls) {\n"
" return ele.className.match(new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)'));\n"
"}\n"
"\n"
"function addClass(ele,cls) {\n"
" if (!this.hasClass(ele,cls)) ele.className += \" \"+cls;\n"
"}\n"
"\n"
"function removeClass(ele,cls) {\n"
" if (hasClass(ele,cls)) {\n"
" var reg = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n"
" ele.className=ele.className.replace(reg,' ');\n"
" }\n"
"}\n"
"\n"
"function toggleVisibility(linkObj) {\n"
" var base = linkObj.getAttribute('id');\n"
" var summary = document.getElementById(base + '-summary');\n"
" var content = document.getElementById(base + '-content');\n"
" var trigger = document.getElementById(base + '-trigger');\n"
" if ( hasClass(linkObj,'closed') ) {\n"
" summary.style.display = 'none';\n"
" content.style.display = 'block';\n"
" trigger.src = '" << relPath << "open.png';\n"
" removeClass(linkObj,'closed');\n"
" addClass(linkObj,'opened');\n"
" } else if ( hasClass(linkObj,'opened') ) {\n"
" summary.style.display = 'block';\n"
" content.style.display = 'none';\n"
" trigger.src = '" << relPath << "closed.png';\n"
" removeClass(linkObj,'opened');\n"
" addClass(linkObj,'closed');\n"
" }\n"
" return false;\n"
"}\n"
"</script>\n";
} }
} }
...@@ -1478,10 +1451,10 @@ void HtmlGenerator::startFile(const char *name,const char *, ...@@ -1478,10 +1451,10 @@ void HtmlGenerator::startFile(const char *name,const char *,
static bool searchEngine = Config_getBool("SEARCHENGINE"); static bool searchEngine = Config_getBool("SEARCHENGINE");
if (searchEngine /*&& !generateTreeView*/) if (searchEngine /*&& !generateTreeView*/)
{ {
t << "<script type=\"text/javascript\"><!--\n"; t << "<script type=\"text/javascript\">\n";
t << "var searchBox = new SearchBox(\"searchBox\", \"" t << "var searchBox = new SearchBox(\"searchBox\", \""
<< relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n"; << relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n";
t << "--></script>\n"; t << "</script>\n";
} }
generateDynamicSections(t,relPath); generateDynamicSections(t,relPath);
m_sectionCount=0; m_sectionCount=0;
...@@ -2408,7 +2381,7 @@ void HtmlGenerator::endDotGraph(const DotClassGraph &g) ...@@ -2408,7 +2381,7 @@ void HtmlGenerator::endDotGraph(const DotClassGraph &g)
endSectionSummary(t); endSectionSummary(t);
startSectionContent(t,m_sectionCount); startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath); g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,TRUE,m_sectionCount);
if (Config_getBool("GENERATE_LEGEND")) if (Config_getBool("GENERATE_LEGEND"))
{ {
t << "<center><span class=\"legend\">["; t << "<center><span class=\"legend\">[";
...@@ -2434,7 +2407,7 @@ void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g) ...@@ -2434,7 +2407,7 @@ void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g)
endSectionSummary(t); endSectionSummary(t);
startSectionContent(t,m_sectionCount); startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath); g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t); endSectionContent(t);
m_sectionCount++; m_sectionCount++;
...@@ -2452,7 +2425,7 @@ void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g) ...@@ -2452,7 +2425,7 @@ void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
endSectionSummary(t); endSectionSummary(t);
startSectionContent(t,m_sectionCount); startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath); g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t); endSectionContent(t);
m_sectionCount++; m_sectionCount++;
...@@ -2470,7 +2443,7 @@ void HtmlGenerator::endCallGraph(const DotCallGraph &g) ...@@ -2470,7 +2443,7 @@ void HtmlGenerator::endCallGraph(const DotCallGraph &g)
endSectionSummary(t); endSectionSummary(t);
startSectionContent(t,m_sectionCount); startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath); g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t); endSectionContent(t);
m_sectionCount++; m_sectionCount++;
...@@ -2488,7 +2461,7 @@ void HtmlGenerator::endDirDepGraph(const DotDirDeps &g) ...@@ -2488,7 +2461,7 @@ void HtmlGenerator::endDirDepGraph(const DotDirDeps &g)
endSectionSummary(t); endSectionSummary(t);
startSectionContent(t,m_sectionCount); startSectionContent(t,m_sectionCount);
g.writeGraph(t,BITMAP,dir,fileName,relPath); g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount);
endSectionContent(t); endSectionContent(t);
m_sectionCount++; m_sectionCount++;
...@@ -2971,10 +2944,10 @@ void HtmlGenerator::writeSearchPage() ...@@ -2971,10 +2944,10 @@ void HtmlGenerator::writeSearchPage()
static bool searchEngine = Config_getBool("SEARCHENGINE"); static bool searchEngine = Config_getBool("SEARCHENGINE");
if (searchEngine /* && !generateTreeView*/) if (searchEngine /* && !generateTreeView*/)
{ {
t << "<script type=\"text/javascript\"><!--\n"; t << "<script type=\"text/javascript\">\n";
t << "var searchBox = new SearchBox(\"searchBox\", \"" t << "var searchBox = new SearchBox(\"searchBox\", \""
<< "search\",false,'" << theTranslator->trSearch() << "');\n"; << "search\",false,'" << theTranslator->trSearch() << "');\n";
t << "--></script>\n"; t << "</script>\n";
} }
t << "<div id=\"top\">" << endl; t << "<div id=\"top\">" << endl;
writeTitleArea(t,"",projectName,projectBrief,projectNumber,projectLogo); writeTitleArea(t,"",projectName,projectBrief,projectNumber,projectLogo);
......
...@@ -46,9 +46,9 @@ class HtmlGenerator : public OutputGenerator ...@@ -46,9 +46,9 @@ class HtmlGenerator : public OutputGenerator
void enable() void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; } { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Html) active=TRUE; } void enableIf(OutputType o) { if (o==Html) enable(); }
void disableIf(OutputType o) { if (o==Html) active=FALSE; } void disableIf(OutputType o) { if (o==Html) disable(); }
void disableIfNot(OutputType o) { if (o!=Html) active=FALSE; } void disableIfNot(OutputType o) { if (o!=Html) disable(); }
bool isEnabled(OutputType o) { return (o==Html && active); } bool isEnabled(OutputType o) { return (o==Html && active); }
OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; }
......
...@@ -1304,7 +1304,9 @@ void LatexDocVisitor::visitPost(DocParamList *pl) ...@@ -1304,7 +1304,9 @@ void LatexDocVisitor::visitPost(DocParamList *pl)
void LatexDocVisitor::visitPre(DocXRefItem *x) void LatexDocVisitor::visitPre(DocXRefItem *x)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\\begin{Desc}" << endl; m_t << "\\begin{DoxyRefDesc}{";
filter(x->title());
m_t << "}" << endl;
bool anonymousEnum = x->file()=="@"; bool anonymousEnum = x->file()=="@";
m_t << "\\item["; m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS") && !anonymousEnum) if (Config_getBool("PDF_HYPERLINKS") && !anonymousEnum)
...@@ -1324,7 +1326,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x) ...@@ -1324,7 +1326,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
void LatexDocVisitor::visitPost(DocXRefItem *) void LatexDocVisitor::visitPost(DocXRefItem *)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\\end{Desc}" << endl; m_t << "\\end{DoxyRefDesc}" << endl;
} }
void LatexDocVisitor::visitPre(DocInternalRef *ref) void LatexDocVisitor::visitPre(DocInternalRef *ref)
......
...@@ -325,7 +325,6 @@ static void writeDefaultStyleSheetPart1(FTextStream &t) ...@@ -325,7 +325,6 @@ static void writeDefaultStyleSheetPart1(FTextStream &t)
"\\RequirePackage{longtable}\n" "\\RequirePackage{longtable}\n"
"\\RequirePackage{verbatim}\n" "\\RequirePackage{verbatim}\n"
"\\RequirePackage{ifthen}\n" "\\RequirePackage{ifthen}\n"
"\\RequirePackage{settobox}\n"
"\\RequirePackage[table]{xcolor}\n\n"; "\\RequirePackage[table]{xcolor}\n\n";
t << "% Use helvetica font instead of times roman\n" t << "% Use helvetica font instead of times roman\n"
...@@ -773,25 +772,30 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) ...@@ -773,25 +772,30 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
t << "\\newlength{\\xreflength}\n"; t << "\\newlength{\\xreflength}\n";
t << "\\newcommand{\\xreflabel}[1]{%\n"; t << "\\newcommand{\\xreflabel}[1]{%\n";
t << " \\sbox{\\xrefbox}{#1}%\n"; t << " \\sbox{\\xrefbox}{#1}%\n";
t << " \\settoboxwidth{\\xreflength}{\\xrefbox}%\n"; t << " \\setlength{\\xreflength}{\\wd\\xrefbox}%\n";
t << " \\ifthenelse{\\xreflength>\\labelwidth}{%\n"; t << " \\ifthenelse{\\xreflength>\\labelwidth}{%\n";
t << " \\begin{minipage}{\\textwidth}%\n"; t << " \\begin{minipage}{\\textwidth}%\n";
t << " \\setlength{\\parindent}{0pt}%\n"; t << " \\setlength{\\parindent}{0pt}%\n";
t << " \\hangindent=25pt\\bfseries #1\\vspace{\\itemsep}%\n"; t << " \\hangindent=15pt\\bfseries #1\\vspace{1.2\\itemsep}%\n";
t << " \\end{minipage}%\n"; t << " \\end{minipage}%\n";
t << " }{%\n"; t << " }{%\n";
t << " \\parbox[b]{\\labelwidth}{\\makebox[0pt][l]{\\textbf{#1}}}%\n"; t << " \\parbox[b]{\\labelwidth}{\\makebox[0pt][l]{\\textbf{#1}}}%\n";
t << " }}%\n"; t << " }}%\n";
t << "\\newenvironment{DoxyRefList}{%\n"; t << "\\newenvironment{DoxyRefList}{%\n";
t << " \\begin{list}{}{%\n"; t << " \\begin{list}{}{%\n";
t << " \\setlength{\\labelwidth}{75pt}%\n"; t << " \\setlength{\\labelwidth}{10pt}%\n";
t << " \\setlength{\\leftmargin}{\\labelwidth}%\n"; t << " \\setlength{\\leftmargin}{\\labelwidth}%\n";
t << " \\addtolength{\\leftmargin}{\\labelsep}%\n"; t << " \\addtolength{\\leftmargin}{\\labelsep}%\n";
t << " \\renewcommand{\\makelabel}{\\xreflabel}%\n"; t << " \\renewcommand{\\makelabel}{\\xreflabel}%\n";
t << " }%\n"; t << " }%\n";
t << " }%\n"; t << " }%\n";
t << "{\\end{list}}\n"; t << "{\\end{list}}\n";
t << "\\newenvironment{DoxyRefDesc}[1]\n";
t << "{\\begin{list}{}{%\n";
t << " \\renewcommand\\makelabel[1]{\\textbf{##1}}\n";
t << " \\settowidth\\labelwidth{\\makelabel{#1}}\n";
t << " \\setlength\\leftmargin{\\labelwidth+\\labelsep}}}\n";
t << "{\\end{list}}\n";
t << "\\newenvironment{Indent}\n"; t << "\\newenvironment{Indent}\n";
t << " {\\begin{list}{}{\\setlength{\\leftmargin}{0.5cm}}\n"; t << " {\\begin{list}{}{\\setlength{\\leftmargin}{0.5cm}}\n";
t << " \\item[]\\ignorespaces}\n"; t << " \\item[]\\ignorespaces}\n";
......
...@@ -38,9 +38,9 @@ class LatexGenerator : public OutputGenerator ...@@ -38,9 +38,9 @@ class LatexGenerator : public OutputGenerator
void enable() void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; } { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Latex) active=TRUE; } void enableIf(OutputType o) { if (o==Latex) enable(); }
void disableIf(OutputType o) { if (o==Latex) active=FALSE; } void disableIf(OutputType o) { if (o==Latex) disable(); }
void disableIfNot(OutputType o) { if (o!=Latex) active=FALSE; } void disableIfNot(OutputType o) { if (o!=Latex) disable(); }
bool isEnabled(OutputType o) { return (o==Latex && active); } bool isEnabled(OutputType o) { return (o==Latex && active); }
OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; }
......
...@@ -511,10 +511,12 @@ class LayoutParser : public QXmlDefaultHandler ...@@ -511,10 +511,12 @@ class LayoutParser : public QXmlDefaultHandler
MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation())); MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation()));
m_sHandler.insert("file/memberdef/enums", m_sHandler.insert("file/memberdef/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); MemberList::docEnumMembers,
theTranslator->trEnumerationTypeDocumentation()));
m_sHandler.insert("file/memberdef/functions", m_sHandler.insert("file/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docFuncMembers,theTranslator->trFunctionDocumentation())); MemberList::docFuncMembers,
fortranOpt ? theTranslator->trSubprogramDocumentation() : theTranslator->trFunctionDocumentation()));
m_sHandler.insert("file/memberdef/variables", m_sHandler.insert("file/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docVarMembers,theTranslator->trVariableDocumentation())); MemberList::docVarMembers,theTranslator->trVariableDocumentation()));
......
...@@ -34,9 +34,9 @@ class ManGenerator : public OutputGenerator ...@@ -34,9 +34,9 @@ class ManGenerator : public OutputGenerator
void enable() void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; } { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Man) active=TRUE; } void enableIf(OutputType o) { if (o==Man) enable(); }
void disableIf(OutputType o) { if (o==Man) active=FALSE; } void disableIf(OutputType o) { if (o==Man) disable(); }
void disableIfNot(OutputType o) { if (o!=Man) active=FALSE; } void disableIfNot(OutputType o) { if (o!=Man) disable(); }
bool isEnabled(OutputType o) { return (o==Man && active); } bool isEnabled(OutputType o) { return (o==Man && active); }
OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; }
......
...@@ -58,6 +58,7 @@ void OutputGenerator::startPlainFile(const char *name) ...@@ -58,6 +58,7 @@ void OutputGenerator::startPlainFile(const char *name)
void OutputGenerator::endPlainFile() void OutputGenerator::endPlainFile()
{ {
t.unsetDevice();
delete file; delete file;
file=0; file=0;
fileName.resize(0); fileName.resize(0);
...@@ -66,12 +67,12 @@ void OutputGenerator::endPlainFile() ...@@ -66,12 +67,12 @@ void OutputGenerator::endPlainFile()
void OutputGenerator::pushGeneratorState() void OutputGenerator::pushGeneratorState()
{ {
genStack->push(new bool(isEnabled())); genStack->push(new bool(isEnabled()));
//printf("%p:pushGeneratorState(%d)\n",this,genStack->count()); //printf("%p:pushGeneratorState(%d) enabled=%d\n",this,genStack->count(),isEnabled());
} }
void OutputGenerator::popGeneratorState() void OutputGenerator::popGeneratorState()
{ {
//printf("%p:popGeneratorState(%d)\n",this,genStack->count()); //printf("%p:popGeneratorState(%d) enabled=%d\n",this,genStack->count(),isEnabled());
bool *lb = genStack->pop(); bool *lb = genStack->pop();
ASSERT(lb!=0); ASSERT(lb!=0);
if (lb==0) return; // for some robustness against superfluous \endhtmlonly commands. if (lb==0) return; // for some robustness against superfluous \endhtmlonly commands.
......
...@@ -33,6 +33,7 @@ static QCString makeFileName(const char * withoutExtension) ...@@ -33,6 +33,7 @@ static QCString makeFileName(const char * withoutExtension)
static QCString makeRef(const char * withoutExtension, const char * anchor) static QCString makeRef(const char * withoutExtension, const char * anchor)
{ {
//printf("QHP::makeRef(%s,%s)\n",withoutExtension,anchor);
if (!withoutExtension) return QCString(); if (!withoutExtension) return QCString();
QCString result = makeFileName(withoutExtension); QCString result = makeFileName(withoutExtension);
if (!anchor) return result; if (!anchor) return result;
...@@ -191,6 +192,10 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md, ...@@ -191,6 +192,10 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md,
const char *word) const char *word)
{ {
(void)word; (void)word;
//printf("addIndexItem(%s %s %s\n",
// context?context->name().data():"<none>",
// md?md->name().data():"<none>",
// word);
if (md) // member if (md) // member
{ {
......
...@@ -2652,13 +2652,19 @@ void RTFGenerator::endParamList() ...@@ -2652,13 +2652,19 @@ void RTFGenerator::endParamList()
void RTFGenerator::startParameterType(bool first,const char *key) void RTFGenerator::startParameterType(bool first,const char *key)
{ {
DBG_RTF(t << "{\\comment (startParameterList)}" << endl) DBG_RTF(t << "{\\comment (startParameterType)}" << endl)
if (!first && key) if (!first && key)
{ {
t << " " << key << " "; t << " " << key << " ";
} }
} }
void RTFGenerator::endParameterType()
{
DBG_RTF(t << "{\\comment (endParameterType)}" << endl)
t << " ";
}
void RTFGenerator::printDoc(DocNode *n,const char *langExt) void RTFGenerator::printDoc(DocNode *n,const char *langExt)
{ {
RTFDocVisitor *visitor = new RTFDocVisitor(t,*this,langExt); RTFDocVisitor *visitor = new RTFDocVisitor(t,*this,langExt);
......
...@@ -34,9 +34,9 @@ class RTFGenerator : public OutputGenerator ...@@ -34,9 +34,9 @@ class RTFGenerator : public OutputGenerator
void enable() void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; } { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==RTF) active=TRUE; } void enableIf(OutputType o) { if (o==RTF) enable(); }
void disableIf(OutputType o) { if (o==RTF) active=FALSE; } void disableIf(OutputType o) { if (o==RTF) disable(); }
void disableIfNot(OutputType o) { if (o!=RTF) active=FALSE; } void disableIfNot(OutputType o) { if (o!=RTF) disable(); }
bool isEnabled(OutputType o) { return (o==RTF && active); } bool isEnabled(OutputType o) { return (o==RTF && active); }
OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; }
...@@ -219,7 +219,7 @@ class RTFGenerator : public OutputGenerator ...@@ -219,7 +219,7 @@ class RTFGenerator : public OutputGenerator
void startMemberDocName(bool) {} void startMemberDocName(bool) {}
void endMemberDocName() {} void endMemberDocName() {}
void startParameterType(bool,const char *); void startParameterType(bool,const char *);
void endParameterType() {} void endParameterType();
void startParameterName(bool) {} void startParameterName(bool) {}
void endParameterName(bool,bool,bool) {} void endParameterName(bool,bool,bool) {}
void startParameterList(bool) {} void startParameterList(bool) {}
......
...@@ -5064,7 +5064,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -5064,7 +5064,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
new BaseInfo(baseName,baseProt,baseVirt) new BaseInfo(baseName,baseProt,baseVirt)
); );
} }
if ((current->spec & Entry::Interface) || if ((current->spec & (Entry::Interface|Entry::Struct)) ||
insideJava || insidePHP || insideCS || insideJava || insidePHP || insideCS ||
insideD || insideObjC) insideD || insideObjC)
{ {
......
...@@ -240,7 +240,7 @@ function SearchBox(name, resultsPath, inFrame, label) ...@@ -240,7 +240,7 @@ function SearchBox(name, resultsPath, inFrame, label)
var node = child.firstChild; var node = child.firstChild;
if (j==id) if (j==id)
{ {
node.innerHTML='&bull;'; node.innerHTML='&#8226;';
} }
else else
{ {
...@@ -337,7 +337,7 @@ function SearchBox(name, resultsPath, inFrame, label) ...@@ -337,7 +337,7 @@ function SearchBox(name, resultsPath, inFrame, label)
hasResultsPage = false; hasResultsPage = false;
} }
window.frames.MSearchResults.location.href = resultsPageWithSearch; window.frames.MSearchResults.location = resultsPageWithSearch;
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
if (domPopupSearchResultsWindow.style.display!='block') if (domPopupSearchResultsWindow.style.display!='block')
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
" var node = child.firstChild;\n" " var node = child.firstChild;\n"
" if (j==id)\n" " if (j==id)\n"
" {\n" " {\n"
" node.innerHTML='&bull;';\n" " node.innerHTML='&#8226;';\n"
" }\n" " }\n"
" else\n" " else\n"
" {\n" " {\n"
...@@ -337,7 +337,7 @@ ...@@ -337,7 +337,7 @@
" hasResultsPage = false;\n" " hasResultsPage = false;\n"
" }\n" " }\n"
"\n" "\n"
" window.frames.MSearchResults.location.href = resultsPageWithSearch; \n" " window.frames.MSearchResults.location = resultsPageWithSearch; \n"
" var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();\n" " var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();\n"
"\n" "\n"
" if (domPopupSearchResultsWindow.style.display!='block')\n" " if (domPopupSearchResultsWindow.style.display!='block')\n"
......
/** /**
* The code below is based on SVGPan Library 1.2 and was modified for doxygen * The code below is based on SVGPan Library 1.2 and was modified for doxygen
* to support both zooming and panning via the mouse and via embedded bottons.
* *
* This code is licensed under the following BSD license: * This code is licensed under the following BSD license:
* *
...@@ -46,11 +47,10 @@ var maxZoom; ...@@ -46,11 +47,10 @@ var maxZoom;
if (!window) window=this; if (!window) window=this;
/** /**
* Register handlers * Show the graph in the middle of the view, scaled to fit
*/ */
function init(evt) function show()
{ {
svgDoc = evt.target.ownerDocument;
if (window.innerHeight) // Firefox if (window.innerHeight) // Firefox
{ {
windowWidth = window.innerWidth; windowWidth = window.innerWidth;
...@@ -61,21 +61,39 @@ function init(evt) ...@@ -61,21 +61,39 @@ function init(evt)
windowWidth = document.documentElement.clientWidth windowWidth = document.documentElement.clientWidth
windowHeight = document.documentElement.clientHeight windowHeight = document.documentElement.clientHeight
} }
else if (!windowWidth || !windowHeight) // failsafe
{ {
windowWidth = 800; windowWidth = 800;
windowHeight = 600; windowHeight = 600;
} }
minZoom = windowHeight/viewHeight; minZoom = Math.min(windowHeight/viewHeight,windowWidth/viewWidth);
maxZoom = 1.5; maxZoom = minZoom+1.5;
zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps); zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps);
zoomOutFactor = 1.0/zoomInFactor; zoomOutFactor = 1.0/zoomInFactor;
var g = svgDoc.getElementById('viewport'); var g = svgDoc.getElementById('viewport');
var bb = g.getBBox(); try
var a = 'scale('+minZoom+') rotate(0) translate('+((innerWidth-viewWidth*minZoom)/(2*minZoom))+' '+viewHeight+')'; {
var bb = g.getBBox(); // this can throw an exception if css { display: none }
var tx = (windowWidth-viewWidth*minZoom+8)/(2*minZoom);
var ty = viewHeight+(windowHeight-viewHeight*minZoom)/(2*minZoom);
var a = 'scale('+minZoom+') rotate(0) translate('+tx+' '+ty+')';
g.setAttribute('transform',a);
}
catch(e) {}
}
g.setAttribute('transform',a); /**
* Register handlers
*/
function init(evt)
{
svgDoc = evt.target.ownerDocument;
if (top.window && top.window.registerShow) // register show function in html doc for dynamic sections
{
top.window.registerShow(sectionId,show);
}
show();
setAttributes(root, { setAttributes(root, {
"onmousedown" : "handleMouseDown(evt)", "onmousedown" : "handleMouseDown(evt)",
...@@ -85,36 +103,22 @@ function init(evt) ...@@ -85,36 +103,22 @@ function init(evt)
if (window.addEventListener) if (window.addEventListener)
{ {
if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || navigator.userAgent.toLowerCase().indexOf("opera") >= 0) if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 ||
window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari navigator.userAgent.toLowerCase().indexOf("opera") >= 0 ||
navigator.appVersion.indexOf("MSIE") != -1)
{
window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari/IE9
}
else else
{
window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
}
} }
} }
window.onresize=function() window.onresize=function()
{ {
if (svgDoc) if (svgDoc) { show(); }
{
var newWindowWidth;
if (window.innerWidth) // Firefox
{
newWindowWidth = window.innerWidth;
}
else if (document.documentElement.clientWidth) // Chrome/Safari
{
newWindowWidth = document.documentElement.clientWidth
}
if (newWindowWidth)
{
var g = svgDoc.getElementById("viewport");
var n = g.getCTM();
n = n.translate((newWindowWidth-windowWidth)/(2*minZoom),0);
setCTM(g, n);
stateTf = stateTf.multiply(n.inverse());
windowWidth = newWindowWidth;
}
}
} }
/** /**
...@@ -178,9 +182,14 @@ function handleMouseWheel(evt) ...@@ -178,9 +182,14 @@ function handleMouseWheel(evt)
{ {
delta = evt.wheelDelta / 720; // Opera delta = evt.wheelDelta / 720; // Opera
} }
else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ||
navigator.appVersion.indexOf("MSIE") != -1)
{
delta = evt.wheelDelta / 7200; // Chrome/IE9
}
else else
{ {
delta = evt.wheelDelta / 7200; // Chrome/Safari/Opera delta = evt.wheelDelta / 72000; // Safari
} }
} }
else else
...@@ -243,6 +252,18 @@ function handleMouseUp(evt) ...@@ -243,6 +252,18 @@ function handleMouseUp(evt)
state = ''; state = '';
} }
/**
* Dumps a matrix to a string (useful for debug).
*/
function dumpMatrix(matrix)
{
var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]";
return s;
}
/**
* Handler for pan buttons
*/
function handlePan(x,y) function handlePan(x,y)
{ {
var g = svgDoc.getElementById("viewport"); var g = svgDoc.getElementById("viewport");
...@@ -250,22 +271,25 @@ function handlePan(x,y) ...@@ -250,22 +271,25 @@ function handlePan(x,y)
} }
/** /**
* Dumps a matrix to a string (useful for debug). * Handle reset button
*/ */
function dumpMatrix(matrix) function handleReset()
{ {
var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]"; show();
return s;
} }
/**
* Handler for zoom buttons
*/
function handleZoom(evt,direction) function handleZoom(evt,direction)
{ {
var g = svgDoc.getElementById("viewport"); var g = svgDoc.getElementById("viewport");
var factor = direction=='in' ? zoomInFactor : zoomOutFactor; var factor = direction=='in' ? zoomInFactor : zoomOutFactor;
var m = g.getCTM(); var m = g.getCTM();
var p = root.createSVGPoint(); var p = root.createSVGPoint();
p.x = windowWidth/2; p.x = windowWidth/2;
p.y = windowHeight/2; p.y = windowHeight/2;
doZoom(g,p,factor); doZoom(g,p,factor);
} }
"/**\n" "/**\n"
" * The code below is based on SVGPan Library 1.2 and was modified for doxygen\n" " * The code below is based on SVGPan Library 1.2 and was modified for doxygen\n"
" * to support both zooming and panning via the mouse and via embedded bottons.\n"
" *\n" " *\n"
" * This code is licensed under the following BSD license:\n" " * This code is licensed under the following BSD license:\n"
" *\n" " *\n"
...@@ -46,11 +47,10 @@ ...@@ -46,11 +47,10 @@
"if (!window) window=this;\n" "if (!window) window=this;\n"
"\n" "\n"
"/**\n" "/**\n"
" * Register handlers\n" " * Show the graph in the middle of the view, scaled to fit \n"
" */\n" " */\n"
"function init(evt) \n" "function show()\n"
"{\n" "{\n"
" svgDoc = evt.target.ownerDocument;\n"
" if (window.innerHeight) // Firefox\n" " if (window.innerHeight) // Firefox\n"
" {\n" " {\n"
" windowWidth = window.innerWidth;\n" " windowWidth = window.innerWidth;\n"
...@@ -61,21 +61,39 @@ ...@@ -61,21 +61,39 @@
" windowWidth = document.documentElement.clientWidth\n" " windowWidth = document.documentElement.clientWidth\n"
" windowHeight = document.documentElement.clientHeight\n" " windowHeight = document.documentElement.clientHeight\n"
" }\n" " }\n"
" else\n" " if (!windowWidth || !windowHeight) // failsafe\n"
" {\n" " {\n"
" windowWidth = 800;\n" " windowWidth = 800;\n"
" windowHeight = 600;\n" " windowHeight = 600;\n"
" }\n" " }\n"
" minZoom = windowHeight/viewHeight;\n" " minZoom = Math.min(windowHeight/viewHeight,windowWidth/viewWidth);\n"
" maxZoom = 1.5;\n" " maxZoom = minZoom+1.5;\n"
" zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps);\n" " zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps);\n"
" zoomOutFactor = 1.0/zoomInFactor;\n" " zoomOutFactor = 1.0/zoomInFactor;\n"
"\n" "\n"
" var g = svgDoc.getElementById('viewport');\n" " var g = svgDoc.getElementById('viewport');\n"
" var bb = g.getBBox();\n" " try\n"
" var a = 'scale('+minZoom+') rotate(0) translate('+((innerWidth-viewWidth*minZoom)/(2*minZoom))+' '+viewHeight+')';\n" " {\n"
" var bb = g.getBBox(); // this can throw an exception if css { display: none }\n"
" var tx = (windowWidth-viewWidth*minZoom+8)/(2*minZoom);\n"
" var ty = viewHeight+(windowHeight-viewHeight*minZoom)/(2*minZoom);\n"
" var a = 'scale('+minZoom+') rotate(0) translate('+tx+' '+ty+')';\n"
" g.setAttribute('transform',a);\n"
" }\n"
" catch(e) {}\n"
"}\n"
"\n" "\n"
" g.setAttribute('transform',a);\n" "/**\n"
" * Register handlers\n"
" */\n"
"function init(evt) \n"
"{\n"
" svgDoc = evt.target.ownerDocument;\n"
" if (top.window && top.window.registerShow) // register show function in html doc for dynamic sections\n"
" {\n"
" top.window.registerShow(sectionId,show);\n"
" }\n"
" show();\n"
"\n" "\n"
" setAttributes(root, {\n" " setAttributes(root, {\n"
" \"onmousedown\" : \"handleMouseDown(evt)\",\n" " \"onmousedown\" : \"handleMouseDown(evt)\",\n"
...@@ -85,36 +103,22 @@ ...@@ -85,36 +103,22 @@
"\n" "\n"
" if (window.addEventListener)\n" " if (window.addEventListener)\n"
" {\n" " {\n"
" if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || navigator.userAgent.toLowerCase().indexOf(\"opera\") >= 0)\n" " if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || \n"
" window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari\n" " navigator.userAgent.toLowerCase().indexOf(\"opera\") >= 0 || \n"
" navigator.appVersion.indexOf(\"MSIE\") != -1)\n"
" {\n"
" window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari/IE9\n"
" }\n"
" else\n" " else\n"
" {\n"
" window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others\n" " window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others\n"
" }\n"
" }\n" " }\n"
"}\n" "}\n"
"\n" "\n"
"window.onresize=function()\n" "window.onresize=function()\n"
"{\n" "{\n"
" if (svgDoc)\n" " if (svgDoc) { show(); }\n"
" {\n"
" var newWindowWidth;\n"
" if (window.innerWidth) // Firefox\n"
" {\n"
" newWindowWidth = window.innerWidth;\n"
" }\n"
" else if (document.documentElement.clientWidth) // Chrome/Safari\n"
" {\n"
" newWindowWidth = document.documentElement.clientWidth\n"
" }\n"
" if (newWindowWidth)\n"
" {\n"
" var g = svgDoc.getElementById(\"viewport\");\n"
" var n = g.getCTM();\n"
" n = n.translate((newWindowWidth-windowWidth)/(2*minZoom),0);\n"
" setCTM(g, n);\n"
" stateTf = stateTf.multiply(n.inverse());\n"
" windowWidth = newWindowWidth;\n"
" }\n"
" }\n"
"}\n" "}\n"
"\n" "\n"
"/**\n" "/**\n"
...@@ -178,9 +182,14 @@ ...@@ -178,9 +182,14 @@
" {\n" " {\n"
" delta = evt.wheelDelta / 720; // Opera\n" " delta = evt.wheelDelta / 720; // Opera\n"
" }\n" " }\n"
" else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ||\n"
" navigator.appVersion.indexOf(\"MSIE\") != -1)\n"
" {\n"
" delta = evt.wheelDelta / 7200; // Chrome/IE9\n"
" }\n"
" else\n" " else\n"
" {\n" " {\n"
" delta = evt.wheelDelta / 7200; // Chrome/Safari/Opera\n" " delta = evt.wheelDelta / 72000; // Safari\n"
" }\n" " }\n"
" }\n" " }\n"
" else\n" " else\n"
...@@ -243,6 +252,18 @@ ...@@ -243,6 +252,18 @@
" state = '';\n" " state = '';\n"
"}\n" "}\n"
"\n" "\n"
"/**\n"
" * Dumps a matrix to a string (useful for debug).\n"
" */\n"
"function dumpMatrix(matrix) \n"
"{\n"
" var s = \"[ \" + matrix.a + \", \" + matrix.c + \", \" + matrix.e + \"\\n \" + matrix.b + \", \" + matrix.d + \", \" + matrix.f + \"\\n 0, 0, 1 ]\";\n"
" return s;\n"
"}\n"
"\n"
"/**\n"
" * Handler for pan buttons\n"
" */\n"
"function handlePan(x,y)\n" "function handlePan(x,y)\n"
"{\n" "{\n"
" var g = svgDoc.getElementById(\"viewport\");\n" " var g = svgDoc.getElementById(\"viewport\");\n"
...@@ -250,22 +271,25 @@ ...@@ -250,22 +271,25 @@
"}\n" "}\n"
"\n" "\n"
"/**\n" "/**\n"
" * Dumps a matrix to a string (useful for debug).\n" " * Handle reset button\n"
" */\n" " */\n"
"function dumpMatrix(matrix) \n" "function handleReset()\n"
"{\n" "{\n"
" var s = \"[ \" + matrix.a + \", \" + matrix.c + \", \" + matrix.e + \"\\n \" + matrix.b + \", \" + matrix.d + \", \" + matrix.f + \"\\n 0, 0, 1 ]\";\n" " show();\n"
" return s;\n"
"}\n" "}\n"
"\n" "\n"
"/**\n"
" * Handler for zoom buttons\n"
" */\n"
"function handleZoom(evt,direction)\n" "function handleZoom(evt,direction)\n"
"{\n" "{\n"
" var g = svgDoc.getElementById(\"viewport\");\n" " var g = svgDoc.getElementById(\"viewport\");\n"
" var factor = direction=='in' ? zoomInFactor : zoomOutFactor;\n" " var factor = direction=='in' ? zoomInFactor : zoomOutFactor;\n"
" var m = g.getCTM();\n" " var m = g.getCTM();\n"
" var p = root.createSVGPoint();\n" " var p = root.createSVGPoint();\n"
" p.x = windowWidth/2; \n" " p.x = windowWidth/2;\n"
" p.y = windowHeight/2;\n" " p.y = windowHeight/2;\n"
" doZoom(g,p,factor);\n" " doZoom(g,p,factor);\n"
"}\n" "}\n"
"\n" "\n"
"\n"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment