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
This commit is contained in:
Vadim Zeitlin
2008-09-05 18:29:06 +00:00
parent 21a9d32634
commit 298c25c3a5

View 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
@@ -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; }