GreenNode class abstract

Node of Roslyn's Green Tree. Base class of any math nodes.

Description of Roslyn's Red-Green Tree.

GreenNode stores any context-free information of a node and is constructed bottom-up. It needs to indicate or store:

  • Necessary parameters for this math node.
  • Layout algorithm for this math node, if renderable.
  • Strutural information of the tree (children)
  • Context-free properties for other purposes. (editingWidth, etc.)

Due to their context-free property, GreenNode can be canonicalized and deduplicated.

Implementers
Available Extensions

Constructors

GreenNode()

Properties

capturedCursor int
Number of cursor positions that can be captured within this node.
no setter
childPositions List<int>
Position of child nodes.
no setter
children List<GreenNode?>
Children of this node.
no setter
editingWidth int
Minimum number of "right" keystrokes needed to move the cursor pass through this node (from the rightmost of the previous node, to the leftmost of the next node)
no setter
hashCode int
The hash code for this object.
no setterinherited
leftType AtomType
AtomType observed from the left side.
no setter
rightType AtomType
AtomType observed from the right side.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildWidget(MathOptions options, List<BuildResult?> childBuildResults) → BuildResult
Compose Flutter widget with child widgets already built
computeChildOptions(MathOptions options) List<MathOptions>
Calculate the options passed to children when given options from parent
getRange(int pos) TextRange
TextRange
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuildWidget(MathOptions oldOptions, MathOptions newOptions) bool
Whether the specific MathOptions parameters that this node directly depends upon have changed.
toJson() Map<String, Object?>
toString() String
A string representation of this object.
inherited
updateChildren(covariant List<GreenNode?> newChildren) GreenNode
Return a copy of this node with new children.

Operators

operator ==(Object other) bool
The equality operator.
inherited