Struct nannou::WindowBuilder[]

pub struct WindowBuilder {
    pub window: WindowAttributes,
    // some fields omitted
}

Object that allows you to build windows.

Fields

The attributes to use to create the window.

Methods

impl WindowBuilder

Initializes a new WindowBuilder with default values.

Requests the window to be of specific dimensions.

Sets a minimum dimension size for the window

Sets a maximum dimension size for the window

Sets whether the window is resizable or not

Note that making the window unresizable doesn't exempt you from handling Resized, as that event can still be triggered by DPI scaling, entering fullscreen mode, etc.

Platform-specific

This only has an effect on desktop platforms.

Due to a bug in XFCE, this has no effect on Xfwm.

Requests a specific title for the window.

Sets the window fullscreen state. None means a normal window, Some(MonitorId) means a fullscreen window on that specific monitor

Requests maximized mode.

Sets whether the window will be initially hidden or visible.

Sets whether the background of the window should be transparent.

Sets whether the window should have a border, a title bar, etc.

Sets whether or not the window will always be on top of other windows.

Sets the window icon. On Windows and X11, this is typically the small icon in the top-left corner of the titlebar.

Platform-specific

This only has an effect on Windows and X11.

On Windows, this sets ICON_SMALL. The base size for a window icon is 16x16, but it's recommended to account for screen scaling and pick a multiple of that, i.e. 32x32.

X11 has no universal guidelines for icon sizes, so you're at the whims of the WM. That said, it's usually in the same ballpark as on Windows.

Enables multitouch.

Builds the window.

Error should be very rare and only occur in case of permission denied, incompatible system, out of memory, etc.

Trait Implementations

impl Clone for WindowBuilder

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl WindowBuilderExt for WindowBuilder

Build window with WM_CLASS hint; defaults to the name of the binary. Only relevant on X11.

Build window with override-redirect flag; defaults to false. Only relevant on X11.

Build window with _NET_WM_WINDOW_TYPE hint; defaults to Normal. Only relevant on X11.

Build window with resize increment hint. Only implemented on X11.

Build window with base size hint. Only implemented on X11.

Auto Trait Implementations

impl !Send for WindowBuilder

impl !Sync for WindowBuilder