2 % automatically generated by HelpGen from
3 % htmlhelp.h at 02/May/99 19:58:53
6 \section{\class{wxHtmlHelpController
}}\label{wxhtmlhelpcontroller
}
8 {\bf WARNING!
} Although this class has an API compatible with other wxWindows
9 help controllers as documented by
\helpref{wxHelpController
}{wxhelpcontroller
}, it
10 is recommended that you use the enhanced capabilities of wxHtmlHelpController's API.
12 This help controller provides an easy way of displaying HTML help in your
13 application (see
{\it test
} sample). The help system is based on
{\bf books
}
14 (see
\helpref{AddBook
}{wxhtmlhelpcontrolleraddbook
}). A book is a logical
15 section of documentation (for example "User's Guide" or "Programmer's Guide" or
16 "C++ Reference" or "wxWindows Reference"). The help controller can handle as
17 many books as you want.
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.
23 You can use Tex2RTF to produce these files when generating HTML, if you set
{\bf htmlWorkshopFiles
} to
{\bf true
} in
24 your tex2rtf.ini file.
26 In order to use the controller in your application under Windows you must
27 have the following line in your .rc file:
30 #include "wx/html/msw/wxhtml.rc"
35 It is strongly recommended to use preprocessed
{\bf .hhp.cached
} version of
36 projects. 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
39 distribute the cached version together with helpfiles. See
{\it samples/html/help
}
40 sample for demonstration of its use.
44 \helpref{Information about wxBestHelpController
}{wxhelpcontroller
}
46 \wxheading{Derived from
}
50 \wxheading{Include files
}
54 \latexignore{\rtfignore{\wxheading{Members
}}}
56 \membersection{wxHtmlHelpController::wxHtmlHelpController
}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller
}
58 \func{}{wxHtmlHelpController
}{\param{int
}{style = wxHF
\_DEFAULT\_STYLE}}
62 \wxheading{Parameters
}
64 {\it style
} is combination of these flags:
66 \begin{twocollist
}\itemsep=
0pt
67 \twocolitem{\windowstyle{wxHF
\_TOOLBAR}}{Help frame has toolbar.
}
68 \twocolitem{\windowstyle{wxHF
\_FLAT\_TOOLBAR}}{Help frame has toolbar with flat buttons (aka coolbar).
}
69 \twocolitem{\windowstyle{wxHF
\_CONTENTS}}{Help frame has contents panel.
}
70 \twocolitem{\windowstyle{wxHF
\_INDEX}}{Help frame has index panel.
}
71 \twocolitem{\windowstyle{wxHF
\_SEARCH}}{Help frame has search panel.
}
72 \twocolitem{\windowstyle{wxHF
\_BOOKMARKS}}{Help frame has bookmarks controls.
}
73 \twocolitem{\windowstyle{wxHF
\_OPEN\_FILES}}{Allow user to open arbitrary HTML
document.
}
74 \twocolitem{\windowstyle{wxHF
\_PRINT}}{Toolbar contains "print" button.
}
75 \twocolitem{\windowstyle{wxHF
\_MERGE\_BOOKS}}{Contents pane does not show
76 book nodes. All books are merged together and appear as single book to the
78 \twocolitem{\windowstyle{wxHF
\_ICONS\_BOOK}}{All nodes in contents pane
79 have a book icon. This is how Microsoft's HTML help viewer behaves.
}
80 \twocolitem{\windowstyle{wxHF
\_ICONS\_FOLDER}}{Book nodes in contents pane have
81 a book icon, book's sections have a folder icon. This is the default.
}
82 \twocolitem{\windowstyle{wxHF
\_ICONS\_BOOK\_CHAPTER}}{Both book nodes and
83 nodes of top-level sections of a book (i.e. chapters) have a book icon,
84 all other sections (sections, subsections, ...) have a folder icon.
}
85 \twocolitem{\windowstyle{wxHF
\_DEFAULT\_STYLE}}{{\tt wxHF
\_TOOLBAR | wxHF
\_CONTENTS
86 | wxHF
\_INDEX | wxHF
\_SEARCH | wxHF
\_BOOKMARKS | wxHF
\_PRINT}}
89 \membersection{wxHtmlHelpController::AddBook
}\label{wxhtmlhelpcontrolleraddbook
}
91 \func{bool
}{AddBook
}{\param{const wxString\&
}{book
},
\param{bool
}{show
\_wait\_msg}}
93 Adds book (
\helpref{.hhp file
}{helpformat
} - HTML Help Workshop project file) into the list of loaded books.
94 This must be called at least once before displaying any help.
96 {\it book
} may be either .hhp file or ZIP archive that contains arbitrary number of .hhp files in
97 top-level directory. This ZIP archive must have .zip or .htb extension
98 (the latter stands for "HTML book"). In other words,
{\tt AddBook("help.zip")
} is possible and, in fact,
101 If
{\it show
\_wait\_msg} is TRUE then a decorationless window with progress message is displayed.
103 \membersection{wxHtmlHelpController::CreateHelpFrame
}\label{wxhtmlhelpcontrollercreatehelpframe
}
105 \func{virtual wxHtmlHelpFrame*
}{CreateHelpFrame
}{\param{wxHtmlHelpData *
}{data
}}
107 This protected virtual method may be overridden so that the controller
108 uses slightly different frame. See
{\it samples/html/helpview
} sample for
110 \membersection{wxHtmlHelpController::Display
}\label{wxhtmlhelpcontrollerdisplay
}
112 \func{void
}{Display
}{\param{const wxString\&
}{x
}}
114 Displays page
{\it x
}. This is THE important function - it is used to display
115 the help in application.
117 You can specify the page in many ways:
119 \begin{itemize
}\itemsep=
0pt
120 \item as direct filename of HTML
document
121 \item as chapter name (from contents) or as a book name
122 \item as some word from index
123 \item even as any word (will be searched)
126 Looking for the page runs in these steps:
128 \begin{enumerate
}\itemsep=
0pt
129 \item try to locate file named x (if x is for example "doc/howto.htm")
130 \item try to open starting page of book named x
131 \item try to find x in contents (if x is for example "How To ...")
132 \item try to find x in index (if x is for example "How To ...")
133 \item switch to Search panel and start searching
136 \func{void
}{Display
}{\param{const int
}{id
}}
138 This alternative form is used to search help contents by numeric IDs.
140 \pythonnote{The second form of this method is named DisplayId in
143 \membersection{wxHtmlHelpController::DisplayContents
}\label{wxhtmlhelpcontrollerdisplaycontents
}
145 \func{void
}{DisplayContents
}{\void}
147 Displays help window and focuses contents panel.
149 \membersection{wxHtmlHelpController::DisplayIndex
}\label{wxhtmlhelpcontrollerdisplayindex
}
151 \func{void
}{DisplayIndex
}{\void}
153 Displays help window and focuses index panel.
155 \membersection{wxHtmlHelpController::KeywordSearch
}\label{wxhtmlhelpcontrollerkeywordsearch
}
157 \func{bool
}{KeywordSearch
}{\param{const wxString\&
}{keyword
}}
159 Displays help window, focuses search panel and starts searching.
160 Returns TRUE if the keyword was found.
162 {\bf Important:
} KeywordSearch searches only pages listed in .hhc file(s).
163 You should list all pages in the contents file.
165 \membersection{wxHtmlHelpController::ReadCustomization
}\label{wxhtmlhelpcontrollerreadcustomization
}
167 \func{void
}{ReadCustomization
}{\param{wxConfigBase*
}{cfg
},
\param{wxString
}{path = wxEmptyString
}}
169 Reads the controller's setting (position of window, etc.)
171 \membersection{wxHtmlHelpController::SetTempDir
}\label{wxhtmlhelpcontrollersettempdir
}
173 \func{void
}{SetTempDir
}{\param{const wxString\&
}{path
}}
175 Sets the path for storing temporary files - cached binary versions of index and contents files. These binary
176 forms are much faster to read. Default value is empty string (empty string means
177 that no cached data are stored). Note that these files are
{\it not
}
178 deleted when program exits.
180 Once created these cached files will be used in all subsequent executions
181 of your application. If cached files become older than corresponding .hhp
182 file (e.g. if you regenerate documentation) it will be refreshed.
184 \membersection{wxHtmlHelpController::SetTitleFormat
}\label{wxhtmlhelpcontrollersettitleformat
}
186 \func{void
}{SetTitleFormat
}{\param{const wxString\&
}{format
}}
188 Sets format of title of the frame. Must contain exactly one "\%s"
189 (for title of displayed HTML page).
191 \membersection{wxHtmlHelpController::UseConfig
}\label{wxhtmlhelpcontrolleruseconfig
}
193 \func{void
}{UseConfig
}{\param{wxConfigBase*
}{config
},
\param{const wxString\&
}{rootpath = wxEmptyString
}}
195 Associates
{\it config
} object with the controller.
197 If there is associated config object, wxHtmlHelpController automatically
198 reads and writes settings (including wxHtmlWindow's settings) when needed.
200 The only thing you must do is create wxConfig object and call UseConfig.
202 If you do not use
{\it UseConfig
}, wxHtmlHelpController will use
203 default wxConfig object if available (for details see
204 \helpref{wxConfigBase::Get
}{wxconfigbaseget
} and
205 \helpref{wxConfigBase::Set
}{wxconfigbaseset
}).
207 \membersection{wxHtmlHelpController::WriteCustomization
}\label{wxhtmlhelpcontrollerwritecustomization
}
209 \func{void
}{WriteCustomization
}{\param{wxConfigBase*
}{cfg
},
\param{wxString
}{path = wxEmptyString
}}
211 Stores controllers setting (position of window etc.)