pub struct Node {Show 20 fields
pub width: Size,
pub height: Size,
pub minimum_width: Size,
pub minimum_height: Size,
pub maximum_width: Size,
pub maximum_height: Size,
pub visible_width: VisibleSize,
pub visible_height: VisibleSize,
pub main_alignment: Alignment,
pub cross_alignment: Alignment,
pub padding: Gaps,
pub margin: Gaps,
pub offset_x: Length,
pub offset_y: Length,
pub direction: Direction,
pub position: Position,
pub content: Content,
pub has_layout_references: bool,
pub contains_text: bool,
pub spacing: Length,
}Expand description
Node layout configuration
Fields§
§width: SizeDimentions
height: Size§minimum_width: Size§minimum_height: Size§maximum_width: Size§maximum_height: Size§visible_width: VisibleSize§visible_height: VisibleSize§main_alignment: Alignment§cross_alignment: Alignment§padding: GapsInner padding
margin: GapsInner margin
offset_x: LengthInner position offsets
offset_y: Length§direction: DirectionDirection in which it’s inner Nodes will be stacked
position: PositionPosition config
content: Content§has_layout_references: boolA Node might depend on inner sizes but have a fixed position, like scroll views.
contains_text: bool§spacing: LengthImplementations§
Source§impl Node
impl Node
Sourcepub fn from_size_and_direction(
width: Size,
height: Size,
direction: Direction,
) -> Self
pub fn from_size_and_direction( width: Size, height: Size, direction: Direction, ) -> Self
Construct a new Node given a size and a direction
Sourcepub fn from_sizes(
width: Size,
height: Size,
minimum_width: Size,
minimum_height: Size,
maximum_width: Size,
maximum_height: Size,
) -> Self
pub fn from_sizes( width: Size, height: Size, minimum_width: Size, minimum_height: Size, maximum_width: Size, maximum_height: Size, ) -> Self
Construct a new Node given some sizes
Sourcepub fn from_size_and_visible_size(
width: Size,
height: Size,
visible_width: VisibleSize,
visible_height: VisibleSize,
) -> Self
pub fn from_size_and_visible_size( width: Size, height: Size, visible_width: VisibleSize, visible_height: VisibleSize, ) -> Self
Construct a new Node given a size and a visible size
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_alignments_and_direction(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: Direction,
) -> Self
pub fn from_size_and_alignments_and_direction( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: Direction, ) -> Self
Construct a new Node given a size, alignments and a direction
Sourcepub fn from_size_and_alignments_and_direction_and_spacing(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: Direction,
spacing: Length,
) -> Self
pub fn from_size_and_alignments_and_direction_and_spacing( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: Direction, spacing: Length, ) -> Self
Construct a new Node given a size, alignments, direction and spacing
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 from_size_and_direction_and_margin(
width: Size,
height: Size,
direction: Direction,
margin: Gaps,
) -> Self
pub fn from_size_and_direction_and_margin( width: Size, height: Size, direction: Direction, margin: Gaps, ) -> Self
Construct a new Node given a size and a direction and some margin,
Sourcepub fn from_size_and_alignments_and_direction_and_padding(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: Direction,
padding: Gaps,
) -> Self
pub fn from_size_and_alignments_and_direction_and_padding( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: Direction, padding: Gaps, ) -> Self
Construct a new Node given a size, alignments and a direction
Sourcepub fn from_size_and_position(
width: Size,
height: Size,
position: Position,
) -> Self
pub fn from_size_and_position( width: Size, height: Size, position: Position, ) -> Self
Construct a new Node given a size and a position
Sourcepub fn from_size_and_content(
width: Size,
height: Size,
content: Content,
) -> Self
pub fn from_size_and_content( width: Size, height: Size, content: Content, ) -> Self
Construct a new Node given a size and content
Sourcepub fn from_size_and_direction_and_spacing(
width: Size,
height: Size,
direction: Direction,
spacing: Length,
) -> Self
pub fn from_size_and_direction_and_spacing( width: Size, height: Size, direction: Direction, spacing: Length, ) -> Self
Construct a new Node given a size and spacing
Sourcepub fn does_depend_on_inner(&self) -> bool
pub fn does_depend_on_inner(&self) -> bool
Has properties that depend on the inner Nodes?
Sourcepub fn do_inner_depend_on_parent(&self) -> bool
pub fn do_inner_depend_on_parent(&self) -> bool
Has properties that make its children dependant on it?