lua_CheckBox.cpp 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_CheckBox.h"
  4. #include "Animation.h"
  5. #include "AnimationTarget.h"
  6. #include "Base.h"
  7. #include "Button.h"
  8. #include "CheckBox.h"
  9. #include "Control.h"
  10. #include "Game.h"
  11. #include "Label.h"
  12. #include "Node.h"
  13. #include "Ref.h"
  14. #include "ScriptController.h"
  15. #include "ScriptTarget.h"
  16. #include "lua_ControlAlignment.h"
  17. #include "lua_ControlListenerEventType.h"
  18. #include "lua_ControlState.h"
  19. #include "lua_CurveInterpolationType.h"
  20. #include "lua_FontJustify.h"
  21. namespace gameplay
  22. {
  23. void luaRegister_CheckBox()
  24. {
  25. const luaL_Reg lua_members[] =
  26. {
  27. {"addListener", lua_CheckBox_addListener},
  28. {"addRef", lua_CheckBox_addRef},
  29. {"addScriptCallback", lua_CheckBox_addScriptCallback},
  30. {"createAnimation", lua_CheckBox_createAnimation},
  31. {"createAnimationFromBy", lua_CheckBox_createAnimationFromBy},
  32. {"createAnimationFromTo", lua_CheckBox_createAnimationFromTo},
  33. {"destroyAnimation", lua_CheckBox_destroyAnimation},
  34. {"disable", lua_CheckBox_disable},
  35. {"enable", lua_CheckBox_enable},
  36. {"getAlignment", lua_CheckBox_getAlignment},
  37. {"getAnimation", lua_CheckBox_getAnimation},
  38. {"getAnimationPropertyComponentCount", lua_CheckBox_getAnimationPropertyComponentCount},
  39. {"getAnimationPropertyValue", lua_CheckBox_getAnimationPropertyValue},
  40. {"getAutoHeight", lua_CheckBox_getAutoHeight},
  41. {"getAutoWidth", lua_CheckBox_getAutoWidth},
  42. {"getBorder", lua_CheckBox_getBorder},
  43. {"getBounds", lua_CheckBox_getBounds},
  44. {"getClip", lua_CheckBox_getClip},
  45. {"getClipBounds", lua_CheckBox_getClipBounds},
  46. {"getConsumeInputEvents", lua_CheckBox_getConsumeInputEvents},
  47. {"getCursorColor", lua_CheckBox_getCursorColor},
  48. {"getCursorRegion", lua_CheckBox_getCursorRegion},
  49. {"getCursorUVs", lua_CheckBox_getCursorUVs},
  50. {"getFocusIndex", lua_CheckBox_getFocusIndex},
  51. {"getFont", lua_CheckBox_getFont},
  52. {"getFontSize", lua_CheckBox_getFontSize},
  53. {"getHeight", lua_CheckBox_getHeight},
  54. {"getId", lua_CheckBox_getId},
  55. {"getImageColor", lua_CheckBox_getImageColor},
  56. {"getImageRegion", lua_CheckBox_getImageRegion},
  57. {"getImageSize", lua_CheckBox_getImageSize},
  58. {"getImageUVs", lua_CheckBox_getImageUVs},
  59. {"getMargin", lua_CheckBox_getMargin},
  60. {"getOpacity", lua_CheckBox_getOpacity},
  61. {"getPadding", lua_CheckBox_getPadding},
  62. {"getRefCount", lua_CheckBox_getRefCount},
  63. {"getSkinColor", lua_CheckBox_getSkinColor},
  64. {"getSkinRegion", lua_CheckBox_getSkinRegion},
  65. {"getState", lua_CheckBox_getState},
  66. {"getStyle", lua_CheckBox_getStyle},
  67. {"getText", lua_CheckBox_getText},
  68. {"getTextAlignment", lua_CheckBox_getTextAlignment},
  69. {"getTextColor", lua_CheckBox_getTextColor},
  70. {"getTextRightToLeft", lua_CheckBox_getTextRightToLeft},
  71. {"getType", lua_CheckBox_getType},
  72. {"getWidth", lua_CheckBox_getWidth},
  73. {"getX", lua_CheckBox_getX},
  74. {"getY", lua_CheckBox_getY},
  75. {"getZIndex", lua_CheckBox_getZIndex},
  76. {"isChecked", lua_CheckBox_isChecked},
  77. {"isContainer", lua_CheckBox_isContainer},
  78. {"isEnabled", lua_CheckBox_isEnabled},
  79. {"release", lua_CheckBox_release},
  80. {"removeScriptCallback", lua_CheckBox_removeScriptCallback},
  81. {"setAlignment", lua_CheckBox_setAlignment},
  82. {"setAnimationPropertyValue", lua_CheckBox_setAnimationPropertyValue},
  83. {"setAutoHeight", lua_CheckBox_setAutoHeight},
  84. {"setAutoWidth", lua_CheckBox_setAutoWidth},
  85. {"setBorder", lua_CheckBox_setBorder},
  86. {"setBounds", lua_CheckBox_setBounds},
  87. {"setChecked", lua_CheckBox_setChecked},
  88. {"setConsumeInputEvents", lua_CheckBox_setConsumeInputEvents},
  89. {"setCursorColor", lua_CheckBox_setCursorColor},
  90. {"setCursorRegion", lua_CheckBox_setCursorRegion},
  91. {"setFocusIndex", lua_CheckBox_setFocusIndex},
  92. {"setFont", lua_CheckBox_setFont},
  93. {"setFontSize", lua_CheckBox_setFontSize},
  94. {"setHeight", lua_CheckBox_setHeight},
  95. {"setImageColor", lua_CheckBox_setImageColor},
  96. {"setImageRegion", lua_CheckBox_setImageRegion},
  97. {"setImageSize", lua_CheckBox_setImageSize},
  98. {"setMargin", lua_CheckBox_setMargin},
  99. {"setOpacity", lua_CheckBox_setOpacity},
  100. {"setPadding", lua_CheckBox_setPadding},
  101. {"setPosition", lua_CheckBox_setPosition},
  102. {"setSize", lua_CheckBox_setSize},
  103. {"setSkinColor", lua_CheckBox_setSkinColor},
  104. {"setSkinRegion", lua_CheckBox_setSkinRegion},
  105. {"setState", lua_CheckBox_setState},
  106. {"setStyle", lua_CheckBox_setStyle},
  107. {"setText", lua_CheckBox_setText},
  108. {"setTextAlignment", lua_CheckBox_setTextAlignment},
  109. {"setTextColor", lua_CheckBox_setTextColor},
  110. {"setTextRightToLeft", lua_CheckBox_setTextRightToLeft},
  111. {"setWidth", lua_CheckBox_setWidth},
  112. {"setZIndex", lua_CheckBox_setZIndex},
  113. {NULL, NULL}
  114. };
  115. const luaL_Reg lua_statics[] =
  116. {
  117. {"ANIMATE_OPACITY", lua_CheckBox_static_ANIMATE_OPACITY},
  118. {"ANIMATE_POSITION", lua_CheckBox_static_ANIMATE_POSITION},
  119. {"ANIMATE_POSITION_X", lua_CheckBox_static_ANIMATE_POSITION_X},
  120. {"ANIMATE_POSITION_Y", lua_CheckBox_static_ANIMATE_POSITION_Y},
  121. {"ANIMATE_SIZE", lua_CheckBox_static_ANIMATE_SIZE},
  122. {"ANIMATE_SIZE_HEIGHT", lua_CheckBox_static_ANIMATE_SIZE_HEIGHT},
  123. {"ANIMATE_SIZE_WIDTH", lua_CheckBox_static_ANIMATE_SIZE_WIDTH},
  124. {"create", lua_CheckBox_static_create},
  125. {NULL, NULL}
  126. };
  127. std::vector<std::string> scopePath;
  128. ScriptUtil::registerClass("CheckBox", lua_members, NULL, lua_CheckBox__gc, lua_statics, scopePath);
  129. }
  130. static CheckBox* getInstance(lua_State* state)
  131. {
  132. void* userdata = luaL_checkudata(state, 1, "CheckBox");
  133. luaL_argcheck(state, userdata != NULL, 1, "'CheckBox' expected.");
  134. return (CheckBox*)((ScriptUtil::LuaObject*)userdata)->instance;
  135. }
  136. int lua_CheckBox__gc(lua_State* state)
  137. {
  138. // Get the number of parameters.
  139. int paramCount = lua_gettop(state);
  140. // Attempt to match the parameters to a valid binding.
  141. switch (paramCount)
  142. {
  143. case 1:
  144. {
  145. if ((lua_type(state, 1) == LUA_TUSERDATA))
  146. {
  147. void* userdata = luaL_checkudata(state, 1, "CheckBox");
  148. luaL_argcheck(state, userdata != NULL, 1, "'CheckBox' expected.");
  149. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)userdata;
  150. if (object->owns)
  151. {
  152. CheckBox* instance = (CheckBox*)object->instance;
  153. SAFE_RELEASE(instance);
  154. }
  155. return 0;
  156. }
  157. else
  158. {
  159. lua_pushstring(state, "lua_CheckBox__gc - Failed to match the given parameters to a valid function signature.");
  160. lua_error(state);
  161. }
  162. break;
  163. }
  164. default:
  165. {
  166. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  167. lua_error(state);
  168. break;
  169. }
  170. }
  171. return 0;
  172. }
  173. int lua_CheckBox_addListener(lua_State* state)
  174. {
  175. // Get the number of parameters.
  176. int paramCount = lua_gettop(state);
  177. // Attempt to match the parameters to a valid binding.
  178. switch (paramCount)
  179. {
  180. case 3:
  181. {
  182. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  183. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  184. lua_type(state, 3) == LUA_TNUMBER)
  185. {
  186. // Get parameter 1 off the stack.
  187. ScriptUtil::LuaArray<Control::Listener> param1 = ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false);
  188. // Get parameter 2 off the stack.
  189. int param2 = (int)luaL_checkint(state, 3);
  190. CheckBox* instance = getInstance(state);
  191. instance->addListener(param1, param2);
  192. return 0;
  193. }
  194. else
  195. {
  196. lua_pushstring(state, "lua_CheckBox_addListener - Failed to match the given parameters to a valid function signature.");
  197. lua_error(state);
  198. }
  199. break;
  200. }
  201. default:
  202. {
  203. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  204. lua_error(state);
  205. break;
  206. }
  207. }
  208. return 0;
  209. }
  210. int lua_CheckBox_addRef(lua_State* state)
  211. {
  212. // Get the number of parameters.
  213. int paramCount = lua_gettop(state);
  214. // Attempt to match the parameters to a valid binding.
  215. switch (paramCount)
  216. {
  217. case 1:
  218. {
  219. if ((lua_type(state, 1) == LUA_TUSERDATA))
  220. {
  221. CheckBox* instance = getInstance(state);
  222. instance->addRef();
  223. return 0;
  224. }
  225. else
  226. {
  227. lua_pushstring(state, "lua_CheckBox_addRef - Failed to match the given parameters to a valid function signature.");
  228. lua_error(state);
  229. }
  230. break;
  231. }
  232. default:
  233. {
  234. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  235. lua_error(state);
  236. break;
  237. }
  238. }
  239. return 0;
  240. }
  241. int lua_CheckBox_addScriptCallback(lua_State* state)
  242. {
  243. // Get the number of parameters.
  244. int paramCount = lua_gettop(state);
  245. // Attempt to match the parameters to a valid binding.
  246. switch (paramCount)
  247. {
  248. case 3:
  249. {
  250. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  251. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  252. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  253. {
  254. // Get parameter 1 off the stack.
  255. std::string param1 = ScriptUtil::getString(2, true);
  256. // Get parameter 2 off the stack.
  257. std::string param2 = ScriptUtil::getString(3, true);
  258. CheckBox* instance = getInstance(state);
  259. instance->addScriptCallback(param1, param2);
  260. return 0;
  261. }
  262. else
  263. {
  264. lua_pushstring(state, "lua_CheckBox_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  265. lua_error(state);
  266. }
  267. break;
  268. }
  269. default:
  270. {
  271. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  272. lua_error(state);
  273. break;
  274. }
  275. }
  276. return 0;
  277. }
  278. int lua_CheckBox_createAnimation(lua_State* state)
  279. {
  280. // Get the number of parameters.
  281. int paramCount = lua_gettop(state);
  282. // Attempt to match the parameters to a valid binding.
  283. switch (paramCount)
  284. {
  285. case 3:
  286. {
  287. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  288. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  289. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  290. {
  291. // Get parameter 1 off the stack.
  292. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  293. // Get parameter 2 off the stack.
  294. ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
  295. CheckBox* instance = getInstance(state);
  296. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  297. if (returnPtr)
  298. {
  299. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  300. object->instance = returnPtr;
  301. object->owns = false;
  302. luaL_getmetatable(state, "Animation");
  303. lua_setmetatable(state, -2);
  304. }
  305. else
  306. {
  307. lua_pushnil(state);
  308. }
  309. return 1;
  310. }
  311. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  312. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  313. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  314. {
  315. // Get parameter 1 off the stack.
  316. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  317. // Get parameter 2 off the stack.
  318. ScriptUtil::LuaArray<Properties> param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false);
  319. CheckBox* instance = getInstance(state);
  320. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  321. if (returnPtr)
  322. {
  323. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  324. object->instance = returnPtr;
  325. object->owns = false;
  326. luaL_getmetatable(state, "Animation");
  327. lua_setmetatable(state, -2);
  328. }
  329. else
  330. {
  331. lua_pushnil(state);
  332. }
  333. return 1;
  334. }
  335. else
  336. {
  337. lua_pushstring(state, "lua_CheckBox_createAnimation - Failed to match the given parameters to a valid function signature.");
  338. lua_error(state);
  339. }
  340. break;
  341. }
  342. case 7:
  343. {
  344. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  345. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  346. lua_type(state, 3) == LUA_TNUMBER &&
  347. lua_type(state, 4) == LUA_TNUMBER &&
  348. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  349. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  350. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  351. {
  352. // Get parameter 1 off the stack.
  353. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  354. // Get parameter 2 off the stack.
  355. int param2 = (int)luaL_checkint(state, 3);
  356. // Get parameter 3 off the stack.
  357. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  358. // Get parameter 4 off the stack.
  359. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  360. // Get parameter 5 off the stack.
  361. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  362. // Get parameter 6 off the stack.
  363. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  364. CheckBox* instance = getInstance(state);
  365. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  366. if (returnPtr)
  367. {
  368. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  369. object->instance = returnPtr;
  370. object->owns = false;
  371. luaL_getmetatable(state, "Animation");
  372. lua_setmetatable(state, -2);
  373. }
  374. else
  375. {
  376. lua_pushnil(state);
  377. }
  378. return 1;
  379. }
  380. else
  381. {
  382. lua_pushstring(state, "lua_CheckBox_createAnimation - Failed to match the given parameters to a valid function signature.");
  383. lua_error(state);
  384. }
  385. break;
  386. }
  387. case 9:
  388. {
  389. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  390. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  391. lua_type(state, 3) == LUA_TNUMBER &&
  392. lua_type(state, 4) == LUA_TNUMBER &&
  393. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  394. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  395. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  396. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  397. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  398. {
  399. // Get parameter 1 off the stack.
  400. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  401. // Get parameter 2 off the stack.
  402. int param2 = (int)luaL_checkint(state, 3);
  403. // Get parameter 3 off the stack.
  404. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  405. // Get parameter 4 off the stack.
  406. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  407. // Get parameter 5 off the stack.
  408. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  409. // Get parameter 6 off the stack.
  410. ScriptUtil::LuaArray<float> param6 = ScriptUtil::getFloatPointer(7);
  411. // Get parameter 7 off the stack.
  412. ScriptUtil::LuaArray<float> param7 = ScriptUtil::getFloatPointer(8);
  413. // Get parameter 8 off the stack.
  414. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  415. CheckBox* instance = getInstance(state);
  416. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  417. if (returnPtr)
  418. {
  419. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  420. object->instance = returnPtr;
  421. object->owns = false;
  422. luaL_getmetatable(state, "Animation");
  423. lua_setmetatable(state, -2);
  424. }
  425. else
  426. {
  427. lua_pushnil(state);
  428. }
  429. return 1;
  430. }
  431. else
  432. {
  433. lua_pushstring(state, "lua_CheckBox_createAnimation - Failed to match the given parameters to a valid function signature.");
  434. lua_error(state);
  435. }
  436. break;
  437. }
  438. default:
  439. {
  440. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  441. lua_error(state);
  442. break;
  443. }
  444. }
  445. return 0;
  446. }
  447. int lua_CheckBox_createAnimationFromBy(lua_State* state)
  448. {
  449. // Get the number of parameters.
  450. int paramCount = lua_gettop(state);
  451. // Attempt to match the parameters to a valid binding.
  452. switch (paramCount)
  453. {
  454. case 7:
  455. {
  456. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  457. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  458. lua_type(state, 3) == LUA_TNUMBER &&
  459. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  460. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  461. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  462. lua_type(state, 7) == LUA_TNUMBER)
  463. {
  464. // Get parameter 1 off the stack.
  465. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  466. // Get parameter 2 off the stack.
  467. int param2 = (int)luaL_checkint(state, 3);
  468. // Get parameter 3 off the stack.
  469. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  470. // Get parameter 4 off the stack.
  471. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  472. // Get parameter 5 off the stack.
  473. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  474. // Get parameter 6 off the stack.
  475. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  476. CheckBox* instance = getInstance(state);
  477. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  478. if (returnPtr)
  479. {
  480. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  481. object->instance = returnPtr;
  482. object->owns = false;
  483. luaL_getmetatable(state, "Animation");
  484. lua_setmetatable(state, -2);
  485. }
  486. else
  487. {
  488. lua_pushnil(state);
  489. }
  490. return 1;
  491. }
  492. else
  493. {
  494. lua_pushstring(state, "lua_CheckBox_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  495. lua_error(state);
  496. }
  497. break;
  498. }
  499. default:
  500. {
  501. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  502. lua_error(state);
  503. break;
  504. }
  505. }
  506. return 0;
  507. }
  508. int lua_CheckBox_createAnimationFromTo(lua_State* state)
  509. {
  510. // Get the number of parameters.
  511. int paramCount = lua_gettop(state);
  512. // Attempt to match the parameters to a valid binding.
  513. switch (paramCount)
  514. {
  515. case 7:
  516. {
  517. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  518. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  519. lua_type(state, 3) == LUA_TNUMBER &&
  520. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  521. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  522. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  523. lua_type(state, 7) == LUA_TNUMBER)
  524. {
  525. // Get parameter 1 off the stack.
  526. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  527. // Get parameter 2 off the stack.
  528. int param2 = (int)luaL_checkint(state, 3);
  529. // Get parameter 3 off the stack.
  530. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  531. // Get parameter 4 off the stack.
  532. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  533. // Get parameter 5 off the stack.
  534. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  535. // Get parameter 6 off the stack.
  536. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  537. CheckBox* instance = getInstance(state);
  538. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  539. if (returnPtr)
  540. {
  541. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  542. object->instance = returnPtr;
  543. object->owns = false;
  544. luaL_getmetatable(state, "Animation");
  545. lua_setmetatable(state, -2);
  546. }
  547. else
  548. {
  549. lua_pushnil(state);
  550. }
  551. return 1;
  552. }
  553. else
  554. {
  555. lua_pushstring(state, "lua_CheckBox_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  556. lua_error(state);
  557. }
  558. break;
  559. }
  560. default:
  561. {
  562. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  563. lua_error(state);
  564. break;
  565. }
  566. }
  567. return 0;
  568. }
  569. int lua_CheckBox_destroyAnimation(lua_State* state)
  570. {
  571. // Get the number of parameters.
  572. int paramCount = lua_gettop(state);
  573. // Attempt to match the parameters to a valid binding.
  574. switch (paramCount)
  575. {
  576. case 1:
  577. {
  578. if ((lua_type(state, 1) == LUA_TUSERDATA))
  579. {
  580. CheckBox* instance = getInstance(state);
  581. instance->destroyAnimation();
  582. return 0;
  583. }
  584. else
  585. {
  586. lua_pushstring(state, "lua_CheckBox_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  587. lua_error(state);
  588. }
  589. break;
  590. }
  591. case 2:
  592. {
  593. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  594. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  595. {
  596. // Get parameter 1 off the stack.
  597. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  598. CheckBox* instance = getInstance(state);
  599. instance->destroyAnimation(param1);
  600. return 0;
  601. }
  602. else
  603. {
  604. lua_pushstring(state, "lua_CheckBox_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  605. lua_error(state);
  606. }
  607. break;
  608. }
  609. default:
  610. {
  611. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  612. lua_error(state);
  613. break;
  614. }
  615. }
  616. return 0;
  617. }
  618. int lua_CheckBox_disable(lua_State* state)
  619. {
  620. // Get the number of parameters.
  621. int paramCount = lua_gettop(state);
  622. // Attempt to match the parameters to a valid binding.
  623. switch (paramCount)
  624. {
  625. case 1:
  626. {
  627. if ((lua_type(state, 1) == LUA_TUSERDATA))
  628. {
  629. CheckBox* instance = getInstance(state);
  630. instance->disable();
  631. return 0;
  632. }
  633. else
  634. {
  635. lua_pushstring(state, "lua_CheckBox_disable - Failed to match the given parameters to a valid function signature.");
  636. lua_error(state);
  637. }
  638. break;
  639. }
  640. default:
  641. {
  642. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  643. lua_error(state);
  644. break;
  645. }
  646. }
  647. return 0;
  648. }
  649. int lua_CheckBox_enable(lua_State* state)
  650. {
  651. // Get the number of parameters.
  652. int paramCount = lua_gettop(state);
  653. // Attempt to match the parameters to a valid binding.
  654. switch (paramCount)
  655. {
  656. case 1:
  657. {
  658. if ((lua_type(state, 1) == LUA_TUSERDATA))
  659. {
  660. CheckBox* instance = getInstance(state);
  661. instance->enable();
  662. return 0;
  663. }
  664. else
  665. {
  666. lua_pushstring(state, "lua_CheckBox_enable - Failed to match the given parameters to a valid function signature.");
  667. lua_error(state);
  668. }
  669. break;
  670. }
  671. default:
  672. {
  673. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  674. lua_error(state);
  675. break;
  676. }
  677. }
  678. return 0;
  679. }
  680. int lua_CheckBox_getAlignment(lua_State* state)
  681. {
  682. // Get the number of parameters.
  683. int paramCount = lua_gettop(state);
  684. // Attempt to match the parameters to a valid binding.
  685. switch (paramCount)
  686. {
  687. case 1:
  688. {
  689. if ((lua_type(state, 1) == LUA_TUSERDATA))
  690. {
  691. CheckBox* instance = getInstance(state);
  692. Control::Alignment result = instance->getAlignment();
  693. // Push the return value onto the stack.
  694. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
  695. return 1;
  696. }
  697. else
  698. {
  699. lua_pushstring(state, "lua_CheckBox_getAlignment - Failed to match the given parameters to a valid function signature.");
  700. lua_error(state);
  701. }
  702. break;
  703. }
  704. default:
  705. {
  706. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  707. lua_error(state);
  708. break;
  709. }
  710. }
  711. return 0;
  712. }
  713. int lua_CheckBox_getAnimation(lua_State* state)
  714. {
  715. // Get the number of parameters.
  716. int paramCount = lua_gettop(state);
  717. // Attempt to match the parameters to a valid binding.
  718. switch (paramCount)
  719. {
  720. case 1:
  721. {
  722. if ((lua_type(state, 1) == LUA_TUSERDATA))
  723. {
  724. CheckBox* instance = getInstance(state);
  725. void* returnPtr = (void*)instance->getAnimation();
  726. if (returnPtr)
  727. {
  728. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  729. object->instance = returnPtr;
  730. object->owns = false;
  731. luaL_getmetatable(state, "Animation");
  732. lua_setmetatable(state, -2);
  733. }
  734. else
  735. {
  736. lua_pushnil(state);
  737. }
  738. return 1;
  739. }
  740. else
  741. {
  742. lua_pushstring(state, "lua_CheckBox_getAnimation - Failed to match the given parameters to a valid function signature.");
  743. lua_error(state);
  744. }
  745. break;
  746. }
  747. case 2:
  748. {
  749. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  750. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  751. {
  752. // Get parameter 1 off the stack.
  753. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  754. CheckBox* instance = getInstance(state);
  755. void* returnPtr = (void*)instance->getAnimation(param1);
  756. if (returnPtr)
  757. {
  758. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  759. object->instance = returnPtr;
  760. object->owns = false;
  761. luaL_getmetatable(state, "Animation");
  762. lua_setmetatable(state, -2);
  763. }
  764. else
  765. {
  766. lua_pushnil(state);
  767. }
  768. return 1;
  769. }
  770. else
  771. {
  772. lua_pushstring(state, "lua_CheckBox_getAnimation - Failed to match the given parameters to a valid function signature.");
  773. lua_error(state);
  774. }
  775. break;
  776. }
  777. default:
  778. {
  779. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  780. lua_error(state);
  781. break;
  782. }
  783. }
  784. return 0;
  785. }
  786. int lua_CheckBox_getAnimationPropertyComponentCount(lua_State* state)
  787. {
  788. // Get the number of parameters.
  789. int paramCount = lua_gettop(state);
  790. // Attempt to match the parameters to a valid binding.
  791. switch (paramCount)
  792. {
  793. case 2:
  794. {
  795. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  796. lua_type(state, 2) == LUA_TNUMBER)
  797. {
  798. // Get parameter 1 off the stack.
  799. int param1 = (int)luaL_checkint(state, 2);
  800. CheckBox* instance = getInstance(state);
  801. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  802. // Push the return value onto the stack.
  803. lua_pushunsigned(state, result);
  804. return 1;
  805. }
  806. else
  807. {
  808. lua_pushstring(state, "lua_CheckBox_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  809. lua_error(state);
  810. }
  811. break;
  812. }
  813. default:
  814. {
  815. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  816. lua_error(state);
  817. break;
  818. }
  819. }
  820. return 0;
  821. }
  822. int lua_CheckBox_getAnimationPropertyValue(lua_State* state)
  823. {
  824. // Get the number of parameters.
  825. int paramCount = lua_gettop(state);
  826. // Attempt to match the parameters to a valid binding.
  827. switch (paramCount)
  828. {
  829. case 3:
  830. {
  831. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  832. lua_type(state, 2) == LUA_TNUMBER &&
  833. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  834. {
  835. // Get parameter 1 off the stack.
  836. int param1 = (int)luaL_checkint(state, 2);
  837. // Get parameter 2 off the stack.
  838. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  839. CheckBox* instance = getInstance(state);
  840. instance->getAnimationPropertyValue(param1, param2);
  841. return 0;
  842. }
  843. else
  844. {
  845. lua_pushstring(state, "lua_CheckBox_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  846. lua_error(state);
  847. }
  848. break;
  849. }
  850. default:
  851. {
  852. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  853. lua_error(state);
  854. break;
  855. }
  856. }
  857. return 0;
  858. }
  859. int lua_CheckBox_getAutoHeight(lua_State* state)
  860. {
  861. // Get the number of parameters.
  862. int paramCount = lua_gettop(state);
  863. // Attempt to match the parameters to a valid binding.
  864. switch (paramCount)
  865. {
  866. case 1:
  867. {
  868. if ((lua_type(state, 1) == LUA_TUSERDATA))
  869. {
  870. CheckBox* instance = getInstance(state);
  871. bool result = instance->getAutoHeight();
  872. // Push the return value onto the stack.
  873. lua_pushboolean(state, result);
  874. return 1;
  875. }
  876. else
  877. {
  878. lua_pushstring(state, "lua_CheckBox_getAutoHeight - Failed to match the given parameters to a valid function signature.");
  879. lua_error(state);
  880. }
  881. break;
  882. }
  883. default:
  884. {
  885. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  886. lua_error(state);
  887. break;
  888. }
  889. }
  890. return 0;
  891. }
  892. int lua_CheckBox_getAutoWidth(lua_State* state)
  893. {
  894. // Get the number of parameters.
  895. int paramCount = lua_gettop(state);
  896. // Attempt to match the parameters to a valid binding.
  897. switch (paramCount)
  898. {
  899. case 1:
  900. {
  901. if ((lua_type(state, 1) == LUA_TUSERDATA))
  902. {
  903. CheckBox* instance = getInstance(state);
  904. bool result = instance->getAutoWidth();
  905. // Push the return value onto the stack.
  906. lua_pushboolean(state, result);
  907. return 1;
  908. }
  909. else
  910. {
  911. lua_pushstring(state, "lua_CheckBox_getAutoWidth - Failed to match the given parameters to a valid function signature.");
  912. lua_error(state);
  913. }
  914. break;
  915. }
  916. default:
  917. {
  918. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  919. lua_error(state);
  920. break;
  921. }
  922. }
  923. return 0;
  924. }
  925. int lua_CheckBox_getBorder(lua_State* state)
  926. {
  927. // Get the number of parameters.
  928. int paramCount = lua_gettop(state);
  929. // Attempt to match the parameters to a valid binding.
  930. switch (paramCount)
  931. {
  932. case 1:
  933. {
  934. if ((lua_type(state, 1) == LUA_TUSERDATA))
  935. {
  936. CheckBox* instance = getInstance(state);
  937. void* returnPtr = (void*)&(instance->getBorder());
  938. if (returnPtr)
  939. {
  940. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  941. object->instance = returnPtr;
  942. object->owns = false;
  943. luaL_getmetatable(state, "ThemeSideRegions");
  944. lua_setmetatable(state, -2);
  945. }
  946. else
  947. {
  948. lua_pushnil(state);
  949. }
  950. return 1;
  951. }
  952. else
  953. {
  954. lua_pushstring(state, "lua_CheckBox_getBorder - Failed to match the given parameters to a valid function signature.");
  955. lua_error(state);
  956. }
  957. break;
  958. }
  959. case 2:
  960. {
  961. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  962. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  963. {
  964. // Get parameter 1 off the stack.
  965. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  966. CheckBox* instance = getInstance(state);
  967. void* returnPtr = (void*)&(instance->getBorder(param1));
  968. if (returnPtr)
  969. {
  970. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  971. object->instance = returnPtr;
  972. object->owns = false;
  973. luaL_getmetatable(state, "ThemeSideRegions");
  974. lua_setmetatable(state, -2);
  975. }
  976. else
  977. {
  978. lua_pushnil(state);
  979. }
  980. return 1;
  981. }
  982. else
  983. {
  984. lua_pushstring(state, "lua_CheckBox_getBorder - Failed to match the given parameters to a valid function signature.");
  985. lua_error(state);
  986. }
  987. break;
  988. }
  989. default:
  990. {
  991. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  992. lua_error(state);
  993. break;
  994. }
  995. }
  996. return 0;
  997. }
  998. int lua_CheckBox_getBounds(lua_State* state)
  999. {
  1000. // Get the number of parameters.
  1001. int paramCount = lua_gettop(state);
  1002. // Attempt to match the parameters to a valid binding.
  1003. switch (paramCount)
  1004. {
  1005. case 1:
  1006. {
  1007. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1008. {
  1009. CheckBox* instance = getInstance(state);
  1010. void* returnPtr = (void*)&(instance->getBounds());
  1011. if (returnPtr)
  1012. {
  1013. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1014. object->instance = returnPtr;
  1015. object->owns = false;
  1016. luaL_getmetatable(state, "Rectangle");
  1017. lua_setmetatable(state, -2);
  1018. }
  1019. else
  1020. {
  1021. lua_pushnil(state);
  1022. }
  1023. return 1;
  1024. }
  1025. else
  1026. {
  1027. lua_pushstring(state, "lua_CheckBox_getBounds - Failed to match the given parameters to a valid function signature.");
  1028. lua_error(state);
  1029. }
  1030. break;
  1031. }
  1032. default:
  1033. {
  1034. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1035. lua_error(state);
  1036. break;
  1037. }
  1038. }
  1039. return 0;
  1040. }
  1041. int lua_CheckBox_getClip(lua_State* state)
  1042. {
  1043. // Get the number of parameters.
  1044. int paramCount = lua_gettop(state);
  1045. // Attempt to match the parameters to a valid binding.
  1046. switch (paramCount)
  1047. {
  1048. case 1:
  1049. {
  1050. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1051. {
  1052. CheckBox* instance = getInstance(state);
  1053. void* returnPtr = (void*)&(instance->getClip());
  1054. if (returnPtr)
  1055. {
  1056. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1057. object->instance = returnPtr;
  1058. object->owns = false;
  1059. luaL_getmetatable(state, "Rectangle");
  1060. lua_setmetatable(state, -2);
  1061. }
  1062. else
  1063. {
  1064. lua_pushnil(state);
  1065. }
  1066. return 1;
  1067. }
  1068. else
  1069. {
  1070. lua_pushstring(state, "lua_CheckBox_getClip - Failed to match the given parameters to a valid function signature.");
  1071. lua_error(state);
  1072. }
  1073. break;
  1074. }
  1075. default:
  1076. {
  1077. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1078. lua_error(state);
  1079. break;
  1080. }
  1081. }
  1082. return 0;
  1083. }
  1084. int lua_CheckBox_getClipBounds(lua_State* state)
  1085. {
  1086. // Get the number of parameters.
  1087. int paramCount = lua_gettop(state);
  1088. // Attempt to match the parameters to a valid binding.
  1089. switch (paramCount)
  1090. {
  1091. case 1:
  1092. {
  1093. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1094. {
  1095. CheckBox* instance = getInstance(state);
  1096. void* returnPtr = (void*)&(instance->getClipBounds());
  1097. if (returnPtr)
  1098. {
  1099. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1100. object->instance = returnPtr;
  1101. object->owns = false;
  1102. luaL_getmetatable(state, "Rectangle");
  1103. lua_setmetatable(state, -2);
  1104. }
  1105. else
  1106. {
  1107. lua_pushnil(state);
  1108. }
  1109. return 1;
  1110. }
  1111. else
  1112. {
  1113. lua_pushstring(state, "lua_CheckBox_getClipBounds - Failed to match the given parameters to a valid function signature.");
  1114. lua_error(state);
  1115. }
  1116. break;
  1117. }
  1118. default:
  1119. {
  1120. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1121. lua_error(state);
  1122. break;
  1123. }
  1124. }
  1125. return 0;
  1126. }
  1127. int lua_CheckBox_getConsumeInputEvents(lua_State* state)
  1128. {
  1129. // Get the number of parameters.
  1130. int paramCount = lua_gettop(state);
  1131. // Attempt to match the parameters to a valid binding.
  1132. switch (paramCount)
  1133. {
  1134. case 1:
  1135. {
  1136. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1137. {
  1138. CheckBox* instance = getInstance(state);
  1139. bool result = instance->getConsumeInputEvents();
  1140. // Push the return value onto the stack.
  1141. lua_pushboolean(state, result);
  1142. return 1;
  1143. }
  1144. else
  1145. {
  1146. lua_pushstring(state, "lua_CheckBox_getConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  1147. lua_error(state);
  1148. }
  1149. break;
  1150. }
  1151. default:
  1152. {
  1153. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1154. lua_error(state);
  1155. break;
  1156. }
  1157. }
  1158. return 0;
  1159. }
  1160. int lua_CheckBox_getCursorColor(lua_State* state)
  1161. {
  1162. // Get the number of parameters.
  1163. int paramCount = lua_gettop(state);
  1164. // Attempt to match the parameters to a valid binding.
  1165. switch (paramCount)
  1166. {
  1167. case 2:
  1168. {
  1169. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1170. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1171. {
  1172. // Get parameter 1 off the stack.
  1173. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1174. CheckBox* instance = getInstance(state);
  1175. void* returnPtr = (void*)&(instance->getCursorColor(param1));
  1176. if (returnPtr)
  1177. {
  1178. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1179. object->instance = returnPtr;
  1180. object->owns = false;
  1181. luaL_getmetatable(state, "Vector4");
  1182. lua_setmetatable(state, -2);
  1183. }
  1184. else
  1185. {
  1186. lua_pushnil(state);
  1187. }
  1188. return 1;
  1189. }
  1190. else
  1191. {
  1192. lua_pushstring(state, "lua_CheckBox_getCursorColor - Failed to match the given parameters to a valid function signature.");
  1193. lua_error(state);
  1194. }
  1195. break;
  1196. }
  1197. default:
  1198. {
  1199. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1200. lua_error(state);
  1201. break;
  1202. }
  1203. }
  1204. return 0;
  1205. }
  1206. int lua_CheckBox_getCursorRegion(lua_State* state)
  1207. {
  1208. // Get the number of parameters.
  1209. int paramCount = lua_gettop(state);
  1210. // Attempt to match the parameters to a valid binding.
  1211. switch (paramCount)
  1212. {
  1213. case 2:
  1214. {
  1215. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1216. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1217. {
  1218. // Get parameter 1 off the stack.
  1219. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1220. CheckBox* instance = getInstance(state);
  1221. void* returnPtr = (void*)&(instance->getCursorRegion(param1));
  1222. if (returnPtr)
  1223. {
  1224. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1225. object->instance = returnPtr;
  1226. object->owns = false;
  1227. luaL_getmetatable(state, "Rectangle");
  1228. lua_setmetatable(state, -2);
  1229. }
  1230. else
  1231. {
  1232. lua_pushnil(state);
  1233. }
  1234. return 1;
  1235. }
  1236. else
  1237. {
  1238. lua_pushstring(state, "lua_CheckBox_getCursorRegion - Failed to match the given parameters to a valid function signature.");
  1239. lua_error(state);
  1240. }
  1241. break;
  1242. }
  1243. default:
  1244. {
  1245. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1246. lua_error(state);
  1247. break;
  1248. }
  1249. }
  1250. return 0;
  1251. }
  1252. int lua_CheckBox_getCursorUVs(lua_State* state)
  1253. {
  1254. // Get the number of parameters.
  1255. int paramCount = lua_gettop(state);
  1256. // Attempt to match the parameters to a valid binding.
  1257. switch (paramCount)
  1258. {
  1259. case 2:
  1260. {
  1261. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1262. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1263. {
  1264. // Get parameter 1 off the stack.
  1265. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1266. CheckBox* instance = getInstance(state);
  1267. void* returnPtr = (void*)&(instance->getCursorUVs(param1));
  1268. if (returnPtr)
  1269. {
  1270. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1271. object->instance = returnPtr;
  1272. object->owns = false;
  1273. luaL_getmetatable(state, "ThemeUVs");
  1274. lua_setmetatable(state, -2);
  1275. }
  1276. else
  1277. {
  1278. lua_pushnil(state);
  1279. }
  1280. return 1;
  1281. }
  1282. else
  1283. {
  1284. lua_pushstring(state, "lua_CheckBox_getCursorUVs - Failed to match the given parameters to a valid function signature.");
  1285. lua_error(state);
  1286. }
  1287. break;
  1288. }
  1289. default:
  1290. {
  1291. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1292. lua_error(state);
  1293. break;
  1294. }
  1295. }
  1296. return 0;
  1297. }
  1298. int lua_CheckBox_getFocusIndex(lua_State* state)
  1299. {
  1300. // Get the number of parameters.
  1301. int paramCount = lua_gettop(state);
  1302. // Attempt to match the parameters to a valid binding.
  1303. switch (paramCount)
  1304. {
  1305. case 1:
  1306. {
  1307. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1308. {
  1309. CheckBox* instance = getInstance(state);
  1310. int result = instance->getFocusIndex();
  1311. // Push the return value onto the stack.
  1312. lua_pushinteger(state, result);
  1313. return 1;
  1314. }
  1315. else
  1316. {
  1317. lua_pushstring(state, "lua_CheckBox_getFocusIndex - Failed to match the given parameters to a valid function signature.");
  1318. lua_error(state);
  1319. }
  1320. break;
  1321. }
  1322. default:
  1323. {
  1324. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1325. lua_error(state);
  1326. break;
  1327. }
  1328. }
  1329. return 0;
  1330. }
  1331. int lua_CheckBox_getFont(lua_State* state)
  1332. {
  1333. // Get the number of parameters.
  1334. int paramCount = lua_gettop(state);
  1335. // Attempt to match the parameters to a valid binding.
  1336. switch (paramCount)
  1337. {
  1338. case 1:
  1339. {
  1340. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1341. {
  1342. CheckBox* instance = getInstance(state);
  1343. void* returnPtr = (void*)instance->getFont();
  1344. if (returnPtr)
  1345. {
  1346. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1347. object->instance = returnPtr;
  1348. object->owns = false;
  1349. luaL_getmetatable(state, "Font");
  1350. lua_setmetatable(state, -2);
  1351. }
  1352. else
  1353. {
  1354. lua_pushnil(state);
  1355. }
  1356. return 1;
  1357. }
  1358. else
  1359. {
  1360. lua_pushstring(state, "lua_CheckBox_getFont - Failed to match the given parameters to a valid function signature.");
  1361. lua_error(state);
  1362. }
  1363. break;
  1364. }
  1365. case 2:
  1366. {
  1367. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1368. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1369. {
  1370. // Get parameter 1 off the stack.
  1371. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1372. CheckBox* instance = getInstance(state);
  1373. void* returnPtr = (void*)instance->getFont(param1);
  1374. if (returnPtr)
  1375. {
  1376. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1377. object->instance = returnPtr;
  1378. object->owns = false;
  1379. luaL_getmetatable(state, "Font");
  1380. lua_setmetatable(state, -2);
  1381. }
  1382. else
  1383. {
  1384. lua_pushnil(state);
  1385. }
  1386. return 1;
  1387. }
  1388. else
  1389. {
  1390. lua_pushstring(state, "lua_CheckBox_getFont - Failed to match the given parameters to a valid function signature.");
  1391. lua_error(state);
  1392. }
  1393. break;
  1394. }
  1395. default:
  1396. {
  1397. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1398. lua_error(state);
  1399. break;
  1400. }
  1401. }
  1402. return 0;
  1403. }
  1404. int lua_CheckBox_getFontSize(lua_State* state)
  1405. {
  1406. // Get the number of parameters.
  1407. int paramCount = lua_gettop(state);
  1408. // Attempt to match the parameters to a valid binding.
  1409. switch (paramCount)
  1410. {
  1411. case 1:
  1412. {
  1413. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1414. {
  1415. CheckBox* instance = getInstance(state);
  1416. unsigned int result = instance->getFontSize();
  1417. // Push the return value onto the stack.
  1418. lua_pushunsigned(state, result);
  1419. return 1;
  1420. }
  1421. else
  1422. {
  1423. lua_pushstring(state, "lua_CheckBox_getFontSize - Failed to match the given parameters to a valid function signature.");
  1424. lua_error(state);
  1425. }
  1426. break;
  1427. }
  1428. case 2:
  1429. {
  1430. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1431. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1432. {
  1433. // Get parameter 1 off the stack.
  1434. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1435. CheckBox* instance = getInstance(state);
  1436. unsigned int result = instance->getFontSize(param1);
  1437. // Push the return value onto the stack.
  1438. lua_pushunsigned(state, result);
  1439. return 1;
  1440. }
  1441. else
  1442. {
  1443. lua_pushstring(state, "lua_CheckBox_getFontSize - Failed to match the given parameters to a valid function signature.");
  1444. lua_error(state);
  1445. }
  1446. break;
  1447. }
  1448. default:
  1449. {
  1450. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1451. lua_error(state);
  1452. break;
  1453. }
  1454. }
  1455. return 0;
  1456. }
  1457. int lua_CheckBox_getHeight(lua_State* state)
  1458. {
  1459. // Get the number of parameters.
  1460. int paramCount = lua_gettop(state);
  1461. // Attempt to match the parameters to a valid binding.
  1462. switch (paramCount)
  1463. {
  1464. case 1:
  1465. {
  1466. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1467. {
  1468. CheckBox* instance = getInstance(state);
  1469. float result = instance->getHeight();
  1470. // Push the return value onto the stack.
  1471. lua_pushnumber(state, result);
  1472. return 1;
  1473. }
  1474. else
  1475. {
  1476. lua_pushstring(state, "lua_CheckBox_getHeight - Failed to match the given parameters to a valid function signature.");
  1477. lua_error(state);
  1478. }
  1479. break;
  1480. }
  1481. default:
  1482. {
  1483. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1484. lua_error(state);
  1485. break;
  1486. }
  1487. }
  1488. return 0;
  1489. }
  1490. int lua_CheckBox_getId(lua_State* state)
  1491. {
  1492. // Get the number of parameters.
  1493. int paramCount = lua_gettop(state);
  1494. // Attempt to match the parameters to a valid binding.
  1495. switch (paramCount)
  1496. {
  1497. case 1:
  1498. {
  1499. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1500. {
  1501. CheckBox* instance = getInstance(state);
  1502. const char* result = instance->getId();
  1503. // Push the return value onto the stack.
  1504. lua_pushstring(state, result);
  1505. return 1;
  1506. }
  1507. else
  1508. {
  1509. lua_pushstring(state, "lua_CheckBox_getId - Failed to match the given parameters to a valid function signature.");
  1510. lua_error(state);
  1511. }
  1512. break;
  1513. }
  1514. default:
  1515. {
  1516. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1517. lua_error(state);
  1518. break;
  1519. }
  1520. }
  1521. return 0;
  1522. }
  1523. int lua_CheckBox_getImageColor(lua_State* state)
  1524. {
  1525. // Get the number of parameters.
  1526. int paramCount = lua_gettop(state);
  1527. // Attempt to match the parameters to a valid binding.
  1528. switch (paramCount)
  1529. {
  1530. case 3:
  1531. {
  1532. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1533. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1534. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1535. {
  1536. // Get parameter 1 off the stack.
  1537. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1538. // Get parameter 2 off the stack.
  1539. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1540. CheckBox* instance = getInstance(state);
  1541. void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
  1542. if (returnPtr)
  1543. {
  1544. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1545. object->instance = returnPtr;
  1546. object->owns = false;
  1547. luaL_getmetatable(state, "Vector4");
  1548. lua_setmetatable(state, -2);
  1549. }
  1550. else
  1551. {
  1552. lua_pushnil(state);
  1553. }
  1554. return 1;
  1555. }
  1556. else
  1557. {
  1558. lua_pushstring(state, "lua_CheckBox_getImageColor - Failed to match the given parameters to a valid function signature.");
  1559. lua_error(state);
  1560. }
  1561. break;
  1562. }
  1563. default:
  1564. {
  1565. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1566. lua_error(state);
  1567. break;
  1568. }
  1569. }
  1570. return 0;
  1571. }
  1572. int lua_CheckBox_getImageRegion(lua_State* state)
  1573. {
  1574. // Get the number of parameters.
  1575. int paramCount = lua_gettop(state);
  1576. // Attempt to match the parameters to a valid binding.
  1577. switch (paramCount)
  1578. {
  1579. case 3:
  1580. {
  1581. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1582. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1583. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1584. {
  1585. // Get parameter 1 off the stack.
  1586. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1587. // Get parameter 2 off the stack.
  1588. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1589. CheckBox* instance = getInstance(state);
  1590. void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
  1591. if (returnPtr)
  1592. {
  1593. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1594. object->instance = returnPtr;
  1595. object->owns = false;
  1596. luaL_getmetatable(state, "Rectangle");
  1597. lua_setmetatable(state, -2);
  1598. }
  1599. else
  1600. {
  1601. lua_pushnil(state);
  1602. }
  1603. return 1;
  1604. }
  1605. else
  1606. {
  1607. lua_pushstring(state, "lua_CheckBox_getImageRegion - Failed to match the given parameters to a valid function signature.");
  1608. lua_error(state);
  1609. }
  1610. break;
  1611. }
  1612. default:
  1613. {
  1614. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1615. lua_error(state);
  1616. break;
  1617. }
  1618. }
  1619. return 0;
  1620. }
  1621. int lua_CheckBox_getImageSize(lua_State* state)
  1622. {
  1623. // Get the number of parameters.
  1624. int paramCount = lua_gettop(state);
  1625. // Attempt to match the parameters to a valid binding.
  1626. switch (paramCount)
  1627. {
  1628. case 1:
  1629. {
  1630. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1631. {
  1632. CheckBox* instance = getInstance(state);
  1633. void* returnPtr = (void*)&(instance->getImageSize());
  1634. if (returnPtr)
  1635. {
  1636. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1637. object->instance = returnPtr;
  1638. object->owns = false;
  1639. luaL_getmetatable(state, "Vector2");
  1640. lua_setmetatable(state, -2);
  1641. }
  1642. else
  1643. {
  1644. lua_pushnil(state);
  1645. }
  1646. return 1;
  1647. }
  1648. else
  1649. {
  1650. lua_pushstring(state, "lua_CheckBox_getImageSize - Failed to match the given parameters to a valid function signature.");
  1651. lua_error(state);
  1652. }
  1653. break;
  1654. }
  1655. default:
  1656. {
  1657. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1658. lua_error(state);
  1659. break;
  1660. }
  1661. }
  1662. return 0;
  1663. }
  1664. int lua_CheckBox_getImageUVs(lua_State* state)
  1665. {
  1666. // Get the number of parameters.
  1667. int paramCount = lua_gettop(state);
  1668. // Attempt to match the parameters to a valid binding.
  1669. switch (paramCount)
  1670. {
  1671. case 3:
  1672. {
  1673. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1674. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1675. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1676. {
  1677. // Get parameter 1 off the stack.
  1678. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1679. // Get parameter 2 off the stack.
  1680. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1681. CheckBox* instance = getInstance(state);
  1682. void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
  1683. if (returnPtr)
  1684. {
  1685. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1686. object->instance = returnPtr;
  1687. object->owns = false;
  1688. luaL_getmetatable(state, "ThemeUVs");
  1689. lua_setmetatable(state, -2);
  1690. }
  1691. else
  1692. {
  1693. lua_pushnil(state);
  1694. }
  1695. return 1;
  1696. }
  1697. else
  1698. {
  1699. lua_pushstring(state, "lua_CheckBox_getImageUVs - Failed to match the given parameters to a valid function signature.");
  1700. lua_error(state);
  1701. }
  1702. break;
  1703. }
  1704. default:
  1705. {
  1706. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1707. lua_error(state);
  1708. break;
  1709. }
  1710. }
  1711. return 0;
  1712. }
  1713. int lua_CheckBox_getMargin(lua_State* state)
  1714. {
  1715. // Get the number of parameters.
  1716. int paramCount = lua_gettop(state);
  1717. // Attempt to match the parameters to a valid binding.
  1718. switch (paramCount)
  1719. {
  1720. case 1:
  1721. {
  1722. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1723. {
  1724. CheckBox* instance = getInstance(state);
  1725. void* returnPtr = (void*)&(instance->getMargin());
  1726. if (returnPtr)
  1727. {
  1728. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1729. object->instance = returnPtr;
  1730. object->owns = false;
  1731. luaL_getmetatable(state, "ThemeSideRegions");
  1732. lua_setmetatable(state, -2);
  1733. }
  1734. else
  1735. {
  1736. lua_pushnil(state);
  1737. }
  1738. return 1;
  1739. }
  1740. else
  1741. {
  1742. lua_pushstring(state, "lua_CheckBox_getMargin - Failed to match the given parameters to a valid function signature.");
  1743. lua_error(state);
  1744. }
  1745. break;
  1746. }
  1747. default:
  1748. {
  1749. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1750. lua_error(state);
  1751. break;
  1752. }
  1753. }
  1754. return 0;
  1755. }
  1756. int lua_CheckBox_getOpacity(lua_State* state)
  1757. {
  1758. // Get the number of parameters.
  1759. int paramCount = lua_gettop(state);
  1760. // Attempt to match the parameters to a valid binding.
  1761. switch (paramCount)
  1762. {
  1763. case 1:
  1764. {
  1765. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1766. {
  1767. CheckBox* instance = getInstance(state);
  1768. float result = instance->getOpacity();
  1769. // Push the return value onto the stack.
  1770. lua_pushnumber(state, result);
  1771. return 1;
  1772. }
  1773. else
  1774. {
  1775. lua_pushstring(state, "lua_CheckBox_getOpacity - Failed to match the given parameters to a valid function signature.");
  1776. lua_error(state);
  1777. }
  1778. break;
  1779. }
  1780. case 2:
  1781. {
  1782. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1783. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1784. {
  1785. // Get parameter 1 off the stack.
  1786. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1787. CheckBox* instance = getInstance(state);
  1788. float result = instance->getOpacity(param1);
  1789. // Push the return value onto the stack.
  1790. lua_pushnumber(state, result);
  1791. return 1;
  1792. }
  1793. else
  1794. {
  1795. lua_pushstring(state, "lua_CheckBox_getOpacity - Failed to match the given parameters to a valid function signature.");
  1796. lua_error(state);
  1797. }
  1798. break;
  1799. }
  1800. default:
  1801. {
  1802. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1803. lua_error(state);
  1804. break;
  1805. }
  1806. }
  1807. return 0;
  1808. }
  1809. int lua_CheckBox_getPadding(lua_State* state)
  1810. {
  1811. // Get the number of parameters.
  1812. int paramCount = lua_gettop(state);
  1813. // Attempt to match the parameters to a valid binding.
  1814. switch (paramCount)
  1815. {
  1816. case 1:
  1817. {
  1818. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1819. {
  1820. CheckBox* instance = getInstance(state);
  1821. void* returnPtr = (void*)&(instance->getPadding());
  1822. if (returnPtr)
  1823. {
  1824. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1825. object->instance = returnPtr;
  1826. object->owns = false;
  1827. luaL_getmetatable(state, "ThemeSideRegions");
  1828. lua_setmetatable(state, -2);
  1829. }
  1830. else
  1831. {
  1832. lua_pushnil(state);
  1833. }
  1834. return 1;
  1835. }
  1836. else
  1837. {
  1838. lua_pushstring(state, "lua_CheckBox_getPadding - Failed to match the given parameters to a valid function signature.");
  1839. lua_error(state);
  1840. }
  1841. break;
  1842. }
  1843. default:
  1844. {
  1845. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1846. lua_error(state);
  1847. break;
  1848. }
  1849. }
  1850. return 0;
  1851. }
  1852. int lua_CheckBox_getRefCount(lua_State* state)
  1853. {
  1854. // Get the number of parameters.
  1855. int paramCount = lua_gettop(state);
  1856. // Attempt to match the parameters to a valid binding.
  1857. switch (paramCount)
  1858. {
  1859. case 1:
  1860. {
  1861. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1862. {
  1863. CheckBox* instance = getInstance(state);
  1864. unsigned int result = instance->getRefCount();
  1865. // Push the return value onto the stack.
  1866. lua_pushunsigned(state, result);
  1867. return 1;
  1868. }
  1869. else
  1870. {
  1871. lua_pushstring(state, "lua_CheckBox_getRefCount - Failed to match the given parameters to a valid function signature.");
  1872. lua_error(state);
  1873. }
  1874. break;
  1875. }
  1876. default:
  1877. {
  1878. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1879. lua_error(state);
  1880. break;
  1881. }
  1882. }
  1883. return 0;
  1884. }
  1885. int lua_CheckBox_getSkinColor(lua_State* state)
  1886. {
  1887. // Get the number of parameters.
  1888. int paramCount = lua_gettop(state);
  1889. // Attempt to match the parameters to a valid binding.
  1890. switch (paramCount)
  1891. {
  1892. case 1:
  1893. {
  1894. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1895. {
  1896. CheckBox* instance = getInstance(state);
  1897. void* returnPtr = (void*)&(instance->getSkinColor());
  1898. if (returnPtr)
  1899. {
  1900. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1901. object->instance = returnPtr;
  1902. object->owns = false;
  1903. luaL_getmetatable(state, "Vector4");
  1904. lua_setmetatable(state, -2);
  1905. }
  1906. else
  1907. {
  1908. lua_pushnil(state);
  1909. }
  1910. return 1;
  1911. }
  1912. else
  1913. {
  1914. lua_pushstring(state, "lua_CheckBox_getSkinColor - Failed to match the given parameters to a valid function signature.");
  1915. lua_error(state);
  1916. }
  1917. break;
  1918. }
  1919. case 2:
  1920. {
  1921. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1922. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1923. {
  1924. // Get parameter 1 off the stack.
  1925. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1926. CheckBox* instance = getInstance(state);
  1927. void* returnPtr = (void*)&(instance->getSkinColor(param1));
  1928. if (returnPtr)
  1929. {
  1930. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1931. object->instance = returnPtr;
  1932. object->owns = false;
  1933. luaL_getmetatable(state, "Vector4");
  1934. lua_setmetatable(state, -2);
  1935. }
  1936. else
  1937. {
  1938. lua_pushnil(state);
  1939. }
  1940. return 1;
  1941. }
  1942. else
  1943. {
  1944. lua_pushstring(state, "lua_CheckBox_getSkinColor - Failed to match the given parameters to a valid function signature.");
  1945. lua_error(state);
  1946. }
  1947. break;
  1948. }
  1949. default:
  1950. {
  1951. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1952. lua_error(state);
  1953. break;
  1954. }
  1955. }
  1956. return 0;
  1957. }
  1958. int lua_CheckBox_getSkinRegion(lua_State* state)
  1959. {
  1960. // Get the number of parameters.
  1961. int paramCount = lua_gettop(state);
  1962. // Attempt to match the parameters to a valid binding.
  1963. switch (paramCount)
  1964. {
  1965. case 1:
  1966. {
  1967. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1968. {
  1969. CheckBox* instance = getInstance(state);
  1970. void* returnPtr = (void*)&(instance->getSkinRegion());
  1971. if (returnPtr)
  1972. {
  1973. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1974. object->instance = returnPtr;
  1975. object->owns = false;
  1976. luaL_getmetatable(state, "Rectangle");
  1977. lua_setmetatable(state, -2);
  1978. }
  1979. else
  1980. {
  1981. lua_pushnil(state);
  1982. }
  1983. return 1;
  1984. }
  1985. else
  1986. {
  1987. lua_pushstring(state, "lua_CheckBox_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  1988. lua_error(state);
  1989. }
  1990. break;
  1991. }
  1992. case 2:
  1993. {
  1994. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1995. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1996. {
  1997. // Get parameter 1 off the stack.
  1998. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1999. CheckBox* instance = getInstance(state);
  2000. void* returnPtr = (void*)&(instance->getSkinRegion(param1));
  2001. if (returnPtr)
  2002. {
  2003. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2004. object->instance = returnPtr;
  2005. object->owns = false;
  2006. luaL_getmetatable(state, "Rectangle");
  2007. lua_setmetatable(state, -2);
  2008. }
  2009. else
  2010. {
  2011. lua_pushnil(state);
  2012. }
  2013. return 1;
  2014. }
  2015. else
  2016. {
  2017. lua_pushstring(state, "lua_CheckBox_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2018. lua_error(state);
  2019. }
  2020. break;
  2021. }
  2022. default:
  2023. {
  2024. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2025. lua_error(state);
  2026. break;
  2027. }
  2028. }
  2029. return 0;
  2030. }
  2031. int lua_CheckBox_getState(lua_State* state)
  2032. {
  2033. // Get the number of parameters.
  2034. int paramCount = lua_gettop(state);
  2035. // Attempt to match the parameters to a valid binding.
  2036. switch (paramCount)
  2037. {
  2038. case 1:
  2039. {
  2040. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2041. {
  2042. CheckBox* instance = getInstance(state);
  2043. Control::State result = instance->getState();
  2044. // Push the return value onto the stack.
  2045. lua_pushstring(state, lua_stringFromEnum_ControlState(result));
  2046. return 1;
  2047. }
  2048. else
  2049. {
  2050. lua_pushstring(state, "lua_CheckBox_getState - Failed to match the given parameters to a valid function signature.");
  2051. lua_error(state);
  2052. }
  2053. break;
  2054. }
  2055. default:
  2056. {
  2057. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2058. lua_error(state);
  2059. break;
  2060. }
  2061. }
  2062. return 0;
  2063. }
  2064. int lua_CheckBox_getStyle(lua_State* state)
  2065. {
  2066. // Get the number of parameters.
  2067. int paramCount = lua_gettop(state);
  2068. // Attempt to match the parameters to a valid binding.
  2069. switch (paramCount)
  2070. {
  2071. case 1:
  2072. {
  2073. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2074. {
  2075. CheckBox* instance = getInstance(state);
  2076. void* returnPtr = (void*)instance->getStyle();
  2077. if (returnPtr)
  2078. {
  2079. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2080. object->instance = returnPtr;
  2081. object->owns = false;
  2082. luaL_getmetatable(state, "ThemeStyle");
  2083. lua_setmetatable(state, -2);
  2084. }
  2085. else
  2086. {
  2087. lua_pushnil(state);
  2088. }
  2089. return 1;
  2090. }
  2091. else
  2092. {
  2093. lua_pushstring(state, "lua_CheckBox_getStyle - Failed to match the given parameters to a valid function signature.");
  2094. lua_error(state);
  2095. }
  2096. break;
  2097. }
  2098. default:
  2099. {
  2100. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2101. lua_error(state);
  2102. break;
  2103. }
  2104. }
  2105. return 0;
  2106. }
  2107. int lua_CheckBox_getText(lua_State* state)
  2108. {
  2109. // Get the number of parameters.
  2110. int paramCount = lua_gettop(state);
  2111. // Attempt to match the parameters to a valid binding.
  2112. switch (paramCount)
  2113. {
  2114. case 1:
  2115. {
  2116. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2117. {
  2118. CheckBox* instance = getInstance(state);
  2119. const char* result = instance->getText();
  2120. // Push the return value onto the stack.
  2121. lua_pushstring(state, result);
  2122. return 1;
  2123. }
  2124. else
  2125. {
  2126. lua_pushstring(state, "lua_CheckBox_getText - Failed to match the given parameters to a valid function signature.");
  2127. lua_error(state);
  2128. }
  2129. break;
  2130. }
  2131. default:
  2132. {
  2133. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2134. lua_error(state);
  2135. break;
  2136. }
  2137. }
  2138. return 0;
  2139. }
  2140. int lua_CheckBox_getTextAlignment(lua_State* state)
  2141. {
  2142. // Get the number of parameters.
  2143. int paramCount = lua_gettop(state);
  2144. // Attempt to match the parameters to a valid binding.
  2145. switch (paramCount)
  2146. {
  2147. case 1:
  2148. {
  2149. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2150. {
  2151. CheckBox* instance = getInstance(state);
  2152. Font::Justify result = instance->getTextAlignment();
  2153. // Push the return value onto the stack.
  2154. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2155. return 1;
  2156. }
  2157. else
  2158. {
  2159. lua_pushstring(state, "lua_CheckBox_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2160. lua_error(state);
  2161. }
  2162. break;
  2163. }
  2164. case 2:
  2165. {
  2166. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2167. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2168. {
  2169. // Get parameter 1 off the stack.
  2170. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2171. CheckBox* instance = getInstance(state);
  2172. Font::Justify result = instance->getTextAlignment(param1);
  2173. // Push the return value onto the stack.
  2174. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2175. return 1;
  2176. }
  2177. else
  2178. {
  2179. lua_pushstring(state, "lua_CheckBox_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2180. lua_error(state);
  2181. }
  2182. break;
  2183. }
  2184. default:
  2185. {
  2186. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2187. lua_error(state);
  2188. break;
  2189. }
  2190. }
  2191. return 0;
  2192. }
  2193. int lua_CheckBox_getTextColor(lua_State* state)
  2194. {
  2195. // Get the number of parameters.
  2196. int paramCount = lua_gettop(state);
  2197. // Attempt to match the parameters to a valid binding.
  2198. switch (paramCount)
  2199. {
  2200. case 1:
  2201. {
  2202. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2203. {
  2204. CheckBox* instance = getInstance(state);
  2205. void* returnPtr = (void*)&(instance->getTextColor());
  2206. if (returnPtr)
  2207. {
  2208. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2209. object->instance = returnPtr;
  2210. object->owns = false;
  2211. luaL_getmetatable(state, "Vector4");
  2212. lua_setmetatable(state, -2);
  2213. }
  2214. else
  2215. {
  2216. lua_pushnil(state);
  2217. }
  2218. return 1;
  2219. }
  2220. else
  2221. {
  2222. lua_pushstring(state, "lua_CheckBox_getTextColor - Failed to match the given parameters to a valid function signature.");
  2223. lua_error(state);
  2224. }
  2225. break;
  2226. }
  2227. case 2:
  2228. {
  2229. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2230. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2231. {
  2232. // Get parameter 1 off the stack.
  2233. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2234. CheckBox* instance = getInstance(state);
  2235. void* returnPtr = (void*)&(instance->getTextColor(param1));
  2236. if (returnPtr)
  2237. {
  2238. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2239. object->instance = returnPtr;
  2240. object->owns = false;
  2241. luaL_getmetatable(state, "Vector4");
  2242. lua_setmetatable(state, -2);
  2243. }
  2244. else
  2245. {
  2246. lua_pushnil(state);
  2247. }
  2248. return 1;
  2249. }
  2250. else
  2251. {
  2252. lua_pushstring(state, "lua_CheckBox_getTextColor - Failed to match the given parameters to a valid function signature.");
  2253. lua_error(state);
  2254. }
  2255. break;
  2256. }
  2257. default:
  2258. {
  2259. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2260. lua_error(state);
  2261. break;
  2262. }
  2263. }
  2264. return 0;
  2265. }
  2266. int lua_CheckBox_getTextRightToLeft(lua_State* state)
  2267. {
  2268. // Get the number of parameters.
  2269. int paramCount = lua_gettop(state);
  2270. // Attempt to match the parameters to a valid binding.
  2271. switch (paramCount)
  2272. {
  2273. case 1:
  2274. {
  2275. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2276. {
  2277. CheckBox* instance = getInstance(state);
  2278. bool result = instance->getTextRightToLeft();
  2279. // Push the return value onto the stack.
  2280. lua_pushboolean(state, result);
  2281. return 1;
  2282. }
  2283. else
  2284. {
  2285. lua_pushstring(state, "lua_CheckBox_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2286. lua_error(state);
  2287. }
  2288. break;
  2289. }
  2290. case 2:
  2291. {
  2292. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2293. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2294. {
  2295. // Get parameter 1 off the stack.
  2296. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2297. CheckBox* instance = getInstance(state);
  2298. bool result = instance->getTextRightToLeft(param1);
  2299. // Push the return value onto the stack.
  2300. lua_pushboolean(state, result);
  2301. return 1;
  2302. }
  2303. else
  2304. {
  2305. lua_pushstring(state, "lua_CheckBox_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2306. lua_error(state);
  2307. }
  2308. break;
  2309. }
  2310. default:
  2311. {
  2312. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2313. lua_error(state);
  2314. break;
  2315. }
  2316. }
  2317. return 0;
  2318. }
  2319. int lua_CheckBox_getType(lua_State* state)
  2320. {
  2321. // Get the number of parameters.
  2322. int paramCount = lua_gettop(state);
  2323. // Attempt to match the parameters to a valid binding.
  2324. switch (paramCount)
  2325. {
  2326. case 1:
  2327. {
  2328. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2329. {
  2330. CheckBox* instance = getInstance(state);
  2331. const char* result = instance->getType();
  2332. // Push the return value onto the stack.
  2333. lua_pushstring(state, result);
  2334. return 1;
  2335. }
  2336. else
  2337. {
  2338. lua_pushstring(state, "lua_CheckBox_getType - Failed to match the given parameters to a valid function signature.");
  2339. lua_error(state);
  2340. }
  2341. break;
  2342. }
  2343. default:
  2344. {
  2345. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2346. lua_error(state);
  2347. break;
  2348. }
  2349. }
  2350. return 0;
  2351. }
  2352. int lua_CheckBox_getWidth(lua_State* state)
  2353. {
  2354. // Get the number of parameters.
  2355. int paramCount = lua_gettop(state);
  2356. // Attempt to match the parameters to a valid binding.
  2357. switch (paramCount)
  2358. {
  2359. case 1:
  2360. {
  2361. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2362. {
  2363. CheckBox* instance = getInstance(state);
  2364. float result = instance->getWidth();
  2365. // Push the return value onto the stack.
  2366. lua_pushnumber(state, result);
  2367. return 1;
  2368. }
  2369. else
  2370. {
  2371. lua_pushstring(state, "lua_CheckBox_getWidth - Failed to match the given parameters to a valid function signature.");
  2372. lua_error(state);
  2373. }
  2374. break;
  2375. }
  2376. default:
  2377. {
  2378. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2379. lua_error(state);
  2380. break;
  2381. }
  2382. }
  2383. return 0;
  2384. }
  2385. int lua_CheckBox_getX(lua_State* state)
  2386. {
  2387. // Get the number of parameters.
  2388. int paramCount = lua_gettop(state);
  2389. // Attempt to match the parameters to a valid binding.
  2390. switch (paramCount)
  2391. {
  2392. case 1:
  2393. {
  2394. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2395. {
  2396. CheckBox* instance = getInstance(state);
  2397. float result = instance->getX();
  2398. // Push the return value onto the stack.
  2399. lua_pushnumber(state, result);
  2400. return 1;
  2401. }
  2402. else
  2403. {
  2404. lua_pushstring(state, "lua_CheckBox_getX - Failed to match the given parameters to a valid function signature.");
  2405. lua_error(state);
  2406. }
  2407. break;
  2408. }
  2409. default:
  2410. {
  2411. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2412. lua_error(state);
  2413. break;
  2414. }
  2415. }
  2416. return 0;
  2417. }
  2418. int lua_CheckBox_getY(lua_State* state)
  2419. {
  2420. // Get the number of parameters.
  2421. int paramCount = lua_gettop(state);
  2422. // Attempt to match the parameters to a valid binding.
  2423. switch (paramCount)
  2424. {
  2425. case 1:
  2426. {
  2427. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2428. {
  2429. CheckBox* instance = getInstance(state);
  2430. float result = instance->getY();
  2431. // Push the return value onto the stack.
  2432. lua_pushnumber(state, result);
  2433. return 1;
  2434. }
  2435. else
  2436. {
  2437. lua_pushstring(state, "lua_CheckBox_getY - Failed to match the given parameters to a valid function signature.");
  2438. lua_error(state);
  2439. }
  2440. break;
  2441. }
  2442. default:
  2443. {
  2444. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2445. lua_error(state);
  2446. break;
  2447. }
  2448. }
  2449. return 0;
  2450. }
  2451. int lua_CheckBox_getZIndex(lua_State* state)
  2452. {
  2453. // Get the number of parameters.
  2454. int paramCount = lua_gettop(state);
  2455. // Attempt to match the parameters to a valid binding.
  2456. switch (paramCount)
  2457. {
  2458. case 1:
  2459. {
  2460. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2461. {
  2462. CheckBox* instance = getInstance(state);
  2463. int result = instance->getZIndex();
  2464. // Push the return value onto the stack.
  2465. lua_pushinteger(state, result);
  2466. return 1;
  2467. }
  2468. else
  2469. {
  2470. lua_pushstring(state, "lua_CheckBox_getZIndex - Failed to match the given parameters to a valid function signature.");
  2471. lua_error(state);
  2472. }
  2473. break;
  2474. }
  2475. default:
  2476. {
  2477. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2478. lua_error(state);
  2479. break;
  2480. }
  2481. }
  2482. return 0;
  2483. }
  2484. int lua_CheckBox_isChecked(lua_State* state)
  2485. {
  2486. // Get the number of parameters.
  2487. int paramCount = lua_gettop(state);
  2488. // Attempt to match the parameters to a valid binding.
  2489. switch (paramCount)
  2490. {
  2491. case 1:
  2492. {
  2493. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2494. {
  2495. CheckBox* instance = getInstance(state);
  2496. bool result = instance->isChecked();
  2497. // Push the return value onto the stack.
  2498. lua_pushboolean(state, result);
  2499. return 1;
  2500. }
  2501. else
  2502. {
  2503. lua_pushstring(state, "lua_CheckBox_isChecked - Failed to match the given parameters to a valid function signature.");
  2504. lua_error(state);
  2505. }
  2506. break;
  2507. }
  2508. default:
  2509. {
  2510. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2511. lua_error(state);
  2512. break;
  2513. }
  2514. }
  2515. return 0;
  2516. }
  2517. int lua_CheckBox_isContainer(lua_State* state)
  2518. {
  2519. // Get the number of parameters.
  2520. int paramCount = lua_gettop(state);
  2521. // Attempt to match the parameters to a valid binding.
  2522. switch (paramCount)
  2523. {
  2524. case 1:
  2525. {
  2526. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2527. {
  2528. CheckBox* instance = getInstance(state);
  2529. bool result = instance->isContainer();
  2530. // Push the return value onto the stack.
  2531. lua_pushboolean(state, result);
  2532. return 1;
  2533. }
  2534. else
  2535. {
  2536. lua_pushstring(state, "lua_CheckBox_isContainer - Failed to match the given parameters to a valid function signature.");
  2537. lua_error(state);
  2538. }
  2539. break;
  2540. }
  2541. default:
  2542. {
  2543. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2544. lua_error(state);
  2545. break;
  2546. }
  2547. }
  2548. return 0;
  2549. }
  2550. int lua_CheckBox_isEnabled(lua_State* state)
  2551. {
  2552. // Get the number of parameters.
  2553. int paramCount = lua_gettop(state);
  2554. // Attempt to match the parameters to a valid binding.
  2555. switch (paramCount)
  2556. {
  2557. case 1:
  2558. {
  2559. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2560. {
  2561. CheckBox* instance = getInstance(state);
  2562. bool result = instance->isEnabled();
  2563. // Push the return value onto the stack.
  2564. lua_pushboolean(state, result);
  2565. return 1;
  2566. }
  2567. else
  2568. {
  2569. lua_pushstring(state, "lua_CheckBox_isEnabled - Failed to match the given parameters to a valid function signature.");
  2570. lua_error(state);
  2571. }
  2572. break;
  2573. }
  2574. default:
  2575. {
  2576. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2577. lua_error(state);
  2578. break;
  2579. }
  2580. }
  2581. return 0;
  2582. }
  2583. int lua_CheckBox_release(lua_State* state)
  2584. {
  2585. // Get the number of parameters.
  2586. int paramCount = lua_gettop(state);
  2587. // Attempt to match the parameters to a valid binding.
  2588. switch (paramCount)
  2589. {
  2590. case 1:
  2591. {
  2592. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2593. {
  2594. CheckBox* instance = getInstance(state);
  2595. instance->release();
  2596. return 0;
  2597. }
  2598. else
  2599. {
  2600. lua_pushstring(state, "lua_CheckBox_release - Failed to match the given parameters to a valid function signature.");
  2601. lua_error(state);
  2602. }
  2603. break;
  2604. }
  2605. default:
  2606. {
  2607. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2608. lua_error(state);
  2609. break;
  2610. }
  2611. }
  2612. return 0;
  2613. }
  2614. int lua_CheckBox_removeScriptCallback(lua_State* state)
  2615. {
  2616. // Get the number of parameters.
  2617. int paramCount = lua_gettop(state);
  2618. // Attempt to match the parameters to a valid binding.
  2619. switch (paramCount)
  2620. {
  2621. case 3:
  2622. {
  2623. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2624. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  2625. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  2626. {
  2627. // Get parameter 1 off the stack.
  2628. std::string param1 = ScriptUtil::getString(2, true);
  2629. // Get parameter 2 off the stack.
  2630. std::string param2 = ScriptUtil::getString(3, true);
  2631. CheckBox* instance = getInstance(state);
  2632. instance->removeScriptCallback(param1, param2);
  2633. return 0;
  2634. }
  2635. else
  2636. {
  2637. lua_pushstring(state, "lua_CheckBox_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  2638. lua_error(state);
  2639. }
  2640. break;
  2641. }
  2642. default:
  2643. {
  2644. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2645. lua_error(state);
  2646. break;
  2647. }
  2648. }
  2649. return 0;
  2650. }
  2651. int lua_CheckBox_setAlignment(lua_State* state)
  2652. {
  2653. // Get the number of parameters.
  2654. int paramCount = lua_gettop(state);
  2655. // Attempt to match the parameters to a valid binding.
  2656. switch (paramCount)
  2657. {
  2658. case 2:
  2659. {
  2660. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2661. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2662. {
  2663. // Get parameter 1 off the stack.
  2664. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
  2665. CheckBox* instance = getInstance(state);
  2666. instance->setAlignment(param1);
  2667. return 0;
  2668. }
  2669. else
  2670. {
  2671. lua_pushstring(state, "lua_CheckBox_setAlignment - Failed to match the given parameters to a valid function signature.");
  2672. lua_error(state);
  2673. }
  2674. break;
  2675. }
  2676. default:
  2677. {
  2678. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2679. lua_error(state);
  2680. break;
  2681. }
  2682. }
  2683. return 0;
  2684. }
  2685. int lua_CheckBox_setAnimationPropertyValue(lua_State* state)
  2686. {
  2687. // Get the number of parameters.
  2688. int paramCount = lua_gettop(state);
  2689. // Attempt to match the parameters to a valid binding.
  2690. switch (paramCount)
  2691. {
  2692. case 3:
  2693. {
  2694. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2695. lua_type(state, 2) == LUA_TNUMBER &&
  2696. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2697. {
  2698. // Get parameter 1 off the stack.
  2699. int param1 = (int)luaL_checkint(state, 2);
  2700. // Get parameter 2 off the stack.
  2701. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2702. CheckBox* instance = getInstance(state);
  2703. instance->setAnimationPropertyValue(param1, param2);
  2704. return 0;
  2705. }
  2706. else
  2707. {
  2708. lua_pushstring(state, "lua_CheckBox_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2709. lua_error(state);
  2710. }
  2711. break;
  2712. }
  2713. case 4:
  2714. {
  2715. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2716. lua_type(state, 2) == LUA_TNUMBER &&
  2717. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  2718. lua_type(state, 4) == LUA_TNUMBER)
  2719. {
  2720. // Get parameter 1 off the stack.
  2721. int param1 = (int)luaL_checkint(state, 2);
  2722. // Get parameter 2 off the stack.
  2723. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2724. // Get parameter 3 off the stack.
  2725. float param3 = (float)luaL_checknumber(state, 4);
  2726. CheckBox* instance = getInstance(state);
  2727. instance->setAnimationPropertyValue(param1, param2, param3);
  2728. return 0;
  2729. }
  2730. else
  2731. {
  2732. lua_pushstring(state, "lua_CheckBox_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2733. lua_error(state);
  2734. }
  2735. break;
  2736. }
  2737. default:
  2738. {
  2739. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  2740. lua_error(state);
  2741. break;
  2742. }
  2743. }
  2744. return 0;
  2745. }
  2746. int lua_CheckBox_setAutoHeight(lua_State* state)
  2747. {
  2748. // Get the number of parameters.
  2749. int paramCount = lua_gettop(state);
  2750. // Attempt to match the parameters to a valid binding.
  2751. switch (paramCount)
  2752. {
  2753. case 2:
  2754. {
  2755. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2756. lua_type(state, 2) == LUA_TBOOLEAN)
  2757. {
  2758. // Get parameter 1 off the stack.
  2759. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2760. CheckBox* instance = getInstance(state);
  2761. instance->setAutoHeight(param1);
  2762. return 0;
  2763. }
  2764. else
  2765. {
  2766. lua_pushstring(state, "lua_CheckBox_setAutoHeight - Failed to match the given parameters to a valid function signature.");
  2767. lua_error(state);
  2768. }
  2769. break;
  2770. }
  2771. default:
  2772. {
  2773. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2774. lua_error(state);
  2775. break;
  2776. }
  2777. }
  2778. return 0;
  2779. }
  2780. int lua_CheckBox_setAutoWidth(lua_State* state)
  2781. {
  2782. // Get the number of parameters.
  2783. int paramCount = lua_gettop(state);
  2784. // Attempt to match the parameters to a valid binding.
  2785. switch (paramCount)
  2786. {
  2787. case 2:
  2788. {
  2789. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2790. lua_type(state, 2) == LUA_TBOOLEAN)
  2791. {
  2792. // Get parameter 1 off the stack.
  2793. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2794. CheckBox* instance = getInstance(state);
  2795. instance->setAutoWidth(param1);
  2796. return 0;
  2797. }
  2798. else
  2799. {
  2800. lua_pushstring(state, "lua_CheckBox_setAutoWidth - Failed to match the given parameters to a valid function signature.");
  2801. lua_error(state);
  2802. }
  2803. break;
  2804. }
  2805. default:
  2806. {
  2807. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2808. lua_error(state);
  2809. break;
  2810. }
  2811. }
  2812. return 0;
  2813. }
  2814. int lua_CheckBox_setBorder(lua_State* state)
  2815. {
  2816. // Get the number of parameters.
  2817. int paramCount = lua_gettop(state);
  2818. // Attempt to match the parameters to a valid binding.
  2819. switch (paramCount)
  2820. {
  2821. case 5:
  2822. {
  2823. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2824. lua_type(state, 2) == LUA_TNUMBER &&
  2825. lua_type(state, 3) == LUA_TNUMBER &&
  2826. lua_type(state, 4) == LUA_TNUMBER &&
  2827. lua_type(state, 5) == LUA_TNUMBER)
  2828. {
  2829. // Get parameter 1 off the stack.
  2830. float param1 = (float)luaL_checknumber(state, 2);
  2831. // Get parameter 2 off the stack.
  2832. float param2 = (float)luaL_checknumber(state, 3);
  2833. // Get parameter 3 off the stack.
  2834. float param3 = (float)luaL_checknumber(state, 4);
  2835. // Get parameter 4 off the stack.
  2836. float param4 = (float)luaL_checknumber(state, 5);
  2837. CheckBox* instance = getInstance(state);
  2838. instance->setBorder(param1, param2, param3, param4);
  2839. return 0;
  2840. }
  2841. else
  2842. {
  2843. lua_pushstring(state, "lua_CheckBox_setBorder - Failed to match the given parameters to a valid function signature.");
  2844. lua_error(state);
  2845. }
  2846. break;
  2847. }
  2848. case 6:
  2849. {
  2850. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2851. lua_type(state, 2) == LUA_TNUMBER &&
  2852. lua_type(state, 3) == LUA_TNUMBER &&
  2853. lua_type(state, 4) == LUA_TNUMBER &&
  2854. lua_type(state, 5) == LUA_TNUMBER &&
  2855. lua_type(state, 6) == LUA_TNUMBER)
  2856. {
  2857. // Get parameter 1 off the stack.
  2858. float param1 = (float)luaL_checknumber(state, 2);
  2859. // Get parameter 2 off the stack.
  2860. float param2 = (float)luaL_checknumber(state, 3);
  2861. // Get parameter 3 off the stack.
  2862. float param3 = (float)luaL_checknumber(state, 4);
  2863. // Get parameter 4 off the stack.
  2864. float param4 = (float)luaL_checknumber(state, 5);
  2865. // Get parameter 5 off the stack.
  2866. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
  2867. CheckBox* instance = getInstance(state);
  2868. instance->setBorder(param1, param2, param3, param4, param5);
  2869. return 0;
  2870. }
  2871. else
  2872. {
  2873. lua_pushstring(state, "lua_CheckBox_setBorder - Failed to match the given parameters to a valid function signature.");
  2874. lua_error(state);
  2875. }
  2876. break;
  2877. }
  2878. default:
  2879. {
  2880. lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
  2881. lua_error(state);
  2882. break;
  2883. }
  2884. }
  2885. return 0;
  2886. }
  2887. int lua_CheckBox_setBounds(lua_State* state)
  2888. {
  2889. // Get the number of parameters.
  2890. int paramCount = lua_gettop(state);
  2891. // Attempt to match the parameters to a valid binding.
  2892. switch (paramCount)
  2893. {
  2894. case 2:
  2895. {
  2896. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2897. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2898. {
  2899. // Get parameter 1 off the stack.
  2900. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  2901. CheckBox* instance = getInstance(state);
  2902. instance->setBounds(*param1);
  2903. return 0;
  2904. }
  2905. else
  2906. {
  2907. lua_pushstring(state, "lua_CheckBox_setBounds - Failed to match the given parameters to a valid function signature.");
  2908. lua_error(state);
  2909. }
  2910. break;
  2911. }
  2912. default:
  2913. {
  2914. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2915. lua_error(state);
  2916. break;
  2917. }
  2918. }
  2919. return 0;
  2920. }
  2921. int lua_CheckBox_setChecked(lua_State* state)
  2922. {
  2923. // Get the number of parameters.
  2924. int paramCount = lua_gettop(state);
  2925. // Attempt to match the parameters to a valid binding.
  2926. switch (paramCount)
  2927. {
  2928. case 2:
  2929. {
  2930. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2931. lua_type(state, 2) == LUA_TBOOLEAN)
  2932. {
  2933. // Get parameter 1 off the stack.
  2934. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2935. CheckBox* instance = getInstance(state);
  2936. instance->setChecked(param1);
  2937. return 0;
  2938. }
  2939. else
  2940. {
  2941. lua_pushstring(state, "lua_CheckBox_setChecked - Failed to match the given parameters to a valid function signature.");
  2942. lua_error(state);
  2943. }
  2944. break;
  2945. }
  2946. default:
  2947. {
  2948. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2949. lua_error(state);
  2950. break;
  2951. }
  2952. }
  2953. return 0;
  2954. }
  2955. int lua_CheckBox_setConsumeInputEvents(lua_State* state)
  2956. {
  2957. // Get the number of parameters.
  2958. int paramCount = lua_gettop(state);
  2959. // Attempt to match the parameters to a valid binding.
  2960. switch (paramCount)
  2961. {
  2962. case 2:
  2963. {
  2964. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2965. lua_type(state, 2) == LUA_TBOOLEAN)
  2966. {
  2967. // Get parameter 1 off the stack.
  2968. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2969. CheckBox* instance = getInstance(state);
  2970. instance->setConsumeInputEvents(param1);
  2971. return 0;
  2972. }
  2973. else
  2974. {
  2975. lua_pushstring(state, "lua_CheckBox_setConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  2976. lua_error(state);
  2977. }
  2978. break;
  2979. }
  2980. default:
  2981. {
  2982. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2983. lua_error(state);
  2984. break;
  2985. }
  2986. }
  2987. return 0;
  2988. }
  2989. int lua_CheckBox_setCursorColor(lua_State* state)
  2990. {
  2991. // Get the number of parameters.
  2992. int paramCount = lua_gettop(state);
  2993. // Attempt to match the parameters to a valid binding.
  2994. switch (paramCount)
  2995. {
  2996. case 3:
  2997. {
  2998. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2999. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3000. lua_type(state, 3) == LUA_TNUMBER)
  3001. {
  3002. // Get parameter 1 off the stack.
  3003. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3004. // Get parameter 2 off the stack.
  3005. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3006. CheckBox* instance = getInstance(state);
  3007. instance->setCursorColor(*param1, param2);
  3008. return 0;
  3009. }
  3010. else
  3011. {
  3012. lua_pushstring(state, "lua_CheckBox_setCursorColor - Failed to match the given parameters to a valid function signature.");
  3013. lua_error(state);
  3014. }
  3015. break;
  3016. }
  3017. default:
  3018. {
  3019. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3020. lua_error(state);
  3021. break;
  3022. }
  3023. }
  3024. return 0;
  3025. }
  3026. int lua_CheckBox_setCursorRegion(lua_State* state)
  3027. {
  3028. // Get the number of parameters.
  3029. int paramCount = lua_gettop(state);
  3030. // Attempt to match the parameters to a valid binding.
  3031. switch (paramCount)
  3032. {
  3033. case 3:
  3034. {
  3035. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3036. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3037. lua_type(state, 3) == LUA_TNUMBER)
  3038. {
  3039. // Get parameter 1 off the stack.
  3040. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3041. // Get parameter 2 off the stack.
  3042. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3043. CheckBox* instance = getInstance(state);
  3044. instance->setCursorRegion(*param1, param2);
  3045. return 0;
  3046. }
  3047. else
  3048. {
  3049. lua_pushstring(state, "lua_CheckBox_setCursorRegion - Failed to match the given parameters to a valid function signature.");
  3050. lua_error(state);
  3051. }
  3052. break;
  3053. }
  3054. default:
  3055. {
  3056. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3057. lua_error(state);
  3058. break;
  3059. }
  3060. }
  3061. return 0;
  3062. }
  3063. int lua_CheckBox_setFocusIndex(lua_State* state)
  3064. {
  3065. // Get the number of parameters.
  3066. int paramCount = lua_gettop(state);
  3067. // Attempt to match the parameters to a valid binding.
  3068. switch (paramCount)
  3069. {
  3070. case 2:
  3071. {
  3072. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3073. lua_type(state, 2) == LUA_TNUMBER)
  3074. {
  3075. // Get parameter 1 off the stack.
  3076. int param1 = (int)luaL_checkint(state, 2);
  3077. CheckBox* instance = getInstance(state);
  3078. instance->setFocusIndex(param1);
  3079. return 0;
  3080. }
  3081. else
  3082. {
  3083. lua_pushstring(state, "lua_CheckBox_setFocusIndex - Failed to match the given parameters to a valid function signature.");
  3084. lua_error(state);
  3085. }
  3086. break;
  3087. }
  3088. default:
  3089. {
  3090. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3091. lua_error(state);
  3092. break;
  3093. }
  3094. }
  3095. return 0;
  3096. }
  3097. int lua_CheckBox_setFont(lua_State* state)
  3098. {
  3099. // Get the number of parameters.
  3100. int paramCount = lua_gettop(state);
  3101. // Attempt to match the parameters to a valid binding.
  3102. switch (paramCount)
  3103. {
  3104. case 2:
  3105. {
  3106. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3107. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3108. {
  3109. // Get parameter 1 off the stack.
  3110. ScriptUtil::LuaArray<Font> param1 = ScriptUtil::getObjectPointer<Font>(2, "Font", false);
  3111. CheckBox* instance = getInstance(state);
  3112. instance->setFont(param1);
  3113. return 0;
  3114. }
  3115. else
  3116. {
  3117. lua_pushstring(state, "lua_CheckBox_setFont - Failed to match the given parameters to a valid function signature.");
  3118. lua_error(state);
  3119. }
  3120. break;
  3121. }
  3122. case 3:
  3123. {
  3124. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3125. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  3126. lua_type(state, 3) == LUA_TNUMBER)
  3127. {
  3128. // Get parameter 1 off the stack.
  3129. ScriptUtil::LuaArray<Font> param1 = ScriptUtil::getObjectPointer<Font>(2, "Font", false);
  3130. // Get parameter 2 off the stack.
  3131. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3132. CheckBox* instance = getInstance(state);
  3133. instance->setFont(param1, param2);
  3134. return 0;
  3135. }
  3136. else
  3137. {
  3138. lua_pushstring(state, "lua_CheckBox_setFont - Failed to match the given parameters to a valid function signature.");
  3139. lua_error(state);
  3140. }
  3141. break;
  3142. }
  3143. default:
  3144. {
  3145. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3146. lua_error(state);
  3147. break;
  3148. }
  3149. }
  3150. return 0;
  3151. }
  3152. int lua_CheckBox_setFontSize(lua_State* state)
  3153. {
  3154. // Get the number of parameters.
  3155. int paramCount = lua_gettop(state);
  3156. // Attempt to match the parameters to a valid binding.
  3157. switch (paramCount)
  3158. {
  3159. case 2:
  3160. {
  3161. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3162. lua_type(state, 2) == LUA_TNUMBER)
  3163. {
  3164. // Get parameter 1 off the stack.
  3165. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3166. CheckBox* instance = getInstance(state);
  3167. instance->setFontSize(param1);
  3168. return 0;
  3169. }
  3170. else
  3171. {
  3172. lua_pushstring(state, "lua_CheckBox_setFontSize - Failed to match the given parameters to a valid function signature.");
  3173. lua_error(state);
  3174. }
  3175. break;
  3176. }
  3177. case 3:
  3178. {
  3179. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3180. lua_type(state, 2) == LUA_TNUMBER &&
  3181. lua_type(state, 3) == LUA_TNUMBER)
  3182. {
  3183. // Get parameter 1 off the stack.
  3184. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3185. // Get parameter 2 off the stack.
  3186. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3187. CheckBox* instance = getInstance(state);
  3188. instance->setFontSize(param1, param2);
  3189. return 0;
  3190. }
  3191. else
  3192. {
  3193. lua_pushstring(state, "lua_CheckBox_setFontSize - Failed to match the given parameters to a valid function signature.");
  3194. lua_error(state);
  3195. }
  3196. break;
  3197. }
  3198. default:
  3199. {
  3200. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3201. lua_error(state);
  3202. break;
  3203. }
  3204. }
  3205. return 0;
  3206. }
  3207. int lua_CheckBox_setHeight(lua_State* state)
  3208. {
  3209. // Get the number of parameters.
  3210. int paramCount = lua_gettop(state);
  3211. // Attempt to match the parameters to a valid binding.
  3212. switch (paramCount)
  3213. {
  3214. case 2:
  3215. {
  3216. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3217. lua_type(state, 2) == LUA_TNUMBER)
  3218. {
  3219. // Get parameter 1 off the stack.
  3220. float param1 = (float)luaL_checknumber(state, 2);
  3221. CheckBox* instance = getInstance(state);
  3222. instance->setHeight(param1);
  3223. return 0;
  3224. }
  3225. else
  3226. {
  3227. lua_pushstring(state, "lua_CheckBox_setHeight - Failed to match the given parameters to a valid function signature.");
  3228. lua_error(state);
  3229. }
  3230. break;
  3231. }
  3232. default:
  3233. {
  3234. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3235. lua_error(state);
  3236. break;
  3237. }
  3238. }
  3239. return 0;
  3240. }
  3241. int lua_CheckBox_setImageColor(lua_State* state)
  3242. {
  3243. // Get the number of parameters.
  3244. int paramCount = lua_gettop(state);
  3245. // Attempt to match the parameters to a valid binding.
  3246. switch (paramCount)
  3247. {
  3248. case 3:
  3249. {
  3250. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3251. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3252. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3253. {
  3254. // Get parameter 1 off the stack.
  3255. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3256. // Get parameter 2 off the stack.
  3257. ScriptUtil::LuaArray<Vector4> param2 = ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true);
  3258. CheckBox* instance = getInstance(state);
  3259. instance->setImageColor(param1, *param2);
  3260. return 0;
  3261. }
  3262. else
  3263. {
  3264. lua_pushstring(state, "lua_CheckBox_setImageColor - Failed to match the given parameters to a valid function signature.");
  3265. lua_error(state);
  3266. }
  3267. break;
  3268. }
  3269. case 4:
  3270. {
  3271. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3272. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3273. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3274. lua_type(state, 4) == LUA_TNUMBER)
  3275. {
  3276. // Get parameter 1 off the stack.
  3277. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3278. // Get parameter 2 off the stack.
  3279. ScriptUtil::LuaArray<Vector4> param2 = ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true);
  3280. // Get parameter 3 off the stack.
  3281. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3282. CheckBox* instance = getInstance(state);
  3283. instance->setImageColor(param1, *param2, param3);
  3284. return 0;
  3285. }
  3286. else
  3287. {
  3288. lua_pushstring(state, "lua_CheckBox_setImageColor - Failed to match the given parameters to a valid function signature.");
  3289. lua_error(state);
  3290. }
  3291. break;
  3292. }
  3293. default:
  3294. {
  3295. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3296. lua_error(state);
  3297. break;
  3298. }
  3299. }
  3300. return 0;
  3301. }
  3302. int lua_CheckBox_setImageRegion(lua_State* state)
  3303. {
  3304. // Get the number of parameters.
  3305. int paramCount = lua_gettop(state);
  3306. // Attempt to match the parameters to a valid binding.
  3307. switch (paramCount)
  3308. {
  3309. case 3:
  3310. {
  3311. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3312. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3313. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3314. {
  3315. // Get parameter 1 off the stack.
  3316. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3317. // Get parameter 2 off the stack.
  3318. ScriptUtil::LuaArray<Rectangle> param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
  3319. CheckBox* instance = getInstance(state);
  3320. instance->setImageRegion(param1, *param2);
  3321. return 0;
  3322. }
  3323. else
  3324. {
  3325. lua_pushstring(state, "lua_CheckBox_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3326. lua_error(state);
  3327. }
  3328. break;
  3329. }
  3330. case 4:
  3331. {
  3332. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3333. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3334. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3335. lua_type(state, 4) == LUA_TNUMBER)
  3336. {
  3337. // Get parameter 1 off the stack.
  3338. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3339. // Get parameter 2 off the stack.
  3340. ScriptUtil::LuaArray<Rectangle> param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
  3341. // Get parameter 3 off the stack.
  3342. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3343. CheckBox* instance = getInstance(state);
  3344. instance->setImageRegion(param1, *param2, param3);
  3345. return 0;
  3346. }
  3347. else
  3348. {
  3349. lua_pushstring(state, "lua_CheckBox_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3350. lua_error(state);
  3351. }
  3352. break;
  3353. }
  3354. default:
  3355. {
  3356. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3357. lua_error(state);
  3358. break;
  3359. }
  3360. }
  3361. return 0;
  3362. }
  3363. int lua_CheckBox_setImageSize(lua_State* state)
  3364. {
  3365. // Get the number of parameters.
  3366. int paramCount = lua_gettop(state);
  3367. // Attempt to match the parameters to a valid binding.
  3368. switch (paramCount)
  3369. {
  3370. case 3:
  3371. {
  3372. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3373. lua_type(state, 2) == LUA_TNUMBER &&
  3374. lua_type(state, 3) == LUA_TNUMBER)
  3375. {
  3376. // Get parameter 1 off the stack.
  3377. float param1 = (float)luaL_checknumber(state, 2);
  3378. // Get parameter 2 off the stack.
  3379. float param2 = (float)luaL_checknumber(state, 3);
  3380. CheckBox* instance = getInstance(state);
  3381. instance->setImageSize(param1, param2);
  3382. return 0;
  3383. }
  3384. else
  3385. {
  3386. lua_pushstring(state, "lua_CheckBox_setImageSize - Failed to match the given parameters to a valid function signature.");
  3387. lua_error(state);
  3388. }
  3389. break;
  3390. }
  3391. default:
  3392. {
  3393. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3394. lua_error(state);
  3395. break;
  3396. }
  3397. }
  3398. return 0;
  3399. }
  3400. int lua_CheckBox_setMargin(lua_State* state)
  3401. {
  3402. // Get the number of parameters.
  3403. int paramCount = lua_gettop(state);
  3404. // Attempt to match the parameters to a valid binding.
  3405. switch (paramCount)
  3406. {
  3407. case 5:
  3408. {
  3409. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3410. lua_type(state, 2) == LUA_TNUMBER &&
  3411. lua_type(state, 3) == LUA_TNUMBER &&
  3412. lua_type(state, 4) == LUA_TNUMBER &&
  3413. lua_type(state, 5) == LUA_TNUMBER)
  3414. {
  3415. // Get parameter 1 off the stack.
  3416. float param1 = (float)luaL_checknumber(state, 2);
  3417. // Get parameter 2 off the stack.
  3418. float param2 = (float)luaL_checknumber(state, 3);
  3419. // Get parameter 3 off the stack.
  3420. float param3 = (float)luaL_checknumber(state, 4);
  3421. // Get parameter 4 off the stack.
  3422. float param4 = (float)luaL_checknumber(state, 5);
  3423. CheckBox* instance = getInstance(state);
  3424. instance->setMargin(param1, param2, param3, param4);
  3425. return 0;
  3426. }
  3427. else
  3428. {
  3429. lua_pushstring(state, "lua_CheckBox_setMargin - Failed to match the given parameters to a valid function signature.");
  3430. lua_error(state);
  3431. }
  3432. break;
  3433. }
  3434. default:
  3435. {
  3436. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3437. lua_error(state);
  3438. break;
  3439. }
  3440. }
  3441. return 0;
  3442. }
  3443. int lua_CheckBox_setOpacity(lua_State* state)
  3444. {
  3445. // Get the number of parameters.
  3446. int paramCount = lua_gettop(state);
  3447. // Attempt to match the parameters to a valid binding.
  3448. switch (paramCount)
  3449. {
  3450. case 2:
  3451. {
  3452. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3453. lua_type(state, 2) == LUA_TNUMBER)
  3454. {
  3455. // Get parameter 1 off the stack.
  3456. float param1 = (float)luaL_checknumber(state, 2);
  3457. CheckBox* instance = getInstance(state);
  3458. instance->setOpacity(param1);
  3459. return 0;
  3460. }
  3461. else
  3462. {
  3463. lua_pushstring(state, "lua_CheckBox_setOpacity - Failed to match the given parameters to a valid function signature.");
  3464. lua_error(state);
  3465. }
  3466. break;
  3467. }
  3468. case 3:
  3469. {
  3470. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3471. lua_type(state, 2) == LUA_TNUMBER &&
  3472. lua_type(state, 3) == LUA_TNUMBER)
  3473. {
  3474. // Get parameter 1 off the stack.
  3475. float param1 = (float)luaL_checknumber(state, 2);
  3476. // Get parameter 2 off the stack.
  3477. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3478. CheckBox* instance = getInstance(state);
  3479. instance->setOpacity(param1, param2);
  3480. return 0;
  3481. }
  3482. else
  3483. {
  3484. lua_pushstring(state, "lua_CheckBox_setOpacity - Failed to match the given parameters to a valid function signature.");
  3485. lua_error(state);
  3486. }
  3487. break;
  3488. }
  3489. default:
  3490. {
  3491. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3492. lua_error(state);
  3493. break;
  3494. }
  3495. }
  3496. return 0;
  3497. }
  3498. int lua_CheckBox_setPadding(lua_State* state)
  3499. {
  3500. // Get the number of parameters.
  3501. int paramCount = lua_gettop(state);
  3502. // Attempt to match the parameters to a valid binding.
  3503. switch (paramCount)
  3504. {
  3505. case 5:
  3506. {
  3507. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3508. lua_type(state, 2) == LUA_TNUMBER &&
  3509. lua_type(state, 3) == LUA_TNUMBER &&
  3510. lua_type(state, 4) == LUA_TNUMBER &&
  3511. lua_type(state, 5) == LUA_TNUMBER)
  3512. {
  3513. // Get parameter 1 off the stack.
  3514. float param1 = (float)luaL_checknumber(state, 2);
  3515. // Get parameter 2 off the stack.
  3516. float param2 = (float)luaL_checknumber(state, 3);
  3517. // Get parameter 3 off the stack.
  3518. float param3 = (float)luaL_checknumber(state, 4);
  3519. // Get parameter 4 off the stack.
  3520. float param4 = (float)luaL_checknumber(state, 5);
  3521. CheckBox* instance = getInstance(state);
  3522. instance->setPadding(param1, param2, param3, param4);
  3523. return 0;
  3524. }
  3525. else
  3526. {
  3527. lua_pushstring(state, "lua_CheckBox_setPadding - Failed to match the given parameters to a valid function signature.");
  3528. lua_error(state);
  3529. }
  3530. break;
  3531. }
  3532. default:
  3533. {
  3534. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3535. lua_error(state);
  3536. break;
  3537. }
  3538. }
  3539. return 0;
  3540. }
  3541. int lua_CheckBox_setPosition(lua_State* state)
  3542. {
  3543. // Get the number of parameters.
  3544. int paramCount = lua_gettop(state);
  3545. // Attempt to match the parameters to a valid binding.
  3546. switch (paramCount)
  3547. {
  3548. case 3:
  3549. {
  3550. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3551. lua_type(state, 2) == LUA_TNUMBER &&
  3552. lua_type(state, 3) == LUA_TNUMBER)
  3553. {
  3554. // Get parameter 1 off the stack.
  3555. float param1 = (float)luaL_checknumber(state, 2);
  3556. // Get parameter 2 off the stack.
  3557. float param2 = (float)luaL_checknumber(state, 3);
  3558. CheckBox* instance = getInstance(state);
  3559. instance->setPosition(param1, param2);
  3560. return 0;
  3561. }
  3562. else
  3563. {
  3564. lua_pushstring(state, "lua_CheckBox_setPosition - Failed to match the given parameters to a valid function signature.");
  3565. lua_error(state);
  3566. }
  3567. break;
  3568. }
  3569. default:
  3570. {
  3571. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3572. lua_error(state);
  3573. break;
  3574. }
  3575. }
  3576. return 0;
  3577. }
  3578. int lua_CheckBox_setSize(lua_State* state)
  3579. {
  3580. // Get the number of parameters.
  3581. int paramCount = lua_gettop(state);
  3582. // Attempt to match the parameters to a valid binding.
  3583. switch (paramCount)
  3584. {
  3585. case 3:
  3586. {
  3587. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3588. lua_type(state, 2) == LUA_TNUMBER &&
  3589. lua_type(state, 3) == LUA_TNUMBER)
  3590. {
  3591. // Get parameter 1 off the stack.
  3592. float param1 = (float)luaL_checknumber(state, 2);
  3593. // Get parameter 2 off the stack.
  3594. float param2 = (float)luaL_checknumber(state, 3);
  3595. CheckBox* instance = getInstance(state);
  3596. instance->setSize(param1, param2);
  3597. return 0;
  3598. }
  3599. else
  3600. {
  3601. lua_pushstring(state, "lua_CheckBox_setSize - Failed to match the given parameters to a valid function signature.");
  3602. lua_error(state);
  3603. }
  3604. break;
  3605. }
  3606. default:
  3607. {
  3608. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3609. lua_error(state);
  3610. break;
  3611. }
  3612. }
  3613. return 0;
  3614. }
  3615. int lua_CheckBox_setSkinColor(lua_State* state)
  3616. {
  3617. // Get the number of parameters.
  3618. int paramCount = lua_gettop(state);
  3619. // Attempt to match the parameters to a valid binding.
  3620. switch (paramCount)
  3621. {
  3622. case 2:
  3623. {
  3624. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3625. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3626. {
  3627. // Get parameter 1 off the stack.
  3628. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3629. CheckBox* instance = getInstance(state);
  3630. instance->setSkinColor(*param1);
  3631. return 0;
  3632. }
  3633. else
  3634. {
  3635. lua_pushstring(state, "lua_CheckBox_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3636. lua_error(state);
  3637. }
  3638. break;
  3639. }
  3640. case 3:
  3641. {
  3642. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3643. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3644. lua_type(state, 3) == LUA_TNUMBER)
  3645. {
  3646. // Get parameter 1 off the stack.
  3647. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3648. // Get parameter 2 off the stack.
  3649. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3650. CheckBox* instance = getInstance(state);
  3651. instance->setSkinColor(*param1, param2);
  3652. return 0;
  3653. }
  3654. else
  3655. {
  3656. lua_pushstring(state, "lua_CheckBox_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3657. lua_error(state);
  3658. }
  3659. break;
  3660. }
  3661. default:
  3662. {
  3663. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3664. lua_error(state);
  3665. break;
  3666. }
  3667. }
  3668. return 0;
  3669. }
  3670. int lua_CheckBox_setSkinRegion(lua_State* state)
  3671. {
  3672. // Get the number of parameters.
  3673. int paramCount = lua_gettop(state);
  3674. // Attempt to match the parameters to a valid binding.
  3675. switch (paramCount)
  3676. {
  3677. case 2:
  3678. {
  3679. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3680. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3681. {
  3682. // Get parameter 1 off the stack.
  3683. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3684. CheckBox* instance = getInstance(state);
  3685. instance->setSkinRegion(*param1);
  3686. return 0;
  3687. }
  3688. else
  3689. {
  3690. lua_pushstring(state, "lua_CheckBox_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  3691. lua_error(state);
  3692. }
  3693. break;
  3694. }
  3695. case 3:
  3696. {
  3697. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3698. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3699. lua_type(state, 3) == LUA_TNUMBER)
  3700. {
  3701. // Get parameter 1 off the stack.
  3702. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3703. // Get parameter 2 off the stack.
  3704. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3705. CheckBox* instance = getInstance(state);
  3706. instance->setSkinRegion(*param1, param2);
  3707. return 0;
  3708. }
  3709. else
  3710. {
  3711. lua_pushstring(state, "lua_CheckBox_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  3712. lua_error(state);
  3713. }
  3714. break;
  3715. }
  3716. default:
  3717. {
  3718. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3719. lua_error(state);
  3720. break;
  3721. }
  3722. }
  3723. return 0;
  3724. }
  3725. int lua_CheckBox_setState(lua_State* state)
  3726. {
  3727. // Get the number of parameters.
  3728. int paramCount = lua_gettop(state);
  3729. // Attempt to match the parameters to a valid binding.
  3730. switch (paramCount)
  3731. {
  3732. case 2:
  3733. {
  3734. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3735. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3736. {
  3737. // Get parameter 1 off the stack.
  3738. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  3739. CheckBox* instance = getInstance(state);
  3740. instance->setState(param1);
  3741. return 0;
  3742. }
  3743. else
  3744. {
  3745. lua_pushstring(state, "lua_CheckBox_setState - Failed to match the given parameters to a valid function signature.");
  3746. lua_error(state);
  3747. }
  3748. break;
  3749. }
  3750. default:
  3751. {
  3752. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3753. lua_error(state);
  3754. break;
  3755. }
  3756. }
  3757. return 0;
  3758. }
  3759. int lua_CheckBox_setStyle(lua_State* state)
  3760. {
  3761. // Get the number of parameters.
  3762. int paramCount = lua_gettop(state);
  3763. // Attempt to match the parameters to a valid binding.
  3764. switch (paramCount)
  3765. {
  3766. case 2:
  3767. {
  3768. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3769. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3770. {
  3771. // Get parameter 1 off the stack.
  3772. ScriptUtil::LuaArray<Theme::Style> param1 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  3773. CheckBox* instance = getInstance(state);
  3774. instance->setStyle(param1);
  3775. return 0;
  3776. }
  3777. else
  3778. {
  3779. lua_pushstring(state, "lua_CheckBox_setStyle - Failed to match the given parameters to a valid function signature.");
  3780. lua_error(state);
  3781. }
  3782. break;
  3783. }
  3784. default:
  3785. {
  3786. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3787. lua_error(state);
  3788. break;
  3789. }
  3790. }
  3791. return 0;
  3792. }
  3793. int lua_CheckBox_setText(lua_State* state)
  3794. {
  3795. // Get the number of parameters.
  3796. int paramCount = lua_gettop(state);
  3797. // Attempt to match the parameters to a valid binding.
  3798. switch (paramCount)
  3799. {
  3800. case 2:
  3801. {
  3802. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3803. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3804. {
  3805. // Get parameter 1 off the stack.
  3806. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3807. CheckBox* instance = getInstance(state);
  3808. instance->setText(param1);
  3809. return 0;
  3810. }
  3811. else
  3812. {
  3813. lua_pushstring(state, "lua_CheckBox_setText - Failed to match the given parameters to a valid function signature.");
  3814. lua_error(state);
  3815. }
  3816. break;
  3817. }
  3818. default:
  3819. {
  3820. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3821. lua_error(state);
  3822. break;
  3823. }
  3824. }
  3825. return 0;
  3826. }
  3827. int lua_CheckBox_setTextAlignment(lua_State* state)
  3828. {
  3829. // Get the number of parameters.
  3830. int paramCount = lua_gettop(state);
  3831. // Attempt to match the parameters to a valid binding.
  3832. switch (paramCount)
  3833. {
  3834. case 2:
  3835. {
  3836. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3837. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3838. {
  3839. // Get parameter 1 off the stack.
  3840. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  3841. CheckBox* instance = getInstance(state);
  3842. instance->setTextAlignment(param1);
  3843. return 0;
  3844. }
  3845. else
  3846. {
  3847. lua_pushstring(state, "lua_CheckBox_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  3848. lua_error(state);
  3849. }
  3850. break;
  3851. }
  3852. case 3:
  3853. {
  3854. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3855. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3856. lua_type(state, 3) == LUA_TNUMBER)
  3857. {
  3858. // Get parameter 1 off the stack.
  3859. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  3860. // Get parameter 2 off the stack.
  3861. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3862. CheckBox* instance = getInstance(state);
  3863. instance->setTextAlignment(param1, param2);
  3864. return 0;
  3865. }
  3866. else
  3867. {
  3868. lua_pushstring(state, "lua_CheckBox_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  3869. lua_error(state);
  3870. }
  3871. break;
  3872. }
  3873. default:
  3874. {
  3875. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3876. lua_error(state);
  3877. break;
  3878. }
  3879. }
  3880. return 0;
  3881. }
  3882. int lua_CheckBox_setTextColor(lua_State* state)
  3883. {
  3884. // Get the number of parameters.
  3885. int paramCount = lua_gettop(state);
  3886. // Attempt to match the parameters to a valid binding.
  3887. switch (paramCount)
  3888. {
  3889. case 2:
  3890. {
  3891. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3892. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3893. {
  3894. // Get parameter 1 off the stack.
  3895. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3896. CheckBox* instance = getInstance(state);
  3897. instance->setTextColor(*param1);
  3898. return 0;
  3899. }
  3900. else
  3901. {
  3902. lua_pushstring(state, "lua_CheckBox_setTextColor - Failed to match the given parameters to a valid function signature.");
  3903. lua_error(state);
  3904. }
  3905. break;
  3906. }
  3907. case 3:
  3908. {
  3909. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3910. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3911. lua_type(state, 3) == LUA_TNUMBER)
  3912. {
  3913. // Get parameter 1 off the stack.
  3914. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3915. // Get parameter 2 off the stack.
  3916. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3917. CheckBox* instance = getInstance(state);
  3918. instance->setTextColor(*param1, param2);
  3919. return 0;
  3920. }
  3921. else
  3922. {
  3923. lua_pushstring(state, "lua_CheckBox_setTextColor - Failed to match the given parameters to a valid function signature.");
  3924. lua_error(state);
  3925. }
  3926. break;
  3927. }
  3928. default:
  3929. {
  3930. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3931. lua_error(state);
  3932. break;
  3933. }
  3934. }
  3935. return 0;
  3936. }
  3937. int lua_CheckBox_setTextRightToLeft(lua_State* state)
  3938. {
  3939. // Get the number of parameters.
  3940. int paramCount = lua_gettop(state);
  3941. // Attempt to match the parameters to a valid binding.
  3942. switch (paramCount)
  3943. {
  3944. case 2:
  3945. {
  3946. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3947. lua_type(state, 2) == LUA_TBOOLEAN)
  3948. {
  3949. // Get parameter 1 off the stack.
  3950. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3951. CheckBox* instance = getInstance(state);
  3952. instance->setTextRightToLeft(param1);
  3953. return 0;
  3954. }
  3955. else
  3956. {
  3957. lua_pushstring(state, "lua_CheckBox_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  3958. lua_error(state);
  3959. }
  3960. break;
  3961. }
  3962. case 3:
  3963. {
  3964. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3965. lua_type(state, 2) == LUA_TBOOLEAN &&
  3966. lua_type(state, 3) == LUA_TNUMBER)
  3967. {
  3968. // Get parameter 1 off the stack.
  3969. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3970. // Get parameter 2 off the stack.
  3971. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3972. CheckBox* instance = getInstance(state);
  3973. instance->setTextRightToLeft(param1, param2);
  3974. return 0;
  3975. }
  3976. else
  3977. {
  3978. lua_pushstring(state, "lua_CheckBox_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  3979. lua_error(state);
  3980. }
  3981. break;
  3982. }
  3983. default:
  3984. {
  3985. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3986. lua_error(state);
  3987. break;
  3988. }
  3989. }
  3990. return 0;
  3991. }
  3992. int lua_CheckBox_setWidth(lua_State* state)
  3993. {
  3994. // Get the number of parameters.
  3995. int paramCount = lua_gettop(state);
  3996. // Attempt to match the parameters to a valid binding.
  3997. switch (paramCount)
  3998. {
  3999. case 2:
  4000. {
  4001. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4002. lua_type(state, 2) == LUA_TNUMBER)
  4003. {
  4004. // Get parameter 1 off the stack.
  4005. float param1 = (float)luaL_checknumber(state, 2);
  4006. CheckBox* instance = getInstance(state);
  4007. instance->setWidth(param1);
  4008. return 0;
  4009. }
  4010. else
  4011. {
  4012. lua_pushstring(state, "lua_CheckBox_setWidth - Failed to match the given parameters to a valid function signature.");
  4013. lua_error(state);
  4014. }
  4015. break;
  4016. }
  4017. default:
  4018. {
  4019. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4020. lua_error(state);
  4021. break;
  4022. }
  4023. }
  4024. return 0;
  4025. }
  4026. int lua_CheckBox_setZIndex(lua_State* state)
  4027. {
  4028. // Get the number of parameters.
  4029. int paramCount = lua_gettop(state);
  4030. // Attempt to match the parameters to a valid binding.
  4031. switch (paramCount)
  4032. {
  4033. case 2:
  4034. {
  4035. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4036. lua_type(state, 2) == LUA_TNUMBER)
  4037. {
  4038. // Get parameter 1 off the stack.
  4039. int param1 = (int)luaL_checkint(state, 2);
  4040. CheckBox* instance = getInstance(state);
  4041. instance->setZIndex(param1);
  4042. return 0;
  4043. }
  4044. else
  4045. {
  4046. lua_pushstring(state, "lua_CheckBox_setZIndex - Failed to match the given parameters to a valid function signature.");
  4047. lua_error(state);
  4048. }
  4049. break;
  4050. }
  4051. default:
  4052. {
  4053. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4054. lua_error(state);
  4055. break;
  4056. }
  4057. }
  4058. return 0;
  4059. }
  4060. int lua_CheckBox_static_ANIMATE_OPACITY(lua_State* state)
  4061. {
  4062. // Validate the number of parameters.
  4063. if (lua_gettop(state) > 0)
  4064. {
  4065. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4066. lua_error(state);
  4067. }
  4068. int result = CheckBox::ANIMATE_OPACITY;
  4069. // Push the return value onto the stack.
  4070. lua_pushinteger(state, result);
  4071. return 1;
  4072. }
  4073. int lua_CheckBox_static_ANIMATE_POSITION(lua_State* state)
  4074. {
  4075. // Validate the number of parameters.
  4076. if (lua_gettop(state) > 0)
  4077. {
  4078. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4079. lua_error(state);
  4080. }
  4081. int result = CheckBox::ANIMATE_POSITION;
  4082. // Push the return value onto the stack.
  4083. lua_pushinteger(state, result);
  4084. return 1;
  4085. }
  4086. int lua_CheckBox_static_ANIMATE_POSITION_X(lua_State* state)
  4087. {
  4088. // Validate the number of parameters.
  4089. if (lua_gettop(state) > 0)
  4090. {
  4091. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4092. lua_error(state);
  4093. }
  4094. int result = CheckBox::ANIMATE_POSITION_X;
  4095. // Push the return value onto the stack.
  4096. lua_pushinteger(state, result);
  4097. return 1;
  4098. }
  4099. int lua_CheckBox_static_ANIMATE_POSITION_Y(lua_State* state)
  4100. {
  4101. // Validate the number of parameters.
  4102. if (lua_gettop(state) > 0)
  4103. {
  4104. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4105. lua_error(state);
  4106. }
  4107. int result = CheckBox::ANIMATE_POSITION_Y;
  4108. // Push the return value onto the stack.
  4109. lua_pushinteger(state, result);
  4110. return 1;
  4111. }
  4112. int lua_CheckBox_static_ANIMATE_SIZE(lua_State* state)
  4113. {
  4114. // Validate the number of parameters.
  4115. if (lua_gettop(state) > 0)
  4116. {
  4117. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4118. lua_error(state);
  4119. }
  4120. int result = CheckBox::ANIMATE_SIZE;
  4121. // Push the return value onto the stack.
  4122. lua_pushinteger(state, result);
  4123. return 1;
  4124. }
  4125. int lua_CheckBox_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
  4126. {
  4127. // Validate the number of parameters.
  4128. if (lua_gettop(state) > 0)
  4129. {
  4130. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4131. lua_error(state);
  4132. }
  4133. int result = CheckBox::ANIMATE_SIZE_HEIGHT;
  4134. // Push the return value onto the stack.
  4135. lua_pushinteger(state, result);
  4136. return 1;
  4137. }
  4138. int lua_CheckBox_static_ANIMATE_SIZE_WIDTH(lua_State* state)
  4139. {
  4140. // Validate the number of parameters.
  4141. if (lua_gettop(state) > 0)
  4142. {
  4143. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4144. lua_error(state);
  4145. }
  4146. int result = CheckBox::ANIMATE_SIZE_WIDTH;
  4147. // Push the return value onto the stack.
  4148. lua_pushinteger(state, result);
  4149. return 1;
  4150. }
  4151. int lua_CheckBox_static_create(lua_State* state)
  4152. {
  4153. // Get the number of parameters.
  4154. int paramCount = lua_gettop(state);
  4155. // Attempt to match the parameters to a valid binding.
  4156. switch (paramCount)
  4157. {
  4158. case 2:
  4159. {
  4160. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  4161. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4162. {
  4163. // Get parameter 1 off the stack.
  4164. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(1, false);
  4165. // Get parameter 2 off the stack.
  4166. ScriptUtil::LuaArray<Theme::Style> param2 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  4167. void* returnPtr = (void*)CheckBox::create(param1, param2);
  4168. if (returnPtr)
  4169. {
  4170. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4171. object->instance = returnPtr;
  4172. object->owns = true;
  4173. luaL_getmetatable(state, "CheckBox");
  4174. lua_setmetatable(state, -2);
  4175. }
  4176. else
  4177. {
  4178. lua_pushnil(state);
  4179. }
  4180. return 1;
  4181. }
  4182. else
  4183. {
  4184. lua_pushstring(state, "lua_CheckBox_static_create - Failed to match the given parameters to a valid function signature.");
  4185. lua_error(state);
  4186. }
  4187. break;
  4188. }
  4189. default:
  4190. {
  4191. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4192. lua_error(state);
  4193. break;
  4194. }
  4195. }
  4196. return 0;
  4197. }
  4198. }