lua_Form.cpp 167 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_Form.h"
  4. #include "AbsoluteLayout.h"
  5. #include "Animation.h"
  6. #include "AnimationTarget.h"
  7. #include "Base.h"
  8. #include "Button.h"
  9. #include "CheckBox.h"
  10. #include "Container.h"
  11. #include "Control.h"
  12. #include "FlowLayout.h"
  13. #include "Form.h"
  14. #include "Game.h"
  15. #include "Joystick.h"
  16. #include "Label.h"
  17. #include "Layout.h"
  18. #include "Node.h"
  19. #include "RadioButton.h"
  20. #include "Ref.h"
  21. #include "Scene.h"
  22. #include "ScriptController.h"
  23. #include "ScriptTarget.h"
  24. #include "Slider.h"
  25. #include "TextBox.h"
  26. #include "Theme.h"
  27. #include "VerticalLayout.h"
  28. #include "lua_ContainerScroll.h"
  29. #include "lua_ControlAlignment.h"
  30. #include "lua_ControlListenerEventType.h"
  31. #include "lua_ControlState.h"
  32. #include "lua_CurveInterpolationType.h"
  33. #include "lua_FontJustify.h"
  34. #include "lua_LayoutType.h"
  35. namespace gameplay
  36. {
  37. void luaRegister_Form()
  38. {
  39. const luaL_Reg lua_members[] =
  40. {
  41. {"addControl", lua_Form_addControl},
  42. {"addListener", lua_Form_addListener},
  43. {"addRef", lua_Form_addRef},
  44. {"addScriptCallback", lua_Form_addScriptCallback},
  45. {"createAnimation", lua_Form_createAnimation},
  46. {"createAnimationFromBy", lua_Form_createAnimationFromBy},
  47. {"createAnimationFromTo", lua_Form_createAnimationFromTo},
  48. {"destroyAnimation", lua_Form_destroyAnimation},
  49. {"disable", lua_Form_disable},
  50. {"draw", lua_Form_draw},
  51. {"enable", lua_Form_enable},
  52. {"getAlignment", lua_Form_getAlignment},
  53. {"getAnimation", lua_Form_getAnimation},
  54. {"getAnimationPropertyComponentCount", lua_Form_getAnimationPropertyComponentCount},
  55. {"getAnimationPropertyValue", lua_Form_getAnimationPropertyValue},
  56. {"getAutoHeight", lua_Form_getAutoHeight},
  57. {"getAutoWidth", lua_Form_getAutoWidth},
  58. {"getBorder", lua_Form_getBorder},
  59. {"getBounds", lua_Form_getBounds},
  60. {"getClip", lua_Form_getClip},
  61. {"getClipBounds", lua_Form_getClipBounds},
  62. {"getConsumeInputEvents", lua_Form_getConsumeInputEvents},
  63. {"getControl", lua_Form_getControl},
  64. {"getCursorColor", lua_Form_getCursorColor},
  65. {"getCursorRegion", lua_Form_getCursorRegion},
  66. {"getCursorUVs", lua_Form_getCursorUVs},
  67. {"getFocusIndex", lua_Form_getFocusIndex},
  68. {"getFont", lua_Form_getFont},
  69. {"getFontSize", lua_Form_getFontSize},
  70. {"getHeight", lua_Form_getHeight},
  71. {"getId", lua_Form_getId},
  72. {"getImageColor", lua_Form_getImageColor},
  73. {"getImageRegion", lua_Form_getImageRegion},
  74. {"getImageUVs", lua_Form_getImageUVs},
  75. {"getLayout", lua_Form_getLayout},
  76. {"getMargin", lua_Form_getMargin},
  77. {"getOpacity", lua_Form_getOpacity},
  78. {"getPadding", lua_Form_getPadding},
  79. {"getRefCount", lua_Form_getRefCount},
  80. {"getScroll", lua_Form_getScroll},
  81. {"getSkinColor", lua_Form_getSkinColor},
  82. {"getSkinRegion", lua_Form_getSkinRegion},
  83. {"getState", lua_Form_getState},
  84. {"getStyle", lua_Form_getStyle},
  85. {"getTextAlignment", lua_Form_getTextAlignment},
  86. {"getTextColor", lua_Form_getTextColor},
  87. {"getTextRightToLeft", lua_Form_getTextRightToLeft},
  88. {"getTheme", lua_Form_getTheme},
  89. {"getType", lua_Form_getType},
  90. {"getWidth", lua_Form_getWidth},
  91. {"getX", lua_Form_getX},
  92. {"getY", lua_Form_getY},
  93. {"getZIndex", lua_Form_getZIndex},
  94. {"insertControl", lua_Form_insertControl},
  95. {"isContainer", lua_Form_isContainer},
  96. {"isEnabled", lua_Form_isEnabled},
  97. {"isScrollBarsAutoHide", lua_Form_isScrollBarsAutoHide},
  98. {"release", lua_Form_release},
  99. {"removeControl", lua_Form_removeControl},
  100. {"removeScriptCallback", lua_Form_removeScriptCallback},
  101. {"setAlignment", lua_Form_setAlignment},
  102. {"setAnimationPropertyValue", lua_Form_setAnimationPropertyValue},
  103. {"setAutoHeight", lua_Form_setAutoHeight},
  104. {"setAutoWidth", lua_Form_setAutoWidth},
  105. {"setBorder", lua_Form_setBorder},
  106. {"setBounds", lua_Form_setBounds},
  107. {"setConsumeInputEvents", lua_Form_setConsumeInputEvents},
  108. {"setCursorColor", lua_Form_setCursorColor},
  109. {"setCursorRegion", lua_Form_setCursorRegion},
  110. {"setFocusIndex", lua_Form_setFocusIndex},
  111. {"setFont", lua_Form_setFont},
  112. {"setFontSize", lua_Form_setFontSize},
  113. {"setHeight", lua_Form_setHeight},
  114. {"setImageColor", lua_Form_setImageColor},
  115. {"setImageRegion", lua_Form_setImageRegion},
  116. {"setMargin", lua_Form_setMargin},
  117. {"setNode", lua_Form_setNode},
  118. {"setOpacity", lua_Form_setOpacity},
  119. {"setPadding", lua_Form_setPadding},
  120. {"setPosition", lua_Form_setPosition},
  121. {"setScroll", lua_Form_setScroll},
  122. {"setScrollBarsAutoHide", lua_Form_setScrollBarsAutoHide},
  123. {"setSize", lua_Form_setSize},
  124. {"setSkinColor", lua_Form_setSkinColor},
  125. {"setSkinRegion", lua_Form_setSkinRegion},
  126. {"setState", lua_Form_setState},
  127. {"setStyle", lua_Form_setStyle},
  128. {"setTextAlignment", lua_Form_setTextAlignment},
  129. {"setTextColor", lua_Form_setTextColor},
  130. {"setTextRightToLeft", lua_Form_setTextRightToLeft},
  131. {"setWidth", lua_Form_setWidth},
  132. {"setZIndex", lua_Form_setZIndex},
  133. {"update", lua_Form_update},
  134. {NULL, NULL}
  135. };
  136. const luaL_Reg lua_statics[] =
  137. {
  138. {"ANIMATE_OPACITY", lua_Form_static_ANIMATE_OPACITY},
  139. {"ANIMATE_POSITION", lua_Form_static_ANIMATE_POSITION},
  140. {"ANIMATE_POSITION_X", lua_Form_static_ANIMATE_POSITION_X},
  141. {"ANIMATE_POSITION_Y", lua_Form_static_ANIMATE_POSITION_Y},
  142. {"ANIMATE_SCROLLBAR_OPACITY", lua_Form_static_ANIMATE_SCROLLBAR_OPACITY},
  143. {"ANIMATE_SIZE", lua_Form_static_ANIMATE_SIZE},
  144. {"ANIMATE_SIZE_HEIGHT", lua_Form_static_ANIMATE_SIZE_HEIGHT},
  145. {"ANIMATE_SIZE_WIDTH", lua_Form_static_ANIMATE_SIZE_WIDTH},
  146. {"create", lua_Form_static_create},
  147. {"getForm", lua_Form_static_getForm},
  148. {NULL, NULL}
  149. };
  150. std::vector<std::string> scopePath;
  151. ScriptUtil::registerClass("Form", lua_members, NULL, lua_Form__gc, lua_statics, scopePath);
  152. }
  153. static Form* getInstance(lua_State* state)
  154. {
  155. void* userdata = luaL_checkudata(state, 1, "Form");
  156. luaL_argcheck(state, userdata != NULL, 1, "'Form' expected.");
  157. return (Form*)((ScriptUtil::LuaObject*)userdata)->instance;
  158. }
  159. int lua_Form__gc(lua_State* state)
  160. {
  161. // Get the number of parameters.
  162. int paramCount = lua_gettop(state);
  163. // Attempt to match the parameters to a valid binding.
  164. switch (paramCount)
  165. {
  166. case 1:
  167. {
  168. if ((lua_type(state, 1) == LUA_TUSERDATA))
  169. {
  170. void* userdata = luaL_checkudata(state, 1, "Form");
  171. luaL_argcheck(state, userdata != NULL, 1, "'Form' expected.");
  172. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)userdata;
  173. if (object->owns)
  174. {
  175. Form* instance = (Form*)object->instance;
  176. SAFE_RELEASE(instance);
  177. }
  178. return 0;
  179. }
  180. else
  181. {
  182. lua_pushstring(state, "lua_Form__gc - Failed to match the given parameters to a valid function signature.");
  183. lua_error(state);
  184. }
  185. break;
  186. }
  187. default:
  188. {
  189. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  190. lua_error(state);
  191. break;
  192. }
  193. }
  194. return 0;
  195. }
  196. int lua_Form_addControl(lua_State* state)
  197. {
  198. // Get the number of parameters.
  199. int paramCount = lua_gettop(state);
  200. // Attempt to match the parameters to a valid binding.
  201. switch (paramCount)
  202. {
  203. case 2:
  204. {
  205. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  206. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  207. {
  208. // Get parameter 1 off the stack.
  209. ScriptUtil::LuaArray<Control> param1 = ScriptUtil::getObjectPointer<Control>(2, "Control", false);
  210. Form* instance = getInstance(state);
  211. unsigned int result = instance->addControl(param1);
  212. // Push the return value onto the stack.
  213. lua_pushunsigned(state, result);
  214. return 1;
  215. }
  216. else
  217. {
  218. lua_pushstring(state, "lua_Form_addControl - Failed to match the given parameters to a valid function signature.");
  219. lua_error(state);
  220. }
  221. break;
  222. }
  223. default:
  224. {
  225. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  226. lua_error(state);
  227. break;
  228. }
  229. }
  230. return 0;
  231. }
  232. int lua_Form_addListener(lua_State* state)
  233. {
  234. // Get the number of parameters.
  235. int paramCount = lua_gettop(state);
  236. // Attempt to match the parameters to a valid binding.
  237. switch (paramCount)
  238. {
  239. case 3:
  240. {
  241. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  242. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  243. lua_type(state, 3) == LUA_TNUMBER)
  244. {
  245. // Get parameter 1 off the stack.
  246. ScriptUtil::LuaArray<Control::Listener> param1 = ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false);
  247. // Get parameter 2 off the stack.
  248. int param2 = (int)luaL_checkint(state, 3);
  249. Form* instance = getInstance(state);
  250. instance->addListener(param1, param2);
  251. return 0;
  252. }
  253. else
  254. {
  255. lua_pushstring(state, "lua_Form_addListener - Failed to match the given parameters to a valid function signature.");
  256. lua_error(state);
  257. }
  258. break;
  259. }
  260. default:
  261. {
  262. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  263. lua_error(state);
  264. break;
  265. }
  266. }
  267. return 0;
  268. }
  269. int lua_Form_addRef(lua_State* state)
  270. {
  271. // Get the number of parameters.
  272. int paramCount = lua_gettop(state);
  273. // Attempt to match the parameters to a valid binding.
  274. switch (paramCount)
  275. {
  276. case 1:
  277. {
  278. if ((lua_type(state, 1) == LUA_TUSERDATA))
  279. {
  280. Form* instance = getInstance(state);
  281. instance->addRef();
  282. return 0;
  283. }
  284. else
  285. {
  286. lua_pushstring(state, "lua_Form_addRef - Failed to match the given parameters to a valid function signature.");
  287. lua_error(state);
  288. }
  289. break;
  290. }
  291. default:
  292. {
  293. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  294. lua_error(state);
  295. break;
  296. }
  297. }
  298. return 0;
  299. }
  300. int lua_Form_addScriptCallback(lua_State* state)
  301. {
  302. // Get the number of parameters.
  303. int paramCount = lua_gettop(state);
  304. // Attempt to match the parameters to a valid binding.
  305. switch (paramCount)
  306. {
  307. case 3:
  308. {
  309. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  310. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  311. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  312. {
  313. // Get parameter 1 off the stack.
  314. std::string param1 = ScriptUtil::getString(2, true);
  315. // Get parameter 2 off the stack.
  316. std::string param2 = ScriptUtil::getString(3, true);
  317. Form* instance = getInstance(state);
  318. instance->addScriptCallback(param1, param2);
  319. return 0;
  320. }
  321. else
  322. {
  323. lua_pushstring(state, "lua_Form_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  324. lua_error(state);
  325. }
  326. break;
  327. }
  328. default:
  329. {
  330. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  331. lua_error(state);
  332. break;
  333. }
  334. }
  335. return 0;
  336. }
  337. int lua_Form_createAnimation(lua_State* state)
  338. {
  339. // Get the number of parameters.
  340. int paramCount = lua_gettop(state);
  341. // Attempt to match the parameters to a valid binding.
  342. switch (paramCount)
  343. {
  344. case 3:
  345. {
  346. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  347. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  348. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  349. {
  350. // Get parameter 1 off the stack.
  351. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  352. // Get parameter 2 off the stack.
  353. ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
  354. Form* instance = getInstance(state);
  355. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  356. if (returnPtr)
  357. {
  358. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  359. object->instance = returnPtr;
  360. object->owns = false;
  361. luaL_getmetatable(state, "Animation");
  362. lua_setmetatable(state, -2);
  363. }
  364. else
  365. {
  366. lua_pushnil(state);
  367. }
  368. return 1;
  369. }
  370. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  371. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  372. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  373. {
  374. // Get parameter 1 off the stack.
  375. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  376. // Get parameter 2 off the stack.
  377. ScriptUtil::LuaArray<Properties> param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false);
  378. Form* instance = getInstance(state);
  379. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  380. if (returnPtr)
  381. {
  382. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  383. object->instance = returnPtr;
  384. object->owns = false;
  385. luaL_getmetatable(state, "Animation");
  386. lua_setmetatable(state, -2);
  387. }
  388. else
  389. {
  390. lua_pushnil(state);
  391. }
  392. return 1;
  393. }
  394. else
  395. {
  396. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  397. lua_error(state);
  398. }
  399. break;
  400. }
  401. case 7:
  402. {
  403. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  404. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  405. lua_type(state, 3) == LUA_TNUMBER &&
  406. lua_type(state, 4) == LUA_TNUMBER &&
  407. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  408. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  409. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  410. {
  411. // Get parameter 1 off the stack.
  412. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  413. // Get parameter 2 off the stack.
  414. int param2 = (int)luaL_checkint(state, 3);
  415. // Get parameter 3 off the stack.
  416. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  417. // Get parameter 4 off the stack.
  418. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  419. // Get parameter 5 off the stack.
  420. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  421. // Get parameter 6 off the stack.
  422. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  423. Form* instance = getInstance(state);
  424. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  425. if (returnPtr)
  426. {
  427. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  428. object->instance = returnPtr;
  429. object->owns = false;
  430. luaL_getmetatable(state, "Animation");
  431. lua_setmetatable(state, -2);
  432. }
  433. else
  434. {
  435. lua_pushnil(state);
  436. }
  437. return 1;
  438. }
  439. else
  440. {
  441. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  442. lua_error(state);
  443. }
  444. break;
  445. }
  446. case 9:
  447. {
  448. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  449. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  450. lua_type(state, 3) == LUA_TNUMBER &&
  451. lua_type(state, 4) == LUA_TNUMBER &&
  452. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  453. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  454. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  455. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  456. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  457. {
  458. // Get parameter 1 off the stack.
  459. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  460. // Get parameter 2 off the stack.
  461. int param2 = (int)luaL_checkint(state, 3);
  462. // Get parameter 3 off the stack.
  463. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  464. // Get parameter 4 off the stack.
  465. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  466. // Get parameter 5 off the stack.
  467. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  468. // Get parameter 6 off the stack.
  469. ScriptUtil::LuaArray<float> param6 = ScriptUtil::getFloatPointer(7);
  470. // Get parameter 7 off the stack.
  471. ScriptUtil::LuaArray<float> param7 = ScriptUtil::getFloatPointer(8);
  472. // Get parameter 8 off the stack.
  473. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  474. Form* instance = getInstance(state);
  475. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  476. if (returnPtr)
  477. {
  478. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  479. object->instance = returnPtr;
  480. object->owns = false;
  481. luaL_getmetatable(state, "Animation");
  482. lua_setmetatable(state, -2);
  483. }
  484. else
  485. {
  486. lua_pushnil(state);
  487. }
  488. return 1;
  489. }
  490. else
  491. {
  492. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  493. lua_error(state);
  494. }
  495. break;
  496. }
  497. default:
  498. {
  499. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  500. lua_error(state);
  501. break;
  502. }
  503. }
  504. return 0;
  505. }
  506. int lua_Form_createAnimationFromBy(lua_State* state)
  507. {
  508. // Get the number of parameters.
  509. int paramCount = lua_gettop(state);
  510. // Attempt to match the parameters to a valid binding.
  511. switch (paramCount)
  512. {
  513. case 7:
  514. {
  515. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  516. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  517. lua_type(state, 3) == LUA_TNUMBER &&
  518. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  519. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  520. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  521. lua_type(state, 7) == LUA_TNUMBER)
  522. {
  523. // Get parameter 1 off the stack.
  524. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  525. // Get parameter 2 off the stack.
  526. int param2 = (int)luaL_checkint(state, 3);
  527. // Get parameter 3 off the stack.
  528. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  529. // Get parameter 4 off the stack.
  530. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  531. // Get parameter 5 off the stack.
  532. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  533. // Get parameter 6 off the stack.
  534. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  535. Form* instance = getInstance(state);
  536. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  537. if (returnPtr)
  538. {
  539. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  540. object->instance = returnPtr;
  541. object->owns = false;
  542. luaL_getmetatable(state, "Animation");
  543. lua_setmetatable(state, -2);
  544. }
  545. else
  546. {
  547. lua_pushnil(state);
  548. }
  549. return 1;
  550. }
  551. else
  552. {
  553. lua_pushstring(state, "lua_Form_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  554. lua_error(state);
  555. }
  556. break;
  557. }
  558. default:
  559. {
  560. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  561. lua_error(state);
  562. break;
  563. }
  564. }
  565. return 0;
  566. }
  567. int lua_Form_createAnimationFromTo(lua_State* state)
  568. {
  569. // Get the number of parameters.
  570. int paramCount = lua_gettop(state);
  571. // Attempt to match the parameters to a valid binding.
  572. switch (paramCount)
  573. {
  574. case 7:
  575. {
  576. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  577. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  578. lua_type(state, 3) == LUA_TNUMBER &&
  579. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  580. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  581. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  582. lua_type(state, 7) == LUA_TNUMBER)
  583. {
  584. // Get parameter 1 off the stack.
  585. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  586. // Get parameter 2 off the stack.
  587. int param2 = (int)luaL_checkint(state, 3);
  588. // Get parameter 3 off the stack.
  589. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  590. // Get parameter 4 off the stack.
  591. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  592. // Get parameter 5 off the stack.
  593. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  594. // Get parameter 6 off the stack.
  595. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  596. Form* instance = getInstance(state);
  597. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  598. if (returnPtr)
  599. {
  600. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  601. object->instance = returnPtr;
  602. object->owns = false;
  603. luaL_getmetatable(state, "Animation");
  604. lua_setmetatable(state, -2);
  605. }
  606. else
  607. {
  608. lua_pushnil(state);
  609. }
  610. return 1;
  611. }
  612. else
  613. {
  614. lua_pushstring(state, "lua_Form_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  615. lua_error(state);
  616. }
  617. break;
  618. }
  619. default:
  620. {
  621. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  622. lua_error(state);
  623. break;
  624. }
  625. }
  626. return 0;
  627. }
  628. int lua_Form_destroyAnimation(lua_State* state)
  629. {
  630. // Get the number of parameters.
  631. int paramCount = lua_gettop(state);
  632. // Attempt to match the parameters to a valid binding.
  633. switch (paramCount)
  634. {
  635. case 1:
  636. {
  637. if ((lua_type(state, 1) == LUA_TUSERDATA))
  638. {
  639. Form* instance = getInstance(state);
  640. instance->destroyAnimation();
  641. return 0;
  642. }
  643. else
  644. {
  645. lua_pushstring(state, "lua_Form_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  646. lua_error(state);
  647. }
  648. break;
  649. }
  650. case 2:
  651. {
  652. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  653. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  654. {
  655. // Get parameter 1 off the stack.
  656. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  657. Form* instance = getInstance(state);
  658. instance->destroyAnimation(param1);
  659. return 0;
  660. }
  661. else
  662. {
  663. lua_pushstring(state, "lua_Form_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  664. lua_error(state);
  665. }
  666. break;
  667. }
  668. default:
  669. {
  670. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  671. lua_error(state);
  672. break;
  673. }
  674. }
  675. return 0;
  676. }
  677. int lua_Form_disable(lua_State* state)
  678. {
  679. // Get the number of parameters.
  680. int paramCount = lua_gettop(state);
  681. // Attempt to match the parameters to a valid binding.
  682. switch (paramCount)
  683. {
  684. case 1:
  685. {
  686. if ((lua_type(state, 1) == LUA_TUSERDATA))
  687. {
  688. Form* instance = getInstance(state);
  689. instance->disable();
  690. return 0;
  691. }
  692. else
  693. {
  694. lua_pushstring(state, "lua_Form_disable - Failed to match the given parameters to a valid function signature.");
  695. lua_error(state);
  696. }
  697. break;
  698. }
  699. default:
  700. {
  701. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  702. lua_error(state);
  703. break;
  704. }
  705. }
  706. return 0;
  707. }
  708. int lua_Form_draw(lua_State* state)
  709. {
  710. // Get the number of parameters.
  711. int paramCount = lua_gettop(state);
  712. // Attempt to match the parameters to a valid binding.
  713. switch (paramCount)
  714. {
  715. case 1:
  716. {
  717. if ((lua_type(state, 1) == LUA_TUSERDATA))
  718. {
  719. Form* instance = getInstance(state);
  720. instance->draw();
  721. return 0;
  722. }
  723. else
  724. {
  725. lua_pushstring(state, "lua_Form_draw - Failed to match the given parameters to a valid function signature.");
  726. lua_error(state);
  727. }
  728. break;
  729. }
  730. default:
  731. {
  732. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  733. lua_error(state);
  734. break;
  735. }
  736. }
  737. return 0;
  738. }
  739. int lua_Form_enable(lua_State* state)
  740. {
  741. // Get the number of parameters.
  742. int paramCount = lua_gettop(state);
  743. // Attempt to match the parameters to a valid binding.
  744. switch (paramCount)
  745. {
  746. case 1:
  747. {
  748. if ((lua_type(state, 1) == LUA_TUSERDATA))
  749. {
  750. Form* instance = getInstance(state);
  751. instance->enable();
  752. return 0;
  753. }
  754. else
  755. {
  756. lua_pushstring(state, "lua_Form_enable - Failed to match the given parameters to a valid function signature.");
  757. lua_error(state);
  758. }
  759. break;
  760. }
  761. default:
  762. {
  763. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  764. lua_error(state);
  765. break;
  766. }
  767. }
  768. return 0;
  769. }
  770. int lua_Form_getAlignment(lua_State* state)
  771. {
  772. // Get the number of parameters.
  773. int paramCount = lua_gettop(state);
  774. // Attempt to match the parameters to a valid binding.
  775. switch (paramCount)
  776. {
  777. case 1:
  778. {
  779. if ((lua_type(state, 1) == LUA_TUSERDATA))
  780. {
  781. Form* instance = getInstance(state);
  782. Control::Alignment result = instance->getAlignment();
  783. // Push the return value onto the stack.
  784. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
  785. return 1;
  786. }
  787. else
  788. {
  789. lua_pushstring(state, "lua_Form_getAlignment - Failed to match the given parameters to a valid function signature.");
  790. lua_error(state);
  791. }
  792. break;
  793. }
  794. default:
  795. {
  796. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  797. lua_error(state);
  798. break;
  799. }
  800. }
  801. return 0;
  802. }
  803. int lua_Form_getAnimation(lua_State* state)
  804. {
  805. // Get the number of parameters.
  806. int paramCount = lua_gettop(state);
  807. // Attempt to match the parameters to a valid binding.
  808. switch (paramCount)
  809. {
  810. case 1:
  811. {
  812. if ((lua_type(state, 1) == LUA_TUSERDATA))
  813. {
  814. Form* instance = getInstance(state);
  815. void* returnPtr = (void*)instance->getAnimation();
  816. if (returnPtr)
  817. {
  818. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  819. object->instance = returnPtr;
  820. object->owns = false;
  821. luaL_getmetatable(state, "Animation");
  822. lua_setmetatable(state, -2);
  823. }
  824. else
  825. {
  826. lua_pushnil(state);
  827. }
  828. return 1;
  829. }
  830. else
  831. {
  832. lua_pushstring(state, "lua_Form_getAnimation - Failed to match the given parameters to a valid function signature.");
  833. lua_error(state);
  834. }
  835. break;
  836. }
  837. case 2:
  838. {
  839. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  840. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  841. {
  842. // Get parameter 1 off the stack.
  843. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  844. Form* instance = getInstance(state);
  845. void* returnPtr = (void*)instance->getAnimation(param1);
  846. if (returnPtr)
  847. {
  848. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  849. object->instance = returnPtr;
  850. object->owns = false;
  851. luaL_getmetatable(state, "Animation");
  852. lua_setmetatable(state, -2);
  853. }
  854. else
  855. {
  856. lua_pushnil(state);
  857. }
  858. return 1;
  859. }
  860. else
  861. {
  862. lua_pushstring(state, "lua_Form_getAnimation - Failed to match the given parameters to a valid function signature.");
  863. lua_error(state);
  864. }
  865. break;
  866. }
  867. default:
  868. {
  869. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  870. lua_error(state);
  871. break;
  872. }
  873. }
  874. return 0;
  875. }
  876. int lua_Form_getAnimationPropertyComponentCount(lua_State* state)
  877. {
  878. // Get the number of parameters.
  879. int paramCount = lua_gettop(state);
  880. // Attempt to match the parameters to a valid binding.
  881. switch (paramCount)
  882. {
  883. case 2:
  884. {
  885. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  886. lua_type(state, 2) == LUA_TNUMBER)
  887. {
  888. // Get parameter 1 off the stack.
  889. int param1 = (int)luaL_checkint(state, 2);
  890. Form* instance = getInstance(state);
  891. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  892. // Push the return value onto the stack.
  893. lua_pushunsigned(state, result);
  894. return 1;
  895. }
  896. else
  897. {
  898. lua_pushstring(state, "lua_Form_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  899. lua_error(state);
  900. }
  901. break;
  902. }
  903. default:
  904. {
  905. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  906. lua_error(state);
  907. break;
  908. }
  909. }
  910. return 0;
  911. }
  912. int lua_Form_getAnimationPropertyValue(lua_State* state)
  913. {
  914. // Get the number of parameters.
  915. int paramCount = lua_gettop(state);
  916. // Attempt to match the parameters to a valid binding.
  917. switch (paramCount)
  918. {
  919. case 3:
  920. {
  921. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  922. lua_type(state, 2) == LUA_TNUMBER &&
  923. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  924. {
  925. // Get parameter 1 off the stack.
  926. int param1 = (int)luaL_checkint(state, 2);
  927. // Get parameter 2 off the stack.
  928. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  929. Form* instance = getInstance(state);
  930. instance->getAnimationPropertyValue(param1, param2);
  931. return 0;
  932. }
  933. else
  934. {
  935. lua_pushstring(state, "lua_Form_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  936. lua_error(state);
  937. }
  938. break;
  939. }
  940. default:
  941. {
  942. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  943. lua_error(state);
  944. break;
  945. }
  946. }
  947. return 0;
  948. }
  949. int lua_Form_getAutoHeight(lua_State* state)
  950. {
  951. // Get the number of parameters.
  952. int paramCount = lua_gettop(state);
  953. // Attempt to match the parameters to a valid binding.
  954. switch (paramCount)
  955. {
  956. case 1:
  957. {
  958. if ((lua_type(state, 1) == LUA_TUSERDATA))
  959. {
  960. Form* instance = getInstance(state);
  961. bool result = instance->getAutoHeight();
  962. // Push the return value onto the stack.
  963. lua_pushboolean(state, result);
  964. return 1;
  965. }
  966. else
  967. {
  968. lua_pushstring(state, "lua_Form_getAutoHeight - Failed to match the given parameters to a valid function signature.");
  969. lua_error(state);
  970. }
  971. break;
  972. }
  973. default:
  974. {
  975. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  976. lua_error(state);
  977. break;
  978. }
  979. }
  980. return 0;
  981. }
  982. int lua_Form_getAutoWidth(lua_State* state)
  983. {
  984. // Get the number of parameters.
  985. int paramCount = lua_gettop(state);
  986. // Attempt to match the parameters to a valid binding.
  987. switch (paramCount)
  988. {
  989. case 1:
  990. {
  991. if ((lua_type(state, 1) == LUA_TUSERDATA))
  992. {
  993. Form* instance = getInstance(state);
  994. bool result = instance->getAutoWidth();
  995. // Push the return value onto the stack.
  996. lua_pushboolean(state, result);
  997. return 1;
  998. }
  999. else
  1000. {
  1001. lua_pushstring(state, "lua_Form_getAutoWidth - Failed to match the given parameters to a valid function signature.");
  1002. lua_error(state);
  1003. }
  1004. break;
  1005. }
  1006. default:
  1007. {
  1008. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1009. lua_error(state);
  1010. break;
  1011. }
  1012. }
  1013. return 0;
  1014. }
  1015. int lua_Form_getBorder(lua_State* state)
  1016. {
  1017. // Get the number of parameters.
  1018. int paramCount = lua_gettop(state);
  1019. // Attempt to match the parameters to a valid binding.
  1020. switch (paramCount)
  1021. {
  1022. case 1:
  1023. {
  1024. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1025. {
  1026. Form* instance = getInstance(state);
  1027. void* returnPtr = (void*)&(instance->getBorder());
  1028. if (returnPtr)
  1029. {
  1030. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1031. object->instance = returnPtr;
  1032. object->owns = false;
  1033. luaL_getmetatable(state, "ThemeSideRegions");
  1034. lua_setmetatable(state, -2);
  1035. }
  1036. else
  1037. {
  1038. lua_pushnil(state);
  1039. }
  1040. return 1;
  1041. }
  1042. else
  1043. {
  1044. lua_pushstring(state, "lua_Form_getBorder - Failed to match the given parameters to a valid function signature.");
  1045. lua_error(state);
  1046. }
  1047. break;
  1048. }
  1049. case 2:
  1050. {
  1051. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1052. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1053. {
  1054. // Get parameter 1 off the stack.
  1055. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1056. Form* instance = getInstance(state);
  1057. void* returnPtr = (void*)&(instance->getBorder(param1));
  1058. if (returnPtr)
  1059. {
  1060. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1061. object->instance = returnPtr;
  1062. object->owns = false;
  1063. luaL_getmetatable(state, "ThemeSideRegions");
  1064. lua_setmetatable(state, -2);
  1065. }
  1066. else
  1067. {
  1068. lua_pushnil(state);
  1069. }
  1070. return 1;
  1071. }
  1072. else
  1073. {
  1074. lua_pushstring(state, "lua_Form_getBorder - Failed to match the given parameters to a valid function signature.");
  1075. lua_error(state);
  1076. }
  1077. break;
  1078. }
  1079. default:
  1080. {
  1081. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1082. lua_error(state);
  1083. break;
  1084. }
  1085. }
  1086. return 0;
  1087. }
  1088. int lua_Form_getBounds(lua_State* state)
  1089. {
  1090. // Get the number of parameters.
  1091. int paramCount = lua_gettop(state);
  1092. // Attempt to match the parameters to a valid binding.
  1093. switch (paramCount)
  1094. {
  1095. case 1:
  1096. {
  1097. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1098. {
  1099. Form* instance = getInstance(state);
  1100. void* returnPtr = (void*)&(instance->getBounds());
  1101. if (returnPtr)
  1102. {
  1103. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1104. object->instance = returnPtr;
  1105. object->owns = false;
  1106. luaL_getmetatable(state, "Rectangle");
  1107. lua_setmetatable(state, -2);
  1108. }
  1109. else
  1110. {
  1111. lua_pushnil(state);
  1112. }
  1113. return 1;
  1114. }
  1115. else
  1116. {
  1117. lua_pushstring(state, "lua_Form_getBounds - Failed to match the given parameters to a valid function signature.");
  1118. lua_error(state);
  1119. }
  1120. break;
  1121. }
  1122. default:
  1123. {
  1124. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1125. lua_error(state);
  1126. break;
  1127. }
  1128. }
  1129. return 0;
  1130. }
  1131. int lua_Form_getClip(lua_State* state)
  1132. {
  1133. // Get the number of parameters.
  1134. int paramCount = lua_gettop(state);
  1135. // Attempt to match the parameters to a valid binding.
  1136. switch (paramCount)
  1137. {
  1138. case 1:
  1139. {
  1140. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1141. {
  1142. Form* instance = getInstance(state);
  1143. void* returnPtr = (void*)&(instance->getClip());
  1144. if (returnPtr)
  1145. {
  1146. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1147. object->instance = returnPtr;
  1148. object->owns = false;
  1149. luaL_getmetatable(state, "Rectangle");
  1150. lua_setmetatable(state, -2);
  1151. }
  1152. else
  1153. {
  1154. lua_pushnil(state);
  1155. }
  1156. return 1;
  1157. }
  1158. else
  1159. {
  1160. lua_pushstring(state, "lua_Form_getClip - Failed to match the given parameters to a valid function signature.");
  1161. lua_error(state);
  1162. }
  1163. break;
  1164. }
  1165. default:
  1166. {
  1167. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1168. lua_error(state);
  1169. break;
  1170. }
  1171. }
  1172. return 0;
  1173. }
  1174. int lua_Form_getClipBounds(lua_State* state)
  1175. {
  1176. // Get the number of parameters.
  1177. int paramCount = lua_gettop(state);
  1178. // Attempt to match the parameters to a valid binding.
  1179. switch (paramCount)
  1180. {
  1181. case 1:
  1182. {
  1183. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1184. {
  1185. Form* instance = getInstance(state);
  1186. void* returnPtr = (void*)&(instance->getClipBounds());
  1187. if (returnPtr)
  1188. {
  1189. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1190. object->instance = returnPtr;
  1191. object->owns = false;
  1192. luaL_getmetatable(state, "Rectangle");
  1193. lua_setmetatable(state, -2);
  1194. }
  1195. else
  1196. {
  1197. lua_pushnil(state);
  1198. }
  1199. return 1;
  1200. }
  1201. else
  1202. {
  1203. lua_pushstring(state, "lua_Form_getClipBounds - Failed to match the given parameters to a valid function signature.");
  1204. lua_error(state);
  1205. }
  1206. break;
  1207. }
  1208. default:
  1209. {
  1210. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1211. lua_error(state);
  1212. break;
  1213. }
  1214. }
  1215. return 0;
  1216. }
  1217. int lua_Form_getConsumeInputEvents(lua_State* state)
  1218. {
  1219. // Get the number of parameters.
  1220. int paramCount = lua_gettop(state);
  1221. // Attempt to match the parameters to a valid binding.
  1222. switch (paramCount)
  1223. {
  1224. case 1:
  1225. {
  1226. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1227. {
  1228. Form* instance = getInstance(state);
  1229. bool result = instance->getConsumeInputEvents();
  1230. // Push the return value onto the stack.
  1231. lua_pushboolean(state, result);
  1232. return 1;
  1233. }
  1234. else
  1235. {
  1236. lua_pushstring(state, "lua_Form_getConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  1237. lua_error(state);
  1238. }
  1239. break;
  1240. }
  1241. default:
  1242. {
  1243. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1244. lua_error(state);
  1245. break;
  1246. }
  1247. }
  1248. return 0;
  1249. }
  1250. int lua_Form_getControl(lua_State* state)
  1251. {
  1252. // Get the number of parameters.
  1253. int paramCount = lua_gettop(state);
  1254. // Attempt to match the parameters to a valid binding.
  1255. switch (paramCount)
  1256. {
  1257. case 2:
  1258. {
  1259. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1260. lua_type(state, 2) == LUA_TNUMBER)
  1261. {
  1262. // Get parameter 1 off the stack.
  1263. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  1264. Form* instance = getInstance(state);
  1265. void* returnPtr = (void*)instance->getControl(param1);
  1266. if (returnPtr)
  1267. {
  1268. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1269. object->instance = returnPtr;
  1270. object->owns = false;
  1271. luaL_getmetatable(state, "Control");
  1272. lua_setmetatable(state, -2);
  1273. }
  1274. else
  1275. {
  1276. lua_pushnil(state);
  1277. }
  1278. return 1;
  1279. }
  1280. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1281. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1282. {
  1283. // Get parameter 1 off the stack.
  1284. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1285. Form* instance = getInstance(state);
  1286. void* returnPtr = (void*)instance->getControl(param1);
  1287. if (returnPtr)
  1288. {
  1289. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1290. object->instance = returnPtr;
  1291. object->owns = false;
  1292. luaL_getmetatable(state, "Control");
  1293. lua_setmetatable(state, -2);
  1294. }
  1295. else
  1296. {
  1297. lua_pushnil(state);
  1298. }
  1299. return 1;
  1300. }
  1301. else
  1302. {
  1303. lua_pushstring(state, "lua_Form_getControl - Failed to match the given parameters to a valid function signature.");
  1304. lua_error(state);
  1305. }
  1306. break;
  1307. }
  1308. default:
  1309. {
  1310. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1311. lua_error(state);
  1312. break;
  1313. }
  1314. }
  1315. return 0;
  1316. }
  1317. int lua_Form_getCursorColor(lua_State* state)
  1318. {
  1319. // Get the number of parameters.
  1320. int paramCount = lua_gettop(state);
  1321. // Attempt to match the parameters to a valid binding.
  1322. switch (paramCount)
  1323. {
  1324. case 2:
  1325. {
  1326. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1327. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1328. {
  1329. // Get parameter 1 off the stack.
  1330. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1331. Form* instance = getInstance(state);
  1332. void* returnPtr = (void*)&(instance->getCursorColor(param1));
  1333. if (returnPtr)
  1334. {
  1335. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1336. object->instance = returnPtr;
  1337. object->owns = false;
  1338. luaL_getmetatable(state, "Vector4");
  1339. lua_setmetatable(state, -2);
  1340. }
  1341. else
  1342. {
  1343. lua_pushnil(state);
  1344. }
  1345. return 1;
  1346. }
  1347. else
  1348. {
  1349. lua_pushstring(state, "lua_Form_getCursorColor - Failed to match the given parameters to a valid function signature.");
  1350. lua_error(state);
  1351. }
  1352. break;
  1353. }
  1354. default:
  1355. {
  1356. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1357. lua_error(state);
  1358. break;
  1359. }
  1360. }
  1361. return 0;
  1362. }
  1363. int lua_Form_getCursorRegion(lua_State* state)
  1364. {
  1365. // Get the number of parameters.
  1366. int paramCount = lua_gettop(state);
  1367. // Attempt to match the parameters to a valid binding.
  1368. switch (paramCount)
  1369. {
  1370. case 2:
  1371. {
  1372. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1373. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1374. {
  1375. // Get parameter 1 off the stack.
  1376. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1377. Form* instance = getInstance(state);
  1378. void* returnPtr = (void*)&(instance->getCursorRegion(param1));
  1379. if (returnPtr)
  1380. {
  1381. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1382. object->instance = returnPtr;
  1383. object->owns = false;
  1384. luaL_getmetatable(state, "Rectangle");
  1385. lua_setmetatable(state, -2);
  1386. }
  1387. else
  1388. {
  1389. lua_pushnil(state);
  1390. }
  1391. return 1;
  1392. }
  1393. else
  1394. {
  1395. lua_pushstring(state, "lua_Form_getCursorRegion - Failed to match the given parameters to a valid function signature.");
  1396. lua_error(state);
  1397. }
  1398. break;
  1399. }
  1400. default:
  1401. {
  1402. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1403. lua_error(state);
  1404. break;
  1405. }
  1406. }
  1407. return 0;
  1408. }
  1409. int lua_Form_getCursorUVs(lua_State* state)
  1410. {
  1411. // Get the number of parameters.
  1412. int paramCount = lua_gettop(state);
  1413. // Attempt to match the parameters to a valid binding.
  1414. switch (paramCount)
  1415. {
  1416. case 2:
  1417. {
  1418. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1419. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1420. {
  1421. // Get parameter 1 off the stack.
  1422. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1423. Form* instance = getInstance(state);
  1424. void* returnPtr = (void*)&(instance->getCursorUVs(param1));
  1425. if (returnPtr)
  1426. {
  1427. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1428. object->instance = returnPtr;
  1429. object->owns = false;
  1430. luaL_getmetatable(state, "ThemeUVs");
  1431. lua_setmetatable(state, -2);
  1432. }
  1433. else
  1434. {
  1435. lua_pushnil(state);
  1436. }
  1437. return 1;
  1438. }
  1439. else
  1440. {
  1441. lua_pushstring(state, "lua_Form_getCursorUVs - Failed to match the given parameters to a valid function signature.");
  1442. lua_error(state);
  1443. }
  1444. break;
  1445. }
  1446. default:
  1447. {
  1448. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1449. lua_error(state);
  1450. break;
  1451. }
  1452. }
  1453. return 0;
  1454. }
  1455. int lua_Form_getFocusIndex(lua_State* state)
  1456. {
  1457. // Get the number of parameters.
  1458. int paramCount = lua_gettop(state);
  1459. // Attempt to match the parameters to a valid binding.
  1460. switch (paramCount)
  1461. {
  1462. case 1:
  1463. {
  1464. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1465. {
  1466. Form* instance = getInstance(state);
  1467. int result = instance->getFocusIndex();
  1468. // Push the return value onto the stack.
  1469. lua_pushinteger(state, result);
  1470. return 1;
  1471. }
  1472. else
  1473. {
  1474. lua_pushstring(state, "lua_Form_getFocusIndex - Failed to match the given parameters to a valid function signature.");
  1475. lua_error(state);
  1476. }
  1477. break;
  1478. }
  1479. default:
  1480. {
  1481. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1482. lua_error(state);
  1483. break;
  1484. }
  1485. }
  1486. return 0;
  1487. }
  1488. int lua_Form_getFont(lua_State* state)
  1489. {
  1490. // Get the number of parameters.
  1491. int paramCount = lua_gettop(state);
  1492. // Attempt to match the parameters to a valid binding.
  1493. switch (paramCount)
  1494. {
  1495. case 1:
  1496. {
  1497. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1498. {
  1499. Form* instance = getInstance(state);
  1500. void* returnPtr = (void*)instance->getFont();
  1501. if (returnPtr)
  1502. {
  1503. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1504. object->instance = returnPtr;
  1505. object->owns = false;
  1506. luaL_getmetatable(state, "Font");
  1507. lua_setmetatable(state, -2);
  1508. }
  1509. else
  1510. {
  1511. lua_pushnil(state);
  1512. }
  1513. return 1;
  1514. }
  1515. else
  1516. {
  1517. lua_pushstring(state, "lua_Form_getFont - Failed to match the given parameters to a valid function signature.");
  1518. lua_error(state);
  1519. }
  1520. break;
  1521. }
  1522. case 2:
  1523. {
  1524. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1525. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1526. {
  1527. // Get parameter 1 off the stack.
  1528. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1529. Form* instance = getInstance(state);
  1530. void* returnPtr = (void*)instance->getFont(param1);
  1531. if (returnPtr)
  1532. {
  1533. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1534. object->instance = returnPtr;
  1535. object->owns = false;
  1536. luaL_getmetatable(state, "Font");
  1537. lua_setmetatable(state, -2);
  1538. }
  1539. else
  1540. {
  1541. lua_pushnil(state);
  1542. }
  1543. return 1;
  1544. }
  1545. else
  1546. {
  1547. lua_pushstring(state, "lua_Form_getFont - Failed to match the given parameters to a valid function signature.");
  1548. lua_error(state);
  1549. }
  1550. break;
  1551. }
  1552. default:
  1553. {
  1554. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1555. lua_error(state);
  1556. break;
  1557. }
  1558. }
  1559. return 0;
  1560. }
  1561. int lua_Form_getFontSize(lua_State* state)
  1562. {
  1563. // Get the number of parameters.
  1564. int paramCount = lua_gettop(state);
  1565. // Attempt to match the parameters to a valid binding.
  1566. switch (paramCount)
  1567. {
  1568. case 1:
  1569. {
  1570. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1571. {
  1572. Form* instance = getInstance(state);
  1573. unsigned int result = instance->getFontSize();
  1574. // Push the return value onto the stack.
  1575. lua_pushunsigned(state, result);
  1576. return 1;
  1577. }
  1578. else
  1579. {
  1580. lua_pushstring(state, "lua_Form_getFontSize - Failed to match the given parameters to a valid function signature.");
  1581. lua_error(state);
  1582. }
  1583. break;
  1584. }
  1585. case 2:
  1586. {
  1587. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1588. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1589. {
  1590. // Get parameter 1 off the stack.
  1591. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1592. Form* instance = getInstance(state);
  1593. unsigned int result = instance->getFontSize(param1);
  1594. // Push the return value onto the stack.
  1595. lua_pushunsigned(state, result);
  1596. return 1;
  1597. }
  1598. else
  1599. {
  1600. lua_pushstring(state, "lua_Form_getFontSize - Failed to match the given parameters to a valid function signature.");
  1601. lua_error(state);
  1602. }
  1603. break;
  1604. }
  1605. default:
  1606. {
  1607. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1608. lua_error(state);
  1609. break;
  1610. }
  1611. }
  1612. return 0;
  1613. }
  1614. int lua_Form_getHeight(lua_State* state)
  1615. {
  1616. // Get the number of parameters.
  1617. int paramCount = lua_gettop(state);
  1618. // Attempt to match the parameters to a valid binding.
  1619. switch (paramCount)
  1620. {
  1621. case 1:
  1622. {
  1623. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1624. {
  1625. Form* instance = getInstance(state);
  1626. float result = instance->getHeight();
  1627. // Push the return value onto the stack.
  1628. lua_pushnumber(state, result);
  1629. return 1;
  1630. }
  1631. else
  1632. {
  1633. lua_pushstring(state, "lua_Form_getHeight - Failed to match the given parameters to a valid function signature.");
  1634. lua_error(state);
  1635. }
  1636. break;
  1637. }
  1638. default:
  1639. {
  1640. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1641. lua_error(state);
  1642. break;
  1643. }
  1644. }
  1645. return 0;
  1646. }
  1647. int lua_Form_getId(lua_State* state)
  1648. {
  1649. // Get the number of parameters.
  1650. int paramCount = lua_gettop(state);
  1651. // Attempt to match the parameters to a valid binding.
  1652. switch (paramCount)
  1653. {
  1654. case 1:
  1655. {
  1656. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1657. {
  1658. Form* instance = getInstance(state);
  1659. const char* result = instance->getId();
  1660. // Push the return value onto the stack.
  1661. lua_pushstring(state, result);
  1662. return 1;
  1663. }
  1664. else
  1665. {
  1666. lua_pushstring(state, "lua_Form_getId - Failed to match the given parameters to a valid function signature.");
  1667. lua_error(state);
  1668. }
  1669. break;
  1670. }
  1671. default:
  1672. {
  1673. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1674. lua_error(state);
  1675. break;
  1676. }
  1677. }
  1678. return 0;
  1679. }
  1680. int lua_Form_getImageColor(lua_State* state)
  1681. {
  1682. // Get the number of parameters.
  1683. int paramCount = lua_gettop(state);
  1684. // Attempt to match the parameters to a valid binding.
  1685. switch (paramCount)
  1686. {
  1687. case 3:
  1688. {
  1689. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1690. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1691. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1692. {
  1693. // Get parameter 1 off the stack.
  1694. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1695. // Get parameter 2 off the stack.
  1696. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1697. Form* instance = getInstance(state);
  1698. void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
  1699. if (returnPtr)
  1700. {
  1701. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1702. object->instance = returnPtr;
  1703. object->owns = false;
  1704. luaL_getmetatable(state, "Vector4");
  1705. lua_setmetatable(state, -2);
  1706. }
  1707. else
  1708. {
  1709. lua_pushnil(state);
  1710. }
  1711. return 1;
  1712. }
  1713. else
  1714. {
  1715. lua_pushstring(state, "lua_Form_getImageColor - Failed to match the given parameters to a valid function signature.");
  1716. lua_error(state);
  1717. }
  1718. break;
  1719. }
  1720. default:
  1721. {
  1722. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1723. lua_error(state);
  1724. break;
  1725. }
  1726. }
  1727. return 0;
  1728. }
  1729. int lua_Form_getImageRegion(lua_State* state)
  1730. {
  1731. // Get the number of parameters.
  1732. int paramCount = lua_gettop(state);
  1733. // Attempt to match the parameters to a valid binding.
  1734. switch (paramCount)
  1735. {
  1736. case 3:
  1737. {
  1738. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1739. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1740. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1741. {
  1742. // Get parameter 1 off the stack.
  1743. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1744. // Get parameter 2 off the stack.
  1745. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1746. Form* instance = getInstance(state);
  1747. void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
  1748. if (returnPtr)
  1749. {
  1750. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1751. object->instance = returnPtr;
  1752. object->owns = false;
  1753. luaL_getmetatable(state, "Rectangle");
  1754. lua_setmetatable(state, -2);
  1755. }
  1756. else
  1757. {
  1758. lua_pushnil(state);
  1759. }
  1760. return 1;
  1761. }
  1762. else
  1763. {
  1764. lua_pushstring(state, "lua_Form_getImageRegion - Failed to match the given parameters to a valid function signature.");
  1765. lua_error(state);
  1766. }
  1767. break;
  1768. }
  1769. default:
  1770. {
  1771. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1772. lua_error(state);
  1773. break;
  1774. }
  1775. }
  1776. return 0;
  1777. }
  1778. int lua_Form_getImageUVs(lua_State* state)
  1779. {
  1780. // Get the number of parameters.
  1781. int paramCount = lua_gettop(state);
  1782. // Attempt to match the parameters to a valid binding.
  1783. switch (paramCount)
  1784. {
  1785. case 3:
  1786. {
  1787. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1788. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1789. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1790. {
  1791. // Get parameter 1 off the stack.
  1792. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1793. // Get parameter 2 off the stack.
  1794. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1795. Form* instance = getInstance(state);
  1796. void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
  1797. if (returnPtr)
  1798. {
  1799. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1800. object->instance = returnPtr;
  1801. object->owns = false;
  1802. luaL_getmetatable(state, "ThemeUVs");
  1803. lua_setmetatable(state, -2);
  1804. }
  1805. else
  1806. {
  1807. lua_pushnil(state);
  1808. }
  1809. return 1;
  1810. }
  1811. else
  1812. {
  1813. lua_pushstring(state, "lua_Form_getImageUVs - Failed to match the given parameters to a valid function signature.");
  1814. lua_error(state);
  1815. }
  1816. break;
  1817. }
  1818. default:
  1819. {
  1820. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1821. lua_error(state);
  1822. break;
  1823. }
  1824. }
  1825. return 0;
  1826. }
  1827. int lua_Form_getLayout(lua_State* state)
  1828. {
  1829. // Get the number of parameters.
  1830. int paramCount = lua_gettop(state);
  1831. // Attempt to match the parameters to a valid binding.
  1832. switch (paramCount)
  1833. {
  1834. case 1:
  1835. {
  1836. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1837. {
  1838. Form* instance = getInstance(state);
  1839. void* returnPtr = (void*)instance->getLayout();
  1840. if (returnPtr)
  1841. {
  1842. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1843. object->instance = returnPtr;
  1844. object->owns = false;
  1845. luaL_getmetatable(state, "Layout");
  1846. lua_setmetatable(state, -2);
  1847. }
  1848. else
  1849. {
  1850. lua_pushnil(state);
  1851. }
  1852. return 1;
  1853. }
  1854. else
  1855. {
  1856. lua_pushstring(state, "lua_Form_getLayout - Failed to match the given parameters to a valid function signature.");
  1857. lua_error(state);
  1858. }
  1859. break;
  1860. }
  1861. default:
  1862. {
  1863. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1864. lua_error(state);
  1865. break;
  1866. }
  1867. }
  1868. return 0;
  1869. }
  1870. int lua_Form_getMargin(lua_State* state)
  1871. {
  1872. // Get the number of parameters.
  1873. int paramCount = lua_gettop(state);
  1874. // Attempt to match the parameters to a valid binding.
  1875. switch (paramCount)
  1876. {
  1877. case 1:
  1878. {
  1879. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1880. {
  1881. Form* instance = getInstance(state);
  1882. void* returnPtr = (void*)&(instance->getMargin());
  1883. if (returnPtr)
  1884. {
  1885. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1886. object->instance = returnPtr;
  1887. object->owns = false;
  1888. luaL_getmetatable(state, "ThemeSideRegions");
  1889. lua_setmetatable(state, -2);
  1890. }
  1891. else
  1892. {
  1893. lua_pushnil(state);
  1894. }
  1895. return 1;
  1896. }
  1897. else
  1898. {
  1899. lua_pushstring(state, "lua_Form_getMargin - Failed to match the given parameters to a valid function signature.");
  1900. lua_error(state);
  1901. }
  1902. break;
  1903. }
  1904. default:
  1905. {
  1906. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1907. lua_error(state);
  1908. break;
  1909. }
  1910. }
  1911. return 0;
  1912. }
  1913. int lua_Form_getOpacity(lua_State* state)
  1914. {
  1915. // Get the number of parameters.
  1916. int paramCount = lua_gettop(state);
  1917. // Attempt to match the parameters to a valid binding.
  1918. switch (paramCount)
  1919. {
  1920. case 1:
  1921. {
  1922. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1923. {
  1924. Form* instance = getInstance(state);
  1925. float result = instance->getOpacity();
  1926. // Push the return value onto the stack.
  1927. lua_pushnumber(state, result);
  1928. return 1;
  1929. }
  1930. else
  1931. {
  1932. lua_pushstring(state, "lua_Form_getOpacity - Failed to match the given parameters to a valid function signature.");
  1933. lua_error(state);
  1934. }
  1935. break;
  1936. }
  1937. case 2:
  1938. {
  1939. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1940. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1941. {
  1942. // Get parameter 1 off the stack.
  1943. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1944. Form* instance = getInstance(state);
  1945. float result = instance->getOpacity(param1);
  1946. // Push the return value onto the stack.
  1947. lua_pushnumber(state, result);
  1948. return 1;
  1949. }
  1950. else
  1951. {
  1952. lua_pushstring(state, "lua_Form_getOpacity - Failed to match the given parameters to a valid function signature.");
  1953. lua_error(state);
  1954. }
  1955. break;
  1956. }
  1957. default:
  1958. {
  1959. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1960. lua_error(state);
  1961. break;
  1962. }
  1963. }
  1964. return 0;
  1965. }
  1966. int lua_Form_getPadding(lua_State* state)
  1967. {
  1968. // Get the number of parameters.
  1969. int paramCount = lua_gettop(state);
  1970. // Attempt to match the parameters to a valid binding.
  1971. switch (paramCount)
  1972. {
  1973. case 1:
  1974. {
  1975. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1976. {
  1977. Form* instance = getInstance(state);
  1978. void* returnPtr = (void*)&(instance->getPadding());
  1979. if (returnPtr)
  1980. {
  1981. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1982. object->instance = returnPtr;
  1983. object->owns = false;
  1984. luaL_getmetatable(state, "ThemeSideRegions");
  1985. lua_setmetatable(state, -2);
  1986. }
  1987. else
  1988. {
  1989. lua_pushnil(state);
  1990. }
  1991. return 1;
  1992. }
  1993. else
  1994. {
  1995. lua_pushstring(state, "lua_Form_getPadding - Failed to match the given parameters to a valid function signature.");
  1996. lua_error(state);
  1997. }
  1998. break;
  1999. }
  2000. default:
  2001. {
  2002. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2003. lua_error(state);
  2004. break;
  2005. }
  2006. }
  2007. return 0;
  2008. }
  2009. int lua_Form_getRefCount(lua_State* state)
  2010. {
  2011. // Get the number of parameters.
  2012. int paramCount = lua_gettop(state);
  2013. // Attempt to match the parameters to a valid binding.
  2014. switch (paramCount)
  2015. {
  2016. case 1:
  2017. {
  2018. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2019. {
  2020. Form* instance = getInstance(state);
  2021. unsigned int result = instance->getRefCount();
  2022. // Push the return value onto the stack.
  2023. lua_pushunsigned(state, result);
  2024. return 1;
  2025. }
  2026. else
  2027. {
  2028. lua_pushstring(state, "lua_Form_getRefCount - Failed to match the given parameters to a valid function signature.");
  2029. lua_error(state);
  2030. }
  2031. break;
  2032. }
  2033. default:
  2034. {
  2035. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2036. lua_error(state);
  2037. break;
  2038. }
  2039. }
  2040. return 0;
  2041. }
  2042. int lua_Form_getScroll(lua_State* state)
  2043. {
  2044. // Get the number of parameters.
  2045. int paramCount = lua_gettop(state);
  2046. // Attempt to match the parameters to a valid binding.
  2047. switch (paramCount)
  2048. {
  2049. case 1:
  2050. {
  2051. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2052. {
  2053. Form* instance = getInstance(state);
  2054. Container::Scroll result = instance->getScroll();
  2055. // Push the return value onto the stack.
  2056. lua_pushstring(state, lua_stringFromEnum_ContainerScroll(result));
  2057. return 1;
  2058. }
  2059. else
  2060. {
  2061. lua_pushstring(state, "lua_Form_getScroll - Failed to match the given parameters to a valid function signature.");
  2062. lua_error(state);
  2063. }
  2064. break;
  2065. }
  2066. default:
  2067. {
  2068. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2069. lua_error(state);
  2070. break;
  2071. }
  2072. }
  2073. return 0;
  2074. }
  2075. int lua_Form_getSkinColor(lua_State* state)
  2076. {
  2077. // Get the number of parameters.
  2078. int paramCount = lua_gettop(state);
  2079. // Attempt to match the parameters to a valid binding.
  2080. switch (paramCount)
  2081. {
  2082. case 1:
  2083. {
  2084. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2085. {
  2086. Form* instance = getInstance(state);
  2087. void* returnPtr = (void*)&(instance->getSkinColor());
  2088. if (returnPtr)
  2089. {
  2090. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2091. object->instance = returnPtr;
  2092. object->owns = false;
  2093. luaL_getmetatable(state, "Vector4");
  2094. lua_setmetatable(state, -2);
  2095. }
  2096. else
  2097. {
  2098. lua_pushnil(state);
  2099. }
  2100. return 1;
  2101. }
  2102. else
  2103. {
  2104. lua_pushstring(state, "lua_Form_getSkinColor - Failed to match the given parameters to a valid function signature.");
  2105. lua_error(state);
  2106. }
  2107. break;
  2108. }
  2109. case 2:
  2110. {
  2111. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2112. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2113. {
  2114. // Get parameter 1 off the stack.
  2115. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2116. Form* instance = getInstance(state);
  2117. void* returnPtr = (void*)&(instance->getSkinColor(param1));
  2118. if (returnPtr)
  2119. {
  2120. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2121. object->instance = returnPtr;
  2122. object->owns = false;
  2123. luaL_getmetatable(state, "Vector4");
  2124. lua_setmetatable(state, -2);
  2125. }
  2126. else
  2127. {
  2128. lua_pushnil(state);
  2129. }
  2130. return 1;
  2131. }
  2132. else
  2133. {
  2134. lua_pushstring(state, "lua_Form_getSkinColor - Failed to match the given parameters to a valid function signature.");
  2135. lua_error(state);
  2136. }
  2137. break;
  2138. }
  2139. default:
  2140. {
  2141. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2142. lua_error(state);
  2143. break;
  2144. }
  2145. }
  2146. return 0;
  2147. }
  2148. int lua_Form_getSkinRegion(lua_State* state)
  2149. {
  2150. // Get the number of parameters.
  2151. int paramCount = lua_gettop(state);
  2152. // Attempt to match the parameters to a valid binding.
  2153. switch (paramCount)
  2154. {
  2155. case 1:
  2156. {
  2157. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2158. {
  2159. Form* instance = getInstance(state);
  2160. void* returnPtr = (void*)&(instance->getSkinRegion());
  2161. if (returnPtr)
  2162. {
  2163. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2164. object->instance = returnPtr;
  2165. object->owns = false;
  2166. luaL_getmetatable(state, "Rectangle");
  2167. lua_setmetatable(state, -2);
  2168. }
  2169. else
  2170. {
  2171. lua_pushnil(state);
  2172. }
  2173. return 1;
  2174. }
  2175. else
  2176. {
  2177. lua_pushstring(state, "lua_Form_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2178. lua_error(state);
  2179. }
  2180. break;
  2181. }
  2182. case 2:
  2183. {
  2184. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2185. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2186. {
  2187. // Get parameter 1 off the stack.
  2188. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2189. Form* instance = getInstance(state);
  2190. void* returnPtr = (void*)&(instance->getSkinRegion(param1));
  2191. if (returnPtr)
  2192. {
  2193. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2194. object->instance = returnPtr;
  2195. object->owns = false;
  2196. luaL_getmetatable(state, "Rectangle");
  2197. lua_setmetatable(state, -2);
  2198. }
  2199. else
  2200. {
  2201. lua_pushnil(state);
  2202. }
  2203. return 1;
  2204. }
  2205. else
  2206. {
  2207. lua_pushstring(state, "lua_Form_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2208. lua_error(state);
  2209. }
  2210. break;
  2211. }
  2212. default:
  2213. {
  2214. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2215. lua_error(state);
  2216. break;
  2217. }
  2218. }
  2219. return 0;
  2220. }
  2221. int lua_Form_getState(lua_State* state)
  2222. {
  2223. // Get the number of parameters.
  2224. int paramCount = lua_gettop(state);
  2225. // Attempt to match the parameters to a valid binding.
  2226. switch (paramCount)
  2227. {
  2228. case 1:
  2229. {
  2230. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2231. {
  2232. Form* instance = getInstance(state);
  2233. Control::State result = instance->getState();
  2234. // Push the return value onto the stack.
  2235. lua_pushstring(state, lua_stringFromEnum_ControlState(result));
  2236. return 1;
  2237. }
  2238. else
  2239. {
  2240. lua_pushstring(state, "lua_Form_getState - Failed to match the given parameters to a valid function signature.");
  2241. lua_error(state);
  2242. }
  2243. break;
  2244. }
  2245. default:
  2246. {
  2247. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2248. lua_error(state);
  2249. break;
  2250. }
  2251. }
  2252. return 0;
  2253. }
  2254. int lua_Form_getStyle(lua_State* state)
  2255. {
  2256. // Get the number of parameters.
  2257. int paramCount = lua_gettop(state);
  2258. // Attempt to match the parameters to a valid binding.
  2259. switch (paramCount)
  2260. {
  2261. case 1:
  2262. {
  2263. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2264. {
  2265. Form* instance = getInstance(state);
  2266. void* returnPtr = (void*)instance->getStyle();
  2267. if (returnPtr)
  2268. {
  2269. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2270. object->instance = returnPtr;
  2271. object->owns = false;
  2272. luaL_getmetatable(state, "ThemeStyle");
  2273. lua_setmetatable(state, -2);
  2274. }
  2275. else
  2276. {
  2277. lua_pushnil(state);
  2278. }
  2279. return 1;
  2280. }
  2281. else
  2282. {
  2283. lua_pushstring(state, "lua_Form_getStyle - Failed to match the given parameters to a valid function signature.");
  2284. lua_error(state);
  2285. }
  2286. break;
  2287. }
  2288. default:
  2289. {
  2290. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2291. lua_error(state);
  2292. break;
  2293. }
  2294. }
  2295. return 0;
  2296. }
  2297. int lua_Form_getTextAlignment(lua_State* state)
  2298. {
  2299. // Get the number of parameters.
  2300. int paramCount = lua_gettop(state);
  2301. // Attempt to match the parameters to a valid binding.
  2302. switch (paramCount)
  2303. {
  2304. case 1:
  2305. {
  2306. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2307. {
  2308. Form* instance = getInstance(state);
  2309. Font::Justify result = instance->getTextAlignment();
  2310. // Push the return value onto the stack.
  2311. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2312. return 1;
  2313. }
  2314. else
  2315. {
  2316. lua_pushstring(state, "lua_Form_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2317. lua_error(state);
  2318. }
  2319. break;
  2320. }
  2321. case 2:
  2322. {
  2323. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2324. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2325. {
  2326. // Get parameter 1 off the stack.
  2327. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2328. Form* instance = getInstance(state);
  2329. Font::Justify result = instance->getTextAlignment(param1);
  2330. // Push the return value onto the stack.
  2331. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2332. return 1;
  2333. }
  2334. else
  2335. {
  2336. lua_pushstring(state, "lua_Form_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2337. lua_error(state);
  2338. }
  2339. break;
  2340. }
  2341. default:
  2342. {
  2343. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2344. lua_error(state);
  2345. break;
  2346. }
  2347. }
  2348. return 0;
  2349. }
  2350. int lua_Form_getTextColor(lua_State* state)
  2351. {
  2352. // Get the number of parameters.
  2353. int paramCount = lua_gettop(state);
  2354. // Attempt to match the parameters to a valid binding.
  2355. switch (paramCount)
  2356. {
  2357. case 1:
  2358. {
  2359. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2360. {
  2361. Form* instance = getInstance(state);
  2362. void* returnPtr = (void*)&(instance->getTextColor());
  2363. if (returnPtr)
  2364. {
  2365. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2366. object->instance = returnPtr;
  2367. object->owns = false;
  2368. luaL_getmetatable(state, "Vector4");
  2369. lua_setmetatable(state, -2);
  2370. }
  2371. else
  2372. {
  2373. lua_pushnil(state);
  2374. }
  2375. return 1;
  2376. }
  2377. else
  2378. {
  2379. lua_pushstring(state, "lua_Form_getTextColor - Failed to match the given parameters to a valid function signature.");
  2380. lua_error(state);
  2381. }
  2382. break;
  2383. }
  2384. case 2:
  2385. {
  2386. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2387. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2388. {
  2389. // Get parameter 1 off the stack.
  2390. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2391. Form* instance = getInstance(state);
  2392. void* returnPtr = (void*)&(instance->getTextColor(param1));
  2393. if (returnPtr)
  2394. {
  2395. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2396. object->instance = returnPtr;
  2397. object->owns = false;
  2398. luaL_getmetatable(state, "Vector4");
  2399. lua_setmetatable(state, -2);
  2400. }
  2401. else
  2402. {
  2403. lua_pushnil(state);
  2404. }
  2405. return 1;
  2406. }
  2407. else
  2408. {
  2409. lua_pushstring(state, "lua_Form_getTextColor - Failed to match the given parameters to a valid function signature.");
  2410. lua_error(state);
  2411. }
  2412. break;
  2413. }
  2414. default:
  2415. {
  2416. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2417. lua_error(state);
  2418. break;
  2419. }
  2420. }
  2421. return 0;
  2422. }
  2423. int lua_Form_getTextRightToLeft(lua_State* state)
  2424. {
  2425. // Get the number of parameters.
  2426. int paramCount = lua_gettop(state);
  2427. // Attempt to match the parameters to a valid binding.
  2428. switch (paramCount)
  2429. {
  2430. case 1:
  2431. {
  2432. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2433. {
  2434. Form* instance = getInstance(state);
  2435. bool result = instance->getTextRightToLeft();
  2436. // Push the return value onto the stack.
  2437. lua_pushboolean(state, result);
  2438. return 1;
  2439. }
  2440. else
  2441. {
  2442. lua_pushstring(state, "lua_Form_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2443. lua_error(state);
  2444. }
  2445. break;
  2446. }
  2447. case 2:
  2448. {
  2449. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2450. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2451. {
  2452. // Get parameter 1 off the stack.
  2453. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2454. Form* instance = getInstance(state);
  2455. bool result = instance->getTextRightToLeft(param1);
  2456. // Push the return value onto the stack.
  2457. lua_pushboolean(state, result);
  2458. return 1;
  2459. }
  2460. else
  2461. {
  2462. lua_pushstring(state, "lua_Form_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2463. lua_error(state);
  2464. }
  2465. break;
  2466. }
  2467. default:
  2468. {
  2469. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2470. lua_error(state);
  2471. break;
  2472. }
  2473. }
  2474. return 0;
  2475. }
  2476. int lua_Form_getTheme(lua_State* state)
  2477. {
  2478. // Get the number of parameters.
  2479. int paramCount = lua_gettop(state);
  2480. // Attempt to match the parameters to a valid binding.
  2481. switch (paramCount)
  2482. {
  2483. case 1:
  2484. {
  2485. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2486. {
  2487. Form* instance = getInstance(state);
  2488. void* returnPtr = (void*)instance->getTheme();
  2489. if (returnPtr)
  2490. {
  2491. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2492. object->instance = returnPtr;
  2493. object->owns = false;
  2494. luaL_getmetatable(state, "Theme");
  2495. lua_setmetatable(state, -2);
  2496. }
  2497. else
  2498. {
  2499. lua_pushnil(state);
  2500. }
  2501. return 1;
  2502. }
  2503. else
  2504. {
  2505. lua_pushstring(state, "lua_Form_getTheme - Failed to match the given parameters to a valid function signature.");
  2506. lua_error(state);
  2507. }
  2508. break;
  2509. }
  2510. default:
  2511. {
  2512. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2513. lua_error(state);
  2514. break;
  2515. }
  2516. }
  2517. return 0;
  2518. }
  2519. int lua_Form_getType(lua_State* state)
  2520. {
  2521. // Get the number of parameters.
  2522. int paramCount = lua_gettop(state);
  2523. // Attempt to match the parameters to a valid binding.
  2524. switch (paramCount)
  2525. {
  2526. case 1:
  2527. {
  2528. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2529. {
  2530. Form* instance = getInstance(state);
  2531. const char* result = instance->getType();
  2532. // Push the return value onto the stack.
  2533. lua_pushstring(state, result);
  2534. return 1;
  2535. }
  2536. else
  2537. {
  2538. lua_pushstring(state, "lua_Form_getType - Failed to match the given parameters to a valid function signature.");
  2539. lua_error(state);
  2540. }
  2541. break;
  2542. }
  2543. default:
  2544. {
  2545. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2546. lua_error(state);
  2547. break;
  2548. }
  2549. }
  2550. return 0;
  2551. }
  2552. int lua_Form_getWidth(lua_State* state)
  2553. {
  2554. // Get the number of parameters.
  2555. int paramCount = lua_gettop(state);
  2556. // Attempt to match the parameters to a valid binding.
  2557. switch (paramCount)
  2558. {
  2559. case 1:
  2560. {
  2561. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2562. {
  2563. Form* instance = getInstance(state);
  2564. float result = instance->getWidth();
  2565. // Push the return value onto the stack.
  2566. lua_pushnumber(state, result);
  2567. return 1;
  2568. }
  2569. else
  2570. {
  2571. lua_pushstring(state, "lua_Form_getWidth - Failed to match the given parameters to a valid function signature.");
  2572. lua_error(state);
  2573. }
  2574. break;
  2575. }
  2576. default:
  2577. {
  2578. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2579. lua_error(state);
  2580. break;
  2581. }
  2582. }
  2583. return 0;
  2584. }
  2585. int lua_Form_getX(lua_State* state)
  2586. {
  2587. // Get the number of parameters.
  2588. int paramCount = lua_gettop(state);
  2589. // Attempt to match the parameters to a valid binding.
  2590. switch (paramCount)
  2591. {
  2592. case 1:
  2593. {
  2594. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2595. {
  2596. Form* instance = getInstance(state);
  2597. float result = instance->getX();
  2598. // Push the return value onto the stack.
  2599. lua_pushnumber(state, result);
  2600. return 1;
  2601. }
  2602. else
  2603. {
  2604. lua_pushstring(state, "lua_Form_getX - Failed to match the given parameters to a valid function signature.");
  2605. lua_error(state);
  2606. }
  2607. break;
  2608. }
  2609. default:
  2610. {
  2611. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2612. lua_error(state);
  2613. break;
  2614. }
  2615. }
  2616. return 0;
  2617. }
  2618. int lua_Form_getY(lua_State* state)
  2619. {
  2620. // Get the number of parameters.
  2621. int paramCount = lua_gettop(state);
  2622. // Attempt to match the parameters to a valid binding.
  2623. switch (paramCount)
  2624. {
  2625. case 1:
  2626. {
  2627. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2628. {
  2629. Form* instance = getInstance(state);
  2630. float result = instance->getY();
  2631. // Push the return value onto the stack.
  2632. lua_pushnumber(state, result);
  2633. return 1;
  2634. }
  2635. else
  2636. {
  2637. lua_pushstring(state, "lua_Form_getY - Failed to match the given parameters to a valid function signature.");
  2638. lua_error(state);
  2639. }
  2640. break;
  2641. }
  2642. default:
  2643. {
  2644. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2645. lua_error(state);
  2646. break;
  2647. }
  2648. }
  2649. return 0;
  2650. }
  2651. int lua_Form_getZIndex(lua_State* state)
  2652. {
  2653. // Get the number of parameters.
  2654. int paramCount = lua_gettop(state);
  2655. // Attempt to match the parameters to a valid binding.
  2656. switch (paramCount)
  2657. {
  2658. case 1:
  2659. {
  2660. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2661. {
  2662. Form* instance = getInstance(state);
  2663. int result = instance->getZIndex();
  2664. // Push the return value onto the stack.
  2665. lua_pushinteger(state, result);
  2666. return 1;
  2667. }
  2668. else
  2669. {
  2670. lua_pushstring(state, "lua_Form_getZIndex - Failed to match the given parameters to a valid function signature.");
  2671. lua_error(state);
  2672. }
  2673. break;
  2674. }
  2675. default:
  2676. {
  2677. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2678. lua_error(state);
  2679. break;
  2680. }
  2681. }
  2682. return 0;
  2683. }
  2684. int lua_Form_insertControl(lua_State* state)
  2685. {
  2686. // Get the number of parameters.
  2687. int paramCount = lua_gettop(state);
  2688. // Attempt to match the parameters to a valid binding.
  2689. switch (paramCount)
  2690. {
  2691. case 3:
  2692. {
  2693. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2694. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  2695. lua_type(state, 3) == LUA_TNUMBER)
  2696. {
  2697. // Get parameter 1 off the stack.
  2698. ScriptUtil::LuaArray<Control> param1 = ScriptUtil::getObjectPointer<Control>(2, "Control", false);
  2699. // Get parameter 2 off the stack.
  2700. unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
  2701. Form* instance = getInstance(state);
  2702. instance->insertControl(param1, param2);
  2703. return 0;
  2704. }
  2705. else
  2706. {
  2707. lua_pushstring(state, "lua_Form_insertControl - Failed to match the given parameters to a valid function signature.");
  2708. lua_error(state);
  2709. }
  2710. break;
  2711. }
  2712. default:
  2713. {
  2714. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2715. lua_error(state);
  2716. break;
  2717. }
  2718. }
  2719. return 0;
  2720. }
  2721. int lua_Form_isContainer(lua_State* state)
  2722. {
  2723. // Get the number of parameters.
  2724. int paramCount = lua_gettop(state);
  2725. // Attempt to match the parameters to a valid binding.
  2726. switch (paramCount)
  2727. {
  2728. case 1:
  2729. {
  2730. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2731. {
  2732. Form* instance = getInstance(state);
  2733. bool result = instance->isContainer();
  2734. // Push the return value onto the stack.
  2735. lua_pushboolean(state, result);
  2736. return 1;
  2737. }
  2738. else
  2739. {
  2740. lua_pushstring(state, "lua_Form_isContainer - Failed to match the given parameters to a valid function signature.");
  2741. lua_error(state);
  2742. }
  2743. break;
  2744. }
  2745. default:
  2746. {
  2747. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2748. lua_error(state);
  2749. break;
  2750. }
  2751. }
  2752. return 0;
  2753. }
  2754. int lua_Form_isEnabled(lua_State* state)
  2755. {
  2756. // Get the number of parameters.
  2757. int paramCount = lua_gettop(state);
  2758. // Attempt to match the parameters to a valid binding.
  2759. switch (paramCount)
  2760. {
  2761. case 1:
  2762. {
  2763. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2764. {
  2765. Form* instance = getInstance(state);
  2766. bool result = instance->isEnabled();
  2767. // Push the return value onto the stack.
  2768. lua_pushboolean(state, result);
  2769. return 1;
  2770. }
  2771. else
  2772. {
  2773. lua_pushstring(state, "lua_Form_isEnabled - Failed to match the given parameters to a valid function signature.");
  2774. lua_error(state);
  2775. }
  2776. break;
  2777. }
  2778. default:
  2779. {
  2780. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2781. lua_error(state);
  2782. break;
  2783. }
  2784. }
  2785. return 0;
  2786. }
  2787. int lua_Form_isScrollBarsAutoHide(lua_State* state)
  2788. {
  2789. // Get the number of parameters.
  2790. int paramCount = lua_gettop(state);
  2791. // Attempt to match the parameters to a valid binding.
  2792. switch (paramCount)
  2793. {
  2794. case 1:
  2795. {
  2796. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2797. {
  2798. Form* instance = getInstance(state);
  2799. bool result = instance->isScrollBarsAutoHide();
  2800. // Push the return value onto the stack.
  2801. lua_pushboolean(state, result);
  2802. return 1;
  2803. }
  2804. else
  2805. {
  2806. lua_pushstring(state, "lua_Form_isScrollBarsAutoHide - Failed to match the given parameters to a valid function signature.");
  2807. lua_error(state);
  2808. }
  2809. break;
  2810. }
  2811. default:
  2812. {
  2813. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2814. lua_error(state);
  2815. break;
  2816. }
  2817. }
  2818. return 0;
  2819. }
  2820. int lua_Form_release(lua_State* state)
  2821. {
  2822. // Get the number of parameters.
  2823. int paramCount = lua_gettop(state);
  2824. // Attempt to match the parameters to a valid binding.
  2825. switch (paramCount)
  2826. {
  2827. case 1:
  2828. {
  2829. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2830. {
  2831. Form* instance = getInstance(state);
  2832. instance->release();
  2833. return 0;
  2834. }
  2835. else
  2836. {
  2837. lua_pushstring(state, "lua_Form_release - Failed to match the given parameters to a valid function signature.");
  2838. lua_error(state);
  2839. }
  2840. break;
  2841. }
  2842. default:
  2843. {
  2844. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2845. lua_error(state);
  2846. break;
  2847. }
  2848. }
  2849. return 0;
  2850. }
  2851. int lua_Form_removeControl(lua_State* state)
  2852. {
  2853. // Get the number of parameters.
  2854. int paramCount = lua_gettop(state);
  2855. // Attempt to match the parameters to a valid binding.
  2856. switch (paramCount)
  2857. {
  2858. case 2:
  2859. {
  2860. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2861. lua_type(state, 2) == LUA_TNUMBER)
  2862. {
  2863. // Get parameter 1 off the stack.
  2864. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  2865. Form* instance = getInstance(state);
  2866. instance->removeControl(param1);
  2867. return 0;
  2868. }
  2869. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2870. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2871. {
  2872. // Get parameter 1 off the stack.
  2873. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  2874. Form* instance = getInstance(state);
  2875. instance->removeControl(param1);
  2876. return 0;
  2877. }
  2878. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2879. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2880. {
  2881. // Get parameter 1 off the stack.
  2882. ScriptUtil::LuaArray<Control> param1 = ScriptUtil::getObjectPointer<Control>(2, "Control", false);
  2883. Form* instance = getInstance(state);
  2884. instance->removeControl(param1);
  2885. return 0;
  2886. }
  2887. else
  2888. {
  2889. lua_pushstring(state, "lua_Form_removeControl - Failed to match the given parameters to a valid function signature.");
  2890. lua_error(state);
  2891. }
  2892. break;
  2893. }
  2894. default:
  2895. {
  2896. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2897. lua_error(state);
  2898. break;
  2899. }
  2900. }
  2901. return 0;
  2902. }
  2903. int lua_Form_removeScriptCallback(lua_State* state)
  2904. {
  2905. // Get the number of parameters.
  2906. int paramCount = lua_gettop(state);
  2907. // Attempt to match the parameters to a valid binding.
  2908. switch (paramCount)
  2909. {
  2910. case 3:
  2911. {
  2912. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2913. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  2914. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  2915. {
  2916. // Get parameter 1 off the stack.
  2917. std::string param1 = ScriptUtil::getString(2, true);
  2918. // Get parameter 2 off the stack.
  2919. std::string param2 = ScriptUtil::getString(3, true);
  2920. Form* instance = getInstance(state);
  2921. instance->removeScriptCallback(param1, param2);
  2922. return 0;
  2923. }
  2924. else
  2925. {
  2926. lua_pushstring(state, "lua_Form_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  2927. lua_error(state);
  2928. }
  2929. break;
  2930. }
  2931. default:
  2932. {
  2933. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2934. lua_error(state);
  2935. break;
  2936. }
  2937. }
  2938. return 0;
  2939. }
  2940. int lua_Form_setAlignment(lua_State* state)
  2941. {
  2942. // Get the number of parameters.
  2943. int paramCount = lua_gettop(state);
  2944. // Attempt to match the parameters to a valid binding.
  2945. switch (paramCount)
  2946. {
  2947. case 2:
  2948. {
  2949. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2950. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2951. {
  2952. // Get parameter 1 off the stack.
  2953. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
  2954. Form* instance = getInstance(state);
  2955. instance->setAlignment(param1);
  2956. return 0;
  2957. }
  2958. else
  2959. {
  2960. lua_pushstring(state, "lua_Form_setAlignment - Failed to match the given parameters to a valid function signature.");
  2961. lua_error(state);
  2962. }
  2963. break;
  2964. }
  2965. default:
  2966. {
  2967. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2968. lua_error(state);
  2969. break;
  2970. }
  2971. }
  2972. return 0;
  2973. }
  2974. int lua_Form_setAnimationPropertyValue(lua_State* state)
  2975. {
  2976. // Get the number of parameters.
  2977. int paramCount = lua_gettop(state);
  2978. // Attempt to match the parameters to a valid binding.
  2979. switch (paramCount)
  2980. {
  2981. case 3:
  2982. {
  2983. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2984. lua_type(state, 2) == LUA_TNUMBER &&
  2985. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2986. {
  2987. // Get parameter 1 off the stack.
  2988. int param1 = (int)luaL_checkint(state, 2);
  2989. // Get parameter 2 off the stack.
  2990. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2991. Form* instance = getInstance(state);
  2992. instance->setAnimationPropertyValue(param1, param2);
  2993. return 0;
  2994. }
  2995. else
  2996. {
  2997. lua_pushstring(state, "lua_Form_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2998. lua_error(state);
  2999. }
  3000. break;
  3001. }
  3002. case 4:
  3003. {
  3004. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3005. lua_type(state, 2) == LUA_TNUMBER &&
  3006. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  3007. lua_type(state, 4) == LUA_TNUMBER)
  3008. {
  3009. // Get parameter 1 off the stack.
  3010. int param1 = (int)luaL_checkint(state, 2);
  3011. // Get parameter 2 off the stack.
  3012. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  3013. // Get parameter 3 off the stack.
  3014. float param3 = (float)luaL_checknumber(state, 4);
  3015. Form* instance = getInstance(state);
  3016. instance->setAnimationPropertyValue(param1, param2, param3);
  3017. return 0;
  3018. }
  3019. else
  3020. {
  3021. lua_pushstring(state, "lua_Form_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  3022. lua_error(state);
  3023. }
  3024. break;
  3025. }
  3026. default:
  3027. {
  3028. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3029. lua_error(state);
  3030. break;
  3031. }
  3032. }
  3033. return 0;
  3034. }
  3035. int lua_Form_setAutoHeight(lua_State* state)
  3036. {
  3037. // Get the number of parameters.
  3038. int paramCount = lua_gettop(state);
  3039. // Attempt to match the parameters to a valid binding.
  3040. switch (paramCount)
  3041. {
  3042. case 2:
  3043. {
  3044. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3045. lua_type(state, 2) == LUA_TBOOLEAN)
  3046. {
  3047. // Get parameter 1 off the stack.
  3048. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3049. Form* instance = getInstance(state);
  3050. instance->setAutoHeight(param1);
  3051. return 0;
  3052. }
  3053. else
  3054. {
  3055. lua_pushstring(state, "lua_Form_setAutoHeight - Failed to match the given parameters to a valid function signature.");
  3056. lua_error(state);
  3057. }
  3058. break;
  3059. }
  3060. default:
  3061. {
  3062. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3063. lua_error(state);
  3064. break;
  3065. }
  3066. }
  3067. return 0;
  3068. }
  3069. int lua_Form_setAutoWidth(lua_State* state)
  3070. {
  3071. // Get the number of parameters.
  3072. int paramCount = lua_gettop(state);
  3073. // Attempt to match the parameters to a valid binding.
  3074. switch (paramCount)
  3075. {
  3076. case 2:
  3077. {
  3078. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3079. lua_type(state, 2) == LUA_TBOOLEAN)
  3080. {
  3081. // Get parameter 1 off the stack.
  3082. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3083. Form* instance = getInstance(state);
  3084. instance->setAutoWidth(param1);
  3085. return 0;
  3086. }
  3087. else
  3088. {
  3089. lua_pushstring(state, "lua_Form_setAutoWidth - Failed to match the given parameters to a valid function signature.");
  3090. lua_error(state);
  3091. }
  3092. break;
  3093. }
  3094. default:
  3095. {
  3096. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3097. lua_error(state);
  3098. break;
  3099. }
  3100. }
  3101. return 0;
  3102. }
  3103. int lua_Form_setBorder(lua_State* state)
  3104. {
  3105. // Get the number of parameters.
  3106. int paramCount = lua_gettop(state);
  3107. // Attempt to match the parameters to a valid binding.
  3108. switch (paramCount)
  3109. {
  3110. case 5:
  3111. {
  3112. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3113. lua_type(state, 2) == LUA_TNUMBER &&
  3114. lua_type(state, 3) == LUA_TNUMBER &&
  3115. lua_type(state, 4) == LUA_TNUMBER &&
  3116. lua_type(state, 5) == LUA_TNUMBER)
  3117. {
  3118. // Get parameter 1 off the stack.
  3119. float param1 = (float)luaL_checknumber(state, 2);
  3120. // Get parameter 2 off the stack.
  3121. float param2 = (float)luaL_checknumber(state, 3);
  3122. // Get parameter 3 off the stack.
  3123. float param3 = (float)luaL_checknumber(state, 4);
  3124. // Get parameter 4 off the stack.
  3125. float param4 = (float)luaL_checknumber(state, 5);
  3126. Form* instance = getInstance(state);
  3127. instance->setBorder(param1, param2, param3, param4);
  3128. return 0;
  3129. }
  3130. else
  3131. {
  3132. lua_pushstring(state, "lua_Form_setBorder - Failed to match the given parameters to a valid function signature.");
  3133. lua_error(state);
  3134. }
  3135. break;
  3136. }
  3137. case 6:
  3138. {
  3139. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3140. lua_type(state, 2) == LUA_TNUMBER &&
  3141. lua_type(state, 3) == LUA_TNUMBER &&
  3142. lua_type(state, 4) == LUA_TNUMBER &&
  3143. lua_type(state, 5) == LUA_TNUMBER &&
  3144. lua_type(state, 6) == LUA_TNUMBER)
  3145. {
  3146. // Get parameter 1 off the stack.
  3147. float param1 = (float)luaL_checknumber(state, 2);
  3148. // Get parameter 2 off the stack.
  3149. float param2 = (float)luaL_checknumber(state, 3);
  3150. // Get parameter 3 off the stack.
  3151. float param3 = (float)luaL_checknumber(state, 4);
  3152. // Get parameter 4 off the stack.
  3153. float param4 = (float)luaL_checknumber(state, 5);
  3154. // Get parameter 5 off the stack.
  3155. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
  3156. Form* instance = getInstance(state);
  3157. instance->setBorder(param1, param2, param3, param4, param5);
  3158. return 0;
  3159. }
  3160. else
  3161. {
  3162. lua_pushstring(state, "lua_Form_setBorder - Failed to match the given parameters to a valid function signature.");
  3163. lua_error(state);
  3164. }
  3165. break;
  3166. }
  3167. default:
  3168. {
  3169. lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
  3170. lua_error(state);
  3171. break;
  3172. }
  3173. }
  3174. return 0;
  3175. }
  3176. int lua_Form_setBounds(lua_State* state)
  3177. {
  3178. // Get the number of parameters.
  3179. int paramCount = lua_gettop(state);
  3180. // Attempt to match the parameters to a valid binding.
  3181. switch (paramCount)
  3182. {
  3183. case 2:
  3184. {
  3185. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3186. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3187. {
  3188. // Get parameter 1 off the stack.
  3189. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3190. Form* instance = getInstance(state);
  3191. instance->setBounds(*param1);
  3192. return 0;
  3193. }
  3194. else
  3195. {
  3196. lua_pushstring(state, "lua_Form_setBounds - Failed to match the given parameters to a valid function signature.");
  3197. lua_error(state);
  3198. }
  3199. break;
  3200. }
  3201. default:
  3202. {
  3203. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3204. lua_error(state);
  3205. break;
  3206. }
  3207. }
  3208. return 0;
  3209. }
  3210. int lua_Form_setConsumeInputEvents(lua_State* state)
  3211. {
  3212. // Get the number of parameters.
  3213. int paramCount = lua_gettop(state);
  3214. // Attempt to match the parameters to a valid binding.
  3215. switch (paramCount)
  3216. {
  3217. case 2:
  3218. {
  3219. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3220. lua_type(state, 2) == LUA_TBOOLEAN)
  3221. {
  3222. // Get parameter 1 off the stack.
  3223. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3224. Form* instance = getInstance(state);
  3225. instance->setConsumeInputEvents(param1);
  3226. return 0;
  3227. }
  3228. else
  3229. {
  3230. lua_pushstring(state, "lua_Form_setConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  3231. lua_error(state);
  3232. }
  3233. break;
  3234. }
  3235. default:
  3236. {
  3237. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3238. lua_error(state);
  3239. break;
  3240. }
  3241. }
  3242. return 0;
  3243. }
  3244. int lua_Form_setCursorColor(lua_State* state)
  3245. {
  3246. // Get the number of parameters.
  3247. int paramCount = lua_gettop(state);
  3248. // Attempt to match the parameters to a valid binding.
  3249. switch (paramCount)
  3250. {
  3251. case 3:
  3252. {
  3253. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3254. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3255. lua_type(state, 3) == LUA_TNUMBER)
  3256. {
  3257. // Get parameter 1 off the stack.
  3258. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3259. // Get parameter 2 off the stack.
  3260. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3261. Form* instance = getInstance(state);
  3262. instance->setCursorColor(*param1, param2);
  3263. return 0;
  3264. }
  3265. else
  3266. {
  3267. lua_pushstring(state, "lua_Form_setCursorColor - Failed to match the given parameters to a valid function signature.");
  3268. lua_error(state);
  3269. }
  3270. break;
  3271. }
  3272. default:
  3273. {
  3274. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3275. lua_error(state);
  3276. break;
  3277. }
  3278. }
  3279. return 0;
  3280. }
  3281. int lua_Form_setCursorRegion(lua_State* state)
  3282. {
  3283. // Get the number of parameters.
  3284. int paramCount = lua_gettop(state);
  3285. // Attempt to match the parameters to a valid binding.
  3286. switch (paramCount)
  3287. {
  3288. case 3:
  3289. {
  3290. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3291. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3292. lua_type(state, 3) == LUA_TNUMBER)
  3293. {
  3294. // Get parameter 1 off the stack.
  3295. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3296. // Get parameter 2 off the stack.
  3297. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3298. Form* instance = getInstance(state);
  3299. instance->setCursorRegion(*param1, param2);
  3300. return 0;
  3301. }
  3302. else
  3303. {
  3304. lua_pushstring(state, "lua_Form_setCursorRegion - Failed to match the given parameters to a valid function signature.");
  3305. lua_error(state);
  3306. }
  3307. break;
  3308. }
  3309. default:
  3310. {
  3311. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3312. lua_error(state);
  3313. break;
  3314. }
  3315. }
  3316. return 0;
  3317. }
  3318. int lua_Form_setFocusIndex(lua_State* state)
  3319. {
  3320. // Get the number of parameters.
  3321. int paramCount = lua_gettop(state);
  3322. // Attempt to match the parameters to a valid binding.
  3323. switch (paramCount)
  3324. {
  3325. case 2:
  3326. {
  3327. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3328. lua_type(state, 2) == LUA_TNUMBER)
  3329. {
  3330. // Get parameter 1 off the stack.
  3331. int param1 = (int)luaL_checkint(state, 2);
  3332. Form* instance = getInstance(state);
  3333. instance->setFocusIndex(param1);
  3334. return 0;
  3335. }
  3336. else
  3337. {
  3338. lua_pushstring(state, "lua_Form_setFocusIndex - Failed to match the given parameters to a valid function signature.");
  3339. lua_error(state);
  3340. }
  3341. break;
  3342. }
  3343. default:
  3344. {
  3345. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3346. lua_error(state);
  3347. break;
  3348. }
  3349. }
  3350. return 0;
  3351. }
  3352. int lua_Form_setFont(lua_State* state)
  3353. {
  3354. // Get the number of parameters.
  3355. int paramCount = lua_gettop(state);
  3356. // Attempt to match the parameters to a valid binding.
  3357. switch (paramCount)
  3358. {
  3359. case 2:
  3360. {
  3361. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3362. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3363. {
  3364. // Get parameter 1 off the stack.
  3365. ScriptUtil::LuaArray<Font> param1 = ScriptUtil::getObjectPointer<Font>(2, "Font", false);
  3366. Form* instance = getInstance(state);
  3367. instance->setFont(param1);
  3368. return 0;
  3369. }
  3370. else
  3371. {
  3372. lua_pushstring(state, "lua_Form_setFont - Failed to match the given parameters to a valid function signature.");
  3373. lua_error(state);
  3374. }
  3375. break;
  3376. }
  3377. case 3:
  3378. {
  3379. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3380. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  3381. lua_type(state, 3) == LUA_TNUMBER)
  3382. {
  3383. // Get parameter 1 off the stack.
  3384. ScriptUtil::LuaArray<Font> param1 = ScriptUtil::getObjectPointer<Font>(2, "Font", false);
  3385. // Get parameter 2 off the stack.
  3386. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3387. Form* instance = getInstance(state);
  3388. instance->setFont(param1, param2);
  3389. return 0;
  3390. }
  3391. else
  3392. {
  3393. lua_pushstring(state, "lua_Form_setFont - Failed to match the given parameters to a valid function signature.");
  3394. lua_error(state);
  3395. }
  3396. break;
  3397. }
  3398. default:
  3399. {
  3400. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3401. lua_error(state);
  3402. break;
  3403. }
  3404. }
  3405. return 0;
  3406. }
  3407. int lua_Form_setFontSize(lua_State* state)
  3408. {
  3409. // Get the number of parameters.
  3410. int paramCount = lua_gettop(state);
  3411. // Attempt to match the parameters to a valid binding.
  3412. switch (paramCount)
  3413. {
  3414. case 2:
  3415. {
  3416. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3417. lua_type(state, 2) == LUA_TNUMBER)
  3418. {
  3419. // Get parameter 1 off the stack.
  3420. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3421. Form* instance = getInstance(state);
  3422. instance->setFontSize(param1);
  3423. return 0;
  3424. }
  3425. else
  3426. {
  3427. lua_pushstring(state, "lua_Form_setFontSize - Failed to match the given parameters to a valid function signature.");
  3428. lua_error(state);
  3429. }
  3430. break;
  3431. }
  3432. case 3:
  3433. {
  3434. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3435. lua_type(state, 2) == LUA_TNUMBER &&
  3436. lua_type(state, 3) == LUA_TNUMBER)
  3437. {
  3438. // Get parameter 1 off the stack.
  3439. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3440. // Get parameter 2 off the stack.
  3441. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3442. Form* instance = getInstance(state);
  3443. instance->setFontSize(param1, param2);
  3444. return 0;
  3445. }
  3446. else
  3447. {
  3448. lua_pushstring(state, "lua_Form_setFontSize - Failed to match the given parameters to a valid function signature.");
  3449. lua_error(state);
  3450. }
  3451. break;
  3452. }
  3453. default:
  3454. {
  3455. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3456. lua_error(state);
  3457. break;
  3458. }
  3459. }
  3460. return 0;
  3461. }
  3462. int lua_Form_setHeight(lua_State* state)
  3463. {
  3464. // Get the number of parameters.
  3465. int paramCount = lua_gettop(state);
  3466. // Attempt to match the parameters to a valid binding.
  3467. switch (paramCount)
  3468. {
  3469. case 2:
  3470. {
  3471. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3472. lua_type(state, 2) == LUA_TNUMBER)
  3473. {
  3474. // Get parameter 1 off the stack.
  3475. float param1 = (float)luaL_checknumber(state, 2);
  3476. Form* instance = getInstance(state);
  3477. instance->setHeight(param1);
  3478. return 0;
  3479. }
  3480. else
  3481. {
  3482. lua_pushstring(state, "lua_Form_setHeight - Failed to match the given parameters to a valid function signature.");
  3483. lua_error(state);
  3484. }
  3485. break;
  3486. }
  3487. default:
  3488. {
  3489. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3490. lua_error(state);
  3491. break;
  3492. }
  3493. }
  3494. return 0;
  3495. }
  3496. int lua_Form_setImageColor(lua_State* state)
  3497. {
  3498. // Get the number of parameters.
  3499. int paramCount = lua_gettop(state);
  3500. // Attempt to match the parameters to a valid binding.
  3501. switch (paramCount)
  3502. {
  3503. case 3:
  3504. {
  3505. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3506. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3507. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3508. {
  3509. // Get parameter 1 off the stack.
  3510. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3511. // Get parameter 2 off the stack.
  3512. ScriptUtil::LuaArray<Vector4> param2 = ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true);
  3513. Form* instance = getInstance(state);
  3514. instance->setImageColor(param1, *param2);
  3515. return 0;
  3516. }
  3517. else
  3518. {
  3519. lua_pushstring(state, "lua_Form_setImageColor - Failed to match the given parameters to a valid function signature.");
  3520. lua_error(state);
  3521. }
  3522. break;
  3523. }
  3524. case 4:
  3525. {
  3526. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3527. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3528. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3529. lua_type(state, 4) == LUA_TNUMBER)
  3530. {
  3531. // Get parameter 1 off the stack.
  3532. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3533. // Get parameter 2 off the stack.
  3534. ScriptUtil::LuaArray<Vector4> param2 = ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true);
  3535. // Get parameter 3 off the stack.
  3536. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3537. Form* instance = getInstance(state);
  3538. instance->setImageColor(param1, *param2, param3);
  3539. return 0;
  3540. }
  3541. else
  3542. {
  3543. lua_pushstring(state, "lua_Form_setImageColor - 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 3 or 4).");
  3551. lua_error(state);
  3552. break;
  3553. }
  3554. }
  3555. return 0;
  3556. }
  3557. int lua_Form_setImageRegion(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 3:
  3565. {
  3566. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3567. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3568. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3569. {
  3570. // Get parameter 1 off the stack.
  3571. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3572. // Get parameter 2 off the stack.
  3573. ScriptUtil::LuaArray<Rectangle> param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
  3574. Form* instance = getInstance(state);
  3575. instance->setImageRegion(param1, *param2);
  3576. return 0;
  3577. }
  3578. else
  3579. {
  3580. lua_pushstring(state, "lua_Form_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3581. lua_error(state);
  3582. }
  3583. break;
  3584. }
  3585. case 4:
  3586. {
  3587. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3588. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3589. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3590. lua_type(state, 4) == LUA_TNUMBER)
  3591. {
  3592. // Get parameter 1 off the stack.
  3593. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3594. // Get parameter 2 off the stack.
  3595. ScriptUtil::LuaArray<Rectangle> param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
  3596. // Get parameter 3 off the stack.
  3597. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3598. Form* instance = getInstance(state);
  3599. instance->setImageRegion(param1, *param2, param3);
  3600. return 0;
  3601. }
  3602. else
  3603. {
  3604. lua_pushstring(state, "lua_Form_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3605. lua_error(state);
  3606. }
  3607. break;
  3608. }
  3609. default:
  3610. {
  3611. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3612. lua_error(state);
  3613. break;
  3614. }
  3615. }
  3616. return 0;
  3617. }
  3618. int lua_Form_setMargin(lua_State* state)
  3619. {
  3620. // Get the number of parameters.
  3621. int paramCount = lua_gettop(state);
  3622. // Attempt to match the parameters to a valid binding.
  3623. switch (paramCount)
  3624. {
  3625. case 5:
  3626. {
  3627. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3628. lua_type(state, 2) == LUA_TNUMBER &&
  3629. lua_type(state, 3) == LUA_TNUMBER &&
  3630. lua_type(state, 4) == LUA_TNUMBER &&
  3631. lua_type(state, 5) == LUA_TNUMBER)
  3632. {
  3633. // Get parameter 1 off the stack.
  3634. float param1 = (float)luaL_checknumber(state, 2);
  3635. // Get parameter 2 off the stack.
  3636. float param2 = (float)luaL_checknumber(state, 3);
  3637. // Get parameter 3 off the stack.
  3638. float param3 = (float)luaL_checknumber(state, 4);
  3639. // Get parameter 4 off the stack.
  3640. float param4 = (float)luaL_checknumber(state, 5);
  3641. Form* instance = getInstance(state);
  3642. instance->setMargin(param1, param2, param3, param4);
  3643. return 0;
  3644. }
  3645. else
  3646. {
  3647. lua_pushstring(state, "lua_Form_setMargin - Failed to match the given parameters to a valid function signature.");
  3648. lua_error(state);
  3649. }
  3650. break;
  3651. }
  3652. default:
  3653. {
  3654. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3655. lua_error(state);
  3656. break;
  3657. }
  3658. }
  3659. return 0;
  3660. }
  3661. int lua_Form_setNode(lua_State* state)
  3662. {
  3663. // Get the number of parameters.
  3664. int paramCount = lua_gettop(state);
  3665. // Attempt to match the parameters to a valid binding.
  3666. switch (paramCount)
  3667. {
  3668. case 2:
  3669. {
  3670. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3671. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3672. {
  3673. // Get parameter 1 off the stack.
  3674. ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
  3675. Form* instance = getInstance(state);
  3676. instance->setNode(param1);
  3677. return 0;
  3678. }
  3679. else
  3680. {
  3681. lua_pushstring(state, "lua_Form_setNode - Failed to match the given parameters to a valid function signature.");
  3682. lua_error(state);
  3683. }
  3684. break;
  3685. }
  3686. default:
  3687. {
  3688. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3689. lua_error(state);
  3690. break;
  3691. }
  3692. }
  3693. return 0;
  3694. }
  3695. int lua_Form_setOpacity(lua_State* state)
  3696. {
  3697. // Get the number of parameters.
  3698. int paramCount = lua_gettop(state);
  3699. // Attempt to match the parameters to a valid binding.
  3700. switch (paramCount)
  3701. {
  3702. case 2:
  3703. {
  3704. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3705. lua_type(state, 2) == LUA_TNUMBER)
  3706. {
  3707. // Get parameter 1 off the stack.
  3708. float param1 = (float)luaL_checknumber(state, 2);
  3709. Form* instance = getInstance(state);
  3710. instance->setOpacity(param1);
  3711. return 0;
  3712. }
  3713. else
  3714. {
  3715. lua_pushstring(state, "lua_Form_setOpacity - Failed to match the given parameters to a valid function signature.");
  3716. lua_error(state);
  3717. }
  3718. break;
  3719. }
  3720. case 3:
  3721. {
  3722. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3723. lua_type(state, 2) == LUA_TNUMBER &&
  3724. lua_type(state, 3) == LUA_TNUMBER)
  3725. {
  3726. // Get parameter 1 off the stack.
  3727. float param1 = (float)luaL_checknumber(state, 2);
  3728. // Get parameter 2 off the stack.
  3729. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3730. Form* instance = getInstance(state);
  3731. instance->setOpacity(param1, param2);
  3732. return 0;
  3733. }
  3734. else
  3735. {
  3736. lua_pushstring(state, "lua_Form_setOpacity - Failed to match the given parameters to a valid function signature.");
  3737. lua_error(state);
  3738. }
  3739. break;
  3740. }
  3741. default:
  3742. {
  3743. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3744. lua_error(state);
  3745. break;
  3746. }
  3747. }
  3748. return 0;
  3749. }
  3750. int lua_Form_setPadding(lua_State* state)
  3751. {
  3752. // Get the number of parameters.
  3753. int paramCount = lua_gettop(state);
  3754. // Attempt to match the parameters to a valid binding.
  3755. switch (paramCount)
  3756. {
  3757. case 5:
  3758. {
  3759. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3760. lua_type(state, 2) == LUA_TNUMBER &&
  3761. lua_type(state, 3) == LUA_TNUMBER &&
  3762. lua_type(state, 4) == LUA_TNUMBER &&
  3763. lua_type(state, 5) == LUA_TNUMBER)
  3764. {
  3765. // Get parameter 1 off the stack.
  3766. float param1 = (float)luaL_checknumber(state, 2);
  3767. // Get parameter 2 off the stack.
  3768. float param2 = (float)luaL_checknumber(state, 3);
  3769. // Get parameter 3 off the stack.
  3770. float param3 = (float)luaL_checknumber(state, 4);
  3771. // Get parameter 4 off the stack.
  3772. float param4 = (float)luaL_checknumber(state, 5);
  3773. Form* instance = getInstance(state);
  3774. instance->setPadding(param1, param2, param3, param4);
  3775. return 0;
  3776. }
  3777. else
  3778. {
  3779. lua_pushstring(state, "lua_Form_setPadding - Failed to match the given parameters to a valid function signature.");
  3780. lua_error(state);
  3781. }
  3782. break;
  3783. }
  3784. default:
  3785. {
  3786. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3787. lua_error(state);
  3788. break;
  3789. }
  3790. }
  3791. return 0;
  3792. }
  3793. int lua_Form_setPosition(lua_State* state)
  3794. {
  3795. // Get the number of parameters.
  3796. int paramCount = lua_gettop(state);
  3797. // Attempt to match the parameters to a valid binding.
  3798. switch (paramCount)
  3799. {
  3800. case 3:
  3801. {
  3802. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3803. lua_type(state, 2) == LUA_TNUMBER &&
  3804. lua_type(state, 3) == LUA_TNUMBER)
  3805. {
  3806. // Get parameter 1 off the stack.
  3807. float param1 = (float)luaL_checknumber(state, 2);
  3808. // Get parameter 2 off the stack.
  3809. float param2 = (float)luaL_checknumber(state, 3);
  3810. Form* instance = getInstance(state);
  3811. instance->setPosition(param1, param2);
  3812. return 0;
  3813. }
  3814. else
  3815. {
  3816. lua_pushstring(state, "lua_Form_setPosition - Failed to match the given parameters to a valid function signature.");
  3817. lua_error(state);
  3818. }
  3819. break;
  3820. }
  3821. default:
  3822. {
  3823. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3824. lua_error(state);
  3825. break;
  3826. }
  3827. }
  3828. return 0;
  3829. }
  3830. int lua_Form_setScroll(lua_State* state)
  3831. {
  3832. // Get the number of parameters.
  3833. int paramCount = lua_gettop(state);
  3834. // Attempt to match the parameters to a valid binding.
  3835. switch (paramCount)
  3836. {
  3837. case 2:
  3838. {
  3839. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3840. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3841. {
  3842. // Get parameter 1 off the stack.
  3843. Container::Scroll param1 = (Container::Scroll)lua_enumFromString_ContainerScroll(luaL_checkstring(state, 2));
  3844. Form* instance = getInstance(state);
  3845. instance->setScroll(param1);
  3846. return 0;
  3847. }
  3848. else
  3849. {
  3850. lua_pushstring(state, "lua_Form_setScroll - Failed to match the given parameters to a valid function signature.");
  3851. lua_error(state);
  3852. }
  3853. break;
  3854. }
  3855. default:
  3856. {
  3857. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3858. lua_error(state);
  3859. break;
  3860. }
  3861. }
  3862. return 0;
  3863. }
  3864. int lua_Form_setScrollBarsAutoHide(lua_State* state)
  3865. {
  3866. // Get the number of parameters.
  3867. int paramCount = lua_gettop(state);
  3868. // Attempt to match the parameters to a valid binding.
  3869. switch (paramCount)
  3870. {
  3871. case 2:
  3872. {
  3873. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3874. lua_type(state, 2) == LUA_TBOOLEAN)
  3875. {
  3876. // Get parameter 1 off the stack.
  3877. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3878. Form* instance = getInstance(state);
  3879. instance->setScrollBarsAutoHide(param1);
  3880. return 0;
  3881. }
  3882. else
  3883. {
  3884. lua_pushstring(state, "lua_Form_setScrollBarsAutoHide - Failed to match the given parameters to a valid function signature.");
  3885. lua_error(state);
  3886. }
  3887. break;
  3888. }
  3889. default:
  3890. {
  3891. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3892. lua_error(state);
  3893. break;
  3894. }
  3895. }
  3896. return 0;
  3897. }
  3898. int lua_Form_setSize(lua_State* state)
  3899. {
  3900. // Get the number of parameters.
  3901. int paramCount = lua_gettop(state);
  3902. // Attempt to match the parameters to a valid binding.
  3903. switch (paramCount)
  3904. {
  3905. case 3:
  3906. {
  3907. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3908. lua_type(state, 2) == LUA_TNUMBER &&
  3909. lua_type(state, 3) == LUA_TNUMBER)
  3910. {
  3911. // Get parameter 1 off the stack.
  3912. float param1 = (float)luaL_checknumber(state, 2);
  3913. // Get parameter 2 off the stack.
  3914. float param2 = (float)luaL_checknumber(state, 3);
  3915. Form* instance = getInstance(state);
  3916. instance->setSize(param1, param2);
  3917. return 0;
  3918. }
  3919. else
  3920. {
  3921. lua_pushstring(state, "lua_Form_setSize - Failed to match the given parameters to a valid function signature.");
  3922. lua_error(state);
  3923. }
  3924. break;
  3925. }
  3926. default:
  3927. {
  3928. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3929. lua_error(state);
  3930. break;
  3931. }
  3932. }
  3933. return 0;
  3934. }
  3935. int lua_Form_setSkinColor(lua_State* state)
  3936. {
  3937. // Get the number of parameters.
  3938. int paramCount = lua_gettop(state);
  3939. // Attempt to match the parameters to a valid binding.
  3940. switch (paramCount)
  3941. {
  3942. case 2:
  3943. {
  3944. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3945. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3946. {
  3947. // Get parameter 1 off the stack.
  3948. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3949. Form* instance = getInstance(state);
  3950. instance->setSkinColor(*param1);
  3951. return 0;
  3952. }
  3953. else
  3954. {
  3955. lua_pushstring(state, "lua_Form_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3956. lua_error(state);
  3957. }
  3958. break;
  3959. }
  3960. case 3:
  3961. {
  3962. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3963. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3964. lua_type(state, 3) == LUA_TNUMBER)
  3965. {
  3966. // Get parameter 1 off the stack.
  3967. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3968. // Get parameter 2 off the stack.
  3969. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3970. Form* instance = getInstance(state);
  3971. instance->setSkinColor(*param1, param2);
  3972. return 0;
  3973. }
  3974. else
  3975. {
  3976. lua_pushstring(state, "lua_Form_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3977. lua_error(state);
  3978. }
  3979. break;
  3980. }
  3981. default:
  3982. {
  3983. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3984. lua_error(state);
  3985. break;
  3986. }
  3987. }
  3988. return 0;
  3989. }
  3990. int lua_Form_setSkinRegion(lua_State* state)
  3991. {
  3992. // Get the number of parameters.
  3993. int paramCount = lua_gettop(state);
  3994. // Attempt to match the parameters to a valid binding.
  3995. switch (paramCount)
  3996. {
  3997. case 2:
  3998. {
  3999. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4000. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4001. {
  4002. // Get parameter 1 off the stack.
  4003. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  4004. Form* instance = getInstance(state);
  4005. instance->setSkinRegion(*param1);
  4006. return 0;
  4007. }
  4008. else
  4009. {
  4010. lua_pushstring(state, "lua_Form_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  4011. lua_error(state);
  4012. }
  4013. break;
  4014. }
  4015. case 3:
  4016. {
  4017. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4018. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4019. lua_type(state, 3) == LUA_TNUMBER)
  4020. {
  4021. // Get parameter 1 off the stack.
  4022. ScriptUtil::LuaArray<Rectangle> param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  4023. // Get parameter 2 off the stack.
  4024. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4025. Form* instance = getInstance(state);
  4026. instance->setSkinRegion(*param1, param2);
  4027. return 0;
  4028. }
  4029. else
  4030. {
  4031. lua_pushstring(state, "lua_Form_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  4032. lua_error(state);
  4033. }
  4034. break;
  4035. }
  4036. default:
  4037. {
  4038. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4039. lua_error(state);
  4040. break;
  4041. }
  4042. }
  4043. return 0;
  4044. }
  4045. int lua_Form_setState(lua_State* state)
  4046. {
  4047. // Get the number of parameters.
  4048. int paramCount = lua_gettop(state);
  4049. // Attempt to match the parameters to a valid binding.
  4050. switch (paramCount)
  4051. {
  4052. case 2:
  4053. {
  4054. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4055. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4056. {
  4057. // Get parameter 1 off the stack.
  4058. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  4059. Form* instance = getInstance(state);
  4060. instance->setState(param1);
  4061. return 0;
  4062. }
  4063. else
  4064. {
  4065. lua_pushstring(state, "lua_Form_setState - Failed to match the given parameters to a valid function signature.");
  4066. lua_error(state);
  4067. }
  4068. break;
  4069. }
  4070. default:
  4071. {
  4072. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4073. lua_error(state);
  4074. break;
  4075. }
  4076. }
  4077. return 0;
  4078. }
  4079. int lua_Form_setStyle(lua_State* state)
  4080. {
  4081. // Get the number of parameters.
  4082. int paramCount = lua_gettop(state);
  4083. // Attempt to match the parameters to a valid binding.
  4084. switch (paramCount)
  4085. {
  4086. case 2:
  4087. {
  4088. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4089. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4090. {
  4091. // Get parameter 1 off the stack.
  4092. ScriptUtil::LuaArray<Theme::Style> param1 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  4093. Form* instance = getInstance(state);
  4094. instance->setStyle(param1);
  4095. return 0;
  4096. }
  4097. else
  4098. {
  4099. lua_pushstring(state, "lua_Form_setStyle - Failed to match the given parameters to a valid function signature.");
  4100. lua_error(state);
  4101. }
  4102. break;
  4103. }
  4104. default:
  4105. {
  4106. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4107. lua_error(state);
  4108. break;
  4109. }
  4110. }
  4111. return 0;
  4112. }
  4113. int lua_Form_setTextAlignment(lua_State* state)
  4114. {
  4115. // Get the number of parameters.
  4116. int paramCount = lua_gettop(state);
  4117. // Attempt to match the parameters to a valid binding.
  4118. switch (paramCount)
  4119. {
  4120. case 2:
  4121. {
  4122. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4123. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4124. {
  4125. // Get parameter 1 off the stack.
  4126. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  4127. Form* instance = getInstance(state);
  4128. instance->setTextAlignment(param1);
  4129. return 0;
  4130. }
  4131. else
  4132. {
  4133. lua_pushstring(state, "lua_Form_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  4134. lua_error(state);
  4135. }
  4136. break;
  4137. }
  4138. case 3:
  4139. {
  4140. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4141. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4142. lua_type(state, 3) == LUA_TNUMBER)
  4143. {
  4144. // Get parameter 1 off the stack.
  4145. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  4146. // Get parameter 2 off the stack.
  4147. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4148. Form* instance = getInstance(state);
  4149. instance->setTextAlignment(param1, param2);
  4150. return 0;
  4151. }
  4152. else
  4153. {
  4154. lua_pushstring(state, "lua_Form_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  4155. lua_error(state);
  4156. }
  4157. break;
  4158. }
  4159. default:
  4160. {
  4161. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4162. lua_error(state);
  4163. break;
  4164. }
  4165. }
  4166. return 0;
  4167. }
  4168. int lua_Form_setTextColor(lua_State* state)
  4169. {
  4170. // Get the number of parameters.
  4171. int paramCount = lua_gettop(state);
  4172. // Attempt to match the parameters to a valid binding.
  4173. switch (paramCount)
  4174. {
  4175. case 2:
  4176. {
  4177. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4178. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4179. {
  4180. // Get parameter 1 off the stack.
  4181. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  4182. Form* instance = getInstance(state);
  4183. instance->setTextColor(*param1);
  4184. return 0;
  4185. }
  4186. else
  4187. {
  4188. lua_pushstring(state, "lua_Form_setTextColor - Failed to match the given parameters to a valid function signature.");
  4189. lua_error(state);
  4190. }
  4191. break;
  4192. }
  4193. case 3:
  4194. {
  4195. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4196. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4197. lua_type(state, 3) == LUA_TNUMBER)
  4198. {
  4199. // Get parameter 1 off the stack.
  4200. ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  4201. // Get parameter 2 off the stack.
  4202. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4203. Form* instance = getInstance(state);
  4204. instance->setTextColor(*param1, param2);
  4205. return 0;
  4206. }
  4207. else
  4208. {
  4209. lua_pushstring(state, "lua_Form_setTextColor - Failed to match the given parameters to a valid function signature.");
  4210. lua_error(state);
  4211. }
  4212. break;
  4213. }
  4214. default:
  4215. {
  4216. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4217. lua_error(state);
  4218. break;
  4219. }
  4220. }
  4221. return 0;
  4222. }
  4223. int lua_Form_setTextRightToLeft(lua_State* state)
  4224. {
  4225. // Get the number of parameters.
  4226. int paramCount = lua_gettop(state);
  4227. // Attempt to match the parameters to a valid binding.
  4228. switch (paramCount)
  4229. {
  4230. case 2:
  4231. {
  4232. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4233. lua_type(state, 2) == LUA_TBOOLEAN)
  4234. {
  4235. // Get parameter 1 off the stack.
  4236. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  4237. Form* instance = getInstance(state);
  4238. instance->setTextRightToLeft(param1);
  4239. return 0;
  4240. }
  4241. else
  4242. {
  4243. lua_pushstring(state, "lua_Form_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  4244. lua_error(state);
  4245. }
  4246. break;
  4247. }
  4248. case 3:
  4249. {
  4250. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4251. lua_type(state, 2) == LUA_TBOOLEAN &&
  4252. lua_type(state, 3) == LUA_TNUMBER)
  4253. {
  4254. // Get parameter 1 off the stack.
  4255. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  4256. // Get parameter 2 off the stack.
  4257. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4258. Form* instance = getInstance(state);
  4259. instance->setTextRightToLeft(param1, param2);
  4260. return 0;
  4261. }
  4262. else
  4263. {
  4264. lua_pushstring(state, "lua_Form_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  4265. lua_error(state);
  4266. }
  4267. break;
  4268. }
  4269. default:
  4270. {
  4271. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4272. lua_error(state);
  4273. break;
  4274. }
  4275. }
  4276. return 0;
  4277. }
  4278. int lua_Form_setWidth(lua_State* state)
  4279. {
  4280. // Get the number of parameters.
  4281. int paramCount = lua_gettop(state);
  4282. // Attempt to match the parameters to a valid binding.
  4283. switch (paramCount)
  4284. {
  4285. case 2:
  4286. {
  4287. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4288. lua_type(state, 2) == LUA_TNUMBER)
  4289. {
  4290. // Get parameter 1 off the stack.
  4291. float param1 = (float)luaL_checknumber(state, 2);
  4292. Form* instance = getInstance(state);
  4293. instance->setWidth(param1);
  4294. return 0;
  4295. }
  4296. else
  4297. {
  4298. lua_pushstring(state, "lua_Form_setWidth - Failed to match the given parameters to a valid function signature.");
  4299. lua_error(state);
  4300. }
  4301. break;
  4302. }
  4303. default:
  4304. {
  4305. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4306. lua_error(state);
  4307. break;
  4308. }
  4309. }
  4310. return 0;
  4311. }
  4312. int lua_Form_setZIndex(lua_State* state)
  4313. {
  4314. // Get the number of parameters.
  4315. int paramCount = lua_gettop(state);
  4316. // Attempt to match the parameters to a valid binding.
  4317. switch (paramCount)
  4318. {
  4319. case 2:
  4320. {
  4321. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4322. lua_type(state, 2) == LUA_TNUMBER)
  4323. {
  4324. // Get parameter 1 off the stack.
  4325. int param1 = (int)luaL_checkint(state, 2);
  4326. Form* instance = getInstance(state);
  4327. instance->setZIndex(param1);
  4328. return 0;
  4329. }
  4330. else
  4331. {
  4332. lua_pushstring(state, "lua_Form_setZIndex - Failed to match the given parameters to a valid function signature.");
  4333. lua_error(state);
  4334. }
  4335. break;
  4336. }
  4337. default:
  4338. {
  4339. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4340. lua_error(state);
  4341. break;
  4342. }
  4343. }
  4344. return 0;
  4345. }
  4346. int lua_Form_static_ANIMATE_OPACITY(lua_State* state)
  4347. {
  4348. // Validate the number of parameters.
  4349. if (lua_gettop(state) > 0)
  4350. {
  4351. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4352. lua_error(state);
  4353. }
  4354. int result = Form::ANIMATE_OPACITY;
  4355. // Push the return value onto the stack.
  4356. lua_pushinteger(state, result);
  4357. return 1;
  4358. }
  4359. int lua_Form_static_ANIMATE_POSITION(lua_State* state)
  4360. {
  4361. // Validate the number of parameters.
  4362. if (lua_gettop(state) > 0)
  4363. {
  4364. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4365. lua_error(state);
  4366. }
  4367. int result = Form::ANIMATE_POSITION;
  4368. // Push the return value onto the stack.
  4369. lua_pushinteger(state, result);
  4370. return 1;
  4371. }
  4372. int lua_Form_static_ANIMATE_POSITION_X(lua_State* state)
  4373. {
  4374. // Validate the number of parameters.
  4375. if (lua_gettop(state) > 0)
  4376. {
  4377. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4378. lua_error(state);
  4379. }
  4380. int result = Form::ANIMATE_POSITION_X;
  4381. // Push the return value onto the stack.
  4382. lua_pushinteger(state, result);
  4383. return 1;
  4384. }
  4385. int lua_Form_static_ANIMATE_POSITION_Y(lua_State* state)
  4386. {
  4387. // Validate the number of parameters.
  4388. if (lua_gettop(state) > 0)
  4389. {
  4390. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4391. lua_error(state);
  4392. }
  4393. int result = Form::ANIMATE_POSITION_Y;
  4394. // Push the return value onto the stack.
  4395. lua_pushinteger(state, result);
  4396. return 1;
  4397. }
  4398. int lua_Form_static_ANIMATE_SCROLLBAR_OPACITY(lua_State* state)
  4399. {
  4400. // Validate the number of parameters.
  4401. if (lua_gettop(state) > 0)
  4402. {
  4403. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4404. lua_error(state);
  4405. }
  4406. int result = Form::ANIMATE_SCROLLBAR_OPACITY;
  4407. // Push the return value onto the stack.
  4408. lua_pushinteger(state, result);
  4409. return 1;
  4410. }
  4411. int lua_Form_static_ANIMATE_SIZE(lua_State* state)
  4412. {
  4413. // Validate the number of parameters.
  4414. if (lua_gettop(state) > 0)
  4415. {
  4416. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4417. lua_error(state);
  4418. }
  4419. int result = Form::ANIMATE_SIZE;
  4420. // Push the return value onto the stack.
  4421. lua_pushinteger(state, result);
  4422. return 1;
  4423. }
  4424. int lua_Form_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
  4425. {
  4426. // Validate the number of parameters.
  4427. if (lua_gettop(state) > 0)
  4428. {
  4429. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4430. lua_error(state);
  4431. }
  4432. int result = Form::ANIMATE_SIZE_HEIGHT;
  4433. // Push the return value onto the stack.
  4434. lua_pushinteger(state, result);
  4435. return 1;
  4436. }
  4437. int lua_Form_static_ANIMATE_SIZE_WIDTH(lua_State* state)
  4438. {
  4439. // Validate the number of parameters.
  4440. if (lua_gettop(state) > 0)
  4441. {
  4442. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  4443. lua_error(state);
  4444. }
  4445. int result = Form::ANIMATE_SIZE_WIDTH;
  4446. // Push the return value onto the stack.
  4447. lua_pushinteger(state, result);
  4448. return 1;
  4449. }
  4450. int lua_Form_static_create(lua_State* state)
  4451. {
  4452. // Get the number of parameters.
  4453. int paramCount = lua_gettop(state);
  4454. // Attempt to match the parameters to a valid binding.
  4455. switch (paramCount)
  4456. {
  4457. case 1:
  4458. {
  4459. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  4460. {
  4461. // Get parameter 1 off the stack.
  4462. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(1, false);
  4463. void* returnPtr = (void*)Form::create(param1);
  4464. if (returnPtr)
  4465. {
  4466. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4467. object->instance = returnPtr;
  4468. object->owns = true;
  4469. luaL_getmetatable(state, "Form");
  4470. lua_setmetatable(state, -2);
  4471. }
  4472. else
  4473. {
  4474. lua_pushnil(state);
  4475. }
  4476. return 1;
  4477. }
  4478. else
  4479. {
  4480. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  4481. lua_error(state);
  4482. }
  4483. break;
  4484. }
  4485. case 2:
  4486. {
  4487. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  4488. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4489. {
  4490. // Get parameter 1 off the stack.
  4491. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(1, false);
  4492. // Get parameter 2 off the stack.
  4493. ScriptUtil::LuaArray<Theme::Style> param2 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  4494. void* returnPtr = (void*)Form::create(param1, param2);
  4495. if (returnPtr)
  4496. {
  4497. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4498. object->instance = returnPtr;
  4499. object->owns = true;
  4500. luaL_getmetatable(state, "Form");
  4501. lua_setmetatable(state, -2);
  4502. }
  4503. else
  4504. {
  4505. lua_pushnil(state);
  4506. }
  4507. return 1;
  4508. }
  4509. else
  4510. {
  4511. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  4512. lua_error(state);
  4513. }
  4514. break;
  4515. }
  4516. case 3:
  4517. {
  4518. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  4519. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  4520. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  4521. {
  4522. // Get parameter 1 off the stack.
  4523. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(1, false);
  4524. // Get parameter 2 off the stack.
  4525. ScriptUtil::LuaArray<Theme::Style> param2 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  4526. // Get parameter 3 off the stack.
  4527. Layout::Type param3 = (Layout::Type)lua_enumFromString_LayoutType(luaL_checkstring(state, 3));
  4528. void* returnPtr = (void*)Form::create(param1, param2, param3);
  4529. if (returnPtr)
  4530. {
  4531. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4532. object->instance = returnPtr;
  4533. object->owns = true;
  4534. luaL_getmetatable(state, "Form");
  4535. lua_setmetatable(state, -2);
  4536. }
  4537. else
  4538. {
  4539. lua_pushnil(state);
  4540. }
  4541. return 1;
  4542. }
  4543. else
  4544. {
  4545. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  4546. lua_error(state);
  4547. }
  4548. break;
  4549. }
  4550. default:
  4551. {
  4552. lua_pushstring(state, "Invalid number of parameters (expected 1, 2 or 3).");
  4553. lua_error(state);
  4554. break;
  4555. }
  4556. }
  4557. return 0;
  4558. }
  4559. int lua_Form_static_getForm(lua_State* state)
  4560. {
  4561. // Get the number of parameters.
  4562. int paramCount = lua_gettop(state);
  4563. // Attempt to match the parameters to a valid binding.
  4564. switch (paramCount)
  4565. {
  4566. case 1:
  4567. {
  4568. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  4569. {
  4570. // Get parameter 1 off the stack.
  4571. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(1, false);
  4572. void* returnPtr = (void*)Form::getForm(param1);
  4573. if (returnPtr)
  4574. {
  4575. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4576. object->instance = returnPtr;
  4577. object->owns = false;
  4578. luaL_getmetatable(state, "Form");
  4579. lua_setmetatable(state, -2);
  4580. }
  4581. else
  4582. {
  4583. lua_pushnil(state);
  4584. }
  4585. return 1;
  4586. }
  4587. else
  4588. {
  4589. lua_pushstring(state, "lua_Form_static_getForm - Failed to match the given parameters to a valid function signature.");
  4590. lua_error(state);
  4591. }
  4592. break;
  4593. }
  4594. default:
  4595. {
  4596. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  4597. lua_error(state);
  4598. break;
  4599. }
  4600. }
  4601. return 0;
  4602. }
  4603. int lua_Form_update(lua_State* state)
  4604. {
  4605. // Get the number of parameters.
  4606. int paramCount = lua_gettop(state);
  4607. // Attempt to match the parameters to a valid binding.
  4608. switch (paramCount)
  4609. {
  4610. case 2:
  4611. {
  4612. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4613. lua_type(state, 2) == LUA_TNUMBER)
  4614. {
  4615. // Get parameter 1 off the stack.
  4616. float param1 = (float)luaL_checknumber(state, 2);
  4617. Form* instance = getInstance(state);
  4618. instance->update(param1);
  4619. return 0;
  4620. }
  4621. else
  4622. {
  4623. lua_pushstring(state, "lua_Form_update - Failed to match the given parameters to a valid function signature.");
  4624. lua_error(state);
  4625. }
  4626. break;
  4627. }
  4628. default:
  4629. {
  4630. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4631. lua_error(state);
  4632. break;
  4633. }
  4634. }
  4635. return 0;
  4636. }
  4637. }