Fan

 

class

fluxText::Doc

sys::Obj
  fwt::RichTextModel
    fluxText::Doc

Doc is the model for text edited in a TextEditor

Slots

charCountSource

override Int charCount()

Overrides fwt::RichTextModel.charCount

Doc inherited from fwt::RichTextModel.charCount

Return the number of characters in the content.

dumpSource

Void dump(OutStream out := Sys.out())

Debug dump of the document model.

findNextSource

Int? findNext(Str s, Int offset, Bool matchCase)

Find the specified string in the document starting the search at the document offset and looking forward. Return null is not found. Note we don't currently support searching across multiple lines.

findPrevSource

Int? findPrev(Str s, Int offset, Bool matchCase)

Find the specified string in the document starting the search at the document offset and looking backward. Return null is not found. Note we don't currently support searching across multiple lines.

lineSource

override Str line(Int lineIndex)

Overrides fwt::RichTextModel.line

Doc inherited from fwt::RichTextModel.line

Return the line at the given zero based line index without delimiters.

lineAtOffsetSource

override Int lineAtOffset(Int offset)

Overrides fwt::RichTextModel.lineAtOffset

Doc inherited from fwt::RichTextModel.lineAtOffset

Return the zero based line index at the given character offset.

lineBackgroundSource

override Color? lineBackground(Int lineIndex)

Overrides fwt::RichTextModel.lineBackground

Doc inherited from fwt::RichTextModel.lineBackground

Return the color to use for the specified line's background. Normal lineStyling backgrounds only cover the width of the text. However, the lineBackground covers the width of the entire edit area. Return null for no special background.

lineCountSource

override Int lineCount()

Overrides fwt::RichTextModel.lineCount

Doc inherited from fwt::RichTextModel.lineCount

Return the number of lines.

lineStylingSource

override Obj[]? lineStyling(Int lineIndex)

Overrides fwt::RichTextModel.lineStyling

Doc inherited from fwt::RichTextModel.lineStyling

Return the styled segments for the given zero based line index. The result is a list of Int/RichTextStyle pairs where the Int specifies a zero based char offset of the line.

makeSource

new make(TextEditorOptions options, SyntaxOptions syntax, SyntaxRules rules)

modifySource

override Void modify(Int startOffset, Int len, Str newText)

Overrides fwt::RichTextModel.modify

Doc inherited from fwt::RichTextModel.modify

Replace the text with newText starting at position start for a length of replaceLen. The model implementation must fire the onModify event.

offsetAtLineSource

override Int offsetAtLine(Int lineIndex)

Overrides fwt::RichTextModel.offsetAtLine

Doc inherited from fwt::RichTextModel.offsetAtLine

Return the character offset of the first character of the given zero based line index.

optionsSource

readonly TextEditorOptions options

rulesSource

readonly SyntaxRules rules

syntaxSource

readonly SyntaxOptions syntax

textSource

override Str text

Overrides fwt::RichTextModel.text

Doc inherited from fwt::RichTextModel.text

Get or set the entire text document.