SimpleChatWidget Class Reference
[Chat example]

A self-contained chat widget. More...

#include <SimpleChatWidget.h>

Inheritance diagram for SimpleChatWidget:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 SimpleChatWidget (SimpleChatServer &server, Wt::WContainerWidget *parent=0)
 Create a chat widget that will connect to the given server.
 ~SimpleChatWidget ()
 Delete a chat widget.
void letLogin ()
 Show a simple login screen.
bool startChat (const Wt::WString &user)
 Start a chat for the given user.

Private Member Functions

void login ()
void logout ()
void send ()
void updateUsers ()
void processChatEvent (const ChatEvent &event)
void onEditBlur ()
void onEditFocus ()

Private Attributes

SimpleChatServerserver_
Wt::WApplicationapp_
Wt::WString user_
Wt::WLineEdituserNameEdit_
Wt::WTextstatusMsg_
Wt::WContainerWidgetmessages_
Wt::WContainerWidgetmessageEditArea_
Wt::WTextAreamessageEdit_
Wt::WPushButtonsendButton_
Wt::WContainerWidgetuserList_
boost::signals::connection eventConnection_


Detailed Description

A self-contained chat widget.

Definition at line 31 of file SimpleChatWidget.h.


Constructor & Destructor Documentation

SimpleChatWidget::SimpleChatWidget ( SimpleChatServer server,
Wt::WContainerWidget parent = 0 
)

Create a chat widget that will connect to the given server.

Definition at line 26 of file SimpleChatWidget.C.

SimpleChatWidget::~SimpleChatWidget (  ) 

Delete a chat widget.

Definition at line 38 of file SimpleChatWidget.C.


Member Function Documentation

void SimpleChatWidget::letLogin (  ) 

Show a simple login screen.

Definition at line 43 of file SimpleChatWidget.C.

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 86 of file SimpleChatWidget.C.

void SimpleChatWidget::login (  )  [private]

Definition at line 68 of file SimpleChatWidget.C.

void SimpleChatWidget::logout (  )  [private]

Definition at line 76 of file SimpleChatWidget.C.

void SimpleChatWidget::send (  )  [private]

Definition at line 183 of file SimpleChatWidget.C.

void SimpleChatWidget::updateUsers (  )  [private]

Definition at line 195 of file SimpleChatWidget.C.

void SimpleChatWidget::processChatEvent ( const ChatEvent event  )  [private]

Definition at line 214 of file SimpleChatWidget.C.

void SimpleChatWidget::onEditBlur (  )  [private]

void SimpleChatWidget::onEditFocus (  )  [private]


Member Data Documentation

Definition at line 53 of file SimpleChatWidget.h.

Definition at line 54 of file SimpleChatWidget.h.

Definition at line 56 of file SimpleChatWidget.h.

Definition at line 58 of file SimpleChatWidget.h.

Definition at line 59 of file SimpleChatWidget.h.

Definition at line 61 of file SimpleChatWidget.h.

Definition at line 62 of file SimpleChatWidget.h.

Definition at line 63 of file SimpleChatWidget.h.

Definition at line 64 of file SimpleChatWidget.h.

Definition at line 65 of file SimpleChatWidget.h.

boost::signals::connection SimpleChatWidget::eventConnection_ [private]

Definition at line 67 of file SimpleChatWidget.h.


The documentation for this class was generated from the following files:

Generated on Fri Sep 12 16:53:53 2008 for Wt by doxygen 1.5.6