#include "utils.h"
+// TCPsocket represents a socket-level TCP connection to a server.
class TCPsocket {
public:
TCPsocket::TCPsocket(void);
-
+// CitClient represents an application-level connection to a Citadel server.
class CitClient {
public:
CitClient(void);
};
-
+// Receive an express message (page)
class express_message : public wxFrame {
public:
express_message(CitClient *sock, wxString sender,
wxMDIParentFrame *citMyMDI;
DECLARE_EVENT_TABLE()
};
-// userlogin is the frame for logging in.
+
+
+
+// Just testing...
class TestWindow : public wxMDIChildFrame {
public:
TestWindow(CitClient *sock, wxMDIParentFrame *MyMDI);
CitClient *citsock;
DECLARE_EVENT_TABLE()
};
+
+
+
+
// userlogin is the frame for logging in.
class UserLogin : public wxMDIChildFrame {
public:
wxMDIParentFrame *citMyMDI;
DECLARE_EVENT_TABLE()
};
-// userlogin is the frame for logging in.
+
+
+// Who is online?
class who : public wxMDIChildFrame {
public:
who(CitClient *sock, wxMDIParentFrame *MyMDI);
void OnUsersMenu(wxCommandEvent& cmd);
void OnWindowMenu(wxCommandEvent& cmd);
wxButton *do_cmd;
+
+ who *TheWholist;
+
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
title, pos, size, wxDEFAULT_FRAME_STYLE
) {
+ TheWholist = NULL;
+
// create a menu bar
wxMenu *menuFile = new wxMenu;
menuFile->Append(MENU_CONNECT, "&Connect");
int id;
id = cmd.GetId();
- if (id == UMENU_WHO)
- new who(citadel, this);
+ if (id == UMENU_WHO) {
+ if (TheWholist == NULL)
+ TheWholist = new who(citadel, this);
+ else
+ TheWholist->Activate();
+ }
else if (id == UMENU_SEND_EXPRESS)
new SendExpress(citadel, this, NULL);
}