Skip to content

TSdlPenButtonEvent

Pressure-sensitive pen button event structure (Event.PenButton.* )

This is for buttons on the pen itself that the user might click. The pen itself pressing down to draw triggers a TSdlEventKind.PenDown event instead.

Definition

Unit: Neslib.Sdl3.Events

type TSdlPenButtonEvent = record ... end;

Properties

Name Description
Button The pen button index (first button is 1).
IsDown True if the button is pressed
Kind Event kind (TSdlEventKind.PenButtonUp/Down)
PenID The pen instance id
PenState Complete pen input state at time of event
Position Position, relative to window
Timestamp In nanoseconds, populated using SdlGetTicksNS
Window The window with pen focus, if any
WindowID The ID of the window with pen focus, if any
X X coordinate, relative to window
Y Y coordinate, relative to window

Property Descriptions

Button

The pen button index (first button is 1).

property Button: Byte read FHandle.button

Type: Byte


IsDown

True if the button is pressed

property IsDown: Boolean read FHandle.down

Type: Boolean


Kind

Event kind (TSdlEventKind.PenButtonUp/Down)

property Kind: TSdlEventKind read GetKind

Type: TSdlEventKind


PenID

The pen instance id

property PenID: TSdlPenID read FHandle.which

Type: TSdlPenID


PenState

Complete pen input state at time of event

property PenState: TSdlPenInputFlags read GetPenState

Type: TSdlPenInputFlags


Position

Position, relative to window

property Position: TSdlPointF read GetPosition

Type: TSdlPointF


Timestamp

In nanoseconds, populated using SdlGetTicksNS

property Timestamp: UInt64 read FHandle.timestamp

Type: UInt64


Window

The window with pen focus, if any

property Window: TSdlWindow read GetWindow

Type: TSdlWindow


WindowID

The ID of the window with pen focus, if any

property WindowID: TSdlWindowID read FHandle.windowID

Type: TSdlWindowID


X

X coordinate, relative to window

property X: Single read FHandle.x

Type: Single


Y

Y coordinate, relative to window

property Y: Single read FHandle.y

Type: Single