Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > bbf8b69a7c5792df8049c96b78d19811 > files > 743

doxygen-1.7.4-2.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Doxygen manual: Customizing the output</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Doxygen manual</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Customizing the output </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>Doxygen provides various levels of customization. The <a class="el" href="customize.html#minor_tweaks">first section</a> discusses what to do if you want to do minor tweaking to the look and feel of the output. The <a class="el" href="customize.html#layout">next</a> section show how to reorder and hide certain information on a page. The <a class="el" href="customize.html#xmlgenerator">last</a> section show how to generate whatever output you want based on the XML output produced by doxygen.</p>
<h2><a class="anchor" id="minor_tweaks"></a>
Minor Tweaks</h2>
<p>To simply tweak things like fonts or colors, margins, or other look &amp; feel expects of the HTML output you can create a different <a href="http://www.w3schools.com/css/default.asp">cascading style sheet</a>. You can also let doxygen use a custom header and footer for each HTML page it generates, for instance to include a logo or to make the doxygen output blend in with the rest of the web site.</p>
<p>To do this first run doxygen as follows: </p>
<div class="fragment"><pre class="fragment">
doxygen -w html header.html footer.html customdoxygen.css 
</pre></div><p>This will create 3 files:</p>
<ul>
<li>header.html is a HTML fragment which doxygen normally uses to start a HTML page. Note that the fragment ends with a body tag and that is contains a couple of commands of the form $word. These will be replaced by doxygen on the fly.</li>
<li>footer.html is a HTML fragment which doxygen normally uses to end a HTML page. Also here special commands can be used. This file contain the link to www.doxygen.org and the body and html end tags.</li>
<li>customdoxygen.css is the default cascading style sheet used by doxygen.</li>
</ul>
<p>You should edit these files and then reference them from the config file. </p>
<div class="fragment"><pre class="fragment">
HTML_HEADER      = header.html
HTML_FOOTER      = footer.html
HTML_STYLESHEET  = customdoxygen.css
</pre></div><p>See the documentation of the <a class="el" href="config.html#cfg_html_header">HTML_HEADER</a> tag for more information about the possible meta commands.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>You should not put the style sheet in the HTML output directory. Treat it is a source file. Doxygen will copy it for you.</dd>
<dd>
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.</dd></dl>
<h2><a class="anchor" id="layout"></a>
Changing the layout of pages</h2>
<p>In some cases you may want to change the way the output is structured. A different style sheet or custom headers and footers do not help in such case.</p>
<p>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.</p>
<p>The default layout can be generated by doxygen using the following command: </p>
<div class="fragment"><pre class="fragment">
doxygen -l 
</pre></div><p> optionally the name of the layout file can be specified, if omitted <code>DoxygenLayout.xml</code> will be used.</p>
<p>The next step is to mention the layout file in the config file </p>
<div class="fragment"><pre class="fragment">
LAYOUT_FILE = DoxygenLayout.xml
</pre></div><p> The change the layout all you need to do is edit the layout file.</p>
<p>The toplevel structure of the file looks as follows: </p>
<div class="fragment"><pre class="fragment">
&lt;doxygenlayout version="1.0"&gt;
  &lt;navindex&gt;
    ...
  &lt;/navindex&gt;
  &lt;class&gt;
    ...
  &lt;/class&gt;
  &lt;namespace&gt;
    ...
  &lt;/namespace&gt;
  &lt;file&gt;
    ...
  &lt;/file&gt;
  &lt;group&gt;
    ...
  &lt;/group&gt;
  &lt;directory&gt;
    ...
  &lt;/directory&gt;
&lt;/doxygenlayout&gt;
</pre></div><p>The root tag of the XML is <code>doxygenlayout</code>, it has an attribute named <code>version</code>, which will be used in the future to cope with changes that are not backward compatible.</p>
<p>The first section, enclosed by <code>navindex</code> tags represents the layout of the navigation tabs displayed at the top of each HTML page. Each tab is represented by a <code>tab</code> tag in the XML file.</p>
<p>You can hide tabs by setting the <code>visible</code> attribute to <code>no</code>. You can also override the default title of a tab by specifying it as the value of the <code>title</code> 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 <code>navindex</code> section and even change the tree structure. Do not change the value of the <code>type</code> attribute however. Only a fixed set of types are supported, each representing a link to a specific index.</p>
<p>The sections after <code>navindex</code> represent the layout of the different pages generated by doxygen:</p>
<ul>
<li>The <code>class</code> section represents the layout of all pages generated for documented classes, structs, unions, and interfaces.</li>
<li>The <code>namespace</code> section represents the layout of all pages generated for documented namespaces (and also Java packages).</li>
<li>The <code>file</code> section represents the layout of all pages generated for documented files.</li>
<li>The <code>group</code> section represents the layout of all pages generated for documented groups (or modules).</li>
<li>The <code>directory</code> section represents the layout of all pages generated for documented directories.</li>
</ul>
<p>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.</p>
<p>Some tags have a <code>visible</code> 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. </p>
<div class="fragment"><pre class="fragment">
  ...
  &lt;includes visible="$SHOW_INCLUDE_FILES"/&gt;
  ...
