[−][src]Trait kas_theme::ThemeDst
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)
Theme initialisation
See also Theme::init
.
fn new_window(
&self,
draw: &mut D::Draw,
dpi_factor: f32
) -> StackDst<dyn WindowDst<D::Draw>>
&self,
draw: &mut D::Draw,
dpi_factor: f32
) -> StackDst<dyn WindowDst<D::Draw>>
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<D::Draw>, dpi_factor: f32)
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<D::Draw>,
rect: Rect
) -> StackDst<dyn DrawHandle>
&self,
draw: &mut D::Draw,
window: &mut dyn WindowDst<D::Draw>,
rect: Rect
) -> StackDst<dyn DrawHandle>
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_colour(&self) -> Colour
Background colour
See also Theme::clear_colour
.
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<D::Draw>>::SizeHandle: 'static,
[src]
<T as Theme<D>>::DrawHandle: 'static,
<<T as Theme<D>>::Window as Window<D::Draw>>::SizeHandle: 'static,
fn init(&mut self, draw: &mut D)
[src]
fn new_window(
&self,
draw: &mut D::Draw,
dpi_factor: f32
) -> StackDst<dyn WindowDst<D::Draw>>
[src]
&self,
draw: &mut D::Draw,
dpi_factor: f32
) -> StackDst<dyn WindowDst<D::Draw>>
fn update_window(&self, window: &mut dyn WindowDst<D::Draw>, dpi_factor: f32)
[src]
unsafe fn draw_handle(
&self,
draw: &mut D::Draw,
window: &mut dyn WindowDst<D::Draw>,
rect: Rect
) -> StackDst<dyn DrawHandle>
[src]
&self,
draw: &mut D::Draw,
window: &mut dyn WindowDst<D::Draw>,
rect: Rect
) -> StackDst<dyn DrawHandle>