pub enum Dialog {
File {
dialog: FileDialog,
maybe_picker: Option<FilePicker>,
},
Alert(Option<AlertDialog>),
Confirm(Option<ConfirmDialog>),
Prompt(Option<PromptDialog>),
Authentication {
username: String,
password: String,
request: Option<AuthenticationRequest>,
},
Permission {
message: String,
request: Option<PermissionRequest>,
},
SelectDevice {
request: Option<BluetoothDeviceSelectionRequest>,
selected_device_index: usize,
},
SelectElement {
maybe_prompt: Option<SelectElement>,
toolbar_offset: Length<f32, DeviceIndependentPixel>,
},
ColorPicker {
current_color: Color32,
maybe_prompt: Option<ColorPicker>,
toolbar_offset: Length<f32, DeviceIndependentPixel>,
},
ContextMenu {
menu: Option<ContextMenu>,
toolbar_offset: Length<f32, DeviceIndependentPixel>,
},
}Variants§
File
Alert(Option<AlertDialog>)
Confirm(Option<ConfirmDialog>)
Prompt(Option<PromptDialog>)
Authentication
Permission
SelectDevice
SelectElement
ColorPicker
ContextMenu
Implementations§
Source§impl Dialog
impl Dialog
pub fn new_file_dialog(file_picker: FilePicker) -> Self
pub fn new_simple_dialog(dialog: SimpleDialog) -> Self
pub fn new_authentication_dialog( authentication_request: AuthenticationRequest, ) -> Self
pub fn new_permission_request_dialog( permission_request: PermissionRequest, ) -> Self
pub fn new_device_selection_dialog( request: BluetoothDeviceSelectionRequest, ) -> Self
pub fn new_select_element_dialog( prompt: SelectElement, toolbar_offset: Length<f32, DeviceIndependentPixel>, ) -> Self
pub fn new_color_picker_dialog( prompt: ColorPicker, toolbar_offset: Length<f32, DeviceIndependentPixel>, ) -> Self
Sourcepub fn update(&mut self, ctx: &Context) -> bool
pub fn update(&mut self, ctx: &Context) -> bool
Returns false if the dialog has been closed, or true otherwise.
pub(crate) fn embedder_control_id(&self) -> Option<EmbedderControlId>
Auto Trait Implementations§
impl Freeze for Dialog
impl !RefUnwindSafe for Dialog
impl !Send for Dialog
impl !Sync for Dialog
impl Unpin for Dialog
impl UnsafeUnpin for Dialog
impl !UnwindSafe for Dialog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert