lua_Form.cpp 212 KB

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