HoverIO

HoverIO is an input handler system that reads events off devices with the ability to point at the screen, like mouses, touchpads or pens.

Most of the time, HoverIO systems will pass the events they receive to an ActionIO system, and then send these actions to a hovered node.

Multiple different HoverIO instances can coexist in the same tree, allowing for multiple different nodes to be hovered at the same time, as long as they belong in different branches of the node tree. That means two different nodes can be hovered by two different HoverIO systems, but a single HoverIO system can only hover a single node.

Members

Functions

emitEvent
void emitEvent(HoverPointer pointer, InputEvent event)

Read an input event from an input device. Input devices will call this function every frame if an input event (such as a button press) occurs. Moving a mouse does not qualify as an input event.

fetch
inout(HoverPointer) fetch(int number)

Fetch a pointer from a number assigned to it by this I/O. This is used by Actionable nodes to find HoverPointer data corresponding to fired input action events.

hoverOf
inout(Hoverable) hoverOf(HoverPointer pointer)
isHovered
bool isHovered(Hoverable hoverable)
load
int load(HoverPointer pointer)

Load a hover pointer (mouse cursor, finger) and place it at the position currently indicated in the struct. Update the pointer's position if already loaded.

opApply
int opApply(int delegate(HoverPointer) @(safe) yield)

List all active hover pointer, namely all pointers that have been loaded since the last resize.

opApply
int opApply(int delegate(Hoverable) @(safe) yield)

List all currently hovered nodes.

scrollOf
inout(HoverScrollable) scrollOf(HoverPointer pointer)

Inherited Members

From IO

opEquals
bool opEquals(Object )
Undocumented in source.
loadTo
void loadTo(T resource)

Load a resource by reference. This is the same as Node.load.

Meta