+ // get the name of the CHM file we use from our m_helpFile
+ wxString GetValidFilename() const;
+
+ // Call HtmlHelp() with the provided parameters (both overloads do the same
+ // thing but allow to avoid casts in the calling code) and return false
+ // (but don't crash) if HTML help is unavailable
+ static bool CallHtmlHelp(wxWindow *win, const wxChar *str,
+ unsigned cmd, WXWPARAM param);
+ static bool CallHtmlHelp(wxWindow *win, const wxChar *str,
+ unsigned cmd, const void *param = NULL)
+ {
+ return CallHtmlHelp(win, str, cmd, reinterpret_cast<WXWPARAM>(param));
+ }
+
+ // even simpler wrappers using GetParentWindow() and GetValidFilename() as
+ // the first 2 HtmlHelp() parameters
+ bool CallHtmlHelp(unsigned cmd, WXWPARAM param)
+ {
+ return CallHtmlHelp(GetParentWindow(), GetValidFilename().t_str(),
+ cmd, param);
+ }
+
+ bool CallHtmlHelp(unsigned cmd, const void *param = NULL)
+ {
+ return CallHtmlHelp(cmd, reinterpret_cast<WXWPARAM>(param));
+ }
+
+ // wrapper around CallHtmlHelp(HH_DISPLAY_TEXT_POPUP): only one of text and
+ // contextId parameters can be non-NULL/non-zero
+ static bool DoDisplayTextPopup(const wxChar *text,
+ const wxPoint& pos,
+ int contextId,
+ wxWindow *window);
+