MirrorGrid class
Mutable terminal grid. Applies incremental line deltas in place and notifies the painter to repaint.
- Inheritance
-
- Object
- ChangeNotifier
- MirrorGrid
- Implemented types
Constructors
- MirrorGrid({int defaultFg = 0xD8D8D8, int defaultBg = 0x181818})
-
defaultFg/defaultBgfill empty/newly-grown cells. They must match the engine's blank-cell colors (the configured default fg/bg) so untouched rows — which the engine never sends partial damage for — render in the right color from the first frame instead of a stale hardcoded default.
Properties
- columns → int
-
no setteroverride
- cursorBlinking → bool
-
no setteroverride
- cursorCol → int
-
no setteroverride
- cursorColor → int
-
Program-set cursor color (OSC 12), or 0xFF000000 (kCursorColorUnset) when
unset — in which case painters keep their inverse-video cursor.
no setteroverride
- cursorRow → int
-
no setteroverride
- cursorShape → int
-
no setteroverride
- cursorVisible → bool
-
no setteroverride
- defaultBg → int
-
The grid's current default background (packed 0x00RRGGBB). The painter
skips filling cells equal to this — the layer is cleared to it by the host
— mirroring native alacritty's
bg_alpha == 0for untouched default cells.no setter - defaultFg → int
-
no setter
- displayOffset → int
-
no setteroverride
- generation → int
-
Bumps on every apply / initializeEmpty; used by TerminalPainter.shouldRepaint.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- historySize → int
-
Scrollback lines above the viewport; drives scrollbar geometry.
no setteroverride
- modeFlags → int
-
no setteroverride
- rows → int
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollFraction → double
-
Sub-cell scroll offset in [0.0, 1.0): how far the viewport is scrolled up
past a line boundary, in fractions of a cell height. The painter shifts
content down by
scrollFraction * cellHeightand fills the revealed top sliver with the overscan row (cellrow == -1). 0.0 on a line boundary.no setteroverride
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
apply(
GridUpdate u) → void -
bgAt(
int row, int col) → int -
override
-
codepointAt(
int row, int col) → int -
Cell accessors.
rowin0..rows-1reads the viewport;row == -1reads the overscan line (the row just above the viewport top) used to paint the scrollFraction sliver. Other negative rows are not valid.override -
dispose(
) → void -
Discards any resources used by the object.
override
-
fgAt(
int row, int col) → int -
override
-
flagsAt(
int row, int col) → int -
override
-
hyperlinkIdAt(
int row, int col) → int -
override
-
initializeEmpty(
int rows, int columns) → void - Empty viewport for startup — avoids a sync full_snapshot FFI round-trip.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited