Trait RelocatableState

Source
pub trait RelocatableState {
    // Required method
    fn relocate(&mut self, shift: (i16, i16), clip: Rect);
}
Expand description

Widgets can be rendered to a temporary buffer using the buffers own coordinate system.

To adjust the Rects derived during rendering/layout to the actual screen coordinates a widget can implement this trait.

Container widgets that support this will call relocate() after rendering the widgets.

Required Methods§

Source

fn relocate(&mut self, shift: (i16, i16), clip: Rect)

Relocate the areas in this widgets state.

Implementations on Foreign Types§

Source§

impl RelocatableState for Rect

Source§

fn relocate(&mut self, shift: (i16, i16), clip: Rect)

Source§

impl RelocatableState for [Rect]

Source§

fn relocate(&mut self, shift: (i16, i16), clip: Rect)

Implementors§