lua_Container.cpp 168 KB

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