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