File: remhelp.h

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (92 lines) | stat: -rw-r--r-- 2,592 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/////////////////////////////////////////////////////////////////////////////
// Name:        remhelp.h
// Purpose:     Remote help controller class
// Author:      Eric Dowty
// Modified by:
// Created:     2002-11-18
// Copyright:   (c) Julian Smart
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_REMHELP_H_
#define _WX_REMHELP_H_

#include <wx/helpbase.h>
#include <wx/ipc.h>
#include <wx/html/helpctrl.h>

class WXDLLIMPEXP_FWD_BASE wxConfigBase;

class rhhcConnection : public wxConnection
{
public:
    rhhcConnection(bool *isconn_a);
    virtual ~rhhcConnection();

    bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format);
    bool OnDisconnect();
    bool *isconn_3;

};

class rhhcClient: public wxClient
{
public:
    rhhcClient(bool *isconn_a);
        //~rhhcClient( );
    wxConnectionBase *OnMakeConnection();
    bool *isconn_2;
};

class wxRemoteHtmlHelpController : public wxHelpControllerBase
{
    DECLARE_CLASS(wxRemoteHtmlHelpController)
public:
    wxRemoteHtmlHelpController(int style = wxHF_DEFAULT_STYLE);
    virtual ~wxRemoteHtmlHelpController();
    void OnQuit(void);

    void SetService(wxString& a_service);
    void SetServer(wxString& a_appname); //could be wxHelpController::SetViewer

    //standard wxHtmlHelpController functions
    bool AddBook(const wxString& book, bool show_wait_msg = false);
    void Display(const wxString& x);
    void Display(const int id);
    bool DisplayContents();
    void DisplayIndex();
    bool KeywordSearch(const wxString& keyword);
    void SetTempDir(const wxString& path);
    void SetTitleFormat(const wxString& format);

    //dummies - config is in server
    void UseConfig(wxConfigBase* config, const wxString& rootpath = wxEmptyString) {};
    void ReadCustomization(wxConfigBase* cfg, wxString path = wxEmptyString) {};
    void WriteCustomization(wxConfigBase* cfg, wxString path = wxEmptyString) {};

    //virtuals from wxHelpControllerBase - not in wxHtmlHelpController
    //won't compile without these
    bool LoadFile(const class wxString &); //dummy
    bool DisplaySection(int);
    bool DisplayBlock(long);
    bool Quit(void);

private:
    void OnExit(wxCommandEvent& event);
    bool DoConnection();

    rhhcConnection *m_connection;
    rhhcClient *m_client;
    wxProcess *m_process;

    int m_pid;
    int m_style;
    wxString m_appname;
    wxString m_service;
    wxString m_windowname;
    wxString m_book;
    bool isconn_1;
};

#endif
    // _WX_REMHELP_H_