1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        helpview.h
3 // Purpose:     HelpView application class
4 // Author:      Vaclav Slavik, Julian Smart
5 // Modified by:
6 // Created:     2002-07-09
7 // Copyright:   (c) 2002 Vaclav Slavik, Julian Smart and others
8 // Licence:     wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10 
11 #ifndef _WX_HELPVIEW_H_
12 #define _WX_HELPVIEW_H_
13 
14 #define hvVERSION 1.04
15 
16 #if wxUSE_IPC
17 #include <wx/ipc.h>
18 class hvServer;
19 #endif
20 
21 /*!
22  * The helpview application class.
23  */
24 
25 class hvApp : public wxApp
26 {
27 public:
28     hvApp();
29 
30     /// Initialise the application.
31     virtual bool OnInit();
32 
33     /// Clean up the application's data.
34     virtual int OnExit();
35 
36 #ifdef __WXMAC__
37     /// Respond to Apple Event for opening a document
38     virtual void MacOpenFiles(const wxArrayString& fileNames);
39 #endif
40 
41     /// Prompt the user for a book to open
42     bool OpenBook(wxHtmlHelpController* controller);
43 
44     /// Returns the help controller.
GetHelpController()45     wxHtmlHelpController* GetHelpController() { return m_helpController; }
46 
47 #if wxUSE_IPC
48     /// Returns the list of connections.
GetConnections()49     wxList& GetConnections() { return m_connections; }
50 #endif
51 
52 private:
53     wxHtmlHelpController*   m_helpController;
54 
55 #if wxUSE_IPC
56     wxList                  m_connections;
57     hvServer*               m_server;
58 #endif
59 
60 };
61 
62 #if wxUSE_IPC
63 class hvConnection : public wxConnection
64 {
65 public:
66     hvConnection();
67     virtual ~hvConnection();
68 
69     bool OnExec(const wxString& topic, const wxString& data);
70     bool OnPoke(const wxString& topic, const wxString& item,
71                 const void *data, size_t size, wxIPCFormat format);
72 
73 private:
74 };
75 
76 class hvServer: public wxServer
77 {
78 public:
79     wxConnectionBase *OnAcceptConnection(const wxString& topic);
80 };
81 
82 
83 #endif
84 
85 #endif
86   // _WX_HELPVIEW_H_
87 
88