Wt examples 3.1.10
|
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); 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 00034 private: 00035 Wt::WString name_; 00036 Wt::WText *title_; 00037 bool online_; 00038 00039 void toggleSize(); 00040 void minimize(); 00041 void maximize(); 00042 00043 Wt::WContainerWidget *createBar(); 00044 }; 00045 00048 #endif // POPUP_CHATWIDGET_H_