]>
Commit | Line | Data |
---|---|---|
5c7b5061 FM |
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 | |
5c7b5061 FM |
7 | // Licence: wxWindows licence |
8 | ///////////////////////////////////////////////////////////////////////////// | |
88ac883a VZ |
9 | |
10 | #ifndef __WX_HELPEXT_H_ | |
11 | #define __WX_HELPEXT_H_ | |
e9aad10a KB |
12 | |
13 | #if wxUSE_HELP | |
14 | ||
69108ccb | 15 | |
5c7b5061 FM |
16 | // ---------------------------------------------------------------------------- |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
e9aad10a | 19 | |
5c7b5061 | 20 | #include "wx/helpbase.h" |
e9aad10a | 21 | |
e9aad10a | 22 | |
5c7b5061 FM |
23 | // ---------------------------------------------------------------------------- |
24 | // wxExtHelpController | |
25 | // ---------------------------------------------------------------------------- | |
e9aad10a | 26 | |
5c7b5061 | 27 | // This class implements help via an external browser. |
12f190b0 | 28 | class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase |
ca65c044 | 29 | { |
249b3fe3 | 30 | public: |
5c7b5061 FM |
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 | { | |
d3b9f782 | 71 | return NULL; // does nothing by default |
5c7b5061 | 72 | } |
69108ccb | 73 | |
249b3fe3 | 74 | protected: |
5c7b5061 FM |
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; | |
249b3fe3 VZ |
83 | |
84 | private: | |
5c7b5061 FM |
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); | |
249b3fe3 | 92 | |
69108ccb | 93 | |
5c7b5061 FM |
94 | // How to call the html viewer. |
95 | wxString m_BrowserName; | |
249b3fe3 | 96 | |
5c7b5061 FM |
97 | // Is the viewer a variant of netscape? |
98 | bool m_BrowserIsNetscape; | |
249b3fe3 VZ |
99 | |
100 | DECLARE_CLASS(wxExtHelpController) | |
e9aad10a KB |
101 | }; |
102 | ||
88ac883a VZ |
103 | #endif // wxUSE_HELP |
104 | ||
105 | #endif // __WX_HELPEXT_H_ |