A self-contained chat widget.
More...
#include <SimpleChatWidget.h>
A self-contained chat widget.
Definition at line 34 of file SimpleChatWidget.h.
Create a chat widget that will connect to the given server.
Definition at line 26 of file SimpleChatWidget.C.
SimpleChatWidget::~SimpleChatWidget |
( |
| ) |
|
void SimpleChatWidget::connect |
( |
| ) |
|
void SimpleChatWidget::disconnect |
( |
| ) |
|
void SimpleChatWidget::letLogin |
( |
| ) |
|
bool SimpleChatWidget::loggedIn |
( |
| ) |
const |
|
protected |
void SimpleChatWidget::login |
( |
| ) |
|
|
private |
void SimpleChatWidget::logout |
( |
| ) |
|
void SimpleChatWidget::newMessage |
( |
| ) |
|
|
protectedvirtual |
void SimpleChatWidget::processChatEvent |
( |
const ChatEvent & |
event | ) |
|
|
private |
Definition at line 172 of file SimpleChatWidget.C.
174 if (flags & RenderFull) {
180 +
messages_->jsRef() +
".scrollHeight;}, 0);");
184 WContainerWidget::render(flags);
void SimpleChatWidget::send |
( |
| ) |
|
|
private |
bool SimpleChatWidget::startChat |
( |
const Wt::WString & |
user | ) |
|
Start a chat for the given user.
Returns false if the user could not login.
Definition at line 187 of file SimpleChatWidget.C.
209 messages_->setOverflow(WContainerWidget::OverflowAuto);
210 userList_->setOverflow(WContainerWidget::OverflowAuto);
230 (
"function(o, e) { setTimeout(function() {"
249 (
"<div><span class='chat-info'>You are joining as "
250 + escapeText(
user_) +
".</span></div>",
264 if (!logoutButton->parent())
void SimpleChatWidget::updateUser |
( |
| ) |
|
|
private |
void SimpleChatWidget::updateUsers |
( |
| ) |
|
|
protectedvirtual |
Reimplemented in PopupChatWidget.
Definition at line 280 of file SimpleChatWidget.C.
290 for (SimpleChatServer::UserSet::iterator i = users.begin();
291 i != users.end(); ++i) {
295 UserMap::const_iterator j = oldUsers.find(*i);
296 if (j != oldUsers.end())
int SimpleChatWidget::userCount |
( |
| ) |
|
|
inline |
const Wt::WString& SimpleChatWidget::userName |
( |
| ) |
const |
|
inline |
bool SimpleChatWidget::loggedIn_ |
|
private |
The documentation for this class was generated from the following files: