]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/helpext.h
Destroy the wxDialog::ShowWindowModalThenDo() functor a.s.a.p.
[wxWidgets.git] / include / wx / generic / helpext.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/helpext.h
3 // Purpose: an external help controller for wxWidgets
4 // Author: Karsten Ballueder (Ballueder@usa.net)
5 // Modified by:
6 // Copyright: (c) Karsten Ballueder 1998
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __WX_HELPEXT_H_
11 #define __WX_HELPEXT_H_
12
13 #if wxUSE_HELP
14
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 #include "wx/helpbase.h"
21
22
23 // ----------------------------------------------------------------------------
24 // wxExtHelpController
25 // ----------------------------------------------------------------------------
26
27 // This class implements help via an external browser.
28 class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase
29 {
30 public:
31 wxExtHelpController(wxWindow* parentWindow = NULL);
32 virtual ~wxExtHelpController();
33
34 #if WXWIN_COMPATIBILITY_2_8
35 wxDEPRECATED(void SetBrowser(const wxString& browsername = wxEmptyString, bool isNetscape = false) );
36 #endif
37
38 // Set viewer: new name for SetBrowser
39 virtual void SetViewer(const wxString& viewer = wxEmptyString,
40 long flags = wxHELP_NETSCAPE);
41
42 virtual bool Initialize(const wxString& dir, int WXUNUSED(server))
43 { return Initialize(dir); }
44
45 virtual bool Initialize(const wxString& dir);
46 virtual bool LoadFile(const wxString& file = wxEmptyString);
47 virtual bool DisplayContents(void);
48 virtual bool DisplaySection(int sectionNo);
49 virtual bool DisplaySection(const wxString& section);
50 virtual bool DisplayBlock(long blockNo);
51 virtual bool KeywordSearch(const wxString& k,
52 wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
53
54 virtual bool Quit(void);
55 virtual void OnQuit(void);
56
57 virtual bool DisplayHelp(const wxString &) ;
58
59 virtual void SetFrameParameters(const wxString& WXUNUSED(title),
60 const wxSize& WXUNUSED(size),
61 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
62 bool WXUNUSED(newFrameEachTime) = false)
63 {
64 // does nothing by default
65 }
66
67 virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL,
68 wxPoint *WXUNUSED(pos) = NULL,
69 bool *WXUNUSED(newFrameEachTime) = NULL)
70 {
71 return NULL; // does nothing by default
72 }
73
74 protected:
75 // Filename of currently active map file.
76 wxString m_helpDir;
77
78 // How many entries do we have in the map file?
79 int m_NumOfEntries;
80
81 // A list containing all id,url,documentation triples.
82 wxList *m_MapList;
83
84 private:
85 // parse a single line of the map file (called by LoadFile())
86 //
87 // return true if the line was valid or false otherwise
88 bool ParseMapFileLine(const wxString& line);
89
90 // Deletes the list and all objects.
91 void DeleteList(void);
92
93
94 // How to call the html viewer.
95 wxString m_BrowserName;
96
97 // Is the viewer a variant of netscape?
98 bool m_BrowserIsNetscape;
99
100 DECLARE_CLASS(wxExtHelpController)
101 };
102
103 #endif // wxUSE_HELP
104
105 #endif // __WX_HELPEXT_H_