lua_Control.cpp 145 KB

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