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"
23 #include "wx/helpbase.h"
28 #include "wx/sckipc.h"
31 class WXDLLEXPORT wxXLPHelpController
;
33 // Connection class for implementing the connection between the
34 // wxHelp process and the application
35 class WXDLLEXPORT wxXLPHelpConnection
: public
44 friend class wxXLPHelpController
;
46 DECLARE_DYNAMIC_CLASS(wxXLPHelpConnection
)
50 wxXLPHelpConnection(wxXLPHelpController
*instance
);
51 bool OnDisconnect(void);
54 wxXLPHelpController
*helpInstance
;
57 // Connection class for implementing the client process
58 // controlling the wxHelp process
59 class WXDLLEXPORT wxXLPHelpClient
: public
68 DECLARE_CLASS(wxXLPHelpClient
)
70 friend class WXDLLEXPORT wxXLPHelpController
;
72 wxXLPHelpClient(wxXLPHelpController
* c
) { m_controller
= c
; }
74 wxConnectionBase
*OnMakeConnection(void)
75 { return new wxXLPHelpConnection(m_controller
);
78 wxXLPHelpController
* m_controller
;
81 // An application can have one or more instances of wxHelp,
82 // represented by an object of this class.
83 // Nothing happens on initial creation; the application
84 // must call a member function to display help.
85 // If the instance of wxHelp is already active, that instance
86 // will be used for subsequent help.
88 class WXDLLEXPORT wxXLPHelpController
: public wxHelpControllerBase
90 friend class WXDLLEXPORT wxXLPHelpConnection
;
91 DECLARE_CLASS(wxXLPHelpController
)
94 wxXLPHelpController(void);
95 ~wxXLPHelpController(void);
97 // Must call this to set the filename and server name
98 virtual bool Initialize(const wxString
& file
, int server
= -1);
99 // If file is "", reloads file given in Initialize
100 virtual bool LoadFile(const wxString
& file
= "");
101 virtual bool DisplayContents(void);
102 virtual bool DisplaySection(int sectionNo
);
103 virtual bool DisplayBlock(long blockNo
);
104 virtual bool KeywordSearch(const wxString
& k
);
106 virtual bool DisplaySection(const wxString
& section
)
108 return wxHelpControllerBase::DisplaySection(section
);
111 virtual bool Quit(void);
112 virtual void OnQuit(void);
122 wxXLPHelpConnection
* helpConnection
;
123 wxXLPHelpClient helpClient
;
125 virtual bool Initialize(const wxString
& file
) { return(wxHelpControllerBase::Initialize(file
)); };