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