]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/hthelpct.tex
initial commit
[wxWidgets.git] / docs / latex / wx / hthelpct.tex
1 %
2 % automatically generated by HelpGen from
3 % htmlhelp.h at 02/May/99 19:58:53
4 %
5
6
7 \section{\class{wxHtmlHelpController}}\label{wxhtmlhelpcontroller}
8
9 {\bf WARNING! This help controller has API incompatible with wxWindows
10 wxHelpController!}
11
12 This help controller provides easy way how to display HTML help in your
13 application (see {\it test} sample). Whole help system is based on {\bf books}
14 (see \helpref{AddBook}{wxhtmlhelpcontrolleraddbook}). A book is logical
15 part of documentation (for example "User's Guide" or "Programmer's Guide" or
16 "C++ Reference" or "wxWindows Reference"). Help controller can handle as
17 many books as you want.
18
19 wxHTML uses Microsoft's HTML Help Workshop project files (.hhp, .hhk, .hhc) as its
20 native format. The file format is described \helpref{here}{helpformat}.
21 Have a look at docs/html/ directory where sample project files are stored.
22
23 You can use tex2rtf to generate MHHW projects (see wxHTML homepage for details).
24
25 In order to use the controller in your application under Windows you must
26 have following line in your .rc file:
27
28 \begin{verbatim}
29 #include "wx/html/msw/wxhtml.rc"
30 \end{verbatim}
31
32
33 \wxheading{Derived from}
34
35 wxEvtHandler
36
37
38 \latexignore{\rtfignore{\wxheading{Members}}}
39
40
41 \membersection{wxHtmlHelpController::wxHtmlHelpController}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller}
42
43 \func{}{wxHtmlHelpController}{\void}
44
45
46 Constructor.
47
48
49 \membersection{wxHtmlHelpController::SetTitleFormat}\label{wxhtmlhelpcontrollersettitleformat}
50
51 \func{void}{SetTitleFormat}{\param{const wxString\& }{format}}
52
53 Sets format of title of the frame. Must contain exactly one "\%s"
54 (for title of displayed HTML page).
55
56
57 \membersection{wxHtmlHelpController::SetTempDir}\label{wxhtmlhelpcontrollersettempdir}
58
59 \func{void}{SetTempDir}{\param{const wxString\& }{path}}
60
61 Sets path for storing temporary files (cached binary versions of index and contents files. These binary
62 forms are much faster to read.) Default value is empty string (empty string means
63 that no cached data are stored). Note that these files are NOT
64 deleted when program exits!
65
66
67 \membersection{wxHtmlHelpController::AddBook}\label{wxhtmlhelpcontrolleraddbook}
68
69 \func{bool}{AddBook}{\param{const wxString\& }{book}, \param{bool }{show_wait_msg}}
70
71 Adds book (\helpref{.hhp file}{helpformat} - HTML Help Workshop project file) into the list of loaded books.
72 This must be called at least once before displaying any help.
73
74 If {\it show_wait_msg} is TRUE then a decorationless window with progress message is displayed.
75
76
77 \membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay}
78
79 \func{void}{Display}{\param{const wxString\& }{x}}
80
81 Displays page {\it x}. This is THE important function - it is used to display
82 the help in application.
83
84 You can specify the page in many ways:
85
86 \begin{itemize}
87 \item as direct filename of HTML document
88 \item as chapter name (from contents) or as a book name
89 \item as some word from index
90 \item even as any word (will be searched)
91 \end{itemize}
92
93 Looking for the page runs in these steps:
94
95 \begin{enumerate}
96 \item try to locate file named x (if x is for example "doc/howto.htm")
97 \item try to open starting page of book named x
98 \item try to find x in contents (if x is for example "How To ...")
99 \item try to find x in index (if x is for example "How To ...")
100 \item switch to Search panel and start searching
101 \end{enumerate}
102
103 \func{void}{Display}{\param{const int }{id}}
104
105 This alternative form is used to search help contents by numeric IDs.
106
107
108
109
110 \membersection{wxHtmlHelpController::DisplayContents}\label{wxhtmlhelpcontrollerdisplaycontents}
111
112 \func{void}{DisplayContents}{\void}
113
114 Displays help window and focuses contents panel.
115
116 \membersection{wxHtmlHelpController::DisplayIndex}\label{wxhtmlhelpcontrollerdisplayindex}
117
118 \func{void}{DisplayIndex}{\void}
119
120 Displays help window and focuses index panel.
121
122
123 \membersection{wxHtmlHelpController::KeywordSearch}\label{wxhtmlhelpcontrollerkeywordsearch}
124
125 \func{bool}{KeywordSearch}{\param{const wxString\& }{keyword}}
126
127 Displays help window, focuses search panel and starts searching.
128 Returns TRUE if the keyword was found.
129
130 IMPORTANT! KeywordSearch searches only pages listed in .htc file(s)!
131 (you should have all pages in contents file...)
132
133
134 \membersection{wxHtmlHelpController::UseConfig}\label{wxhtmlhelpcontrolleruseconfig}
135
136 \func{void}{UseConfig}{\param{wxConfigBase* }{config}, \param{const wxString\& }{rootpath = wxEmptyString}}
137
138 Associates {\it config} object with the controller.
139
140 If there is associated config object, wxHtmlHelpController automatically
141 reads and writes settings (including wxHtmlWindow's settings) when needed.
142
143 The only thing you must do is create wxConfig object and call UseConfig.
144
145
146 \membersection{wxHtmlHelpController::ReadCustomization}\label{wxhtmlhelpcontrollerreadcustomization}
147
148 \func{void}{ReadCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}
149
150 Reads controllers setting (position of window etc.)
151
152
153 \membersection{wxHtmlHelpController::WriteCustomization}\label{wxhtmlhelpcontrollerwritecustomization}
154
155 \func{void}{WriteCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}
156
157 Stores controllers setting (position of window etc.)
158