Struct nxui::messagebox::MessageBox
source · [−]pub struct MessageBox {
pub title: String,
pub message: String,
pub style: MessageType,
pub button_style: ButtonsType,
}Fields
title: StringMessage to be displayed
message: StringMessage to be displayed
style: MessageTypeDialog style
Dialog button style
Implementations
sourceimpl MessageBox
impl MessageBox
sourcepub fn new(
title: String,
message: String,
style: MessageType,
button_style: ButtonsType
) -> Self
pub fn new(
title: String,
message: String,
style: MessageType,
button_style: ButtonsType
) -> Self
Create a new MessageBox.
sourcepub fn show(&self) -> ResponseType
pub fn show(&self) -> ResponseType
Display the dialog In Windows environment, returns windows-sys::Win32::UI::WindowsAndMessaging::MESSAGEBOX_RESULT
Examples
use nxui::messagebox::MessageBox;
use nxui::natives_and_messaging::{DIALOGSTYLE_INFORMATION,BUTTONSTYLE_OK};
fn main() {
MessageBox::new("Hello NXUI!".to_string(),"This is a test".to_string(),DIALOGSTYLE_INFORMATION,BUTTONSTYLE_OK).show();
}Auto Trait Implementations
impl RefUnwindSafe for MessageBox
impl Send for MessageBox
impl Sync for MessageBox
impl Unpin for MessageBox
impl UnwindSafe for MessageBox
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more