Module pick
Expand description
Picking parts of a window from its retained tree: what a person means when they point at “this” to report a problem with it.
Answers come from the widgets’ own accessibility nodes, the tree
assistive technology reads, never from pixels: the deepest node under a
point that a person could name, the chain of named nodes around it (so a
picker can widen from a word to its row), or the outermost named nodes
inside a dragged rectangle. capture then reads a picked node’s texts,
each marked with whether it is the app’s own fixed copy
(AccessNode::interface_name)
or something a person or a resource put there.
Paths are the inspection’s widget paths (Root[0]/Column[0]/Text[2]),
with #i/j for a widget’s synthetic children (a virtual list’s rows).
Hosts run this wherever the widget tree lives: in the page for the
browser desktop, in the app’s own process for a native window.
Structs§
- Pick
Capture - The texts under a picked node, in reading order, its own name first.
- Pick
Target - A node a person can pick.
- Picked
Text - One text under a picked node.
- Recent
Invocation - What the person last did through controls, newest last: the action and resource of each, in which component instance, and whether it ran. Only names travel; arguments never do. A report about picked parts carries the last few.
Constants§
- RECENT_
INVOCATIONS - How many invocations
recent_invocationskeeps.
Functions§
- capture
- The texts under the node at
path, its own name first: every name and value below it in reading order, without repeating one its parent already said.Nonewhen the tree no longer has that node. - recent_
invocations - The invocations noted on this thread, oldest first.
- role_
name - The role
roleas assistive technology names it. - sensitive_
areas - Where a picture of the node at
path(whose bounds arewhole) must be masked: every text that is not the app’s own interface copy, every image and every protected field under it. Unlikecapturenothing is left out for length: pastMAX_SENSITIVEareas, or where the node is gone, the whole part is masked. - targets_
at - The named nodes under
point, outermost first, ending with the deepest one: the chain a picker widens along. Of two nodes at one depth the later, painted over the earlier, wins. Empty where nothing nameable is. - targets_
within - The outermost named nodes wholly inside
area, in reading order: a dragged rectangle around three rows picks the rows, around a whole list the list. At mostlimit.