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