include('wintools') include("wincontrolworks") func _create(_data) var(ctrl) println(radio, ' = new wxRadioButton(this, ID_', upper(radio), ', ', Caption, ', wxPoint(', Left, ', ', Top, '), wxSize(', Width, ', ', Height, '));') ctrl = radio registerId(ctrl) if(linked(onClick)) createEventArg1(radio, 'EVT_RADIOBUTTON', 'onClick', 'event->isChecked()') end end func initFree() _create('') end func init() lng.decl_priv_var(radio, 'wxRadioButton*') if(not linked(doCreate)) fvar(old) old = block.select(BLK_BODY) _create('') block.select(old) end end func doCreate(data) _create(data) end func doCaption(_data) println(radio + '->SetLabel(', e_str(_data), ');') end func doSelected(_data) println(radio + '->SetValue(', e_int(_data), ');') end func Selected() return(radio + '->GetValue()') end