]> git.saurik.com Git - wxWidgets.git/blame - utils/helpview/src/helpview.h
Don't use a destroy event handler to disconnect the native control's delegate as...
[wxWidgets.git] / utils / helpview / src / helpview.h
CommitLineData
4e4152e4
JS
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
62d1f48b 15#define hvVERSION 1.04
2b5f62a0 16
62d1f48b 17#if wxUSE_IPC
2b5f62a0 18#include <wx/ipc.h>
2b5f62a0
VZ
19class hvServer;
20#endif
21
22/*!
23 * The helpview application class.
24 */
25
4e4152e4
JS
26class hvApp : public wxApp
27{
2b5f62a0
VZ
28public:
29 hvApp();
30
31 /// Initialise the application.
32 virtual bool OnInit();
33
34 /// Clean up the application's data.
35 virtual int OnExit();
d9b21c9f
JS
36
37#ifdef __WXMAC__
38 /// Respond to Apple Event for opening a document
39 virtual void MacOpenFile(const wxString& filename);
40#endif
41
2b5f62a0
VZ
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
62d1f48b 48#if wxUSE_IPC
2b5f62a0
VZ
49 /// Returns the list of connections.
50 wxList& GetConnections() { return m_connections; }
51#endif
4e4152e4 52
2b5f62a0
VZ
53private:
54 wxHtmlHelpController* m_helpController;
6d74e300 55
62d1f48b 56#if wxUSE_IPC
2b5f62a0
VZ
57 wxList m_connections;
58 hvServer* m_server;
59#endif
6d74e300 60
2b5f62a0
VZ
61};
62
62d1f48b 63#if wxUSE_IPC
2b5f62a0
VZ
64class hvConnection : public wxConnection
65{
66public:
67 hvConnection();
d3c7fc99 68 virtual ~hvConnection();
4e4152e4 69
587b4c84 70 bool OnExec(const wxString& topic, const wxString& data);
bcb6619f
VZ
71 bool OnPoke(const wxString& topic, const wxString& item,
72 const void *data, size_t size, wxIPCFormat format);
4e4152e4 73
2b5f62a0
VZ
74private:
75};
4e4152e4 76
2b5f62a0
VZ
77class hvServer: public wxServer
78{
79public:
80 wxConnectionBase *OnAcceptConnection(const wxString& topic);
4e4152e4
JS
81};
82
2b5f62a0
VZ
83
84#endif
85
4e4152e4
JS
86#endif
87 // _WX_HELPVIEW_H_
88