lua_Control.cpp 138 KB

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