[][src]Trait kludgine::ui::Component

pub trait Component: Send + Sync {
#[must_use]    fn initialize<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut SceneContext
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn content_size<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        context: &'life1 mut StyledContext,
        constraints: &'life2 Size<Option<f32>, Scaled>
    ) -> Pin<Box<dyn Future<Output = KludgineResult<Size<f32, Scaled>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn render<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        context: &'life1 mut StyledContext,
        layout: &'life2 Layout
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn update<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut SceneContext
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn layout<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut StyledContext
    ) -> Pin<Box<dyn Future<Output = KludgineResult<Box<dyn LayoutSolver>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn render_background<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        context: &'life1 mut StyledContext,
        layout: &'life2 Layout
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn mouse_down<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context,
        window_position: Point<f32, Scaled>,
        button: MouseButton
    ) -> Pin<Box<dyn Future<Output = KludgineResult<EventStatus>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn hovered<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn unhovered<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn mouse_drag<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context,
        window_position: Option<Point<f32, Scaled>>,
        button: MouseButton
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn mouse_up<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context,
        window_position: Option<Point<f32, Scaled>>,
        button: MouseButton
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn clicked<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context,
        window_position: Point<f32, Scaled>,
        button: MouseButton
    ) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn mouse_wheel<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 mut Context,
        delta: MouseScrollDelta,
        touch_phase: TouchPhase
    ) -> Pin<Box<dyn Future<Output = KludgineResult<EventStatus>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] fn hit_test<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 mut Context,
        window_position: Point<f32, Scaled>
    ) -> Pin<Box<dyn Future<Output = KludgineResult<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... } }

Provided methods

#[must_use]fn initialize<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut SceneContext
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Called once the Window is opened

#[must_use]fn content_size<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    context: &'life1 mut StyledContext,
    constraints: &'life2 Size<Option<f32>, Scaled>
) -> Pin<Box<dyn Future<Output = KludgineResult<Size<f32, Scaled>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn render<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    context: &'life1 mut StyledContext,
    layout: &'life2 Layout
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn update<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut SceneContext
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn layout<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut StyledContext
) -> Pin<Box<dyn Future<Output = KludgineResult<Box<dyn LayoutSolver>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn render_background<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    context: &'life1 mut StyledContext,
    layout: &'life2 Layout
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn mouse_down<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context,
    window_position: Point<f32, Scaled>,
    button: MouseButton
) -> Pin<Box<dyn Future<Output = KludgineResult<EventStatus>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn hovered<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn unhovered<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn mouse_drag<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context,
    window_position: Option<Point<f32, Scaled>>,
    button: MouseButton
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn mouse_up<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context,
    window_position: Option<Point<f32, Scaled>>,
    button: MouseButton
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn clicked<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context,
    window_position: Point<f32, Scaled>,
    button: MouseButton
) -> Pin<Box<dyn Future<Output = KludgineResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn mouse_wheel<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    context: &'life1 mut Context,
    delta: MouseScrollDelta,
    touch_phase: TouchPhase
) -> Pin<Box<dyn Future<Output = KludgineResult<EventStatus>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn hit_test<'life0, 'life1, 'async_trait>(
    &'life0 self,
    context: &'life1 mut Context,
    window_position: Point<f32, Scaled>
) -> Pin<Box<dyn Future<Output = KludgineResult<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl Component for Button[src]

impl Component for Image[src]

impl Component for Label[src]

impl<Unit> Component for Canvas<Unit> where
    Unit: Clone + Send + Sync
[src]

Loading content...