fluid.io.hover

This module implements interfaces for handling hover and connecting hoverable nodes with input devices.

Members

Classes

FindHoveredNodeAction
class FindHoveredNodeAction

Find the topmost node that occupies the given position on the screen, along with its scrollable.

HoverPointerAction
class HoverPointerAction

Virtual Hover I/O pointer, for testing.

Functions

castIfAcceptsScroll
inout(HoverScrollable) castIfAcceptsScroll(Object node, HoverPointer pointer)

Cast the node to given type if it accepts scroll.

hovers
bool hovers(HoverIO hoverIO)
bool hovers(HoverIO hoverIO, Hoverable hoverable)
hoversOnly
bool hoversOnly(HoverIO hoverIO, Range hoverables)

Test if the hover I/O system hovers all of the nodes and none other.

point
HoverPointerAction point(HoverIO hoverIO, Vector2 position)
HoverPointerAction point(HoverIO hoverIO, float x, float y)

Create a virtual Hover I/O pointer for testing, and place it at the given position. Interactions on the pointer are asynchronous and should be performed by then chains, see fluid.future.pipe.

pointAndClick
Publisher!HoverPointerAction pointAndClick(HoverIO hoverIO, Vector2 position, bool isActive, int clickCount)
Publisher!HoverPointerAction pointAndClick(HoverIO hoverIO, float x, float y, bool isActive, int clickCount)

Create a virtual Hover I/O pointer and use it to click a given position. This is a helper wrapping point.

Interfaces

ActionHoverIO
interface ActionHoverIO

An extension of HoverIO that enables support for dispatching and running input actions.

HoverIO
interface 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.

HoverScrollable
interface HoverScrollable

Nodes implementing this interface can react to scroll motion if selected by a HoverIO system.

Hoverable
interface Hoverable

Nodes implementing this interface can be selected by a HoverIO system.

Structs

HoverPointer
struct HoverPointer

A pointer is a position on the screen chosen by the user using a mouse, touchpad, touchscreen or other device capable of communicating some position.

InputEvent (from fluid.io.action)
struct InputEvent via public import fluid.io.action : InputEvent, InputEventCode;

Represents an event coming from an input device, like a pressed key, button or a gesture.

InputEventCode (from fluid.io.action)
struct InputEventCode via public import fluid.io.action : InputEvent, InputEventCode;

Uniquely codes a pressed key, button or a gesture, by using an I/O ID and event code map. Each I/O interface can define its own keys and buttons it needs to map. The way it maps codes to buttons is left up to the interface to define, but it usually is with an enum.

Meta