OpenCPN Partial API docs
Loading...
Searching...
No Matches
InputDialog Class Reference

Input dialog with panel and flex grid sizer. More...

#include <dialog_input.h>

Inheritance diagram for InputDialog:
AlertDialog BaseDialog RoutePrintDialog TrackPrintDialog

Public Member Functions

 InputDialog (wxWindow *parent, const std::string &title, const std::string &action=_("Continue").ToStdString())
 
SwitchFieldAddSelection (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.
 
- Public Member Functions inherited from AlertDialog
 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.
 
- Public Member Functions inherited from BaseDialog
 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 Public Member Functions inherited from AlertDialog
static int GetConfirmation (wxWindow *parent, const std::string &title, const std::string &action, const std::string &msg)
 Helper that returns the dialog response.
 
- Protected Attributes inherited from BaseDialog
wxBoxSizer * m_layout
 
wxBoxSizer * m_content
 
- Static Protected Attributes inherited from BaseDialog
static const int kDialogPadding = 2
 

Detailed Description

Input dialog with panel and flex grid sizer.

Definition at line 33 of file dialog_input.h.

Member Function Documentation

◆ AddSelection() [1/2]

template<typename T >
void InputDialog::AddSelection ( const std::set< int > &  options,
option,
const std::string &  label 
)
inline

Create selection switch for options.

The option value is true if the option is in the set, or when the set is empty.

Parameters
optionsDefault or saved options.
optionAn enum class key (to be cast to int).
labelLabel for the option.

Definition at line 56 of file dialog_input.h.

◆ AddSelection() [2/2]

SwitchField * InputDialog::AddSelection ( int  key,
const std::string &  label,
bool  value 
)

Add key selection switch.

Parameters
keyKey identifier.
labelSelection label.
valueDefault value.
Returns
Selection field.

◆ GetSelected()

void InputDialog::GetSelected ( std::set< int > &  options)

Return active switch keys.

Parameters
optionsSet of selected keys.

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