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