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