]>
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 | ||
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 | ||
704a4b75 VS |
31 | \wxheading{Derived from} |
32 | ||
33 | wxEvtHandler | |
34 | ||
704a4b75 VS |
35 | \latexignore{\rtfignore{\wxheading{Members}}} |
36 | ||
704a4b75 VS |
37 | \membersection{wxHtmlHelpController::wxHtmlHelpController}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller} |
38 | ||
39 | \func{}{wxHtmlHelpController}{\void} | |
40 | ||
704a4b75 VS |
41 | Constructor. |
42 | ||
704a4b75 VS |
43 | \membersection{wxHtmlHelpController::AddBook}\label{wxhtmlhelpcontrolleraddbook} |
44 | ||
45 | \func{bool}{AddBook}{\param{const wxString\& }{book}, \param{bool }{show_wait_msg}} | |
46 | ||
47 | Adds book (\helpref{.hhp file}{helpformat} - HTML Help Workshop project file) into the list of loaded books. | |
48 | This must be called at least once before displaying any help. | |
49 | ||
50 | If {\it show_wait_msg} is TRUE then a decorationless window with progress message is displayed. | |
51 | ||
704a4b75 VS |
52 | \membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay} |
53 | ||
54 | \func{void}{Display}{\param{const wxString\& }{x}} | |
55 | ||
56 | Displays page {\it x}. This is THE important function - it is used to display | |
57 | the help in application. | |
58 | ||
59 | You can specify the page in many ways: | |
60 | ||
61 | \begin{itemize} | |
62 | \item as direct filename of HTML document | |
63 | \item as chapter name (from contents) or as a book name | |
64 | \item as some word from index | |
65 | \item even as any word (will be searched) | |
66 | \end{itemize} | |
67 | ||
68 | Looking for the page runs in these steps: | |
69 | ||
70 | \begin{enumerate} | |
71 | \item try to locate file named x (if x is for example "doc/howto.htm") | |
72 | \item try to open starting page of book named x | |
73 | \item try to find x in contents (if x is for example "How To ...") | |
74 | \item try to find x in index (if x is for example "How To ...") | |
75 | \item switch to Search panel and start searching | |
76 | \end{enumerate} | |
77 | ||
78 | \func{void}{Display}{\param{const int }{id}} | |
79 | ||
80 | This alternative form is used to search help contents by numeric IDs. | |
81 | ||
704a4b75 VS |
82 | \membersection{wxHtmlHelpController::DisplayContents}\label{wxhtmlhelpcontrollerdisplaycontents} |
83 | ||
84 | \func{void}{DisplayContents}{\void} | |
85 | ||
86 | Displays help window and focuses contents panel. | |
87 | ||
88 | \membersection{wxHtmlHelpController::DisplayIndex}\label{wxhtmlhelpcontrollerdisplayindex} | |
89 | ||
90 | \func{void}{DisplayIndex}{\void} | |
91 | ||
92 | Displays help window and focuses index panel. | |
93 | ||
704a4b75 VS |
94 | \membersection{wxHtmlHelpController::KeywordSearch}\label{wxhtmlhelpcontrollerkeywordsearch} |
95 | ||
96 | \func{bool}{KeywordSearch}{\param{const wxString\& }{keyword}} | |
97 | ||
98 | Displays help window, focuses search panel and starts searching. | |
99 | Returns TRUE if the keyword was found. | |
100 | ||
101 | IMPORTANT! KeywordSearch searches only pages listed in .htc file(s)! | |
102 | (you should have all pages in contents file...) | |
103 | ||
559fe022 VS |
104 | \membersection{wxHtmlHelpController::ReadCustomization}\label{wxhtmlhelpcontrollerreadcustomization} |
105 | ||
106 | \func{void}{ReadCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}} | |
107 | ||
108 | Reads controllers setting (position of window etc.) | |
109 | ||
110 | \membersection{wxHtmlHelpController::SetTempDir}\label{wxhtmlhelpcontrollersettempdir} | |
111 | ||
112 | \func{void}{SetTempDir}{\param{const wxString\& }{path}} | |
113 | ||
114 | Sets path for storing temporary files (cached binary versions of index and contents files. These binary | |
115 | forms are much faster to read.) Default value is empty string (empty string means | |
116 | that no cached data are stored). Note that these files are NOT | |
117 | deleted when program exits! | |
118 | ||
119 | \membersection{wxHtmlHelpController::SetTitleFormat}\label{wxhtmlhelpcontrollersettitleformat} | |
120 | ||
121 | \func{void}{SetTitleFormat}{\param{const wxString\& }{format}} | |
122 | ||
123 | Sets format of title of the frame. Must contain exactly one "\%s" | |
124 | (for title of displayed HTML page). | |
125 | ||
704a4b75 VS |
126 | \membersection{wxHtmlHelpController::UseConfig}\label{wxhtmlhelpcontrolleruseconfig} |
127 | ||
128 | \func{void}{UseConfig}{\param{wxConfigBase* }{config}, \param{const wxString\& }{rootpath = wxEmptyString}} | |
129 | ||
130 | Associates {\it config} object with the controller. | |
131 | ||
132 | If there is associated config object, wxHtmlHelpController automatically | |
133 | reads and writes settings (including wxHtmlWindow's settings) when needed. | |
134 | ||
135 | The only thing you must do is create wxConfig object and call UseConfig. | |
136 | ||
704a4b75 VS |
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 |