28#ifndef __INCLUDE__CONFIRM_H__
29#define __INCLUDE__CONFIRM_H__
40#if defined( _WIN32 ) && wxCHECK_VERSION( 3, 3, 0 )
41#define KICAD_MESSAGE_DIALOG_BASE wxGenericMessageDialog
42#define KICAD_RICH_MESSAGE_DIALOG_BASE wxGenericRichMessageDialog
44#define KICAD_MESSAGE_DIALOG KICAD_MESSAGE_DIALOG_BASE
46#define KICAD_MESSAGE_DIALOG_BASE wxMessageDialog
47#define KICAD_RICH_MESSAGE_DIALOG_BASE wxRichMessageDialog
48#define KICAD_MESSAGE_DIALOG KICAD_MESSAGE_DIALOG_BASE
70 const std::function<
bool()>& aSaveFunction );
111 const wxString& aExtraInfo = wxEmptyString );
122 const wxString& aExtraInfo = wxEmptyString );
149 const wxString& aMessage,
150 const wxString& aDetailedMessage = wxEmptyString,
151 const wxString& aOKLabel = wxEmptyString,
152 const wxString& aCancelLabel = wxEmptyString,
153 bool* aApplyToAll =
nullptr );
167 const wxString& aMessage,
168 const wxArrayString& aOptions );
KICOMMON_API void DisplayErrorMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo=wxEmptyString)
Display an error message with aMessage.
KICOMMON_API void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
KICOMMON_API void DisplayInfoMessage(wxWindow *parent, const wxString &aMessage, const wxString &aExtraInfo=wxEmptyString)
Display an informational message box with aMessage.
KICOMMON_API 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.
KICOMMON_API bool AskOverrideLock(wxWindow *aParent, const wxString &aMessage)
Display a dialog indicating the file is already open, with an option to reset the lock.
KICOMMON_API bool ConfirmRevertDialog(wxWindow *parent, const wxString &aMessage)
Display a confirmation dialog for a revert action.
KICOMMON_API bool HandleUnsavedChanges(wxWindow *aParent, const wxString &aMessage, const std::function< bool()> &aSaveFunction)
Display a dialog with Save, Cancel and Discard Changes buttons.
KICOMMON_API int GetLastUnsavedChangesResponse()
Return the result code from the last call to HandleUnsavedChanges(): wxID_YES, wxID_NO or wxID_CANCEL...
KICOMMON_API 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.
KICOMMON_API bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
KICOMMON_API int UnsavedChangesDialog(wxWindow *aParent, const wxString &aMessage, bool *aApplyToAll)
A specialized version of HandleUnsavedChanges which handles an apply-to-all checkbox.