Classes | |
class | Wt::WMouseEvent |
A class providing details for a mouse event. More... | |
class | Wt::WKeyEvent |
A class providing details for a keyboard event. More... | |
class | Wt::WDropEvent |
A class providing details for a drop event. More... | |
class | Wt::WScrollEvent |
A class providing details for a scroll event. More... | |
class | Wt::JSignal< A1, A2, A3, A4, A5, A6 > |
A signal to relay JavaScript to C++ calls. More... | |
class | Wt::JSlot |
A slot that is only implemented in client side JavaScript code. More... | |
class | Wt::WObject |
A base class for objects that participate in the signal/slot system. More... | |
class | Wt::Signal< A1, A2, A3, A4, A5, A6 > |
A signal that propagates events to listeners. More... | |
class | Wt::EventSignal< E > |
A signal that conveys user-interface events. More... | |
class | Wt::WSignalMapper< T, A1 > |
A utility class to connect multiple senders to a single slot. More... | |
Enumerations | |
enum | Wt::KeyboardModifier { Wt::NoModifier = 0, Wt::ShiftModifier = 0x1, Wt::ControlModifier = 0x2, Wt::AltModifier = 0x4, Wt::MetaModifier = 0x8 } |
Enumeration flags for keyboard modifiers. More... | |
enum | Wt::Key { Wt::Key_unknown = 0, Wt::Key_Enter = 13, Wt::Key_Tab = 9, Wt::Key_Backspace = 8, Wt::Key_Shift = 16, Wt::Key_Control = 17, Wt::Key_Alt = 18, Wt::Key_PageUp = 33, Wt::Key_PageDown = 34, Wt::Key_End = 35, Wt::Key_Home = 36, Wt::Key_Left = 37, Wt::Key_Up = 38, Wt::Key_Right = 39, Wt::Key_Down = 40, Wt::Key_Insert = 45, Wt::Key_Delete = 46, Wt::Key_Escape = 27, Wt::Key_F1 = 112, Wt::Key_F2 = 113, Wt::Key_F3 = 114, Wt::Key_F4 = 115, Wt::Key_F5 = 116, Wt::Key_F6 = 117, Wt::Key_F7 = 118, Wt::Key_F8 = 119, Wt::Key_F9 = 120, Wt::Key_F10 = 121, Wt::Key_F11 = 122, Wt::Key_F12 = 123, Wt::Key_Space = ' ', Wt::Key_A = 'A', Wt::Key_B = 'B', Wt::Key_C = 'C', Wt::Key_D = 'D', Wt::Key_E = 'E', Wt::Key_F = 'F', Wt::Key_G = 'G', Wt::Key_H = 'H', Wt::Key_I = 'I', Wt::Key_J = 'J', Wt::Key_K = 'K', Wt::Key_L = 'L', Wt::Key_M = 'M', Wt::Key_N = 'N', Wt::Key_O = 'O', Wt::Key_P = 'P', Wt::Key_Q = 'Q', Wt::Key_R = 'R', Wt::Key_S = 'S', Wt::Key_T = 'T', Wt::Key_U = 'U', Wt::Key_V = 'V', Wt::Key_W = 'W', Wt::Key_X = 'X', Wt::Key_Y = 'Y', Wt::Key_Z = 'Z' } |
Enumeration for key codes. More... |
To respond to user-interactivity events, or in general to communicate events from one widget to any other, Wt uses a signal/slot system.
A slot is any method of any descendant of WObject. To connect a signal with a slot, the only requirement is that the method signature of the slot must be compatible with the signal definition. In this way every method may be used as a slot, and it is not necessary to explicitly indicate a particular method to be a slot (as is needed in Qt), by putting them in a special section. Nevertheless, you may still do that if you wish to emphasize that these functions can be used as slots, or, if you have done extra work to optimize the implementation of these methods as client-side JavaScript code (see below).
A signal may be created by adding a Signal<X, ...> object. You may specify up to 6 arguments which may be of arbitrary types that are Copyable, that may be passed through the signal to connected slots.
The library defines several user-event signals on various widgets, and it is easy and convenient to add signals and slots to widget classes to communicate events and trigger callbacks.
Event signals (EventSignal<E>) are signals that may be triggered internally by the library to respond to user interactivity events. The abstract base classes WInteractWidget and WFormWidget define most of these event signals. To react to one of these events, the programmer connects a self-defined or already existing slot to such a signal.
To connect a signal from multiple senders to a single slot, the WSignalMapper<T> class may be convenient. Using that class you can still identify the sender, using an arbitrary property of the sender which you define when making the connection. That property is passed as an additional slot argument.
enum Wt::Key |
Enumeration for key codes.
These are key codes that identify a key on a keyboard. All keys listed here can be identified across all browsers and (Western) keyboards. A Key is returned by WKeyEvent::key(). If you want to identify a character, you should use the WKeyEvent::charCode() method instead.
enum Wt::KeyboardModifier |
Enumeration flags for keyboard modifiers.