lua_Form.cpp 183 KB

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