DoxyPress
1.7.0
|
The section discusses how to adjust various tags in the project file to change the look of the generated documentation.
To change the colors of the HTML output alter the following three options to change the hue, saturation, and gamma correction of the colors. DoxyPressApp has a control which allows you to view the effect of changing the values of these options on the output in real time.
By default the navigation tabs will appear on the top of every HTML page, corresponding to the following tag settings:
NO
NO
You can switch to an interactive navigation tree as sidebar using the following tag settings:
YES
YES
To have both forms of navigation use the following tag settings:
NO
YES
If you created an external index or have one of the following options enabled,
generate-chm, generate-eclipse generate-qthelp generate-docset
then you may want to disable all index files as follows:
YES
NO
To make the HTML output more interactive DoxyPress provides a number of options which are disabled by default:
svg
, will produce SVG images which will allow the user to zoom and pan. This only happens when the size of the images exceeds a certain size.Fonts, colors, margins, and other aspects of the HTML output can be modified by adding one or more custom CSS or stylesheet files. For details about how to generate the DoxyPress default files ref to Headers, Footers, Stylesheets.
doxy_header.html
doxy_footer.html
doxypress.css
If you use images or other external content in a custom header, ensure these files are in the HTML output directory. For example, writ a script which runs DoxyPress and then copies the images to the output directory.
The Layout file controls the structure of the documentation. To change the output structure the sections can be rearranged and the section titles can be modified. If a section should be omitted change the visible attribute to no. Do not delete elements in this file.
This file controls what information is presented, in which order, the navigation section title names, etc. The layout file is an XML file.
For details about how to generate the DoxyPress default layout file ref to Layout File.
The layout file name must be specified in your project file so DoxyPress will know to override the internal layout file. The project tag to change is layout-file.
The first section of the layout file is the <navindex>
element. This section represents the layout of the navigation tabs displayed at the top of each HTML page. It also controls the items in the navigation tree if generate-treeview is enabled. Each tab is represented by a tab
element.
Tabs can be hidden by setting the visible
attribute to NO
.
You can override the default title of a tab by specifying it as the value of the title
attribute. If the title field is empty then DoxyPress will fill in an appropriate language specific title.
Do not change the value of the type
attribute.
Tabs can be reorder by moving the tab elements in the XML file within the navindex
element. Only a fixed set of tab types are supported, each representing a link to a specific index.
You can also add custom tabs using a type with name "user". The following is an example which shows how to add a tab with title "Google" pointing to www.google.com:
<navindex> ... <tab type="user" url="https://www.google.com" title="Google"/> ... </navindex>
The url field can be a relative URL. If the URL starts with @ref the link will point to documented entities, such as a class, function, group, or a related page. Suppose we have defined a page using @page with label mypage and a tab with label "My Page". The xml would look like the following:
<navindex> ... <tab type="user" url="@ref mypage" title="My Page"/> ... </navindex>
You can also group tabs together in a custom group using a tab with type "usergroup". The following example puts the above tabs in a user defined group with title "My Group":
<navindex> ... <tab type="usergroup" title="My Group"> <tab type="user" url="https://www.google.com" title="Google"/> <tab type="user" url="@ref mypage" title="My Page"/> </tab> ... </navindex>
Groups can be nested to form a hierarchy.
By default a usergroup entry in the navigation tree is a link to a landing page with the contents of the group. You can link to a different page using the url
attribute just like you can for the <tab>
element and prevent any link using url="[none]"
.
<tab type="usergroup" title="Group without link" url="[none]"> ... </tab>
The elements after the navindex
section represent the layout of the different pages generated by DoxyPress.
class
element represents the layout of all pages generated for documented classes, structs, unions, and interfaces.namespace
element represents the layout of all pages generated for documented namespaces (and also Java packages).file
element represents the layout of all pages generated for documented files.group
element represents the layout of all pages generated for documented groups (or modules).directory
element represents the layout of all pages generated for documented directories.Each XML element within one of the above page elements represents a certain piece of information. Some pieces can appear in each type of page, others are specific for a certain type of page. DoxyPress will list the sections in the order in which they appear in the XML file.
The following generic elements are possible for each page:
memberdecl
element, also this element has a number of possible child elements. The class page has the following specific elements:
The file page has the following specific elements:
The group page has a specific groupgraph
element which represents the graph showing the dependencies between groups.
The directory page has a specific directorygraph
element which represents the graph showing the dependencies between the directories based on the #include relations of the files inside the directories.
Some XML elements have a visible
attribute which can be used to hide the fragment from the generated output. This is done by setting the attribute value to "no".
Alternatively, set the visible attribute in your layout file file to the name of a project file tag prefixed with a dollar sign.
... <includes visible="$SHOW-INCLUDE-FILES"/> ...
Some elements have a title
attribute. This attribute can be used to customize the title DoxyPress will use as a header for the fragment
You can also use the XML output produced by DoxyPress as a basis to generate the output you like. To do this set GENERATE-XML to YES.
The XML output consists of an index file named index.xml
which lists all items extracted by DoxyPress 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 parser released with DoxyPress. The file is called doxmlparser. Review the file doxmlintf.h for the interface of the parser.
The advantage of using the doxmlparser is that it will only read the index file into memory and then only those XML files 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 large DOM tree would not fit into memory.