]> git.saurik.com Git - wxWidgets.git/commitdiff
allow passing literal strings and results of c_str() to SetXXXLabels() methods too
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Sep 2008 18:29:06 +0000 (18:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Sep 2008 18:29:06 +0000 (18:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msgdlg.h

index 80644941ff9d8828b8ae8dfac8bfefb8d62b9a99..7dbffe33a3e4855c6096e51f106f136cd9b8a20a 100644 (file)
@@ -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
         // 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;
     }
 
         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),
     void SetMessageDialogStyle(long style)
     {
         wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || !(style & wxYES_NO),
@@ -135,6 +149,7 @@ protected:
         m_dialogStyle = style;
     }
 
         m_dialogStyle = style;
     }
 
+protected:
     long GetMessageDialogStyle() const { return m_dialogStyle; }
 
 
     long GetMessageDialogStyle() const { return m_dialogStyle; }