pub struct WindowBuilder<W> where
    W: Widget
{ pub initializer: Option<Box<dyn FnOnce(&WidgetStorage) + 'static, Global>>, pub configuration: WindowConfiguration, }
Expand description

A builder for a Window.

Fields

initializer: Option<Box<dyn FnOnce(&WidgetStorage) + 'static, Global>>

The function that creates the root widget for this window.

configuration: WindowConfiguration

The intial configuration of the window.

Implementations

Creates a new builder with initializer used to create the root widget.

Sets the window’s title.

Sets the window’s position (in screen coordinates).

Sets the window’s size.

Prevents the window from being resized.

Maximizes the window upon opening.

Enables transparent window handling, if the platform supports it. Background colors that have transparency will allow other content to show through.

Removes decorations from the window (such as the title bar).

Sets that the window should stay on top of all other windows.

Opens the window. Only possible on platforms that support multiple windows.

Trait Implementations

Casts this value to a mutable Any reference.

Returns the window configuration.

Builds the window’s root content and returns the registration.

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more