Prowl.Paper dispatches strongly typed event objects to element callbacks. Every callback receives a concrete event class whose fields describe what happened — mouse position, key pressed, drag delta, and so on. All pointer-based events derive fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Paper/llms.txt
Use this file to discover all available pages before exploring further.
ElementEvent, which provides common spatial data. This page documents every event type, the callback that delivers it, and every public field on each class.
Inheritance overview
ElementEvent — base class
ElementEvent is the base for all pointer-driven events. It provides position data in three coordinate spaces and a propagation-control mechanism.
Namespace: Prowl.PaperUI.Events
Properties
The element that originally triggered the event. When an event bubbles to a parent,
Source is retargeted to the new element via the internal Retarget() method, so it always reflects the current element handling the event.The calculated layout rectangle of the source element in screen coordinates.
The raw pointer (mouse cursor) position in screen coordinates at the moment the event fired.
The pointer position relative to the element’s top-left corner.
(0, 0) is the top-left corner of the element.The pointer position mapped to a
[0, 1] range within the element. (0, 0) is the top-left corner; (1, 1) is the bottom-right corner.Indicates whether event bubbling has been halted for this event. Read-only; set it via
StopPropagation().Method
Event.stopPropagation().
ClickEvent
Fired for all mouse-button click interactions. The specific interaction is identified by the Phase property.
Namespace: Prowl.PaperUI.EventsBase:
ElementEvent
Callbacks that receive ClickEvent
| Callback | Phase value |
|---|---|
OnClick | ClickPhase.Click |
OnPress | ClickPhase.Press |
OnRelease | ClickPhase.Release |
OnHeld | ClickPhase.Held |
OnDoubleClick | ClickPhase.DoubleClick |
OnRightClick | ClickPhase.RightClick |
Properties
The mouse button that triggered this event. See
PaperMouseBtn below.Identifies the click phase:
ClickPhase.Click— standard single click (press + release)ClickPhase.Press— button just pressed downClickPhase.Release— button just releasedClickPhase.Held— button held beyond the hold thresholdClickPhase.DoubleClick— two clicks within the double-click time windowClickPhase.RightClick— right mouse button click
ElementEvent properties (PointerPosition, RelativePosition, NormalizedPosition, ElementRect, Source) are also available.
Example
DragEvent
Fired during mouse drag operations. Provides both per-frame delta movement and the total displacement from the drag origin.
Namespace: Prowl.PaperUI.EventsBase:
ElementEvent
Callbacks that receive DragEvent
| Callback | Phase value |
|---|---|
OnDragStart | DragPhase.Start |
OnDragging | DragPhase.Dragging |
OnDragEnd | DragPhase.End |
Properties
The screen-space pointer position where the drag began. Constant for the entire drag gesture.
The pointer movement since the previous frame. Use this for incremental updates such as moving a window or scrubbing a value.
The total pointer displacement from
StartPosition to the current frame. Use this when you need the cumulative offset rather than the per-frame change.Identifies the drag phase:
DragPhase.Start— drag gesture began this frameDragPhase.Dragging— drag is ongoing (fires every frame while dragging)DragPhase.End— drag gesture ended this frame (mouse button released)
Example
ElementEvent as OnHover / OnEnter / OnLeave
The hover callbacks receive the ElementEvent base class directly (no subclass):
| Callback | Fires when… |
|---|---|
OnHover | Pointer is currently over the element (fires every frame) |
OnEnter | Pointer just moved onto the element this frame |
OnLeave | Pointer just moved off the element this frame |
ElementEvent fields are available: PointerPosition, RelativePosition, NormalizedPosition, ElementRect, Source.
FocusEvent
Fired when an element gains or loses keyboard focus.
Namespace: Prowl.PaperUI.EventsBase: none (standalone class)
Callback
OnFocusChange
Properties
The element whose focus state changed.
true if the element just gained focus; false if it just lost focus.Example
KeyEvent
Fired when a keyboard key is pressed while an element holds focus. Respects the auto-repeat settings configured on the Paper instance.
Namespace: Prowl.PaperUI.EventsBase: none (standalone class)
Callback
OnKeyPressed
Properties
The focused element that received the key event.
The key that was pressed. See the complete
PaperKey enum listing below.true when this event was generated by the auto-repeat mechanism (key held past the repeat delay), rather than a fresh key-down. Use this to distinguish “user just pressed Enter” from “Enter is being held”.Example
ScrollEvent
Fired when the mouse wheel is scrolled over an element.
Namespace: Prowl.PaperUI.EventsBase:
ElementEvent
Callback
OnScroll
Properties
The scroll wheel delta for this frame. Positive values typically indicate scrolling up/forward; negative values indicate scrolling down/backward (exact sign depends on the host platform’s input delivery).
ElementEvent properties are also available.
Example
TextInputEvent
Fired once per printable character entered while an element has keyboard focus. Handles encoding-aware character input, including IME composition results.
Namespace: Prowl.PaperUI.EventsBase: none (standalone class)
Callback
OnTextInput
Properties
The focused element receiving text input.
The printable character entered. Carriage returns (
\r) are automatically normalized to newlines (\n) by the input pipeline before this event fires.Example
PaperKey enum
PaperKey enumerates all keyboard keys recognized by Prowl.Paper’s input system. Pass values to KeyEvent.Key comparisons, paper.IsKeyDown(), paper.IsKeyPressed(), and related query methods.
Namespace: Prowl.PaperUI
Modifier key helpers
Modifier keys are queried directly on thePaper instance rather than through KeyEvent, because they may be pressed when no OnKeyPressed callback fires:
PaperMouseBtn enum
PaperMouseBtn identifies mouse buttons in ClickEvent.Button and Paper pointer query methods.
Namespace: Prowl.PaperUI
| Value | Description |
|---|---|
Unknown | Unrecognized or unset button (default / sentinel value) |
Left | Primary (left) mouse button |
Middle | Middle mouse button / scroll wheel click |
Right | Secondary (right) mouse button |
Button4 | Extra button 4 (commonly “back” on gaming mice) |
Button5 | Extra button 5 (commonly “forward”) |
Button6 | Extra button 6 |
Button7 | Extra button 7 |
Button8 | Extra button 8 |
Event quick-reference
ClickEvent
Callbacks: OnClick, OnPress, OnRelease, OnHeld, OnDoubleClick, OnRightClick
Key fields:
Key fields:
Button, Phase, PointerPosition, RelativePositionDragEvent
Callbacks: OnDragStart, OnDragging, OnDragEnd
Key fields:
Key fields:
Delta, TotalDelta, StartPosition, PhaseElementEvent
Callbacks: OnHover, OnEnter, OnLeave
Key fields:
Key fields:
PointerPosition, RelativePosition, NormalizedPositionScrollEvent
Callbacks: OnScroll
Key fields:
Key fields:
Delta, PointerPosition, NormalizedPositionFocusEvent
Callbacks: OnFocusChange
Key fields:
Key fields:
IsFocused, SourceKeyEvent
Callbacks: OnKeyPressed
Key fields:
Key fields:
Key (PaperKey), IsRepeat, SourceTextInputEvent
Callbacks: OnTextInput
Key fields:
Key fields:
Character, Source