To do this first run doxygen as follows:
doxygen -w html header.html footer.html customdoxygen.css
This will create 3 files:
You should edit these files and then reference them from the config file.
HTML_HEADER = header.html HTML_FOOTER = footer.html HTML_STYLESHEET = customdoxygen.css
See the documentation of the HTML_HEADER tag for more information about the possible meta commands.
If you use images or other external content in a custom header you need to make sure these end up in the HTML output directory yourself, for instance by writing a script that runs doxygen can then copies the images to the output.
The solution doxygen provides is a layout file, which you can modify and doxygen will use to control what information is presented, in which order, and to some extent also how information is presented. The layout file is an XML file.
The default layout can be generated by doxygen using the following command:
doxygen -l
DoxygenLayout.xml
will be used.The toplevel structure of the file looks as follows:
<doxygenlayout version="1.0"> <navindex> ... </navindex> <class> ... </class> <namespace> ... </namespace> <file> ... </file> <group> ... </group> <directory> ... </directory> </doxygenlayout>
The root tag of the XML is doxygenlayout
, it has an attribute named version
, which will be used in the future to cope with changes that are not backward compatible.
The first section, enclosed by navindex
tags represents the layout of the navigation tabs displayed at the top of each HTML page. Each tab is represented by a tab
tag in the XML file.
You can hide tabs by setting the visible
attribute to no
. You can also override the default title of a tab by specifying it as the value of the title
attribute. If the title field is the empty string (the default) then doxygen will fill in an appropriate title. You can reorder the tabs by moving the tab tags in the XML file within the navindex
section and even change the tree structure. Do not change the value of the type
attribute however. Only a fixed set of types are supported, each representing a link to a specific index.
The sections after navindex
represent the layout of the different pages generated by doxygen:
class
section represents the layout of all pages generated for documented classes, structs, unions, and interfaces.namespace
section represents the layout of all pages generated for documented namespaces (and also Java packages).file
section represents the layout of all pages generated for documented files.group
section represents the layout of all pages generated for documented groups (or modules).directory
section represents the layout of all pages generated for documented directories.Each XML tag within one of the above page sections represents a certain piece of information. Some pieces can appear in each type of page, others are specific for a certain type of page. Doxygen will list the pieces in the order in which they appear in the XML file.
Some tags have a visible
attribute which can be used to hide the fragment from the generated output, by setting the attribute's value to "no". You can also use the value of a configuration option to determine the visibility, by using its name prefixed with a dollar sign, e.g.
... <includes visible="$SHOW_INCLUDE_FILES"/> ...
visible
attribute is just a hint for doxygen. If no relevant information is available for a certain piece it is omitted even if it is set to yes
(i.e. no empty sections are generated).
Some tags have a title
attribute. This attribute can be used to customize the title doxygen will use as a header for the piece.
briefdescription
detaileddescription
authorsection
memberdecl
memberdef
memberdecl
tag, also this tag has a number of possible child tags. The class page has the following specific tags:
includes
inheritancegraph
collaborationgraph
allmemberslink
usedfiles
The file page has the following specific tags:
includes
includegraph
includedbygraph
sourcelink
The group page has a specific groupgraph
tag which represents the graph showing the dependencies between groups.
Similarily, the directory page has a specific directorygraph
tag which represents the graph showing the dependencies between the directories based on the #include relations of the files inside the directories.
The XML output consists of an index file named index.xml
which lists all items extracted by doxygen with references to the other XML files for details. The structure of the index is described by a schema file index.xsd
. All other XML files are described by the schema file named compound.xsd
. If you prefer one big XML file you can combine the index and the other files using the XSLT file combine.xslt
.
You can use any XML parser to parse the file or use the one that can be found in the addon/doxmlparser
directory of doxygen source distribution. Look at addon/doxmlparser/include/doxmlintf.h
for the interface of the parser and in addon/doxmlparser/example
for examples.
The advantage of using the doxmlparser is that it will only read the index file into memory and then only those XML files that you implicitly load via navigating through the index. As a result this works even for very large projects where reading all XML files as one big DOM tree would not fit into memory.