]>
Commit | Line | Data |
---|---|---|
704a4b75 VS |
1 | % |
2 | % automatically generated by HelpGen from | |
3 | % htmlhelp.h at 02/May/99 19:58:53 | |
4 | % | |
5 | ||
704a4b75 VS |
6 | \section{\class{wxHtmlHelpController}}\label{wxhtmlhelpcontroller} |
7 | ||
22d6efa8 | 8 | {\bf WARNING! This help controller has an API incompatible with wxWindows |
704a4b75 VS |
9 | wxHelpController!} |
10 | ||
448af9a4 | 11 | This help controller provides an easy way of displaying HTML help in your |
b32c6ff0 | 12 | application (see {\it test} sample). The help system is based on {\bf books} |
448af9a4 JS |
13 | (see \helpref{AddBook}{wxhtmlhelpcontrolleraddbook}). A book is a logical |
14 | section of documentation (for example "User's Guide" or "Programmer's Guide" or | |
15 | "C++ Reference" or "wxWindows Reference"). The help controller can handle as | |
704a4b75 VS |
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 | ||
36edded9 JS |
22 | You can use Tex2RTF to produce these files when generating HTML, if you set {\bf htmlWorkshopFiles} to {\bf true} in |
23 | your tex2rtf.ini file. | |
704a4b75 VS |
24 | |
25 | In order to use the controller in your application under Windows you must | |
448af9a4 | 26 | have the following line in your .rc file: |
704a4b75 VS |
27 | |
28 | \begin{verbatim} | |
29 | #include "wx/html/msw/wxhtml.rc" | |
30 | \end{verbatim} | |
31 | ||
704a4b75 VS |
32 | \wxheading{Derived from} |
33 | ||
34 | wxEvtHandler | |
35 | ||
704a4b75 VS |
36 | \latexignore{\rtfignore{\wxheading{Members}}} |
37 | ||
704a4b75 VS |
38 | \membersection{wxHtmlHelpController::wxHtmlHelpController}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller} |
39 | ||
09397bc6 | 40 | \func{}{wxHtmlHelpController}{\param{int }{style = wxHF_DEFAULTSTYLE}} |
704a4b75 | 41 | |
704a4b75 VS |
42 | Constructor. |
43 | ||
09397bc6 VS |
44 | \wxheading{Parameters} |
45 | ||
46 | {\it style} is combination of these flags: | |
47 | ||
48 | \begin{twocollist} | |
49 | \twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.} | |
50 | \twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.} | |
51 | \twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.} | |
52 | \twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.} | |
53 | \end{twocollist} | |
54 | ||
55 | Default value : everything enabled. | |
56 | ||
704a4b75 VS |
57 | \membersection{wxHtmlHelpController::AddBook}\label{wxhtmlhelpcontrolleraddbook} |
58 | ||
59 | \func{bool}{AddBook}{\param{const wxString\& }{book}, \param{bool }{show_wait_msg}} | |
60 | ||
61 | Adds book (\helpref{.hhp file}{helpformat} - HTML Help Workshop project file) into the list of loaded books. | |
62 | This must be called at least once before displaying any help. | |
63 | ||
3dabc03f VS |
64 | {\it book} may be either .hhp file or ZIP archive that contains arbitrary number of .hhp files in |
65 | top-level directory. This ZIP archive must have .zip or .htb extension | |
66 | (the latter stands for "HTML book"). In other words, {\tt AddBook("help.zip")} is possible and, in fact, | |
67 | recommended way. | |
68 | ||
448af9a4 | 69 | If {\it show\_wait\_msg} is TRUE then a decorationless window with progress message is displayed. |
704a4b75 | 70 | |
704a4b75 VS |
71 | \membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay} |
72 | ||
73 | \func{void}{Display}{\param{const wxString\& }{x}} | |
74 | ||
75 | Displays page {\it x}. This is THE important function - it is used to display | |
76 | the help in application. | |
77 | ||
78 | You can specify the page in many ways: | |
79 | ||
448af9a4 | 80 | \begin{itemize}\itemsep=0pt |
704a4b75 VS |
81 | \item as direct filename of HTML document |
82 | \item as chapter name (from contents) or as a book name | |
83 | \item as some word from index | |
b32c6ff0 | 84 | \item even as any word (will be searched) |
704a4b75 VS |
85 | \end{itemize} |
86 | ||
87 | Looking for the page runs in these steps: | |
88 | ||
448af9a4 | 89 | \begin{enumerate}\itemsep=0pt |
704a4b75 VS |
90 | \item try to locate file named x (if x is for example "doc/howto.htm") |
91 | \item try to open starting page of book named x | |
92 | \item try to find x in contents (if x is for example "How To ...") | |
93 | \item try to find x in index (if x is for example "How To ...") | |
94 | \item switch to Search panel and start searching | |
95 | \end{enumerate} | |
96 | ||
97 | \func{void}{Display}{\param{const int }{id}} | |
98 | ||
99 | This alternative form is used to search help contents by numeric IDs. | |
100 | ||
b32c6ff0 RD |
101 | \pythonnote{The second form of this method is named DisplayId in |
102 | wxPython.} | |
103 | ||
704a4b75 VS |
104 | \membersection{wxHtmlHelpController::DisplayContents}\label{wxhtmlhelpcontrollerdisplaycontents} |
105 | ||
106 | \func{void}{DisplayContents}{\void} | |
107 | ||
108 | Displays help window and focuses contents panel. | |
109 | ||
110 | \membersection{wxHtmlHelpController::DisplayIndex}\label{wxhtmlhelpcontrollerdisplayindex} | |
111 | ||
112 | \func{void}{DisplayIndex}{\void} | |
113 | ||
114 | Displays help window and focuses index panel. | |
115 | ||
704a4b75 VS |
116 | \membersection{wxHtmlHelpController::KeywordSearch}\label{wxhtmlhelpcontrollerkeywordsearch} |
117 | ||
118 | \func{bool}{KeywordSearch}{\param{const wxString\& }{keyword}} | |
119 | ||
120 | Displays help window, focuses search panel and starts searching. | |
121 | Returns TRUE if the keyword was found. | |
122 | ||
448af9a4 JS |
123 | {\bf Important:} KeywordSearch searches only pages listed in .htc file(s). |
124 | You should list all pages in the contents file. | |
704a4b75 | 125 | |
559fe022 VS |
126 | \membersection{wxHtmlHelpController::ReadCustomization}\label{wxhtmlhelpcontrollerreadcustomization} |
127 | ||
128 | \func{void}{ReadCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}} | |
129 | ||
448af9a4 | 130 | Reads the controller's setting (position of window, etc.) |
559fe022 VS |
131 | |
132 | \membersection{wxHtmlHelpController::SetTempDir}\label{wxhtmlhelpcontrollersettempdir} | |
133 | ||
134 | \func{void}{SetTempDir}{\param{const wxString\& }{path}} | |
135 | ||
448af9a4 JS |
136 | Sets the path for storing temporary files - cached binary versions of index and contents files. These binary |
137 | forms are much faster to read. Default value is empty string (empty string means | |
b32c6ff0 | 138 | that no cached data are stored). Note that these files are {\it not} |
448af9a4 | 139 | deleted when program exits. |
559fe022 VS |
140 | |
141 | \membersection{wxHtmlHelpController::SetTitleFormat}\label{wxhtmlhelpcontrollersettitleformat} | |
142 | ||
143 | \func{void}{SetTitleFormat}{\param{const wxString\& }{format}} | |
144 | ||
145 | Sets format of title of the frame. Must contain exactly one "\%s" | |
146 | (for title of displayed HTML page). | |
147 | ||
704a4b75 VS |
148 | \membersection{wxHtmlHelpController::UseConfig}\label{wxhtmlhelpcontrolleruseconfig} |
149 | ||
150 | \func{void}{UseConfig}{\param{wxConfigBase* }{config}, \param{const wxString\& }{rootpath = wxEmptyString}} | |
151 | ||
152 | Associates {\it config} object with the controller. | |
153 | ||
154 | If there is associated config object, wxHtmlHelpController automatically | |
155 | reads and writes settings (including wxHtmlWindow's settings) when needed. | |
156 | ||
b32c6ff0 | 157 | The only thing you must do is create wxConfig object and call UseConfig. |
704a4b75 | 158 | |
704a4b75 VS |
159 | \membersection{wxHtmlHelpController::WriteCustomization}\label{wxhtmlhelpcontrollerwritecustomization} |
160 | ||
161 | \func{void}{WriteCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}} | |
162 | ||
163 | Stores controllers setting (position of window etc.) | |
164 |