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! This help controller has an API incompatible with wxWindows
11 This help controller provides an easy way of displaying HTML help in your
12 application (see
{\it test
} sample). The help system is based on
{\bf books
}
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
16 many books as you want.
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.
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.
25 In order to use the controller in your application under Windows you must
26 have the following line in your .rc file:
29 #include "wx/html/msw/wxhtml.rc"
32 \wxheading{Derived from
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
38 \membersection{wxHtmlHelpController::wxHtmlHelpController
}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller
}
40 \func{}{wxHtmlHelpController
}{\param{int
}{style = wxHF
\_DEFAULTSTYLE}}
44 \wxheading{Parameters
}
46 {\it style
} is combination of these flags:
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 \twocolitem{\windowstyle{wxHF
\_BOOKMARKS}}{Help frame has bookmarks controls.
}
56 Default value : everything enabled.
58 \membersection{wxHtmlHelpController::AddBook
}\label{wxhtmlhelpcontrolleraddbook
}
60 \func{bool
}{AddBook
}{\param{const wxString\&
}{book
},
\param{bool
}{show
\_wait\_msg}}
62 Adds book (
\helpref{.hhp file
}{helpformat
} - HTML Help Workshop project file) into the list of loaded books.
63 This must be called at least once before displaying any help.
65 {\it book
} may be either .hhp file or ZIP archive that contains arbitrary number of .hhp files in
66 top-level directory. This ZIP archive must have .zip or .htb extension
67 (the latter stands for "HTML book"). In other words,
{\tt AddBook("help.zip")
} is possible and, in fact,
70 If
{\it show
\_wait\_msg} is TRUE then a decorationless window with progress message is displayed.
72 \membersection{wxHtmlHelpController::Display
}\label{wxhtmlhelpcontrollerdisplay
}
74 \func{void
}{Display
}{\param{const wxString\&
}{x
}}
76 Displays page
{\it x
}. This is THE important function - it is used to display
77 the help in application.
79 You can specify the page in many ways:
81 \begin{itemize
}\itemsep=
0pt
82 \item as direct filename of HTML
document
83 \item as chapter name (from contents) or as a book name
84 \item as some word from index
85 \item even as any word (will be searched)
88 Looking for the page runs in these steps:
90 \begin{enumerate
}\itemsep=
0pt
91 \item try to locate file named x (if x is for example "doc/howto.htm")
92 \item try to open starting page of book named x
93 \item try to find x in contents (if x is for example "How To ...")
94 \item try to find x in index (if x is for example "How To ...")
95 \item switch to Search panel and start searching
98 \func{void
}{Display
}{\param{const int
}{id
}}
100 This alternative form is used to search help contents by numeric IDs.
102 \pythonnote{The second form of this method is named DisplayId in
105 \membersection{wxHtmlHelpController::DisplayContents
}\label{wxhtmlhelpcontrollerdisplaycontents
}
107 \func{void
}{DisplayContents
}{\void}
109 Displays help window and focuses contents panel.
111 \membersection{wxHtmlHelpController::DisplayIndex
}\label{wxhtmlhelpcontrollerdisplayindex
}
113 \func{void
}{DisplayIndex
}{\void}
115 Displays help window and focuses index panel.
117 \membersection{wxHtmlHelpController::KeywordSearch
}\label{wxhtmlhelpcontrollerkeywordsearch
}
119 \func{bool
}{KeywordSearch
}{\param{const wxString\&
}{keyword
}}
121 Displays help window, focuses search panel and starts searching.
122 Returns TRUE if the keyword was found.
124 {\bf Important:
} KeywordSearch searches only pages listed in .htc file(s).
125 You should list all pages in the contents file.
127 \membersection{wxHtmlHelpController::ReadCustomization
}\label{wxhtmlhelpcontrollerreadcustomization
}
129 \func{void
}{ReadCustomization
}{\param{wxConfigBase*
}{cfg
},
\param{wxString
}{path = wxEmptyString
}}
131 Reads the controller's setting (position of window, etc.)
133 \membersection{wxHtmlHelpController::SetTempDir
}\label{wxhtmlhelpcontrollersettempdir
}
135 \func{void
}{SetTempDir
}{\param{const wxString\&
}{path
}}
137 Sets the path for storing temporary files - cached binary versions of index and contents files. These binary
138 forms are much faster to read. Default value is empty string (empty string means
139 that no cached data are stored). Note that these files are
{\it not
}
140 deleted when program exits.
142 \membersection{wxHtmlHelpController::SetTitleFormat
}\label{wxhtmlhelpcontrollersettitleformat
}
144 \func{void
}{SetTitleFormat
}{\param{const wxString\&
}{format
}}
146 Sets format of title of the frame. Must contain exactly one "\%s"
147 (for title of displayed HTML page).
149 \membersection{wxHtmlHelpController::UseConfig
}\label{wxhtmlhelpcontrolleruseconfig
}
151 \func{void
}{UseConfig
}{\param{wxConfigBase*
}{config
},
\param{const wxString\&
}{rootpath = wxEmptyString
}}
153 Associates
{\it config
} object with the controller.
155 If there is associated config object, wxHtmlHelpController automatically
156 reads and writes settings (including wxHtmlWindow's settings) when needed.
158 The only thing you must do is create wxConfig object and call UseConfig.
160 \membersection{wxHtmlHelpController::WriteCustomization
}\label{wxhtmlhelpcontrollerwritecustomization
}
162 \func{void
}{WriteCustomization
}{\param{wxConfigBase*
}{cfg
},
\param{wxString
}{path = wxEmptyString
}}
164 Stores controllers setting (position of window etc.)