Skip to main content

Module layout

Module layout 

Source
Expand description

Layout system using Taffy

Re-exports§

pub use measure::TextAlign;
pub use measure::display_width;
pub use measure::measure_text;
pub use measure::measure_text_width;
pub use measure::pad_text;
pub use measure::truncate_middle;
pub use measure::truncate_start;
pub use measure::truncate_text;
pub use measure::wrap_text;

Modules§

measure
Text measurement utilities

Structs§

Layout
Computed layout for an element
LayoutEngine
Layout engine that computes element positions

Enums§

Position
Position for alignment operations

Functions§

center
Center an element both horizontally and vertically
center_horizontal
Center an element horizontally within a given width
center_vertical
Center an element vertically within a given height
h_gap
Create a fixed-width horizontal gap
h_spacer
Create a horizontal spacer that fills available space
join_horizontal
Join multiple elements horizontally (in a row)
join_vertical
Join multiple elements vertically (in a column)
pad_to_width
Pad text to a specific width with alignment
place
Place an element within a given area
place_horizontal
Place an element horizontally within a given width
place_vertical
Place an element vertically within a given height
space_around
Create a row of elements with equal spacing around them
space_between
Create a row of elements with equal spacing between them
space_evenly
Create a row of elements with equal spacing (including edges)
v_gap
Create a fixed-height vertical gap
v_spacer
Create a vertical spacer that fills available space