File: client.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 (85 lines) | stat: -rw-r--r-- 2,088 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
/////////////////////////////////////////////////////////////////////////////
// Name:        client.h
// Purpose:     Remote help sample client
// Author:      Julian Smart
// Modified by: Eric Dowty
// Created:     2002-11-18
// Copyright:   (c) Julian Smart
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

// Define a new application
class MyApp: public wxApp
{
public:
    virtual bool OnInit();
    virtual int OnExit();

#if defined(USE_REMOTE)
    wxRemoteHtmlHelpController *m_help;
#else
    wxHtmlHelpController *m_help;
#endif
};

DECLARE_APP(MyApp)

// Define a new frame
class MyFrame: public wxFrame
{
public:
    MyFrame(wxFrame *frame, const wxString& title);

private:
    void OnExit(wxCommandEvent& event);
    void OnHelp_Main(wxCommandEvent& event);
    void OnHelp_Book1(wxCommandEvent& event);
    void OnHelp_Book2(wxCommandEvent& event);
    void OnHelp_Index(wxCommandEvent& event);
    void OnHelp_Contents(wxCommandEvent& event);
    void OnHelp_Search(wxCommandEvent& event);
    void OnHelp_Title(wxCommandEvent& event);
    void OnHelp_Addbook(wxCommandEvent& event);
    void OnHelp_Tempdir(wxCommandEvent& event);
    void OnHelp_Quitserver(wxCommandEvent& event);

    void ModalDlg(wxCommandEvent& event);

    wxPanel *m_panel;
    wxButton *m_modalbutton;

    DECLARE_EVENT_TABLE()
};

class MyModalDialog : public wxDialog
{
public:
    MyModalDialog(wxWindow *parent);

private:
    void OnButton(wxCommandEvent& event);

    wxButton *m_main;
    wxButton *m_book1;
    wxButton *m_book2;

    DECLARE_EVENT_TABLE()
};


#define CLIENT_QUIT     wxID_EXIT
#define CLIENT_EXECUTE  2
#define CLIENT_REQUEST  3
#define CLIENT_POKE     4
#define CLIENT_HELPMAIN     5
#define CLIENT_HELPBOOK1     6
#define CLIENT_HELPBOOK2     7
#define DIALOG_MODAL     8
#define BUTTON_MODAL     9
#define CLIENT_HELPINDEX 10
#define CLIENT_HELPCONTENTS 11
#define CLIENT_HELPSEARCH 12
#define CLIENT_HELPTITLE 13
#define CLIENT_HELPADDBOOK 14
#define CLIENT_HELPTEMPDIR 15
#define CLIENT_HELPQUIT 16