Koen Deforche c702bb008b Several changes: преди 9 години
..
icons c70f73a287 see Changelog преди 14 години
sounds c96f650dba prepping 2.99.5 преди 15 години
CMakeLists.txt c70f73a287 see Changelog преди 14 години
PopupChatWidget.C 25bc507f5e implemented WTreeView/WTableView events outside items преди 12 години
PopupChatWidget.h c680a57226 improvements to chatwidget, documentation updates преди 13 години
README.md 8455fb6ae2 added README.md files for examples, several bug fixes преди 13 години
SimpleChatServer.C f2a7d4ebb3 fix chat formatting bug, WAxis.C issue with singular date(time) преди 13 години
SimpleChatServer.h f2a7d4ebb3 fix chat formatting bug, WAxis.C issue with singular date(time) преди 13 години
SimpleChatWidget.C c702bb008b Several changes: преди 9 години
SimpleChatWidget.h 1aca2f1d32 Several changes: преди 10 години
chatapp.css c70f73a287 see Changelog преди 14 години
chatwidget.css eedfab588f widget gallery and homepage updates преди 11 години
chatwidget_ie6.css 8ff5005fde see Changelog преди 14 години
simpleChat.C 8eef8af388 Several changes: преди 10 години
simplechat.xml eedfab588f widget gallery and homepage updates преди 11 години
simplechat_ru.xml 41541a3b9c remove openssl requirement for md5 преди 14 години

README.md

Simplechat example

The simplechat example is a simple multi-user client + server. It is simple in many ways, including the constraint that all sessions run in the same process (it does not use inter-process communication), and that the client does not have any advanced functions.

The example can be run as a plain Wt application, but also as a widget set widget, which is a popup chat box that sits in the bottom right of the browser window, and can be integrated easily in another website. See the blog post for more information.

How to run

See the README in the parent directory.

What it illustrates

  • how to use server push, and post events to sessions using WServer::post() how to reuse a single widget to have two different
  • UI experiences (as a normal widget, or as a compact real-estate conserving widget for the chat popup)
  • how Wt supports Cross-Origin requests to implement widget set mode
  • the use of layout managers (WVBoxLayout and WHBoxLayout)
  • how to play small UI sounds using WSound
  • how to connect client-side JavaScript to a signal, to react to certain events
  • how to implement a method in client-side JavaScript using implementJavaScript()
  • how to safely render user-entered HTML without risking XSS