Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
MessageBox Class Reference

#include <MessageBox.hpp>

Public Types

enum class  Icon : std::uint8_t { Info = static_cast<std::uint8_t>(pfd::icon::info) , Warning = static_cast<std::uint8_t>(pfd::icon::warning) , Error = static_cast<std::uint8_t>(pfd::icon::error) , Question = static_cast<std::uint8_t>(pfd::icon::question) }
 
enum class  Choice : std::uint8_t {
  Ok = static_cast<std::uint8_t>(pfd::choice::ok) , Ok_Cancel = static_cast<std::uint8_t>(pfd::choice::ok_cancel) , Yes_No = static_cast<std::uint8_t>(pfd::choice::yes_no) , Yes_No_Cancel = static_cast<std::uint8_t>(pfd::choice::yes_no_cancel) ,
  Retry_Cancel = static_cast<std::uint8_t>(pfd::choice::retry_cancel) , Abort_Retry_Ignore = static_cast<std::uint8_t>(pfd::choice::abort_retry_ignore)
}
 
enum class  Action : std::int8_t {
  Cancel = static_cast<std::int8_t>(pfd::button::cancel) , Ok = static_cast<std::int8_t>(pfd::button::ok) , Yes = static_cast<std::int8_t>(pfd::button::yes) , No = static_cast<std::int8_t>(pfd::button::no) ,
  Abort = static_cast<std::int8_t>(pfd::button::abort) , Retry = static_cast<std::int8_t>(pfd::button::retry) , Ignore = static_cast<std::int8_t>(pfd::button::ignore)
}
 

Public Member Functions

 MessageBox (const std::string &title, const std::string &message, Icon icon=Icon::Info, Choice choice=Choice::Ok_Cancel)
 
 ~MessageBox () noexcept=default
 
MessageBox::Action Show () const
 

Detailed Description

Avoid mismatch with windows's MessageBox macro

Definition at line 17 of file MessageBox.hpp.

Member Enumeration Documentation

◆ Action

enum MessageBox::Action : std::int8_t
strong

User Performed Action Result

Enumerator
Cancel 
Ok 
Yes 
No 
Abort 
Retry 
Ignore 

Definition at line 44 of file MessageBox.hpp.

◆ Choice

enum MessageBox::Choice : std::uint8_t
strong

Message box button layout choices

Enumerator
Ok 
Ok_Cancel 
Yes_No 
Yes_No_Cancel 
Retry_Cancel 
Abort_Retry_Ignore 

Definition at line 32 of file MessageBox.hpp.

◆ Icon

enum MessageBox::Icon : std::uint8_t
strong

Message box Icon type

Enumerator
Info 
Warning 
Error 
Question 

Definition at line 22 of file MessageBox.hpp.

Constructor & Destructor Documentation

◆ MessageBox()

MessageBox::MessageBox ( const std::string &  title,
const std::string &  message,
Icon  icon = Icon::Info,
Choice  choice = Choice::Ok_Cancel 
)

Constructor

Parameters
titletitle of the message box
messagedescription of the message box
iconIcon type of the message box Info, Warning, Error or Question
choicebuttons layout of the message box

◆ ~MessageBox()

MessageBox::~MessageBox ( )
defaultnoexcept

Member Function Documentation

◆ Show()

MessageBox::Action MessageBox::Show ( ) const

Spawns MessageBox and returns user Action


The documentation for this class was generated from the following file: