]> code.citadel.org Git - citadel.git/commitdiff
Got tabbed traversal in place
authorArt Cancro <ajc@citadel.org>
Sat, 24 Apr 1999 01:39:18 +0000 (01:39 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 24 Apr 1999 01:39:18 +0000 (01:39 +0000)
daphne/Makefile
daphne/enter.cpp
daphne/express_message.cpp
daphne/includes.hpp
daphne/main.cpp
daphne/roomview.cpp
daphne/send_express.cpp
daphne/testwindow.cpp
daphne/userlogin.cpp
daphne/who.cpp

index 8c12c55f6a353bfd5fa3620923072f35e3cce267..ed76547feb32de6956e43dddd5ee04e0291c9192 100644 (file)
@@ -12,10 +12,10 @@ all: daphne
 
 
 daphne: main.o citclient.o userlogin.o testwindow.o who.o \
-       utils.o express_message.o send_express.o \
+       utils.o express_message.o send_express.o prefs.o \
        roomtree.o roomview.o tcp_sockets.o message.o enter.o
        c++ main.o citclient.o userlogin.o testwindow.o who.o \
-       utils.o express_message.o send_express.o \
+       utils.o express_message.o send_express.o prefs.o \
        roomtree.o roomview.o tcp_sockets.o message.o enter.o \
        $(LFLAGS) -o daphne
 
index 9d29adfdbc5d8d054ee4c3fd66dffa35edb42fa2..00751e72bbbf5e830b88fee2b2ee50618e6b52d7 100644 (file)
@@ -20,7 +20,7 @@ EnterMessage::EnterMessage(
                        roomname + ": enter message",
                        wxDefaultPosition,
                        wxDefaultSize,
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        roomname
                        ) {
 
index 4e316a65451e01b9b41e7a3b67c2b2c3d1a2d253..add1bf33fbcfc11597e7a4586f15d38dacb5786b 100644 (file)
@@ -52,7 +52,7 @@ express_message::express_message(
                        "Express message",
                        wxDefaultPosition,
                        wxSize(500, 200),
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        "express_message"
                        ) {
 
index d5c260c072275703814dfbedc97537e6a8ef4b30..0be933f4af2988140dd94110d9d876b62b9a3d85 100644 (file)
@@ -133,6 +133,20 @@ private:
 };
 
 
+// Preferences for the application.
+
+class Preferences : public wxMDIChildFrame {
+public:
+       Preferences(    CitClient *sock,
+                       wxMDIParentFrame *MyMDI);
+private:
+       void OnButtonPressed(wxCommandEvent& whichbutton);
+       CitClient *citsock;
+       wxMDIParentFrame *citMyMDI;
+       DECLARE_EVENT_TABLE()
+};
+
+
 
 // Just testing...
 class TestWindow : public wxMDIChildFrame {
index 9b43b2f7159248b6f69872ffde077d7b89076701..275566685ea0ae1bb2a5586b2e95b7f7060949bd 100644 (file)
@@ -56,6 +56,7 @@ private:
        void OnConnect(wxCommandEvent& event);
        void OnGotoMail(wxCommandEvent& event);
        void OnTestWin(wxCommandEvent& event);
+       void OnEditMenu(wxCommandEvent& cmd);
        void OnUsersMenu(wxCommandEvent& cmd);
        void OnRoomsMenu(wxCommandEvent& cmd);
         void MyFrame::OnSize(wxSizeEvent& event);
@@ -81,6 +82,7 @@ enum
        IG_Text,
        MENU_CONNECT,
        MENU_TESTWIN,
+       EMENU_PREFS,
        UMENU_WHO,
        UMENU_SEND_EXPRESS,
        RMENU_GOTO,
@@ -100,6 +102,7 @@ BEGIN_EVENT_TABLE(  MyFrame, wxMDIParentFrame)
        EVT_MENU(       IG_Quit,                MyFrame::OnQuit)
        EVT_MENU(       IG_About,               MyFrame::OnAbout)
        EVT_MENU(       MENU_CONNECT,           MyFrame::OnConnect)
+       EVT_MENU(       EMENU_PREFS,            MyFrame::OnEditMenu)
        EVT_MENU(       GOTO_MAIL,              MyFrame::OnGotoMail)
        EVT_MENU(       MENU_TESTWIN,           MyFrame::OnTestWin)
        EVT_MENU(       UMENU_WHO,              MyFrame::OnUsersMenu)
@@ -167,7 +170,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
        : wxMDIParentFrame(
                (wxMDIParentFrame *)NULL,
                -1,
-               title, pos, size, wxDEFAULT_FRAME_STYLE
+               title, pos, size, wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL
                ) {
 
        TheWholist = NULL;
@@ -192,6 +195,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
        menuFile->Append(IG_Quit, "E&xit");
 
        wxMenu *menuEdit = new wxMenu;
+       menuEdit->Append(EMENU_PREFS, "&Preferences...");
 
        wxMenu *menuUsers = new wxMenu;
        menuUsers->Append(UMENU_WHO, "&Who is online?");
@@ -311,6 +315,18 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
        cleanup(0);
 }
 
+
+// Edit menu handler
+void MyFrame::OnEditMenu(wxCommandEvent& cmd) {
+       int id;
+       id = cmd.GetId();
+       if (id == EMENU_PREFS) {
+               new Preferences(citadel, this);
+       }
+}
+
+
+
 // User menu handler
 void MyFrame::OnUsersMenu(wxCommandEvent& cmd) {
        int id;
index 1e6c0fcab41483aca20e75cf311f1a3385fc9bff..71676260c5cfad238eab2a424e141f0e1fc2aa30 100644 (file)
@@ -30,7 +30,7 @@ RoomView::RoomView(
                        roomname,
                        wxDefaultPosition,
                        wxDefaultSize,
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        roomname
                        ) {
 
index 5a0931a5eb74200e155f2b66610993f1a5bae314..a5b156124210224100426a84a3cecbc6d65e3f9a 100644 (file)
@@ -45,7 +45,7 @@ SendExpress::SendExpress(     CitClient *sock,
                        " Page another user ",
                        wxDefaultPosition,
                        wxDefaultSize,
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        "SendExpress"
                        ) {
 
index 6ea98c3fb122dc161dd424fb7369d70bfad77d92..b7fc420957b03436af0681668b21c0cf1a9205e1 100644 (file)
@@ -47,7 +47,7 @@ TestWindow::TestWindow(CitClient *sock, wxMDIParentFrame *MyMDI)
                        "Test Window",
                        wxDefaultPosition,
                        wxDefaultSize,
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        "TestWindow"
                        ) {
 
index 003a853e69c2a85e24caf543a03964311b603e3e..356ca7bc03a21096c8054248fc056d3fbc3c5c65 100644 (file)
@@ -51,7 +51,7 @@ UserLogin::UserLogin(CitClient *sock, wxMDIParentFrame *MyMDI)
                        " Please log in ",
                        wxDefaultPosition,
                        wxDefaultSize,
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        "UserLogin"
                        ) {
 
index 46b9d4e7e9eb4ac2e211fe431eab3f6038cb38a8..e7e0e17e9ceb4fc74f4ae21aece2f0ce1592fe14 100644 (file)
@@ -44,7 +44,7 @@ who::who(CitClient *sock, wxMDIParentFrame *MyMDI)
                        "Who is online?",
                        wxDefaultPosition,
                        wxDefaultSize,
-                       wxDEFAULT_FRAME_STYLE,
+                       wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL,
                        "who"
                        ) {