1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Help system base classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_HELPBASEH__
13 #define _WX_HELPBASEH__
16 #pragma interface "helpbase.h"
20 #include "wx/object.h"
21 #include "wx/string.h"
22 #include "wx/gdicmn.h"
26 // Flags for SetViewer
27 #define wxHELP_NETSCAPE 1
29 // Defines the API for help controllers
30 class WXDLLEXPORT wxHelpControllerBase
: public wxObject
32 DECLARE_CLASS(wxHelpControllerBase
)
35 inline wxHelpControllerBase() {}
36 inline ~wxHelpControllerBase() {};
38 // Must call this to set the filename and server name.
39 // server is only required when implementing TCP/IP-based
41 virtual bool Initialize(const wxString
& WXUNUSED(file
), int WXUNUSED(server
) ) { return FALSE
; };
42 virtual bool Initialize(const wxString
& file
) = 0;
44 // Set viewer: only relevant to some kinds of controller
45 virtual void SetViewer(const wxString
& WXUNUSED(viewer
), long WXUNUSED(flags
) = 0) {}
47 // If file is "", reloads file given in Initialize
48 virtual bool LoadFile(const wxString
& file
= "") = 0;
49 virtual bool DisplayContents(void) = 0;
50 virtual bool DisplaySection(int sectionNo
) = 0;
51 virtual bool DisplayBlock(long blockNo
) = 0;
52 virtual bool KeywordSearch(const wxString
& k
) = 0;
54 virtual bool Quit(void) = 0;
55 virtual void OnQuit(void) {};
59 /* By default, if wxHTML is compiled in, use the
60 wxHelpControllerHtml. If not, use the external help controller.
61 (of course, we shouldn't do it for wxMSW)
65 # include "wx/generic/helpwxht.h"
66 # define wxHelpController wxHelpControllerHtml
67 # define sm_classwxHelpController sm_classwxHelpControllerHtml
69 # include "wx/generic/helpext.h"
70 # define wxHelpController wxExtHelpController
71 # define sm_classwxHelpController sm_classwxExtHelpController