Skip to main content

open

Function open 

Source
pub fn open(
    app: &AppHandle,
    preview: Preview,
    source: impl FnOnce(TileSink) -> Box<dyn TileSource>,
) -> Result<(u64, Rc<RefCell<PreviewState>>), String>
Expand description

Opens a preview: source makes the tile source from the viewport’s sink. Returns the dialog’s id and the viewport’s state, shared with the dialog’s body; an error when the dialogs plugin is missing or the viewport does not fit a custom dialog.