From 298c25c3a5b9d5d6b92310a54f860cd48627888b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Sep 2008 18:29:06 +0000 Subject: [PATCH] allow passing literal strings and results of c_str() to SetXXXLabels() methods too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msgdlg.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 80644941ff..7dbffe33a3 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -46,6 +46,21 @@ public: { } + ButtonLabel(const char *label) + : m_label(label), m_stockId(wxID_NONE) + { + } + + ButtonLabel(const wchar_t *label) + : m_label(label), m_stockId(wxID_NONE) + { + } + + ButtonLabel(const wxCStrData& label) + : m_label(label), m_stockId(wxID_NONE) + { + } + // default copy ctor and dtor are ok // get the string label, whether it was originally specified directly @@ -122,8 +137,7 @@ public: m_extendedMessage = extendedMessage; } -protected: - // common validation of wxMessageDialog style + // change the dialog style flag void SetMessageDialogStyle(long style) { wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || !(style & wxYES_NO), @@ -135,6 +149,7 @@ protected: m_dialogStyle = style; } +protected: long GetMessageDialogStyle() const { return m_dialogStyle; } -- 2.47.2