Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Folding

Hierarchy

  • Folding

Index

Methods

addFold

  • Adds a new fold.

    Parameters

    • placeholder: string | Fold
    • Optional range: Range

    Returns Fold

    The new created Fold object or an existing fold object in case the

    passed in range fits an existing fold exactly.

addFolds

  • addFolds(folds: Fold[]): void

expandFold

  • expandFold(fold: Fold): void

expandFolds

  • expandFolds(folds: Fold[]): void

foldAll

  • foldAll(startRow?: number, endRow?: number, depth?: number): void

foldAllComments

  • foldAllComments(): void

foldToLevel

  • foldToLevel(level: any): void

getAllFolds

  • getAllFolds(): Fold[]

getCommentFoldRange

  • getCommentFoldRange(row: number, column: number, dir: number): Range

getDisplayLine

  • getDisplayLine(row: number, endColumn: number, startRow: number, startColumn: number): string

getFoldAt

  • getFoldAt(row: number, column: number, side: number): Fold
  • Looks up a fold at a given row/column. Possible values for side:

    -1: ignore a fold if fold.start = row/column

    +1: ignore a fold if fold.end = row/column

    Parameters

    • row: number
    • column: number
    • side: number

    Returns Fold

getFoldDisplayLine

  • getFoldDisplayLine(foldLine: FoldLine, endRow: number, endColumn: number, startRow: number, startColumn: number): string

getFoldLine

getFoldRowEnd

  • getFoldRowEnd(docRow: number, startFoldRow?: FoldLine): number

getFoldRowStart

  • getFoldRowStart(docRow: number, startFoldRow?: FoldLine): number

getFoldStringAt

  • getFoldStringAt(row: number, column: number, trim?: number, foldLine?: FoldLine): string
  • Returns the string between folds at the given position. E.g.

    foob|arwolrd -> "bar"

    foobarwol|rd -> "world"

    foobar<fo|ld>wolrd ->

    where | means the position of row/column

    The trim option determs if the return string should be trimed according to the "side" passed with the trim value:

    E.g.

    foob|arwolrd -trim=-1> "b"

    foobarwol|rd -trim=+1> "rld"

    fo|obarwolrd -trim=00> "foo"

    Parameters

    • row: number
    • column: number
    • Optional trim: number
    • Optional foldLine: FoldLine

    Returns string

getFoldedRowCount

  • getFoldedRowCount(first: number, last: number): number

getFoldsInRange

getFoldsInRangeList

  • getFoldsInRangeList(ranges: Range[]): Fold[]

getNextFoldLine

getParentFoldRangeData

  • getParentFoldRangeData(row: number, ignoreCurrent?: boolean): { firstRange: Range; range?: Range }

getRowFoldEnd

  • getRowFoldEnd(docRow: any, startFoldRow: any): any

getRowFoldStart

  • getRowFoldStart(docRow: any, startFoldRow: any): any

isRowFolded

  • isRowFolded(docRow: number, startFoldRow?: FoldLine): boolean
  • Checks if a given documentRow is folded. This is true if there are some folded parts such that some parts of the line is still visible.

    Parameters

    • docRow: number
    • Optional startFoldRow: FoldLine

    Returns boolean

onFoldWidgetClick

  • onFoldWidgetClick(row: any, e: any): void

removeFold

  • removeFold(fold: Fold): void

removeFolds

  • removeFolds(folds: Fold[]): void

setFoldStyle

  • setFoldStyle(style: string): void

toggleFold

  • toggleFold(tryToUnfold?: boolean): void

toggleFoldWidget

  • toggleFoldWidget(toggleParent?: boolean): void

tokenizerUpdateFoldWidgets

  • tokenizerUpdateFoldWidgets(e: any): void

unfold

  • unfold(location: number | Range | Point, expandInner?: boolean): Fold[]

updateFoldWidgets

  • updateFoldWidgets(delta: Delta): void

Generated using TypeDoc