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

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