Skip to main content

ApplicationViewState

Trait ApplicationViewState 

pub trait ApplicationViewState {
    // Required methods
    fn capture_application_view(
        &self,
    ) -> Result<Option<ApplicationLocalView>, ThawError>;
    fn restore_application_view(
        &mut self,
        local: &ApplicationLocalView,
        doc: &AutoCommit,
    ) -> Result<ApplicationFocusRestore, ThawError>;

    // Provided method
    fn finish_application_view_restore(&mut self) -> Result<(), ThawError> { ... }
}
Expand description

The application-owned presentation of a widget below a component’s root: which item is open, what is expanded, where the caret was. A root that hosts the widget (a framework app’s root over its surface) saves and restores it as its own AppWidget view, so a reopened window shows what it showed.

Required Methods§

fn capture_application_view( &self, ) -> Result<Option<ApplicationLocalView>, ThawError>

Capture the presentation to save with the window.

§Errors

Rejects an invalid contribution before anything is saved.

fn restore_application_view( &mut self, local: &ApplicationLocalView, doc: &AutoCommit, ) -> Result<ApplicationFocusRestore, ThawError>

Prepare the saved presentation local against the latest record.

§Errors

Rejects a payload the application cannot restore.

Provided Methods§

fn finish_application_view_restore(&mut self) -> Result<(), ThawError>

Finish after the ordinary view restored, before the first frame.

§Errors

Rejects a prepared plan without publishing a partial view.

Implementors§