X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..88db1d64cb9e20de436a3503952dc9303060c33a:/src/mac/carbon/radiobut.cpp?ds=sidebyside diff --git a/src/mac/carbon/radiobut.cpp b/src/mac/carbon/radiobut.cpp index 32ad08047e..52cc12108a 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 ) ); + 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 ( GetControl32BitValue( *m_peer ) == val ) return ; - ::SetControl32BitValue( (ControlRef) m_macControl , val ) ; + ::SetControl32BitValue( *m_peer , 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 ::GetControl32BitValue( *m_peer ) ; } void wxRadioButton::Command (wxCommandEvent & event)