OpenCPN Partial API docs
|
Input dialog with panel and flex grid sizer. More...
#include <dialog_input.h>
Public Member Functions | |
InputDialog (wxWindow *parent, const std::string &title, const std::string &action=_("Continue").ToStdString()) | |
SwitchField * | AddSelection (int key, const std::string &label, bool value) |
Add key selection switch. | |
template<typename T > | |
void | AddSelection (const std::set< int > &options, T option, const std::string &label) |
Create selection switch for options. | |
void | GetSelected (std::set< int > &options) |
Return active switch keys. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
static int | GetConfirmation (wxWindow *parent, const std::string &title, const std::string &action, const std::string &msg) |
Helper that returns the dialog response. | |
![]() | |
wxBoxSizer * | m_layout |
wxBoxSizer * | m_content |
![]() | |
static const int | kDialogPadding = 2 |
Input dialog with panel and flex grid sizer.
Definition at line 33 of file dialog_input.h.
|
inline |
Create selection switch for options.
The option value is true if the option is in the set, or when the set is empty.
options | Default or saved options. |
option | An enum class key (to be cast to int). |
label | Label for the option. |
Definition at line 56 of file dialog_input.h.
SwitchField * InputDialog::AddSelection | ( | int | key, |
const std::string & | label, | ||
bool | value | ||
) |
Add key selection switch.
key | Key identifier. |
label | Selection label. |
value | Default value. |
void InputDialog::GetSelected | ( | std::set< int > & | options | ) |
Return active switch keys.
options | Set of selected keys. |