Base Framework
Public Types | Public Member Functions | List of all members
MessageDialog Class Reference

Message dialog. More...

#include <base/ui/MessageDialog.h>

Inherits Dialog.

Public Types

enum  Category {
  WARNING, QUESTION, ERROR, EXCLAMATION,
  INFORMATION
}
 
enum  Answer {
  ABORT, CANCEL, CONTINUE, IGNORE,
  NO, OK, RETRY, YES
}
 

Public Member Functions

 MessageDialog () noexcept
 
 MessageDialog (const String &title, const String &message, Category category) noexcept
 
Category getCategory () const noexcept
 
void setCategory (Category category) noexcept
 
const StringgetTitle () const noexcept
 
void setTitle (const String &title) noexcept
 
const StringgetMessage () const noexcept
 
void setMessage (const String &message) noexcept
 
bool execute ()
 
Answer getAnswer () noexcept
 
- Public Member Functions inherited from Dialog
virtual ~Dialog () noexcept
 

Detailed Description

Message dialog.

Message dialog.

Version
1.0

Member Enumeration Documentation

◆ Answer

The answer.

Enumerator
ABORT 

Abort.

CANCEL 

Cancel.

CONTINUE 

Continue.

IGNORE 

Ignore.

NO 

No.

OK 

Ok.

RETRY 

Retry.

YES 

Yes.

◆ Category

The message type.

Enumerator
WARNING 

A warning.

QUESTION 

A question.

ERROR 

An error message.

EXCLAMATION 

An important informative message.

INFORMATION 

A normal informative message.

Constructor & Destructor Documentation

◆ MessageDialog() [1/2]

MessageDialog::MessageDialog ( )
noexcept

Initializes the message dialog.

◆ MessageDialog() [2/2]

MessageDialog::MessageDialog ( const String title,
const String message,
Category  category 
)
noexcept

Initializes the message dialog.

Member Function Documentation

◆ execute()

bool MessageDialog::execute ( )
virtual

Executes the dialog.

Implements Dialog.

◆ getAnswer()

Answer MessageDialog::getAnswer ( )
inlinenoexcept

Returns the answer.

◆ getCategory()

Category MessageDialog::getCategory ( ) const
inlinenoexcept

Returns the message category.

◆ getMessage()

const String& MessageDialog::getMessage ( ) const
inlinenoexcept

Returns the message.

◆ getTitle()

const String& MessageDialog::getTitle ( ) const
inlinenoexcept

Returns the title of the dialog window.

◆ setCategory()

void MessageDialog::setCategory ( Category  category)
inlinenoexcept

Sets the flags.

◆ setMessage()

void MessageDialog::setMessage ( const String message)
inlinenoexcept

Sets the current folder.

◆ setTitle()

void MessageDialog::setTitle ( const String title)
inlinenoexcept

Sets the title of the dialog window.