lua_CheckBox.cpp 136 KB

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