Trait conrod::Sizeable
[−]
[src]
pub trait Sizeable: Sized { fn width(self, width: Scalar) -> Self; fn height(self, height: Scalar) -> Self; fn get_width<C: CharacterCache>(&self, theme: &Theme, glyph_cache: &GlyphCache<C>) -> Scalar; fn get_height(&self, theme: &Theme) -> Scalar; fn dim(self, dim: Dimensions) -> Self { ... } fn dimensions(self, width: Scalar, height: Scalar) -> Self { ... } fn get_dimensions<C: CharacterCache>(&self, theme: &Theme, glyph_cache: &GlyphCache<C>) -> Dimensions { ... } }
Widgets that support different dimensions.
Required Methods
fn width(self, width: Scalar) -> Self
Set the width for the widget.
fn height(self, height: Scalar) -> Self
Set the height for the widget.
fn get_width<C: CharacterCache>(&self, theme: &Theme, glyph_cache: &GlyphCache<C>) -> Scalar
Get the width of the widget.
fn get_height(&self, theme: &Theme) -> Scalar
Get the height of the widget.
Provided Methods
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 get_dimensions<C: CharacterCache>(&self, theme: &Theme, glyph_cache: &GlyphCache<C>) -> Dimensions
The dimensions for the widget.