Struct e_utils::dialog::MessageDialog
source · pub struct MessageDialog { /* private fields */ }Expand description
Synchronous Message Dialog. Supported platforms:
- Windows
- macOS
- Linux (GTK only)
- WASM
Implementations§
source§impl MessageDialog
impl MessageDialog
pub fn new() -> MessageDialog
sourcepub fn set_level(self, level: MessageLevel) -> MessageDialog
pub fn set_level(self, level: MessageLevel) -> MessageDialog
Set level of a dialog
Depending on the system it can result in level specific icon to show up, the will inform user it message is a error, warning or just information.
sourcepub fn set_title(self, text: impl Into<String>) -> MessageDialog
pub fn set_title(self, text: impl Into<String>) -> MessageDialog
Set title of a dialog
sourcepub fn set_description(self, text: impl Into<String>) -> MessageDialog
pub fn set_description(self, text: impl Into<String>) -> MessageDialog
Set description of a dialog
Description is a content of a dialog
Set the set of button that will be displayed on the dialog
Okdialog is a singleOkbuttonOkCanceldialog, will display 2 buttons: ok and cancel.YesNodialog, will display 2 buttons: yes and no.YesNoCanceldialog, will display 3 buttons: yes, no, and cancel.
sourcepub fn set_parent<W>(self, parent: &W) -> MessageDialogwhere
W: HasWindowHandle,
pub fn set_parent<W>(self, parent: &W) -> MessageDialogwhere
W: HasWindowHandle,
Set parent windows explicitly (optional)
Suported in: macos and windows
sourcepub fn show(self) -> MessageDialogResult
pub fn show(self) -> MessageDialogResult
Shows a message dialog and returns the button that was pressed.
Trait Implementations§
source§impl Clone for MessageDialog
impl Clone for MessageDialog
source§fn clone(&self) -> MessageDialog
fn clone(&self) -> MessageDialog
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MessageDialog
impl Debug for MessageDialog
source§impl Default for MessageDialog
impl Default for MessageDialog
source§fn default() -> MessageDialog
fn default() -> MessageDialog
Returns the “default value” for a type. Read more
impl Send for MessageDialog
Auto Trait Implementations§
impl Freeze for MessageDialog
impl RefUnwindSafe for MessageDialog
impl !Sync for MessageDialog
impl Unpin for MessageDialog
impl UnwindSafe for MessageDialog
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> 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> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().