pub trait RelocatableState {
// Required method
fn relocate(&mut self, shift: (i16, i16), clip: Rect);
// Provided methods
fn relocate_popup(&mut self, shift: (i16, i16), clip: Rect) { ... }
fn relocate_popup_hidden(&mut self) { ... }
fn relocate_hidden(&mut self) { ... }
}Expand description
Widgets can be rendered to a temporary Buffer that will be dumped to the main render Buffer at a later point.
This temporary Buffer can have its own coordinate system and output in the main render Buffer can happen anywhere.
Most rat-widgets store one or more areas during rendering for later mouse interactions. All these areas need to be adjusted whenever such a temporary Buffer is used.
This trait provides the entry point for such an adjustment.
Required Methods§
Provided Methods§
Sourcefn relocate_popup(&mut self, shift: (i16, i16), clip: Rect)
fn relocate_popup(&mut self, shift: (i16, i16), clip: Rect)
Relocate only popup areas. As rendering the popups is a separate render, this has to be separate too.
Relocate all popup areas to a clip-rect (0,0+0x0).
Relocate all areas to a clip-rect (0,0+0x0).