lua_Container.cpp 156 KB

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