Module window_search
Expand description
Search in a window, in place.
The window’s bar carries one search control after the window’s place: a click or Ctrl+F
(⌘F) expands it into a field where it stands, and what is typed acts on the window’s app —
a document highlights every match with “3 of 12” and steps through them (Enter,
Shift+Enter, F3), a list narrows (“12 of 40”). The search widens step by step: this view,
then the whole app, then everywhere, both handing the query to the platform search
(SearchHandoff).
The app draws no field and keeps no find state: it provides the Findable document or
the Filterable list it already has, reached through the
window’s tile (SearchableWindow): an app in a process of its own is sent the query, the
steps and the close (WindowSearch::take_remote_events) and answers with a count, its
runtime running the same SearchDriver on its widgets. An app with neither opens the
platform search narrowed to itself.
An app whose views are queries over its resources offers more than a list: what is typed
turns the window’s view into a query view of them (Queryable, InPlace::Query), so
Enter or Down hands the keyboard to the results and Escape returns to the previous view.
On a document the open search carries the find’s options after the steps (options): Match
case and Whole word, Regular expression or Text / Hex where the document offers them
(FindAbilities), and for a document that can replace, Replace and Replace all. Each is a
semantic action too, so assistive technology and agents set them without the panel.
Structs§
- Query
View - An app’s view, and how it answers what is typed in the window bar’s search.
- Search
Driver - The find engine behind a window’s search, run where the app’s widgets are: by the window for an app in its process, by the app’s own runtime for an app in a process of its own. It finds or narrows when the query changed, follows the content when it changed under the search, steps, and stops when the search closed.
- Search
Handoff - A search the window hands to the platform search: the tab it came from, how far it reaches and what was typed.
- Window
Search - The window bar’s search: a control that expands into a field in place.
Enums§
- InPlace
- What a window’s search acts on in place, as its app offers it.
- Search
Reach - How far beyond the window a search goes when the person widens it.
- Window
Search Request - What the person asked of the window’s search, for the window to carry out: it knows the tab and its app.
Traits§
- Queryable
- An app whose views are queries over its resources: the window’s search turns the view shown into a query view, and closing it returns to the view before.
- Searchable
Window - An app that runs inside a runtime of its own (an embedded app) and lets the window’s search reach its widgets.
Functions§
- search_
chord - What a key press asks of the window’s search on
platform: Find (Ctrl+F, ⌘F), or Find and Replace (Ctrl+H, ⌘⌥F). Ctrl+Shift+H stays History’s. - with_
queryable - Run
visiton the firstQueryableinwidget’s subtree; whether there was one.