lua_Slider.cpp 159 KB

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