PlainTextDefinition class final
Runs and paragraph breaks, with inline font, size and color.
- Inheritance
-
- Object
- DiagramTextDefinition
- PlainTextDefinition
Constructors
- PlainTextDefinition({int maxLines = 0})
-
const
Properties
- codec → DiagramTextCodec?
-
Persists the paragraph and run attributes this text admits, or null
when it admits none. Installing the text installs its codec.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- markers → DiagramTextMarkers?
-
List and checklist markers, or null when this text draws none.
no setterinherited
- maxLines → int
-
Typed lines (paragraphs) a slot holds. 1 is a single line, where Enter
is blocked; N allows at most N paragraphs; 0 is unlimited. Soft wrapping
does not count.
finalinherited
-
properties
→ List<
DiagramProperty< Object?, Object?> > -
Inspector properties for the features this text adds.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storyVerbs
→ List<
DiagramVerb> -
Verbs over the whole story of an element holding this text, such as
rich text marks and lists, which format a range of story offsets. An
element offers them once, however many of its parts hold this text.
no setterinherited
- type → String
-
Registered type, which is also the type of a standalone text element.
no setteroverride
-
verbs
→ List<
DiagramVerb> -
The verbs of one text part, bound to its slot:
setTextfor every text. A shape qualifies them by slot, such astitle.setText, when it has several text parts.no setterinherited
Methods
-
admits(
TextParagraph paragraph) → bool -
Whether
paragraphis valid in this text. The engine checks maxLines.inherited -
afterRegionCleared(
TextParagraph paragraph) → TextParagraph -
Paragraph metadata after a deletion clears a whole text region.
inherited
-
applyInputShortcut(
TextStory story, int blockIndex, int caretOffset) → DiagramTextInputShortcutResult? -
Converts a typed paragraph prefix ending at
caretOffsetof the paragraph atblockIndex, or returns null when no input rule applies.inherited -
atRegionStart(
TextParagraph paragraph) → TextParagraph -
Paragraph metadata after Backspace at the start of a text region.
inherited
-
describe(
TextParagraph paragraph) → String -
Accessible description of
paragraph.inherited -
handleKey(
DiagramTextKey key, DiagramTextKeyContext context) → DiagramTextKeyResult? -
Handles a key chord on this text, or returns null to leave it to other
handlers.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
present(
TextParagraph paragraph, double defaultFontSize) → TextParagraph -
The paragraph as laid out, for example with a heading's size applied.
Text, identity and slot must be preserved.
inherited
-
restoreInputShortcut(
TextStory story, int blockIndex, String text) → TextStory -
Reverses applyInputShortcut on the paragraph at
blockIndex, restoring the typedtext. Returnsstorywhen nothing is restored.inherited -
split(
TextParagraph paragraph, int offset, {required bool typed}) → DiagramParagraphSplitPlan? -
Paragraph metadata when Enter (
typed) or a pasted newline splitsparagraphatoffset. Null splits it unchanged.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override