Trait conrod::Sizeable
[−]
[src]
pub trait Sizeable: Sized { fn x_dimension(self, x: Dimension) -> Self; fn y_dimension(self, x: Dimension) -> Self; fn get_x_dimension<C: CharacterCache>(&self, ui: &Ui<C>) -> Dimension; fn get_y_dimension<C: CharacterCache>(&self, ui: &Ui<C>) -> Dimension; fn width(self, w: Scalar) -> Self { ... } fn height(self, h: Scalar) -> Self { ... } fn dim(self, dim: Dimensions) -> Self { ... } fn dimensions(self, width: Scalar, height: Scalar) -> Self { ... } fn width_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn height_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn dim_of<I: Into<Index> + Copy>(self, idx: I) -> Self { ... } fn kid_area_width_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn kid_area_height_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn kid_area_dim_of<I: Into<Index> + Copy>(self, idx: I) -> Self { ... } fn get_width<C: CharacterCache>(&self, ui: &Ui<C>) -> Option<Scalar> { ... } fn get_height<C: CharacterCache>(&self, ui: &Ui<C>) -> Option<Scalar> { ... } fn get_dim<C: CharacterCache>(&self, ui: &Ui<C>) -> Option<Dimensions> { ... } }
Widgets that support different dimensions.
Required Methods
fn x_dimension(self, x: Dimension) -> Self
Set the length along the x axis.
fn y_dimension(self, x: Dimension) -> Self
Set the length along the y axis.
fn get_x_dimension<C: CharacterCache>(&self, ui: &Ui<C>) -> Dimension
The widget's length along the x axis as a Dimension.
fn get_y_dimension<C: CharacterCache>(&self, ui: &Ui<C>) -> Dimension
The widget's length along the y axis as a Dimension.
Provided Methods
fn width(self, w: Scalar) -> Self
Set the absolute width for the widget.
fn height(self, h: Scalar) -> Self
Set the absolute height for the widget.
fn dim(self, dim: Dimensions) -> Self
Set the dimensions for the widget.
fn dimensions(self, width: Scalar, height: Scalar) -> Self
Set the width and height for the widget.
fn width_of<I: Into<Index>>(self, idx: I) -> Self
Set the width as the width of the widget at the given index.
fn height_of<I: Into<Index>>(self, idx: I) -> Self
Set the height as the height of the widget at the given index.
fn dim_of<I: Into<Index> + Copy>(self, idx: I) -> Self
Set the dimensions as the dimensions of the widget at the given index.
fn kid_area_width_of<I: Into<Index>>(self, idx: I) -> Self
Set the width as the width of the padded area of the widget at the given index.
fn kid_area_height_of<I: Into<Index>>(self, idx: I) -> Self
Set the height as the height of the padded area of the widget at the given index.
fn kid_area_dim_of<I: Into<Index> + Copy>(self, idx: I) -> Self
Set the dimensions as the dimensions of the padded area of the widget at the given index.
fn get_width<C: CharacterCache>(&self, ui: &Ui<C>) -> Option<Scalar>
Get the absolute width of the widget as a Scalar value.
fn get_height<C: CharacterCache>(&self, ui: &Ui<C>) -> Option<Scalar>
Get the height of the widget.
fn get_dim<C: CharacterCache>(&self, ui: &Ui<C>) -> Option<Dimensions>
The dimensions for the widget.