- There’s no built in anything
No built in storage of the text entered - you have to figure out how you want to store it.
One huge run of characters or something else
In a TextArea it handles that for you already
- DoCommand has an enormous number of “commands” that can get sent to it
Autocomplete will show you the long list but here’s a few
Most are named in a way that they make sense
case cmdMoveLeft
// Implemented by subclasses to move the selection or insertion point one element or character
// to the left.
case cmdMoveLeftAndModifySelection
// Implemented by subclasses to expand or reduce either end of the selection to the left (display order)
// by one element or character.
case cmdMoveRight
// Implemented by subclasses to move the selection or insertion point one element or character to the right.
case cmdMoveRightAndModifySelection
// Implemented by subclasses to expand or reduce either end of the selection
// to the right (display order) by one element or character.
case cmdMoveDown, cmdMoveToEndOfLine, cmdMoveToEndOfDocument, _
cmdMoveToEndOfParagraph, cmdMoveToRightEndOfLine
case cmdMoveDownAndModifySelection, cmdMoveToEndOfLineAndModifySelection, _
cmdMoveToEndOfDocumentAndModifySelection, cmdMoveToEndOfParagraphAndModifySelection, _
cmdMoveToRightEndOfLineAndModifySelection
case cmdMoveUp, cmdMoveToBeginningOfLine, cmdMoveToLeftEndOfLine, _
cmdMoveToBeginningOfDocument, cmdMoveToBeginningOfParagraph
case cmdMoveUpAndModifySelection, cmdMoveToBeginningOfLineAndModifySelection, _
cmdMoveToLeftEndOfLineAndModifySelection, cmdMoveToBeginningOfDocumentAndModifySelection, _
cmdMoveToBeginningOfParagraphAndModifySelection
case cmdDeleteBackward
// Deletes the selection, if there is one, or a single character backward from the insertion point
case cmdDeleteForward
// Deletes the selection, if there is one, or a single character forward from the insertion point
case cmdDeleteToEndOfLine, cmdDeleteToEndOfParagraph
// Implemented by subclasses to delete the selection, if there is one, or all text from the insertion point to
// the end of a line/paragraph (typically of text).
//
// Also places the deleted text into the kill buffer.
case cmdDeleteToBeginningOfLine, cmdDeleteToBeginningOfParagraph
// Implemented by subclasses to delete the selection, if there is one, or all text from the insertion point
// to the beginning of a line/paragraph (typically of text).
//
// Also places the deleted text into the kill buffer.
case cmdYank
// Replaces the insertion point or selection with text from the kill buffer.
case cmdToggleOverwriteMode
TextRanges are a starting position + length to define the “range” - they’re really simple
IncompleteText is something like on OS X the case when you press & hold the e key on OS X and get the popup of variations.
The “incomplete text” is the original item that would be turned into etc