CFLAGS=`wx-config --cflags`
LFLAGS=`wx-config --libs`
-daphne: main.o citclient.o userlogin.o testwindow.o
- c++ main.o citclient.o userlogin.o testwindow.o $(LFLAGS) -o daphne
+daphne: main.o citclient.o userlogin.o testwindow.o who.o
+ c++ main.o citclient.o userlogin.o testwindow.o who.o \
+ $(LFLAGS) -o daphne
main.o: main.cpp
c++ -c $(CFLAGS) main.cpp
testwindow.o: testwindow.cpp
c++ -c $(CFLAGS) testwindow.cpp
+
+who.o: who.cpp
+ c++ -c $(CFLAGS) who.cpp
--- /dev/null
+// ============================================================================
+// declarations
+// ============================================================================
+
+
+#include <wx/wx.h>
+#include <wx/listctrl.h>
+#include "citclient.hpp"
+#include "who.hpp"
+
+// ----------------------------------------------------------------------------
+// private classes
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// IDs for the controls and the menu commands
+enum
+{
+ BUTTON_DISMISS
+};
+
+// ----------------------------------------------------------------------------
+// event tables and other macros for wxWindows
+// ----------------------------------------------------------------------------
+
+// the event tables connect the wxWindows events with the functions (event
+// handlers) which process them. It can be also done at run-time, but for the
+// simple menu events like this the static method is much simpler.
+BEGIN_EVENT_TABLE( who, wxMDIChildFrame)
+END_EVENT_TABLE()
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+
+// ----------------------------------------------------------------------------
+// the application class
+// ----------------------------------------------------------------------------
+
+// frame constructor
+who::who(CitClient *sock, wxMDIParentFrame *MyMDI)
+ : wxMDIChildFrame(MyMDI, //parent
+ -1, //window id
+ "Who is online?",
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxDEFAULT_FRAME_STYLE,
+ "who"
+ ) {
+
+ citsock = sock;
+
+ // set the frame icon
+ /* SetIcon(wxICON(mondrian)); */
+
+ wholist = new wxListCtrl(
+ this,
+ -1, // replace this eventually with something active
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxLC_REPORT, // multicolumn
+ wxDefaultValidator,
+ "wholist");
+
+
+ wxLayoutConstraints *c1 = new wxLayoutConstraints;
+ c1->top.SameAs(this, wxTop, 10); // 10 from the top
+ c1->bottom.SameAs(this, wxBottom, -10);
+ c1->left.SameAs(this, wxLeft, 10);
+ c1->right.SameAs(this, wxRight, -10);
+ wholist->SetConstraints(c1);
+
+ SetAutoLayout(TRUE);
+ Show(TRUE);
+}