Struct layout2d::node_data::NodeData
[−]
[src]
pub struct NodeData<T: Clone> { pub min_width: Option<f32>, pub min_height: Option<f32>, pub max_width: Option<f32>, pub max_height: Option<f32>, pub width: Option<f32>, pub height: Option<f32>, pub flex_direction: FlexDirection, pub data: T, }
Fields
min_width: Option<f32>
Minimum width of this node
min_height: Option<f32>
Minimum height of this node
max_width: Option<f32>
Maximum width of this node
max_height: Option<f32>
Maximum height of this node
width: Option<f32>
Width of the node (must be initialized for the root node)
height: Option<f32>
Width of the node. (must be initialized for the root node)
flex_direction: FlexDirection
What direction the children should flex to
data: T
Abstract data of the node, defined by the renderer / application (not inside this library)
Methods
impl<T: Clone> NodeData<T>
[src]
fn new(
min_width: Option<f32>,
min_height: Option<f32>,
max_width: Option<f32>,
max_height: Option<f32>,
width: Option<f32>,
height: Option<f32>,
flex_direction: FlexDirection,
data: T
) -> Self
[src]
min_width: Option<f32>,
min_height: Option<f32>,
max_width: Option<f32>,
max_height: Option<f32>,
width: Option<f32>,
height: Option<f32>,
flex_direction: FlexDirection,
data: T
) -> Self
Creates a new node
fn empty(flex_direction: FlexDirection, data: T) -> Self
[src]
Creates an empty node