lua_CheckBox.cpp 149 KB

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