32#ifndef __INCLUDE__CONFIRM_H__
33#define __INCLUDE__CONFIRM_H__
35#include <wx/richmsgdlg.h>
51 KIDIALOG( wxWindow* aParent,
const wxString& aMessage,
const wxString& aCaption,
54 const wxString& aCaption =
"" );
59 return wxRichMessageDialog::SetOKCancelLabels( ok,
cancel );
69 bool Show(
bool aShow =
true )
override;
89bool OverrideLock( wxWindow* aParent,
const wxString& aMessage );
103 const std::function<
bool()>& aSaveFunction );
131void DisplayError( wxWindow* aParent,
const wxString& aText,
int aDisplayTime = 0 );
141 const wxString& aExtraInfo = wxEmptyString );
152 const wxString& aExtraInfo = wxEmptyString );
162bool IsOK( wxWindow* aParent,
const wxString& aMessage );
178int OKOrCancelDialog( wxWindow* aParent,
const wxString& aWarning,
const wxString& aMessage,
179 const wxString& aDetailedMessage = wxEmptyString,
180 const wxString& aOKLabel = wxEmptyString,
181 const wxString& aCancelLabel = wxEmptyString,
bool* aApplyToAll =
nullptr );
194int SelectSingleOption( wxWindow* aParent,
const wxString& aTitle,
const wxString& aMessage,
195 const wxArrayString& aOptions );
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
KD_TYPE
< Dialog type. Selects appropriate icon and default dialog title
bool DoNotShowAgain() const
static long getStyle(KD_TYPE aType)
void DoNotShowCheckbox(wxString file, int line)
Checks the 'do not show again' setting for the dialog.
bool SetOKCancelLabels(const ButtonLabel &ok, const ButtonLabel &cancel) override
Shows the 'do not show again' checkbox.
static wxString getCaption(KD_TYPE aType, const wxString &aCaption)
bool Show(bool aShow=true) override
int SelectSingleOption(wxWindow *aParent, const wxString &aTitle, const wxString &aMessage, const wxArrayString &aOptions)
Display a dialog with radioboxes asking the user to select an option.
int OKOrCancelDialog(wxWindow *aParent, const wxString &aWarning, const wxString &aMessage, const wxString &aDetailedMessage=wxEmptyString, const wxString &aOKLabel=wxEmptyString, const wxString &aCancelLabel=wxEmptyString, bool *aApplyToAll=nullptr)
Display a warning dialog with aMessage and returns the user response.
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo=wxEmptyString)
Display an error message with aMessage.
bool OverrideLock(wxWindow *aParent, const wxString &aMessage)
Display a dialog indicating the file is already open, with an option to reset the lock.
void DisplayInfoMessage(wxWindow *parent, const wxString &aMessage, const wxString &aExtraInfo=wxEmptyString)
Display an informational message box with aMessage.
bool HandleUnsavedChanges(wxWindow *aParent, const wxString &aMessage, const std::function< bool()> &aSaveFunction)
Display a dialog with Save, Cancel and Discard Changes buttons.
bool ConfirmRevertDialog(wxWindow *parent, const wxString &aMessage)
Display a confirmation dialog for a revert action.
int UnsavedChangesDialog(wxWindow *aParent, const wxString &aMessage, bool *aApplyToAll)
A specialized version of HandleUnsavedChanges which handles an apply-to-all checkbox.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime=0)
Display an error or warning message box with aMessage.