Trait HistoryPreview
pub trait HistoryPreview {
// Required methods
fn layout(
&mut self,
bounds: Rect,
text: &mut TextRenderer,
theme: &Theme,
) -> Result<(), String>;
fn draw(
&mut self,
scene: &mut Scene,
transform: Affine,
text: &mut TextRenderer,
theme: &Theme,
);
fn navigate(&mut self, command: PreviewNavigation) -> bool;
fn view(&self) -> PreviewView;
fn accessibility(&self) -> PreviewAccessibility;
// Provided method
fn set_window_presents_search(&mut self, presents: bool) { ... }
}Required Methods§
fn layout(
&mut self,
bounds: Rect,
text: &mut TextRenderer,
theme: &Theme,
) -> Result<(), String>
fn layout( &mut self, bounds: Rect, text: &mut TextRenderer, theme: &Theme, ) -> Result<(), String>
§Errors
Returns a description when the preview cannot lay out the frozen content.
fn draw( &mut self, scene: &mut Scene, transform: Affine, text: &mut TextRenderer, theme: &Theme, )
fn view(&self) -> PreviewView
fn accessibility(&self) -> PreviewAccessibility
Provided Methods§
fn set_window_presents_search(&mut self, presents: bool)
fn set_window_presents_search(&mut self, presents: bool)
The live window’s bar presents search and History for the app, so the version is drawn as the live view is: its header without a button of its own that opens the app’s search.