From 17994eb3eda9d2be9aad55dae41562ce13531d99 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 15 Aug 2019 15:51:34 -0400 Subject: add upstream 10.15 --- wx+/popup_dlg.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'wx+/popup_dlg.h') diff --git a/wx+/popup_dlg.h b/wx+/popup_dlg.h index 0acd2a95..1e0a1656 100644 --- a/wx+/popup_dlg.h +++ b/wx+/popup_dlg.h @@ -21,34 +21,34 @@ struct PopupDialogCfg; enum class DialogInfoType { - INFO, - WARNING, - ERROR2, //fuck the ERROR macro in WinGDI.h! + info, + warning, + error, }; enum class ConfirmationButton3 { - ACCEPT, - ACCEPT_ALL, - DECLINE, - CANCEL, + accept, + acceptAll, + decline, + cancel, }; enum class ConfirmationButton { - ACCEPT = static_cast(ConfirmationButton3::ACCEPT), //[!] Clang requires a "static_cast" - CANCEL = static_cast(ConfirmationButton3::CANCEL), // + accept = static_cast(ConfirmationButton3::accept), //[!] Clang requires a "static_cast" + cancel = static_cast(ConfirmationButton3::cancel), // }; enum class ConfirmationButton2 { - ACCEPT = static_cast(ConfirmationButton3::ACCEPT), - ACCEPT_ALL = static_cast(ConfirmationButton3::ACCEPT_ALL), - CANCEL = static_cast(ConfirmationButton3::CANCEL), + accept = static_cast(ConfirmationButton3::accept), + acceptAll = static_cast(ConfirmationButton3::acceptAll), + cancel = static_cast(ConfirmationButton3::cancel), }; enum class QuestionButton2 { - YES = static_cast(ConfirmationButton3::ACCEPT), - NO = static_cast(ConfirmationButton3::DECLINE), - CANCEL = static_cast(ConfirmationButton3::CANCEL), + yes = static_cast(ConfirmationButton3::accept), + no = static_cast(ConfirmationButton3::decline), + cancel = static_cast(ConfirmationButton3::cancel), }; void showNotificationDialog(wxWindow* parent, DialogInfoType type, const PopupDialogCfg& cfg); @@ -66,7 +66,7 @@ struct PopupDialogCfg PopupDialogCfg& setTitle (const wxString& label) { title = label; return *this; } PopupDialogCfg& setMainInstructions (const wxString& label) { textMain = label; return *this; } //set at least one of these! PopupDialogCfg& setDetailInstructions(const wxString& label) { textDetail = label; return *this; } // - PopupDialogCfg& setCheckBox(bool& value, const wxString& label, QuestionButton2 disableWhenChecked = QuestionButton2::CANCEL) + PopupDialogCfg& setCheckBox(bool& value, const wxString& label, QuestionButton2 disableWhenChecked = QuestionButton2::cancel) { checkBoxValue = &value; checkBoxLabel = label; @@ -83,7 +83,7 @@ private: wxString textDetail; bool* checkBoxValue = nullptr; //in/out wxString checkBoxLabel; - QuestionButton2 buttonToDisableWhenChecked = QuestionButton2::CANCEL; + QuestionButton2 buttonToDisableWhenChecked = QuestionButton2::cancel; }; } -- cgit