[][src]Function vgtk::run_dialog

pub fn run_dialog<C: 'static + Component>(
    parent: Option<&Window>
) -> impl Future<Output = Result<ResponseType, Canceled>>

Launch a Dialog component as a modal dialog.

The parent window will be blocked until it resolves.

It returns a Future which resolves either to Ok(ResponseType) when the response signal is emitted, or to Err(Canceled) if the dialog is destroyed before the user responds to it.

If the component doesn't have a Dialog (or something which implements Dialog) as its top level object, this function will panic.