A modal message dialog with confirmation button and cancel button.
More...
#include <dialog_alert.h>
|
| AlertDialog (wxWindow *parent, const std::string &title) |
| Alert dialog with close button.
|
|
| AlertDialog (wxWindow *parent, const std::string &title, const std::string &action) |
| Alert dialog with labelled confirmation button and cancel.
|
|
void | SetListener (IAlertConfirmation *listener) |
| Listen for response.
|
|
void | SetTimer (int seconds) |
| Activate timer.
|
|
void | SetMessage (const std::string &msg) |
| Set alert message.
|
|
void | SetDefaultButton (int id) |
| Set default button (for enter).
|
|
void | SetCancelLabel (const std::string &label) |
| Overwrite cancel button label.
|
|
int | ShowModal () override |
| Show dialog and return response.
|
|
| BaseDialog (wxWindow *parent, const std::string &title, long style=wxDEFAULT_DIALOG_STYLE) |
|
void | SetInitialSize () |
| Initialize by display geometry.
|
|
void | AddHtmlContent (const std::stringstream &html) |
| Display HTML content.
|
|
|
static int | GetConfirmation (wxWindow *parent, const std::string &title, const std::string &action, const std::string &msg) |
| Helper that returns the dialog response.
|
|
A modal message dialog with confirmation button and cancel button.
Can be used with a listener to handle the response. Alternatively the static GetConfirmation function can be used without listener.
Definition at line 47 of file dialog_alert.h.
◆ AlertDialog() [1/2]
AlertDialog::AlertDialog |
( |
wxWindow * |
parent, |
|
|
const std::string & |
title |
|
) |
| |
Alert dialog with close button.
- Parameters
-
parent | Parent window. |
title | Dialog title. |
◆ AlertDialog() [2/2]
AlertDialog::AlertDialog |
( |
wxWindow * |
parent, |
|
|
const std::string & |
title, |
|
|
const std::string & |
action |
|
) |
| |
Alert dialog with labelled confirmation button and cancel.
- Parameters
-
parent | Parent window. |
title | Dialog title. |
action | Action button label. |
◆ GetConfirmation()
static int AlertDialog::GetConfirmation |
( |
wxWindow * |
parent, |
|
|
const std::string & |
title, |
|
|
const std::string & |
action, |
|
|
const std::string & |
msg |
|
) |
| |
|
static |
Helper that returns the dialog response.
- Returns
- OK/Cancel response.
◆ SetCancelLabel()
void AlertDialog::SetCancelLabel |
( |
const std::string & |
label | ) |
|
Overwrite cancel button label.
- Parameters
-
label | Label for cancel button. |
◆ SetDefaultButton()
void AlertDialog::SetDefaultButton |
( |
int |
id | ) |
|
Set default button (for enter).
- Parameters
-
◆ SetListener()
Listen for response.
- Parameters
-
listener | Confirmation listener. |
◆ SetMessage()
void AlertDialog::SetMessage |
( |
const std::string & |
msg | ) |
|
Set alert message.
- Parameters
-
◆ SetTimer()
void AlertDialog::SetTimer |
( |
int |
seconds | ) |
|
Activate timer.
- Parameters
-
◆ ShowModal()
int AlertDialog::ShowModal |
( |
| ) |
|
|
override |
Show dialog and return response.
- Returns
- OK/Cancel response.
The documentation for this class was generated from the following file: