Skip to content

Pointer targets

Generated from engine/ui/pointer_target.h at f525bc6. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.

Browse the ui module

Audience: game code.

#include "engine/ui/pointer_target.h" · namespace labrador

A page-authored pointer target, in the same coordinate space as the point passed to hit_pointer_target. The page chooses its extent and availability; neither is derived from a widget or changed by the query.

RectangleF bounds;
bool enabled = true;
std::optional<size_t> hit_pointer_target(std::span<const PointerTarget> targets,
const Vector2F& point);

The first enabled target containing point, or no match. The returned index is in the original span, including entries skipped before it. Left/top edges are included; right/bottom edges are excluded.

Nonfinite points miss. Targets with nonfinite coordinates, dimensions or computed endpoints, or nonpositive dimensions, are ignored. Negative origins are valid; rectangles are not normalised or expanded.

Pure, allocation-free and safe for concurrent reads of unchanged targets. The page owns coordinate transforms, focus, capture and gesture policy.

Named in the public declarations above: RectangleF, Vector2F.

The files that include this header directly. A file can also reach it through another header.

Documentation for Labrador v0.4.0. Built from Labrador f525bc6 of 2026-11-17.

All documentation versions