lua_Form.cpp 169 KB

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