DiagramTextSubject class final
The text a property formats: one story, the part of it being edited and the text definitions filling its slots.
Text properties do not replace this subject; they return it with a pending change from formatRuns or updateStory. The inspector applies the change to the selected text, or to the whole story when no text is being edited, as one undoable edit.
Properties
-
body
→ Iterable<
TextParagraph> -
The inspected paragraphs other than titles.
no setter
- color → DiagramColor
-
The color text has without an explicit run color.
final
- defaultFontFamily → String?
-
final
- defaultFontSize → double
-
final
-
definitions
→ List<
DiagramTextDefinition> -
The distinct text definitions filling the formatted paragraphs' slots:
the inspected paragraphs while editing, else the story's body
paragraphs. Text extensions show their properties when every one is
theirs.
final
- end → int
-
End of the inspected range; the whole story without a selection.
no setter
- firstRun → TextRun
-
no setter
-
fonts
→ List<
DiagramFontFamily> -
The fonts the host offers.
final
- fontSizeRange → DiagramTextFontSizeRange
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCaret → bool
-
no setter
- isEditing → bool
-
no setter
- owner → DiagramElement
-
The element that owns story: a text element, a shape or a connector.
final
-
paragraphs
→ List<
TextParagraph> -
The paragraphs being inspected.
final
-
runs
→ List<
TextRun> -
The runs being inspected; with a caret, the style of the next typing.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection → StorySelection?
-
The edited range, or null when the whole story is selected as an object.
final
- singleLine → bool
-
Whether every formatted slot holds a single line.
no setter
- start → int
-
Start of the inspected range; the whole story without a selection.
no setter
- story → TextStory
-
final
Methods
-
admitsRuns(
TextRun format(TextRun run)) → bool -
Whether the inspected paragraphs' texts admit them with
formatapplied to their runs. -
formatRuns(
TextRun format(TextRun run), {String? label}) → DiagramTextSubject - Formats the inspected runs, or the next typing style at a caret.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
textFor(
TextParagraph paragraph) → DiagramTextDefinition -
The text filling the slot of
paragraph. -
toString(
) → String -
A string representation of this object.
inherited
-
updateStory(
TextStory update(TextStory story), {String? label}) → DiagramTextSubject - Replaces the story, for paragraph-level changes.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited