Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Search

This models a search on the GUI tree. Performing searches directly on the data tree is theoretically possible but fraught with problems. For instance, some data may not be visible to users and so the search in the data tree would have to constantly refer to the GUI tree to determine whether a hit should be shown. Additionally, the order of the data shown in the GUI tree may differ from the order in the data tree.

Hierarchy

  • Search

Index

Constructors

constructor

Properties

Private _pattern

_pattern: string = ""

Private _scope

_scope: DLocRange | undefined

caretManager

caretManager: CaretManager

context

context: Context = Context.EVERYWHERE

The context for the search.

current

current: DLocRange | null | undefined

The current match. This is undefined if we have not searched yet. It is null if nothing matches.

direction

direction: Direction = Direction.FORWARD

The direction in which the search moves.

guiRoot

guiRoot: Document | Element

Private prevEnd

prevEnd: DLoc | undefined

Private root

root: DLocRoot

Private start

start: DLoc

Accessors

pattern

  • get pattern(): string
  • set pattern(value: string): void

Private scope

Methods

Private _next

  • _next(includeCurrent: boolean): void

Private find

Private findAttributeValue

  • findAttributeValue(start: DLoc, direction: Direction): Range | null

Private findText

  • findText(start: DLoc, direction: rangy.Direction): Range | null

Private getBackwardSearchStart

  • getBackwardSearchStart(includeCurrent: boolean): DLoc

Private getForwardSearchStart

  • getForwardSearchStart(includeCurrent: boolean): DLoc

next

  • next(): void

Private setScope

  • setScope(range: DLocRange | undefined): void
  • Set the search scope. No result will be returned outside the scope. Setting the scope to undefined means "search the whole document".

    Parameters

    Returns void

updateCurrent

  • updateCurrent(): void

Generated using TypeDoc