pub struct Node {Show 15 fields
pub width: Size,
pub height: Size,
pub minimum_width: Size,
pub minimum_height: Size,
pub maximum_width: Size,
pub maximum_height: Size,
pub main_alignment: Alignment,
pub cross_alignment: Alignment,
pub padding: Gaps,
pub margin: Gaps,
pub offset_x: Length,
pub offset_y: Length,
pub direction: DirectionMode,
pub position: Position,
pub has_layout_references: bool,
}
Expand description
Node layout configuration
Fields§
§width: Size
Dimentions
height: Size
§minimum_width: Size
§minimum_height: Size
§maximum_width: Size
§maximum_height: Size
§main_alignment: Alignment
§cross_alignment: Alignment
§padding: Gaps
Inner padding
margin: Gaps
Inner margin
offset_x: Length
Inner position offsets
offset_y: Length
§direction: DirectionMode
Direction in which it’s inner Nodes will be stacked
position: Position
§has_layout_references: bool
A 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_alignments_and_direction(
width: Size,
height: Size,
main_alignment: Alignment,
cross_alignment: Alignment,
direction: DirectionMode
) -> Self
pub fn from_size_and_alignments_and_direction( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: DirectionMode ) -> Self
Construct a new Node given a size, alignments and a direction
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: DirectionMode,
margin: Gaps
) -> Self
pub fn from_size_and_direction_and_margin( width: Size, height: Size, direction: DirectionMode, 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: DirectionMode,
padding: Gaps
) -> Self
pub fn from_size_and_alignments_and_direction_and_padding( width: Size, height: Size, main_alignment: Alignment, cross_alignment: Alignment, direction: DirectionMode, 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 does_depend_on_inner(&self) -> bool
pub fn does_depend_on_inner(&self) -> bool
Has properties that depend on the inner Nodes?
Trait Implementations§
source§impl PartialEq<Node> for Node
impl PartialEq<Node> for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more