[−][src]Struct nannou::ui::Builder
A type used for building a new Ui
.
Methods
impl<'a> Builder<'a>
[src]
pub fn window(self, window_id: Id) -> Self
[src]
Specify the window on which the Ui will be instantiated.
By default, this is the currently focused window, aka the window returned via App::window_id.
pub fn with_dimensions(self, dimensions: [Scalar; 2]) -> Self
[src]
Build the Ui
with the given dimensions.
By default, the Ui
will have the dimensions of the specified window.
pub fn with_theme(self, theme: Theme) -> Self
[src]
Build the Ui
with the given theme.
By default, nannou uses conrod's default theme.
pub fn automatically_handle_input(self, b: bool) -> Self
[src]
Whether or not the App
should automatically submit input to the Ui
.
When enabled, events that can be interpreted as UI Input
will be passed to the Ui
via
the conrod::Ui::handle_input
method.
Note that Input
s are not immediately submitted to the Ui
when received by the App
.
Instead, they are enqueued for the Ui
to be processed next time Ui::set_widgets
is
called. The max number of pending Input
s before they become ignored can be specified via
the pending_input_limit
method.
By default this is true
. Users should set this to false
if they wish to manually filter
and submit events (e.g. if something is occluding the Ui
and the user wishes to filter
occluded input).
pub fn pending_input_limit(self, limit: usize) -> Self
[src]
Specify the max number of pending Input
s that can be enqueued for processing by the Ui
before Input
s start being ignored.
By default this is Ui::DEFAULT_PENDING_INPUT_LIMIT
.
This has no affect if automatically_handle_input
is set to false
.
pub fn default_font_path(self, path: PathBuf) -> Self
[src]
Specify the path to the default font.
By default this is "fonts/NotoSans/NotoSans-Regular.ttf".
Fonts can also be specified manually after Ui
creation using the fonts_mut
method.
pub fn with_glyph_cache_dimensions(self, width: u32, height: u32) -> Self
[src]
Specify the dimensions of the texture used to cache glyphs on the GPU.
By default this is equal to the framebuffer dimensions of the associated window at the time
of building the UI
.
If you notice any glitching of UI text, this may be due to exceeding the bounds of the texture used to cache glyphs. Try using this to specify a larger glyph cache size to fix this.
pub fn subpass(self, subpass: Subpass) -> Self
[src]
Optionally specify a render pass subpass in which this Ui
should be drawn.
If unspecified, the Ui
will implicitly create its own single-pass render pass and
necessary buffers.
pub fn build(self) -> Result<Ui, BuildError>
[src]
Build a Ui
with the specified parameters.
Returns None
if the window at the given Id
is closed or if the inner Renderer
returns
an error upon creation.
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.