lua_Slider.cpp 155 KB

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