Browser-Generated Events in Wt

This section demonstrates the basic events that an application can receive from the browser: mouse events, keyboard events and drag and drop events. These events are generated by every widget that inherits from WInteractWidget, which most widgets do. When listening for these events, the browser forwards these events to the server, and the slots bound to the corresponding signals are invoked. As such, a Wt application can react to events entirely in C++ code.

Specific widgets emit of course events specific to their functionality. A WTreeNode for example can be expanded, collapsed, or selected. Each of these actions is causes a signal to be emitted. Refer to the reference documentation of the widget you are working with to find out what signals a widget emits.

For a generic overview of events in Wt, including a description of the client-side event handling (avoids round-trip to the server) and how to write your own JavaScript events, please take a look in the library overview.

Events will be shown here.