ViewportContext class abstract

Interface that provides information about the visible rows and columns: Their sizes, which space in the viewport each one occupies and their respective offset.

It is a container for two states that are sectioned by axis.

Useful to transform a particular pixel offset into a cell coordinate and vice versa.

See also:

Inheritance

Constructors

ViewportContext()

Properties

columns ViewportAxisContext
Store specific information about sizes, offsets and extent of columns.
no setter
hashCode int
The hash code for this object.
no setterinherited
rows ViewportAxisContext
Store specific information about sizes, offsets and extent of rows.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
getAxisContextFor({required Axis axis}) ViewportAxisContext
Get either columns or rows based on axis.
getCellPosition(IntVector2 globalPosition) CellPositionResult
Given a cell's coordinates it returns it's CellPositionResult which contains info about it's Offset in pixels and it's Size.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixelToPosition(double pixelOffset, Axis axis) PositionResult
Converts a point in the table into a column/row index.
positionToPixel(int globalPosition, Axis axis, {required bool isForFrozenPanes}) PixelResult
Converts a global column/row index into a pixel coordinate (Offset) of the top/left edge of that position in the viewport on the axis axis.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
toString() String
A string representation of this object.
inherited

Operators

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