pub struct Node {Show 13 fields
pub width: Size,
pub height: Size,
pub minimum_width: Size,
pub minimum_height: Size,
pub maximum_width: Size,
pub maximum_height: Size,
pub display: DisplayMode,
pub padding: Gaps,
pub margin: Gaps,
pub offset_x: Length,
pub offset_y: Length,
pub direction: DirectionMode,
pub has_layout_references: bool,
}Expand description
Node layout configuration
Fields§
§width: SizeDimentions
height: Size§minimum_width: Size§minimum_height: Size§maximum_width: Size§maximum_height: Size§display: DisplayModeInner layout mode
padding: GapsInner padding
margin: GapsInner margin
offset_x: LengthInner position offsets
offset_y: Length§direction: DirectionModeDirection in which it’s inner Nodes will be stacked
has_layout_references: boolA Node might depend on inner sizes but have a fixed position, like scroll views.
Implementations§
source§impl Node
impl Node
sourcepub fn from_size_and_direction(
width: Size,
height: Size,
direction: DirectionMode
) -> Self
pub fn from_size_and_direction( width: Size, height: Size, direction: DirectionMode ) -> Self
Construct a new Node given a size and a direction
sourcepub fn from_size_and_scroll(
width: Size,
height: Size,
offset_x: Length,
offset_y: Length
) -> Self
pub fn from_size_and_scroll( width: Size, height: Size, offset_x: Length, offset_y: Length ) -> Self
Construct a new Node given a size and a scroll
sourcepub fn from_size_and_padding(width: Size, height: Size, padding: Gaps) -> Self
pub fn from_size_and_padding(width: Size, height: Size, padding: Gaps) -> Self
Construct a new Node given a size and padding
sourcepub fn from_size_and_display_and_direction(
width: Size,
height: Size,
display: DisplayMode,
direction: DirectionMode
) -> Self
pub fn from_size_and_display_and_direction( width: Size, height: Size, display: DisplayMode, direction: DirectionMode ) -> Self
Construct a new Node given a size and a display
sourcepub fn from_size_and_margin(width: Size, height: Size, margin: Gaps) -> Self
pub fn from_size_and_margin(width: Size, height: Size, margin: Gaps) -> Self
Construct a new Node given a size and a direction
sourcepub fn does_depend_on_inner(&self) -> bool
pub fn does_depend_on_inner(&self) -> bool
Has properties that depend on the inner Nodes?