Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
const char * press_channel_name(PressChannel channel)
Human-readable channel name, for reports and test failure messages.
std::string format_press_reach_audit(const PressReachAudit &audit)
Format an audit as a report a human reads in CI output.
std::optional< Rect > rect_in_root(const View &view, View &root)
view's painted rect in root-local coordinates, or std::nullopt when that cannot be established exactl...
PressReachAudit audit_press_reach(View &root, const PressReachOptions &options={})
Walk root and press every control that advertises a press handler, at the centre of the rect it paint...
PressReach reach_of_press(View &root, Point root_pt, PressChannel channel=PressChannel::click)
Resolve — without delivering — what a press at root_pt would reach.
PressChannel
Which handler channel a press looks for, and therefore which resolution rule applies.
Definition press_reach.hpp:52
@ context_menu
Right button.
Definition press_reach.hpp:64
@ click
Left button.
Definition press_reach.hpp:56
Definition geometry.hpp:20
What an audit examined, so a caller can tell a clean tree from a blind one.
Definition press_reach.hpp:126
int skipped_not_interactive
Advertised a handler but is hidden, disabled, or opted out of hit testing.
Definition press_reach.hpp:134
int skipped_offscreen
Advertised a handler but sits outside the root's visible area (a scrolled-away row).
Definition press_reach.hpp:131
int skipped_indeterminate
Advertised a handler but sits under a transform whose root-space rect could not be established exactl...
Definition press_reach.hpp:138
std::vector< UnreachablePressTarget > unreachable
Definition press_reach.hpp:139
bool clean() const
True when nothing was found unreachable.
Definition press_reach.hpp:143
int examined
Controls that advertise a press handler AND were actually probed.
Definition press_reach.hpp:128
Tuning for audit_press_reach.
Definition press_reach.hpp:150
float min_dimension
Ignore a control whose painted rect is smaller than this in either axis.
Definition press_reach.hpp:156
bool audit_context_menu
Definition press_reach.hpp:152
bool audit_click
Definition press_reach.hpp:151
What a press at a point resolves to, WITHOUT delivering it.
Definition press_reach.hpp:75
Point local
root_pt in handler's local coordinates.
Definition press_reach.hpp:85
View * handler
The view whose handler would actually run for this channel, or nullptr when the channel is dead at th...
Definition press_reach.hpp:82
View * hit
Deepest hit-testable view at the point, or nullptr when the point resolves to nothing at all.
Definition press_reach.hpp:79
Axis-aligned rectangle in continuous (float) coordinates.
Definition geometry.hpp:52
One control that advertises a press target but cannot be reached by a press at the rect it paints.
Definition press_reach.hpp:108
std::string reached_id
Definition press_reach.hpp:120
View * view
Definition press_reach.hpp:109
View * reached
What the press resolved to instead, or nullptr for nothing at all.
Definition press_reach.hpp:119
Rect painted
The rect the control paints, in root coordinates.
Definition press_reach.hpp:114
std::string reason
Why this is a finding, in one sentence.
Definition press_reach.hpp:122
std::string id
The view's id(), which for a materialized or imported design is the authored element id — the name a ...
Definition press_reach.hpp:112
Point probe
The point that was pressed — the painted rect's centre.
Definition press_reach.hpp:117
PressChannel channel
Definition press_reach.hpp:115