X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c37f1248bda69718bc13e2fdaa1ebb86f3dfc93..db36543353d37c2357e8e30aab53ff37337b1127:/src/mac/carbon/radiobut.cpp?ds=sidebyside diff --git a/src/mac/carbon/radiobut.cpp b/src/mac/carbon/radiobut.cpp index 32ad08047e..1a31f44a25 100644 --- a/src/mac/carbon/radiobut.cpp +++ b/src/mac/carbon/radiobut.cpp @@ -39,8 +39,10 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; + m_peer = new wxMacControl() ; verify_noerr ( CreateRadioButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , - 0 , false /* no autotoggle */ , (ControlRef*) &m_macControl ) ) ; + 0 , false /* no autotoggle */ , m_peer->GetControlRefAddr() ) ); + MacPostControlCreate(pos,size) ; @@ -54,7 +56,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, { /* search backward for last group start */ wxRadioButton *chief = (wxRadioButton*) NULL; - wxWindowList::Node *node = parent->GetChildren().GetLast(); + wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast(); while (node) { wxWindow *child = node->GetData(); @@ -73,10 +75,10 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, void wxRadioButton::SetValue(bool val) { wxRadioButton *cycle; - if ( GetControl32BitValue( (ControlRef) m_macControl ) == val ) + if ( m_peer->GetValue() == val ) return ; - ::SetControl32BitValue( (ControlRef) m_macControl , val ) ; + m_peer->SetValue( val ) ; if (val) { cycle=this->NextInCycle(); @@ -92,7 +94,7 @@ void wxRadioButton::SetValue(bool val) bool wxRadioButton::GetValue() const { - return ::GetControl32BitValue( (ControlRef) m_macControl ) ; + return m_peer->GetValue() ; } void wxRadioButton::Command (wxCommandEvent & event)