Enum nannou::ui::prelude::position::Dimension [−][src]
pub enum Dimension { Absolute(f64), Of(NodeIndex<u32>, Option<f64>), KidAreaOf(NodeIndex<u32>, Option<f64>), }
The length of a Widget over either the x or y axes.
This type is used to represent the different ways in which a dimension may be sized.
See the Sizeable trait for methods that allow for setting the
x
and y
Dimensions in various ways.
Note that Sizeable is implemented for all types that implement Widget.
Variants
Absolute(f64)
Some specific length has been given.
Of(NodeIndex<u32>, Option<f64>)
The dimension should match that of the widget at the given index.
The Option<Scalar>
is an optional padding argument which when Some
, will subtract the
scalar from both ends of the other widget's dimension.
KidAreaOf(NodeIndex<u32>, Option<f64>)
The dimension should match that of the kid_area
of the widget at the given index.
The Option<Scalar>
is an optional padding argument which when Some
, will subtract the
scalar from both ends of the other widget's dimension.
Trait Implementations
impl Clone for Dimension
[src]
impl Clone for Dimension
fn clone(&self) -> Dimension
[src]
fn clone(&self) -> Dimension
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Dimension
[src]
impl Debug for Dimension
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for Dimension
[src]
impl Copy for Dimension
impl PartialEq<Dimension> for Dimension
[src]
impl PartialEq<Dimension> for Dimension