Wt examples  4.0.0
PopupChatWidget.h
Go to the documentation of this file.
1 // This may look like C code, but it's really -*- C++ -*-
2 /*
3  * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 
8 #ifndef POPUP_CHATWIDGET_H_
9 #define POPUP_CHATWIDGET_H_
10 
11 #include "SimpleChatWidget.h"
12 
17 
21 {
22 public:
23  PopupChatWidget(SimpleChatServer& server, const std::string& id);
24 
25  void setName(const Wt::WString& name);
26 
27 protected:
28  virtual void createLayout(std::unique_ptr<WWidget> messages, std::unique_ptr<WWidget> userList,
29  std::unique_ptr<WWidget> messageEdit,
30  std::unique_ptr<WWidget> sendButton, std::unique_ptr<WWidget> logoutButton);
31 
32  virtual void updateUsers();
33  virtual void newMessage();
34 
35 private:
41 
42  void toggleSize();
43  void goOnline();
44  bool minimized() const;
45 
46  std::unique_ptr<Wt::WContainerWidget> createBar();
47 };
48 
51 #endif // POPUP_CHATWIDGET_H_
virtual void newMessage()
Wt::WText * title_
SimpleChatServer & server()
A self-contained chat widget.
Wt::WString name_
virtual void updateUsers()
std::unique_ptr< Wt::WContainerWidget > createBar()
Wt::WWidget * bar_
bool minimized() const
A popup chat widget.
virtual void createLayout(std::unique_ptr< WWidget > messages, std::unique_ptr< WWidget > userList, std::unique_ptr< WWidget > messageEdit, std::unique_ptr< WWidget > sendButton, std::unique_ptr< WWidget > logoutButton)
PopupChatWidget(SimpleChatServer &server, const std::string &id)
A simple chat server.
void setName(const Wt::WString &name)

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11