m_label = label ;
Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
-
- m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , "\p" , true , 0 , 0 , 1,
- kControlRadioButtonProc , (long) this ) ;
+ verify_noerr ( CreateRadioButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") ,
+ 0 , false /* no autotoggle */ , (ControlRef*) &m_macControl ) ) ;
+
MacPostControlCreate(pos,size) ;
m_cycle = this ;
ProcessCommand (event);
}
-void wxRadioButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED(mouseStillDown))
+wxInt32 wxRadioButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )
{
+ // if already set -> no action
if ( GetValue() )
- return ;
+ return noErr;
wxRadioButton *cycle, *old = NULL ;
cycle=this->NextInCycle();
event2.SetEventObject(this);
event2.SetInt( true );
ProcessCommand(event2);
+ return noErr ;
}
wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)