Trait kas_theme::ThemeDst[][src]

pub trait ThemeDst<D: DrawShared>: ThemeApi {
    fn init(&mut self, draw: &mut D);
fn new_window(
        &self,
        draw: &mut D::Draw,
        dpi_factor: f32
    ) -> StackDst<dyn WindowDst>;
fn update_window(&self, window: &mut dyn WindowDst, dpi_factor: f32);
unsafe fn draw_handle(
        &self,
        draw: &mut D::Draw,
        window: &mut dyn WindowDst,
        rect: Rect
    ) -> StackDst<dyn DrawHandle>;
fn clear_color(&self) -> Colour; }

As Theme, but without associated types

This trait is implemented automatically for all implementations of Theme. It is intended only for use where a less parameterised trait is required.

Feature gated: this is only available with feature stack_dst.

Required methods

fn init(&mut self, draw: &mut D)[src]

Theme initialisation

See also Theme::init.

fn new_window(
    &self,
    draw: &mut D::Draw,
    dpi_factor: f32
) -> StackDst<dyn WindowDst>
[src]

Construct per-window storage

Uses a StackDst to avoid requiring an associated type.

See also Theme::new_window.

fn update_window(&self, window: &mut dyn WindowDst, dpi_factor: f32)[src]

Update a window created by Theme::new_window

See also Theme::update_window.

unsafe fn draw_handle(
    &self,
    draw: &mut D::Draw,
    window: &mut dyn WindowDst,
    rect: Rect
) -> StackDst<dyn DrawHandle>
[src]

Construct a DrawHandle object

Uses a StackDst to avoid requiring an associated type.

See also Theme::draw_handle.

This function is unsafe because the returned object requires a lifetime bound not exceeding that of all three pointers passed in.

fn clear_color(&self) -> Colour[src]

Background colour

See also Theme::clear_color.

Loading content...

Implementors

impl<'a, D: DrawShared, T: Theme<D>> ThemeDst<D> for T where
    <T as Theme<D>>::DrawHandle: 'static,
    <<T as Theme<D>>::Window as Window>::SizeHandle: 'static, 
[src]

Loading content...