lua_Label.cpp 147 KB

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