lua_Container.cpp 163 KB

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