Wt examples: /home/koen/project/wt/public-git/wt/examples/simplechat/PopupChatWidget.h Source File

Wt examples 3.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

/home/koen/project/wt/public-git/wt/examples/simplechat/PopupChatWidget.h
Go to the documentation of this file.

    00001 // This may look like C code, but it's really -*- C++ -*-
    00002 /*
    00003  * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
    00004  *
    00005  * See the LICENSE file for terms of use.
    00006  */
    00007
    00008 #ifndef POPUP_CHATWIDGET_H_
    00009 #define POPUP_CHATWIDGET_H_
    00010
    00011 #include "SimpleChatWidget.h"
    00012
    00017
    00020 class PopupChatWidget : public SimpleChatWidget
    00021 {
    00022 public:
    00023   PopupChatWidget(SimpleChatServer& server, const std::string& id);
    00024
    00025   void setName(const Wt::WString& name);
    00026
    00027 protected:
    00028   virtual void createLayout(Wt::WWidget *messages, Wt::WWidget *userList,
    00029                             Wt::WWidget *messageEdit,
    00030                             Wt::WWidget *sendButton, Wt::WWidget *logoutButton);
    00031
    00032   virtual void updateUsers();
    00033   virtual void newMessage();
    00034
    00035 private:
    00036   Wt::WString name_;
    00037   Wt::WText *title_;
    00038   Wt::WWidget *bar_;
    00039   bool online_, minimized_;
    00040   int missedMessages_;
    00041
    00042   void toggleSize();
    00043   void goOnline();
    00044   bool minimized() const;
    00045
    00046   Wt::WContainerWidget *createBar();
    00047 };
    00048
    00051 #endif // POPUP_CHATWIDGET_H_