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<B: Backend>(&self, ui: &Ui<B>) -> Dimension; fn get_y_dimension<B: Backend>(&self, ui: &Ui<B>) -> Dimension; fn w(self, w: Scalar) -> Self { ... } fn h(self, h: Scalar) -> Self { ... } fn wh(self, wh: Dimensions) -> Self { ... } fn w_h(self, width: Scalar, height: Scalar) -> Self { ... } fn w_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn padded_w_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> Self { ... } fn h_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn padded_h_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> Self { ... } fn wh_of<I: Into<Index> + Copy>(self, idx: I) -> Self { ... } fn padded_wh_of<I: Into<Index> + Copy>(self, idx: I, pad: Scalar) -> Self { ... } fn kid_area_w_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn padded_kid_area_w_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> Self { ... } fn kid_area_h_of<I: Into<Index>>(self, idx: I) -> Self { ... } fn padded_kid_area_h_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> Self { ... } fn kid_area_wh_of<I: Into<Index> + Copy>(self, idx: I) -> Self { ... } fn padded_kid_area_wh_of<I: Into<Index> + Copy>(self, idx: I, pad: Scalar) -> Self { ... } fn get_w<B: Backend>(&self, ui: &Ui<B>) -> Option<Scalar> { ... } fn get_h<B: Backend>(&self, ui: &Ui<B>) -> Option<Scalar> { ... } fn get_wh<B: Backend>(&self, ui: &Ui<B>) -> 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<B: Backend>(&self, ui: &Ui<B>) -> Dimension
The widget's length along the x axis as a Dimension.
fn get_y_dimension<B: Backend>(&self, ui: &Ui<B>) -> Dimension
The widget's length along the y axis as a Dimension.
Provided Methods
fn w(self, w: Scalar) -> Self
Set the absolute width for the widget.
fn h(self, h: Scalar) -> Self
Set the absolute height for the widget.
fn wh(self, wh: Dimensions) -> Self
Set the dimensions for the widget.
fn w_h(self, width: Scalar, height: Scalar) -> Self
Set the width and height for the widget.
fn w_of<I: Into<Index>>(self, idx: I) -> Self
Set the width as the width of the widget at the given index.
fn padded_w_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> Self
Set the width as the width of the widget at the given index padded at both ends by the given Scalar.
fn h_of<I: Into<Index>>(self, idx: I) -> Self
Set the height as the height of the widget at the given index.
fn padded_h_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> Self
Set the height as the height of the widget at the given index padded at both ends by the given Scalar.
fn wh_of<I: Into<Index> + Copy>(self, idx: I) -> Self
Set the dimensions as the dimensions of the widget at the given index.
fn padded_wh_of<I: Into<Index> + Copy>(self, idx: I, pad: Scalar) -> 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<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 padded_kid_area_w_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> 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<I: Into<Index>>(self, idx: I) -> Self
Set the height as the KidArea
height of the widget at the given index.
fn padded_kid_area_h_of<I: Into<Index>>(self, idx: I, pad: Scalar) -> 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<I: Into<Index> + Copy>(self, idx: I) -> Self
Set the dimensions as the KidArea
dimensions of the widget at the given index.
fn padded_kid_area_wh_of<I: Into<Index> + Copy>(self, idx: I, pad: Scalar) -> Self
Set the dimensions as the KidArea
dimensions of the widget at the given index, padded at
all four edges by the given scalar.
fn get_w<B: Backend>(&self, ui: &Ui<B>) -> Option<Scalar>
Get the absolute width of the widget as a Scalar value.
fn get_h<B: Backend>(&self, ui: &Ui<B>) -> Option<Scalar>
Get the height of the widget.
fn get_wh<B: Backend>(&self, ui: &Ui<B>) -> Option<Dimensions>
The dimensions for the widget.
Implementors
impl<W> Sizeable for W where W: Widget