]> git.saurik.com Git - wxWidgets.git/blob - utils/helpview/src/remhelp.h
Assert correction.
[wxWidgets.git] / utils / helpview / src / remhelp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: remhelp.h
3 // Purpose: Remote help controller class
4 // Author: Eric Dowty
5 // Modified by:
6 // Created: 2002-11-18
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #if defined(__GNUG__) && !defined(__APPLE__)
13 #pragma interface remhelp.h
14 #endif
15
16 #ifndef _WX_REMHELP_H_
17 #define _WX_REMHELP_H_
18
19 #include <wx/helpbase.h>
20 #include <wx/ipc.h>
21 #include <wx/html/helpctrl.h>
22
23 class WXDLLEXPORT wxConfigBase;
24
25 class rhhcConnection : public wxConnection
26 {
27 public:
28 rhhcConnection(bool *isconn_a);
29 ~rhhcConnection();
30
31 bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format);
32 bool OnDisconnect();
33 bool *isconn_3;
34
35 };
36
37 class rhhcClient: public wxClient
38 {
39 public:
40 rhhcClient(bool *isconn_a);
41 //~rhhcClient( );
42 wxConnectionBase *OnMakeConnection();
43 bool *isconn_2;
44 };
45
46 class wxRemoteHtmlHelpController : public wxHelpControllerBase
47 {
48 DECLARE_CLASS(wxRemoteHtmlHelpController)
49 public:
50 wxRemoteHtmlHelpController(int style = wxHF_DEFAULT_STYLE);
51 ~wxRemoteHtmlHelpController();
52 void OnQuit(void);
53
54 void SetService(wxString& a_service);
55 void SetServer(wxString& a_appname); //could be wxHelpController::SetViewer
56
57 //standard wxHtmlHelpController functions
58 bool AddBook(const wxString& book, bool show_wait_msg = false);
59 void Display(const wxString& x);
60 void Display(const int id);
61 bool DisplayContents();
62 void DisplayIndex();
63 bool KeywordSearch(const wxString& keyword);
64 void SetTempDir(const wxString& path);
65 void SetTitleFormat(const wxString& format);
66
67 //dummies - config is in server
68 void UseConfig(wxConfigBase* config, const wxString& rootpath = wxEmptyString) {};
69 void ReadCustomization(wxConfigBase* cfg, wxString path = wxEmptyString) {};
70 void WriteCustomization(wxConfigBase* cfg, wxString path = wxEmptyString) {};
71
72 //virtuals from wxHelpControllerBase - not in wxHtmlHelpController
73 //won't compile without these
74 bool LoadFile(const class wxString &); //dummy
75 bool DisplaySection(int);
76 bool DisplayBlock(long);
77 bool Quit(void);
78
79 private:
80 void OnExit(wxCommandEvent& event);
81 bool DoConnection();
82
83 rhhcConnection *m_connection;
84 rhhcClient *m_client;
85 wxProcess *m_process;
86
87 int m_pid;
88 int m_style;
89 wxString m_appname;
90 wxString m_service;
91 wxString m_windowname;
92 wxString m_book;
93 bool isconn_1;
94 };
95
96 #endif
97 // _WX_REMHELP_H_