X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb5246bead0df931f25bd73c9a03c356b180fcd1..ea8ca011a351c6aaa4009bedbf0cec19a7c57d98:/src/mac/carbon/radiobox.cpp diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index 55cf5b0070..685ce0a654 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -50,7 +50,6 @@ wxRadioBox::wxRadioBox() { m_noItems = 0; m_noRowsOrCols = 0; - m_majorDim = 0 ; m_radioButtonCycle = NULL; } @@ -119,11 +118,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, m_noRowsOrCols = majorDim; m_radioButtonCycle = NULL; - if (majorDim==0) - m_majorDim = n ; - else - m_majorDim = majorDim ; - + SetMajorDim(majorDim == 0 ? n : majorDim, style); m_label = label ; @@ -478,7 +473,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) current=m_radioButtonCycle; for ( i = 0 ; i < m_noItems; i++) { - if (i&&((i%m_majorDim)==0)) // not to do for the zero button! + if (i&&((i%GetMajorDim())==0)) // not to do for the zero button! { if (m_windowStyle & wxRA_SPECIFY_ROWS) { @@ -542,38 +537,5 @@ wxSize wxRadioBox::DoGetBestSize() const return wxSize(totWidth, totHeight); } -//------------------------------------------------------------------------------------- -// ¥ GetNumVer -//------------------------------------------------------------------------------------- -// return the number of buttons in the vertical direction - -int wxRadioBox::GetRowCount() const -{ - if ( m_windowStyle & wxRA_SPECIFY_ROWS ) - { - return m_majorDim; - } - else - { - return (m_noItems + m_majorDim - 1)/m_majorDim; - } -} - -//------------------------------------------------------------------------------------- -// ¥ GetNumHor -//------------------------------------------------------------------------------------- -// return the number of buttons in the horizontal direction - -int wxRadioBox::GetColumnCount() const -{ - if ( m_windowStyle & wxRA_SPECIFY_ROWS ) - { - return (m_noItems + m_majorDim - 1)/m_majorDim; - } - else - { - return m_majorDim; - } -} #endif