Wt examples
4.10.4
Loading...
Searching...
No Matches
simplechat
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 bv, Herent, 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
20
class
PopupChatWidget
:
public
SimpleChatWidget
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
:
36
Wt::WString
name_
;
37
Wt::WText *
title_
;
38
Wt::WWidget *
bar_
;
39
bool
online_
,
minimized_
;
40
int
missedMessages_
;
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_
UserDatabase
Wt::Auth::Dbo::UserDatabase< AuthInfo > UserDatabase
Definition
Session.h:22
SimpleChatWidget.h
PopupChatWidget
A popup chat widget.
Definition
PopupChatWidget.h:21
PopupChatWidget::online_
bool online_
Definition
PopupChatWidget.h:39
PopupChatWidget::newMessage
virtual void newMessage()
Definition
PopupChatWidget.C:156
PopupChatWidget::PopupChatWidget
PopupChatWidget(SimpleChatServer &server, const std::string &id)
Definition
PopupChatWidget.C:19
PopupChatWidget::minimized_
bool minimized_
Definition
PopupChatWidget.h:39
PopupChatWidget::createBar
std::unique_ptr< Wt::WContainerWidget > createBar()
Definition
PopupChatWidget.C:69
PopupChatWidget::setName
void setName(const Wt::WString &name)
Definition
PopupChatWidget.C:53
PopupChatWidget::toggleSize
void toggleSize()
Definition
PopupChatWidget.C:89
PopupChatWidget::name_
Wt::WString name_
Definition
PopupChatWidget.h:36
PopupChatWidget::updateUsers
virtual void updateUsers()
Definition
PopupChatWidget.C:136
PopupChatWidget::bar_
Wt::WWidget * bar_
Definition
PopupChatWidget.h:38
PopupChatWidget::createLayout
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)
Definition
PopupChatWidget.C:118
PopupChatWidget::minimized
bool minimized() const
Definition
PopupChatWidget.C:166
PopupChatWidget::goOnline
void goOnline()
Definition
PopupChatWidget.C:94
PopupChatWidget::missedMessages_
int missedMessages_
Definition
PopupChatWidget.h:40
PopupChatWidget::title_
Wt::WText * title_
Definition
PopupChatWidget.h:37
SimpleChatServer
A simple chat server.
Definition
SimpleChatServer.h:85
SimpleChatWidget
A self-contained chat widget.
Definition
SimpleChatWidget.h:28
SimpleChatWidget::server
SimpleChatServer & server()
Definition
SimpleChatWidget.h:54
Generated on Sat May 11 2024 for
the C++ Web Toolkit (Wt)
by
1.10.0