lua_Form.cpp 173 KB

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