Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain::MessageBox Class Reference

Defines functions to work with Windows MessageBox utilities. More...

#include <message_box.hpp>

Public Types

enum  Type {
  Type::Ok, Type::OkCancel, Type::YesNoCancel, Type::YesNo,
  Type::RetryCancel, Type::CancelTryContinue
}
 Options for the MessageBox functions. More...
 
enum  Icon { Icon::None, Icon::Warning, Icon::Error, Icon::Information }
 Popup icon for the MessageBox functions. More...
 
enum  DefaultButton { DefaultButton::First, DefaultButton::Second, DefaultButton::Third }
 Default selected button for the MessageBox functions. More...
 
enum  Result {
  Result::Ok, Result::Cancel, Result::Yes, Result::No,
  Result::Retry, Result::Try, Result::Continue, Result::Close
}
 Result of the MessageBox functions. More...
 

Static Public Member Functions

static Result Show (std::string_view title, std::string_view text, Type type, Icon icon=Icon::None, DefaultButton defaultButton=DefaultButton::First)
 Shows a MessageBox with the given options.
 

Detailed Description

Defines functions to work with Windows MessageBox utilities.

Definition at line 13 of file message_box.hpp.

Member Enumeration Documentation

◆ DefaultButton

Default selected button for the MessageBox functions.

Enumerator
First 

Sets the default button as the first one.

Second 

Sets the default button as the second one.

Third 

Sets the default button as the third one.

Definition at line 50 of file message_box.hpp.

◆ Icon

Popup icon for the MessageBox functions.

Enumerator
None 

No specific icon.

Warning 

Shows an exclamation mark in a triangle.

Error 

Shows a stop sign.

Information 

Shows an i in a circle.

Definition at line 36 of file message_box.hpp.

◆ Result

Result of the MessageBox functions.

Enumerator
Ok 

The user pressed the Ok button.

Cancel 

The user pressed the Cancel button.

Yes 

The user pressed the Yes button.

No 

The user pressed the No button.

Retry 

The user pressed the Retry button.

Try 

The user pressed the Try Again button.

Continue 

The user pressed the Continue button.

Close 

The user closed the popup.

Definition at line 61 of file message_box.hpp.

◆ Type

Options for the MessageBox functions.

Enumerator
Ok 

The MessageBox contains the single option Ok.

OkCancel 

The MessageBox contains the options Ok, Cancel.

YesNoCancel 

The MessageBox contains the options Yes, No, Cancel.

YesNo 

The MessageBox contains the options Yes, No.

RetryCancel 

The MessageBox contains the options Retry, Cancel.

CancelTryContinue 

The MessageBox contains the options Cancel, Try Again, Continue.

Definition at line 19 of file message_box.hpp.


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