added wxCANCEL_DEFAULT style to wxMessageDialog (only implemented for MSW for now); also tightened up the style checks in wxMessageDialog::SetMessageDialogStyle()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -143,9 +143,24 @@ public:
|
||||
wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || !(style & wxYES_NO),
|
||||
"wxYES and wxNO may only be used together" );
|
||||
|
||||
wxASSERT_MSG( !(style & wxYES) || !(style & wxOK),
|
||||
"wxOK and wxYES/wxNO can't be used together" );
|
||||
|
||||
wxASSERT_MSG( (style & wxYES) || (style & wxOK),
|
||||
"one of wxOK and wxYES/wxNO must be used" );
|
||||
|
||||
wxASSERT_MSG( (style & wxID_OK) != wxID_OK,
|
||||
"wxMessageBox: Did you mean wxOK (and not wxID_OK)?" );
|
||||
|
||||
wxASSERT_MSG( !(style & wxNO_DEFAULT) || (style & wxNO),
|
||||
"wxNO_DEFAULT is invalid without wxNO" );
|
||||
|
||||
wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || (style & wxCANCEL),
|
||||
"wxCANCEL_DEFAULT is invalid without wxCANCEL" );
|
||||
|
||||
wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || !(style & wxNO_DEFAULT),
|
||||
"only one default button can be specified" );
|
||||
|
||||
m_dialogStyle = style;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user