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.
00061 { 00062 SimpleChatWidget *chatWidget2 = new SimpleChatWidget(theServer, root()); 00063 chatWidget2->setStyleClass("chat"); 00064 }
ChatApplication::ChatApplication | ( | const WEnvironment & | env | ) | [inherited] |
Create a new instance.
Definition at line 41 of file simpleChat.C.
00042 : WApplication(env) 00043 { 00044 setTitle("Wt Chat"); 00045 useStyleSheet("simplechat.css"); 00046 messageResourceBundle().use("simplechat"); 00047 00048 root()->addWidget(new WText(WString::tr("introduction"))); 00049 00050 SimpleChatWidget *chatWidget = new SimpleChatWidget(theServer, root()); 00051 chatWidget->setStyleClass("chat"); 00052 00053 root()->addWidget(new WText(WString::tr("details"))); 00054 00055 WPushButton *b = new WPushButton("I'm schizophrenic ...", root()); 00056 b->clicked().connect(SLOT(b, WPushButton::hide)); 00057 b->clicked().connect(SLOT(this, ChatApplication::addChatWidget)); 00058 }
WApplication* createApplication | ( | const WEnvironment & | env | ) |
Definition at line 66 of file simpleChat.C.
00067 { 00068 return new ChatApplication(env); 00069 }
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 71 of file simpleChat.C.
00072 { 00073 return WRun(argc, argv, &createApplication); 00074 }
The single chat server instance.
Definition at line 24 of file simpleChat.C.