Cancel#
func (state *ReorderListState) Cancel()type ReorderListState struct {
// contains filtered or unexported fields
}ReorderListState owns pointer geometry, never the application's data. Pointer emits a move only on a valid drop; Key supports arrows/Home/End on a handle. Escape cancels a held drag. Rows retain their stable IDs after a move.
Scrolling stays caller-owned: Bounds is wherever the caller placed the list, and Viewport clips it. A move focuses the row it lands on, which can be outside Viewport in a scrolled list; the canvas clips such a row's hit away, so add RevealScroll(move.To) to the caller's offset when applying the move.
Cancel#func (state *ReorderListState) Cancel()Dragging#func (state *ReorderListState) Dragging() boolKey#func (state *ReorderListState) Key(event ui.KeyEvent) (ReorderMove, ui.EventResult)Pointer#func (state *ReorderListState) Pointer(event ui.PointerEvent) (ReorderMove, ui.EventResult)RevealScroll#func (state *ReorderListState) RevealScroll(slot int) float32RevealScroll is the change to add to the caller's scroll offset so the slot a keyboard or pointer move landed on comes back inside Viewport: pass the move's To. Rows are evenly spaced, so that slot keeps its geometry once the item moves into it. A row above the viewport yields a negative delta and a row below a positive one; it is zero when the slot is already visible, out of range, or the list was given no viewport.
RowBounds#func (state *ReorderListState) RowBounds(id ui.ID) (ui.Rect, bool)RowBounds reports where a declared row was painted in the last pass, and false when that ID was not declared. It is the geometry a caller scrolls by to keep the row a keyboard move focused in view.