[][src]Struct druid::window::Window

pub struct Window<T: Data + 'static + Default, W: Widget<T> + 'static> {
    pub(crate) root: WidgetPod<T, W>,
    size: Size,
    phantom_data: PhantomData<T>,
}

Per-window state not owned by user code.

Fields

root: WidgetPod<T, W>size: Sizephantom_data: PhantomData<T>

Methods

impl<T: Data + 'static + Default, W: Widget<T> + 'static> Window<T, W>[src]

pub fn new(root: W) -> Self[src]

pub fn event(
    &mut self,
    ctx: &mut EventCtx<T>,
    event: &Event,
    data: &mut T,
    env: &Env
)
[src]

pub fn update(&mut self, update_ctx: &mut UpdateCtx<T>, data: &T, env: &Env)[src]

pub fn layout(&mut self, layout_ctx: &mut LayoutCtx, data: &T, env: &Env)[src]

pub fn paint(&mut self, paint_ctx: &mut PaintCtx, data: &T, env: &Env)[src]

Trait Implementations

impl<T: Clone + Data + 'static + Default, W: Clone + Widget<T> + 'static> Clone for Window<T, W>[src]

Auto Trait Implementations

impl<T, W> Send for Window<T, W> where
    T: Send,
    W: Send

impl<T, W> Sync for Window<T, W> where
    T: Sync,
    W: Sync

impl<T, W> Unpin for Window<T, W> where
    T: Unpin,
    W: Unpin

Blanket Implementations

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

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

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

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

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

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

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 
[src]

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

type Output = T

Should always be Self

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.