</pre></div><p> This was mainly added for backward compatibility. Note that the <code>visible</code> 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 <code>yes</code> (i.e. no empty sections are generated).</p>
<p>Some tags have a <code>title</code> attribute. This attribute can be used to customize the title doxygen will use as a header for the piece.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>at the moment you should not remove tags from the layout file as a way to hide information. Doing so can cause broken links in the generated output!</dd></dl>
<p>At the moment the following generic tags are possible for each page: </p>
<dl>
<dt><code>briefdescription</code> </dt>
<dd>Represents the brief description on a page. </dd>
<dt><code>detaileddescription</code> </dt>
<dd>Represents the detailed description on a page. </dd>
<dt><code>authorsection</code> </dt>
<dd>Represents the author section of a page (only used for man pages). </dd>
<dt><code>memberdecl</code> </dt>
<dd>Represents the quick overview of members on a page (member declarations). This tag has child tags each representing a list of members of a certain type. The possible child tags are not listed in detail in the document, but the name of the tag should be a good indication of the type of members that the tag represents. </dd>
<dt><code>memberdef</code> </dt>
<dd>Represents the detailed member list on a page (member definition). Like the <code>memberdecl</code> tag, also this tag has a number of possible child tags. </dd>
</dl>
<p>The class page has the following specific tags: </p>
<dl>
<dt><code>includes</code> </dt>
<dd>Represents the include file needed to obtain the definition for this class. </dd>
<dt><code>inheritancegraph</code> </dt>
<dd>Represents the inheritance relations for a class. Note that the CLASS_DIAGRAM option determines if the inheritance relation is a list of base and derived classes or a graph. </dd>
<dt><code>collaborationgraph</code> </dt>
<dd>Represents the collaboration graph for a class. </dd>
<dt><code>allmemberslink</code> </dt>
<dd>Represents the link to the list of all members for a class. </dd>
<dt><code>usedfiles</code> </dt>
<dd>Represents the list of files from which documentation for the class was extracted. </dd>
</dl>
<p>The file page has the following specific tags: </p>
<dl>
<dt><code>includes</code> </dt>
<dd>Represents the list of #include statements contained in this file. </dd>
<dt><code>includegraph</code> </dt>
<dd>Represents the include dependency graph for the file. </dd>
<dt><code>includedbygraph</code> </dt>
<dd>Represents the included by dependency graph for the file. </dd>
<dt><code>sourcelink</code> </dt>
<dd>Represents the link to the source code of this file. </dd>
</dl>
<p>The group page has a specific <code>groupgraph</code> tag which represents the graph showing the dependencies between groups.</p>
<p>Similarly, the directory page has a specific <code>directorygraph</code> tag which represents the graph showing the dependencies between the directories based on the #include relations of the files inside the directories.</p>
<h2><a class="anchor" id="xmlgenerator"></a>
Using the XML output</h2>
<p>If the above two methods still do not provide enough flexibility, you can also use the XML output produced by doxygen as a basis to generate the output you like. To do this set GENERATE_XML to YES.</p>
<p>The XML output consists of an index file named <code>index.xml</code> 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 <code>index.xsd</code>. All other XML files are described by the schema file named <code>compound.xsd</code>. If you prefer one big XML file you can combine the index and the other files using the XSLT file <code>combine.xslt</code>.</p>
<p>You can use any XML parser to parse the file or use the one that can be found in the <code>addon/doxmlparser</code> directory of doxygen source distribution. Look at <code>addon/doxmlparser/include/doxmlintf.h</code> for the interface of the parser and in <code>addon/doxmlparser/example</code> for examples.</p>
<p>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. </p>
</div></div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Jun 27 2011 for Doxygen manual by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>