win_msgbox/
abort_retry_ignore.rs1use super::Options;
2use windows_sys::Win32::UI::WindowsAndMessaging::{
3 IDABORT, IDRETRY, MB_ABORTRETRYIGNORE, MESSAGEBOX_RESULT, MESSAGEBOX_STYLE,
4};
5
6#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
8pub enum AbortRetryIgnore {
9 Abort,
11 Retry,
13 Ignore,
15}
16
17impl From<MESSAGEBOX_RESULT> for AbortRetryIgnore {
18 fn from(value: MESSAGEBOX_RESULT) -> Self {
19 match value {
20 IDABORT => Self::Abort,
21 IDRETRY => Self::Retry,
22 _ => Self::Ignore,
23 }
24 }
25}
26
27impl Options for AbortRetryIgnore {
28 fn flags() -> MESSAGEBOX_STYLE {
29 MB_ABORTRETRYIGNORE
30 }
31}