pub enum OverflowBehavior {
Clip,
Visible,
Scroll {
max_content: Option<u16>,
},
Wrap,
}Expand description
How a layout container handles content that exceeds available space.
This enum models the CSS overflow property for terminal layouts.
The actual clipping or scrolling is performed by the render layer;
this value acts as a declarative hint attached to Flex or Grid
so that widgets and the renderer know how to treat overflow regions.
§Migration rationale
Web components routinely set overflow: hidden, overflow: scroll, etc.
Without an explicit model the migration code emitter cannot faithfully
translate these semantics. This enum bridges that gap.
Variants§
Clip
Content that exceeds the container is clipped at the boundary. This is the safe default for terminals where drawing outside an allocated region corrupts neighbouring widgets.
Visible
Content is allowed to overflow visually (useful for popovers, tooltips, and hit-test regions that extend beyond their container).
Scroll
Content is clipped but a scrollbar region is reserved.
The max_content field, when set, tells the scrollbar how
large the virtual content area is.
Fields
Wrap
Items that don’t fit are wrapped to the next row/column.
Only meaningful for Flex containers.
Trait Implementations§
Source§impl Clone for OverflowBehavior
impl Clone for OverflowBehavior
Source§fn clone(&self) -> OverflowBehavior
fn clone(&self) -> OverflowBehavior
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more