]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/hthelpct.tex
Added RTLD_GLOBAL to dlopen() flags which is needed if libraries depend
[wxWidgets.git] / docs / latex / wx / hthelpct.tex
... / ...
CommitLineData
1%
2% automatically generated by HelpGen from
3% htmlhelp.h at 02/May/99 19:58:53
4%
5
6\section{\class{wxHtmlHelpController}}\label{wxhtmlhelpcontroller}
7
8{\bf WARNING!} Although this class has an API compatible with other wxWindows
9help controllers as documented by \helpref{wxHelpController}{wxhelpcontroller}, it
10is recommended that you use the enhanced capabilities of wxHtmlHelpController's API.
11
12This help controller provides an easy way of displaying HTML help in your
13application (see {\it test} sample). The help system is based on {\bf books}
14(see \helpref{AddBook}{wxhtmlhelpcontrolleraddbook}). A book is a logical
15section of documentation (for example "User's Guide" or "Programmer's Guide" or
16"C++ Reference" or "wxWindows Reference"). The help controller can handle as
17many books as you want.
18
19wxHTML uses Microsoft's HTML Help Workshop project files (.hhp, .hhk, .hhc) as its
20native format. The file format is described \helpref{here}{helpformat}.
21Have a look at docs/html/ directory where sample project files are stored.
22
23You can use Tex2RTF to produce these files when generating HTML, if you set {\bf htmlWorkshopFiles} to {\bf true} in
24your tex2rtf.ini file.
25
26In order to use the controller in your application under Windows you must
27have the following line in your .rc file:
28
29\begin{verbatim}
30#include "wx/html/msw/wxhtml.rc"
31\end{verbatim}
32
33\wxheading{Note}
34
35It is strongly recommended to use preprocessed {\bf .hhp.cached} version of
36projects. It can be either created on-the-fly (see
37\helpref{SetTempDir}{wxhtmlhelpcontrollersettempdir}) or you can use
38{\bf hhp2cached} utility from {\it utils/hhp2cached} to create it and
39distribute the cached version together with helpfiles. See {\it samples/html/help}
40sample for demonstration of its use.
41
42\wxheading{Derived from}
43
44wxHelpControllerBase
45
46\wxheading{Include files}
47
48<wx/html/helpctrl.h>
49
50\latexignore{\rtfignore{\wxheading{Members}}}
51
52\membersection{wxHtmlHelpController::wxHtmlHelpController}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller}
53
54\func{}{wxHtmlHelpController}{\param{int }{style = wxHF\_DEFAULTSTYLE}}
55
56Constructor.
57
58\wxheading{Parameters}
59
60{\it style} is combination of these flags:
61
62\begin{twocollist}\itemsep=0pt
63\twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.}
64\twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.}
65\twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.}
66\twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.}
67\twocolitem{\windowstyle{wxHF\_BOOKMARKS}}{Help frame has bookmarks controls.}
68\twocolitem{\windowstyle{wxHF\_OPENFILES}}{Allow user to open arbitrary HTML document.}
69\twocolitem{\windowstyle{wxHF\_PRINT}}{Toolbar contains "print" button.}
70\end{twocollist}
71
72Default value: everything but wxHF\_OPENFILES enabled.
73
74\membersection{wxHtmlHelpController::AddBook}\label{wxhtmlhelpcontrolleraddbook}
75
76\func{bool}{AddBook}{\param{const wxString\& }{book}, \param{bool }{show\_wait\_msg}}
77
78Adds book (\helpref{.hhp file}{helpformat} - HTML Help Workshop project file) into the list of loaded books.
79This must be called at least once before displaying any help.
80
81{\it book} may be either .hhp file or ZIP archive that contains arbitrary number of .hhp files in
82top-level directory. This ZIP archive must have .zip or .htb extension
83(the latter stands for "HTML book"). In other words, {\tt AddBook("help.zip")} is possible and, in fact,
84recommended way.
85
86If {\it show\_wait\_msg} is TRUE then a decorationless window with progress message is displayed.
87
88\membersection{wxHtmlHelpController::CreateHelpFrame}\label{wxhtmlhelpcontrollercreatehelpframe}
89
90\func{virtual wxHtmlHelpFrame*}{CreateHelpFrame}{\param{wxHtmlHelpData * }{data}}
91
92This protected virtual method may be overriden so that the controller
93uses slightly different frame. See {\it samples/html/helpview} sample for
94an example.
95\membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay}
96
97\func{void}{Display}{\param{const wxString\& }{x}}
98
99Displays page {\it x}. This is THE important function - it is used to display
100the help in application.
101
102You can specify the page in many ways:
103
104\begin{itemize}\itemsep=0pt
105\item as direct filename of HTML document
106\item as chapter name (from contents) or as a book name
107\item as some word from index
108\item even as any word (will be searched)
109\end{itemize}
110
111Looking for the page runs in these steps:
112
113\begin{enumerate}\itemsep=0pt
114\item try to locate file named x (if x is for example "doc/howto.htm")
115\item try to open starting page of book named x
116\item try to find x in contents (if x is for example "How To ...")
117\item try to find x in index (if x is for example "How To ...")
118\item switch to Search panel and start searching
119\end{enumerate}
120
121\func{void}{Display}{\param{const int }{id}}
122
123This alternative form is used to search help contents by numeric IDs.
124
125\pythonnote{The second form of this method is named DisplayId in
126wxPython.}
127
128\membersection{wxHtmlHelpController::DisplayContents}\label{wxhtmlhelpcontrollerdisplaycontents}
129
130\func{void}{DisplayContents}{\void}
131
132Displays help window and focuses contents panel.
133
134\membersection{wxHtmlHelpController::DisplayIndex}\label{wxhtmlhelpcontrollerdisplayindex}
135
136\func{void}{DisplayIndex}{\void}
137
138Displays help window and focuses index panel.
139
140\membersection{wxHtmlHelpController::KeywordSearch}\label{wxhtmlhelpcontrollerkeywordsearch}
141
142\func{bool}{KeywordSearch}{\param{const wxString\& }{keyword}}
143
144Displays help window, focuses search panel and starts searching.
145Returns TRUE if the keyword was found.
146
147{\bf Important:} KeywordSearch searches only pages listed in .htc file(s).
148You should list all pages in the contents file.
149
150\membersection{wxHtmlHelpController::ReadCustomization}\label{wxhtmlhelpcontrollerreadcustomization}
151
152\func{void}{ReadCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}
153
154Reads the controller's setting (position of window, etc.)
155
156\membersection{wxHtmlHelpController::SetTempDir}\label{wxhtmlhelpcontrollersettempdir}
157
158\func{void}{SetTempDir}{\param{const wxString\& }{path}}
159
160Sets the path for storing temporary files - cached binary versions of index and contents files. These binary
161forms are much faster to read. Default value is empty string (empty string means
162that no cached data are stored). Note that these files are {\it not}
163deleted when program exits.
164
165Once created these cached files will be used in all subsequent executions
166of your application. If cached files become older than corresponding .hhp
167file (e.g. if you regenerate documentation) it will be refreshed.
168
169\membersection{wxHtmlHelpController::SetTitleFormat}\label{wxhtmlhelpcontrollersettitleformat}
170
171\func{void}{SetTitleFormat}{\param{const wxString\& }{format}}
172
173Sets format of title of the frame. Must contain exactly one "\%s"
174(for title of displayed HTML page).
175
176\membersection{wxHtmlHelpController::UseConfig}\label{wxhtmlhelpcontrolleruseconfig}
177
178\func{void}{UseConfig}{\param{wxConfigBase* }{config}, \param{const wxString\& }{rootpath = wxEmptyString}}
179
180Associates {\it config} object with the controller.
181
182If there is associated config object, wxHtmlHelpController automatically
183reads and writes settings (including wxHtmlWindow's settings) when needed.
184
185The only thing you must do is create wxConfig object and call UseConfig.
186
187If you do not use {\it UseConfig}, wxHtmlHelpController will use
188default wxConfig object if available (for details see
189\helpref{wxConfigBase::Get}{wxconfigbaseget} and
190\helpref{wxConfigBase::Set}{wxconfigbaseset}).
191
192\membersection{wxHtmlHelpController::WriteCustomization}\label{wxhtmlhelpcontrollerwritecustomization}
193
194\func{void}{WriteCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}
195
196Stores controllers setting (position of window etc.)
197