[][src]Struct druid::WindowDesc

pub struct WindowDesc<T> { /* fields omitted */ }

A description of a window to be instantiated.

This includes a function that can build the root widget, as well as other window properties such as the title.

Methods

impl<T: Data + 'static> WindowDesc<T>[src]

pub fn new<W, F>(root: F) -> WindowDesc<T> where
    W: Widget<T> + 'static,
    F: Fn() -> W + 'static, 
[src]

Create a new WindowDesc, taking a funciton that will generate the root Widget for this window.

It is possible that a WindowDesc can be reused to launch multiple windows.

pub fn title(self, title: LocalizedString<T>) -> Self[src]

Set the title for this window. This is a LocalizedString that will be kept up to date as the application's state changes.

pub fn menu(self, menu: MenuDesc<T>) -> Self[src]

Set the menu for this window.

Auto Trait Implementations

impl<T> !Send for WindowDesc<T>

impl<T> !Sync for WindowDesc<T>

impl<T> Unpin for WindowDesc<T>

impl<T> !UnwindSafe for WindowDesc<T>

impl<T> !RefUnwindSafe for WindowDesc<T>

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

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

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>,