lua_Form.cpp 209 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590
  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 "ControlFactory.h"
  13. #include "FlowLayout.h"
  14. #include "Form.h"
  15. #include "Game.h"
  16. #include "ImageControl.h"
  17. #include "JoystickControl.h"
  18. #include "Label.h"
  19. #include "Layout.h"
  20. #include "Node.h"
  21. #include "RadioButton.h"
  22. #include "Ref.h"
  23. #include "Scene.h"
  24. #include "ScriptController.h"
  25. #include "ScriptTarget.h"
  26. #include "Slider.h"
  27. #include "TextBox.h"
  28. #include "Theme.h"
  29. #include "VerticalLayout.h"
  30. #include "lua_ContainerScroll.h"
  31. #include "lua_ControlAlignment.h"
  32. #include "lua_ControlAutoSize.h"
  33. #include "lua_ControlListenerEventType.h"
  34. #include "lua_ControlState.h"
  35. #include "lua_CurveInterpolationType.h"
  36. #include "lua_FontJustify.h"
  37. #include "lua_LayoutType.h"
  38. namespace gameplay
  39. {
  40. void luaRegister_Form()
  41. {
  42. const luaL_Reg lua_members[] =
  43. {
  44. {"addControl", lua_Form_addControl},
  45. {"addListener", lua_Form_addListener},
  46. {"addRef", lua_Form_addRef},
  47. {"addScriptCallback", lua_Form_addScriptCallback},
  48. {"canFocus", lua_Form_canFocus},
  49. {"createAnimation", lua_Form_createAnimation},
  50. {"createAnimationFromBy", lua_Form_createAnimationFromBy},
  51. {"createAnimationFromTo", lua_Form_createAnimationFromTo},
  52. {"destroyAnimation", lua_Form_destroyAnimation},
  53. {"draw", lua_Form_draw},
  54. {"getAbsoluteBounds", lua_Form_getAbsoluteBounds},
  55. {"getActiveControl", lua_Form_getActiveControl},
  56. {"getAlignment", lua_Form_getAlignment},
  57. {"getAnimation", lua_Form_getAnimation},
  58. {"getAnimationPropertyComponentCount", lua_Form_getAnimationPropertyComponentCount},
  59. {"getAnimationPropertyValue", lua_Form_getAnimationPropertyValue},
  60. {"getAutoSize", lua_Form_getAutoSize},
  61. {"getBorder", lua_Form_getBorder},
  62. {"getBounds", lua_Form_getBounds},
  63. {"getClip", lua_Form_getClip},
  64. {"getClipBounds", lua_Form_getClipBounds},
  65. {"getConsumeInputEvents", lua_Form_getConsumeInputEvents},
  66. {"getControl", lua_Form_getControl},
  67. {"getControlCount", lua_Form_getControlCount},
  68. {"getCursorColor", lua_Form_getCursorColor},
  69. {"getCursorRegion", lua_Form_getCursorRegion},
  70. {"getCursorUVs", lua_Form_getCursorUVs},
  71. {"getFocusIndex", lua_Form_getFocusIndex},
  72. {"getFont", lua_Form_getFont},
  73. {"getFontSize", lua_Form_getFontSize},
  74. {"getHeight", lua_Form_getHeight},
  75. {"getId", lua_Form_getId},
  76. {"getImageColor", lua_Form_getImageColor},
  77. {"getImageRegion", lua_Form_getImageRegion},
  78. {"getImageUVs", lua_Form_getImageUVs},
  79. {"getLayout", lua_Form_getLayout},
  80. {"getMargin", lua_Form_getMargin},
  81. {"getOpacity", lua_Form_getOpacity},
  82. {"getPadding", lua_Form_getPadding},
  83. {"getParent", lua_Form_getParent},
  84. {"getRefCount", lua_Form_getRefCount},
  85. {"getScroll", lua_Form_getScroll},
  86. {"getScrollPosition", lua_Form_getScrollPosition},
  87. {"getScrollWheelRequiresFocus", lua_Form_getScrollWheelRequiresFocus},
  88. {"getScrollWheelSpeed", lua_Form_getScrollWheelSpeed},
  89. {"getScrollingFriction", lua_Form_getScrollingFriction},
  90. {"getSkinColor", lua_Form_getSkinColor},
  91. {"getSkinRegion", lua_Form_getSkinRegion},
  92. {"getState", lua_Form_getState},
  93. {"getStyle", lua_Form_getStyle},
  94. {"getTextAlignment", lua_Form_getTextAlignment},
  95. {"getTextColor", lua_Form_getTextColor},
  96. {"getTextRightToLeft", lua_Form_getTextRightToLeft},
  97. {"getTheme", lua_Form_getTheme},
  98. {"getTopLevelForm", lua_Form_getTopLevelForm},
  99. {"getType", lua_Form_getType},
  100. {"getWidth", lua_Form_getWidth},
  101. {"getX", lua_Form_getX},
  102. {"getY", lua_Form_getY},
  103. {"getZIndex", lua_Form_getZIndex},
  104. {"hasFocus", lua_Form_hasFocus},
  105. {"insertControl", lua_Form_insertControl},
  106. {"isBatchingEnabled", lua_Form_isBatchingEnabled},
  107. {"isChild", lua_Form_isChild},
  108. {"isContainer", lua_Form_isContainer},
  109. {"isEnabled", lua_Form_isEnabled},
  110. {"isEnabledInHierarchy", lua_Form_isEnabledInHierarchy},
  111. {"isForm", lua_Form_isForm},
  112. {"isHeightPercentage", lua_Form_isHeightPercentage},
  113. {"isScrollBarsAutoHide", lua_Form_isScrollBarsAutoHide},
  114. {"isScrolling", lua_Form_isScrolling},
  115. {"isVisible", lua_Form_isVisible},
  116. {"isVisibleInHierarchy", lua_Form_isVisibleInHierarchy},
  117. {"isWidthPercentage", lua_Form_isWidthPercentage},
  118. {"isXPercentage", lua_Form_isXPercentage},
  119. {"isYPercentage", lua_Form_isYPercentage},
  120. {"release", lua_Form_release},
  121. {"removeControl", lua_Form_removeControl},
  122. {"removeListener", lua_Form_removeListener},
  123. {"removeScriptCallback", lua_Form_removeScriptCallback},
  124. {"setActiveControl", lua_Form_setActiveControl},
  125. {"setAlignment", lua_Form_setAlignment},
  126. {"setAnimationPropertyValue", lua_Form_setAnimationPropertyValue},
  127. {"setAutoSize", lua_Form_setAutoSize},
  128. {"setBatchingEnabled", lua_Form_setBatchingEnabled},
  129. {"setBorder", lua_Form_setBorder},
  130. {"setBounds", lua_Form_setBounds},
  131. {"setCanFocus", lua_Form_setCanFocus},
  132. {"setConsumeInputEvents", lua_Form_setConsumeInputEvents},
  133. {"setCursorColor", lua_Form_setCursorColor},
  134. {"setCursorRegion", lua_Form_setCursorRegion},
  135. {"setEnabled", lua_Form_setEnabled},
  136. {"setFocus", lua_Form_setFocus},
  137. {"setFocusIndex", lua_Form_setFocusIndex},
  138. {"setFont", lua_Form_setFont},
  139. {"setFontSize", lua_Form_setFontSize},
  140. {"setHeight", lua_Form_setHeight},
  141. {"setId", lua_Form_setId},
  142. {"setImageColor", lua_Form_setImageColor},
  143. {"setImageRegion", lua_Form_setImageRegion},
  144. {"setLayout", lua_Form_setLayout},
  145. {"setMargin", lua_Form_setMargin},
  146. {"setNode", lua_Form_setNode},
  147. {"setOpacity", lua_Form_setOpacity},
  148. {"setPadding", lua_Form_setPadding},
  149. {"setPosition", lua_Form_setPosition},
  150. {"setScroll", lua_Form_setScroll},
  151. {"setScrollBarsAutoHide", lua_Form_setScrollBarsAutoHide},
  152. {"setScrollPosition", lua_Form_setScrollPosition},
  153. {"setScrollWheelRequiresFocus", lua_Form_setScrollWheelRequiresFocus},
  154. {"setScrollWheelSpeed", lua_Form_setScrollWheelSpeed},
  155. {"setScrollingFriction", lua_Form_setScrollingFriction},
  156. {"setSize", lua_Form_setSize},
  157. {"setSkinColor", lua_Form_setSkinColor},
  158. {"setSkinRegion", lua_Form_setSkinRegion},
  159. {"setStyle", lua_Form_setStyle},
  160. {"setTextAlignment", lua_Form_setTextAlignment},
  161. {"setTextColor", lua_Form_setTextColor},
  162. {"setTextRightToLeft", lua_Form_setTextRightToLeft},
  163. {"setVisible", lua_Form_setVisible},
  164. {"setWidth", lua_Form_setWidth},
  165. {"setX", lua_Form_setX},
  166. {"setY", lua_Form_setY},
  167. {"setZIndex", lua_Form_setZIndex},
  168. {"stopScrolling", lua_Form_stopScrolling},
  169. {"update", lua_Form_update},
  170. {NULL, NULL}
  171. };
  172. const luaL_Reg lua_statics[] =
  173. {
  174. {"ANIMATE_OPACITY", lua_Form_static_ANIMATE_OPACITY},
  175. {"ANIMATE_POSITION", lua_Form_static_ANIMATE_POSITION},
  176. {"ANIMATE_POSITION_X", lua_Form_static_ANIMATE_POSITION_X},
  177. {"ANIMATE_POSITION_Y", lua_Form_static_ANIMATE_POSITION_Y},
  178. {"ANIMATE_SCROLLBAR_OPACITY", lua_Form_static_ANIMATE_SCROLLBAR_OPACITY},
  179. {"ANIMATE_SIZE", lua_Form_static_ANIMATE_SIZE},
  180. {"ANIMATE_SIZE_HEIGHT", lua_Form_static_ANIMATE_SIZE_HEIGHT},
  181. {"ANIMATE_SIZE_WIDTH", lua_Form_static_ANIMATE_SIZE_WIDTH},
  182. {"clearFocus", lua_Form_static_clearFocus},
  183. {"create", lua_Form_static_create},
  184. {"getActiveControl", lua_Form_static_getActiveControl},
  185. {"getFocusControl", lua_Form_static_getFocusControl},
  186. {"getForm", lua_Form_static_getForm},
  187. {NULL, NULL}
  188. };
  189. std::vector<std::string> scopePath;
  190. gameplay::ScriptUtil::registerClass("Form", lua_members, NULL, lua_Form__gc, lua_statics, scopePath);
  191. }
  192. static Form* getInstance(lua_State* state)
  193. {
  194. void* userdata = luaL_checkudata(state, 1, "Form");
  195. luaL_argcheck(state, userdata != NULL, 1, "'Form' expected.");
  196. return (Form*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
  197. }
  198. int lua_Form__gc(lua_State* state)
  199. {
  200. // Get the number of parameters.
  201. int paramCount = lua_gettop(state);
  202. // Attempt to match the parameters to a valid binding.
  203. switch (paramCount)
  204. {
  205. case 1:
  206. {
  207. if ((lua_type(state, 1) == LUA_TUSERDATA))
  208. {
  209. void* userdata = luaL_checkudata(state, 1, "Form");
  210. luaL_argcheck(state, userdata != NULL, 1, "'Form' expected.");
  211. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
  212. if (object->owns)
  213. {
  214. Form* instance = (Form*)object->instance;
  215. SAFE_RELEASE(instance);
  216. }
  217. return 0;
  218. }
  219. lua_pushstring(state, "lua_Form__gc - Failed to match the given parameters to a valid function signature.");
  220. lua_error(state);
  221. break;
  222. }
  223. default:
  224. {
  225. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  226. lua_error(state);
  227. break;
  228. }
  229. }
  230. return 0;
  231. }
  232. int lua_Form_addControl(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 2:
  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. {
  244. // Get parameter 1 off the stack.
  245. bool param1Valid;
  246. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  247. if (!param1Valid)
  248. {
  249. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  250. lua_error(state);
  251. }
  252. Form* instance = getInstance(state);
  253. unsigned int result = instance->addControl(param1);
  254. // Push the return value onto the stack.
  255. lua_pushunsigned(state, result);
  256. return 1;
  257. }
  258. lua_pushstring(state, "lua_Form_addControl - Failed to match the given parameters to a valid function signature.");
  259. lua_error(state);
  260. break;
  261. }
  262. default:
  263. {
  264. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  265. lua_error(state);
  266. break;
  267. }
  268. }
  269. return 0;
  270. }
  271. int lua_Form_addListener(lua_State* state)
  272. {
  273. // Get the number of parameters.
  274. int paramCount = lua_gettop(state);
  275. // Attempt to match the parameters to a valid binding.
  276. switch (paramCount)
  277. {
  278. case 3:
  279. {
  280. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  281. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  282. lua_type(state, 3) == LUA_TNUMBER)
  283. {
  284. // Get parameter 1 off the stack.
  285. bool param1Valid;
  286. gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
  287. if (!param1Valid)
  288. {
  289. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
  290. lua_error(state);
  291. }
  292. // Get parameter 2 off the stack.
  293. int param2 = (int)luaL_checkint(state, 3);
  294. Form* instance = getInstance(state);
  295. instance->addListener(param1, param2);
  296. return 0;
  297. }
  298. lua_pushstring(state, "lua_Form_addListener - Failed to match the given parameters to a valid function signature.");
  299. lua_error(state);
  300. break;
  301. }
  302. default:
  303. {
  304. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  305. lua_error(state);
  306. break;
  307. }
  308. }
  309. return 0;
  310. }
  311. int lua_Form_addRef(lua_State* state)
  312. {
  313. // Get the number of parameters.
  314. int paramCount = lua_gettop(state);
  315. // Attempt to match the parameters to a valid binding.
  316. switch (paramCount)
  317. {
  318. case 1:
  319. {
  320. if ((lua_type(state, 1) == LUA_TUSERDATA))
  321. {
  322. Form* instance = getInstance(state);
  323. instance->addRef();
  324. return 0;
  325. }
  326. lua_pushstring(state, "lua_Form_addRef - Failed to match the given parameters to a valid function signature.");
  327. lua_error(state);
  328. break;
  329. }
  330. default:
  331. {
  332. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  333. lua_error(state);
  334. break;
  335. }
  336. }
  337. return 0;
  338. }
  339. int lua_Form_addScriptCallback(lua_State* state)
  340. {
  341. // Get the number of parameters.
  342. int paramCount = lua_gettop(state);
  343. // Attempt to match the parameters to a valid binding.
  344. switch (paramCount)
  345. {
  346. case 3:
  347. {
  348. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  349. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  350. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  351. {
  352. // Get parameter 1 off the stack.
  353. std::string param1 = gameplay::ScriptUtil::getString(2, true);
  354. // Get parameter 2 off the stack.
  355. std::string param2 = gameplay::ScriptUtil::getString(3, true);
  356. Form* instance = getInstance(state);
  357. instance->addScriptCallback(param1, param2);
  358. return 0;
  359. }
  360. lua_pushstring(state, "lua_Form_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  361. lua_error(state);
  362. break;
  363. }
  364. default:
  365. {
  366. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  367. lua_error(state);
  368. break;
  369. }
  370. }
  371. return 0;
  372. }
  373. int lua_Form_canFocus(lua_State* state)
  374. {
  375. // Get the number of parameters.
  376. int paramCount = lua_gettop(state);
  377. // Attempt to match the parameters to a valid binding.
  378. switch (paramCount)
  379. {
  380. case 1:
  381. {
  382. if ((lua_type(state, 1) == LUA_TUSERDATA))
  383. {
  384. Form* instance = getInstance(state);
  385. bool result = instance->canFocus();
  386. // Push the return value onto the stack.
  387. lua_pushboolean(state, result);
  388. return 1;
  389. }
  390. lua_pushstring(state, "lua_Form_canFocus - Failed to match the given parameters to a valid function signature.");
  391. lua_error(state);
  392. break;
  393. }
  394. default:
  395. {
  396. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  397. lua_error(state);
  398. break;
  399. }
  400. }
  401. return 0;
  402. }
  403. int lua_Form_createAnimation(lua_State* state)
  404. {
  405. // Get the number of parameters.
  406. int paramCount = lua_gettop(state);
  407. // Attempt to match the parameters to a valid binding.
  408. switch (paramCount)
  409. {
  410. case 3:
  411. {
  412. do
  413. {
  414. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  415. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  416. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  417. {
  418. // Get parameter 1 off the stack.
  419. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  420. // Get parameter 2 off the stack.
  421. const char* param2 = gameplay::ScriptUtil::getString(3, false);
  422. Form* instance = getInstance(state);
  423. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  424. if (returnPtr)
  425. {
  426. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  427. object->instance = returnPtr;
  428. object->owns = false;
  429. luaL_getmetatable(state, "Animation");
  430. lua_setmetatable(state, -2);
  431. }
  432. else
  433. {
  434. lua_pushnil(state);
  435. }
  436. return 1;
  437. }
  438. } while (0);
  439. do
  440. {
  441. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  442. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  443. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  444. {
  445. // Get parameter 1 off the stack.
  446. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  447. // Get parameter 2 off the stack.
  448. bool param2Valid;
  449. gameplay::ScriptUtil::LuaArray<Properties> param2 = gameplay::ScriptUtil::getObjectPointer<Properties>(3, "Properties", false, &param2Valid);
  450. if (!param2Valid)
  451. break;
  452. Form* instance = getInstance(state);
  453. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  454. if (returnPtr)
  455. {
  456. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  457. object->instance = returnPtr;
  458. object->owns = false;
  459. luaL_getmetatable(state, "Animation");
  460. lua_setmetatable(state, -2);
  461. }
  462. else
  463. {
  464. lua_pushnil(state);
  465. }
  466. return 1;
  467. }
  468. } while (0);
  469. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  470. lua_error(state);
  471. break;
  472. }
  473. case 7:
  474. {
  475. do
  476. {
  477. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  478. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  479. lua_type(state, 3) == LUA_TNUMBER &&
  480. lua_type(state, 4) == LUA_TNUMBER &&
  481. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  482. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  483. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  484. {
  485. // Get parameter 1 off the stack.
  486. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  487. // Get parameter 2 off the stack.
  488. int param2 = (int)luaL_checkint(state, 3);
  489. // Get parameter 3 off the stack.
  490. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  491. // Get parameter 4 off the stack.
  492. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
  493. // Get parameter 5 off the stack.
  494. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
  495. // Get parameter 6 off the stack.
  496. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  497. Form* instance = getInstance(state);
  498. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  499. if (returnPtr)
  500. {
  501. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  502. object->instance = returnPtr;
  503. object->owns = false;
  504. luaL_getmetatable(state, "Animation");
  505. lua_setmetatable(state, -2);
  506. }
  507. else
  508. {
  509. lua_pushnil(state);
  510. }
  511. return 1;
  512. }
  513. } while (0);
  514. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  515. lua_error(state);
  516. break;
  517. }
  518. case 9:
  519. {
  520. do
  521. {
  522. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  523. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  524. lua_type(state, 3) == LUA_TNUMBER &&
  525. lua_type(state, 4) == LUA_TNUMBER &&
  526. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  527. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  528. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  529. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  530. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  531. {
  532. // Get parameter 1 off the stack.
  533. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  534. // Get parameter 2 off the stack.
  535. int param2 = (int)luaL_checkint(state, 3);
  536. // Get parameter 3 off the stack.
  537. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  538. // Get parameter 4 off the stack.
  539. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
  540. // Get parameter 5 off the stack.
  541. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
  542. // Get parameter 6 off the stack.
  543. gameplay::ScriptUtil::LuaArray<float> param6 = gameplay::ScriptUtil::getFloatPointer(7);
  544. // Get parameter 7 off the stack.
  545. gameplay::ScriptUtil::LuaArray<float> param7 = gameplay::ScriptUtil::getFloatPointer(8);
  546. // Get parameter 8 off the stack.
  547. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  548. Form* instance = getInstance(state);
  549. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  550. if (returnPtr)
  551. {
  552. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  553. object->instance = returnPtr;
  554. object->owns = false;
  555. luaL_getmetatable(state, "Animation");
  556. lua_setmetatable(state, -2);
  557. }
  558. else
  559. {
  560. lua_pushnil(state);
  561. }
  562. return 1;
  563. }
  564. } while (0);
  565. lua_pushstring(state, "lua_Form_createAnimation - Failed to match the given parameters to a valid function signature.");
  566. lua_error(state);
  567. break;
  568. }
  569. default:
  570. {
  571. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  572. lua_error(state);
  573. break;
  574. }
  575. }
  576. return 0;
  577. }
  578. int lua_Form_createAnimationFromBy(lua_State* state)
  579. {
  580. // Get the number of parameters.
  581. int paramCount = lua_gettop(state);
  582. // Attempt to match the parameters to a valid binding.
  583. switch (paramCount)
  584. {
  585. case 7:
  586. {
  587. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  588. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  589. lua_type(state, 3) == LUA_TNUMBER &&
  590. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  591. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  592. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  593. lua_type(state, 7) == LUA_TNUMBER)
  594. {
  595. // Get parameter 1 off the stack.
  596. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  597. // Get parameter 2 off the stack.
  598. int param2 = (int)luaL_checkint(state, 3);
  599. // Get parameter 3 off the stack.
  600. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
  601. // Get parameter 4 off the stack.
  602. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
  603. // Get parameter 5 off the stack.
  604. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  605. // Get parameter 6 off the stack.
  606. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  607. Form* instance = getInstance(state);
  608. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  609. if (returnPtr)
  610. {
  611. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  612. object->instance = returnPtr;
  613. object->owns = false;
  614. luaL_getmetatable(state, "Animation");
  615. lua_setmetatable(state, -2);
  616. }
  617. else
  618. {
  619. lua_pushnil(state);
  620. }
  621. return 1;
  622. }
  623. lua_pushstring(state, "lua_Form_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  624. lua_error(state);
  625. break;
  626. }
  627. default:
  628. {
  629. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  630. lua_error(state);
  631. break;
  632. }
  633. }
  634. return 0;
  635. }
  636. int lua_Form_createAnimationFromTo(lua_State* state)
  637. {
  638. // Get the number of parameters.
  639. int paramCount = lua_gettop(state);
  640. // Attempt to match the parameters to a valid binding.
  641. switch (paramCount)
  642. {
  643. case 7:
  644. {
  645. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  646. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  647. lua_type(state, 3) == LUA_TNUMBER &&
  648. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  649. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  650. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  651. lua_type(state, 7) == LUA_TNUMBER)
  652. {
  653. // Get parameter 1 off the stack.
  654. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  655. // Get parameter 2 off the stack.
  656. int param2 = (int)luaL_checkint(state, 3);
  657. // Get parameter 3 off the stack.
  658. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
  659. // Get parameter 4 off the stack.
  660. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
  661. // Get parameter 5 off the stack.
  662. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  663. // Get parameter 6 off the stack.
  664. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  665. Form* instance = getInstance(state);
  666. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  667. if (returnPtr)
  668. {
  669. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  670. object->instance = returnPtr;
  671. object->owns = false;
  672. luaL_getmetatable(state, "Animation");
  673. lua_setmetatable(state, -2);
  674. }
  675. else
  676. {
  677. lua_pushnil(state);
  678. }
  679. return 1;
  680. }
  681. lua_pushstring(state, "lua_Form_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  682. lua_error(state);
  683. break;
  684. }
  685. default:
  686. {
  687. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  688. lua_error(state);
  689. break;
  690. }
  691. }
  692. return 0;
  693. }
  694. int lua_Form_destroyAnimation(lua_State* state)
  695. {
  696. // Get the number of parameters.
  697. int paramCount = lua_gettop(state);
  698. // Attempt to match the parameters to a valid binding.
  699. switch (paramCount)
  700. {
  701. case 1:
  702. {
  703. if ((lua_type(state, 1) == LUA_TUSERDATA))
  704. {
  705. Form* instance = getInstance(state);
  706. instance->destroyAnimation();
  707. return 0;
  708. }
  709. lua_pushstring(state, "lua_Form_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  710. lua_error(state);
  711. break;
  712. }
  713. case 2:
  714. {
  715. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  716. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  717. {
  718. // Get parameter 1 off the stack.
  719. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  720. Form* instance = getInstance(state);
  721. instance->destroyAnimation(param1);
  722. return 0;
  723. }
  724. lua_pushstring(state, "lua_Form_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  725. lua_error(state);
  726. break;
  727. }
  728. default:
  729. {
  730. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  731. lua_error(state);
  732. break;
  733. }
  734. }
  735. return 0;
  736. }
  737. int lua_Form_draw(lua_State* state)
  738. {
  739. // Get the number of parameters.
  740. int paramCount = lua_gettop(state);
  741. // Attempt to match the parameters to a valid binding.
  742. switch (paramCount)
  743. {
  744. case 1:
  745. {
  746. if ((lua_type(state, 1) == LUA_TUSERDATA))
  747. {
  748. Form* instance = getInstance(state);
  749. unsigned int result = instance->draw();
  750. // Push the return value onto the stack.
  751. lua_pushunsigned(state, result);
  752. return 1;
  753. }
  754. lua_pushstring(state, "lua_Form_draw - Failed to match the given parameters to a valid function signature.");
  755. lua_error(state);
  756. break;
  757. }
  758. default:
  759. {
  760. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  761. lua_error(state);
  762. break;
  763. }
  764. }
  765. return 0;
  766. }
  767. int lua_Form_getAbsoluteBounds(lua_State* state)
  768. {
  769. // Get the number of parameters.
  770. int paramCount = lua_gettop(state);
  771. // Attempt to match the parameters to a valid binding.
  772. switch (paramCount)
  773. {
  774. case 1:
  775. {
  776. if ((lua_type(state, 1) == LUA_TUSERDATA))
  777. {
  778. Form* instance = getInstance(state);
  779. void* returnPtr = (void*)&(instance->getAbsoluteBounds());
  780. if (returnPtr)
  781. {
  782. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  783. object->instance = returnPtr;
  784. object->owns = false;
  785. luaL_getmetatable(state, "Rectangle");
  786. lua_setmetatable(state, -2);
  787. }
  788. else
  789. {
  790. lua_pushnil(state);
  791. }
  792. return 1;
  793. }
  794. lua_pushstring(state, "lua_Form_getAbsoluteBounds - Failed to match the given parameters to a valid function signature.");
  795. lua_error(state);
  796. break;
  797. }
  798. default:
  799. {
  800. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  801. lua_error(state);
  802. break;
  803. }
  804. }
  805. return 0;
  806. }
  807. int lua_Form_getActiveControl(lua_State* state)
  808. {
  809. // Get the number of parameters.
  810. int paramCount = lua_gettop(state);
  811. // Attempt to match the parameters to a valid binding.
  812. switch (paramCount)
  813. {
  814. case 1:
  815. {
  816. if ((lua_type(state, 1) == LUA_TUSERDATA))
  817. {
  818. Form* instance = getInstance(state);
  819. void* returnPtr = (void*)instance->getActiveControl();
  820. if (returnPtr)
  821. {
  822. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  823. object->instance = returnPtr;
  824. object->owns = false;
  825. luaL_getmetatable(state, "Control");
  826. lua_setmetatable(state, -2);
  827. }
  828. else
  829. {
  830. lua_pushnil(state);
  831. }
  832. return 1;
  833. }
  834. lua_pushstring(state, "lua_Form_getActiveControl - Failed to match the given parameters to a valid function signature.");
  835. lua_error(state);
  836. break;
  837. }
  838. default:
  839. {
  840. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  841. lua_error(state);
  842. break;
  843. }
  844. }
  845. return 0;
  846. }
  847. int lua_Form_getAlignment(lua_State* state)
  848. {
  849. // Get the number of parameters.
  850. int paramCount = lua_gettop(state);
  851. // Attempt to match the parameters to a valid binding.
  852. switch (paramCount)
  853. {
  854. case 1:
  855. {
  856. if ((lua_type(state, 1) == LUA_TUSERDATA))
  857. {
  858. Form* instance = getInstance(state);
  859. Control::Alignment result = instance->getAlignment();
  860. // Push the return value onto the stack.
  861. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
  862. return 1;
  863. }
  864. lua_pushstring(state, "lua_Form_getAlignment - Failed to match the given parameters to a valid function signature.");
  865. lua_error(state);
  866. break;
  867. }
  868. default:
  869. {
  870. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  871. lua_error(state);
  872. break;
  873. }
  874. }
  875. return 0;
  876. }
  877. int lua_Form_getAnimation(lua_State* state)
  878. {
  879. // Get the number of parameters.
  880. int paramCount = lua_gettop(state);
  881. // Attempt to match the parameters to a valid binding.
  882. switch (paramCount)
  883. {
  884. case 1:
  885. {
  886. if ((lua_type(state, 1) == LUA_TUSERDATA))
  887. {
  888. Form* instance = getInstance(state);
  889. void* returnPtr = (void*)instance->getAnimation();
  890. if (returnPtr)
  891. {
  892. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  893. object->instance = returnPtr;
  894. object->owns = false;
  895. luaL_getmetatable(state, "Animation");
  896. lua_setmetatable(state, -2);
  897. }
  898. else
  899. {
  900. lua_pushnil(state);
  901. }
  902. return 1;
  903. }
  904. lua_pushstring(state, "lua_Form_getAnimation - Failed to match the given parameters to a valid function signature.");
  905. lua_error(state);
  906. break;
  907. }
  908. case 2:
  909. {
  910. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  911. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  912. {
  913. // Get parameter 1 off the stack.
  914. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  915. Form* instance = getInstance(state);
  916. void* returnPtr = (void*)instance->getAnimation(param1);
  917. if (returnPtr)
  918. {
  919. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  920. object->instance = returnPtr;
  921. object->owns = false;
  922. luaL_getmetatable(state, "Animation");
  923. lua_setmetatable(state, -2);
  924. }
  925. else
  926. {
  927. lua_pushnil(state);
  928. }
  929. return 1;
  930. }
  931. lua_pushstring(state, "lua_Form_getAnimation - Failed to match the given parameters to a valid function signature.");
  932. lua_error(state);
  933. break;
  934. }
  935. default:
  936. {
  937. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  938. lua_error(state);
  939. break;
  940. }
  941. }
  942. return 0;
  943. }
  944. int lua_Form_getAnimationPropertyComponentCount(lua_State* state)
  945. {
  946. // Get the number of parameters.
  947. int paramCount = lua_gettop(state);
  948. // Attempt to match the parameters to a valid binding.
  949. switch (paramCount)
  950. {
  951. case 2:
  952. {
  953. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  954. lua_type(state, 2) == LUA_TNUMBER)
  955. {
  956. // Get parameter 1 off the stack.
  957. int param1 = (int)luaL_checkint(state, 2);
  958. Form* instance = getInstance(state);
  959. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  960. // Push the return value onto the stack.
  961. lua_pushunsigned(state, result);
  962. return 1;
  963. }
  964. lua_pushstring(state, "lua_Form_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  965. lua_error(state);
  966. break;
  967. }
  968. default:
  969. {
  970. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  971. lua_error(state);
  972. break;
  973. }
  974. }
  975. return 0;
  976. }
  977. int lua_Form_getAnimationPropertyValue(lua_State* state)
  978. {
  979. // Get the number of parameters.
  980. int paramCount = lua_gettop(state);
  981. // Attempt to match the parameters to a valid binding.
  982. switch (paramCount)
  983. {
  984. case 3:
  985. {
  986. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  987. lua_type(state, 2) == LUA_TNUMBER &&
  988. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  989. {
  990. // Get parameter 1 off the stack.
  991. int param1 = (int)luaL_checkint(state, 2);
  992. // Get parameter 2 off the stack.
  993. bool param2Valid;
  994. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  995. if (!param2Valid)
  996. {
  997. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  998. lua_error(state);
  999. }
  1000. Form* instance = getInstance(state);
  1001. instance->getAnimationPropertyValue(param1, param2);
  1002. return 0;
  1003. }
  1004. lua_pushstring(state, "lua_Form_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  1005. lua_error(state);
  1006. break;
  1007. }
  1008. default:
  1009. {
  1010. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1011. lua_error(state);
  1012. break;
  1013. }
  1014. }
  1015. return 0;
  1016. }
  1017. int lua_Form_getAutoSize(lua_State* state)
  1018. {
  1019. // Get the number of parameters.
  1020. int paramCount = lua_gettop(state);
  1021. // Attempt to match the parameters to a valid binding.
  1022. switch (paramCount)
  1023. {
  1024. case 1:
  1025. {
  1026. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1027. {
  1028. Form* instance = getInstance(state);
  1029. Control::AutoSize result = instance->getAutoSize();
  1030. // Push the return value onto the stack.
  1031. lua_pushstring(state, lua_stringFromEnum_ControlAutoSize(result));
  1032. return 1;
  1033. }
  1034. lua_pushstring(state, "lua_Form_getAutoSize - Failed to match the given parameters to a valid function signature.");
  1035. lua_error(state);
  1036. break;
  1037. }
  1038. default:
  1039. {
  1040. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1041. lua_error(state);
  1042. break;
  1043. }
  1044. }
  1045. return 0;
  1046. }
  1047. int lua_Form_getBorder(lua_State* state)
  1048. {
  1049. // Get the number of parameters.
  1050. int paramCount = lua_gettop(state);
  1051. // Attempt to match the parameters to a valid binding.
  1052. switch (paramCount)
  1053. {
  1054. case 1:
  1055. {
  1056. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1057. {
  1058. Form* instance = getInstance(state);
  1059. void* returnPtr = (void*)&(instance->getBorder());
  1060. if (returnPtr)
  1061. {
  1062. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1063. object->instance = returnPtr;
  1064. object->owns = false;
  1065. luaL_getmetatable(state, "ThemeSideRegions");
  1066. lua_setmetatable(state, -2);
  1067. }
  1068. else
  1069. {
  1070. lua_pushnil(state);
  1071. }
  1072. return 1;
  1073. }
  1074. lua_pushstring(state, "lua_Form_getBorder - Failed to match the given parameters to a valid function signature.");
  1075. lua_error(state);
  1076. break;
  1077. }
  1078. case 2:
  1079. {
  1080. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1081. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1082. {
  1083. // Get parameter 1 off the stack.
  1084. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1085. Form* instance = getInstance(state);
  1086. void* returnPtr = (void*)&(instance->getBorder(param1));
  1087. if (returnPtr)
  1088. {
  1089. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1090. object->instance = returnPtr;
  1091. object->owns = false;
  1092. luaL_getmetatable(state, "ThemeSideRegions");
  1093. lua_setmetatable(state, -2);
  1094. }
  1095. else
  1096. {
  1097. lua_pushnil(state);
  1098. }
  1099. return 1;
  1100. }
  1101. lua_pushstring(state, "lua_Form_getBorder - Failed to match the given parameters to a valid function signature.");
  1102. lua_error(state);
  1103. break;
  1104. }
  1105. default:
  1106. {
  1107. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1108. lua_error(state);
  1109. break;
  1110. }
  1111. }
  1112. return 0;
  1113. }
  1114. int lua_Form_getBounds(lua_State* state)
  1115. {
  1116. // Get the number of parameters.
  1117. int paramCount = lua_gettop(state);
  1118. // Attempt to match the parameters to a valid binding.
  1119. switch (paramCount)
  1120. {
  1121. case 1:
  1122. {
  1123. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1124. {
  1125. Form* instance = getInstance(state);
  1126. void* returnPtr = (void*)&(instance->getBounds());
  1127. if (returnPtr)
  1128. {
  1129. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1130. object->instance = returnPtr;
  1131. object->owns = false;
  1132. luaL_getmetatable(state, "Rectangle");
  1133. lua_setmetatable(state, -2);
  1134. }
  1135. else
  1136. {
  1137. lua_pushnil(state);
  1138. }
  1139. return 1;
  1140. }
  1141. lua_pushstring(state, "lua_Form_getBounds - Failed to match the given parameters to a valid function signature.");
  1142. lua_error(state);
  1143. break;
  1144. }
  1145. default:
  1146. {
  1147. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1148. lua_error(state);
  1149. break;
  1150. }
  1151. }
  1152. return 0;
  1153. }
  1154. int lua_Form_getClip(lua_State* state)
  1155. {
  1156. // Get the number of parameters.
  1157. int paramCount = lua_gettop(state);
  1158. // Attempt to match the parameters to a valid binding.
  1159. switch (paramCount)
  1160. {
  1161. case 1:
  1162. {
  1163. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1164. {
  1165. Form* instance = getInstance(state);
  1166. void* returnPtr = (void*)&(instance->getClip());
  1167. if (returnPtr)
  1168. {
  1169. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1170. object->instance = returnPtr;
  1171. object->owns = false;
  1172. luaL_getmetatable(state, "Rectangle");
  1173. lua_setmetatable(state, -2);
  1174. }
  1175. else
  1176. {
  1177. lua_pushnil(state);
  1178. }
  1179. return 1;
  1180. }
  1181. lua_pushstring(state, "lua_Form_getClip - Failed to match the given parameters to a valid function signature.");
  1182. lua_error(state);
  1183. break;
  1184. }
  1185. default:
  1186. {
  1187. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1188. lua_error(state);
  1189. break;
  1190. }
  1191. }
  1192. return 0;
  1193. }
  1194. int lua_Form_getClipBounds(lua_State* state)
  1195. {
  1196. // Get the number of parameters.
  1197. int paramCount = lua_gettop(state);
  1198. // Attempt to match the parameters to a valid binding.
  1199. switch (paramCount)
  1200. {
  1201. case 1:
  1202. {
  1203. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1204. {
  1205. Form* instance = getInstance(state);
  1206. void* returnPtr = (void*)&(instance->getClipBounds());
  1207. if (returnPtr)
  1208. {
  1209. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1210. object->instance = returnPtr;
  1211. object->owns = false;
  1212. luaL_getmetatable(state, "Rectangle");
  1213. lua_setmetatable(state, -2);
  1214. }
  1215. else
  1216. {
  1217. lua_pushnil(state);
  1218. }
  1219. return 1;
  1220. }
  1221. lua_pushstring(state, "lua_Form_getClipBounds - Failed to match the given parameters to a valid function signature.");
  1222. lua_error(state);
  1223. break;
  1224. }
  1225. default:
  1226. {
  1227. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1228. lua_error(state);
  1229. break;
  1230. }
  1231. }
  1232. return 0;
  1233. }
  1234. int lua_Form_getConsumeInputEvents(lua_State* state)
  1235. {
  1236. // Get the number of parameters.
  1237. int paramCount = lua_gettop(state);
  1238. // Attempt to match the parameters to a valid binding.
  1239. switch (paramCount)
  1240. {
  1241. case 1:
  1242. {
  1243. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1244. {
  1245. Form* instance = getInstance(state);
  1246. bool result = instance->getConsumeInputEvents();
  1247. // Push the return value onto the stack.
  1248. lua_pushboolean(state, result);
  1249. return 1;
  1250. }
  1251. lua_pushstring(state, "lua_Form_getConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  1252. lua_error(state);
  1253. break;
  1254. }
  1255. default:
  1256. {
  1257. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1258. lua_error(state);
  1259. break;
  1260. }
  1261. }
  1262. return 0;
  1263. }
  1264. int lua_Form_getControl(lua_State* state)
  1265. {
  1266. // Get the number of parameters.
  1267. int paramCount = lua_gettop(state);
  1268. // Attempt to match the parameters to a valid binding.
  1269. switch (paramCount)
  1270. {
  1271. case 2:
  1272. {
  1273. do
  1274. {
  1275. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1276. lua_type(state, 2) == LUA_TNUMBER)
  1277. {
  1278. // Get parameter 1 off the stack.
  1279. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  1280. Form* instance = getInstance(state);
  1281. void* returnPtr = (void*)instance->getControl(param1);
  1282. if (returnPtr)
  1283. {
  1284. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1285. object->instance = returnPtr;
  1286. object->owns = false;
  1287. luaL_getmetatable(state, "Control");
  1288. lua_setmetatable(state, -2);
  1289. }
  1290. else
  1291. {
  1292. lua_pushnil(state);
  1293. }
  1294. return 1;
  1295. }
  1296. } while (0);
  1297. do
  1298. {
  1299. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1300. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1301. {
  1302. // Get parameter 1 off the stack.
  1303. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1304. Form* instance = getInstance(state);
  1305. void* returnPtr = (void*)instance->getControl(param1);
  1306. if (returnPtr)
  1307. {
  1308. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1309. object->instance = returnPtr;
  1310. object->owns = false;
  1311. luaL_getmetatable(state, "Control");
  1312. lua_setmetatable(state, -2);
  1313. }
  1314. else
  1315. {
  1316. lua_pushnil(state);
  1317. }
  1318. return 1;
  1319. }
  1320. } while (0);
  1321. lua_pushstring(state, "lua_Form_getControl - Failed to match the given parameters to a valid function signature.");
  1322. lua_error(state);
  1323. break;
  1324. }
  1325. default:
  1326. {
  1327. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1328. lua_error(state);
  1329. break;
  1330. }
  1331. }
  1332. return 0;
  1333. }
  1334. int lua_Form_getControlCount(lua_State* state)
  1335. {
  1336. // Get the number of parameters.
  1337. int paramCount = lua_gettop(state);
  1338. // Attempt to match the parameters to a valid binding.
  1339. switch (paramCount)
  1340. {
  1341. case 1:
  1342. {
  1343. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1344. {
  1345. Form* instance = getInstance(state);
  1346. unsigned int result = instance->getControlCount();
  1347. // Push the return value onto the stack.
  1348. lua_pushunsigned(state, result);
  1349. return 1;
  1350. }
  1351. lua_pushstring(state, "lua_Form_getControlCount - Failed to match the given parameters to a valid function signature.");
  1352. lua_error(state);
  1353. break;
  1354. }
  1355. default:
  1356. {
  1357. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1358. lua_error(state);
  1359. break;
  1360. }
  1361. }
  1362. return 0;
  1363. }
  1364. int lua_Form_getCursorColor(lua_State* state)
  1365. {
  1366. // Get the number of parameters.
  1367. int paramCount = lua_gettop(state);
  1368. // Attempt to match the parameters to a valid binding.
  1369. switch (paramCount)
  1370. {
  1371. case 2:
  1372. {
  1373. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1374. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1375. {
  1376. // Get parameter 1 off the stack.
  1377. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1378. Form* instance = getInstance(state);
  1379. void* returnPtr = (void*)&(instance->getCursorColor(param1));
  1380. if (returnPtr)
  1381. {
  1382. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1383. object->instance = returnPtr;
  1384. object->owns = false;
  1385. luaL_getmetatable(state, "Vector4");
  1386. lua_setmetatable(state, -2);
  1387. }
  1388. else
  1389. {
  1390. lua_pushnil(state);
  1391. }
  1392. return 1;
  1393. }
  1394. lua_pushstring(state, "lua_Form_getCursorColor - Failed to match the given parameters to a valid function signature.");
  1395. lua_error(state);
  1396. break;
  1397. }
  1398. default:
  1399. {
  1400. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1401. lua_error(state);
  1402. break;
  1403. }
  1404. }
  1405. return 0;
  1406. }
  1407. int lua_Form_getCursorRegion(lua_State* state)
  1408. {
  1409. // Get the number of parameters.
  1410. int paramCount = lua_gettop(state);
  1411. // Attempt to match the parameters to a valid binding.
  1412. switch (paramCount)
  1413. {
  1414. case 2:
  1415. {
  1416. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1417. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1418. {
  1419. // Get parameter 1 off the stack.
  1420. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1421. Form* instance = getInstance(state);
  1422. void* returnPtr = (void*)&(instance->getCursorRegion(param1));
  1423. if (returnPtr)
  1424. {
  1425. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1426. object->instance = returnPtr;
  1427. object->owns = false;
  1428. luaL_getmetatable(state, "Rectangle");
  1429. lua_setmetatable(state, -2);
  1430. }
  1431. else
  1432. {
  1433. lua_pushnil(state);
  1434. }
  1435. return 1;
  1436. }
  1437. lua_pushstring(state, "lua_Form_getCursorRegion - Failed to match the given parameters to a valid function signature.");
  1438. lua_error(state);
  1439. break;
  1440. }
  1441. default:
  1442. {
  1443. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1444. lua_error(state);
  1445. break;
  1446. }
  1447. }
  1448. return 0;
  1449. }
  1450. int lua_Form_getCursorUVs(lua_State* state)
  1451. {
  1452. // Get the number of parameters.
  1453. int paramCount = lua_gettop(state);
  1454. // Attempt to match the parameters to a valid binding.
  1455. switch (paramCount)
  1456. {
  1457. case 2:
  1458. {
  1459. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1460. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1461. {
  1462. // Get parameter 1 off the stack.
  1463. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1464. Form* instance = getInstance(state);
  1465. void* returnPtr = (void*)&(instance->getCursorUVs(param1));
  1466. if (returnPtr)
  1467. {
  1468. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1469. object->instance = returnPtr;
  1470. object->owns = false;
  1471. luaL_getmetatable(state, "ThemeUVs");
  1472. lua_setmetatable(state, -2);
  1473. }
  1474. else
  1475. {
  1476. lua_pushnil(state);
  1477. }
  1478. return 1;
  1479. }
  1480. lua_pushstring(state, "lua_Form_getCursorUVs - Failed to match the given parameters to a valid function signature.");
  1481. lua_error(state);
  1482. break;
  1483. }
  1484. default:
  1485. {
  1486. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1487. lua_error(state);
  1488. break;
  1489. }
  1490. }
  1491. return 0;
  1492. }
  1493. int lua_Form_getFocusIndex(lua_State* state)
  1494. {
  1495. // Get the number of parameters.
  1496. int paramCount = lua_gettop(state);
  1497. // Attempt to match the parameters to a valid binding.
  1498. switch (paramCount)
  1499. {
  1500. case 1:
  1501. {
  1502. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1503. {
  1504. Form* instance = getInstance(state);
  1505. int result = instance->getFocusIndex();
  1506. // Push the return value onto the stack.
  1507. lua_pushinteger(state, result);
  1508. return 1;
  1509. }
  1510. lua_pushstring(state, "lua_Form_getFocusIndex - Failed to match the given parameters to a valid function signature.");
  1511. lua_error(state);
  1512. break;
  1513. }
  1514. default:
  1515. {
  1516. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1517. lua_error(state);
  1518. break;
  1519. }
  1520. }
  1521. return 0;
  1522. }
  1523. int lua_Form_getFont(lua_State* state)
  1524. {
  1525. // Get the number of parameters.
  1526. int paramCount = lua_gettop(state);
  1527. // Attempt to match the parameters to a valid binding.
  1528. switch (paramCount)
  1529. {
  1530. case 1:
  1531. {
  1532. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1533. {
  1534. Form* instance = getInstance(state);
  1535. void* returnPtr = (void*)instance->getFont();
  1536. if (returnPtr)
  1537. {
  1538. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1539. object->instance = returnPtr;
  1540. object->owns = false;
  1541. luaL_getmetatable(state, "Font");
  1542. lua_setmetatable(state, -2);
  1543. }
  1544. else
  1545. {
  1546. lua_pushnil(state);
  1547. }
  1548. return 1;
  1549. }
  1550. lua_pushstring(state, "lua_Form_getFont - Failed to match the given parameters to a valid function signature.");
  1551. lua_error(state);
  1552. break;
  1553. }
  1554. case 2:
  1555. {
  1556. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1557. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1558. {
  1559. // Get parameter 1 off the stack.
  1560. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1561. Form* instance = getInstance(state);
  1562. void* returnPtr = (void*)instance->getFont(param1);
  1563. if (returnPtr)
  1564. {
  1565. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1566. object->instance = returnPtr;
  1567. object->owns = false;
  1568. luaL_getmetatable(state, "Font");
  1569. lua_setmetatable(state, -2);
  1570. }
  1571. else
  1572. {
  1573. lua_pushnil(state);
  1574. }
  1575. return 1;
  1576. }
  1577. lua_pushstring(state, "lua_Form_getFont - Failed to match the given parameters to a valid function signature.");
  1578. lua_error(state);
  1579. break;
  1580. }
  1581. default:
  1582. {
  1583. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1584. lua_error(state);
  1585. break;
  1586. }
  1587. }
  1588. return 0;
  1589. }
  1590. int lua_Form_getFontSize(lua_State* state)
  1591. {
  1592. // Get the number of parameters.
  1593. int paramCount = lua_gettop(state);
  1594. // Attempt to match the parameters to a valid binding.
  1595. switch (paramCount)
  1596. {
  1597. case 1:
  1598. {
  1599. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1600. {
  1601. Form* instance = getInstance(state);
  1602. unsigned int result = instance->getFontSize();
  1603. // Push the return value onto the stack.
  1604. lua_pushunsigned(state, result);
  1605. return 1;
  1606. }
  1607. lua_pushstring(state, "lua_Form_getFontSize - Failed to match the given parameters to a valid function signature.");
  1608. lua_error(state);
  1609. break;
  1610. }
  1611. case 2:
  1612. {
  1613. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1614. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1615. {
  1616. // Get parameter 1 off the stack.
  1617. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1618. Form* instance = getInstance(state);
  1619. unsigned int result = instance->getFontSize(param1);
  1620. // Push the return value onto the stack.
  1621. lua_pushunsigned(state, result);
  1622. return 1;
  1623. }
  1624. lua_pushstring(state, "lua_Form_getFontSize - Failed to match the given parameters to a valid function signature.");
  1625. lua_error(state);
  1626. break;
  1627. }
  1628. default:
  1629. {
  1630. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1631. lua_error(state);
  1632. break;
  1633. }
  1634. }
  1635. return 0;
  1636. }
  1637. int lua_Form_getHeight(lua_State* state)
  1638. {
  1639. // Get the number of parameters.
  1640. int paramCount = lua_gettop(state);
  1641. // Attempt to match the parameters to a valid binding.
  1642. switch (paramCount)
  1643. {
  1644. case 1:
  1645. {
  1646. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1647. {
  1648. Form* instance = getInstance(state);
  1649. float result = instance->getHeight();
  1650. // Push the return value onto the stack.
  1651. lua_pushnumber(state, result);
  1652. return 1;
  1653. }
  1654. lua_pushstring(state, "lua_Form_getHeight - Failed to match the given parameters to a valid function signature.");
  1655. lua_error(state);
  1656. break;
  1657. }
  1658. default:
  1659. {
  1660. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1661. lua_error(state);
  1662. break;
  1663. }
  1664. }
  1665. return 0;
  1666. }
  1667. int lua_Form_getId(lua_State* state)
  1668. {
  1669. // Get the number of parameters.
  1670. int paramCount = lua_gettop(state);
  1671. // Attempt to match the parameters to a valid binding.
  1672. switch (paramCount)
  1673. {
  1674. case 1:
  1675. {
  1676. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1677. {
  1678. Form* instance = getInstance(state);
  1679. const char* result = instance->getId();
  1680. // Push the return value onto the stack.
  1681. lua_pushstring(state, result);
  1682. return 1;
  1683. }
  1684. lua_pushstring(state, "lua_Form_getId - Failed to match the given parameters to a valid function signature.");
  1685. lua_error(state);
  1686. break;
  1687. }
  1688. default:
  1689. {
  1690. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1691. lua_error(state);
  1692. break;
  1693. }
  1694. }
  1695. return 0;
  1696. }
  1697. int lua_Form_getImageColor(lua_State* state)
  1698. {
  1699. // Get the number of parameters.
  1700. int paramCount = lua_gettop(state);
  1701. // Attempt to match the parameters to a valid binding.
  1702. switch (paramCount)
  1703. {
  1704. case 3:
  1705. {
  1706. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1707. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1708. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1709. {
  1710. // Get parameter 1 off the stack.
  1711. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1712. // Get parameter 2 off the stack.
  1713. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1714. Form* instance = getInstance(state);
  1715. void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
  1716. if (returnPtr)
  1717. {
  1718. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1719. object->instance = returnPtr;
  1720. object->owns = false;
  1721. luaL_getmetatable(state, "Vector4");
  1722. lua_setmetatable(state, -2);
  1723. }
  1724. else
  1725. {
  1726. lua_pushnil(state);
  1727. }
  1728. return 1;
  1729. }
  1730. lua_pushstring(state, "lua_Form_getImageColor - Failed to match the given parameters to a valid function signature.");
  1731. lua_error(state);
  1732. break;
  1733. }
  1734. default:
  1735. {
  1736. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1737. lua_error(state);
  1738. break;
  1739. }
  1740. }
  1741. return 0;
  1742. }
  1743. int lua_Form_getImageRegion(lua_State* state)
  1744. {
  1745. // Get the number of parameters.
  1746. int paramCount = lua_gettop(state);
  1747. // Attempt to match the parameters to a valid binding.
  1748. switch (paramCount)
  1749. {
  1750. case 3:
  1751. {
  1752. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1753. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1754. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1755. {
  1756. // Get parameter 1 off the stack.
  1757. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1758. // Get parameter 2 off the stack.
  1759. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1760. Form* instance = getInstance(state);
  1761. void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
  1762. if (returnPtr)
  1763. {
  1764. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1765. object->instance = returnPtr;
  1766. object->owns = false;
  1767. luaL_getmetatable(state, "Rectangle");
  1768. lua_setmetatable(state, -2);
  1769. }
  1770. else
  1771. {
  1772. lua_pushnil(state);
  1773. }
  1774. return 1;
  1775. }
  1776. lua_pushstring(state, "lua_Form_getImageRegion - Failed to match the given parameters to a valid function signature.");
  1777. lua_error(state);
  1778. break;
  1779. }
  1780. default:
  1781. {
  1782. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1783. lua_error(state);
  1784. break;
  1785. }
  1786. }
  1787. return 0;
  1788. }
  1789. int lua_Form_getImageUVs(lua_State* state)
  1790. {
  1791. // Get the number of parameters.
  1792. int paramCount = lua_gettop(state);
  1793. // Attempt to match the parameters to a valid binding.
  1794. switch (paramCount)
  1795. {
  1796. case 3:
  1797. {
  1798. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1799. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1800. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1801. {
  1802. // Get parameter 1 off the stack.
  1803. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1804. // Get parameter 2 off the stack.
  1805. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1806. Form* instance = getInstance(state);
  1807. void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
  1808. if (returnPtr)
  1809. {
  1810. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1811. object->instance = returnPtr;
  1812. object->owns = false;
  1813. luaL_getmetatable(state, "ThemeUVs");
  1814. lua_setmetatable(state, -2);
  1815. }
  1816. else
  1817. {
  1818. lua_pushnil(state);
  1819. }
  1820. return 1;
  1821. }
  1822. lua_pushstring(state, "lua_Form_getImageUVs - Failed to match the given parameters to a valid function signature.");
  1823. lua_error(state);
  1824. break;
  1825. }
  1826. default:
  1827. {
  1828. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1829. lua_error(state);
  1830. break;
  1831. }
  1832. }
  1833. return 0;
  1834. }
  1835. int lua_Form_getLayout(lua_State* state)
  1836. {
  1837. // Get the number of parameters.
  1838. int paramCount = lua_gettop(state);
  1839. // Attempt to match the parameters to a valid binding.
  1840. switch (paramCount)
  1841. {
  1842. case 1:
  1843. {
  1844. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1845. {
  1846. Form* instance = getInstance(state);
  1847. void* returnPtr = (void*)instance->getLayout();
  1848. if (returnPtr)
  1849. {
  1850. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1851. object->instance = returnPtr;
  1852. object->owns = false;
  1853. luaL_getmetatable(state, "Layout");
  1854. lua_setmetatable(state, -2);
  1855. }
  1856. else
  1857. {
  1858. lua_pushnil(state);
  1859. }
  1860. return 1;
  1861. }
  1862. lua_pushstring(state, "lua_Form_getLayout - Failed to match the given parameters to a valid function signature.");
  1863. lua_error(state);
  1864. break;
  1865. }
  1866. default:
  1867. {
  1868. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1869. lua_error(state);
  1870. break;
  1871. }
  1872. }
  1873. return 0;
  1874. }
  1875. int lua_Form_getMargin(lua_State* state)
  1876. {
  1877. // Get the number of parameters.
  1878. int paramCount = lua_gettop(state);
  1879. // Attempt to match the parameters to a valid binding.
  1880. switch (paramCount)
  1881. {
  1882. case 1:
  1883. {
  1884. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1885. {
  1886. Form* instance = getInstance(state);
  1887. void* returnPtr = (void*)&(instance->getMargin());
  1888. if (returnPtr)
  1889. {
  1890. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1891. object->instance = returnPtr;
  1892. object->owns = false;
  1893. luaL_getmetatable(state, "ThemeSideRegions");
  1894. lua_setmetatable(state, -2);
  1895. }
  1896. else
  1897. {
  1898. lua_pushnil(state);
  1899. }
  1900. return 1;
  1901. }
  1902. lua_pushstring(state, "lua_Form_getMargin - Failed to match the given parameters to a valid function signature.");
  1903. lua_error(state);
  1904. break;
  1905. }
  1906. default:
  1907. {
  1908. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1909. lua_error(state);
  1910. break;
  1911. }
  1912. }
  1913. return 0;
  1914. }
  1915. int lua_Form_getOpacity(lua_State* state)
  1916. {
  1917. // Get the number of parameters.
  1918. int paramCount = lua_gettop(state);
  1919. // Attempt to match the parameters to a valid binding.
  1920. switch (paramCount)
  1921. {
  1922. case 1:
  1923. {
  1924. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1925. {
  1926. Form* instance = getInstance(state);
  1927. float result = instance->getOpacity();
  1928. // Push the return value onto the stack.
  1929. lua_pushnumber(state, result);
  1930. return 1;
  1931. }
  1932. lua_pushstring(state, "lua_Form_getOpacity - Failed to match the given parameters to a valid function signature.");
  1933. lua_error(state);
  1934. break;
  1935. }
  1936. case 2:
  1937. {
  1938. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1939. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1940. {
  1941. // Get parameter 1 off the stack.
  1942. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1943. Form* instance = getInstance(state);
  1944. float result = instance->getOpacity(param1);
  1945. // Push the return value onto the stack.
  1946. lua_pushnumber(state, result);
  1947. return 1;
  1948. }
  1949. lua_pushstring(state, "lua_Form_getOpacity - Failed to match the given parameters to a valid function signature.");
  1950. lua_error(state);
  1951. break;
  1952. }
  1953. default:
  1954. {
  1955. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1956. lua_error(state);
  1957. break;
  1958. }
  1959. }
  1960. return 0;
  1961. }
  1962. int lua_Form_getPadding(lua_State* state)
  1963. {
  1964. // Get the number of parameters.
  1965. int paramCount = lua_gettop(state);
  1966. // Attempt to match the parameters to a valid binding.
  1967. switch (paramCount)
  1968. {
  1969. case 1:
  1970. {
  1971. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1972. {
  1973. Form* instance = getInstance(state);
  1974. void* returnPtr = (void*)&(instance->getPadding());
  1975. if (returnPtr)
  1976. {
  1977. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1978. object->instance = returnPtr;
  1979. object->owns = false;
  1980. luaL_getmetatable(state, "ThemeSideRegions");
  1981. lua_setmetatable(state, -2);
  1982. }
  1983. else
  1984. {
  1985. lua_pushnil(state);
  1986. }
  1987. return 1;
  1988. }
  1989. lua_pushstring(state, "lua_Form_getPadding - Failed to match the given parameters to a valid function signature.");
  1990. lua_error(state);
  1991. break;
  1992. }
  1993. default:
  1994. {
  1995. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1996. lua_error(state);
  1997. break;
  1998. }
  1999. }
  2000. return 0;
  2001. }
  2002. int lua_Form_getParent(lua_State* state)
  2003. {
  2004. // Get the number of parameters.
  2005. int paramCount = lua_gettop(state);
  2006. // Attempt to match the parameters to a valid binding.
  2007. switch (paramCount)
  2008. {
  2009. case 1:
  2010. {
  2011. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2012. {
  2013. Form* instance = getInstance(state);
  2014. void* returnPtr = (void*)instance->getParent();
  2015. if (returnPtr)
  2016. {
  2017. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2018. object->instance = returnPtr;
  2019. object->owns = false;
  2020. luaL_getmetatable(state, "Control");
  2021. lua_setmetatable(state, -2);
  2022. }
  2023. else
  2024. {
  2025. lua_pushnil(state);
  2026. }
  2027. return 1;
  2028. }
  2029. lua_pushstring(state, "lua_Form_getParent - Failed to match the given parameters to a valid function signature.");
  2030. lua_error(state);
  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_getRefCount(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. unsigned int result = instance->getRefCount();
  2055. // Push the return value onto the stack.
  2056. lua_pushunsigned(state, result);
  2057. return 1;
  2058. }
  2059. lua_pushstring(state, "lua_Form_getRefCount - Failed to match the given parameters to a valid function signature.");
  2060. lua_error(state);
  2061. break;
  2062. }
  2063. default:
  2064. {
  2065. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2066. lua_error(state);
  2067. break;
  2068. }
  2069. }
  2070. return 0;
  2071. }
  2072. int lua_Form_getScroll(lua_State* state)
  2073. {
  2074. // Get the number of parameters.
  2075. int paramCount = lua_gettop(state);
  2076. // Attempt to match the parameters to a valid binding.
  2077. switch (paramCount)
  2078. {
  2079. case 1:
  2080. {
  2081. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2082. {
  2083. Form* instance = getInstance(state);
  2084. Container::Scroll result = instance->getScroll();
  2085. // Push the return value onto the stack.
  2086. lua_pushstring(state, lua_stringFromEnum_ContainerScroll(result));
  2087. return 1;
  2088. }
  2089. lua_pushstring(state, "lua_Form_getScroll - Failed to match the given parameters to a valid function signature.");
  2090. lua_error(state);
  2091. break;
  2092. }
  2093. default:
  2094. {
  2095. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2096. lua_error(state);
  2097. break;
  2098. }
  2099. }
  2100. return 0;
  2101. }
  2102. int lua_Form_getScrollPosition(lua_State* state)
  2103. {
  2104. // Get the number of parameters.
  2105. int paramCount = lua_gettop(state);
  2106. // Attempt to match the parameters to a valid binding.
  2107. switch (paramCount)
  2108. {
  2109. case 1:
  2110. {
  2111. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2112. {
  2113. Form* instance = getInstance(state);
  2114. void* returnPtr = (void*)&(instance->getScrollPosition());
  2115. if (returnPtr)
  2116. {
  2117. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2118. object->instance = returnPtr;
  2119. object->owns = false;
  2120. luaL_getmetatable(state, "Vector2");
  2121. lua_setmetatable(state, -2);
  2122. }
  2123. else
  2124. {
  2125. lua_pushnil(state);
  2126. }
  2127. return 1;
  2128. }
  2129. lua_pushstring(state, "lua_Form_getScrollPosition - Failed to match the given parameters to a valid function signature.");
  2130. lua_error(state);
  2131. break;
  2132. }
  2133. default:
  2134. {
  2135. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2136. lua_error(state);
  2137. break;
  2138. }
  2139. }
  2140. return 0;
  2141. }
  2142. int lua_Form_getScrollWheelRequiresFocus(lua_State* state)
  2143. {
  2144. // Get the number of parameters.
  2145. int paramCount = lua_gettop(state);
  2146. // Attempt to match the parameters to a valid binding.
  2147. switch (paramCount)
  2148. {
  2149. case 1:
  2150. {
  2151. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2152. {
  2153. Form* instance = getInstance(state);
  2154. bool result = instance->getScrollWheelRequiresFocus();
  2155. // Push the return value onto the stack.
  2156. lua_pushboolean(state, result);
  2157. return 1;
  2158. }
  2159. lua_pushstring(state, "lua_Form_getScrollWheelRequiresFocus - Failed to match the given parameters to a valid function signature.");
  2160. lua_error(state);
  2161. break;
  2162. }
  2163. default:
  2164. {
  2165. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2166. lua_error(state);
  2167. break;
  2168. }
  2169. }
  2170. return 0;
  2171. }
  2172. int lua_Form_getScrollWheelSpeed(lua_State* state)
  2173. {
  2174. // Get the number of parameters.
  2175. int paramCount = lua_gettop(state);
  2176. // Attempt to match the parameters to a valid binding.
  2177. switch (paramCount)
  2178. {
  2179. case 1:
  2180. {
  2181. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2182. {
  2183. Form* instance = getInstance(state);
  2184. float result = instance->getScrollWheelSpeed();
  2185. // Push the return value onto the stack.
  2186. lua_pushnumber(state, result);
  2187. return 1;
  2188. }
  2189. lua_pushstring(state, "lua_Form_getScrollWheelSpeed - Failed to match the given parameters to a valid function signature.");
  2190. lua_error(state);
  2191. break;
  2192. }
  2193. default:
  2194. {
  2195. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2196. lua_error(state);
  2197. break;
  2198. }
  2199. }
  2200. return 0;
  2201. }
  2202. int lua_Form_getScrollingFriction(lua_State* state)
  2203. {
  2204. // Get the number of parameters.
  2205. int paramCount = lua_gettop(state);
  2206. // Attempt to match the parameters to a valid binding.
  2207. switch (paramCount)
  2208. {
  2209. case 1:
  2210. {
  2211. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2212. {
  2213. Form* instance = getInstance(state);
  2214. float result = instance->getScrollingFriction();
  2215. // Push the return value onto the stack.
  2216. lua_pushnumber(state, result);
  2217. return 1;
  2218. }
  2219. lua_pushstring(state, "lua_Form_getScrollingFriction - Failed to match the given parameters to a valid function signature.");
  2220. lua_error(state);
  2221. break;
  2222. }
  2223. default:
  2224. {
  2225. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2226. lua_error(state);
  2227. break;
  2228. }
  2229. }
  2230. return 0;
  2231. }
  2232. int lua_Form_getSkinColor(lua_State* state)
  2233. {
  2234. // Get the number of parameters.
  2235. int paramCount = lua_gettop(state);
  2236. // Attempt to match the parameters to a valid binding.
  2237. switch (paramCount)
  2238. {
  2239. case 1:
  2240. {
  2241. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2242. {
  2243. Form* instance = getInstance(state);
  2244. void* returnPtr = (void*)&(instance->getSkinColor());
  2245. if (returnPtr)
  2246. {
  2247. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2248. object->instance = returnPtr;
  2249. object->owns = false;
  2250. luaL_getmetatable(state, "Vector4");
  2251. lua_setmetatable(state, -2);
  2252. }
  2253. else
  2254. {
  2255. lua_pushnil(state);
  2256. }
  2257. return 1;
  2258. }
  2259. lua_pushstring(state, "lua_Form_getSkinColor - Failed to match the given parameters to a valid function signature.");
  2260. lua_error(state);
  2261. break;
  2262. }
  2263. case 2:
  2264. {
  2265. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2266. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2267. {
  2268. // Get parameter 1 off the stack.
  2269. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2270. Form* instance = getInstance(state);
  2271. void* returnPtr = (void*)&(instance->getSkinColor(param1));
  2272. if (returnPtr)
  2273. {
  2274. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2275. object->instance = returnPtr;
  2276. object->owns = false;
  2277. luaL_getmetatable(state, "Vector4");
  2278. lua_setmetatable(state, -2);
  2279. }
  2280. else
  2281. {
  2282. lua_pushnil(state);
  2283. }
  2284. return 1;
  2285. }
  2286. lua_pushstring(state, "lua_Form_getSkinColor - Failed to match the given parameters to a valid function signature.");
  2287. lua_error(state);
  2288. break;
  2289. }
  2290. default:
  2291. {
  2292. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2293. lua_error(state);
  2294. break;
  2295. }
  2296. }
  2297. return 0;
  2298. }
  2299. int lua_Form_getSkinRegion(lua_State* state)
  2300. {
  2301. // Get the number of parameters.
  2302. int paramCount = lua_gettop(state);
  2303. // Attempt to match the parameters to a valid binding.
  2304. switch (paramCount)
  2305. {
  2306. case 1:
  2307. {
  2308. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2309. {
  2310. Form* instance = getInstance(state);
  2311. void* returnPtr = (void*)&(instance->getSkinRegion());
  2312. if (returnPtr)
  2313. {
  2314. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2315. object->instance = returnPtr;
  2316. object->owns = false;
  2317. luaL_getmetatable(state, "Rectangle");
  2318. lua_setmetatable(state, -2);
  2319. }
  2320. else
  2321. {
  2322. lua_pushnil(state);
  2323. }
  2324. return 1;
  2325. }
  2326. lua_pushstring(state, "lua_Form_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2327. lua_error(state);
  2328. break;
  2329. }
  2330. case 2:
  2331. {
  2332. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2333. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2334. {
  2335. // Get parameter 1 off the stack.
  2336. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2337. Form* instance = getInstance(state);
  2338. void* returnPtr = (void*)&(instance->getSkinRegion(param1));
  2339. if (returnPtr)
  2340. {
  2341. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2342. object->instance = returnPtr;
  2343. object->owns = false;
  2344. luaL_getmetatable(state, "Rectangle");
  2345. lua_setmetatable(state, -2);
  2346. }
  2347. else
  2348. {
  2349. lua_pushnil(state);
  2350. }
  2351. return 1;
  2352. }
  2353. lua_pushstring(state, "lua_Form_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  2354. lua_error(state);
  2355. break;
  2356. }
  2357. default:
  2358. {
  2359. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2360. lua_error(state);
  2361. break;
  2362. }
  2363. }
  2364. return 0;
  2365. }
  2366. int lua_Form_getState(lua_State* state)
  2367. {
  2368. // Get the number of parameters.
  2369. int paramCount = lua_gettop(state);
  2370. // Attempt to match the parameters to a valid binding.
  2371. switch (paramCount)
  2372. {
  2373. case 1:
  2374. {
  2375. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2376. {
  2377. Form* instance = getInstance(state);
  2378. Control::State result = instance->getState();
  2379. // Push the return value onto the stack.
  2380. lua_pushstring(state, lua_stringFromEnum_ControlState(result));
  2381. return 1;
  2382. }
  2383. lua_pushstring(state, "lua_Form_getState - Failed to match the given parameters to a valid function signature.");
  2384. lua_error(state);
  2385. break;
  2386. }
  2387. default:
  2388. {
  2389. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2390. lua_error(state);
  2391. break;
  2392. }
  2393. }
  2394. return 0;
  2395. }
  2396. int lua_Form_getStyle(lua_State* state)
  2397. {
  2398. // Get the number of parameters.
  2399. int paramCount = lua_gettop(state);
  2400. // Attempt to match the parameters to a valid binding.
  2401. switch (paramCount)
  2402. {
  2403. case 1:
  2404. {
  2405. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2406. {
  2407. Form* instance = getInstance(state);
  2408. void* returnPtr = (void*)instance->getStyle();
  2409. if (returnPtr)
  2410. {
  2411. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2412. object->instance = returnPtr;
  2413. object->owns = false;
  2414. luaL_getmetatable(state, "ThemeStyle");
  2415. lua_setmetatable(state, -2);
  2416. }
  2417. else
  2418. {
  2419. lua_pushnil(state);
  2420. }
  2421. return 1;
  2422. }
  2423. lua_pushstring(state, "lua_Form_getStyle - Failed to match the given parameters to a valid function signature.");
  2424. lua_error(state);
  2425. break;
  2426. }
  2427. default:
  2428. {
  2429. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2430. lua_error(state);
  2431. break;
  2432. }
  2433. }
  2434. return 0;
  2435. }
  2436. int lua_Form_getTextAlignment(lua_State* state)
  2437. {
  2438. // Get the number of parameters.
  2439. int paramCount = lua_gettop(state);
  2440. // Attempt to match the parameters to a valid binding.
  2441. switch (paramCount)
  2442. {
  2443. case 1:
  2444. {
  2445. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2446. {
  2447. Form* instance = getInstance(state);
  2448. Font::Justify result = instance->getTextAlignment();
  2449. // Push the return value onto the stack.
  2450. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2451. return 1;
  2452. }
  2453. lua_pushstring(state, "lua_Form_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2454. lua_error(state);
  2455. break;
  2456. }
  2457. case 2:
  2458. {
  2459. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2460. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2461. {
  2462. // Get parameter 1 off the stack.
  2463. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2464. Form* instance = getInstance(state);
  2465. Font::Justify result = instance->getTextAlignment(param1);
  2466. // Push the return value onto the stack.
  2467. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2468. return 1;
  2469. }
  2470. lua_pushstring(state, "lua_Form_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2471. lua_error(state);
  2472. break;
  2473. }
  2474. default:
  2475. {
  2476. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2477. lua_error(state);
  2478. break;
  2479. }
  2480. }
  2481. return 0;
  2482. }
  2483. int lua_Form_getTextColor(lua_State* state)
  2484. {
  2485. // Get the number of parameters.
  2486. int paramCount = lua_gettop(state);
  2487. // Attempt to match the parameters to a valid binding.
  2488. switch (paramCount)
  2489. {
  2490. case 1:
  2491. {
  2492. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2493. {
  2494. Form* instance = getInstance(state);
  2495. void* returnPtr = (void*)&(instance->getTextColor());
  2496. if (returnPtr)
  2497. {
  2498. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2499. object->instance = returnPtr;
  2500. object->owns = false;
  2501. luaL_getmetatable(state, "Vector4");
  2502. lua_setmetatable(state, -2);
  2503. }
  2504. else
  2505. {
  2506. lua_pushnil(state);
  2507. }
  2508. return 1;
  2509. }
  2510. lua_pushstring(state, "lua_Form_getTextColor - Failed to match the given parameters to a valid function signature.");
  2511. lua_error(state);
  2512. break;
  2513. }
  2514. case 2:
  2515. {
  2516. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2517. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2518. {
  2519. // Get parameter 1 off the stack.
  2520. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2521. Form* instance = getInstance(state);
  2522. void* returnPtr = (void*)&(instance->getTextColor(param1));
  2523. if (returnPtr)
  2524. {
  2525. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2526. object->instance = returnPtr;
  2527. object->owns = false;
  2528. luaL_getmetatable(state, "Vector4");
  2529. lua_setmetatable(state, -2);
  2530. }
  2531. else
  2532. {
  2533. lua_pushnil(state);
  2534. }
  2535. return 1;
  2536. }
  2537. lua_pushstring(state, "lua_Form_getTextColor - Failed to match the given parameters to a valid function signature.");
  2538. lua_error(state);
  2539. break;
  2540. }
  2541. default:
  2542. {
  2543. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2544. lua_error(state);
  2545. break;
  2546. }
  2547. }
  2548. return 0;
  2549. }
  2550. int lua_Form_getTextRightToLeft(lua_State* state)
  2551. {
  2552. // Get the number of parameters.
  2553. int paramCount = lua_gettop(state);
  2554. // Attempt to match the parameters to a valid binding.
  2555. switch (paramCount)
  2556. {
  2557. case 1:
  2558. {
  2559. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2560. {
  2561. Form* instance = getInstance(state);
  2562. bool result = instance->getTextRightToLeft();
  2563. // Push the return value onto the stack.
  2564. lua_pushboolean(state, result);
  2565. return 1;
  2566. }
  2567. lua_pushstring(state, "lua_Form_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2568. lua_error(state);
  2569. break;
  2570. }
  2571. case 2:
  2572. {
  2573. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2574. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2575. {
  2576. // Get parameter 1 off the stack.
  2577. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2578. Form* instance = getInstance(state);
  2579. bool result = instance->getTextRightToLeft(param1);
  2580. // Push the return value onto the stack.
  2581. lua_pushboolean(state, result);
  2582. return 1;
  2583. }
  2584. lua_pushstring(state, "lua_Form_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2585. lua_error(state);
  2586. break;
  2587. }
  2588. default:
  2589. {
  2590. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2591. lua_error(state);
  2592. break;
  2593. }
  2594. }
  2595. return 0;
  2596. }
  2597. int lua_Form_getTheme(lua_State* state)
  2598. {
  2599. // Get the number of parameters.
  2600. int paramCount = lua_gettop(state);
  2601. // Attempt to match the parameters to a valid binding.
  2602. switch (paramCount)
  2603. {
  2604. case 1:
  2605. {
  2606. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2607. {
  2608. Form* instance = getInstance(state);
  2609. void* returnPtr = (void*)instance->getTheme();
  2610. if (returnPtr)
  2611. {
  2612. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2613. object->instance = returnPtr;
  2614. object->owns = false;
  2615. luaL_getmetatable(state, "Theme");
  2616. lua_setmetatable(state, -2);
  2617. }
  2618. else
  2619. {
  2620. lua_pushnil(state);
  2621. }
  2622. return 1;
  2623. }
  2624. lua_pushstring(state, "lua_Form_getTheme - Failed to match the given parameters to a valid function signature.");
  2625. lua_error(state);
  2626. break;
  2627. }
  2628. default:
  2629. {
  2630. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2631. lua_error(state);
  2632. break;
  2633. }
  2634. }
  2635. return 0;
  2636. }
  2637. int lua_Form_getTopLevelForm(lua_State* state)
  2638. {
  2639. // Get the number of parameters.
  2640. int paramCount = lua_gettop(state);
  2641. // Attempt to match the parameters to a valid binding.
  2642. switch (paramCount)
  2643. {
  2644. case 1:
  2645. {
  2646. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2647. {
  2648. Form* instance = getInstance(state);
  2649. void* returnPtr = (void*)instance->getTopLevelForm();
  2650. if (returnPtr)
  2651. {
  2652. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  2653. object->instance = returnPtr;
  2654. object->owns = false;
  2655. luaL_getmetatable(state, "Form");
  2656. lua_setmetatable(state, -2);
  2657. }
  2658. else
  2659. {
  2660. lua_pushnil(state);
  2661. }
  2662. return 1;
  2663. }
  2664. lua_pushstring(state, "lua_Form_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
  2665. lua_error(state);
  2666. break;
  2667. }
  2668. default:
  2669. {
  2670. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2671. lua_error(state);
  2672. break;
  2673. }
  2674. }
  2675. return 0;
  2676. }
  2677. int lua_Form_getType(lua_State* state)
  2678. {
  2679. // Get the number of parameters.
  2680. int paramCount = lua_gettop(state);
  2681. // Attempt to match the parameters to a valid binding.
  2682. switch (paramCount)
  2683. {
  2684. case 1:
  2685. {
  2686. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2687. {
  2688. Form* instance = getInstance(state);
  2689. const char* result = instance->getType();
  2690. // Push the return value onto the stack.
  2691. lua_pushstring(state, result);
  2692. return 1;
  2693. }
  2694. lua_pushstring(state, "lua_Form_getType - Failed to match the given parameters to a valid function signature.");
  2695. lua_error(state);
  2696. break;
  2697. }
  2698. default:
  2699. {
  2700. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2701. lua_error(state);
  2702. break;
  2703. }
  2704. }
  2705. return 0;
  2706. }
  2707. int lua_Form_getWidth(lua_State* state)
  2708. {
  2709. // Get the number of parameters.
  2710. int paramCount = lua_gettop(state);
  2711. // Attempt to match the parameters to a valid binding.
  2712. switch (paramCount)
  2713. {
  2714. case 1:
  2715. {
  2716. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2717. {
  2718. Form* instance = getInstance(state);
  2719. float result = instance->getWidth();
  2720. // Push the return value onto the stack.
  2721. lua_pushnumber(state, result);
  2722. return 1;
  2723. }
  2724. lua_pushstring(state, "lua_Form_getWidth - Failed to match the given parameters to a valid function signature.");
  2725. lua_error(state);
  2726. break;
  2727. }
  2728. default:
  2729. {
  2730. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2731. lua_error(state);
  2732. break;
  2733. }
  2734. }
  2735. return 0;
  2736. }
  2737. int lua_Form_getX(lua_State* state)
  2738. {
  2739. // Get the number of parameters.
  2740. int paramCount = lua_gettop(state);
  2741. // Attempt to match the parameters to a valid binding.
  2742. switch (paramCount)
  2743. {
  2744. case 1:
  2745. {
  2746. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2747. {
  2748. Form* instance = getInstance(state);
  2749. float result = instance->getX();
  2750. // Push the return value onto the stack.
  2751. lua_pushnumber(state, result);
  2752. return 1;
  2753. }
  2754. lua_pushstring(state, "lua_Form_getX - Failed to match the given parameters to a valid function signature.");
  2755. lua_error(state);
  2756. break;
  2757. }
  2758. default:
  2759. {
  2760. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2761. lua_error(state);
  2762. break;
  2763. }
  2764. }
  2765. return 0;
  2766. }
  2767. int lua_Form_getY(lua_State* state)
  2768. {
  2769. // Get the number of parameters.
  2770. int paramCount = lua_gettop(state);
  2771. // Attempt to match the parameters to a valid binding.
  2772. switch (paramCount)
  2773. {
  2774. case 1:
  2775. {
  2776. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2777. {
  2778. Form* instance = getInstance(state);
  2779. float result = instance->getY();
  2780. // Push the return value onto the stack.
  2781. lua_pushnumber(state, result);
  2782. return 1;
  2783. }
  2784. lua_pushstring(state, "lua_Form_getY - Failed to match the given parameters to a valid function signature.");
  2785. lua_error(state);
  2786. break;
  2787. }
  2788. default:
  2789. {
  2790. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2791. lua_error(state);
  2792. break;
  2793. }
  2794. }
  2795. return 0;
  2796. }
  2797. int lua_Form_getZIndex(lua_State* state)
  2798. {
  2799. // Get the number of parameters.
  2800. int paramCount = lua_gettop(state);
  2801. // Attempt to match the parameters to a valid binding.
  2802. switch (paramCount)
  2803. {
  2804. case 1:
  2805. {
  2806. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2807. {
  2808. Form* instance = getInstance(state);
  2809. int result = instance->getZIndex();
  2810. // Push the return value onto the stack.
  2811. lua_pushinteger(state, result);
  2812. return 1;
  2813. }
  2814. lua_pushstring(state, "lua_Form_getZIndex - Failed to match the given parameters to a valid function signature.");
  2815. lua_error(state);
  2816. break;
  2817. }
  2818. default:
  2819. {
  2820. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2821. lua_error(state);
  2822. break;
  2823. }
  2824. }
  2825. return 0;
  2826. }
  2827. int lua_Form_hasFocus(lua_State* state)
  2828. {
  2829. // Get the number of parameters.
  2830. int paramCount = lua_gettop(state);
  2831. // Attempt to match the parameters to a valid binding.
  2832. switch (paramCount)
  2833. {
  2834. case 1:
  2835. {
  2836. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2837. {
  2838. Form* instance = getInstance(state);
  2839. bool result = instance->hasFocus();
  2840. // Push the return value onto the stack.
  2841. lua_pushboolean(state, result);
  2842. return 1;
  2843. }
  2844. lua_pushstring(state, "lua_Form_hasFocus - Failed to match the given parameters to a valid function signature.");
  2845. lua_error(state);
  2846. break;
  2847. }
  2848. default:
  2849. {
  2850. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2851. lua_error(state);
  2852. break;
  2853. }
  2854. }
  2855. return 0;
  2856. }
  2857. int lua_Form_insertControl(lua_State* state)
  2858. {
  2859. // Get the number of parameters.
  2860. int paramCount = lua_gettop(state);
  2861. // Attempt to match the parameters to a valid binding.
  2862. switch (paramCount)
  2863. {
  2864. case 3:
  2865. {
  2866. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2867. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  2868. lua_type(state, 3) == LUA_TNUMBER)
  2869. {
  2870. // Get parameter 1 off the stack.
  2871. bool param1Valid;
  2872. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  2873. if (!param1Valid)
  2874. {
  2875. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  2876. lua_error(state);
  2877. }
  2878. // Get parameter 2 off the stack.
  2879. unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
  2880. Form* instance = getInstance(state);
  2881. instance->insertControl(param1, param2);
  2882. return 0;
  2883. }
  2884. lua_pushstring(state, "lua_Form_insertControl - Failed to match the given parameters to a valid function signature.");
  2885. lua_error(state);
  2886. break;
  2887. }
  2888. default:
  2889. {
  2890. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2891. lua_error(state);
  2892. break;
  2893. }
  2894. }
  2895. return 0;
  2896. }
  2897. int lua_Form_isBatchingEnabled(lua_State* state)
  2898. {
  2899. // Get the number of parameters.
  2900. int paramCount = lua_gettop(state);
  2901. // Attempt to match the parameters to a valid binding.
  2902. switch (paramCount)
  2903. {
  2904. case 1:
  2905. {
  2906. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2907. {
  2908. Form* instance = getInstance(state);
  2909. bool result = instance->isBatchingEnabled();
  2910. // Push the return value onto the stack.
  2911. lua_pushboolean(state, result);
  2912. return 1;
  2913. }
  2914. lua_pushstring(state, "lua_Form_isBatchingEnabled - Failed to match the given parameters to a valid function signature.");
  2915. lua_error(state);
  2916. break;
  2917. }
  2918. default:
  2919. {
  2920. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2921. lua_error(state);
  2922. break;
  2923. }
  2924. }
  2925. return 0;
  2926. }
  2927. int lua_Form_isChild(lua_State* state)
  2928. {
  2929. // Get the number of parameters.
  2930. int paramCount = lua_gettop(state);
  2931. // Attempt to match the parameters to a valid binding.
  2932. switch (paramCount)
  2933. {
  2934. case 2:
  2935. {
  2936. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2937. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2938. {
  2939. // Get parameter 1 off the stack.
  2940. bool param1Valid;
  2941. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  2942. if (!param1Valid)
  2943. {
  2944. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  2945. lua_error(state);
  2946. }
  2947. Form* instance = getInstance(state);
  2948. bool result = instance->isChild(param1);
  2949. // Push the return value onto the stack.
  2950. lua_pushboolean(state, result);
  2951. return 1;
  2952. }
  2953. lua_pushstring(state, "lua_Form_isChild - Failed to match the given parameters to a valid function signature.");
  2954. lua_error(state);
  2955. break;
  2956. }
  2957. default:
  2958. {
  2959. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2960. lua_error(state);
  2961. break;
  2962. }
  2963. }
  2964. return 0;
  2965. }
  2966. int lua_Form_isContainer(lua_State* state)
  2967. {
  2968. // Get the number of parameters.
  2969. int paramCount = lua_gettop(state);
  2970. // Attempt to match the parameters to a valid binding.
  2971. switch (paramCount)
  2972. {
  2973. case 1:
  2974. {
  2975. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2976. {
  2977. Form* instance = getInstance(state);
  2978. bool result = instance->isContainer();
  2979. // Push the return value onto the stack.
  2980. lua_pushboolean(state, result);
  2981. return 1;
  2982. }
  2983. lua_pushstring(state, "lua_Form_isContainer - Failed to match the given parameters to a valid function signature.");
  2984. lua_error(state);
  2985. break;
  2986. }
  2987. default:
  2988. {
  2989. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2990. lua_error(state);
  2991. break;
  2992. }
  2993. }
  2994. return 0;
  2995. }
  2996. int lua_Form_isEnabled(lua_State* state)
  2997. {
  2998. // Get the number of parameters.
  2999. int paramCount = lua_gettop(state);
  3000. // Attempt to match the parameters to a valid binding.
  3001. switch (paramCount)
  3002. {
  3003. case 1:
  3004. {
  3005. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3006. {
  3007. Form* instance = getInstance(state);
  3008. bool result = instance->isEnabled();
  3009. // Push the return value onto the stack.
  3010. lua_pushboolean(state, result);
  3011. return 1;
  3012. }
  3013. lua_pushstring(state, "lua_Form_isEnabled - Failed to match the given parameters to a valid function signature.");
  3014. lua_error(state);
  3015. break;
  3016. }
  3017. default:
  3018. {
  3019. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3020. lua_error(state);
  3021. break;
  3022. }
  3023. }
  3024. return 0;
  3025. }
  3026. int lua_Form_isEnabledInHierarchy(lua_State* state)
  3027. {
  3028. // Get the number of parameters.
  3029. int paramCount = lua_gettop(state);
  3030. // Attempt to match the parameters to a valid binding.
  3031. switch (paramCount)
  3032. {
  3033. case 1:
  3034. {
  3035. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3036. {
  3037. Form* instance = getInstance(state);
  3038. bool result = instance->isEnabledInHierarchy();
  3039. // Push the return value onto the stack.
  3040. lua_pushboolean(state, result);
  3041. return 1;
  3042. }
  3043. lua_pushstring(state, "lua_Form_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
  3044. lua_error(state);
  3045. break;
  3046. }
  3047. default:
  3048. {
  3049. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3050. lua_error(state);
  3051. break;
  3052. }
  3053. }
  3054. return 0;
  3055. }
  3056. int lua_Form_isForm(lua_State* state)
  3057. {
  3058. // Get the number of parameters.
  3059. int paramCount = lua_gettop(state);
  3060. // Attempt to match the parameters to a valid binding.
  3061. switch (paramCount)
  3062. {
  3063. case 1:
  3064. {
  3065. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3066. {
  3067. Form* instance = getInstance(state);
  3068. bool result = instance->isForm();
  3069. // Push the return value onto the stack.
  3070. lua_pushboolean(state, result);
  3071. return 1;
  3072. }
  3073. lua_pushstring(state, "lua_Form_isForm - Failed to match the given parameters to a valid function signature.");
  3074. lua_error(state);
  3075. break;
  3076. }
  3077. default:
  3078. {
  3079. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3080. lua_error(state);
  3081. break;
  3082. }
  3083. }
  3084. return 0;
  3085. }
  3086. int lua_Form_isHeightPercentage(lua_State* state)
  3087. {
  3088. // Get the number of parameters.
  3089. int paramCount = lua_gettop(state);
  3090. // Attempt to match the parameters to a valid binding.
  3091. switch (paramCount)
  3092. {
  3093. case 1:
  3094. {
  3095. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3096. {
  3097. Form* instance = getInstance(state);
  3098. bool result = instance->isHeightPercentage();
  3099. // Push the return value onto the stack.
  3100. lua_pushboolean(state, result);
  3101. return 1;
  3102. }
  3103. lua_pushstring(state, "lua_Form_isHeightPercentage - Failed to match the given parameters to a valid function signature.");
  3104. lua_error(state);
  3105. break;
  3106. }
  3107. default:
  3108. {
  3109. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3110. lua_error(state);
  3111. break;
  3112. }
  3113. }
  3114. return 0;
  3115. }
  3116. int lua_Form_isScrollBarsAutoHide(lua_State* state)
  3117. {
  3118. // Get the number of parameters.
  3119. int paramCount = lua_gettop(state);
  3120. // Attempt to match the parameters to a valid binding.
  3121. switch (paramCount)
  3122. {
  3123. case 1:
  3124. {
  3125. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3126. {
  3127. Form* instance = getInstance(state);
  3128. bool result = instance->isScrollBarsAutoHide();
  3129. // Push the return value onto the stack.
  3130. lua_pushboolean(state, result);
  3131. return 1;
  3132. }
  3133. lua_pushstring(state, "lua_Form_isScrollBarsAutoHide - Failed to match the given parameters to a valid function signature.");
  3134. lua_error(state);
  3135. break;
  3136. }
  3137. default:
  3138. {
  3139. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3140. lua_error(state);
  3141. break;
  3142. }
  3143. }
  3144. return 0;
  3145. }
  3146. int lua_Form_isScrolling(lua_State* state)
  3147. {
  3148. // Get the number of parameters.
  3149. int paramCount = lua_gettop(state);
  3150. // Attempt to match the parameters to a valid binding.
  3151. switch (paramCount)
  3152. {
  3153. case 1:
  3154. {
  3155. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3156. {
  3157. Form* instance = getInstance(state);
  3158. bool result = instance->isScrolling();
  3159. // Push the return value onto the stack.
  3160. lua_pushboolean(state, result);
  3161. return 1;
  3162. }
  3163. lua_pushstring(state, "lua_Form_isScrolling - Failed to match the given parameters to a valid function signature.");
  3164. lua_error(state);
  3165. break;
  3166. }
  3167. default:
  3168. {
  3169. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3170. lua_error(state);
  3171. break;
  3172. }
  3173. }
  3174. return 0;
  3175. }
  3176. int lua_Form_isVisible(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 1:
  3184. {
  3185. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3186. {
  3187. Form* instance = getInstance(state);
  3188. bool result = instance->isVisible();
  3189. // Push the return value onto the stack.
  3190. lua_pushboolean(state, result);
  3191. return 1;
  3192. }
  3193. lua_pushstring(state, "lua_Form_isVisible - Failed to match the given parameters to a valid function signature.");
  3194. lua_error(state);
  3195. break;
  3196. }
  3197. default:
  3198. {
  3199. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3200. lua_error(state);
  3201. break;
  3202. }
  3203. }
  3204. return 0;
  3205. }
  3206. int lua_Form_isVisibleInHierarchy(lua_State* state)
  3207. {
  3208. // Get the number of parameters.
  3209. int paramCount = lua_gettop(state);
  3210. // Attempt to match the parameters to a valid binding.
  3211. switch (paramCount)
  3212. {
  3213. case 1:
  3214. {
  3215. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3216. {
  3217. Form* instance = getInstance(state);
  3218. bool result = instance->isVisibleInHierarchy();
  3219. // Push the return value onto the stack.
  3220. lua_pushboolean(state, result);
  3221. return 1;
  3222. }
  3223. lua_pushstring(state, "lua_Form_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
  3224. lua_error(state);
  3225. break;
  3226. }
  3227. default:
  3228. {
  3229. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3230. lua_error(state);
  3231. break;
  3232. }
  3233. }
  3234. return 0;
  3235. }
  3236. int lua_Form_isWidthPercentage(lua_State* state)
  3237. {
  3238. // Get the number of parameters.
  3239. int paramCount = lua_gettop(state);
  3240. // Attempt to match the parameters to a valid binding.
  3241. switch (paramCount)
  3242. {
  3243. case 1:
  3244. {
  3245. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3246. {
  3247. Form* instance = getInstance(state);
  3248. bool result = instance->isWidthPercentage();
  3249. // Push the return value onto the stack.
  3250. lua_pushboolean(state, result);
  3251. return 1;
  3252. }
  3253. lua_pushstring(state, "lua_Form_isWidthPercentage - Failed to match the given parameters to a valid function signature.");
  3254. lua_error(state);
  3255. break;
  3256. }
  3257. default:
  3258. {
  3259. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3260. lua_error(state);
  3261. break;
  3262. }
  3263. }
  3264. return 0;
  3265. }
  3266. int lua_Form_isXPercentage(lua_State* state)
  3267. {
  3268. // Get the number of parameters.
  3269. int paramCount = lua_gettop(state);
  3270. // Attempt to match the parameters to a valid binding.
  3271. switch (paramCount)
  3272. {
  3273. case 1:
  3274. {
  3275. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3276. {
  3277. Form* instance = getInstance(state);
  3278. bool result = instance->isXPercentage();
  3279. // Push the return value onto the stack.
  3280. lua_pushboolean(state, result);
  3281. return 1;
  3282. }
  3283. lua_pushstring(state, "lua_Form_isXPercentage - Failed to match the given parameters to a valid function signature.");
  3284. lua_error(state);
  3285. break;
  3286. }
  3287. default:
  3288. {
  3289. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3290. lua_error(state);
  3291. break;
  3292. }
  3293. }
  3294. return 0;
  3295. }
  3296. int lua_Form_isYPercentage(lua_State* state)
  3297. {
  3298. // Get the number of parameters.
  3299. int paramCount = lua_gettop(state);
  3300. // Attempt to match the parameters to a valid binding.
  3301. switch (paramCount)
  3302. {
  3303. case 1:
  3304. {
  3305. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3306. {
  3307. Form* instance = getInstance(state);
  3308. bool result = instance->isYPercentage();
  3309. // Push the return value onto the stack.
  3310. lua_pushboolean(state, result);
  3311. return 1;
  3312. }
  3313. lua_pushstring(state, "lua_Form_isYPercentage - Failed to match the given parameters to a valid function signature.");
  3314. lua_error(state);
  3315. break;
  3316. }
  3317. default:
  3318. {
  3319. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3320. lua_error(state);
  3321. break;
  3322. }
  3323. }
  3324. return 0;
  3325. }
  3326. int lua_Form_release(lua_State* state)
  3327. {
  3328. // Get the number of parameters.
  3329. int paramCount = lua_gettop(state);
  3330. // Attempt to match the parameters to a valid binding.
  3331. switch (paramCount)
  3332. {
  3333. case 1:
  3334. {
  3335. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3336. {
  3337. Form* instance = getInstance(state);
  3338. instance->release();
  3339. return 0;
  3340. }
  3341. lua_pushstring(state, "lua_Form_release - Failed to match the given parameters to a valid function signature.");
  3342. lua_error(state);
  3343. break;
  3344. }
  3345. default:
  3346. {
  3347. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3348. lua_error(state);
  3349. break;
  3350. }
  3351. }
  3352. return 0;
  3353. }
  3354. int lua_Form_removeControl(lua_State* state)
  3355. {
  3356. // Get the number of parameters.
  3357. int paramCount = lua_gettop(state);
  3358. // Attempt to match the parameters to a valid binding.
  3359. switch (paramCount)
  3360. {
  3361. case 2:
  3362. {
  3363. do
  3364. {
  3365. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3366. lua_type(state, 2) == LUA_TNUMBER)
  3367. {
  3368. // Get parameter 1 off the stack.
  3369. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3370. Form* instance = getInstance(state);
  3371. instance->removeControl(param1);
  3372. return 0;
  3373. }
  3374. } while (0);
  3375. do
  3376. {
  3377. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3378. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3379. {
  3380. // Get parameter 1 off the stack.
  3381. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  3382. Form* instance = getInstance(state);
  3383. instance->removeControl(param1);
  3384. return 0;
  3385. }
  3386. } while (0);
  3387. do
  3388. {
  3389. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3390. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3391. {
  3392. // Get parameter 1 off the stack.
  3393. bool param1Valid;
  3394. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  3395. if (!param1Valid)
  3396. break;
  3397. Form* instance = getInstance(state);
  3398. instance->removeControl(param1);
  3399. return 0;
  3400. }
  3401. } while (0);
  3402. lua_pushstring(state, "lua_Form_removeControl - Failed to match the given parameters to a valid function signature.");
  3403. lua_error(state);
  3404. break;
  3405. }
  3406. default:
  3407. {
  3408. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3409. lua_error(state);
  3410. break;
  3411. }
  3412. }
  3413. return 0;
  3414. }
  3415. int lua_Form_removeListener(lua_State* state)
  3416. {
  3417. // Get the number of parameters.
  3418. int paramCount = lua_gettop(state);
  3419. // Attempt to match the parameters to a valid binding.
  3420. switch (paramCount)
  3421. {
  3422. case 2:
  3423. {
  3424. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3425. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3426. {
  3427. // Get parameter 1 off the stack.
  3428. bool param1Valid;
  3429. gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
  3430. if (!param1Valid)
  3431. {
  3432. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
  3433. lua_error(state);
  3434. }
  3435. Form* instance = getInstance(state);
  3436. instance->removeListener(param1);
  3437. return 0;
  3438. }
  3439. lua_pushstring(state, "lua_Form_removeListener - Failed to match the given parameters to a valid function signature.");
  3440. lua_error(state);
  3441. break;
  3442. }
  3443. default:
  3444. {
  3445. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3446. lua_error(state);
  3447. break;
  3448. }
  3449. }
  3450. return 0;
  3451. }
  3452. int lua_Form_removeScriptCallback(lua_State* state)
  3453. {
  3454. // Get the number of parameters.
  3455. int paramCount = lua_gettop(state);
  3456. // Attempt to match the parameters to a valid binding.
  3457. switch (paramCount)
  3458. {
  3459. case 3:
  3460. {
  3461. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3462. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3463. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  3464. {
  3465. // Get parameter 1 off the stack.
  3466. std::string param1 = gameplay::ScriptUtil::getString(2, true);
  3467. // Get parameter 2 off the stack.
  3468. std::string param2 = gameplay::ScriptUtil::getString(3, true);
  3469. Form* instance = getInstance(state);
  3470. instance->removeScriptCallback(param1, param2);
  3471. return 0;
  3472. }
  3473. lua_pushstring(state, "lua_Form_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  3474. lua_error(state);
  3475. break;
  3476. }
  3477. default:
  3478. {
  3479. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3480. lua_error(state);
  3481. break;
  3482. }
  3483. }
  3484. return 0;
  3485. }
  3486. int lua_Form_setActiveControl(lua_State* state)
  3487. {
  3488. // Get the number of parameters.
  3489. int paramCount = lua_gettop(state);
  3490. // Attempt to match the parameters to a valid binding.
  3491. switch (paramCount)
  3492. {
  3493. case 2:
  3494. {
  3495. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3496. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3497. {
  3498. // Get parameter 1 off the stack.
  3499. bool param1Valid;
  3500. gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
  3501. if (!param1Valid)
  3502. {
  3503. lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
  3504. lua_error(state);
  3505. }
  3506. Form* instance = getInstance(state);
  3507. instance->setActiveControl(param1);
  3508. return 0;
  3509. }
  3510. lua_pushstring(state, "lua_Form_setActiveControl - Failed to match the given parameters to a valid function signature.");
  3511. lua_error(state);
  3512. break;
  3513. }
  3514. default:
  3515. {
  3516. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3517. lua_error(state);
  3518. break;
  3519. }
  3520. }
  3521. return 0;
  3522. }
  3523. int lua_Form_setAlignment(lua_State* state)
  3524. {
  3525. // Get the number of parameters.
  3526. int paramCount = lua_gettop(state);
  3527. // Attempt to match the parameters to a valid binding.
  3528. switch (paramCount)
  3529. {
  3530. case 2:
  3531. {
  3532. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3533. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3534. {
  3535. // Get parameter 1 off the stack.
  3536. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
  3537. Form* instance = getInstance(state);
  3538. instance->setAlignment(param1);
  3539. return 0;
  3540. }
  3541. lua_pushstring(state, "lua_Form_setAlignment - Failed to match the given parameters to a valid function signature.");
  3542. lua_error(state);
  3543. break;
  3544. }
  3545. default:
  3546. {
  3547. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3548. lua_error(state);
  3549. break;
  3550. }
  3551. }
  3552. return 0;
  3553. }
  3554. int lua_Form_setAnimationPropertyValue(lua_State* state)
  3555. {
  3556. // Get the number of parameters.
  3557. int paramCount = lua_gettop(state);
  3558. // Attempt to match the parameters to a valid binding.
  3559. switch (paramCount)
  3560. {
  3561. case 3:
  3562. {
  3563. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3564. lua_type(state, 2) == LUA_TNUMBER &&
  3565. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  3566. {
  3567. // Get parameter 1 off the stack.
  3568. int param1 = (int)luaL_checkint(state, 2);
  3569. // Get parameter 2 off the stack.
  3570. bool param2Valid;
  3571. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  3572. if (!param2Valid)
  3573. {
  3574. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  3575. lua_error(state);
  3576. }
  3577. Form* instance = getInstance(state);
  3578. instance->setAnimationPropertyValue(param1, param2);
  3579. return 0;
  3580. }
  3581. lua_pushstring(state, "lua_Form_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  3582. lua_error(state);
  3583. break;
  3584. }
  3585. case 4:
  3586. {
  3587. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3588. lua_type(state, 2) == LUA_TNUMBER &&
  3589. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  3590. lua_type(state, 4) == LUA_TNUMBER)
  3591. {
  3592. // Get parameter 1 off the stack.
  3593. int param1 = (int)luaL_checkint(state, 2);
  3594. // Get parameter 2 off the stack.
  3595. bool param2Valid;
  3596. gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
  3597. if (!param2Valid)
  3598. {
  3599. lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
  3600. lua_error(state);
  3601. }
  3602. // Get parameter 3 off the stack.
  3603. float param3 = (float)luaL_checknumber(state, 4);
  3604. Form* instance = getInstance(state);
  3605. instance->setAnimationPropertyValue(param1, param2, param3);
  3606. return 0;
  3607. }
  3608. lua_pushstring(state, "lua_Form_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  3609. lua_error(state);
  3610. break;
  3611. }
  3612. default:
  3613. {
  3614. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3615. lua_error(state);
  3616. break;
  3617. }
  3618. }
  3619. return 0;
  3620. }
  3621. int lua_Form_setAutoSize(lua_State* state)
  3622. {
  3623. // Get the number of parameters.
  3624. int paramCount = lua_gettop(state);
  3625. // Attempt to match the parameters to a valid binding.
  3626. switch (paramCount)
  3627. {
  3628. case 2:
  3629. {
  3630. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3631. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3632. {
  3633. // Get parameter 1 off the stack.
  3634. Control::AutoSize param1 = (Control::AutoSize)lua_enumFromString_ControlAutoSize(luaL_checkstring(state, 2));
  3635. Form* instance = getInstance(state);
  3636. instance->setAutoSize(param1);
  3637. return 0;
  3638. }
  3639. lua_pushstring(state, "lua_Form_setAutoSize - Failed to match the given parameters to a valid function signature.");
  3640. lua_error(state);
  3641. break;
  3642. }
  3643. default:
  3644. {
  3645. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3646. lua_error(state);
  3647. break;
  3648. }
  3649. }
  3650. return 0;
  3651. }
  3652. int lua_Form_setBatchingEnabled(lua_State* state)
  3653. {
  3654. // Get the number of parameters.
  3655. int paramCount = lua_gettop(state);
  3656. // Attempt to match the parameters to a valid binding.
  3657. switch (paramCount)
  3658. {
  3659. case 2:
  3660. {
  3661. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3662. lua_type(state, 2) == LUA_TBOOLEAN)
  3663. {
  3664. // Get parameter 1 off the stack.
  3665. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3666. Form* instance = getInstance(state);
  3667. instance->setBatchingEnabled(param1);
  3668. return 0;
  3669. }
  3670. lua_pushstring(state, "lua_Form_setBatchingEnabled - Failed to match the given parameters to a valid function signature.");
  3671. lua_error(state);
  3672. break;
  3673. }
  3674. default:
  3675. {
  3676. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3677. lua_error(state);
  3678. break;
  3679. }
  3680. }
  3681. return 0;
  3682. }
  3683. int lua_Form_setBorder(lua_State* state)
  3684. {
  3685. // Get the number of parameters.
  3686. int paramCount = lua_gettop(state);
  3687. // Attempt to match the parameters to a valid binding.
  3688. switch (paramCount)
  3689. {
  3690. case 5:
  3691. {
  3692. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3693. lua_type(state, 2) == LUA_TNUMBER &&
  3694. lua_type(state, 3) == LUA_TNUMBER &&
  3695. lua_type(state, 4) == LUA_TNUMBER &&
  3696. lua_type(state, 5) == LUA_TNUMBER)
  3697. {
  3698. // Get parameter 1 off the stack.
  3699. float param1 = (float)luaL_checknumber(state, 2);
  3700. // Get parameter 2 off the stack.
  3701. float param2 = (float)luaL_checknumber(state, 3);
  3702. // Get parameter 3 off the stack.
  3703. float param3 = (float)luaL_checknumber(state, 4);
  3704. // Get parameter 4 off the stack.
  3705. float param4 = (float)luaL_checknumber(state, 5);
  3706. Form* instance = getInstance(state);
  3707. instance->setBorder(param1, param2, param3, param4);
  3708. return 0;
  3709. }
  3710. lua_pushstring(state, "lua_Form_setBorder - Failed to match the given parameters to a valid function signature.");
  3711. lua_error(state);
  3712. break;
  3713. }
  3714. case 6:
  3715. {
  3716. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3717. lua_type(state, 2) == LUA_TNUMBER &&
  3718. lua_type(state, 3) == LUA_TNUMBER &&
  3719. lua_type(state, 4) == LUA_TNUMBER &&
  3720. lua_type(state, 5) == LUA_TNUMBER &&
  3721. lua_type(state, 6) == LUA_TNUMBER)
  3722. {
  3723. // Get parameter 1 off the stack.
  3724. float param1 = (float)luaL_checknumber(state, 2);
  3725. // Get parameter 2 off the stack.
  3726. float param2 = (float)luaL_checknumber(state, 3);
  3727. // Get parameter 3 off the stack.
  3728. float param3 = (float)luaL_checknumber(state, 4);
  3729. // Get parameter 4 off the stack.
  3730. float param4 = (float)luaL_checknumber(state, 5);
  3731. // Get parameter 5 off the stack.
  3732. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
  3733. Form* instance = getInstance(state);
  3734. instance->setBorder(param1, param2, param3, param4, param5);
  3735. return 0;
  3736. }
  3737. lua_pushstring(state, "lua_Form_setBorder - Failed to match the given parameters to a valid function signature.");
  3738. lua_error(state);
  3739. break;
  3740. }
  3741. default:
  3742. {
  3743. lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
  3744. lua_error(state);
  3745. break;
  3746. }
  3747. }
  3748. return 0;
  3749. }
  3750. int lua_Form_setBounds(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 2:
  3758. {
  3759. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3760. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3761. {
  3762. // Get parameter 1 off the stack.
  3763. bool param1Valid;
  3764. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3765. if (!param1Valid)
  3766. {
  3767. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  3768. lua_error(state);
  3769. }
  3770. Form* instance = getInstance(state);
  3771. instance->setBounds(*param1);
  3772. return 0;
  3773. }
  3774. lua_pushstring(state, "lua_Form_setBounds - Failed to match the given parameters to a valid function signature.");
  3775. lua_error(state);
  3776. break;
  3777. }
  3778. default:
  3779. {
  3780. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3781. lua_error(state);
  3782. break;
  3783. }
  3784. }
  3785. return 0;
  3786. }
  3787. int lua_Form_setCanFocus(lua_State* state)
  3788. {
  3789. // Get the number of parameters.
  3790. int paramCount = lua_gettop(state);
  3791. // Attempt to match the parameters to a valid binding.
  3792. switch (paramCount)
  3793. {
  3794. case 2:
  3795. {
  3796. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3797. lua_type(state, 2) == LUA_TBOOLEAN)
  3798. {
  3799. // Get parameter 1 off the stack.
  3800. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3801. Form* instance = getInstance(state);
  3802. instance->setCanFocus(param1);
  3803. return 0;
  3804. }
  3805. lua_pushstring(state, "lua_Form_setCanFocus - Failed to match the given parameters to a valid function signature.");
  3806. lua_error(state);
  3807. break;
  3808. }
  3809. default:
  3810. {
  3811. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3812. lua_error(state);
  3813. break;
  3814. }
  3815. }
  3816. return 0;
  3817. }
  3818. int lua_Form_setConsumeInputEvents(lua_State* state)
  3819. {
  3820. // Get the number of parameters.
  3821. int paramCount = lua_gettop(state);
  3822. // Attempt to match the parameters to a valid binding.
  3823. switch (paramCount)
  3824. {
  3825. case 2:
  3826. {
  3827. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3828. lua_type(state, 2) == LUA_TBOOLEAN)
  3829. {
  3830. // Get parameter 1 off the stack.
  3831. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3832. Form* instance = getInstance(state);
  3833. instance->setConsumeInputEvents(param1);
  3834. return 0;
  3835. }
  3836. lua_pushstring(state, "lua_Form_setConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  3837. lua_error(state);
  3838. break;
  3839. }
  3840. default:
  3841. {
  3842. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3843. lua_error(state);
  3844. break;
  3845. }
  3846. }
  3847. return 0;
  3848. }
  3849. int lua_Form_setCursorColor(lua_State* state)
  3850. {
  3851. // Get the number of parameters.
  3852. int paramCount = lua_gettop(state);
  3853. // Attempt to match the parameters to a valid binding.
  3854. switch (paramCount)
  3855. {
  3856. case 3:
  3857. {
  3858. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3859. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3860. lua_type(state, 3) == LUA_TNUMBER)
  3861. {
  3862. // Get parameter 1 off the stack.
  3863. bool param1Valid;
  3864. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  3865. if (!param1Valid)
  3866. {
  3867. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  3868. lua_error(state);
  3869. }
  3870. // Get parameter 2 off the stack.
  3871. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3872. Form* instance = getInstance(state);
  3873. instance->setCursorColor(*param1, param2);
  3874. return 0;
  3875. }
  3876. lua_pushstring(state, "lua_Form_setCursorColor - Failed to match the given parameters to a valid function signature.");
  3877. lua_error(state);
  3878. break;
  3879. }
  3880. default:
  3881. {
  3882. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3883. lua_error(state);
  3884. break;
  3885. }
  3886. }
  3887. return 0;
  3888. }
  3889. int lua_Form_setCursorRegion(lua_State* state)
  3890. {
  3891. // Get the number of parameters.
  3892. int paramCount = lua_gettop(state);
  3893. // Attempt to match the parameters to a valid binding.
  3894. switch (paramCount)
  3895. {
  3896. case 3:
  3897. {
  3898. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3899. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3900. lua_type(state, 3) == LUA_TNUMBER)
  3901. {
  3902. // Get parameter 1 off the stack.
  3903. bool param1Valid;
  3904. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  3905. if (!param1Valid)
  3906. {
  3907. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  3908. lua_error(state);
  3909. }
  3910. // Get parameter 2 off the stack.
  3911. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3912. Form* instance = getInstance(state);
  3913. instance->setCursorRegion(*param1, param2);
  3914. return 0;
  3915. }
  3916. lua_pushstring(state, "lua_Form_setCursorRegion - Failed to match the given parameters to a valid function signature.");
  3917. lua_error(state);
  3918. break;
  3919. }
  3920. default:
  3921. {
  3922. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3923. lua_error(state);
  3924. break;
  3925. }
  3926. }
  3927. return 0;
  3928. }
  3929. int lua_Form_setEnabled(lua_State* state)
  3930. {
  3931. // Get the number of parameters.
  3932. int paramCount = lua_gettop(state);
  3933. // Attempt to match the parameters to a valid binding.
  3934. switch (paramCount)
  3935. {
  3936. case 2:
  3937. {
  3938. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3939. lua_type(state, 2) == LUA_TBOOLEAN)
  3940. {
  3941. // Get parameter 1 off the stack.
  3942. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  3943. Form* instance = getInstance(state);
  3944. instance->setEnabled(param1);
  3945. return 0;
  3946. }
  3947. lua_pushstring(state, "lua_Form_setEnabled - Failed to match the given parameters to a valid function signature.");
  3948. lua_error(state);
  3949. break;
  3950. }
  3951. default:
  3952. {
  3953. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3954. lua_error(state);
  3955. break;
  3956. }
  3957. }
  3958. return 0;
  3959. }
  3960. int lua_Form_setFocus(lua_State* state)
  3961. {
  3962. // Get the number of parameters.
  3963. int paramCount = lua_gettop(state);
  3964. // Attempt to match the parameters to a valid binding.
  3965. switch (paramCount)
  3966. {
  3967. case 1:
  3968. {
  3969. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3970. {
  3971. Form* instance = getInstance(state);
  3972. bool result = instance->setFocus();
  3973. // Push the return value onto the stack.
  3974. lua_pushboolean(state, result);
  3975. return 1;
  3976. }
  3977. lua_pushstring(state, "lua_Form_setFocus - Failed to match the given parameters to a valid function signature.");
  3978. lua_error(state);
  3979. break;
  3980. }
  3981. default:
  3982. {
  3983. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3984. lua_error(state);
  3985. break;
  3986. }
  3987. }
  3988. return 0;
  3989. }
  3990. int lua_Form_setFocusIndex(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_TNUMBER)
  4001. {
  4002. // Get parameter 1 off the stack.
  4003. int param1 = (int)luaL_checkint(state, 2);
  4004. Form* instance = getInstance(state);
  4005. instance->setFocusIndex(param1);
  4006. return 0;
  4007. }
  4008. lua_pushstring(state, "lua_Form_setFocusIndex - Failed to match the given parameters to a valid function signature.");
  4009. lua_error(state);
  4010. break;
  4011. }
  4012. default:
  4013. {
  4014. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4015. lua_error(state);
  4016. break;
  4017. }
  4018. }
  4019. return 0;
  4020. }
  4021. int lua_Form_setFont(lua_State* state)
  4022. {
  4023. // Get the number of parameters.
  4024. int paramCount = lua_gettop(state);
  4025. // Attempt to match the parameters to a valid binding.
  4026. switch (paramCount)
  4027. {
  4028. case 2:
  4029. {
  4030. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4031. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4032. {
  4033. // Get parameter 1 off the stack.
  4034. bool param1Valid;
  4035. gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
  4036. if (!param1Valid)
  4037. {
  4038. lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
  4039. lua_error(state);
  4040. }
  4041. Form* instance = getInstance(state);
  4042. instance->setFont(param1);
  4043. return 0;
  4044. }
  4045. lua_pushstring(state, "lua_Form_setFont - Failed to match the given parameters to a valid function signature.");
  4046. lua_error(state);
  4047. break;
  4048. }
  4049. case 3:
  4050. {
  4051. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4052. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  4053. lua_type(state, 3) == LUA_TNUMBER)
  4054. {
  4055. // Get parameter 1 off the stack.
  4056. bool param1Valid;
  4057. gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
  4058. if (!param1Valid)
  4059. {
  4060. lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
  4061. lua_error(state);
  4062. }
  4063. // Get parameter 2 off the stack.
  4064. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4065. Form* instance = getInstance(state);
  4066. instance->setFont(param1, param2);
  4067. return 0;
  4068. }
  4069. lua_pushstring(state, "lua_Form_setFont - Failed to match the given parameters to a valid function signature.");
  4070. lua_error(state);
  4071. break;
  4072. }
  4073. default:
  4074. {
  4075. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4076. lua_error(state);
  4077. break;
  4078. }
  4079. }
  4080. return 0;
  4081. }
  4082. int lua_Form_setFontSize(lua_State* state)
  4083. {
  4084. // Get the number of parameters.
  4085. int paramCount = lua_gettop(state);
  4086. // Attempt to match the parameters to a valid binding.
  4087. switch (paramCount)
  4088. {
  4089. case 2:
  4090. {
  4091. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4092. lua_type(state, 2) == LUA_TNUMBER)
  4093. {
  4094. // Get parameter 1 off the stack.
  4095. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  4096. Form* instance = getInstance(state);
  4097. instance->setFontSize(param1);
  4098. return 0;
  4099. }
  4100. lua_pushstring(state, "lua_Form_setFontSize - Failed to match the given parameters to a valid function signature.");
  4101. lua_error(state);
  4102. break;
  4103. }
  4104. case 3:
  4105. {
  4106. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4107. lua_type(state, 2) == LUA_TNUMBER &&
  4108. lua_type(state, 3) == LUA_TNUMBER)
  4109. {
  4110. // Get parameter 1 off the stack.
  4111. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  4112. // Get parameter 2 off the stack.
  4113. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4114. Form* instance = getInstance(state);
  4115. instance->setFontSize(param1, param2);
  4116. return 0;
  4117. }
  4118. lua_pushstring(state, "lua_Form_setFontSize - Failed to match the given parameters to a valid function signature.");
  4119. lua_error(state);
  4120. break;
  4121. }
  4122. default:
  4123. {
  4124. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4125. lua_error(state);
  4126. break;
  4127. }
  4128. }
  4129. return 0;
  4130. }
  4131. int lua_Form_setHeight(lua_State* state)
  4132. {
  4133. // Get the number of parameters.
  4134. int paramCount = lua_gettop(state);
  4135. // Attempt to match the parameters to a valid binding.
  4136. switch (paramCount)
  4137. {
  4138. case 2:
  4139. {
  4140. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4141. lua_type(state, 2) == LUA_TNUMBER)
  4142. {
  4143. // Get parameter 1 off the stack.
  4144. float param1 = (float)luaL_checknumber(state, 2);
  4145. Form* instance = getInstance(state);
  4146. instance->setHeight(param1);
  4147. return 0;
  4148. }
  4149. lua_pushstring(state, "lua_Form_setHeight - Failed to match the given parameters to a valid function signature.");
  4150. lua_error(state);
  4151. break;
  4152. }
  4153. case 3:
  4154. {
  4155. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4156. lua_type(state, 2) == LUA_TNUMBER &&
  4157. lua_type(state, 3) == LUA_TBOOLEAN)
  4158. {
  4159. // Get parameter 1 off the stack.
  4160. float param1 = (float)luaL_checknumber(state, 2);
  4161. // Get parameter 2 off the stack.
  4162. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  4163. Form* instance = getInstance(state);
  4164. instance->setHeight(param1, param2);
  4165. return 0;
  4166. }
  4167. lua_pushstring(state, "lua_Form_setHeight - Failed to match the given parameters to a valid function signature.");
  4168. lua_error(state);
  4169. break;
  4170. }
  4171. default:
  4172. {
  4173. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4174. lua_error(state);
  4175. break;
  4176. }
  4177. }
  4178. return 0;
  4179. }
  4180. int lua_Form_setId(lua_State* state)
  4181. {
  4182. // Get the number of parameters.
  4183. int paramCount = lua_gettop(state);
  4184. // Attempt to match the parameters to a valid binding.
  4185. switch (paramCount)
  4186. {
  4187. case 2:
  4188. {
  4189. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4190. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4191. {
  4192. // Get parameter 1 off the stack.
  4193. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4194. Form* instance = getInstance(state);
  4195. instance->setId(param1);
  4196. return 0;
  4197. }
  4198. lua_pushstring(state, "lua_Form_setId - Failed to match the given parameters to a valid function signature.");
  4199. lua_error(state);
  4200. break;
  4201. }
  4202. default:
  4203. {
  4204. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4205. lua_error(state);
  4206. break;
  4207. }
  4208. }
  4209. return 0;
  4210. }
  4211. int lua_Form_setImageColor(lua_State* state)
  4212. {
  4213. // Get the number of parameters.
  4214. int paramCount = lua_gettop(state);
  4215. // Attempt to match the parameters to a valid binding.
  4216. switch (paramCount)
  4217. {
  4218. case 3:
  4219. {
  4220. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4221. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4222. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  4223. {
  4224. // Get parameter 1 off the stack.
  4225. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4226. // Get parameter 2 off the stack.
  4227. bool param2Valid;
  4228. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  4229. if (!param2Valid)
  4230. {
  4231. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  4232. lua_error(state);
  4233. }
  4234. Form* instance = getInstance(state);
  4235. instance->setImageColor(param1, *param2);
  4236. return 0;
  4237. }
  4238. lua_pushstring(state, "lua_Form_setImageColor - Failed to match the given parameters to a valid function signature.");
  4239. lua_error(state);
  4240. break;
  4241. }
  4242. case 4:
  4243. {
  4244. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4245. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4246. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4247. lua_type(state, 4) == LUA_TNUMBER)
  4248. {
  4249. // Get parameter 1 off the stack.
  4250. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4251. // Get parameter 2 off the stack.
  4252. bool param2Valid;
  4253. gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
  4254. if (!param2Valid)
  4255. {
  4256. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
  4257. lua_error(state);
  4258. }
  4259. // Get parameter 3 off the stack.
  4260. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  4261. Form* instance = getInstance(state);
  4262. instance->setImageColor(param1, *param2, param3);
  4263. return 0;
  4264. }
  4265. lua_pushstring(state, "lua_Form_setImageColor - Failed to match the given parameters to a valid function signature.");
  4266. lua_error(state);
  4267. break;
  4268. }
  4269. default:
  4270. {
  4271. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  4272. lua_error(state);
  4273. break;
  4274. }
  4275. }
  4276. return 0;
  4277. }
  4278. int lua_Form_setImageRegion(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 3:
  4286. {
  4287. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4288. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4289. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  4290. {
  4291. // Get parameter 1 off the stack.
  4292. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4293. // Get parameter 2 off the stack.
  4294. bool param2Valid;
  4295. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
  4296. if (!param2Valid)
  4297. {
  4298. lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
  4299. lua_error(state);
  4300. }
  4301. Form* instance = getInstance(state);
  4302. instance->setImageRegion(param1, *param2);
  4303. return 0;
  4304. }
  4305. lua_pushstring(state, "lua_Form_setImageRegion - Failed to match the given parameters to a valid function signature.");
  4306. lua_error(state);
  4307. break;
  4308. }
  4309. case 4:
  4310. {
  4311. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4312. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4313. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4314. lua_type(state, 4) == LUA_TNUMBER)
  4315. {
  4316. // Get parameter 1 off the stack.
  4317. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  4318. // Get parameter 2 off the stack.
  4319. bool param2Valid;
  4320. gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
  4321. if (!param2Valid)
  4322. {
  4323. lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
  4324. lua_error(state);
  4325. }
  4326. // Get parameter 3 off the stack.
  4327. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  4328. Form* instance = getInstance(state);
  4329. instance->setImageRegion(param1, *param2, param3);
  4330. return 0;
  4331. }
  4332. lua_pushstring(state, "lua_Form_setImageRegion - Failed to match the given parameters to a valid function signature.");
  4333. lua_error(state);
  4334. break;
  4335. }
  4336. default:
  4337. {
  4338. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  4339. lua_error(state);
  4340. break;
  4341. }
  4342. }
  4343. return 0;
  4344. }
  4345. int lua_Form_setLayout(lua_State* state)
  4346. {
  4347. // Get the number of parameters.
  4348. int paramCount = lua_gettop(state);
  4349. // Attempt to match the parameters to a valid binding.
  4350. switch (paramCount)
  4351. {
  4352. case 2:
  4353. {
  4354. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4355. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4356. {
  4357. // Get parameter 1 off the stack.
  4358. Layout::Type param1 = (Layout::Type)lua_enumFromString_LayoutType(luaL_checkstring(state, 2));
  4359. Form* instance = getInstance(state);
  4360. instance->setLayout(param1);
  4361. return 0;
  4362. }
  4363. lua_pushstring(state, "lua_Form_setLayout - Failed to match the given parameters to a valid function signature.");
  4364. lua_error(state);
  4365. break;
  4366. }
  4367. default:
  4368. {
  4369. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4370. lua_error(state);
  4371. break;
  4372. }
  4373. }
  4374. return 0;
  4375. }
  4376. int lua_Form_setMargin(lua_State* state)
  4377. {
  4378. // Get the number of parameters.
  4379. int paramCount = lua_gettop(state);
  4380. // Attempt to match the parameters to a valid binding.
  4381. switch (paramCount)
  4382. {
  4383. case 5:
  4384. {
  4385. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4386. lua_type(state, 2) == LUA_TNUMBER &&
  4387. lua_type(state, 3) == LUA_TNUMBER &&
  4388. lua_type(state, 4) == LUA_TNUMBER &&
  4389. lua_type(state, 5) == LUA_TNUMBER)
  4390. {
  4391. // Get parameter 1 off the stack.
  4392. float param1 = (float)luaL_checknumber(state, 2);
  4393. // Get parameter 2 off the stack.
  4394. float param2 = (float)luaL_checknumber(state, 3);
  4395. // Get parameter 3 off the stack.
  4396. float param3 = (float)luaL_checknumber(state, 4);
  4397. // Get parameter 4 off the stack.
  4398. float param4 = (float)luaL_checknumber(state, 5);
  4399. Form* instance = getInstance(state);
  4400. instance->setMargin(param1, param2, param3, param4);
  4401. return 0;
  4402. }
  4403. lua_pushstring(state, "lua_Form_setMargin - Failed to match the given parameters to a valid function signature.");
  4404. lua_error(state);
  4405. break;
  4406. }
  4407. default:
  4408. {
  4409. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  4410. lua_error(state);
  4411. break;
  4412. }
  4413. }
  4414. return 0;
  4415. }
  4416. int lua_Form_setNode(lua_State* state)
  4417. {
  4418. // Get the number of parameters.
  4419. int paramCount = lua_gettop(state);
  4420. // Attempt to match the parameters to a valid binding.
  4421. switch (paramCount)
  4422. {
  4423. case 2:
  4424. {
  4425. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4426. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4427. {
  4428. // Get parameter 1 off the stack.
  4429. bool param1Valid;
  4430. gameplay::ScriptUtil::LuaArray<Node> param1 = gameplay::ScriptUtil::getObjectPointer<Node>(2, "Node", false, &param1Valid);
  4431. if (!param1Valid)
  4432. {
  4433. lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
  4434. lua_error(state);
  4435. }
  4436. Form* instance = getInstance(state);
  4437. instance->setNode(param1);
  4438. return 0;
  4439. }
  4440. lua_pushstring(state, "lua_Form_setNode - Failed to match the given parameters to a valid function signature.");
  4441. lua_error(state);
  4442. break;
  4443. }
  4444. default:
  4445. {
  4446. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4447. lua_error(state);
  4448. break;
  4449. }
  4450. }
  4451. return 0;
  4452. }
  4453. int lua_Form_setOpacity(lua_State* state)
  4454. {
  4455. // Get the number of parameters.
  4456. int paramCount = lua_gettop(state);
  4457. // Attempt to match the parameters to a valid binding.
  4458. switch (paramCount)
  4459. {
  4460. case 2:
  4461. {
  4462. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4463. lua_type(state, 2) == LUA_TNUMBER)
  4464. {
  4465. // Get parameter 1 off the stack.
  4466. float param1 = (float)luaL_checknumber(state, 2);
  4467. Form* instance = getInstance(state);
  4468. instance->setOpacity(param1);
  4469. return 0;
  4470. }
  4471. lua_pushstring(state, "lua_Form_setOpacity - Failed to match the given parameters to a valid function signature.");
  4472. lua_error(state);
  4473. break;
  4474. }
  4475. case 3:
  4476. {
  4477. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4478. lua_type(state, 2) == LUA_TNUMBER &&
  4479. lua_type(state, 3) == LUA_TNUMBER)
  4480. {
  4481. // Get parameter 1 off the stack.
  4482. float param1 = (float)luaL_checknumber(state, 2);
  4483. // Get parameter 2 off the stack.
  4484. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4485. Form* instance = getInstance(state);
  4486. instance->setOpacity(param1, param2);
  4487. return 0;
  4488. }
  4489. lua_pushstring(state, "lua_Form_setOpacity - Failed to match the given parameters to a valid function signature.");
  4490. lua_error(state);
  4491. break;
  4492. }
  4493. default:
  4494. {
  4495. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4496. lua_error(state);
  4497. break;
  4498. }
  4499. }
  4500. return 0;
  4501. }
  4502. int lua_Form_setPadding(lua_State* state)
  4503. {
  4504. // Get the number of parameters.
  4505. int paramCount = lua_gettop(state);
  4506. // Attempt to match the parameters to a valid binding.
  4507. switch (paramCount)
  4508. {
  4509. case 5:
  4510. {
  4511. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4512. lua_type(state, 2) == LUA_TNUMBER &&
  4513. lua_type(state, 3) == LUA_TNUMBER &&
  4514. lua_type(state, 4) == LUA_TNUMBER &&
  4515. lua_type(state, 5) == LUA_TNUMBER)
  4516. {
  4517. // Get parameter 1 off the stack.
  4518. float param1 = (float)luaL_checknumber(state, 2);
  4519. // Get parameter 2 off the stack.
  4520. float param2 = (float)luaL_checknumber(state, 3);
  4521. // Get parameter 3 off the stack.
  4522. float param3 = (float)luaL_checknumber(state, 4);
  4523. // Get parameter 4 off the stack.
  4524. float param4 = (float)luaL_checknumber(state, 5);
  4525. Form* instance = getInstance(state);
  4526. instance->setPadding(param1, param2, param3, param4);
  4527. return 0;
  4528. }
  4529. lua_pushstring(state, "lua_Form_setPadding - Failed to match the given parameters to a valid function signature.");
  4530. lua_error(state);
  4531. break;
  4532. }
  4533. default:
  4534. {
  4535. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  4536. lua_error(state);
  4537. break;
  4538. }
  4539. }
  4540. return 0;
  4541. }
  4542. int lua_Form_setPosition(lua_State* state)
  4543. {
  4544. // Get the number of parameters.
  4545. int paramCount = lua_gettop(state);
  4546. // Attempt to match the parameters to a valid binding.
  4547. switch (paramCount)
  4548. {
  4549. case 3:
  4550. {
  4551. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4552. lua_type(state, 2) == LUA_TNUMBER &&
  4553. lua_type(state, 3) == LUA_TNUMBER)
  4554. {
  4555. // Get parameter 1 off the stack.
  4556. float param1 = (float)luaL_checknumber(state, 2);
  4557. // Get parameter 2 off the stack.
  4558. float param2 = (float)luaL_checknumber(state, 3);
  4559. Form* instance = getInstance(state);
  4560. instance->setPosition(param1, param2);
  4561. return 0;
  4562. }
  4563. lua_pushstring(state, "lua_Form_setPosition - Failed to match the given parameters to a valid function signature.");
  4564. lua_error(state);
  4565. break;
  4566. }
  4567. default:
  4568. {
  4569. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  4570. lua_error(state);
  4571. break;
  4572. }
  4573. }
  4574. return 0;
  4575. }
  4576. int lua_Form_setScroll(lua_State* state)
  4577. {
  4578. // Get the number of parameters.
  4579. int paramCount = lua_gettop(state);
  4580. // Attempt to match the parameters to a valid binding.
  4581. switch (paramCount)
  4582. {
  4583. case 2:
  4584. {
  4585. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4586. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4587. {
  4588. // Get parameter 1 off the stack.
  4589. Container::Scroll param1 = (Container::Scroll)lua_enumFromString_ContainerScroll(luaL_checkstring(state, 2));
  4590. Form* instance = getInstance(state);
  4591. instance->setScroll(param1);
  4592. return 0;
  4593. }
  4594. lua_pushstring(state, "lua_Form_setScroll - Failed to match the given parameters to a valid function signature.");
  4595. lua_error(state);
  4596. break;
  4597. }
  4598. default:
  4599. {
  4600. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4601. lua_error(state);
  4602. break;
  4603. }
  4604. }
  4605. return 0;
  4606. }
  4607. int lua_Form_setScrollBarsAutoHide(lua_State* state)
  4608. {
  4609. // Get the number of parameters.
  4610. int paramCount = lua_gettop(state);
  4611. // Attempt to match the parameters to a valid binding.
  4612. switch (paramCount)
  4613. {
  4614. case 2:
  4615. {
  4616. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4617. lua_type(state, 2) == LUA_TBOOLEAN)
  4618. {
  4619. // Get parameter 1 off the stack.
  4620. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  4621. Form* instance = getInstance(state);
  4622. instance->setScrollBarsAutoHide(param1);
  4623. return 0;
  4624. }
  4625. lua_pushstring(state, "lua_Form_setScrollBarsAutoHide - Failed to match the given parameters to a valid function signature.");
  4626. lua_error(state);
  4627. break;
  4628. }
  4629. default:
  4630. {
  4631. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4632. lua_error(state);
  4633. break;
  4634. }
  4635. }
  4636. return 0;
  4637. }
  4638. int lua_Form_setScrollPosition(lua_State* state)
  4639. {
  4640. // Get the number of parameters.
  4641. int paramCount = lua_gettop(state);
  4642. // Attempt to match the parameters to a valid binding.
  4643. switch (paramCount)
  4644. {
  4645. case 2:
  4646. {
  4647. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4648. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4649. {
  4650. // Get parameter 1 off the stack.
  4651. bool param1Valid;
  4652. gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
  4653. if (!param1Valid)
  4654. {
  4655. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
  4656. lua_error(state);
  4657. }
  4658. Form* instance = getInstance(state);
  4659. instance->setScrollPosition(*param1);
  4660. return 0;
  4661. }
  4662. lua_pushstring(state, "lua_Form_setScrollPosition - Failed to match the given parameters to a valid function signature.");
  4663. lua_error(state);
  4664. break;
  4665. }
  4666. default:
  4667. {
  4668. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4669. lua_error(state);
  4670. break;
  4671. }
  4672. }
  4673. return 0;
  4674. }
  4675. int lua_Form_setScrollWheelRequiresFocus(lua_State* state)
  4676. {
  4677. // Get the number of parameters.
  4678. int paramCount = lua_gettop(state);
  4679. // Attempt to match the parameters to a valid binding.
  4680. switch (paramCount)
  4681. {
  4682. case 2:
  4683. {
  4684. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4685. lua_type(state, 2) == LUA_TBOOLEAN)
  4686. {
  4687. // Get parameter 1 off the stack.
  4688. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  4689. Form* instance = getInstance(state);
  4690. instance->setScrollWheelRequiresFocus(param1);
  4691. return 0;
  4692. }
  4693. lua_pushstring(state, "lua_Form_setScrollWheelRequiresFocus - Failed to match the given parameters to a valid function signature.");
  4694. lua_error(state);
  4695. break;
  4696. }
  4697. default:
  4698. {
  4699. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4700. lua_error(state);
  4701. break;
  4702. }
  4703. }
  4704. return 0;
  4705. }
  4706. int lua_Form_setScrollWheelSpeed(lua_State* state)
  4707. {
  4708. // Get the number of parameters.
  4709. int paramCount = lua_gettop(state);
  4710. // Attempt to match the parameters to a valid binding.
  4711. switch (paramCount)
  4712. {
  4713. case 2:
  4714. {
  4715. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4716. lua_type(state, 2) == LUA_TNUMBER)
  4717. {
  4718. // Get parameter 1 off the stack.
  4719. float param1 = (float)luaL_checknumber(state, 2);
  4720. Form* instance = getInstance(state);
  4721. instance->setScrollWheelSpeed(param1);
  4722. return 0;
  4723. }
  4724. lua_pushstring(state, "lua_Form_setScrollWheelSpeed - Failed to match the given parameters to a valid function signature.");
  4725. lua_error(state);
  4726. break;
  4727. }
  4728. default:
  4729. {
  4730. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4731. lua_error(state);
  4732. break;
  4733. }
  4734. }
  4735. return 0;
  4736. }
  4737. int lua_Form_setScrollingFriction(lua_State* state)
  4738. {
  4739. // Get the number of parameters.
  4740. int paramCount = lua_gettop(state);
  4741. // Attempt to match the parameters to a valid binding.
  4742. switch (paramCount)
  4743. {
  4744. case 2:
  4745. {
  4746. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4747. lua_type(state, 2) == LUA_TNUMBER)
  4748. {
  4749. // Get parameter 1 off the stack.
  4750. float param1 = (float)luaL_checknumber(state, 2);
  4751. Form* instance = getInstance(state);
  4752. instance->setScrollingFriction(param1);
  4753. return 0;
  4754. }
  4755. lua_pushstring(state, "lua_Form_setScrollingFriction - Failed to match the given parameters to a valid function signature.");
  4756. lua_error(state);
  4757. break;
  4758. }
  4759. default:
  4760. {
  4761. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4762. lua_error(state);
  4763. break;
  4764. }
  4765. }
  4766. return 0;
  4767. }
  4768. int lua_Form_setSize(lua_State* state)
  4769. {
  4770. // Get the number of parameters.
  4771. int paramCount = lua_gettop(state);
  4772. // Attempt to match the parameters to a valid binding.
  4773. switch (paramCount)
  4774. {
  4775. case 3:
  4776. {
  4777. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4778. lua_type(state, 2) == LUA_TNUMBER &&
  4779. lua_type(state, 3) == LUA_TNUMBER)
  4780. {
  4781. // Get parameter 1 off the stack.
  4782. float param1 = (float)luaL_checknumber(state, 2);
  4783. // Get parameter 2 off the stack.
  4784. float param2 = (float)luaL_checknumber(state, 3);
  4785. Form* instance = getInstance(state);
  4786. instance->setSize(param1, param2);
  4787. return 0;
  4788. }
  4789. lua_pushstring(state, "lua_Form_setSize - Failed to match the given parameters to a valid function signature.");
  4790. lua_error(state);
  4791. break;
  4792. }
  4793. default:
  4794. {
  4795. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  4796. lua_error(state);
  4797. break;
  4798. }
  4799. }
  4800. return 0;
  4801. }
  4802. int lua_Form_setSkinColor(lua_State* state)
  4803. {
  4804. // Get the number of parameters.
  4805. int paramCount = lua_gettop(state);
  4806. // Attempt to match the parameters to a valid binding.
  4807. switch (paramCount)
  4808. {
  4809. case 2:
  4810. {
  4811. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4812. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4813. {
  4814. // Get parameter 1 off the stack.
  4815. bool param1Valid;
  4816. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  4817. if (!param1Valid)
  4818. {
  4819. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  4820. lua_error(state);
  4821. }
  4822. Form* instance = getInstance(state);
  4823. instance->setSkinColor(*param1);
  4824. return 0;
  4825. }
  4826. lua_pushstring(state, "lua_Form_setSkinColor - Failed to match the given parameters to a valid function signature.");
  4827. lua_error(state);
  4828. break;
  4829. }
  4830. case 3:
  4831. {
  4832. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4833. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4834. lua_type(state, 3) == LUA_TNUMBER)
  4835. {
  4836. // Get parameter 1 off the stack.
  4837. bool param1Valid;
  4838. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  4839. if (!param1Valid)
  4840. {
  4841. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  4842. lua_error(state);
  4843. }
  4844. // Get parameter 2 off the stack.
  4845. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4846. Form* instance = getInstance(state);
  4847. instance->setSkinColor(*param1, param2);
  4848. return 0;
  4849. }
  4850. lua_pushstring(state, "lua_Form_setSkinColor - Failed to match the given parameters to a valid function signature.");
  4851. lua_error(state);
  4852. break;
  4853. }
  4854. default:
  4855. {
  4856. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4857. lua_error(state);
  4858. break;
  4859. }
  4860. }
  4861. return 0;
  4862. }
  4863. int lua_Form_setSkinRegion(lua_State* state)
  4864. {
  4865. // Get the number of parameters.
  4866. int paramCount = lua_gettop(state);
  4867. // Attempt to match the parameters to a valid binding.
  4868. switch (paramCount)
  4869. {
  4870. case 2:
  4871. {
  4872. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4873. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4874. {
  4875. // Get parameter 1 off the stack.
  4876. bool param1Valid;
  4877. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  4878. if (!param1Valid)
  4879. {
  4880. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  4881. lua_error(state);
  4882. }
  4883. Form* instance = getInstance(state);
  4884. instance->setSkinRegion(*param1);
  4885. return 0;
  4886. }
  4887. lua_pushstring(state, "lua_Form_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  4888. lua_error(state);
  4889. break;
  4890. }
  4891. case 3:
  4892. {
  4893. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4894. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4895. lua_type(state, 3) == LUA_TNUMBER)
  4896. {
  4897. // Get parameter 1 off the stack.
  4898. bool param1Valid;
  4899. gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
  4900. if (!param1Valid)
  4901. {
  4902. lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
  4903. lua_error(state);
  4904. }
  4905. // Get parameter 2 off the stack.
  4906. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4907. Form* instance = getInstance(state);
  4908. instance->setSkinRegion(*param1, param2);
  4909. return 0;
  4910. }
  4911. lua_pushstring(state, "lua_Form_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  4912. lua_error(state);
  4913. break;
  4914. }
  4915. default:
  4916. {
  4917. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  4918. lua_error(state);
  4919. break;
  4920. }
  4921. }
  4922. return 0;
  4923. }
  4924. int lua_Form_setStyle(lua_State* state)
  4925. {
  4926. // Get the number of parameters.
  4927. int paramCount = lua_gettop(state);
  4928. // Attempt to match the parameters to a valid binding.
  4929. switch (paramCount)
  4930. {
  4931. case 2:
  4932. {
  4933. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4934. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4935. {
  4936. // Get parameter 1 off the stack.
  4937. bool param1Valid;
  4938. gameplay::ScriptUtil::LuaArray<Theme::Style> param1 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param1Valid);
  4939. if (!param1Valid)
  4940. {
  4941. lua_pushstring(state, "Failed to convert parameter 1 to type 'Theme::Style'.");
  4942. lua_error(state);
  4943. }
  4944. Form* instance = getInstance(state);
  4945. instance->setStyle(param1);
  4946. return 0;
  4947. }
  4948. lua_pushstring(state, "lua_Form_setStyle - Failed to match the given parameters to a valid function signature.");
  4949. lua_error(state);
  4950. break;
  4951. }
  4952. default:
  4953. {
  4954. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4955. lua_error(state);
  4956. break;
  4957. }
  4958. }
  4959. return 0;
  4960. }
  4961. int lua_Form_setTextAlignment(lua_State* state)
  4962. {
  4963. // Get the number of parameters.
  4964. int paramCount = lua_gettop(state);
  4965. // Attempt to match the parameters to a valid binding.
  4966. switch (paramCount)
  4967. {
  4968. case 2:
  4969. {
  4970. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4971. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4972. {
  4973. // Get parameter 1 off the stack.
  4974. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  4975. Form* instance = getInstance(state);
  4976. instance->setTextAlignment(param1);
  4977. return 0;
  4978. }
  4979. lua_pushstring(state, "lua_Form_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  4980. lua_error(state);
  4981. break;
  4982. }
  4983. case 3:
  4984. {
  4985. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4986. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4987. lua_type(state, 3) == LUA_TNUMBER)
  4988. {
  4989. // Get parameter 1 off the stack.
  4990. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  4991. // Get parameter 2 off the stack.
  4992. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  4993. Form* instance = getInstance(state);
  4994. instance->setTextAlignment(param1, param2);
  4995. return 0;
  4996. }
  4997. lua_pushstring(state, "lua_Form_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  4998. lua_error(state);
  4999. break;
  5000. }
  5001. default:
  5002. {
  5003. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5004. lua_error(state);
  5005. break;
  5006. }
  5007. }
  5008. return 0;
  5009. }
  5010. int lua_Form_setTextColor(lua_State* state)
  5011. {
  5012. // Get the number of parameters.
  5013. int paramCount = lua_gettop(state);
  5014. // Attempt to match the parameters to a valid binding.
  5015. switch (paramCount)
  5016. {
  5017. case 2:
  5018. {
  5019. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5020. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  5021. {
  5022. // Get parameter 1 off the stack.
  5023. bool param1Valid;
  5024. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  5025. if (!param1Valid)
  5026. {
  5027. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  5028. lua_error(state);
  5029. }
  5030. Form* instance = getInstance(state);
  5031. instance->setTextColor(*param1);
  5032. return 0;
  5033. }
  5034. lua_pushstring(state, "lua_Form_setTextColor - Failed to match the given parameters to a valid function signature.");
  5035. lua_error(state);
  5036. break;
  5037. }
  5038. case 3:
  5039. {
  5040. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5041. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  5042. lua_type(state, 3) == LUA_TNUMBER)
  5043. {
  5044. // Get parameter 1 off the stack.
  5045. bool param1Valid;
  5046. gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
  5047. if (!param1Valid)
  5048. {
  5049. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
  5050. lua_error(state);
  5051. }
  5052. // Get parameter 2 off the stack.
  5053. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  5054. Form* instance = getInstance(state);
  5055. instance->setTextColor(*param1, param2);
  5056. return 0;
  5057. }
  5058. lua_pushstring(state, "lua_Form_setTextColor - Failed to match the given parameters to a valid function signature.");
  5059. lua_error(state);
  5060. break;
  5061. }
  5062. default:
  5063. {
  5064. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5065. lua_error(state);
  5066. break;
  5067. }
  5068. }
  5069. return 0;
  5070. }
  5071. int lua_Form_setTextRightToLeft(lua_State* state)
  5072. {
  5073. // Get the number of parameters.
  5074. int paramCount = lua_gettop(state);
  5075. // Attempt to match the parameters to a valid binding.
  5076. switch (paramCount)
  5077. {
  5078. case 2:
  5079. {
  5080. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5081. lua_type(state, 2) == LUA_TBOOLEAN)
  5082. {
  5083. // Get parameter 1 off the stack.
  5084. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  5085. Form* instance = getInstance(state);
  5086. instance->setTextRightToLeft(param1);
  5087. return 0;
  5088. }
  5089. lua_pushstring(state, "lua_Form_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  5090. lua_error(state);
  5091. break;
  5092. }
  5093. case 3:
  5094. {
  5095. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5096. lua_type(state, 2) == LUA_TBOOLEAN &&
  5097. lua_type(state, 3) == LUA_TNUMBER)
  5098. {
  5099. // Get parameter 1 off the stack.
  5100. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  5101. // Get parameter 2 off the stack.
  5102. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  5103. Form* instance = getInstance(state);
  5104. instance->setTextRightToLeft(param1, param2);
  5105. return 0;
  5106. }
  5107. lua_pushstring(state, "lua_Form_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  5108. lua_error(state);
  5109. break;
  5110. }
  5111. default:
  5112. {
  5113. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5114. lua_error(state);
  5115. break;
  5116. }
  5117. }
  5118. return 0;
  5119. }
  5120. int lua_Form_setVisible(lua_State* state)
  5121. {
  5122. // Get the number of parameters.
  5123. int paramCount = lua_gettop(state);
  5124. // Attempt to match the parameters to a valid binding.
  5125. switch (paramCount)
  5126. {
  5127. case 2:
  5128. {
  5129. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5130. lua_type(state, 2) == LUA_TBOOLEAN)
  5131. {
  5132. // Get parameter 1 off the stack.
  5133. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  5134. Form* instance = getInstance(state);
  5135. instance->setVisible(param1);
  5136. return 0;
  5137. }
  5138. lua_pushstring(state, "lua_Form_setVisible - Failed to match the given parameters to a valid function signature.");
  5139. lua_error(state);
  5140. break;
  5141. }
  5142. default:
  5143. {
  5144. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5145. lua_error(state);
  5146. break;
  5147. }
  5148. }
  5149. return 0;
  5150. }
  5151. int lua_Form_setWidth(lua_State* state)
  5152. {
  5153. // Get the number of parameters.
  5154. int paramCount = lua_gettop(state);
  5155. // Attempt to match the parameters to a valid binding.
  5156. switch (paramCount)
  5157. {
  5158. case 2:
  5159. {
  5160. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5161. lua_type(state, 2) == LUA_TNUMBER)
  5162. {
  5163. // Get parameter 1 off the stack.
  5164. float param1 = (float)luaL_checknumber(state, 2);
  5165. Form* instance = getInstance(state);
  5166. instance->setWidth(param1);
  5167. return 0;
  5168. }
  5169. lua_pushstring(state, "lua_Form_setWidth - Failed to match the given parameters to a valid function signature.");
  5170. lua_error(state);
  5171. break;
  5172. }
  5173. case 3:
  5174. {
  5175. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5176. lua_type(state, 2) == LUA_TNUMBER &&
  5177. lua_type(state, 3) == LUA_TBOOLEAN)
  5178. {
  5179. // Get parameter 1 off the stack.
  5180. float param1 = (float)luaL_checknumber(state, 2);
  5181. // Get parameter 2 off the stack.
  5182. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  5183. Form* instance = getInstance(state);
  5184. instance->setWidth(param1, param2);
  5185. return 0;
  5186. }
  5187. lua_pushstring(state, "lua_Form_setWidth - Failed to match the given parameters to a valid function signature.");
  5188. lua_error(state);
  5189. break;
  5190. }
  5191. default:
  5192. {
  5193. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5194. lua_error(state);
  5195. break;
  5196. }
  5197. }
  5198. return 0;
  5199. }
  5200. int lua_Form_setX(lua_State* state)
  5201. {
  5202. // Get the number of parameters.
  5203. int paramCount = lua_gettop(state);
  5204. // Attempt to match the parameters to a valid binding.
  5205. switch (paramCount)
  5206. {
  5207. case 2:
  5208. {
  5209. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5210. lua_type(state, 2) == LUA_TNUMBER)
  5211. {
  5212. // Get parameter 1 off the stack.
  5213. float param1 = (float)luaL_checknumber(state, 2);
  5214. Form* instance = getInstance(state);
  5215. instance->setX(param1);
  5216. return 0;
  5217. }
  5218. lua_pushstring(state, "lua_Form_setX - Failed to match the given parameters to a valid function signature.");
  5219. lua_error(state);
  5220. break;
  5221. }
  5222. case 3:
  5223. {
  5224. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5225. lua_type(state, 2) == LUA_TNUMBER &&
  5226. lua_type(state, 3) == LUA_TBOOLEAN)
  5227. {
  5228. // Get parameter 1 off the stack.
  5229. float param1 = (float)luaL_checknumber(state, 2);
  5230. // Get parameter 2 off the stack.
  5231. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  5232. Form* instance = getInstance(state);
  5233. instance->setX(param1, param2);
  5234. return 0;
  5235. }
  5236. lua_pushstring(state, "lua_Form_setX - Failed to match the given parameters to a valid function signature.");
  5237. lua_error(state);
  5238. break;
  5239. }
  5240. default:
  5241. {
  5242. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5243. lua_error(state);
  5244. break;
  5245. }
  5246. }
  5247. return 0;
  5248. }
  5249. int lua_Form_setY(lua_State* state)
  5250. {
  5251. // Get the number of parameters.
  5252. int paramCount = lua_gettop(state);
  5253. // Attempt to match the parameters to a valid binding.
  5254. switch (paramCount)
  5255. {
  5256. case 2:
  5257. {
  5258. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5259. lua_type(state, 2) == LUA_TNUMBER)
  5260. {
  5261. // Get parameter 1 off the stack.
  5262. float param1 = (float)luaL_checknumber(state, 2);
  5263. Form* instance = getInstance(state);
  5264. instance->setY(param1);
  5265. return 0;
  5266. }
  5267. lua_pushstring(state, "lua_Form_setY - Failed to match the given parameters to a valid function signature.");
  5268. lua_error(state);
  5269. break;
  5270. }
  5271. case 3:
  5272. {
  5273. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5274. lua_type(state, 2) == LUA_TNUMBER &&
  5275. lua_type(state, 3) == LUA_TBOOLEAN)
  5276. {
  5277. // Get parameter 1 off the stack.
  5278. float param1 = (float)luaL_checknumber(state, 2);
  5279. // Get parameter 2 off the stack.
  5280. bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
  5281. Form* instance = getInstance(state);
  5282. instance->setY(param1, param2);
  5283. return 0;
  5284. }
  5285. lua_pushstring(state, "lua_Form_setY - Failed to match the given parameters to a valid function signature.");
  5286. lua_error(state);
  5287. break;
  5288. }
  5289. default:
  5290. {
  5291. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5292. lua_error(state);
  5293. break;
  5294. }
  5295. }
  5296. return 0;
  5297. }
  5298. int lua_Form_setZIndex(lua_State* state)
  5299. {
  5300. // Get the number of parameters.
  5301. int paramCount = lua_gettop(state);
  5302. // Attempt to match the parameters to a valid binding.
  5303. switch (paramCount)
  5304. {
  5305. case 2:
  5306. {
  5307. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5308. lua_type(state, 2) == LUA_TNUMBER)
  5309. {
  5310. // Get parameter 1 off the stack.
  5311. int param1 = (int)luaL_checkint(state, 2);
  5312. Form* instance = getInstance(state);
  5313. instance->setZIndex(param1);
  5314. return 0;
  5315. }
  5316. lua_pushstring(state, "lua_Form_setZIndex - Failed to match the given parameters to a valid function signature.");
  5317. lua_error(state);
  5318. break;
  5319. }
  5320. default:
  5321. {
  5322. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5323. lua_error(state);
  5324. break;
  5325. }
  5326. }
  5327. return 0;
  5328. }
  5329. int lua_Form_static_ANIMATE_OPACITY(lua_State* state)
  5330. {
  5331. // Validate the number of parameters.
  5332. if (lua_gettop(state) > 0)
  5333. {
  5334. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5335. lua_error(state);
  5336. }
  5337. int result = Form::ANIMATE_OPACITY;
  5338. // Push the return value onto the stack.
  5339. lua_pushinteger(state, result);
  5340. return 1;
  5341. }
  5342. int lua_Form_static_ANIMATE_POSITION(lua_State* state)
  5343. {
  5344. // Validate the number of parameters.
  5345. if (lua_gettop(state) > 0)
  5346. {
  5347. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5348. lua_error(state);
  5349. }
  5350. int result = Form::ANIMATE_POSITION;
  5351. // Push the return value onto the stack.
  5352. lua_pushinteger(state, result);
  5353. return 1;
  5354. }
  5355. int lua_Form_static_ANIMATE_POSITION_X(lua_State* state)
  5356. {
  5357. // Validate the number of parameters.
  5358. if (lua_gettop(state) > 0)
  5359. {
  5360. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5361. lua_error(state);
  5362. }
  5363. int result = Form::ANIMATE_POSITION_X;
  5364. // Push the return value onto the stack.
  5365. lua_pushinteger(state, result);
  5366. return 1;
  5367. }
  5368. int lua_Form_static_ANIMATE_POSITION_Y(lua_State* state)
  5369. {
  5370. // Validate the number of parameters.
  5371. if (lua_gettop(state) > 0)
  5372. {
  5373. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5374. lua_error(state);
  5375. }
  5376. int result = Form::ANIMATE_POSITION_Y;
  5377. // Push the return value onto the stack.
  5378. lua_pushinteger(state, result);
  5379. return 1;
  5380. }
  5381. int lua_Form_static_ANIMATE_SCROLLBAR_OPACITY(lua_State* state)
  5382. {
  5383. // Validate the number of parameters.
  5384. if (lua_gettop(state) > 0)
  5385. {
  5386. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5387. lua_error(state);
  5388. }
  5389. int result = Form::ANIMATE_SCROLLBAR_OPACITY;
  5390. // Push the return value onto the stack.
  5391. lua_pushinteger(state, result);
  5392. return 1;
  5393. }
  5394. int lua_Form_static_ANIMATE_SIZE(lua_State* state)
  5395. {
  5396. // Validate the number of parameters.
  5397. if (lua_gettop(state) > 0)
  5398. {
  5399. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5400. lua_error(state);
  5401. }
  5402. int result = Form::ANIMATE_SIZE;
  5403. // Push the return value onto the stack.
  5404. lua_pushinteger(state, result);
  5405. return 1;
  5406. }
  5407. int lua_Form_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
  5408. {
  5409. // Validate the number of parameters.
  5410. if (lua_gettop(state) > 0)
  5411. {
  5412. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5413. lua_error(state);
  5414. }
  5415. int result = Form::ANIMATE_SIZE_HEIGHT;
  5416. // Push the return value onto the stack.
  5417. lua_pushinteger(state, result);
  5418. return 1;
  5419. }
  5420. int lua_Form_static_ANIMATE_SIZE_WIDTH(lua_State* state)
  5421. {
  5422. // Validate the number of parameters.
  5423. if (lua_gettop(state) > 0)
  5424. {
  5425. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5426. lua_error(state);
  5427. }
  5428. int result = Form::ANIMATE_SIZE_WIDTH;
  5429. // Push the return value onto the stack.
  5430. lua_pushinteger(state, result);
  5431. return 1;
  5432. }
  5433. int lua_Form_static_clearFocus(lua_State* state)
  5434. {
  5435. // Get the number of parameters.
  5436. int paramCount = lua_gettop(state);
  5437. // Attempt to match the parameters to a valid binding.
  5438. switch (paramCount)
  5439. {
  5440. case 0:
  5441. {
  5442. Form::clearFocus();
  5443. return 0;
  5444. break;
  5445. }
  5446. default:
  5447. {
  5448. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5449. lua_error(state);
  5450. break;
  5451. }
  5452. }
  5453. return 0;
  5454. }
  5455. int lua_Form_static_create(lua_State* state)
  5456. {
  5457. // Get the number of parameters.
  5458. int paramCount = lua_gettop(state);
  5459. // Attempt to match the parameters to a valid binding.
  5460. switch (paramCount)
  5461. {
  5462. case 1:
  5463. {
  5464. do
  5465. {
  5466. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  5467. {
  5468. // Get parameter 1 off the stack.
  5469. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5470. void* returnPtr = (void*)Form::create(param1);
  5471. if (returnPtr)
  5472. {
  5473. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5474. object->instance = returnPtr;
  5475. object->owns = true;
  5476. luaL_getmetatable(state, "Form");
  5477. lua_setmetatable(state, -2);
  5478. }
  5479. else
  5480. {
  5481. lua_pushnil(state);
  5482. }
  5483. return 1;
  5484. }
  5485. } while (0);
  5486. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  5487. lua_error(state);
  5488. break;
  5489. }
  5490. case 2:
  5491. {
  5492. do
  5493. {
  5494. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  5495. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  5496. {
  5497. // Get parameter 1 off the stack.
  5498. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5499. // Get parameter 2 off the stack.
  5500. bool param2Valid;
  5501. gameplay::ScriptUtil::LuaArray<Theme::Style> param2 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param2Valid);
  5502. if (!param2Valid)
  5503. break;
  5504. void* returnPtr = (void*)Form::create(param1, param2);
  5505. if (returnPtr)
  5506. {
  5507. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5508. object->instance = returnPtr;
  5509. object->owns = true;
  5510. luaL_getmetatable(state, "Form");
  5511. lua_setmetatable(state, -2);
  5512. }
  5513. else
  5514. {
  5515. lua_pushnil(state);
  5516. }
  5517. return 1;
  5518. }
  5519. } while (0);
  5520. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  5521. lua_error(state);
  5522. break;
  5523. }
  5524. case 3:
  5525. {
  5526. do
  5527. {
  5528. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  5529. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  5530. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  5531. {
  5532. // Get parameter 1 off the stack.
  5533. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5534. // Get parameter 2 off the stack.
  5535. bool param2Valid;
  5536. gameplay::ScriptUtil::LuaArray<Theme::Style> param2 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param2Valid);
  5537. if (!param2Valid)
  5538. break;
  5539. // Get parameter 3 off the stack.
  5540. Layout::Type param3 = (Layout::Type)lua_enumFromString_LayoutType(luaL_checkstring(state, 3));
  5541. void* returnPtr = (void*)Form::create(param1, param2, param3);
  5542. if (returnPtr)
  5543. {
  5544. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5545. object->instance = returnPtr;
  5546. object->owns = true;
  5547. luaL_getmetatable(state, "Form");
  5548. lua_setmetatable(state, -2);
  5549. }
  5550. else
  5551. {
  5552. lua_pushnil(state);
  5553. }
  5554. return 1;
  5555. }
  5556. } while (0);
  5557. lua_pushstring(state, "lua_Form_static_create - Failed to match the given parameters to a valid function signature.");
  5558. lua_error(state);
  5559. break;
  5560. }
  5561. default:
  5562. {
  5563. lua_pushstring(state, "Invalid number of parameters (expected 1, 2 or 3).");
  5564. lua_error(state);
  5565. break;
  5566. }
  5567. }
  5568. return 0;
  5569. }
  5570. int lua_Form_static_getActiveControl(lua_State* state)
  5571. {
  5572. // Get the number of parameters.
  5573. int paramCount = lua_gettop(state);
  5574. // Attempt to match the parameters to a valid binding.
  5575. switch (paramCount)
  5576. {
  5577. case 0:
  5578. {
  5579. void* returnPtr = (void*)Form::getActiveControl();
  5580. if (returnPtr)
  5581. {
  5582. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5583. object->instance = returnPtr;
  5584. object->owns = false;
  5585. luaL_getmetatable(state, "Control");
  5586. lua_setmetatable(state, -2);
  5587. }
  5588. else
  5589. {
  5590. lua_pushnil(state);
  5591. }
  5592. return 1;
  5593. break;
  5594. }
  5595. default:
  5596. {
  5597. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5598. lua_error(state);
  5599. break;
  5600. }
  5601. }
  5602. return 0;
  5603. }
  5604. int lua_Form_static_getFocusControl(lua_State* state)
  5605. {
  5606. // Get the number of parameters.
  5607. int paramCount = lua_gettop(state);
  5608. // Attempt to match the parameters to a valid binding.
  5609. switch (paramCount)
  5610. {
  5611. case 0:
  5612. {
  5613. void* returnPtr = (void*)Form::getFocusControl();
  5614. if (returnPtr)
  5615. {
  5616. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5617. object->instance = returnPtr;
  5618. object->owns = false;
  5619. luaL_getmetatable(state, "Control");
  5620. lua_setmetatable(state, -2);
  5621. }
  5622. else
  5623. {
  5624. lua_pushnil(state);
  5625. }
  5626. return 1;
  5627. break;
  5628. }
  5629. default:
  5630. {
  5631. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5632. lua_error(state);
  5633. break;
  5634. }
  5635. }
  5636. return 0;
  5637. }
  5638. int lua_Form_static_getForm(lua_State* state)
  5639. {
  5640. // Get the number of parameters.
  5641. int paramCount = lua_gettop(state);
  5642. // Attempt to match the parameters to a valid binding.
  5643. switch (paramCount)
  5644. {
  5645. case 1:
  5646. {
  5647. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  5648. {
  5649. // Get parameter 1 off the stack.
  5650. const char* param1 = gameplay::ScriptUtil::getString(1, false);
  5651. void* returnPtr = (void*)Form::getForm(param1);
  5652. if (returnPtr)
  5653. {
  5654. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  5655. object->instance = returnPtr;
  5656. object->owns = false;
  5657. luaL_getmetatable(state, "Form");
  5658. lua_setmetatable(state, -2);
  5659. }
  5660. else
  5661. {
  5662. lua_pushnil(state);
  5663. }
  5664. return 1;
  5665. }
  5666. lua_pushstring(state, "lua_Form_static_getForm - Failed to match the given parameters to a valid function signature.");
  5667. lua_error(state);
  5668. break;
  5669. }
  5670. default:
  5671. {
  5672. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  5673. lua_error(state);
  5674. break;
  5675. }
  5676. }
  5677. return 0;
  5678. }
  5679. int lua_Form_stopScrolling(lua_State* state)
  5680. {
  5681. // Get the number of parameters.
  5682. int paramCount = lua_gettop(state);
  5683. // Attempt to match the parameters to a valid binding.
  5684. switch (paramCount)
  5685. {
  5686. case 1:
  5687. {
  5688. if ((lua_type(state, 1) == LUA_TUSERDATA))
  5689. {
  5690. Form* instance = getInstance(state);
  5691. instance->stopScrolling();
  5692. return 0;
  5693. }
  5694. lua_pushstring(state, "lua_Form_stopScrolling - Failed to match the given parameters to a valid function signature.");
  5695. lua_error(state);
  5696. break;
  5697. }
  5698. default:
  5699. {
  5700. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  5701. lua_error(state);
  5702. break;
  5703. }
  5704. }
  5705. return 0;
  5706. }
  5707. int lua_Form_update(lua_State* state)
  5708. {
  5709. // Get the number of parameters.
  5710. int paramCount = lua_gettop(state);
  5711. // Attempt to match the parameters to a valid binding.
  5712. switch (paramCount)
  5713. {
  5714. case 2:
  5715. {
  5716. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5717. lua_type(state, 2) == LUA_TNUMBER)
  5718. {
  5719. // Get parameter 1 off the stack.
  5720. float param1 = (float)luaL_checknumber(state, 2);
  5721. Form* instance = getInstance(state);
  5722. instance->update(param1);
  5723. return 0;
  5724. }
  5725. lua_pushstring(state, "lua_Form_update - Failed to match the given parameters to a valid function signature.");
  5726. lua_error(state);
  5727. break;
  5728. }
  5729. default:
  5730. {
  5731. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5732. lua_error(state);
  5733. break;
  5734. }
  5735. }
  5736. return 0;
  5737. }
  5738. }