lua_Control.cpp 143 KB

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