Classes | |
class | ChatApplication |
A chat demo application. More... | |
class | ChatEvent |
Encapsulate a chat event. More... | |
class | SimpleChatServer |
A simple chat server. More... | |
class | SimpleChatWidget |
A self-contained chat widget. More... | |
Functions | |
WApplication * | createApplication (const WEnvironment &env) |
int | main (int argc, char **argv) |
ChatApplication::ChatApplication (const WEnvironment &env) | |
Create a new instance. | |
void | ChatApplication::addChatWidget () |
Add another chat client. | |
Variables | |
SimpleChatServer | theServer |
The single chat server instance. |
void ChatApplication::addChatWidget | ( | ) | [private, inherited] |
Add another chat client.
Definition at line 60 of file simpleChat.C.
{ SimpleChatWidget *chatWidget2 = new SimpleChatWidget(theServer, root()); chatWidget2->setStyleClass("chat"); }
ChatApplication::ChatApplication | ( | const WEnvironment & | env ) | [inherited] |
Create a new instance.
Definition at line 41 of file simpleChat.C.
: WApplication(env) { setTitle("Wt Chat"); useStyleSheet("simplechat.css"); messageResourceBundle().use("simplechat"); root()->addWidget(new WText(WString::tr("introduction"))); SimpleChatWidget *chatWidget = new SimpleChatWidget(theServer, root()); chatWidget->setStyleClass("chat"); root()->addWidget(new WText(WString::tr("details"))); WPushButton *b = new WPushButton("I'm schizophrenic ...", root()); b->clicked().connect(SLOT(b, WPushButton::hide)); b->clicked().connect(SLOT(this, ChatApplication::addChatWidget)); }
WApplication* createApplication | ( | const WEnvironment & | env ) |
Definition at line 66 of file simpleChat.C.
{ return new ChatApplication(env); }
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 71 of file simpleChat.C.
{ return WRun(argc, argv, &createApplication); }
The single chat server instance.
Definition at line 24 of file simpleChat.C.