pub struct DIALOG;
Expand description
Dialog service.
The non-custom dialog methods can be configured to open as native dialogs instead of the custom overlay dialogs.
§Panics
All dialog methods panic is not called inside a window.
Implementations§
source§impl DIALOG
impl DIALOG
sourcepub fn info(
&self,
title: impl IntoVar<Txt>,
msg: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<()>, ArcVar<Response<()>>>
pub fn info( &self, title: impl IntoVar<Txt>, msg: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<()>, ArcVar<Response<()>>>
Show an info dialog with “Ok” button.
sourcepub fn warn(
&self,
title: impl IntoVar<Txt>,
msg: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<()>, ArcVar<Response<()>>>
pub fn warn( &self, title: impl IntoVar<Txt>, msg: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<()>, ArcVar<Response<()>>>
Show a warning dialog with “Ok” button.
sourcepub fn error(
&self,
title: impl IntoVar<Txt>,
msg: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<()>, ArcVar<Response<()>>>
pub fn error( &self, title: impl IntoVar<Txt>, msg: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<()>, ArcVar<Response<()>>>
Show an error dialog with “Ok” button.
sourcepub fn ask(
&self,
title: impl IntoVar<Txt>,
question: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<bool>, ArcVar<Response<bool>>>
pub fn ask( &self, title: impl IntoVar<Txt>, question: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<bool>, ArcVar<Response<bool>>>
Shows a question dialog with “No” and “Yes” buttons. Returns true
for “Yes”.
sourcepub fn confirm(
&self,
title: impl IntoVar<Txt>,
question: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<bool>, ArcVar<Response<bool>>>
pub fn confirm( &self, title: impl IntoVar<Txt>, question: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<bool>, ArcVar<Response<bool>>>
Shows a question dialog with “Cancel” and “Ok” buttons. Returns true
for “Ok”.
sourcepub fn open_file(
&self,
title: impl IntoVar<Txt>,
starting_dir: impl Into<PathBuf>,
starting_name: impl IntoVar<Txt>,
filters: impl Into<FileDialogFilters>,
) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
pub fn open_file( &self, title: impl IntoVar<Txt>, starting_dir: impl Into<PathBuf>, starting_name: impl IntoVar<Txt>, filters: impl Into<FileDialogFilters>, ) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
Shows a native file picker dialog configured to select one existing file.
sourcepub fn open_files(
&self,
title: impl IntoVar<Txt>,
starting_dir: impl Into<PathBuf>,
starting_name: impl IntoVar<Txt>,
filters: impl Into<FileDialogFilters>,
) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
pub fn open_files( &self, title: impl IntoVar<Txt>, starting_dir: impl Into<PathBuf>, starting_name: impl IntoVar<Txt>, filters: impl Into<FileDialogFilters>, ) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
Shows a native file picker dialog configured to select one or more existing files.
sourcepub fn save_file(
&self,
title: impl IntoVar<Txt>,
starting_dir: impl Into<PathBuf>,
starting_name: impl IntoVar<Txt>,
filters: impl Into<FileDialogFilters>,
) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
pub fn save_file( &self, title: impl IntoVar<Txt>, starting_dir: impl Into<PathBuf>, starting_name: impl IntoVar<Txt>, filters: impl Into<FileDialogFilters>, ) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
Shows a native file picker dialog configured to select one file path that does not exist yet.
sourcepub fn select_folder(
&self,
title: impl IntoVar<Txt>,
starting_dir: impl Into<PathBuf>,
starting_name: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
pub fn select_folder( &self, title: impl IntoVar<Txt>, starting_dir: impl Into<PathBuf>, starting_name: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
Shows a native file picker dialog configured to select one existing directory.
sourcepub fn select_folders(
&self,
title: impl IntoVar<Txt>,
starting_dir: impl Into<PathBuf>,
starting_name: impl IntoVar<Txt>,
) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
pub fn select_folders( &self, title: impl IntoVar<Txt>, starting_dir: impl Into<PathBuf>, starting_name: impl IntoVar<Txt>, ) -> ReadOnlyVar<Response<FileDialogResponse>, ArcVar<Response<FileDialogResponse>>>
Shows a native file picker dialog configured to select one or more existing directories.
source§impl DIALOG
impl DIALOG
sourcepub fn native_dialogs(&self) -> ArcVar<DialogKind>
pub fn native_dialogs(&self) -> ArcVar<DialogKind>
Variable that defines what native dialogs are used when the dialog methods are called in window contexts.
The native_dialogs
context property can also be used to override the config just for some widgets.
Note that some dialogs only have the native implementation as of this release.
source§impl DIALOG
impl DIALOG
sourcepub fn respond_default(&self)
pub fn respond_default(&self)
Try to close the contextual dialog without directly setting a response.
If the dialog has no default_response
the
on_dialog_close_canceled
event notifies instead of closing.
Auto Trait Implementations§
impl Freeze for DIALOG
impl RefUnwindSafe for DIALOG
impl Send for DIALOG
impl Sync for DIALOG
impl Unpin 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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 more