Skip to main content

Module column_paging

Module column_paging 

Source
Expand description

Sideways moves across the main table’s scrolling columns, planned from the widths the columns are drawn at.

A plan only adds up widths: it formats and reads nothing. A width the table has not drawn in this view (since its widths were last relearned) is unknown, and a plan that needs one says so with None; the next draw then measures that column from the rows on screen and plans again. Indices here are scrolling indices: 0 is the first column right of the frozen ones.

Structs§

OnScreen
Which shown columns the table drew, counted from 1 in the table’s order: frozen columns first, hidden columns not at all. first and last are the scrolling columns on screen; the frozen ones are always on screen before them. cursor is the column cursor’s column.
Room
The room the scrolling columns are laid out in, as the table last drew it.

Enums§

ColumnMove
A sideways move. The pages need the columns’ widths to land; the rest do not, and are moves here so that one typed behind a page waiting on a draw lands after it.
CursorMove
A move of the column cursor. The view follows only as far as the cursor needs: it scrolls when the cursor would leave the screen, and pages move both.

Functions§

plan
Where the scrolling columns start after mv, from current among count. Every move that can go somewhere does: a page moves at least one column, even past a column wider than the room. None when a width it needs has not been drawn.
start_ending_at
The first column of the page that ends with end drawn whole: as many columns before it as fit, and end alone when nothing else does.
whole_from
How many columns from start are drawn whole, the way the table lays them out: left to right, each whole while it fits in what is left.