X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd0a76e228b5ce47c648c2e52857e77cf79e6ae5..35d9ac0686a4af87a25fc342880d2af5ac33d17e:/src/common/radiocmn.cpp?ds=sidebyside diff --git a/src/common/radiocmn.cpp b/src/common/radiocmn.cpp index 1c95257632..0d2851632f 100644 --- a/src/common/radiocmn.cpp +++ b/src/common/radiocmn.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "radioboxbase.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -38,6 +34,26 @@ // implementation // ============================================================================ +void wxRadioBoxBase::SetMajorDim(int majorDim, long style) +{ + wxCHECK_RET( majorDim != 0, _T("major radiobox dimension can't be 0") ); + + m_majorDim = majorDim; + + int minorDim = (GetCount() + m_majorDim - 1) / m_majorDim; + + if ( style & wxRA_SPECIFY_COLS ) + { + m_numCols = majorDim; + m_numRows = minorDim; + } + else // wxRA_SPECIFY_ROWS + { + m_numCols = minorDim; + m_numRows = majorDim; + } +} + int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const { int count = GetCount(), @@ -134,6 +150,8 @@ int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const return item; } +#if WXWIN_COMPATIBILITY_2_4 + // these functions are deprecated and don't do anything int wxRadioBoxBase::GetNumberOfRowsOrCols() const { @@ -144,5 +162,6 @@ void wxRadioBoxBase::SetNumberOfRowsOrCols(int WXUNUSED(n)) { } -#endif // wxUSE_RADIOBOX +#endif // WXWIN_COMPATIBILITY_2_4 +#endif // wxUSE_RADIOBOX