lua_Container.cpp 160 KB

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