doxygen_manual-1.8.1 (1035109), страница 16
Текст из файла (страница 16)
using a file:// URL) and that it does not provide live searchcapabilities.3. Windows Compiled HTML HelpIf you are running doxygen on Windows, then you can make a compiled HTML Help file (.chm) out of the HTML filesproduced by doxygen. This is a single file containing all HTML files and it also includes a search index. There areviewers for this format on many platforms, and Windows even supports it natively.To enable this set GENERATE_HTMLHELP to YES in the config file.
To let doxygen compile the HTML Help filefor you, you also need to specify the path to the HTML compiler (hhc.exe) using the HHC_LOCATION config optionand the name of the resulting CHM file using CHM_FILE.66SearchingAn advantage of this method is that the result is a single file that can easily be distributed. It also provides full textsearch.Disadvantages are that compiling the CHM file only works on Windows and requires Microsoft’s HTML compiler,which is not very actively supported by Microsoft. Although the tool works fine for most people, it can sometimescrash for no apparent reason (how typical).4.
Mac OS X Doc SetsIf you are running doxygen on Mac OS X 10.5 or higher, then you can make a "doc set" out of the HTML files produced by doxygen. A doc set consists of a single directory with a special structure containing the HTML files alongwith a precompiled search index. A doc set can be embedded in Xcode (the integrated development environmentprovided by Apple).To enable the creation of doc sets set GENERATE_DOCSET to YES in the config file.
There are a couple of otherdoc set related options you may want to set. After doxygen has finished you will find a Makefile in the HTML outputdirectory. Running "make install" on this Makefile will compile and install the doc set. See this article formore info.Advantage of this method is that it nicely integrates with the Xcode development environment, allowing for instanceto click on an identifier in the editor and jump to the corresponding section in the doxygen documentation.Disadvantage is that it only works in combination with Xcode on MacOSX.5. Qt Compressed HelpIf you develop for or want to install the Qt application framework, you will get an application called Qt assistant.This is a help viewer for Qt Compressed Help files (.qch).To enable this feature set GENERATE_QHP to YES.
You also need to fill in the other Qt help related options, suchas QHP_NAMESPACE, QHG_LOCATION, QHP_VIRTUAL_FOLDER. See this article for more info.Feature wise the Qt compressed help feature is comparable with the CHM output, with the additional advantagethat compiling the QCH file is not limited to Windows.Disadvantage is that it requires setting up a Qt 4.5 (or better) for each user, or distributing the Qt help assistantalong with the documentation, which is complicated by the fact that it is not available as a separate package at thismoment.6. Eclipse Help PluginIf you use eclipse, you can embed the documentation generated by doxygen as a help plugin. It will then appearas a topic in the help browser that can be started from "Help contents" in the Help menu.
Eclipse will generate asearch index for the documentation when you first search for an keyword.To enable the help plugin set GENERATE_ECLIPSEHELP to YES, and define a unique identifier for your projectvia ECLIPSE_DOC_ID, i.e.:GENERATE_ECLIPSEHELP = YESECLIPSE_DOC_ID= com.yourcompany.yourprojectthen create the com.yourcompany.yourproject directory (so with the same name as the value of ECLIPSE_DOC_ID) in the plugin directory of eclipse and after doxygen completes copy to contents of the help outputdirectory to the com.yourcompany.yourproject directory.
Then restart eclipse to make let it find the newplugin.The eclipse help plugin provides similar functionality as the Qt compressed help or CHM output, but it does requirethat Eclipse is installed and running.Generated by DoxygenChapter 12Customizing the OutputDoxygen provides various levels of customization. The section Minor Tweaks discusses what to do if you want todo minor tweaking to the look and feel of the output.
The section Layout show how to reorder and hide certaininformation on a page. The section XML output show how to generate whatever output you want based on the XMLoutput produced by doxygen.12.1Minor TweaksThe next subsections describe some aspects that can be tweaked with little effort.12.1.1Overall ColorTo change the overall color of the HTML output doxygen provides three options• HTML_COLORSTYLE_HUE• HTML_COLORSTYLE_SAT• HTML_COLORSTYLE_GAMMAto change the hue, saturation, and gamma correction of the colors respectively.For your convenience the GUI frontend Doxywizard has a control that allows you to see the effect of changing thevalues of these options on the output in real time.12.1.2NavigationBy default doxygen shows navigation tabs on top of every HTML page, corresponding with the following settings:• DISABLE_INDEX = NO• GENERATE_TREEVIEW = NOyou can switch to an interactive navigation tree as sidebar using• DISABLE_INDEX = YES• GENERATE_TREEVIEW = YESor even have both forms of navigation:68Customizing the Output• DISABLE_INDEX = NO• GENERATE_TREEVIEW = YESif you already use an external index (i.e.
have one of the following options enabled GENERATE_HTMLHELP, GENERATE_ECLIPSEHELP, GENERATE_QHP, or GENERATE_DOCSET) then you can also disable all indices, likeso:• DISABLE_INDEX = YES• GENERATE_TREEVIEW = NO12.1.3Dynamic ContentTo make the HTML output more interactive, doxygen provides a number of options that are disabled by default:• enabling HTML_DYNAMIC_SECTIONS will make doxygen hide certain content (like graphs) in the HTML bydefault, and let the reader expand these sections on request.• enabling HAVE_DOT along with INTERACTIVE_SVG while setting DOT_IMAGE_FORMAT to svg, willmake doxygen produce SVG images that will allow the user to zoom and pan (this only happens when thesize of the images exceeds a certain size).12.1.4Header, Footer, and Stylesheet changesTo tweak things like fonts or colors, margins, or other look & feel aspects of the HTML output in detail, you cancreate a different cascading style sheet.
You can also let doxygen use a custom header and footer foreach HTML page it generates, for instance to make the output conform to the style used on the rest of your website.To do this first run doxygen as follows:doxygen -w html header.html footer.html customdoxygen.cssThis will create 3 files:• header.html is a HTML fragment which doxygen normally uses to start a HTML page.
Note that the fragmentends with a body tag and that is contains a couple of commands of the form $word. These will be replacedby doxygen on the fly.• 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.• customdoxygen.css is the default cascading style sheet used by doxygen.You should edit these files and then reference them from the config file.• HTML_HEADER = header.html• HTML_FOOTER = footer.html• HTML_STYLESHEET = customdoxygen.cssSee the documentation of the HTML_HEADER tag for more information about the possible meta commands youcan use inside your custom header.Generated by Doxygen12.2 Changing the layout of pages69NoteYou should not put the style sheet in the HTML output directory.
Treat it as a source file. Doxygen will copy itfor you.If you use images or other external content in a custom header you need to make sure these end up in theHTML output directory yourself, for instance by writing a script that runs doxygen can then copies the imagesto the output.WarningThe structure of headers and footers may change after upgrading to a newer version of doxygen, so if you areusing a custom header or footer, it might not produce valid output anymore after upgrading.12.2Changing the layout of pagesIn some cases you may want to change the way the output is structured. A different style sheet or custom headersand footers do not help in such case.The solution doxygen provides is a layout file, which you can modify and doxygen will use to control what informationis 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 -loptionally the name of the layout file can be specified, if omitted DoxygenLayout.xml will be used.The next step is to mention the layout file in the config fileLAYOUT_FILE = DoxygenLayout.xmlTo change the layout all you need to do is edit the layout file.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 element of the XML file is doxygenlayout, it has an attribute named version, which will be used inthe future to cope with changes that are not backward compatible.The first section, identified by the navindex element, represents the layout of the navigation tabs displayed at thetop of each HTML page.
At the same time it also controls the items in the navigation tree in case GENERATE_TREEVIEW is enabled. Each tab is represented by a tab element 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 byspecifying it as the value of the title attribute. If the title field is the empty string (the default) then doxygen willfill in an appropriate language specific title.Generated by Doxygen70Customizing the OutputYou can reorder the tabs by moving the tab elements in the XML file within the navindex element and evenchange the tree structure. Do not change the value of the type attribute however.