X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28fcfbfe09c79c06502d2929d5c11ab35996c19f..711a481223e50d08205648cf67b82d0d8b8ed335:/src/common/btncmn.cpp diff --git a/src/common/btncmn.cpp b/src/common/btncmn.cpp index 2207057082..c0a943189b 100644 --- a/src/common/btncmn.cpp +++ b/src/common/btncmn.cpp @@ -39,9 +39,21 @@ wxWindow *wxButtonBase::SetDefault() wxTopLevelWindow * const tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); - wxCHECK_MSG( tlw, NULL, _T("button without top level window?") ); + wxCHECK_MSG( tlw, NULL, wxT("button without top level window?") ); return tlw->SetDefaultItem(this); } +void wxButtonBase::SetBitmapPosition(wxDirection dir) +{ + wxASSERT_MSG( !(dir & ~wxDIRECTION_MASK), "non-direction flag used" ); + wxASSERT_MSG( !!(dir & wxLEFT) + + !!(dir & wxRIGHT) + + !!(dir & wxTOP) + + !!(dir & wxBOTTOM) == 1, + "exactly one direction flag must be set" ); + + DoSetBitmapPosition(dir); + +} #endif // wxUSE_BUTTON