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