A mouse event (MouseEvent).
Get one with Event::AsMouse(). It works for mouse events (eg, click), pointer events (eg, pointerdown), and wheel (see WheelEvent).
- Note
- In mouse and wheel events from View::FireMouseEvent() and View::FireScrollEvent(), the modifier keys (ctrlKey() and the rest) are the ones held in the last KeyEvent you passed to View::FireKeyEvent(), since mouse and scroll events carry no modifier state.
|
| | MouseEvent (ULDOMEvent borrowed) |
| | Wrap an event handle from the C API (Event::AsMouse() is the usual way to get one).
|
| double | clientX () const |
| | Get the pointer's x-position in the viewport, in CSS pixels (clientX).
|
| double | clientY () const |
| | Get the pointer's y-position in the viewport, in CSS pixels (clientY).
|
| double | pageX () const |
| | Get the pointer's x-position in the page, in CSS pixels (pageX).
|
| double | pageY () const |
| | Get the pointer's y-position in the page, in CSS pixels (pageY).
|
| double | screenX () const |
| | Get the pointer's x-position relative to the View (screenX).
|
| double | screenY () const |
| | Get the pointer's y-position relative to the View (screenY).
|
| int | button () const |
| | Get the button that caused the event (button).
|
| unsigned | buttons () const |
| | Get the buttons held down during the event (buttons).
|
| bool | ctrlKey () const |
| | Whether or not the Control key was held down (ctrlKey).
|
| bool | shiftKey () const |
| | Whether or not the Shift key was held down (shiftKey).
|
| bool | altKey () const |
| | Whether or not the Alt key was held down (altKey).
|
| bool | metaKey () const |
| | Whether or not the Meta key was held down (metaKey).
|
| Element | relatedTarget () const |
| | Get the other element of a mouse transition (relatedTarget).
|
| | Event (ULDOMEvent borrowed) |
| | Wrap an event handle from the C API.
|
| | Event (const Event &)=delete |
| Event & | operator= (const Event &)=delete |
| std::string | type () const |
| | Get the event's type (type).
|
| unsigned | eventPhase () const |
| | Get the current dispatch phase (eventPhase).
|
| bool | bubbles () const |
| | Whether or not the event bubbles up the tree (bubbles).
|
| bool | cancelable () const |
| | Whether or not preventDefault() can cancel the event (cancelable).
|
| bool | isTrusted () const |
| | Whether or not the event came from user input or the library (isTrusted).
|
| double | timeStamp () const |
| | Get the time the event was created (timeStamp).
|
| bool | defaultPrevented () const |
| | Whether or not the event was canceled (defaultPrevented).
|
| void | preventDefault () const |
| | Cancel the event's default action (preventDefault).
|
| void | stopPropagation () const |
| | Stop the event from reaching other targets (stopPropagation).
|
| void | stopImmediatePropagation () const |
| | Stop the event from reaching any other listener (stopImmediatePropagation).
|
| Element | target () const |
| | Get the element the event was dispatched to (target).
|
| Node | targetNode () const |
| | Get the node the event was dispatched to (target).
|
| Element | currentTarget () const |
| | Get the element whose listener is running (currentTarget).
|
| MouseEvent | AsMouse () const |
| | View this event as a MouseEvent.
|
| WheelEvent | AsWheel () const |
| | View this event as a WheelEvent.
|
| KeyboardEvent | AsKeyboard () const |
| | View this event as a KeyboardEvent.
|
| FocusEvent | AsFocus () const |
| | View this event as a FocusEvent.
|
| InputEvent | AsInput () const |
| | View this event as an InputEvent.
|
| SubmitEvent | AsSubmit () const |
| | View this event as a SubmitEvent.
|
| CustomEvent | AsCustom () const |
| | View this event as a CustomEvent.
|
| ULDOMEvent | raw () const |
| | Get the C handle, for passing to the <Ultralight/CAPI/CAPI_DOMEvent.h> functions.
|