Expand description
Layout utilities for screen positioning, responsive design, and layout computation.
This module provides:
ScreenLayout- Tools for computing screen locations from view coordinatesresponsive- Responsive design breakpoints and size flagsLayoutCx- Context for computing Taffy layout nodesComputeLayoutCx- Context for computing view positions after Taffy layout
Re-exports§
pub use responsive::GridBreakpoints;pub use responsive::ScreenSize;pub use responsive::range;
Modules§
Structs§
- Compute
Layout Cx - Context for computing view layout after Taffy has calculated sizes.
- Layout
Cx - Holds current layout state for given position in the tree.
You’ll use this in the
View::layoutimplementation to calllayout_nodeon children and to access any font - Screen
Layout - A
ScreenLayoutis a snapshot of the layout of a view within a window
Functions§
- screen_
layout_ for_ window - try_
create_ screen_ layout - Create a
ScreenLayoutfor a view. This can fail if the view or an ancestor of it has no parent and is not realized on-screen, or if the platform does not support reading window inner or outer bounds.ScreenLayoutis useful when needing to convert locations within a view into absolute positions on-screen, such as for creating a window at position relative to that view.