Skip to main content

Module grid_layout

Module grid_layout 

Source
Expand description

A grid whose items the user drags and resizes into place.

GridLayoutState owns the layout — one GridArea per item, in grid cells — and the rules it settles under; GridLayout places each GridItem in its area and turns pointer and keyboard input into layout changes. The pure layout arithmetic lives in layout, apart from pixels and entities.

Structs§

GridArea
Where one item sits in a grid layout, in zero-based grid cells.
GridItem
One item of a GridLayout, paired with the GridArea of the same id.
GridLayout
A grid whose items the user drags and resizes, the way dashboards and widget boards are arranged.
GridLayoutState
The state of a GridLayout: the items’ areas, the rules the layout settles under, and any gesture in progress.
GrowHeight
Make the selected item one row taller.
GrowWidth
Make the selected item one column wider.
MoveDown
Move the selected item down one row.
MoveLeft
Move the selected item one column toward the leading edge.
MoveRight
Move the selected item one column toward the trailing edge.
MoveUp
Move the selected item up one row.
SelectNextItem
Select the next item in reading order.
SelectPreviousItem
Select the previous item in reading order.
ShrinkHeight
Make the selected item one row shorter.
ShrinkWidth
Make the selected item one column narrower.

Enums§

GridLayoutEvent
Emitted by GridLayoutState when the layout changes.

Functions§

grid_drag_handle
The part of an item the pointer moves it by, for an item built with GridItem::drag_handle_only — a card’s header, say.