lua_Container.cpp 157 KB

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