Function conrod::default_x_dimension [] [src]

pub fn default_x_dimension<W, C>(widget: &W, ui: &Ui<C>) -> Option<Dimension> where W: Widget, C: CharacterCache

Determines the default Dimension for a Widget.

This function checks for a default dimension in the following order. 1. Check for a default value within the Ui's Theme. 2. Otherwise attempts to copy the dimension of the previously set widget if there is one. 3. Otherwise attempts to copy the dimension of our parent widget.

This is called by the default implementations of Widget::default_x_dimension.

If you wish to override Widget::default_x_dimension, feel free to call this function internally if you partly require the bahaviour of the default implementations.

Returns None if no default can be found.