- appendLines
void appendLines(dstring[] lines)
append one or more lines at end
- clear
void clear()
- clearEditMarks
void clearEditMarks()
Undocumented in source. Be warned that the author may not have intended to support it.
- clearTokenProps
void clearTokenProps(int startLine, int endLine)
set props arrays size equal to text line sizes, bit fill with unknown token
- clearUndo
void clearUndo()
- correctPosition
void correctPosition(TextPosition position)
when position is out of content bounds, fix it to nearest valid position
- correctRange
void correctRange(TextRange range)
when range positions is out of content bounds, fix it to nearest valid position
- editMark
EditStateMark editMark(int index)
returns access to line edit mark by line index (0 based)
- fillSpace
dstring fillSpace(int pos)
returns spaces/tabs for filling from the beginning of line to specified position
- findMatchedBraces
bool findMatchedBraces(TextPosition p, TextRange range)
Undocumented in source. Be warned that the author may not have intended to support it.
- firstNonSpace
TextPosition firstNonSpace(int lineIndex)
returns position before first non-space character of line, returns 0 position if no non-space chars
- fullLinesRange
TextRange fullLinesRange(TextRange r)
corrent range to cover full lines
- getLineWhiteSpace
LineWhiteSpace getLineWhiteSpace(int lineIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
- handleContentChange
void handleContentChange(EditOperation op, TextRange rangeBefore, TextRange rangeAfter, Object source)
Undocumented in source. Be warned that the author may not have intended to support it.
- insertLines
void insertLines(int start, int count)
inserts count empty lines at specified position
- lastNonSpace
TextPosition lastNonSpace(int lineIndex)
returns position after last non-space character of line, returns 0 position if no non-space chars on line
- line
dstring line(int index)
returns line text by index, "" if index is out of bounds
- lineBegin
TextPosition lineBegin(int lineIndex)
returns text position for begin of line lineIndex (if lineIndex > number of lines, returns end of last line)
- lineEnd
TextPosition lineEnd(int lineIndex)
returns text position for end of line lineIndex
- lineIsEmpty
bool lineIsEmpty(int lineIndex)
return true if line with index lineIndex is empty (has length 0 or consists only of spaces and tabs)
- lineLength
int lineLength(int lineIndex)
returns text position for end of line lineIndex
- lineRange
TextRange lineRange(int lineIndex)
returns text range for whole line lineIndex
- lineTokenProps
TokenPropString lineTokenProps(int index)
returns line token properties one item per character (index is 0 based line number)
- load
bool load(InputStream f, string fname)
load content form input stream
- load
bool load(string filename)
- markChangedLines
void markChangedLines(int startLine, int endLine)
Undocumented in source. Be warned that the author may not have intended to support it.
- maxLineLength
int maxLineLength()
returns maximum length of line
- measureLine
TextLineMeasure measureLine(int lineIndex)
measures line non-space start and end positions
- moveByWord
TextPosition moveByWord(TextPosition p, int direction, bool camelCasePartsAsWords)
change text position to nearest word bound (direction < 0 - back, > 0 - forward)
- nextCharPos
TextPosition nextCharPos(TextPosition p)
returns previous character position
- nextTab
int nextTab(int pos)
find nearest next tab position
- notifyContentReplaced
void notifyContentReplaced()
call listener to say that whole content is replaced e.g. by loading from file
- notifyContentSaved
void notifyContentSaved()
call listener to say that content is saved
- opIndex
dstring opIndex(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
- opIndex
dchar opIndex(int lineIndex, int pos)
returns character at position lineIndex, pos
- opIndex
dchar opIndex(TextPosition p)
returns character at position lineIndex, pos
- performOperation
bool performOperation(EditOperation op, Object source)
- prevCharPos
TextPosition prevCharPos(TextPosition p)
returns previous character position
- rangeMarks
EditStateMark[] rangeMarks(TextRange range)
return edit marks for specified range
- rangeText
dstring[] rangeText(TextRange range)
return text for specified range
- redo
bool redo(Object source)
redoes last undone change
- removeLines
void removeLines(int start, int removedCount)
removes removedCount lines starting from start
- replaceRange
void replaceRange(TextRange before, TextRange after, dstring[] newContent, EditStateMark[] marks)
inserts or removes lines, removes text in range
- save
bool save(OutputStream stream, string filename, TextFileFormat format)
save to output stream in specified format
- save
bool save(OutputStream stream, string filename)
save to output stream in current format
- save
bool save(string filename, TextFileFormat format)
save to file in specified format
- save
bool save(string filename)
save to file in current format
- tokenProp
TokenProp tokenProp(TextPosition p)
returns token properties character position
- undo
bool undo(Object source)
- updateTokenProps
void updateTokenProps(int startLine, int endLine)
Undocumented in source. Be warned that the author may not have intended to support it.
- wordBounds
TextRange wordBounds(TextPosition pos)
get word bounds by position
- editMarks
EditStateMark[] editMarks [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- endOfFile
TextPosition endOfFile [@property getter]
returns position for end of last line
- filename
string filename [@property getter]
file used to load editor content
- hasRedo
bool hasRedo [@property getter]
return true if there is at least one operation in redo buffer
- hasSyntaxHighlight
bool hasSyntaxHighlight [@property getter]
returns true if content has syntax highlight handler set
- hasUndo
bool hasUndo [@property getter]
return true if there is at least one operation in undo buffer
- length
int length [@property getter]
- lineIcons
LineIcons lineIcons [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- lines
const(dstring[]) lines [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- modified
bool modified [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- multiline
bool multiline [@property getter]
returns true if miltyline content is supported
- readOnly
bool readOnly [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- readOnly
bool readOnly [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
- smartIndents
bool smartIndents [@property getter]
true if smart indents are enabled
- smartIndents
bool smartIndents [@property setter]
set smart indents enabled flag
- smartIndentsAfterPaste
bool smartIndentsAfterPaste [@property getter]
true if smart indents are enabled
- smartIndentsAfterPaste
bool smartIndentsAfterPaste [@property setter]
set smart indents enabled flag
- supportsSmartIndents
bool supportsSmartIndents [@property getter]
true if smart indents are supported
- syntaxSupport
SyntaxSupport syntaxSupport [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- syntaxSupport
SyntaxSupport syntaxSupport [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
- tabSize
int tabSize [@property getter]
returns tab size (in number of spaces)
- tabSize
int tabSize [@property setter]
sets tab size (in number of spaces)
- text
dstring text [@property getter]
returns all lines concatenated delimited by '\n'
- text
dstring text [@property setter]
replace whole text with another content
- useSpacesForTabs
bool useSpacesForTabs [@property getter]
when true, spaces will be inserted instead of tabs
- useSpacesForTabs
bool useSpacesForTabs [@property setter]
set new Tab key behavior flag: when true, spaces will be inserted instead of tabs
editable plain text (singleline/multiline)