|
wxMaxima
|
The worksheet's search engine. More...
#include <wx/regex.h>#include <wx/string.h>Go to the source code of this file.
Data Structures | |
| class | WorksheetSearch::Matcher |
| Matches a search expression against worksheet text. More... | |
| class | WorksheetSearch::StringMatcher |
| Substring search, optionally case-insensitive. More... | |
| class | WorksheetSearch::RegexMatcher |
| Regular-expression search. More... | |
| struct | WorksheetSearch::SearchTarget |
| A search match: the group it is in and the matching part. More... | |
| struct | WorksheetSearch::SearchStart |
| Where a search starts: a group plus what the cursor is doing there. More... | |
Enumerations | |
| enum class | WorksheetSearch::MatchPart { Prompt , Editor , Output } |
| Which part of a group cell a search match was found in. | |
Functions | |
| SearchTarget | WorksheetSearch::FindNextTarget (GroupCell *tree, GroupCell *last, const SearchStart &start, bool down, const Matcher &matcher, bool searchInInput, bool searchInOutput) |
| Find the next match, walking the group cells with wrap-around. | |
The worksheet's search engine.
Finds the next match of a search expression in the tree of group cells, walking the groups in a wrap-around loop and checking each group's parts in document order: prompt, editor, output when searching down; output, editor, prompt when searching up. In the group the search starts in, skip rules make the search continue behind the cursor or the previous match instead of re-finding it.
This module only decides WHERE the next match is; it knows nothing about the view. Applying the match (activating the editor or selecting the matched cell, scrolling to it) stays in Worksheet.
| SearchTarget WorksheetSearch::FindNextTarget | ( | GroupCell * | tree, |
| GroupCell * | last, | ||
| const SearchStart & | start, | ||
| bool | down, | ||
| const Matcher & | matcher, | ||
| bool | searchInInput, | ||
| bool | searchInOutput | ||
| ) |
Find the next match, walking the group cells with wrap-around.
| tree | the first group cell of the worksheet |
| last | the last group cell of the worksheet (wrap target going up) |
| start | where to start and what the cursor is doing there |
| down | search direction |
| matcher | the search expression |
| searchInInput | whether prompts and editors are searched |
| searchInOutput | whether output cells are searched |
The start group is searched only once, from the cursor onwards: after a full wrap-around the loop stops when it reaches the start group again.