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

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