]> git.saurik.com Git - wxWidgets.git/blame - include/wx/helpbase.h
SCROLLWIN instead of SCROLL again
[wxWidgets.git] / include / wx / helpbase.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: helpbase.h
3// Purpose: Help system base classes
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_HELPBASEH__
13#define _WX_HELPBASEH__
c801d85f
KB
14
15#ifdef __GNUG__
16#pragma interface "helpbase.h"
17#endif
18
e179bd65
RR
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/string.h"
22#include "wx/gdicmn.h"
5f1ea0ee 23#include "wx/frame.h"
c801d85f 24
47d67540 25#if wxUSE_HELP
c801d85f 26
33b64e6f
JS
27// Flags for SetViewer
28#define wxHELP_NETSCAPE 1
29
c801d85f
KB
30// Defines the API for help controllers
31class WXDLLEXPORT wxHelpControllerBase: public wxObject
32{
33 DECLARE_CLASS(wxHelpControllerBase)
34
35 public:
e179bd65
RR
36 inline wxHelpControllerBase() {}
37 inline ~wxHelpControllerBase() {};
c801d85f
KB
38
39 // Must call this to set the filename and server name.
40 // server is only required when implementing TCP/IP-based
41 // help controllers.
7a4b8f27 42 virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; }
5e0201ea 43 virtual bool Initialize(const wxString& WXUNUSED(file)) { return FALSE; }
c801d85f 44
33b64e6f
JS
45 // Set viewer: only relevant to some kinds of controller
46 virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
47
c801d85f
KB
48 // If file is "", reloads file given in Initialize
49 virtual bool LoadFile(const wxString& file = "") = 0;
50 virtual bool DisplayContents(void) = 0;
51 virtual bool DisplaySection(int sectionNo) = 0;
52 virtual bool DisplayBlock(long blockNo) = 0;
53 virtual bool KeywordSearch(const wxString& k) = 0;
db8db70a 54 /// Allows one to override the default settings for the help frame.
5e0201ea
JS
55 virtual void SetFrameParameters(const wxString& WXUNUSED(title),
56 const wxSize& WXUNUSED(size),
57 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
58 bool WXUNUSED(newFrameEachTime) = FALSE)
db8db70a
KB
59 {
60 // does nothing by default
61 }
62 /// Obtains the latest settings used by the help frame and the help
63 /// frame.
5e0201ea
JS
64 virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL,
65 wxPoint *WXUNUSED(pos) = NULL,
66 bool *WXUNUSED(newFrameEachTime) = NULL)
db8db70a
KB
67 {
68 return (wxFrame*) NULL;// does nothing by default
69 }
c801d85f
KB
70
71 virtual bool Quit(void) = 0;
72 virtual void OnQuit(void) {};
73};
74
29ea4a29
KB
75
76/* By default, if wxHTML is compiled in, use the
e8b59124
VZ
77 wxHelpControllerHtml. If not, use the external help controller.
78 (of course, we shouldn't do it for wxMSW)
79*/
80#ifndef __WXMSW__
29ea4a29
KB
81#if wxUSE_HTML
82# include "wx/generic/helpwxht.h"
83# define wxHelpController wxHelpControllerHtml
84# define sm_classwxHelpController sm_classwxHelpControllerHtml
85#else
86# include "wx/generic/helpext.h"
87# define wxHelpController wxExtHelpController
88# define sm_classwxHelpController sm_classwxExtHelpController
89#endif
e8b59124 90#endif // wxMSW
29ea4a29 91
47d67540 92#endif // wxUSE_HELP
c801d85f 93#endif
34138703 94 // _WX_HELPBASEH__