]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/classic/radiobox.cpp
Separated XML and HTML rich text I/O handlers
[wxWidgets.git] / src / mac / classic / radiobox.cpp
index 672267db79ca67f19564d738c21c68d061615b21..39bd6b2855fce0886b661da0ceb4e038012d9a0e 100644 (file)
@@ -47,7 +47,6 @@ wxRadioBox::wxRadioBox()
 {
     m_noItems = 0;
     m_noRowsOrCols = 0;
-    m_majorDim = 0 ;
     m_radioButtonCycle = NULL;
 }
 
@@ -114,10 +113,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);
 
     Rect bounds ;
     Str255 title ;
@@ -469,7 +465,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_VERTICAL)
             {
@@ -533,36 +529,3 @@ 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;
-    }
-}