[][src]Struct conrod::UiBuilder

pub struct UiBuilder {
    pub window_dimensions: Dimensions,
    pub maybe_theme: Option<Theme>,
    pub maybe_widgets_capacity: Option<usize>,
}

A constructor type for building a Ui instance with a set of optional parameters.

Fields

The initial dimensions of the window in which the Ui exists.

The theme used to set default styling for widgets.

If this field is None when build is called, Theme::default will be used.

An estimation of the maximum number of widgets that will be used with this Ui instance.

This value is used to determine the size with which various collections should be reserved. This may make the first cycle of widget instantiations more efficient as the collections will not be required to grow dynamically. These collections include:

If this field is None when build is called, these collections will be initialised with no pre-reserved size and will instead grow organically as needed.

Methods

impl UiBuilder
[src]

Begin building a new Ui instance.

Give the initial dimensions of the window within which the Ui will be instantiated as a Scalar (DPI agnostic) value.

The theme used to set default styling for widgets.

If this field is None when build is called, Theme::default will be used.

An estimation of the maximum number of widgets that will be used with this Ui instance.

This value is used to determine the size with which various collections should be reserved. This may make the first cycle of widget instantiations more efficient as the collections will not be required to grow dynamically. These collections include:

  • the widget graph node and edge Vecs
  • the HashSet used to track updated widgets
  • the widget DepthOrder (a kind of toposort describing the order of widgets in their rendering order).

If this field is None when build is called, these collections will be initialised with no pre-reserved size and will instead grow organically as required.

Build Ui from the given builder

Auto Trait Implementations

impl Send for UiBuilder

impl !Sync for UiBuilder

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T
[src]

impl<T> Downcast for T where
    T: Any
[src]

Convert Box<Trait> (where Trait: Downcast) to Box<Any>. Box<Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any's vtable from &Trait's. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any's vtable from &mut Trait's. Read more