Blame doc/customize.doc

Packit 1c1d7e
/******************************************************************************
Packit 1c1d7e
 *
Packit 1c1d7e
 * 
Packit 1c1d7e
 *
Packit 1c1d7e
 * Copyright (C) 1997-2015 by Dimitri van Heesch.
Packit 1c1d7e
 *
Packit 1c1d7e
 * Permission to use, copy, modify, and distribute this software and its
Packit 1c1d7e
 * documentation under the terms of the GNU General Public License is hereby 
Packit 1c1d7e
 * granted. No representations are made about the suitability of this software 
Packit 1c1d7e
 * for any purpose. It is provided "as is" without express or implied warranty.
Packit 1c1d7e
 * See the GNU General Public License for more details.
Packit 1c1d7e
 *
Packit 1c1d7e
 * Documents produced by Doxygen are derivative works derived from the
Packit 1c1d7e
 * input used in their production; they are not affected by this license.
Packit 1c1d7e
 *
Packit 1c1d7e
 */
Packit 1c1d7e
/*! \page customize Customizing the output
Packit 1c1d7e
Packit 1c1d7e
\tableofcontents
Packit 1c1d7e
Packit 1c1d7e
Doxygen provides various levels of customization. 
Packit 1c1d7e
The section \ref minor_tweaks "Minor Tweaks" discusses what to 
Packit 1c1d7e
do if you want to do minor tweaking to the look and feel of the output. 
Packit 1c1d7e
The section \ref layout "Layout" show how to reorder and hide certain 
Packit 1c1d7e
information on a page. 
Packit 1c1d7e
The section \ref xmlgenerator "XML output" show how to generate 
Packit 1c1d7e
whatever output you want based on the XML output produced by doxygen.
Packit 1c1d7e
Packit 1c1d7e
\section minor_tweaks Minor Tweaks
Packit 1c1d7e
Packit 1c1d7e
The next subsections describe some aspects that can be tweaked with
Packit 1c1d7e
little effort.
Packit 1c1d7e
Packit 1c1d7e
\subsection minor_tweaks_colors Overall Color
Packit 1c1d7e
Packit 1c1d7e
To change the overall color of the HTML output doxygen provides three options
Packit 1c1d7e
- \ref cfg_html_colorstyle_hue "HTML_COLORSTYLE_HUE"
Packit 1c1d7e
- \ref cfg_html_colorstyle_sat "HTML_COLORSTYLE_SAT"
Packit 1c1d7e
- \ref cfg_html_colorstyle_gamma "HTML_COLORSTYLE_GAMMA"
Packit 1c1d7e
Packit 1c1d7e
to change the hue, saturation, and gamma correction of the colors respectively.
Packit 1c1d7e
Packit 1c1d7e
For your convenience the GUI frontend \ref doxywizard_usage "Doxywizard" 
Packit 1c1d7e
has a control that allows you to see the effect of changing the values of these options 
Packit 1c1d7e
on the output in real time.
Packit 1c1d7e
Packit 1c1d7e
\subsection minor_tweaks_treeview Navigation
Packit 1c1d7e
Packit 1c1d7e
By default doxygen shows navigation tabs on top of every HTML page,
Packit 1c1d7e
corresponding with the following settings:
Packit 1c1d7e
Packit 1c1d7e
- \ref cfg_disable_index "DISABLE_INDEX" = \c NO
Packit 1c1d7e
- \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c NO
Packit 1c1d7e
Packit 1c1d7e
you can switch to an interactive navigation tree as sidebar using
Packit 1c1d7e
Packit 1c1d7e
- \ref cfg_disable_index "DISABLE_INDEX" = \c YES
Packit 1c1d7e
- \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c YES
Packit 1c1d7e
Packit 1c1d7e
or even have both forms of navigation:
Packit 1c1d7e
Packit 1c1d7e
- \ref cfg_disable_index "DISABLE_INDEX" = \c NO
Packit 1c1d7e
- \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c YES
Packit 1c1d7e
Packit 1c1d7e
if you already use an external index (i.e. have one of the following
Packit 1c1d7e
options enabled
Packit 1c1d7e
\ref cfg_generate_htmlhelp "GENERATE_HTMLHELP",
Packit 1c1d7e
\ref cfg_generate_eclipsehelp "GENERATE_ECLIPSEHELP",
Packit 1c1d7e
\ref cfg_generate_qhp "GENERATE_QHP", or
Packit 1c1d7e
\ref cfg_generate_docset "GENERATE_DOCSET")
Packit 1c1d7e
then you can also disable all indices, like so:
Packit 1c1d7e
Packit 1c1d7e
- \ref cfg_disable_index "DISABLE_INDEX" = \c YES
Packit 1c1d7e
- \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c NO
Packit 1c1d7e
Packit 1c1d7e
\subsection minor_tweaks_dynsection Dynamic Content
Packit 1c1d7e
Packit 1c1d7e
To make the HTML output more interactive, doxygen provides a number of options
Packit 1c1d7e
that are disabled by default:
Packit 1c1d7e
- enabling \ref cfg_html_dynamic_sections "HTML_DYNAMIC_SECTIONS" will make
Packit 1c1d7e
  doxygen hide certain content (like graphs) in the HTML by default, 
Packit 1c1d7e
  and let the reader expand these sections on request.
Packit 1c1d7e
- enabling \ref cfg_have_dot "HAVE_DOT" along 
Packit 1c1d7e
  with \ref cfg_interactive_svg "INTERACTIVE_SVG" while setting 
Packit 1c1d7e
  \ref cfg_dot_image_format "DOT_IMAGE_FORMAT" to \c svg, will make doxygen
Packit 1c1d7e
  produce SVG images that will allow the user to zoom and pan (this only
Packit 1c1d7e
  happens when the size of the images exceeds a certain size).
Packit 1c1d7e
Packit 1c1d7e
\subsection minor_tweaks_header_css Header, Footer, and Stylesheet changes
Packit 1c1d7e
Packit 1c1d7e
To tweak things like fonts or colors, margins, or other look \& feel
Packit 1c1d7e
aspects of the HTML output in detail, you can create a different 
Packit 1c1d7e
cascading style sheet. 
Packit 1c1d7e
You can also let doxygen use a custom header and footer for each HTML 
Packit 1c1d7e
page it generates, for instance to make the output conform to the style 
Packit 1c1d7e
used on the rest of your web site.
Packit 1c1d7e
Packit 1c1d7e
To do this first run doxygen as follows:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
doxygen -w html header.html footer.html customdoxygen.css 
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
This will create 3 files:
Packit 1c1d7e
- header.html is a HTML fragment which doxygen normally uses to start
Packit 1c1d7e
  a HTML page. Note that the fragment ends with a body tag and that is
Packit 1c1d7e
  contains a couple of commands of the form \$word. These will be replaced
Packit 1c1d7e
  by doxygen on the fly. 
Packit 1c1d7e
- footer.html is a HTML fragment which doxygen normally uses to end 
Packit 1c1d7e
  a HTML page. Also here special commands can be used. This file contain the 
Packit 1c1d7e
  link to www.doxygen.org and the body and html end tags.
Packit 1c1d7e
- customdoxygen.css is the default cascading style sheet
Packit 1c1d7e
  used by doxygen. It is recommended only to look into this file and overrule
Packit 1c1d7e
  some settings you like by putting them in a separate stylesheets and
Packit 1c1d7e
  referencing those extra files
Packit 1c1d7e
  via \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET".
Packit 1c1d7e
Packit 1c1d7e
You should edit these files and then reference them from the config file.
Packit 1c1d7e
- \ref cfg_html_header "HTML_HEADER" = \c header.html
Packit 1c1d7e
- \ref cfg_html_footer "HTML_FOOTER" = \c footer.html
Packit 1c1d7e
- \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET" = \c my_customdoxygen.css
Packit 1c1d7e
Packit 1c1d7e
\note it is not longer recommended to use \ref cfg_html_stylesheet "HTML_STYLESHEET",
Packit 1c1d7e
as it make it difficult to upgrade to a newer version of doxygen. Use
Packit 1c1d7e
\ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET" instead.
Packit 1c1d7e
Packit 1c1d7e
See the documentation of the \ref cfg_html_header "HTML_HEADER" tag
Packit 1c1d7e
for more information about the possible meta commands you can use inside
Packit 1c1d7e
your custom header.
Packit 1c1d7e
Packit 1c1d7e
\note You should not put the style sheet in the HTML output directory. Treat
Packit 1c1d7e
it as a source file. Doxygen will copy it for you. 
Packit 1c1d7e
Packit 1c1d7e
\note If you use images or other external content in a custom header you
Packit 1c1d7e
need to make sure these end up in the HTML output directory yourself,
Packit 1c1d7e
for instance by writing a script that runs doxygen can then copies the
Packit 1c1d7e
images to the output.
Packit 1c1d7e
Packit 1c1d7e
\warning The structure of headers and footers may change after upgrading to
Packit 1c1d7e
a newer version of doxygen, so if you are using a custom header or footer, 
Packit 1c1d7e
it might not produce valid output anymore after upgrading. 
Packit 1c1d7e
Packit 1c1d7e
\section layout Changing the layout of pages
Packit 1c1d7e
Packit 1c1d7e
In some cases you may want to change the way the output is structured.
Packit 1c1d7e
A different style sheet or custom headers and footers do not help in such 
Packit 1c1d7e
case.
Packit 1c1d7e
Packit 1c1d7e
The solution doxygen provides is a layout file, which you can
Packit 1c1d7e
modify and doxygen will use to control what information is presented, 
Packit 1c1d7e
in which order, and to some extent also how information is presented.
Packit 1c1d7e
The layout file is an XML file. 
Packit 1c1d7e
Packit 1c1d7e
The default layout can be generated
Packit 1c1d7e
by doxygen using the following command:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
doxygen -l 
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
optionally the name of the layout file can be specified, if omitted
Packit 1c1d7e
\c DoxygenLayout.xml will be used.
Packit 1c1d7e
Packit 1c1d7e
The next step is to mention the layout file in the config file
Packit 1c1d7e
\verbatim
Packit 1c1d7e
LAYOUT_FILE = DoxygenLayout.xml
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
To change the layout all you need to do is edit the layout file.
Packit 1c1d7e
Packit 1c1d7e
The toplevel structure of the file looks as follows:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
<doxygenlayout version="1.0">
Packit 1c1d7e
  <navindex>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </navindex>
Packit 1c1d7e
  <class>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </class>
Packit 1c1d7e
  <namespace>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </namespace>
Packit 1c1d7e
  <file>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </file>
Packit 1c1d7e
  <group>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </group>
Packit 1c1d7e
  <directory>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </directory>
Packit 1c1d7e
</doxygenlayout>
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
The root element of the XML file is \c doxygenlayout, it has an attribute named
Packit 1c1d7e
\c version, which will be used in the future to cope with changes that are
Packit 1c1d7e
not backward compatible.
Packit 1c1d7e
Packit 1c1d7e
The first section, identified by the \c navindex element, represents the 
Packit 1c1d7e
layout of the navigation tabs displayed at the top of each HTML page. At the
Packit 1c1d7e
same time it also controls the items in the navigation tree in case
Packit 1c1d7e
\ref cfg_generate_treeview "GENERATE_TREEVIEW" is enabled. 
Packit 1c1d7e
Each tab is represented by a \c tab element in the XML file.
Packit 1c1d7e
Packit 1c1d7e
You can hide tabs by setting the \c visible attribute to \c no. 
Packit 1c1d7e
You can also override the default title of a tab by specifying it as 
Packit 1c1d7e
the value of the \c title attribute. If the title field is the empty string
Packit 1c1d7e
(the default) then doxygen will fill in an appropriate language specific title.
Packit 1c1d7e
Packit 1c1d7e
You can reorder the tabs by moving the tab elements in the XML file
Packit 1c1d7e
within the \c navindex element and even change the tree structure. 
Packit 1c1d7e
Do not change the value of the \c type attribute however. 
Packit 1c1d7e
Only a fixed set of types are supported, each representing a link to a 
Packit 1c1d7e
specific index.
Packit 1c1d7e
Packit 1c1d7e
You can also add custom tabs using a type with name "user". Here is an
Packit 1c1d7e
example that shows how to add a tab with title "Google" pointing to 
Packit 1c1d7e
www.google.com:
Packit 1c1d7e
Packit 1c1d7e
\verbatim
Packit 1c1d7e
  <navindex>
Packit 1c1d7e
    ...
Packit 1c1d7e
    <tab type="user" url="http://www.google.com" title="Google"/>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </navindex>
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
The url field can also be a relative URL. If the URL starts with \@ref
Packit 1c1d7e
the link will point to a documented entities, such as a class, a function, 
Packit 1c1d7e
a group, or a related page. Suppose we have defined a page using \@page with 
Packit 1c1d7e
label mypage, then a tab with label "My Page" to this page would look 
Packit 1c1d7e
as follows:
Packit 1c1d7e
Packit 1c1d7e
\verbatim
Packit 1c1d7e
  <navindex>
Packit 1c1d7e
    ...
Packit 1c1d7e
    <tab type="user" url="@ref mypage" title="My Page"/>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </navindex>
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
You can also group tabs together in a custom group using a tab with
Packit 1c1d7e
type "usergroup". The following example puts the above tabs in a user
Packit 1c1d7e
defined group with title "My Group":
Packit 1c1d7e
Packit 1c1d7e
\verbatim
Packit 1c1d7e
  <navindex>
Packit 1c1d7e
    ...
Packit 1c1d7e
    <tab type="usergroup" title="My Group">
Packit 1c1d7e
      <tab type="user" url="http://www.google.com" title="Google"/>
Packit 1c1d7e
      <tab type="user" url="@ref mypage" title="My Page"/>
Packit 1c1d7e
    </tab>
Packit 1c1d7e
    ...
Packit 1c1d7e
  </navindex>
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
Groups can be nested to form a hierarchy. 
Packit 1c1d7e
Packit 1c1d7e
By default a usergroup entry in the navigation tree is a link to
Packit 1c1d7e
a landing page with the contents of the group. You can link to a
Packit 1c1d7e
different page using the `url` attribute just like you can for the
Packit 1c1d7e
`<tab>` element and prevent any link using `url="[none]"`, i.e.
Packit 1c1d7e
Packit 1c1d7e
\verbatim
Packit 1c1d7e
   <tab type="usergroup" title="Group without link" url="[none]">
Packit 1c1d7e
   ...
Packit 1c1d7e
   </tab>
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
The elements after \c navindex represent the layout of the different 
Packit 1c1d7e
pages generated by doxygen:
Packit 1c1d7e
- The \c class element represents the layout of all pages generated for
Packit 1c1d7e
  documented classes, structs, unions, and interfaces.
Packit 1c1d7e
- The \c namespace element represents the layout of all pages generated for
Packit 1c1d7e
  documented namespaces (and also Java packages).
Packit 1c1d7e
- The \c file element represents the layout of all pages generated for
Packit 1c1d7e
  documented files.
Packit 1c1d7e
- The \c group element represents the layout of all pages generated for
Packit 1c1d7e
  documented groups (or modules).
Packit 1c1d7e
- The \c directory element represents the layout of all pages generated for
Packit 1c1d7e
  documented directories.
Packit 1c1d7e
Packit 1c1d7e
Each XML element within one of the above page elements represents a certain
Packit 1c1d7e
piece of information. Some pieces can appear in each type of page,
Packit 1c1d7e
others are specific for a certain type of page.
Packit 1c1d7e
Doxygen will list the pieces in the order in which they appear 
Packit 1c1d7e
in the XML file. 
Packit 1c1d7e
Packit 1c1d7e
The following generic elements are possible for each page:
Packit 1c1d7e
Packit 1c1d7e
\c briefdescription
Packit 1c1d7e
  
Represents the brief description on a page.
Packit 1c1d7e
\c detaileddescription
Packit 1c1d7e
  
Represents the detailed description on a page.
Packit 1c1d7e
\c authorsection
Packit 1c1d7e
  
Represents the author section of a page (only used for man pages).
Packit 1c1d7e
\c memberdecl
Packit 1c1d7e
  
Represents the quick overview of members on a page (member declarations).
Packit 1c1d7e
      This elements has child elements per type of member list.
Packit 1c1d7e
      The possible child elements are not listed in detail in the document, 
Packit 1c1d7e
      but the name of the element should be a good indication of the type 
Packit 1c1d7e
      of members that the element represents.
Packit 1c1d7e
\c memberdef
Packit 1c1d7e
  
Represents the detailed member list on a page (member definition).
Packit 1c1d7e
      Like the \c memberdecl element, also this element has a number of 
Packit 1c1d7e
      possible child elements. 
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
The class page has the following specific elements:
Packit 1c1d7e
Packit 1c1d7e
\c includes
Packit 1c1d7e
  
Represents the include file needed to obtain the definition for
Packit 1c1d7e
      this class.
Packit 1c1d7e
\c inheritancegraph
Packit 1c1d7e
  
Represents the inheritance relations for a class.
Packit 1c1d7e
      Note that the CLASS_DIAGRAM option determines
Packit 1c1d7e
      if the inheritance relation is a list of base and derived classes or
Packit 1c1d7e
      a graph. 
Packit 1c1d7e
\c collaborationgraph
Packit 1c1d7e
  
Represents the collaboration graph for a class.
Packit 1c1d7e
\c allmemberslink
Packit 1c1d7e
  
Represents the link to the list of all members for a class.
Packit 1c1d7e
\c usedfiles
Packit 1c1d7e
  
Represents the list of files from which documentation for the class was
Packit 1c1d7e
      extracted.
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
The file page has the following specific elements:
Packit 1c1d7e
Packit 1c1d7e
\c includes
Packit 1c1d7e
  
Represents the list of \#include statements contained in this file.
Packit 1c1d7e
\c includegraph
Packit 1c1d7e
  
Represents the include dependency graph for the file.
Packit 1c1d7e
\c includedbygraph
Packit 1c1d7e
  
Represents the included by dependency graph for the file.
Packit 1c1d7e
\c sourcelink
Packit 1c1d7e
  
Represents the link to the source code of this file.
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
The group page has a specific \c groupgraph element which represents the
Packit 1c1d7e
graph showing the dependencies between groups.
Packit 1c1d7e
Packit 1c1d7e
Similarly, the directory page has a specific \c directorygraph element 
Packit 1c1d7e
which represents the graph showing the dependencies between the directories 
Packit 1c1d7e
based on the \#include relations of the files inside the directories.
Packit 1c1d7e
Packit 1c1d7e
Some elements have a \c visible attribute which can be 
Packit 1c1d7e
used to hide the fragment from the generated output, by setting the attribute's
Packit 1c1d7e
value to "no". You can also use the value of a configuration option to 
Packit 1c1d7e
determine the visibility, by using 
Packit 1c1d7e
its name prefixed with a dollar sign, e.g.
Packit 1c1d7e
\verbatim
Packit 1c1d7e
  ...
Packit 1c1d7e
  <includes visible="$SHOW_INCLUDE_FILES"/>
Packit 1c1d7e
  ...
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
This was mainly added for backward compatibility.
Packit 1c1d7e
Note that the \c visible attribute is just a hint for doxygen. 
Packit 1c1d7e
If no relevant information is available for a certain piece it is 
Packit 1c1d7e
omitted even if it is set to \c yes (i.e. no empty sections are generated). 
Packit 1c1d7e
Packit 1c1d7e
Some elements have a \c title attribute. This attribute can be used
Packit 1c1d7e
to customize the title doxygen will use as a header for the piece.
Packit 1c1d7e
Packit 1c1d7e
@warning at the moment you should not remove elements from the layout file
Packit 1c1d7e
as a way to hide information. Doing so can cause broken links in the 
Packit 1c1d7e
generated output!
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
\section xmlgenerator Using the XML output
Packit 1c1d7e
Packit 1c1d7e
If the above two methods still do not provide enough flexibility, you
Packit 1c1d7e
can also use the XML output produced by doxygen as a basis to
Packit 1c1d7e
generate the output you like. To do this set GENERATE_XML to YES.
Packit 1c1d7e
Packit 1c1d7e
The XML output consists of an index file named \c index.xml which
Packit 1c1d7e
lists all items extracted by doxygen with references to the other XML files
Packit 1c1d7e
for details. The structure of the index is described by a schema file
Packit 1c1d7e
\c index.xsd. All other XML files are described by the schema file 
Packit 1c1d7e
named \c compound.xsd. If you prefer one big XML file 
Packit 1c1d7e
you can combine the index and the other files using the 
Packit 1c1d7e
XSLT file \c combine.xslt.
Packit 1c1d7e
Packit 1c1d7e
You can use any XML parser to parse the file or use the one that can be found
Packit 1c1d7e
in the \c addon/doxmlparser directory of doxygen source distribution. 
Packit 1c1d7e
Look at \c addon/doxmlparser/include/doxmlintf.h for the interface of the
Packit 1c1d7e
parser and in \c addon/doxmlparser/example for examples.
Packit 1c1d7e
Packit 1c1d7e
The advantage of using the doxmlparser is that it
Packit 1c1d7e
will only read the index file into memory and then only those XML 
Packit 1c1d7e
files that you implicitly load via navigating through the index. As a 
Packit 1c1d7e
result this works even for very large projects where reading all XML
Packit 1c1d7e
files as one big DOM tree would not fit into memory.
Packit 1c1d7e
Packit 1c1d7e
See the Breathe project for
Packit 1c1d7e
an example that uses doxygen XML output from Python to bridge it with the 
Packit 1c1d7e
Sphinx document generator.
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
\htmlonly
Packit 1c1d7e
Go to the next section or return to the
Packit 1c1d7e
 index.
Packit 1c1d7e
\endhtmlonly
Packit 1c1d7e
Packit 1c1d7e
 */