wxWidgets/docs/latex/wx/htmlhlpf.tex
Julian Smart 22d6efa851 Cured some bugs/typos/spacing in docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-08-05 22:05:15 +00:00

83 lines
2.4 KiB
TeX

\membersection{Help Files Format}\label{helpformat}
wxHTML library uses a reduced version of MS HTML Workshop format.
(See \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} for help controller description.)
A {\bf book} consists of three files : header file, contents file and index file.
\wxheading{Header file (.hhp)}
Header file must contain these lines (and may contain additional lines which are ignored) :
\begin{verbatim}
Contents file=@filename.hhc@
Index file=@filename.hhk@
Title=@title of your book@
Default topic=@default page to be displayed.htm@
\end{verbatim}
All filenames (including Default topic) are relative to the location of .hhp file.
For larger projects I recommend storing everything but .hhp file into one .zip archive. (E.g. contents file
would then be reffered as myhelp.zip\#zip:contents.hhc)
\wxheading{Contents file (.hhc)}
Contents file has HTML syntax and it can be parsed by regular HTML parser. It contains exactly one list
(<ul>....</ul> statement):
\begin{verbatim}
<ul>
<li> <object>
<param name="Name" value="@topic name@">
<param name="ID" value=@numeric_id@>
<param name="Local" value="@filename.htm@">
</object>
<li> <object>
<param name="Name" value="@topic name@">
<param name="ID" value=@numeric_id@>
<param name="Local" value="@filename.htm@">
</object>
...
</ul>
\end{verbatim}
You can modify value attributes of param tags. {\it topic name} is name of chapter/topic as is displayed in
contents, {\it filename.htm} is HTML page name (relative to .hhp file) and {\it numeric_id} is optional
- it is used only when you use \helpref{wxHtmlHelpController::Display(int)}{wxhtmlhelpcontrollerdisplay}
Items in the list may be nested - one \<li\> statement may contain \<ul\> sub-statement:
\begin{verbatim}
<ul>
<li> <object>
<param name="Name" value="Top node">
<param name="Local" value="top.htm">
</object>
<ul>
<li> <object>
<param name="Name" value="subnode in topnode">
<param name="Local" value="subnode1.htm">
</object>
...
</ul>
<li> <object>
<param name="Name" value="Another Top">
<param name="Local" value="top2.htm">
</object>
...
</ul>
\end{verbatim}
\wxheading{Index file (.hhk)}
Index files have same format as contents file except that ID params are ignored and sublists are {\bf not}
allowed.