]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/helpchm.h
move WX_GL_XXX constants from wx/*/glcanvas.h to wx/glcanvas.h (this makes them avail...
[wxWidgets.git] / include / wx / msw / helpchm.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: helpchm.h
3 // Purpose: Help system: MS HTML Help implementation
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 16/04/2000
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_HELPCHM_H_
13 #define _WX_HELPCHM_H_
14
15 #if wxUSE_MS_HTML_HELP
16
17 #include "wx/helpbase.h"
18
19 class WXDLLEXPORT wxCHMHelpController : public wxHelpControllerBase
20 {
21 public:
22 wxCHMHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) { }
23
24 // Must call this to set the filename
25 virtual bool Initialize(const wxString& file);
26 virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); }
27
28 // If file is "", reloads file given in Initialize
29 virtual bool LoadFile(const wxString& file = wxEmptyString);
30 virtual bool DisplayContents();
31 virtual bool DisplaySection(int sectionNo);
32 virtual bool DisplaySection(const wxString& section);
33 virtual bool DisplayBlock(long blockNo);
34 virtual bool DisplayContextPopup(int contextId);
35 virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos);
36 virtual bool KeywordSearch(const wxString& k,
37 wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
38 virtual bool Quit();
39
40 wxString GetHelpFile() const { return m_helpFile; }
41
42 // helper of DisplayTextPopup(), also used in wxSimpleHelpProvider::ShowHelp
43 static bool ShowContextHelpPopup(const wxString& text,
44 const wxPoint& pos,
45 wxWindow *window);
46
47 protected:
48 // Append extension if necessary.
49 wxString GetValidFilename(const wxString& file) const;
50
51 protected:
52 wxString m_helpFile;
53
54 DECLARE_CLASS(wxCHMHelpController)
55 };
56
57 #endif // wxUSE_MS_HTML_HELP
58
59 #endif
60 // _WX_HELPCHM_H_