Trait nannou_conrod::Sizeable [−][src]
pub trait Sizeable {
Show 23 methods
fn x_dimension(self, x: Dimension) -> Self;
fn y_dimension(self, x: Dimension) -> Self;
fn get_x_dimension(&self, ui: &Ui) -> Dimension;
fn get_y_dimension(&self, ui: &Ui) -> Dimension;
fn w(self, w: f64) -> Self { ... }
fn h(self, h: f64) -> Self { ... }
fn wh(self, wh: [f64; 2]) -> Self { ... }
fn w_h(self, width: f64, height: f64) -> Self { ... }
fn w_of(self, idx: NodeIndex<u32>) -> Self { ... }
fn padded_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... }
fn h_of(self, idx: NodeIndex<u32>) -> Self { ... }
fn padded_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... }
fn wh_of(self, idx: NodeIndex<u32>) -> Self { ... }
fn padded_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... }
fn kid_area_w_of(self, idx: NodeIndex<u32>) -> Self { ... }
fn padded_kid_area_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... }
fn kid_area_h_of(self, idx: NodeIndex<u32>) -> Self { ... }
fn padded_kid_area_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... }
fn kid_area_wh_of(self, idx: NodeIndex<u32>) -> Self { ... }
fn padded_kid_area_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self { ... }
fn get_w(&self, ui: &Ui) -> Option<f64> { ... }
fn get_h(&self, ui: &Ui) -> Option<f64> { ... }
fn get_wh(&self, ui: &Ui) -> Option<[f64; 2]> { ... }
}
Expand description
Widgets that support different dimensions.
Required methods
fn x_dimension(self, x: Dimension) -> Self
fn x_dimension(self, x: Dimension) -> Self
Set the length along the x axis.
fn y_dimension(self, x: Dimension) -> Self
fn y_dimension(self, x: Dimension) -> Self
Set the length along the y axis.
fn get_x_dimension(&self, ui: &Ui) -> Dimension
fn get_x_dimension(&self, ui: &Ui) -> Dimension
The widget’s length along the x axis as a Dimension.
fn get_y_dimension(&self, ui: &Ui) -> Dimension
fn get_y_dimension(&self, ui: &Ui) -> Dimension
The widget’s length along the y axis as a Dimension.
Provided methods
Set the width as the width of the widget at the given index.
fn padded_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
fn padded_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
Set the width as the width of the widget at the given index padded at both ends by the given Scalar.
Set the height as the height of the widget at the given index.
fn padded_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
fn padded_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
Set the height as the height of the widget at the given index padded at both ends by the given Scalar.
Set the dimensions as the dimensions of the widget at the given index.
fn padded_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
fn padded_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
Set the dimensions as the dimensions of the widget at the given index with all four edges padded by the given scalar.
fn kid_area_w_of(self, idx: NodeIndex<u32>) -> Self
fn kid_area_w_of(self, idx: NodeIndex<u32>) -> Self
Set the width as the width of the padded area of the widget at the given index.
fn padded_kid_area_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
fn padded_kid_area_w_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
Set the width as the KidArea
width for the widget at the given index, padded at both ends
by the given scalar.
fn kid_area_h_of(self, idx: NodeIndex<u32>) -> Self
fn kid_area_h_of(self, idx: NodeIndex<u32>) -> Self
Set the height as the KidArea
height of the widget at the given index.
fn padded_kid_area_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
fn padded_kid_area_h_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
Set the height as the KidArea
height of the widget at the given index, padded at both
ends by the given scalar.
fn kid_area_wh_of(self, idx: NodeIndex<u32>) -> Self
fn kid_area_wh_of(self, idx: NodeIndex<u32>) -> Self
Set the dimensions as the KidArea
dimensions of the widget at the given index.
fn padded_kid_area_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
fn padded_kid_area_wh_of(self, idx: NodeIndex<u32>, pad: f64) -> Self
Set the dimensions as the KidArea
dimensions of the widget at the given index, padded at
all four edges by the given scalar.