lua_Control.cpp 137 KB

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