]> git.saurik.com Git - wxWidgets.git/blame_incremental - 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
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>
19class hvServer;
20#endif
21
22/*!
23 * The helpview application class.
24 */
25
26class hvApp : public wxApp
27{
28public:
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
53private:
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
64class hvConnection : public wxConnection
65{
66public:
67 hvConnection();
68 virtual ~hvConnection();
69
70 bool OnExec(const wxString& topic, const wxString& data);
71 bool OnPoke(const wxString& topic, const wxString& item,
72 const void *data, size_t size, wxIPCFormat format);
73
74private:
75};
76
77class hvServer: public wxServer
78{
79public:
80 wxConnectionBase *OnAcceptConnection(const wxString& topic);
81};
82
83
84#endif
85
86#endif
87 // _WX_HELPVIEW_H_
88