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