]> code.citadel.org Git - citadel.git/commitdiff
Got message counts and flags in place
authorArt Cancro <ajc@citadel.org>
Sat, 8 May 1999 01:07:30 +0000 (01:07 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 8 May 1999 01:07:30 +0000 (01:07 +0000)
daphne/includes.hpp
daphne/roomview.cpp

index 75dd2ee601e99eef22acaefbffd7f38e434d6122..ee64cdd9f6f86a48fde47c88d30d0fda37ec3ea9 100644 (file)
@@ -271,6 +271,10 @@ private:
         wxPanel *banner;
         wxButton *close_button;
        wxString ThisRoom;
+       unsigned int RoomFlags;
+       unsigned int new_messages;
+       unsigned int total_messages;
+       bool is_roomaide;
        DECLARE_EVENT_TABLE()
 };
 
index 023a37bc8b43a40efddef134ef360644121c8cf9..1096a60a6bb7cbfe79de59c8b52426de64cf69ef 100644 (file)
@@ -43,7 +43,15 @@ RoomView::RoomView(
                delete this;
        }
 
+
+       // Learn more about this room by sending away for a free brochure,
+       // or by simply parsing the returned parameters from GotoRoom().
+       //
        extract(ThisRoom, recvcmd.Mid(4), 0);   // actual name of room
+       new_messages = extract_int(recvcmd.Mid(4), 1);
+       total_messages = extract_int(recvcmd.Mid(4), 2);
+       is_roomaide = (extract_int(recvcmd.Mid(4), 8) ? TRUE : FALSE);
+
        SetTitle(ThisRoom);     // FIX why doesn't this work?
 
        SetAutoLayout(TRUE);
@@ -61,6 +69,7 @@ RoomView::RoomView(
        b1->height.PercentOf(this, wxHeight, 25);
        banner->SetConstraints(b1);
 
+       // Room name in the banner
        wxStaticText *rname = new wxStaticText(banner, -1, ThisRoom);
        rname->SetFont(wxFont(18, wxDEFAULT, wxNORMAL, wxNORMAL));
        rname->SetForegroundColour(wxColour(0xFF, 0xFF, 0x00));
@@ -72,6 +81,20 @@ RoomView::RoomView(
        b2->height.PercentOf(banner, wxHeight, 50);
        rname->SetConstraints(b2);
 
+       // Message counts in the banner
+       wxString *mcount_text = new wxString;
+       mcount_text->Printf("%d messages\n%d new",
+               total_messages, new_messages);
+       wxStaticText *mcount = new wxStaticText(banner, -1, *mcount_text);
+
+       wxLayoutConstraints *c0 = new wxLayoutConstraints;
+       c0->top.Below(rname, 5);
+       c0->left.SameAs(rname, wxLeft);
+       c0->width.AsIs();
+       c0->height.AsIs();
+       mcount->SetConstraints(c0);
+
+       // HTML window containing room info blurb
        wxHtmlWindow *roominfo = new wxHtmlWindow(banner);
 
        wxLayoutConstraints *b3 = new wxLayoutConstraints;
@@ -81,6 +104,7 @@ RoomView::RoomView(
        b3->left.PercentOf(banner, wxWidth, 67);
        roominfo->SetConstraints(b3);
 
+       // Buttons
        close_button = new wxButton(
                this,
                BUTTON_CLOSE,