lua_TextBox.cpp 149 KB

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