Defines the RevViewLayout class, which is responsible for managing the visual layout of the grid, including the arrangement and sizing of rows and columns, scroll positions, and mapping between data and view coordinates. Overall, RevViewLayout is the core class that translates grid data and configuration into a concrete, interactive visual layout, enabling efficient rendering and smooth user interaction within the grid.
The view layout has 2 dimensions: horizontal and vertical. The calculations for these dimensions of the layout are mostly independent. The horizontal calculations involve working out which rows are included in the view while the vertical calculations involve working out which columns are included.
Whenever a view layout is calculated, the columns array property has a list of RevViewLayoutColumns which specify which active columns are included in the view and their order, position and width. Likewise, the rows array property has a list of RevViewLayoutRows which specify which rows are included in the view and their subgrid, order, position and height.
After horizontal and vertical calculations have been completed, it is possible to get a cell pool. This is an array of RevViewCells where there is one element for each cell in the view. The pool can be retrieved either with the elements in 'row then column' or 'column then row' order. The cell pools are used internally for finding cells and painting them.
These pools are cached by RevViewLayout and should not be cached elsewhere. They will be invalidated whenever the horizontal or vertical calculations are carried out.
Each cell in the pool contains a paintFingerprint object which a cell painter can use to store the parameter values that were used when the cell was last rendered. If these parameter values have not changed, then the cell painter does not need to render the cell again. All paintFingerprints will be undefined when a pool is regenerated after horizontal or vertical calculations.
In order to best maintain co-ordination with focus when scrolling, functions in RevFocusScrollBehavior should be used instead of corresponding functions in the RevViewLayout class.