TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::ElementEvent Struct Reference

An input event delivered to an element's EventHandler. More...

#include <gui_core/input/gui_input_handler_func.h>

Public Member Functions

int2 LocalCursor (const ElementStorage &storage) const
 Cursor in the space rect->rect is stored in (inverse of ancestor contentTransforms).

Public Attributes

tachyon::ID id
 the targeted element
EventType type
const InputState & state
 the input snapshot of this event
const ElementRect * rect
 the element's layout rects
const ElementRef & elementRef

Detailed Description

An input event delivered to an element's EventHandler.

Member Function Documentation

◆ LocalCursor()

int2 tachyon::ElementEvent::LocalCursor ( const ElementStorage & storage) const

Cursor in the space rect->rect is stored in (inverse of ancestor contentTransforms).

Compare against the rect with this, not state.screenPos, which differs under e.g. a pan/zoom canvas.

Member Data Documentation

◆ id

tachyon::ID tachyon::ElementEvent::id

the targeted element

◆ type

EventType tachyon::ElementEvent::type

◆ state

const InputState& tachyon::ElementEvent::state

the input snapshot of this event

◆ rect

const ElementRect* tachyon::ElementEvent::rect

the element's layout rects

◆ elementRef

const ElementRef& tachyon::ElementEvent::elementRef

The documentation for this struct was generated from the following file: