-
Notifications
You must be signed in to change notification settings - Fork 1
/
GUI-ChatMain.h
103 lines (80 loc) · 2.06 KB
/
GUI-ChatMain.h
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
93
94
95
96
97
98
99
100
101
102
103
#ifndef _RAIN_GUI_CHATMAIN_H
#define _RAIN_GUI_CHATMAIN_H
#include <wx/wx.h>
#include <wx/notebook.h>
#include "Message.h"
enum
{
ID_MENUEXIT = 201,
ID_MENUCONNECT,
ID_MENUDISCONNECT,
ID_MENUFORCEMANIFEST,
ID_MENUPREFS,
ID_UPDATESTATS,
ID_PINGPEER,
ID_TRACEPEER,
ID_DBGCONNECTION,
ID_DBGWIZARD,
ID_DBGADDFILES,
ID_HELPABOUT,
};
namespace RAIN
{
class SandboxApp;
namespace GUI
{
class ConnectionsWidget;
class PeersWidget;
class QueueWidget;
class FilesWidget;
class NetworkMonitor;
class Chat;
class ChatMain : public wxFrame, public RAIN::MessageHandler
{
public:
ChatMain(RAIN::SandboxApp *app);
~ChatMain();
void OnQuit(wxCommandEvent &e);
void OnPrefs(wxCommandEvent &e);
void OnConnect(wxCommandEvent &e);
void OnDisconnect(wxCommandEvent &e);
void OnManifestUpdate(wxCommandEvent &e);
void OnDbgConnProps(wxCommandEvent &e);
void OnDbgWizard(wxCommandEvent &e);
void OnDbgAddFiles(wxCommandEvent &e);
void OnAbout(wxCommandEvent &e);
void UpdateStats(wxCommandEvent &e);
void OnPingPeer(wxCommandEvent &e);
void OnTracePeer(wxCommandEvent &e);
void OnClose(wxCloseEvent &e);
void OnChatTextEnter(wxCommandEvent &e);
/* messagehandler impl */
void HandleMessage(RAIN::Message *msg);
int GetMessageHandlerID();
void Tick();
wxListBox* ConversationText;
NetworkMonitor* Network;
RAIN::GUI::QueueWidget* Queue;
DECLARE_EVENT_TABLE();
private:
RAIN::SandboxApp *app;
void set_properties();
void do_layout();
protected:
RAIN::GUI::ConnectionsWidget* Connections;
RAIN::GUI::PeersWidget* Peers;
RAIN::GUI::FilesWidget* Files;
RAIN::GUI::Chat *Chat;
wxButton* UpdateButton, *PingButton, *TracerouteButton;
wxPanel* FilesPage;
wxPanel* ChatPage;
wxPanel* ConnectionsPage;
wxPanel* QueuePage;
wxPanel* LogPage;
wxNotebook* Notebook;
wxMenuBar* MenuBar;
};
};
};
#include "RainSandboxApp.h"
#endif//_RAIN_GUI_CHATMAIN_H