1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Help system: wxHelp implementation
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "helpxlp.h"
24 #include "wx/helpbase.h"
29 #include "wx/sckipc.h"
32 class WXDLLEXPORT wxXLPHelpController
;
34 // Connection class for implementing the connection between the
35 // wxHelp process and the application
36 class WXDLLEXPORT wxXLPHelpConnection
: public
45 friend class wxXLPHelpController
;
47 DECLARE_DYNAMIC_CLASS(wxXLPHelpConnection
)
51 wxXLPHelpConnection(wxXLPHelpController
*instance
);
52 bool OnDisconnect(void);
55 wxXLPHelpController
*helpInstance
;
58 // Connection class for implementing the client process
59 // controlling the wxHelp process
60 class WXDLLEXPORT wxXLPHelpClient
: public
69 DECLARE_CLASS(wxXLPHelpClient
)
71 friend class WXDLLEXPORT wxXLPHelpController
;
73 wxXLPHelpClient(wxXLPHelpController
* c
) { m_controller
= c
; }
75 wxConnectionBase
*OnMakeConnection(void)
76 { return new wxXLPHelpConnection(m_controller
);
79 wxXLPHelpController
* m_controller
;
82 // An application can have one or more instances of wxHelp,
83 // represented by an object of this class.
84 // Nothing happens on initial creation; the application
85 // must call a member function to display help.
86 // If the instance of wxHelp is already active, that instance
87 // will be used for subsequent help.
89 class WXDLLEXPORT wxXLPHelpController
: public wxHelpControllerBase
91 friend class WXDLLEXPORT wxXLPHelpConnection
;
92 DECLARE_CLASS(wxXLPHelpController
)
95 wxXLPHelpController(void);
96 ~wxXLPHelpController(void);
98 // Must call this to set the filename and server name
99 virtual bool Initialize(const wxString
& file
, int server
= -1);
100 // If file is "", reloads file given in Initialize
101 virtual bool LoadFile(const wxString
& file
= "");
102 virtual bool DisplayContents(void);
103 virtual bool DisplaySection(int sectionNo
);
104 virtual bool DisplayBlock(long blockNo
);
105 virtual bool KeywordSearch(const wxString
& k
);
107 virtual bool Quit(void);
108 virtual void OnQuit(void);
118 wxXLPHelpConnection
* helpConnection
;
119 wxXLPHelpClient helpClient
;
121 virtual bool Initialize(const wxString
& file
) { return(wxHelpControllerBase::Initialize(file
)); };