Trait nannou::ui::prelude::Sizeable [−][src]
pub trait Sizeable {}Show methods
pub fn x_dimension(self, x: Dimension) -> Self; pub fn y_dimension(self, x: Dimension) -> Self; pub fn get_x_dimension(&self, ui: &Ui) -> Dimension; pub fn get_y_dimension(&self, ui: &Ui) -> Dimension; pub fn w(self, w: f64) -> Self { ... } pub fn h(self, h: f64) -> Self { ... } pub fn wh(self, wh: [f64; 2]) -> Self { ... } pub fn w_h(self, width: f64, height: f64) -> Self { ... } pub fn w_of(self, idx: NodeIndex<u32>) -> Self { ... } pub fn padded_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... } pub fn h_of(self, idx: NodeIndex<u32>) -> Self { ... } pub fn padded_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... } pub fn wh_of(self, idx: NodeIndex<u32>) -> Self { ... } pub fn padded_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... } pub fn kid_area_w_of(self, idx: NodeIndex<u32>) -> Self { ... } pub fn padded_kid_area_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... } pub fn kid_area_h_of(self, idx: NodeIndex<u32>) -> Self { ... } pub fn padded_kid_area_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... } pub fn kid_area_wh_of(self, idx: NodeIndex<u32>) -> Self { ... } pub fn padded_kid_area_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... } pub fn get_w(&self, ui: &Ui) -> Option<f64> { ... } pub fn get_h(&self, ui: &Ui) -> Option<f64> { ... } pub fn get_wh(&self, ui: &Ui) -> Option<[f64; 2]> { ... }
Widgets that support different dimensions.
Required methods
pub fn x_dimension(self, x: Dimension) -> Self
[src]
Set the length along the x axis.
pub fn y_dimension(self, x: Dimension) -> Self
[src]
Set the length along the y axis.
pub fn get_x_dimension(&self, ui: &Ui) -> Dimension
[src]
The widget’s length along the x axis as a Dimension.
pub fn get_y_dimension(&self, ui: &Ui) -> Dimension
[src]
The widget’s length along the y axis as a Dimension.
Provided methods
pub fn w(self, w: f64) -> Self
[src]
Set the absolute width for the widget.
pub fn h(self, h: f64) -> Self
[src]
Set the absolute height for the widget.
pub fn wh(self, wh: [f64; 2]) -> Self
[src]
Set the dimensions for the widget.
pub fn w_h(self, width: f64, height: f64) -> Self
[src]
Set the width and height for the widget.
pub fn w_of(self, idx: NodeIndex<u32>) -> Self
[src]
Set the width as the width of the widget at the given index.
pub fn padded_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
[src]
Set the width as the width of the widget at the given index padded at both ends by the given Scalar.
pub fn h_of(self, idx: NodeIndex<u32>) -> Self
[src]
Set the height as the height of the widget at the given index.
pub fn padded_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
[src]
Set the height as the height of the widget at the given index padded at both ends by the given Scalar.
pub fn wh_of(self, idx: NodeIndex<u32>) -> Self
[src]
Set the dimensions as the dimensions of the widget at the given index.
pub fn padded_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
[src]
Set the dimensions as the dimensions of the widget at the given index with all four edges padded by the given scalar.
pub fn kid_area_w_of(self, idx: NodeIndex<u32>) -> Self
[src]
Set the width as the width of the padded area of the widget at the given index.
pub fn padded_kid_area_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
[src]
Set the width as the KidArea
width for the widget at the given index, padded at both ends
by the given scalar.
pub fn kid_area_h_of(self, idx: NodeIndex<u32>) -> Self
[src]
Set the height as the KidArea
height of the widget at the given index.
pub fn padded_kid_area_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
[src]
Set the height as the KidArea
height of the widget at the given index, padded at both
ends by the given scalar.
pub fn kid_area_wh_of(self, idx: NodeIndex<u32>) -> Self
[src]
Set the dimensions as the KidArea
dimensions of the widget at the given index.
pub fn padded_kid_area_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
[src]
Set the dimensions as the KidArea
dimensions of the widget at the given index, padded at
all four edges by the given scalar.
pub fn get_w(&self, ui: &Ui) -> Option<f64>
[src]
Get the absolute width of the widget as a Scalar value.
pub fn get_h(&self, ui: &Ui) -> Option<f64>
[src]
Get the height of the widget.
pub fn get_wh(&self, ui: &Ui) -> Option<[f64; 2]>
[src]
The dimensions for the widget.
Implementors
impl<W> Sizeable for W where
W: Widget,
[src]
W: Widget,
pub fn x_dimension(self, w: Dimension) -> W
[src]
pub fn y_dimension(self, h: Dimension) -> W
[src]
pub fn get_x_dimension(&self, ui: &Ui) -> Dimension
[src]
We attempt to retrieve the x
Dimension for the widget via the following:
- Check for specified value at
maybe_x_dimension
- Otherwise, use the default returned by Widget::default_x_dimension.
pub fn get_y_dimension(&self, ui: &Ui) -> Dimension
[src]
We attempt to retrieve the y
Dimension for the widget via the following:
- Check for specified value at
maybe_y_dimension
- Otherwise, use the default returned by Widget::default_y_dimension.