AngelScriptAPI.h 191 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726
  1. // Script API header intended to be 'force included' in IDE for AngelScript content assist / code completion
  2. #define int8 signed char
  3. #define int16 signed short
  4. #define int64 long
  5. #define uint8 unsigned char
  6. #define uint16 unsigned short
  7. #define uint64 unsigned long
  8. #define null 0
  9. // Enumerations
  10. enum Intersection
  11. {
  12. OUTSIDE,
  13. INTERSECTS,
  14. INSIDE,
  15. };
  16. enum VariantType
  17. {
  18. VAR_NONE,
  19. VAR_INT,
  20. VAR_BOOL,
  21. VAR_FLOAT,
  22. VAR_VECTOR2,
  23. VAR_VECTOR3,
  24. VAR_VECTOR4,
  25. VAR_QUATERNION,
  26. VAR_COLOR,
  27. VAR_STRING,
  28. VAR_BUFFER,
  29. VAR_PTR,
  30. VAR_RESOURCEREF,
  31. VAR_RESOURCEREFLIST,
  32. VAR_VARIANTVECTOR,
  33. VAR_VARIANTMAP,
  34. VAR_INTRECT,
  35. VAR_INTVECTOR2,
  36. };
  37. enum FileMode
  38. {
  39. FILE_READ,
  40. FILE_WRITE,
  41. FILE_READWRITE,
  42. };
  43. enum CreateMode
  44. {
  45. REPLICATED,
  46. LOCAL,
  47. };
  48. enum FillMode
  49. {
  50. FILL_SOLID,
  51. FILL_WIREFRAME,
  52. FILL_POINT,
  53. };
  54. enum RenderCommandType
  55. {
  56. CMD_NONE,
  57. CMD_CLEAR,
  58. CMD_SCENEPASS,
  59. CMD_QUAD,
  60. CMD_FORWARDLIGHTS,
  61. CMD_LIGHTVOLUMES,
  62. };
  63. enum RenderCommandSortMode
  64. {
  65. SORT_FRONTTOBACK,
  66. SORT_BACKTOFRONT,
  67. };
  68. enum RenderTargetSizeMode
  69. {
  70. SIZE_ABSOLUTE,
  71. SIZE_RENDERTARGETDIVISOR,
  72. SIZE_VIEWPORTDIVISOR,
  73. };
  74. enum TextureUnit
  75. {
  76. TU_DIFFUSE,
  77. TU_NORMAL,
  78. TU_SPECULAR,
  79. TU_EMISSIVE,
  80. TU_ENVIRONMENT,
  81. TU_LIGHTRAMP,
  82. TU_LIGHTSHAPE,
  83. TU_SHADOWMAP,
  84. TU_FACESELECT,
  85. TU_INDIRECTION,
  86. TU_ALBEDOBUFFER,
  87. TU_NORMALBUFFER,
  88. TU_DEPTHBUFFER,
  89. TU_LIGHTBUFFER,
  90. MAX_MATERIAL_TEXTURE_UNITS,
  91. MAX_TEXTURE_UNITS,
  92. };
  93. enum TextureUsage
  94. {
  95. TEXTURE_STATIC,
  96. TEXTURE_DYNAMIC,
  97. TEXTURE_RENDERTARGET,
  98. TEXTURE_DEPTHSTENCIL,
  99. };
  100. enum TextureFilterMode
  101. {
  102. FILTER_NEAREST,
  103. FILTER_BILINEAR,
  104. FILTER_TRILINEAR,
  105. FILTER_ANISOTROPIC,
  106. FILTER_DEFAULT,
  107. };
  108. enum TextureAddressMode
  109. {
  110. ADDRESS_WRAP,
  111. ADDRESS_MIRROR,
  112. ADDRESS_CLAMP,
  113. ADDRESS_BORDER,
  114. };
  115. enum TextureCoordinate
  116. {
  117. COORD_U,
  118. COORD_V,
  119. COORD_W,
  120. };
  121. enum CubeMapFace
  122. {
  123. FACE_POSITIVE_X,
  124. FACE_NEGATIVE_X,
  125. FACE_POSITIVE_Y,
  126. FACE_NEGATIVE_Y,
  127. FACE_POSITIVE_Z,
  128. FACE_NEGATIVE_Z,
  129. };
  130. enum RenderSurfaceUpdateMode
  131. {
  132. SURFACE_MANUALUPDATE,
  133. SURFACE_UPDATEVISIBLE,
  134. SURFACE_UPDATEALWAYS,
  135. };
  136. enum BlendMode
  137. {
  138. BLEND_REPLACE,
  139. BLEND_ADD,
  140. BLEND_MULTIPLY,
  141. BLEND_ALPHA,
  142. BLEND_ADDALPHA,
  143. BLEND_PREMULALPHA,
  144. BLEND_INVDESTALPHA,
  145. };
  146. enum CompareMode
  147. {
  148. CMP_ALWAYS,
  149. CMP_EQUAL,
  150. CMP_NOTEQUAL,
  151. CMP_LESS,
  152. CMP_LESSEQUAL,
  153. CMP_GREATER,
  154. CMP_GREATEREQUAL,
  155. };
  156. enum CullMode
  157. {
  158. CULL_NONE,
  159. CULL_CCW,
  160. CULL_CW,
  161. };
  162. enum PassLightingMode
  163. {
  164. LIGHTING_UNLIT,
  165. LIGHTING_PERVERTEX,
  166. LIGHTING_PERPIXEL,
  167. };
  168. enum LightType
  169. {
  170. LIGHT_DIRECTIONAL,
  171. LIGHT_SPOT,
  172. LIGHT_POINT,
  173. };
  174. enum EmitterType
  175. {
  176. EMITTER_SPHERE,
  177. EMITTER_BOX,
  178. };
  179. enum PrimitiveType
  180. {
  181. TRIANGLE_LIST,
  182. LINE_LIST,
  183. };
  184. enum RayQueryLevel
  185. {
  186. RAY_AABB_NOSUBOBJECTS,
  187. RAY_AABB,
  188. RAY_OBB,
  189. RAY_TRIANGLE,
  190. };
  191. enum SoundType
  192. {
  193. SOUND_EFFECT,
  194. SOUND_AMBIENT,
  195. SOUND_VOICE,
  196. SOUND_MUSIC,
  197. SOUND_MASTER,
  198. };
  199. enum HorizontalAlignment
  200. {
  201. HA_LEFT,
  202. HA_CENTER,
  203. HA_RIGHT,
  204. };
  205. enum VerticalAlignment
  206. {
  207. VA_TOP,
  208. VA_CENTER,
  209. VA_BOTTOM,
  210. };
  211. enum Corner
  212. {
  213. C_TOPLEFT,
  214. C_TOPRIGHT,
  215. C_BOTTOMLEFT,
  216. C_BOTTOMRIGHT,
  217. };
  218. enum Orientation
  219. {
  220. O_HORIZONTAL,
  221. O_VERTICAL,
  222. };
  223. enum FocusMode
  224. {
  225. FM_NOTFOCUSABLE,
  226. FM_RESETFOCUS,
  227. FM_FOCUSABLE,
  228. FM_FOCUSABLE_DEFOCUSABLE,
  229. };
  230. enum LayoutMode
  231. {
  232. LM_FREE,
  233. LM_HORIZONTAL,
  234. LM_VERTICAL,
  235. };
  236. enum TraversalMode
  237. {
  238. TM_BREADTH_FIRST,
  239. TM_DEPTH_FIRST,
  240. };
  241. enum CursorShape
  242. {
  243. CS_NORMAL,
  244. CS_RESIZEVERTICAL,
  245. CS_RESIZEDIAGONAL_TOPRIGHT,
  246. CS_RESIZEHORIZONTAL,
  247. CS_RESIZEDIAGONAL_TOPLEFT,
  248. CS_ACCEPTDROP,
  249. CS_REJECTDROP,
  250. CS_BUSY,
  251. };
  252. enum HighlightMode
  253. {
  254. HM_NEVER,
  255. HM_FOCUS,
  256. HM_ALWAYS,
  257. };
  258. enum TextEffect
  259. {
  260. TE_NONE,
  261. TE_SHADOW,
  262. TE_STROKE,
  263. };
  264. enum HttpRequestState
  265. {
  266. HTTP_INITIALIZING,
  267. HTTP_ERROR,
  268. HTTP_OPEN,
  269. HTTP_CLOSED,
  270. };
  271. enum ShapeType
  272. {
  273. SHAPE_BOX,
  274. SHAPE_SPHERE,
  275. SHAPE_STATICPLANE,
  276. SHAPE_CYLINDER,
  277. SHAPE_CAPSULE,
  278. SHAPE_CONE,
  279. SHAPE_TRIANGLEMESH,
  280. SHAPE_CONVEXHULL,
  281. SHAPE_TERRAIN,
  282. };
  283. enum CollisionEventMode
  284. {
  285. COLLISION_NEVER,
  286. COLLISION_ACTIVE,
  287. COLLISION_ALWAYS,
  288. };
  289. enum ConstraintType
  290. {
  291. CONSTRAINT_POINT,
  292. CONSTRAINT_HINGE,
  293. CONSTRAINT_SLIDER,
  294. CONSTRAINT_CONETWIST,
  295. };
  296. enum DumpMode
  297. {
  298. DOXYGEN,
  299. C_HEADER,
  300. };
  301. // Classes
  302. template <class T> class Array
  303. {
  304. // Methods:
  305. void Insert(uint, const T&);
  306. void Erase(uint);
  307. void Push(const T&);
  308. void Pop();
  309. void Resize(uint);
  310. void Clear();
  311. void Sort();
  312. void Sort(uint, uint);
  313. void SortReverse();
  314. void SortReverse(uint, uint);
  315. void Reverse();
  316. int Find(const T&) const;
  317. int Find(uint, const T&) const;
  318. // Properties:
  319. uint length;
  320. /* (readonly) */
  321. bool empty;
  322. };
  323. class String
  324. {
  325. // Methods:
  326. void Replace(uint8, uint8, bool = true);
  327. void Replace(const String&, const String&, bool = true);
  328. String Replaced(uint8, uint8, bool = true) const;
  329. String Replaced(const String&, const String&, bool = true) const;
  330. void Resize(uint);
  331. uint Find(const String&, uint = 0, bool = true) const;
  332. uint Find(uint8, uint = 0, bool = true) const;
  333. uint FindLast(const String&, uint = 0xffffffff, bool = true) const;
  334. uint FindLast(uint8, uint = 0xffffffff, bool = true) const;
  335. bool StartsWith(const String&, bool = true) const;
  336. bool EndsWith(const String&, bool = true) const;
  337. String Substring(uint) const;
  338. String Substring(uint, uint) const;
  339. String ToUpper() const;
  340. String ToLower() const;
  341. String Trimmed() const;
  342. void SetUTF8FromLatin1(const String&);
  343. uint ByteOffsetUTF8(uint) const;
  344. uint NextUTF8Char(uint&) const;
  345. uint AtUTF8(uint) const;
  346. void ReplaceUTF8(uint, uint);
  347. void AppendUTF8(uint);
  348. String SubstringUTF8(uint) const;
  349. String SubstringUTF8(uint, uint) const;
  350. int Compare(const String&, bool = true) const;
  351. bool Contains(const String&, bool = true) const;
  352. bool Contains(uint8, bool = true) const;
  353. void Clear();
  354. Array<String> Split(uint8) const;
  355. void Join(Array<String>&, const String&);
  356. bool ToBool() const;
  357. float ToFloat() const;
  358. int ToInt() const;
  359. uint ToUInt() const;
  360. Color ToColor() const;
  361. IntRect ToIntRect() const;
  362. IntVector2 ToIntVector2() const;
  363. Quaternion ToQuaternion() const;
  364. Vector2 ToVector2() const;
  365. Vector3 ToVector3() const;
  366. Vector4 ToVector4(bool = false) const;
  367. Variant ToVectorVariant() const;
  368. // Properties:
  369. /* (readonly) */
  370. uint utf8Length;
  371. /* (readonly) */
  372. uint length;
  373. /* (readonly) */
  374. bool empty;
  375. };
  376. class Dictionary
  377. {
  378. // Methods:
  379. void Set(const String&, void*);
  380. bool Get(const String&, void*) const;
  381. void Set(const String&, int64&);
  382. bool Get(const String&, int64&) const;
  383. void Set(const String&, double&);
  384. bool Get(const String&, double&) const;
  385. bool Exists(const String&) const;
  386. void Erase(const String&);
  387. void Clear();
  388. // Properties:
  389. /* (readonly) */
  390. bool empty;
  391. /* (readonly) */
  392. uint length;
  393. /* (readonly) */
  394. Array<String> keys;
  395. };
  396. class IntVector2
  397. {
  398. // Methods:
  399. String ToString() const;
  400. // Properties:
  401. /* (readonly) */
  402. Array<int> data;
  403. int x;
  404. int y;
  405. };
  406. class IntRect
  407. {
  408. // Properties:
  409. /* (readonly) */
  410. Array<int> data;
  411. /* (readonly) */
  412. IntVector2 size;
  413. /* (readonly) */
  414. int width;
  415. /* (readonly) */
  416. int height;
  417. int left;
  418. int top;
  419. int right;
  420. int bottom;
  421. };
  422. class Vector2
  423. {
  424. // Methods:
  425. void Normalize();
  426. float DotProduct(const Vector2&) const;
  427. float AbsDotProduct(const Vector2&) const;
  428. Vector2 Lerp(const Vector2&, float) const;
  429. bool Equals(const Vector2&) const;
  430. Vector2 Normalized() const;
  431. String ToString() const;
  432. // Properties:
  433. /* (readonly) */
  434. Array<float> data;
  435. /* (readonly) */
  436. float length;
  437. /* (readonly) */
  438. float lengthSquared;
  439. float x;
  440. float y;
  441. };
  442. class Vector3
  443. {
  444. // Methods:
  445. void Normalize();
  446. float DotProduct(const Vector3&) const;
  447. float AbsDotProduct(const Vector3&) const;
  448. Vector3 CrossProduct(const Vector3&) const;
  449. Vector3 Lerp(const Vector3&, float) const;
  450. bool Equals(const Vector3&) const;
  451. Vector3 Normalized() const;
  452. String ToString() const;
  453. // Properties:
  454. /* (readonly) */
  455. Array<float> data;
  456. /* (readonly) */
  457. float length;
  458. /* (readonly) */
  459. float lengthSquared;
  460. float x;
  461. float y;
  462. float z;
  463. };
  464. class Vector4
  465. {
  466. // Methods:
  467. float DotProduct(const Vector4&) const;
  468. float AbsDotProduct(const Vector4&) const;
  469. Vector4 Lerp(const Vector4&, float) const;
  470. bool Equals(const Vector4&) const;
  471. String ToString() const;
  472. // Properties:
  473. /* (readonly) */
  474. Array<float> data;
  475. float x;
  476. float y;
  477. float z;
  478. float w;
  479. };
  480. class Quaternion
  481. {
  482. // Methods:
  483. void FromAngleAxis(float, const Vector3&);
  484. void FromEulerAngles(float, float, float);
  485. void FromRotationTo(const Vector3&, const Vector3&);
  486. void FromAxes(const Vector3&, const Vector3&, const Vector3&);
  487. void Normalize();
  488. Quaternion Normalized() const;
  489. Quaternion Inverse() const;
  490. float DotProduct(const Quaternion&) const;
  491. Quaternion Slerp(Quaternion, float) const;
  492. bool Equals(const Quaternion&) const;
  493. String ToString() const;
  494. // Properties:
  495. /* (readonly) */
  496. Vector3 eulerAngles;
  497. /* (readonly) */
  498. float yaw;
  499. /* (readonly) */
  500. float pitch;
  501. /* (readonly) */
  502. float roll;
  503. float w;
  504. float x;
  505. float y;
  506. float z;
  507. };
  508. class Matrix3
  509. {
  510. // Methods:
  511. Vector3 Scale() const;
  512. Matrix3 Scaled(const Vector3&) const;
  513. void SetScale(const Vector3&);
  514. void SetScale(float);
  515. Matrix3 Transpose() const;
  516. Matrix3 Inverse() const;
  517. bool Equals(const Matrix3&) const;
  518. // Properties:
  519. float m00;
  520. float m01;
  521. float m02;
  522. float m10;
  523. float m11;
  524. float m12;
  525. float m20;
  526. float m21;
  527. float m22;
  528. };
  529. class Matrix4
  530. {
  531. // Methods:
  532. Quaternion Rotation() const;
  533. Matrix3 RotationMatrix() const;
  534. Vector3 Scale() const;
  535. void SetRotation(const Matrix3&);
  536. void SetScale(const Vector3&);
  537. void SetScale(float);
  538. void SetTranslation(const Vector3&);
  539. Matrix3 ToMatrix3() const;
  540. Vector3 Translation() const;
  541. Matrix4 Transpose() const;
  542. void Decompose(Vector3&, Quaternion&, Vector3&) const;
  543. Matrix4 Inverse() const;
  544. bool Equals(const Matrix4&) const;
  545. // Properties:
  546. float m00;
  547. float m01;
  548. float m02;
  549. float m03;
  550. float m10;
  551. float m11;
  552. float m12;
  553. float m13;
  554. float m20;
  555. float m21;
  556. float m22;
  557. float m23;
  558. float m30;
  559. float m31;
  560. float m32;
  561. float m33;
  562. };
  563. class Matrix3x4
  564. {
  565. // Methods:
  566. Quaternion Rotation() const;
  567. Matrix3 RotationMatrix() const;
  568. Vector3 Scale() const;
  569. void SetRotation(const Matrix3&);
  570. void SetScale(const Vector3&);
  571. void SetScale(float);
  572. void SetTranslation(const Vector3&);
  573. Matrix3 ToMatrix3() const;
  574. Vector3 Translation() const;
  575. void Decompose(Vector3&, Quaternion&, Vector3&) const;
  576. Matrix3x4 Inverse() const;
  577. bool Equals(const Matrix3x4&) const;
  578. // Properties:
  579. float m00;
  580. float m01;
  581. float m02;
  582. float m03;
  583. float m10;
  584. float m11;
  585. float m12;
  586. float m13;
  587. float m20;
  588. float m21;
  589. float m22;
  590. float m23;
  591. };
  592. class Rect
  593. {
  594. // Methods:
  595. void Define(const Vector2&, const Vector2&);
  596. void Define(const Vector2&);
  597. void Merge(const Vector2&);
  598. void Merge(const Rect&);
  599. void Clip(const Rect&);
  600. void Clear();
  601. bool Equals(const Rect&) const;
  602. Vector4 ToVector4() const;
  603. // Properties:
  604. /* (readonly) */
  605. Vector2 center;
  606. /* (readonly) */
  607. Vector2 size;
  608. /* (readonly) */
  609. Vector2 halfSize;
  610. Vector2 min;
  611. Vector2 max;
  612. float left;
  613. float top;
  614. float right;
  615. float bottom;
  616. bool defined;
  617. };
  618. class BoundingBox
  619. {
  620. // Methods:
  621. void Define(const Vector3&, const Vector3&);
  622. void Define(float, float);
  623. void Define(const Vector3&);
  624. void Define(const BoundingBox&);
  625. void Define(const Frustum&);
  626. void Define(const Polyhedron&);
  627. void Define(const Sphere&);
  628. void Merge(const Vector3&);
  629. void Merge(const BoundingBox&);
  630. void Merge(const Frustum&);
  631. void Merge(const Polyhedron&);
  632. void Merge(const Sphere&);
  633. void Clip(const BoundingBox&);
  634. void Clear();
  635. void Transform(const Matrix3&);
  636. void Transform(const Matrix3x4&);
  637. Intersection IsInside(const Vector3&) const;
  638. Intersection IsInside(const Sphere&) const;
  639. Intersection IsInside(const BoundingBox&) const;
  640. BoundingBox Transformed(const Matrix3&) const;
  641. BoundingBox Transformed(const Matrix3x4&) const;
  642. Rect Projected(const Matrix4&) const;
  643. String ToString() const;
  644. // Properties:
  645. /* (readonly) */
  646. Vector3 center;
  647. /* (readonly) */
  648. Vector3 size;
  649. /* (readonly) */
  650. Vector3 halfSize;
  651. Vector3 min;
  652. Vector3 max;
  653. bool defined;
  654. };
  655. class Frustum
  656. {
  657. // Methods:
  658. void Define(float, float, float, float, float, const Matrix3x4&);
  659. void Define(const Vector3&, const Vector3&, const Matrix3x4&);
  660. void Define(const BoundingBox&, const Matrix3x4&);
  661. void DefineOrtho(float, float, float, float, float, const Matrix3x4&);
  662. void Transform(const Matrix3&);
  663. void Transform(const Matrix3x4&);
  664. Intersection IsInside(const Vector3&);
  665. Intersection IsInside(const BoundingBox&);
  666. Intersection IsInside(const Sphere&);
  667. float Distance(const Vector3&) const;
  668. Frustum Transformed(const Matrix3&) const;
  669. Frustum Transformed(const Matrix3x4&) const;
  670. // Properties:
  671. /* (readonly) */
  672. Array<Vector3> vertices;
  673. };
  674. class Polyhedron
  675. {
  676. // Methods:
  677. void AddFace(const Vector3&, const Vector3&, const Vector3&);
  678. void AddFace(const Vector3&, const Vector3&, const Vector3&, const Vector3&);
  679. void AddFace(const Array<Vector3>);
  680. void Define(const BoundingBox&);
  681. void Define(const Frustum&);
  682. void Clip(const BoundingBox&);
  683. void Clip(const Frustum&);
  684. void Clear();
  685. void Transform(const Matrix3&);
  686. void Transform(const Matrix3x4&);
  687. Polyhedron Transformed(const Matrix3&) const;
  688. Polyhedron Transformed(const Matrix3x4&) const;
  689. // Properties:
  690. /* (readonly) */
  691. uint numFaces;
  692. /* (readonly) */
  693. Array<Array<Vector3>> face;
  694. };
  695. class Sphere
  696. {
  697. // Methods:
  698. void Define(const Vector3&, float);
  699. void Define(const BoundingBox&);
  700. void Define(const Frustum&);
  701. void Define(const Polyhedron&);
  702. void Define(const Sphere&);
  703. void Merge(const Vector3&);
  704. void Merge(const BoundingBox&);
  705. void Merge(const Frustum&);
  706. void Merge(const Sphere&);
  707. void Clear();
  708. Intersection IsInside(const Vector3&) const;
  709. Intersection IsInside(const Sphere&) const;
  710. Intersection IsInside(const BoundingBox&) const;
  711. float Distance(const Vector3&) const;
  712. // Properties:
  713. Vector3 center;
  714. float radius;
  715. bool defined;
  716. };
  717. class Plane
  718. {
  719. // Methods:
  720. void Define(const Vector3&, const Vector3&, const Vector3&);
  721. void Define(const Vector3&, const Vector3&);
  722. float Distance(const Vector3&) const;
  723. // Properties:
  724. Vector3 normal;
  725. Vector3 absNormal;
  726. float intercept;
  727. };
  728. class Ray
  729. {
  730. // Methods:
  731. void Define(const Vector3&, const Vector3&);
  732. Vector3 Project(const Vector3&) const;
  733. float Distance(const Vector3&) const;
  734. Vector3 ClosestPoint(const Ray&) const;
  735. float HitDistance(const Sphere&) const;
  736. float HitDistance(const BoundingBox&) const;
  737. float HitDistance(const Frustum&, bool = true) const;
  738. float HitDistance(const Vector3&, const Vector3&, const Vector3&) const;
  739. Ray Transformed(const Matrix3x4&) const;
  740. // Properties:
  741. Vector3 origin;
  742. Vector3 direction;
  743. };
  744. class Color
  745. {
  746. // Methods:
  747. uint ToUInt() const;
  748. Vector3 ToHSL() const;
  749. Vector3 ToHSV() const;
  750. void FromHSL(float, float, float, float);
  751. void FromHSV(float, float, float, float);
  752. float SumRGB() const;
  753. float Average() const;
  754. float Luma() const;
  755. float Chroma() const;
  756. float Hue() const;
  757. float SaturationHSL() const;
  758. float SaturationHSV() const;
  759. float Value() const;
  760. float Lightness() const;
  761. float MaxRGB() const;
  762. float MinRGB() const;
  763. float Range() const;
  764. void Clip(bool);
  765. void Invert(bool);
  766. Color Lerp(const Color&, float) const;
  767. String ToString() const;
  768. // Properties:
  769. /* (readonly) */
  770. Array<float> data;
  771. /* (readonly) */
  772. Vector3 rgb;
  773. /* (readonly) */
  774. Vector4 rgba;
  775. float r;
  776. float g;
  777. float b;
  778. float a;
  779. };
  780. class StringHash
  781. {
  782. // Methods:
  783. String ToString() const;
  784. // Properties:
  785. /* (readonly) */
  786. uint value;
  787. };
  788. class ShortStringHash
  789. {
  790. // Methods:
  791. String ToString() const;
  792. // Properties:
  793. /* (readonly) */
  794. uint16 value;
  795. };
  796. class ResourceRef
  797. {
  798. // Properties:
  799. ShortStringHash type;
  800. String name;
  801. };
  802. class ResourceRefList
  803. {
  804. // Methods:
  805. void Resize(uint);
  806. // Properties:
  807. /* (readonly) */
  808. uint length;
  809. /* (readonly) */
  810. bool empty;
  811. Array<String> names;
  812. ShortStringHash type;
  813. };
  814. class Variant
  815. {
  816. // Methods:
  817. void Clear();
  818. int GetInt() const;
  819. uint GetUInt() const;
  820. StringHash GetStringHash() const;
  821. ShortStringHash GetShortStringHash() const;
  822. bool GetBool() const;
  823. float GetFloat() const;
  824. const Vector2& GetVector2() const;
  825. const Vector3& GetVector3() const;
  826. const Vector4& GetVector4() const;
  827. const Quaternion& GetQuaternion() const;
  828. const Color& GetColor() const;
  829. const String& GetString() const;
  830. const ResourceRef& GetResourceRef() const;
  831. const ResourceRefList& GetResourceRefList() const;
  832. Array<Variant> GetVariantVector() const;
  833. const VariantMap& GetVariantMap() const;
  834. const IntRect& GetIntRect() const;
  835. const IntVector2& GetIntVector2() const;
  836. void FromString(const String&, const String&);
  837. void FromString(VariantType, const String&);
  838. String ToString() const;
  839. VectorBuffer GetBuffer() const;
  840. Serializable GetSerializable() const;
  841. Node GetNode() const;
  842. Component GetComponent() const;
  843. Scene GetScene() const;
  844. Camera GetCamera() const;
  845. RenderSurface GetRenderSurface() const;
  846. Texture GetTexture() const;
  847. UIElement GetUIElement() const;
  848. Connection GetConnection() const;
  849. CollisionShape GetCollisionShape() const;
  850. RigidBody GetRigidBody() const;
  851. PhysicsWorld GetPhysicsWorld() const;
  852. // Properties:
  853. /* (readonly) */
  854. bool zero;
  855. /* (readonly) */
  856. bool empty;
  857. /* (readonly) */
  858. VariantType type;
  859. /* (readonly) */
  860. String typeName;
  861. };
  862. class VariantMap
  863. {
  864. // Methods:
  865. bool Contains(const String&) const;
  866. bool Erase(const String&);
  867. bool Contains(ShortStringHash) const;
  868. bool Erase(ShortStringHash);
  869. void Clear();
  870. // Properties:
  871. /* (readonly) */
  872. uint length;
  873. /* (readonly) */
  874. Array<ShortStringHash> keys;
  875. };
  876. class AttributeInfo
  877. {
  878. // Properties:
  879. /* (readonly) */
  880. Array<String> enumNames;
  881. VariantType type;
  882. String name;
  883. Variant defaultValue;
  884. uint mode;
  885. };
  886. class RefCounted
  887. {
  888. // Properties:
  889. /* (readonly) */
  890. int refs;
  891. /* (readonly) */
  892. int weakRefs;
  893. };
  894. class Object
  895. {
  896. // Methods:
  897. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  898. // Properties:
  899. /* (readonly) */
  900. int refs;
  901. /* (readonly) */
  902. int weakRefs;
  903. /* (readonly) */
  904. ShortStringHash type;
  905. /* (readonly) */
  906. ShortStringHash baseType;
  907. /* (readonly) */
  908. String typeName;
  909. /* (readonly) */
  910. String category;
  911. };
  912. class WeakHandle
  913. {
  914. // Methods:
  915. RefCounted Get() const;
  916. // Properties:
  917. /* (readonly) */
  918. int refs;
  919. /* (readonly) */
  920. int weakRefs;
  921. /* (readonly) */
  922. bool expired;
  923. };
  924. class Timer
  925. {
  926. // Methods:
  927. uint GetMSec(bool);
  928. void Reset();
  929. };
  930. class Time
  931. {
  932. // Methods:
  933. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  934. // Properties:
  935. /* (readonly) */
  936. int refs;
  937. /* (readonly) */
  938. int weakRefs;
  939. /* (readonly) */
  940. ShortStringHash type;
  941. /* (readonly) */
  942. ShortStringHash baseType;
  943. /* (readonly) */
  944. String typeName;
  945. /* (readonly) */
  946. String category;
  947. /* (readonly) */
  948. uint frameNumber;
  949. /* (readonly) */
  950. float timeStep;
  951. /* (readonly) */
  952. float elapsedTime;
  953. /* (readonly) */
  954. uint systemTime;
  955. /* (readonly) */
  956. String timeStamp;
  957. };
  958. class Log
  959. {
  960. // Methods:
  961. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  962. void Open(const String&);
  963. void Close();
  964. void Write(const String&, bool = false);
  965. void Debug(const String&);
  966. void Info(const String&);
  967. void Warning(const String&);
  968. void Error(const String&);
  969. // Properties:
  970. /* (readonly) */
  971. int refs;
  972. /* (readonly) */
  973. int weakRefs;
  974. /* (readonly) */
  975. ShortStringHash type;
  976. /* (readonly) */
  977. ShortStringHash baseType;
  978. /* (readonly) */
  979. String typeName;
  980. /* (readonly) */
  981. String category;
  982. int level;
  983. bool timeStamp;
  984. /* (readonly) */
  985. String lastMessage;
  986. bool quiet;
  987. };
  988. class Serializer
  989. {
  990. // Methods:
  991. uint Write(Array<uint8>);
  992. bool WriteInt(int);
  993. bool WriteShort(int16);
  994. bool WriteByte(int8);
  995. bool WriteUInt(uint);
  996. bool WriteUShort(uint16);
  997. bool WriteUByte(uint8);
  998. bool WriteBool(bool);
  999. bool WriteFloat(float);
  1000. bool WriteIntRect(const IntRect&);
  1001. bool WriteIntVector2(const IntVector2&);
  1002. bool WriteVector2(const Vector2&);
  1003. bool WriteVector3(const Vector3&);
  1004. bool WritePackedVector3(const Vector3&, float);
  1005. bool WriteVector4(const Vector4&);
  1006. bool WriteQuaternion(const Quaternion&);
  1007. bool WritePackedQuaternion(const Quaternion&);
  1008. bool WriteColor(const Color&);
  1009. bool WriteBoundingBox(const BoundingBox&);
  1010. bool WriteString(const String&);
  1011. bool WriteFileID(const String&);
  1012. bool WriteStringHash(const StringHash&);
  1013. bool WriteShortStringHash(const ShortStringHash&);
  1014. bool WriteVariant(const Variant&);
  1015. bool WriteVariantMap(const VariantMap&);
  1016. bool WriteVLE(uint);
  1017. bool WriteNetID(uint);
  1018. bool WriteLine(const String&);
  1019. };
  1020. class Deserializer
  1021. {
  1022. // Methods:
  1023. Array<uint8> Read(uint);
  1024. int ReadInt();
  1025. int16 ReadShort();
  1026. int8 ReadByte();
  1027. uint ReadUInt();
  1028. uint16 ReadUShort();
  1029. uint8 ReadUByte();
  1030. bool ReadBool();
  1031. float ReadFloat();
  1032. IntRect ReadIntRect();
  1033. IntVector2 ReadIntVector2();
  1034. Vector2 ReadVector2();
  1035. Vector3 ReadVector3();
  1036. Vector3 ReadPackedVector3(float);
  1037. Vector4 ReadVector4();
  1038. Quaternion ReadQuaternion();
  1039. Quaternion ReadPackedQuaternion();
  1040. Color ReadColor();
  1041. BoundingBox ReadBoundingBox();
  1042. String ReadString();
  1043. String ReadFileID();
  1044. StringHash ReadStringHash();
  1045. ShortStringHash ReadShortStringHash();
  1046. Variant ReadVariant();
  1047. VariantMap ReadVariantMap();
  1048. uint ReadVLE();
  1049. uint ReadNetID();
  1050. String ReadLine();
  1051. uint Seek(uint);
  1052. // Properties:
  1053. /* (readonly) */
  1054. String name;
  1055. /* (readonly) */
  1056. uint checksum;
  1057. /* (readonly) */
  1058. uint position;
  1059. /* (readonly) */
  1060. uint size;
  1061. /* (readonly) */
  1062. bool eof;
  1063. };
  1064. class File
  1065. {
  1066. // Methods:
  1067. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1068. bool Open(const String&, FileMode = FILE_READ);
  1069. void Close();
  1070. uint Write(Array<uint8>);
  1071. bool WriteInt(int);
  1072. bool WriteShort(int16);
  1073. bool WriteByte(int8);
  1074. bool WriteUInt(uint);
  1075. bool WriteUShort(uint16);
  1076. bool WriteUByte(uint8);
  1077. bool WriteBool(bool);
  1078. bool WriteFloat(float);
  1079. bool WriteIntRect(const IntRect&);
  1080. bool WriteIntVector2(const IntVector2&);
  1081. bool WriteVector2(const Vector2&);
  1082. bool WriteVector3(const Vector3&);
  1083. bool WritePackedVector3(const Vector3&, float);
  1084. bool WriteVector4(const Vector4&);
  1085. bool WriteQuaternion(const Quaternion&);
  1086. bool WritePackedQuaternion(const Quaternion&);
  1087. bool WriteColor(const Color&);
  1088. bool WriteBoundingBox(const BoundingBox&);
  1089. bool WriteString(const String&);
  1090. bool WriteFileID(const String&);
  1091. bool WriteStringHash(const StringHash&);
  1092. bool WriteShortStringHash(const ShortStringHash&);
  1093. bool WriteVariant(const Variant&);
  1094. bool WriteVariantMap(const VariantMap&);
  1095. bool WriteVLE(uint);
  1096. bool WriteNetID(uint);
  1097. bool WriteLine(const String&);
  1098. Array<uint8> Read(uint);
  1099. int ReadInt();
  1100. int16 ReadShort();
  1101. int8 ReadByte();
  1102. uint ReadUInt();
  1103. uint16 ReadUShort();
  1104. uint8 ReadUByte();
  1105. bool ReadBool();
  1106. float ReadFloat();
  1107. IntRect ReadIntRect();
  1108. IntVector2 ReadIntVector2();
  1109. Vector2 ReadVector2();
  1110. Vector3 ReadVector3();
  1111. Vector3 ReadPackedVector3(float);
  1112. Vector4 ReadVector4();
  1113. Quaternion ReadQuaternion();
  1114. Quaternion ReadPackedQuaternion();
  1115. Color ReadColor();
  1116. BoundingBox ReadBoundingBox();
  1117. String ReadString();
  1118. String ReadFileID();
  1119. StringHash ReadStringHash();
  1120. ShortStringHash ReadShortStringHash();
  1121. Variant ReadVariant();
  1122. VariantMap ReadVariantMap();
  1123. uint ReadVLE();
  1124. uint ReadNetID();
  1125. String ReadLine();
  1126. uint Seek(uint);
  1127. // Properties:
  1128. /* (readonly) */
  1129. int refs;
  1130. /* (readonly) */
  1131. int weakRefs;
  1132. /* (readonly) */
  1133. ShortStringHash type;
  1134. /* (readonly) */
  1135. ShortStringHash baseType;
  1136. /* (readonly) */
  1137. String typeName;
  1138. /* (readonly) */
  1139. String category;
  1140. /* (readonly) */
  1141. FileMode mode;
  1142. /* (readonly) */
  1143. bool open;
  1144. /* (readonly) */
  1145. bool packaged;
  1146. /* (readonly) */
  1147. String name;
  1148. /* (readonly) */
  1149. uint checksum;
  1150. /* (readonly) */
  1151. uint position;
  1152. /* (readonly) */
  1153. uint size;
  1154. /* (readonly) */
  1155. bool eof;
  1156. };
  1157. class VectorBuffer
  1158. {
  1159. // Methods:
  1160. void SetData(Deserializer, uint);
  1161. void Clear();
  1162. void Resize(uint);
  1163. uint Write(Array<uint8>);
  1164. bool WriteInt(int);
  1165. bool WriteShort(int16);
  1166. bool WriteByte(int8);
  1167. bool WriteUInt(uint);
  1168. bool WriteUShort(uint16);
  1169. bool WriteUByte(uint8);
  1170. bool WriteBool(bool);
  1171. bool WriteFloat(float);
  1172. bool WriteIntRect(const IntRect&);
  1173. bool WriteIntVector2(const IntVector2&);
  1174. bool WriteVector2(const Vector2&);
  1175. bool WriteVector3(const Vector3&);
  1176. bool WritePackedVector3(const Vector3&, float);
  1177. bool WriteVector4(const Vector4&);
  1178. bool WriteQuaternion(const Quaternion&);
  1179. bool WritePackedQuaternion(const Quaternion&);
  1180. bool WriteColor(const Color&);
  1181. bool WriteBoundingBox(const BoundingBox&);
  1182. bool WriteString(const String&);
  1183. bool WriteFileID(const String&);
  1184. bool WriteStringHash(const StringHash&);
  1185. bool WriteShortStringHash(const ShortStringHash&);
  1186. bool WriteVariant(const Variant&);
  1187. bool WriteVariantMap(const VariantMap&);
  1188. bool WriteVLE(uint);
  1189. bool WriteNetID(uint);
  1190. bool WriteLine(const String&);
  1191. Array<uint8> Read(uint);
  1192. int ReadInt();
  1193. int16 ReadShort();
  1194. int8 ReadByte();
  1195. uint ReadUInt();
  1196. uint16 ReadUShort();
  1197. uint8 ReadUByte();
  1198. bool ReadBool();
  1199. float ReadFloat();
  1200. IntRect ReadIntRect();
  1201. IntVector2 ReadIntVector2();
  1202. Vector2 ReadVector2();
  1203. Vector3 ReadVector3();
  1204. Vector3 ReadPackedVector3(float);
  1205. Vector4 ReadVector4();
  1206. Quaternion ReadQuaternion();
  1207. Quaternion ReadPackedQuaternion();
  1208. Color ReadColor();
  1209. BoundingBox ReadBoundingBox();
  1210. String ReadString();
  1211. String ReadFileID();
  1212. StringHash ReadStringHash();
  1213. ShortStringHash ReadShortStringHash();
  1214. Variant ReadVariant();
  1215. VariantMap ReadVariantMap();
  1216. uint ReadVLE();
  1217. uint ReadNetID();
  1218. String ReadLine();
  1219. uint Seek(uint);
  1220. // Properties:
  1221. /* (readonly) */
  1222. String name;
  1223. /* (readonly) */
  1224. uint checksum;
  1225. /* (readonly) */
  1226. uint position;
  1227. /* (readonly) */
  1228. uint size;
  1229. /* (readonly) */
  1230. bool eof;
  1231. };
  1232. class FileSystem
  1233. {
  1234. // Methods:
  1235. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1236. bool FileExists(const String&) const;
  1237. bool DirExists(const String&) const;
  1238. uint GetLastModifiedTime(const String&) const;
  1239. Array<String> ScanDir(const String&, const String&, uint, bool) const;
  1240. bool CreateDir(const String&);
  1241. int SystemCommand(const String&);
  1242. int SystemRun(const String&, Array<String>);
  1243. bool SystemOpen(const String&, const String&);
  1244. bool Copy(const String&, const String&);
  1245. bool Rename(const String&, const String&);
  1246. bool Delete(const String&);
  1247. // Properties:
  1248. /* (readonly) */
  1249. int refs;
  1250. /* (readonly) */
  1251. int weakRefs;
  1252. /* (readonly) */
  1253. ShortStringHash type;
  1254. /* (readonly) */
  1255. ShortStringHash baseType;
  1256. /* (readonly) */
  1257. String typeName;
  1258. /* (readonly) */
  1259. String category;
  1260. String currentDir;
  1261. /* (readonly) */
  1262. String programDir;
  1263. /* (readonly) */
  1264. String userDocumentsDir;
  1265. };
  1266. class PackageFile
  1267. {
  1268. // Methods:
  1269. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1270. bool Open(const String&, uint = 0) const;
  1271. bool Exists(const String&) const;
  1272. bool compressed() const;
  1273. // Properties:
  1274. /* (readonly) */
  1275. int refs;
  1276. /* (readonly) */
  1277. int weakRefs;
  1278. /* (readonly) */
  1279. ShortStringHash type;
  1280. /* (readonly) */
  1281. ShortStringHash baseType;
  1282. /* (readonly) */
  1283. String typeName;
  1284. /* (readonly) */
  1285. String category;
  1286. /* (readonly) */
  1287. String name;
  1288. /* (readonly) */
  1289. uint numFiles;
  1290. /* (readonly) */
  1291. uint totalSize;
  1292. /* (readonly) */
  1293. uint checksum;
  1294. };
  1295. class Resource
  1296. {
  1297. // Methods:
  1298. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1299. bool Load(File);
  1300. bool Save(File) const;
  1301. // Properties:
  1302. /* (readonly) */
  1303. int refs;
  1304. /* (readonly) */
  1305. int weakRefs;
  1306. /* (readonly) */
  1307. ShortStringHash type;
  1308. /* (readonly) */
  1309. ShortStringHash baseType;
  1310. /* (readonly) */
  1311. String typeName;
  1312. /* (readonly) */
  1313. String category;
  1314. String name;
  1315. /* (readonly) */
  1316. uint memoryUse;
  1317. /* (readonly) */
  1318. uint useTimer;
  1319. };
  1320. class ResourceCache
  1321. {
  1322. // Methods:
  1323. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1324. bool AddResourceDir(const String&, uint = - 1);
  1325. void AddPackageFile(PackageFile, uint = - 1);
  1326. bool AddManualResource(Resource);
  1327. void RemoveResourceDir(const String&);
  1328. void RemovePackageFile(PackageFile, bool = true, bool = false);
  1329. void RemovePackageFile(const String&, bool = true, bool = false);
  1330. void ReleaseResource(const String&, const String&, bool = false);
  1331. void ReleaseResources(ShortStringHash, bool = false);
  1332. void ReleaseResources(const String&, const String&, bool = false);
  1333. void ReleaseResources(const String&, bool = false);
  1334. void ReleaseAllResources(bool = false);
  1335. bool ReloadResource(Resource);
  1336. bool Exists(const String&) const;
  1337. File GetFile(const String&);
  1338. String GetPreferredResourceDir(const String&) const;
  1339. String SanitateResourceName(const String&) const;
  1340. String GetResourceFileName(const String&) const;
  1341. Resource GetResource(const String&, const String&);
  1342. Resource GetResource(ShortStringHash, const String&);
  1343. // Properties:
  1344. /* (readonly) */
  1345. int refs;
  1346. /* (readonly) */
  1347. int weakRefs;
  1348. /* (readonly) */
  1349. ShortStringHash type;
  1350. /* (readonly) */
  1351. ShortStringHash baseType;
  1352. /* (readonly) */
  1353. String typeName;
  1354. /* (readonly) */
  1355. String category;
  1356. Array<uint> memoryBudget;
  1357. /* (readonly) */
  1358. Array<uint> memoryUse;
  1359. /* (readonly) */
  1360. uint totalMemoryUse;
  1361. /* (readonly) */
  1362. Array<String> resourceDirs;
  1363. /* (readonly) */
  1364. Array<PackageFile> packageFiles;
  1365. /* (writeonly) */
  1366. bool searchPackagesFirst;
  1367. /* (readonly) */
  1368. bool seachPackagesFirst;
  1369. bool autoReloadResources;
  1370. };
  1371. class Image
  1372. {
  1373. // Methods:
  1374. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1375. bool Load(File);
  1376. bool Save(File) const;
  1377. void FlipVertical();
  1378. void SaveBMP(const String&);
  1379. void SavePNG(const String&);
  1380. void SaveTGA(const String&);
  1381. void SaveJPG(const String&, int);
  1382. // Properties:
  1383. /* (readonly) */
  1384. int refs;
  1385. /* (readonly) */
  1386. int weakRefs;
  1387. /* (readonly) */
  1388. ShortStringHash type;
  1389. /* (readonly) */
  1390. ShortStringHash baseType;
  1391. /* (readonly) */
  1392. String typeName;
  1393. /* (readonly) */
  1394. String category;
  1395. String name;
  1396. /* (readonly) */
  1397. uint memoryUse;
  1398. /* (readonly) */
  1399. uint useTimer;
  1400. /* (readonly) */
  1401. int width;
  1402. /* (readonly) */
  1403. int height;
  1404. /* (readonly) */
  1405. uint components;
  1406. /* (readonly) */
  1407. bool compressed;
  1408. };
  1409. class XMLFile
  1410. {
  1411. // Methods:
  1412. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1413. bool Load(File);
  1414. bool Save(File) const;
  1415. XMLElement CreateRoot(const String&);
  1416. XMLElement GetRoot(const String& = String ( ));
  1417. // Properties:
  1418. /* (readonly) */
  1419. int refs;
  1420. /* (readonly) */
  1421. int weakRefs;
  1422. /* (readonly) */
  1423. ShortStringHash type;
  1424. /* (readonly) */
  1425. ShortStringHash baseType;
  1426. /* (readonly) */
  1427. String typeName;
  1428. /* (readonly) */
  1429. String category;
  1430. String name;
  1431. /* (readonly) */
  1432. uint memoryUse;
  1433. /* (readonly) */
  1434. uint useTimer;
  1435. /* (readonly) */
  1436. XMLElement root;
  1437. };
  1438. class XMLElement
  1439. {
  1440. // Methods:
  1441. XMLElement CreateChild(const String&);
  1442. bool RemoveChild(const XMLElement&);
  1443. bool RemoveChild(const String&);
  1444. bool RemoveChildren(const String& = String ( ));
  1445. bool RemoveAttribute(const String& = String ( ));
  1446. XMLElement SelectSingle(const String&);
  1447. XMLElement SelectSinglePrepared(const XPathQuery&);
  1448. XPathResultSet Select(const String&);
  1449. XPathResultSet SelectPrepared(const XPathQuery&);
  1450. bool SetValue(const String&);
  1451. bool SetAttribute(const String&, const String&);
  1452. bool SetAttribute(const String&);
  1453. bool SetBool(const String&, bool);
  1454. bool SetBoundingBox(const BoundingBox&);
  1455. bool SetColor(const String&, const Color&);
  1456. bool SetFloat(const String&, float);
  1457. bool SetInt(const String&, int);
  1458. bool SetUInt(const String&, uint);
  1459. bool SetQuaternion(const String&, const Quaternion&);
  1460. bool SetVariant(const Variant&);
  1461. bool SetResourceRef(const String&, const ResourceRef&);
  1462. bool SetResourceRefList(const String&, const ResourceRefList&);
  1463. bool SetVariantVector(Array<Variant>);
  1464. bool SetVariantMap(const VariantMap&);
  1465. bool SetVector2(const String&, const Vector2&);
  1466. bool SetVector3(const String&, const Vector3&);
  1467. bool SetVector4(const String&, const Vector4&);
  1468. bool SetVectorVariant(const String&, const Variant&);
  1469. bool HasAttribute(const String&) const;
  1470. String GetValue() const;
  1471. String GetAttribute(const String& = String ( )) const;
  1472. String GetAttributeLower(const String&) const;
  1473. String GetAttributeUpper(const String&) const;
  1474. Array<String> GetAttributeNames() const;
  1475. bool HasChild(const String&) const;
  1476. XMLElement GetChild(const String& = String ( )) const;
  1477. XMLElement GetNext(const String& = String ( )) const;
  1478. bool GetBool(const String&) const;
  1479. BoundingBox GetBoundingBox() const;
  1480. Color GetColor(const String&) const;
  1481. float GetFloat(const String&) const;
  1482. uint GetUInt(const String&) const;
  1483. int GetInt(const String&) const;
  1484. Quaternion GetQuaternion(const String&) const;
  1485. Variant GetVariant() const;
  1486. ResourceRef GetResourceRef() const;
  1487. ResourceRefList GetResourceRefList() const;
  1488. Array<Variant> GetVariantVector() const;
  1489. VariantMap GetVariantMap() const;
  1490. Vector2 GetVector2(const String&) const;
  1491. Vector3 GetVector3(const String&) const;
  1492. Vector4 GetVector4(const String&) const;
  1493. Variant GetVectorVariant(const String&) const;
  1494. // Properties:
  1495. String value;
  1496. /* (readonly) */
  1497. String name;
  1498. /* (readonly) */
  1499. uint numAttributes;
  1500. /* (readonly) */
  1501. bool isNull;
  1502. /* (readonly) */
  1503. bool notNull;
  1504. /* (readonly) */
  1505. XMLElement parent;
  1506. /* (readonly) */
  1507. XMLFile file;
  1508. /* (readonly) */
  1509. XMLElement nextResult;
  1510. };
  1511. class XPathResultSet
  1512. {
  1513. // Properties:
  1514. /* (readonly) */
  1515. XMLElement firstResult;
  1516. /* (readonly) */
  1517. uint size;
  1518. /* (readonly) */
  1519. bool empty;
  1520. };
  1521. class XPathQuery
  1522. {
  1523. // Methods:
  1524. void Bind();
  1525. bool SetVariable(const String&, bool);
  1526. bool SetVariable(const String&, float);
  1527. bool SetVariable(const String&, const String&);
  1528. bool SetVariable(const String&, const XPathResultSet&);
  1529. bool SetQuery(const String&, const String& = String ( ), bool = true);
  1530. void Clear();
  1531. bool EvaluateToBool(XMLElement);
  1532. float EvaluateToFloat(XMLElement);
  1533. String EvaluateToString(XMLElement);
  1534. XPathResultSet Evaluate(XMLElement);
  1535. // Properties:
  1536. String query;
  1537. };
  1538. class Serializable
  1539. {
  1540. // Methods:
  1541. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1542. bool Load(File, bool = false);
  1543. bool Save(File) const;
  1544. bool LoadXML(const XMLElement&, bool = false);
  1545. bool SaveXML(XMLElement&) const;
  1546. void ApplyAttributes();
  1547. bool SetAttribute(const String&, const Variant&);
  1548. void ResetToDefault();
  1549. void RemoveInstanceDefault();
  1550. Variant GetAttribute(const String&) const;
  1551. Variant GetAttributeDefault(const String&) const;
  1552. // Properties:
  1553. /* (readonly) */
  1554. int refs;
  1555. /* (readonly) */
  1556. int weakRefs;
  1557. /* (readonly) */
  1558. ShortStringHash type;
  1559. /* (readonly) */
  1560. ShortStringHash baseType;
  1561. /* (readonly) */
  1562. String typeName;
  1563. /* (readonly) */
  1564. String category;
  1565. /* (readonly) */
  1566. uint numAttributes;
  1567. Array<Variant> attributes;
  1568. /* (readonly) */
  1569. Array<Variant> attributeDefaults;
  1570. /* (readonly) */
  1571. Array<AttributeInfo> attributeInfos;
  1572. bool temporary;
  1573. };
  1574. class Component
  1575. {
  1576. // Methods:
  1577. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1578. bool Load(File, bool = false);
  1579. bool Save(File) const;
  1580. bool LoadXML(const XMLElement&, bool = false);
  1581. bool SaveXML(XMLElement&) const;
  1582. void ApplyAttributes();
  1583. bool SetAttribute(const String&, const Variant&);
  1584. void ResetToDefault();
  1585. void RemoveInstanceDefault();
  1586. Variant GetAttribute(const String&) const;
  1587. Variant GetAttributeDefault(const String&) const;
  1588. void Remove();
  1589. void MarkNetworkUpdate() const;
  1590. void DrawDebugGeometry(DebugRenderer, bool);
  1591. // Properties:
  1592. /* (readonly) */
  1593. int refs;
  1594. /* (readonly) */
  1595. int weakRefs;
  1596. /* (readonly) */
  1597. ShortStringHash type;
  1598. /* (readonly) */
  1599. ShortStringHash baseType;
  1600. /* (readonly) */
  1601. String typeName;
  1602. /* (readonly) */
  1603. String category;
  1604. /* (readonly) */
  1605. uint numAttributes;
  1606. Array<Variant> attributes;
  1607. /* (readonly) */
  1608. Array<Variant> attributeDefaults;
  1609. /* (readonly) */
  1610. Array<AttributeInfo> attributeInfos;
  1611. bool temporary;
  1612. bool enabled;
  1613. /* (readonly) */
  1614. bool enabledEffective;
  1615. /* (readonly) */
  1616. uint id;
  1617. /* (readonly) */
  1618. Node node;
  1619. };
  1620. class Node
  1621. {
  1622. // Methods:
  1623. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1624. bool Load(File, bool = false);
  1625. bool Save(File) const;
  1626. bool LoadXML(const XMLElement&, bool = false);
  1627. bool SaveXML(XMLElement&) const;
  1628. void ApplyAttributes();
  1629. bool SetAttribute(const String&, const Variant&);
  1630. void ResetToDefault();
  1631. void RemoveInstanceDefault();
  1632. Variant GetAttribute(const String&) const;
  1633. Variant GetAttributeDefault(const String&) const;
  1634. void SetScale(float);
  1635. void SetTransform(const Vector3&, const Quaternion&);
  1636. void SetTransform(const Vector3&, const Quaternion&, float);
  1637. void SetTransform(const Vector3&, const Quaternion&, const Vector3&);
  1638. void SetWorldTransform(const Vector3&, const Quaternion&);
  1639. void SetWorldTransform(const Vector3&, const Quaternion&, float);
  1640. void SetWorldTransform(const Vector3&, const Quaternion&, const Vector3&);
  1641. void Translate(const Vector3&);
  1642. void TranslateRelative(const Vector3&);
  1643. void Rotate(const Quaternion&, bool = false);
  1644. void Pitch(float, bool = false);
  1645. void Yaw(float, bool = false);
  1646. void Roll(float, bool = false);
  1647. void LookAt(const Vector3&, const Vector3& = Vector3 ( 0 , 1 , 0 ));
  1648. void Scale(float);
  1649. void Scale(const Vector3&);
  1650. Node CreateChild(const String& = "", CreateMode = REPLICATED, uint = 0);
  1651. void AddChild(Node);
  1652. void RemoveChild(Node);
  1653. void RemoveAllChildren();
  1654. void RemoveChildren(bool, bool, bool);
  1655. void Remove();
  1656. Component CreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  1657. Component GetOrCreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  1658. void RemoveComponent(Component);
  1659. void RemoveComponent(const String&);
  1660. void RemoveAllComponents();
  1661. void RemoveComponents(bool, bool);
  1662. Array<Node> GetChildren(bool = false) const;
  1663. Array<Node> GetChildrenWithComponent(const String&, bool = false) const;
  1664. Array<Node> GetChildrenWithScript(bool = false) const;
  1665. Array<Node> GetChildrenWithScript(const String&, bool = false) const;
  1666. Node GetChild(const String&, bool = false) const;
  1667. Array<Component> GetComponents() const;
  1668. Array<Component> GetComponents(const String&, bool = false) const;
  1669. Component GetComponent(const String&) const;
  1670. bool HasComponent(const String&) const;
  1671. Vector3 LocalToWorld(const Vector3&) const;
  1672. Vector3 LocalToWorld(const Vector4&) const;
  1673. Vector3 WorldToLocal(const Vector3&) const;
  1674. Vector3 WorldToLocal(const Vector4&) const;
  1675. void SetEnabled(bool, bool);
  1676. bool SaveXML(File);
  1677. Node Clone(CreateMode = REPLICATED);
  1678. ScriptObject CreateScriptObject(ScriptFile, const String&, CreateMode = REPLICATED);
  1679. ScriptObject CreateScriptObject(const String&, const String&, CreateMode = REPLICATED);
  1680. ScriptObject GetScriptObject() const;
  1681. ScriptObject GetScriptObject(const String&) const;
  1682. // Properties:
  1683. /* (readonly) */
  1684. int refs;
  1685. /* (readonly) */
  1686. int weakRefs;
  1687. /* (readonly) */
  1688. ShortStringHash type;
  1689. /* (readonly) */
  1690. ShortStringHash baseType;
  1691. /* (readonly) */
  1692. String typeName;
  1693. /* (readonly) */
  1694. String category;
  1695. /* (readonly) */
  1696. uint numAttributes;
  1697. Array<Variant> attributes;
  1698. /* (readonly) */
  1699. Array<Variant> attributeDefaults;
  1700. /* (readonly) */
  1701. Array<AttributeInfo> attributeInfos;
  1702. bool temporary;
  1703. Vector3 position;
  1704. Quaternion rotation;
  1705. Vector3 direction;
  1706. Vector3 scale;
  1707. Vector3 worldPosition;
  1708. Quaternion worldRotation;
  1709. Vector3 worldDirection;
  1710. Vector3 worldScale;
  1711. /* (readonly) */
  1712. Matrix3x4 transform;
  1713. /* (readonly) */
  1714. Matrix3x4 worldTransform;
  1715. /* (readonly) */
  1716. uint id;
  1717. /* (readonly) */
  1718. uint numChildren;
  1719. /* (readonly) */
  1720. uint numAllChildren;
  1721. /* (readonly) */
  1722. Array<Node> children;
  1723. /* (readonly) */
  1724. uint numComponents;
  1725. /* (readonly) */
  1726. Array<Component> components;
  1727. String name;
  1728. Node parent;
  1729. /* (readonly) */
  1730. VariantMap vars;
  1731. bool enabled;
  1732. /* (readonly) */
  1733. Scene scene;
  1734. Connection owner;
  1735. /* (readonly) */
  1736. ScriptObject scriptObject;
  1737. };
  1738. class SmoothedTransform
  1739. {
  1740. // Methods:
  1741. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1742. bool Load(File, bool = false);
  1743. bool Save(File) const;
  1744. bool LoadXML(const XMLElement&, bool = false);
  1745. bool SaveXML(XMLElement&) const;
  1746. void ApplyAttributes();
  1747. bool SetAttribute(const String&, const Variant&);
  1748. void ResetToDefault();
  1749. void RemoveInstanceDefault();
  1750. Variant GetAttribute(const String&) const;
  1751. Variant GetAttributeDefault(const String&) const;
  1752. void Remove();
  1753. void MarkNetworkUpdate() const;
  1754. void Update(float, float);
  1755. void DrawDebugGeometry(DebugRenderer, bool);
  1756. // Properties:
  1757. /* (readonly) */
  1758. int refs;
  1759. /* (readonly) */
  1760. int weakRefs;
  1761. /* (readonly) */
  1762. ShortStringHash type;
  1763. /* (readonly) */
  1764. ShortStringHash baseType;
  1765. /* (readonly) */
  1766. String typeName;
  1767. /* (readonly) */
  1768. String category;
  1769. /* (readonly) */
  1770. uint numAttributes;
  1771. Array<Variant> attributes;
  1772. /* (readonly) */
  1773. Array<Variant> attributeDefaults;
  1774. /* (readonly) */
  1775. Array<AttributeInfo> attributeInfos;
  1776. bool temporary;
  1777. bool enabled;
  1778. /* (readonly) */
  1779. bool enabledEffective;
  1780. /* (readonly) */
  1781. uint id;
  1782. /* (readonly) */
  1783. Node node;
  1784. Vector3 targetPosition;
  1785. Quaternion targetRotation;
  1786. Vector3 targetWorldPosition;
  1787. Quaternion targetWorldRotation;
  1788. /* (readonly) */
  1789. bool inProgress;
  1790. };
  1791. class Scene
  1792. {
  1793. // Methods:
  1794. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1795. bool Load(File, bool = false);
  1796. bool Save(File) const;
  1797. bool LoadXML(const XMLElement&, bool = false);
  1798. bool SaveXML(XMLElement&) const;
  1799. void ApplyAttributes();
  1800. bool SetAttribute(const String&, const Variant&);
  1801. void ResetToDefault();
  1802. void RemoveInstanceDefault();
  1803. Variant GetAttribute(const String&) const;
  1804. Variant GetAttributeDefault(const String&) const;
  1805. void SetScale(float);
  1806. void SetTransform(const Vector3&, const Quaternion&);
  1807. void SetTransform(const Vector3&, const Quaternion&, float);
  1808. void SetTransform(const Vector3&, const Quaternion&, const Vector3&);
  1809. void SetWorldTransform(const Vector3&, const Quaternion&);
  1810. void SetWorldTransform(const Vector3&, const Quaternion&, float);
  1811. void SetWorldTransform(const Vector3&, const Quaternion&, const Vector3&);
  1812. void Translate(const Vector3&);
  1813. void TranslateRelative(const Vector3&);
  1814. void Rotate(const Quaternion&, bool = false);
  1815. void Pitch(float, bool = false);
  1816. void Yaw(float, bool = false);
  1817. void Roll(float, bool = false);
  1818. void LookAt(const Vector3&, const Vector3& = Vector3 ( 0 , 1 , 0 ));
  1819. void Scale(float);
  1820. void Scale(const Vector3&);
  1821. Node CreateChild(const String& = "", CreateMode = REPLICATED, uint = 0);
  1822. void AddChild(Node);
  1823. void RemoveChild(Node);
  1824. void RemoveAllChildren();
  1825. void RemoveChildren(bool, bool, bool);
  1826. void Remove();
  1827. Component CreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  1828. Component GetOrCreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  1829. void RemoveComponent(Component);
  1830. void RemoveComponent(const String&);
  1831. void RemoveAllComponents();
  1832. void RemoveComponents(bool, bool);
  1833. Array<Node> GetChildren(bool = false) const;
  1834. Array<Node> GetChildrenWithComponent(const String&, bool = false) const;
  1835. Array<Node> GetChildrenWithScript(bool = false) const;
  1836. Array<Node> GetChildrenWithScript(const String&, bool = false) const;
  1837. Node GetChild(const String&, bool = false) const;
  1838. Array<Component> GetComponents() const;
  1839. Array<Component> GetComponents(const String&, bool = false) const;
  1840. Component GetComponent(const String&) const;
  1841. bool HasComponent(const String&) const;
  1842. Vector3 LocalToWorld(const Vector3&) const;
  1843. Vector3 LocalToWorld(const Vector4&) const;
  1844. Vector3 WorldToLocal(const Vector3&) const;
  1845. Vector3 WorldToLocal(const Vector4&) const;
  1846. bool LoadXML(File);
  1847. bool SaveXML(File);
  1848. bool LoadAsync(File);
  1849. bool LoadAsyncXML(File);
  1850. void StopAsyncLoading();
  1851. Node Instantiate(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  1852. Node InstantiateXML(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  1853. Node InstantiateXML(XMLFile, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  1854. Node InstantiateXML(const XMLElement&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  1855. void Clear(bool = true, bool = true);
  1856. void AddRequiredPackageFile(PackageFile);
  1857. void ClearRequiredPackageFiles();
  1858. void RegisterVar(const String&);
  1859. void UnregisterVar(const String&);
  1860. void UnregisterAllVars(const String&);
  1861. Component GetComponent(uint);
  1862. Node GetNode(uint);
  1863. const String& GetVarName(ShortStringHash) const;
  1864. void Update(float);
  1865. ScriptObject CreateScriptObject(ScriptFile, const String&, CreateMode = REPLICATED);
  1866. ScriptObject CreateScriptObject(const String&, const String&, CreateMode = REPLICATED);
  1867. ScriptObject GetScriptObject() const;
  1868. ScriptObject GetScriptObject(const String&) const;
  1869. // Properties:
  1870. /* (readonly) */
  1871. int refs;
  1872. /* (readonly) */
  1873. int weakRefs;
  1874. /* (readonly) */
  1875. ShortStringHash type;
  1876. /* (readonly) */
  1877. ShortStringHash baseType;
  1878. /* (readonly) */
  1879. String typeName;
  1880. /* (readonly) */
  1881. String category;
  1882. /* (readonly) */
  1883. uint numAttributes;
  1884. Array<Variant> attributes;
  1885. /* (readonly) */
  1886. Array<Variant> attributeDefaults;
  1887. /* (readonly) */
  1888. Array<AttributeInfo> attributeInfos;
  1889. bool temporary;
  1890. Vector3 position;
  1891. Quaternion rotation;
  1892. Vector3 direction;
  1893. Vector3 scale;
  1894. Vector3 worldPosition;
  1895. Quaternion worldRotation;
  1896. Vector3 worldDirection;
  1897. Vector3 worldScale;
  1898. /* (readonly) */
  1899. Matrix3x4 transform;
  1900. /* (readonly) */
  1901. Matrix3x4 worldTransform;
  1902. /* (readonly) */
  1903. uint id;
  1904. /* (readonly) */
  1905. uint numChildren;
  1906. /* (readonly) */
  1907. uint numAllChildren;
  1908. /* (readonly) */
  1909. Array<Node> children;
  1910. /* (readonly) */
  1911. uint numComponents;
  1912. /* (readonly) */
  1913. Array<Component> components;
  1914. String name;
  1915. Node parent;
  1916. /* (readonly) */
  1917. VariantMap vars;
  1918. bool updateEnabled;
  1919. float timeScale;
  1920. float elapsedTime;
  1921. float smoothingConstant;
  1922. float snapThreshold;
  1923. /* (readonly) */
  1924. bool asyncLoading;
  1925. /* (readonly) */
  1926. float asyncProgress;
  1927. /* (readonly) */
  1928. uint checksum;
  1929. /* (readonly) */
  1930. String fileName;
  1931. /* (readonly) */
  1932. Array<PackageFile> requiredPackageFiles;
  1933. /* (readonly) */
  1934. DebugRenderer debugRenderer;
  1935. /* (readonly) */
  1936. Octree octree;
  1937. /* (readonly) */
  1938. PhysicsWorld physicsWorld;
  1939. /* (readonly) */
  1940. ScriptObject scriptObject;
  1941. };
  1942. class Bone
  1943. {
  1944. // Properties:
  1945. Node node;
  1946. String name;
  1947. Vector3 initialPosition;
  1948. Quaternion initialRotation;
  1949. Vector3 initialScale;
  1950. bool animated;
  1951. float radius;
  1952. BoundingBox boundingBox;
  1953. };
  1954. class Skeleton
  1955. {
  1956. // Methods:
  1957. void Reset();
  1958. Bone GetBone(const String&) const;
  1959. // Properties:
  1960. /* (readonly) */
  1961. Bone rootBone;
  1962. /* (readonly) */
  1963. uint numBones;
  1964. /* (readonly) */
  1965. Array<Bone> bones;
  1966. };
  1967. class DebugRenderer
  1968. {
  1969. // Methods:
  1970. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1971. bool Load(File, bool = false);
  1972. bool Save(File) const;
  1973. bool LoadXML(const XMLElement&, bool = false);
  1974. bool SaveXML(XMLElement&) const;
  1975. void ApplyAttributes();
  1976. bool SetAttribute(const String&, const Variant&);
  1977. void ResetToDefault();
  1978. void RemoveInstanceDefault();
  1979. Variant GetAttribute(const String&) const;
  1980. Variant GetAttributeDefault(const String&) const;
  1981. void Remove();
  1982. void MarkNetworkUpdate() const;
  1983. void AddLine(const Vector3&, const Vector3&, const Color&, bool = true);
  1984. void AddNode(Node, float = 1.0, bool = true);
  1985. void AddBoundingBox(const BoundingBox&, const Color&, bool = true);
  1986. void AddFrustum(const Frustum&, const Color&, bool = true);
  1987. void AddPolyhedron(const Polyhedron&, const Color&, bool = true);
  1988. void AddSphere(const Sphere&, const Color&, bool = true);
  1989. void AddSkeleton(Skeleton, const Color&, bool = true);
  1990. void DrawDebugGeometry(DebugRenderer, bool);
  1991. // Properties:
  1992. /* (readonly) */
  1993. int refs;
  1994. /* (readonly) */
  1995. int weakRefs;
  1996. /* (readonly) */
  1997. ShortStringHash type;
  1998. /* (readonly) */
  1999. ShortStringHash baseType;
  2000. /* (readonly) */
  2001. String typeName;
  2002. /* (readonly) */
  2003. String category;
  2004. /* (readonly) */
  2005. uint numAttributes;
  2006. Array<Variant> attributes;
  2007. /* (readonly) */
  2008. Array<Variant> attributeDefaults;
  2009. /* (readonly) */
  2010. Array<AttributeInfo> attributeInfos;
  2011. bool temporary;
  2012. bool enabled;
  2013. /* (readonly) */
  2014. bool enabledEffective;
  2015. /* (readonly) */
  2016. uint id;
  2017. /* (readonly) */
  2018. Node node;
  2019. };
  2020. class Camera
  2021. {
  2022. // Methods:
  2023. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2024. bool Load(File, bool = false);
  2025. bool Save(File) const;
  2026. bool LoadXML(const XMLElement&, bool = false);
  2027. bool SaveXML(XMLElement&) const;
  2028. void ApplyAttributes();
  2029. bool SetAttribute(const String&, const Variant&);
  2030. void ResetToDefault();
  2031. void RemoveInstanceDefault();
  2032. Variant GetAttribute(const String&) const;
  2033. Variant GetAttributeDefault(const String&) const;
  2034. void Remove();
  2035. void MarkNetworkUpdate() const;
  2036. void DrawDebugGeometry(DebugRenderer, bool);
  2037. void SetOrthoSize(const Vector2&);
  2038. Frustum GetSplitFrustum(float, float) const;
  2039. Ray GetScreenRay(float, float) const;
  2040. Vector2 WorldToScreenPoint(const Vector3&) const;
  2041. Vector3 ScreenToWorldPoint(const Vector3&) const;
  2042. float GetDistance(const Vector3&) const;
  2043. float GetDistanceSquared(const Vector3&) const;
  2044. // Properties:
  2045. /* (readonly) */
  2046. int refs;
  2047. /* (readonly) */
  2048. int weakRefs;
  2049. /* (readonly) */
  2050. ShortStringHash type;
  2051. /* (readonly) */
  2052. ShortStringHash baseType;
  2053. /* (readonly) */
  2054. String typeName;
  2055. /* (readonly) */
  2056. String category;
  2057. /* (readonly) */
  2058. uint numAttributes;
  2059. Array<Variant> attributes;
  2060. /* (readonly) */
  2061. Array<Variant> attributeDefaults;
  2062. /* (readonly) */
  2063. Array<AttributeInfo> attributeInfos;
  2064. bool temporary;
  2065. bool enabled;
  2066. /* (readonly) */
  2067. bool enabledEffective;
  2068. /* (readonly) */
  2069. uint id;
  2070. /* (readonly) */
  2071. Node node;
  2072. float nearClip;
  2073. float farClip;
  2074. float fov;
  2075. float orthoSize;
  2076. float aspectRatio;
  2077. float zoom;
  2078. float lodBias;
  2079. bool orthographic;
  2080. bool autoAspectRatio;
  2081. Vector2 projectionOffset;
  2082. uint viewMask;
  2083. uint viewOverrideFlags;
  2084. FillMode fillMode;
  2085. /* (readonly) */
  2086. Frustum frustum;
  2087. /* (readonly) */
  2088. Matrix4 projection;
  2089. /* (readonly) */
  2090. Matrix3x4 view;
  2091. /* (readonly) */
  2092. Frustum viewSpaceFrustum;
  2093. /* (readonly) */
  2094. float halfViewSize;
  2095. /* (readonly) */
  2096. Vector3 forwardVector;
  2097. /* (readonly) */
  2098. Vector3 rightVector;
  2099. /* (readonly) */
  2100. Vector3 upVector;
  2101. };
  2102. class RenderTargetInfo
  2103. {
  2104. // Properties:
  2105. String name;
  2106. String tag;
  2107. uint format;
  2108. IntVector2 size;
  2109. RenderTargetSizeMode sizeMode;
  2110. bool enabled;
  2111. bool filtered;
  2112. bool sRGB;
  2113. };
  2114. class RenderPathCommand
  2115. {
  2116. // Methods:
  2117. void RemoveShaderParameter(const String&);
  2118. // Properties:
  2119. Array<String> textureNames;
  2120. Array<Variant> shaderParameters;
  2121. uint numOutputs;
  2122. Array<String> outputNames;
  2123. String tag;
  2124. RenderCommandType type;
  2125. RenderCommandSortMode sortMode;
  2126. String pass;
  2127. String metadata;
  2128. uint clearFlags;
  2129. Color clearColor;
  2130. float clearDepth;
  2131. uint clearStencil;
  2132. bool enabled;
  2133. bool useFogColor;
  2134. bool markToStencil;
  2135. bool vertexLights;
  2136. bool useLitBase;
  2137. bool useScissor;
  2138. String vertexShaderName;
  2139. String pixelShaderName;
  2140. };
  2141. class RenderPath
  2142. {
  2143. // Methods:
  2144. RenderPath Clone();
  2145. bool Load(XMLFile);
  2146. bool Append(XMLFile);
  2147. void SetEnabled(const String&, bool);
  2148. void ToggleEnabled(const String&);
  2149. void AddRenderTarget(const RenderTargetInfo&);
  2150. void RemoveRenderTarget(uint);
  2151. void RemoveRenderTarget(const String&);
  2152. void RemoveRenderTargts(const String&);
  2153. void AddCommand(const RenderPathCommand&);
  2154. void InsertCommand(uint, const RenderPathCommand&);
  2155. void RemoveCommand(uint);
  2156. void RemoveCommands(const String&);
  2157. // Properties:
  2158. /* (readonly) */
  2159. int refs;
  2160. /* (readonly) */
  2161. int weakRefs;
  2162. /* (readonly) */
  2163. uint numRenderTargets;
  2164. Array<RenderTargetInfo> renderTargets;
  2165. /* (readonly) */
  2166. uint numCommands;
  2167. Array<RenderPathCommand> commands;
  2168. Array<Variant> shaderParameters;
  2169. };
  2170. class Texture
  2171. {
  2172. // Methods:
  2173. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2174. bool Load(File);
  2175. bool Save(File) const;
  2176. void SetNumLevels(uint);
  2177. void ClearDataLost();
  2178. // Properties:
  2179. /* (readonly) */
  2180. int refs;
  2181. /* (readonly) */
  2182. int weakRefs;
  2183. /* (readonly) */
  2184. ShortStringHash type;
  2185. /* (readonly) */
  2186. ShortStringHash baseType;
  2187. /* (readonly) */
  2188. String typeName;
  2189. /* (readonly) */
  2190. String category;
  2191. String name;
  2192. /* (readonly) */
  2193. uint memoryUse;
  2194. /* (readonly) */
  2195. uint useTimer;
  2196. /* (readonly) */
  2197. TextureUsage usage;
  2198. /* (readonly) */
  2199. uint format;
  2200. /* (readonly) */
  2201. bool compressed;
  2202. /* (readonly) */
  2203. uint levels;
  2204. /* (readonly) */
  2205. int width;
  2206. /* (readonly) */
  2207. int height;
  2208. /* (readonly) */
  2209. Array<int> levelWidth;
  2210. /* (readonly) */
  2211. Array<int> levelHeight;
  2212. TextureFilterMode filterMode;
  2213. Array<TextureAddressMode> addressMode;
  2214. Color borderColor;
  2215. bool sRGB;
  2216. Texture backupTexture;
  2217. Array<int> mipsToSkip;
  2218. /* (readonly) */
  2219. bool dataLost;
  2220. };
  2221. class Viewport
  2222. {
  2223. // Methods:
  2224. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2225. void SetRenderPath(XMLFile);
  2226. // Properties:
  2227. /* (readonly) */
  2228. int refs;
  2229. /* (readonly) */
  2230. int weakRefs;
  2231. /* (readonly) */
  2232. ShortStringHash type;
  2233. /* (readonly) */
  2234. ShortStringHash baseType;
  2235. /* (readonly) */
  2236. String typeName;
  2237. /* (readonly) */
  2238. String category;
  2239. Scene scene;
  2240. Camera camera;
  2241. RenderPath renderPath;
  2242. IntRect rect;
  2243. };
  2244. class RenderSurface
  2245. {
  2246. // Methods:
  2247. void QueueUpdate();
  2248. // Properties:
  2249. /* (readonly) */
  2250. Texture parentTexture;
  2251. /* (readonly) */
  2252. int width;
  2253. /* (readonly) */
  2254. int height;
  2255. /* (readonly) */
  2256. TextureUsage usage;
  2257. uint numViewports;
  2258. Array<Viewport> viewports;
  2259. RenderSurfaceUpdateMode updateMode;
  2260. RenderSurface linkedRenderTarget;
  2261. RenderSurface linkedDepthStencil;
  2262. };
  2263. class Texture2D
  2264. {
  2265. // Methods:
  2266. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2267. bool Load(File);
  2268. bool Save(File) const;
  2269. void SetNumLevels(uint);
  2270. void ClearDataLost();
  2271. bool SetSize(int, int, uint, TextureUsage = TEXTURE_STATIC);
  2272. bool Load(Image, bool = false);
  2273. // Properties:
  2274. /* (readonly) */
  2275. int refs;
  2276. /* (readonly) */
  2277. int weakRefs;
  2278. /* (readonly) */
  2279. ShortStringHash type;
  2280. /* (readonly) */
  2281. ShortStringHash baseType;
  2282. /* (readonly) */
  2283. String typeName;
  2284. /* (readonly) */
  2285. String category;
  2286. String name;
  2287. /* (readonly) */
  2288. uint memoryUse;
  2289. /* (readonly) */
  2290. uint useTimer;
  2291. /* (readonly) */
  2292. TextureUsage usage;
  2293. /* (readonly) */
  2294. uint format;
  2295. /* (readonly) */
  2296. bool compressed;
  2297. /* (readonly) */
  2298. uint levels;
  2299. /* (readonly) */
  2300. int width;
  2301. /* (readonly) */
  2302. int height;
  2303. /* (readonly) */
  2304. Array<int> levelWidth;
  2305. /* (readonly) */
  2306. Array<int> levelHeight;
  2307. TextureFilterMode filterMode;
  2308. Array<TextureAddressMode> addressMode;
  2309. Color borderColor;
  2310. bool sRGB;
  2311. Texture backupTexture;
  2312. Array<int> mipsToSkip;
  2313. /* (readonly) */
  2314. bool dataLost;
  2315. /* (readonly) */
  2316. RenderSurface renderSurface;
  2317. };
  2318. class TextureCube
  2319. {
  2320. // Methods:
  2321. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2322. bool Load(File);
  2323. bool Save(File) const;
  2324. void SetNumLevels(uint);
  2325. void ClearDataLost();
  2326. bool SetSize(int, uint, TextureUsage = TEXTURE_STATIC);
  2327. bool Load(CubeMapFace, Image, bool = false);
  2328. // Properties:
  2329. /* (readonly) */
  2330. int refs;
  2331. /* (readonly) */
  2332. int weakRefs;
  2333. /* (readonly) */
  2334. ShortStringHash type;
  2335. /* (readonly) */
  2336. ShortStringHash baseType;
  2337. /* (readonly) */
  2338. String typeName;
  2339. /* (readonly) */
  2340. String category;
  2341. String name;
  2342. /* (readonly) */
  2343. uint memoryUse;
  2344. /* (readonly) */
  2345. uint useTimer;
  2346. /* (readonly) */
  2347. TextureUsage usage;
  2348. /* (readonly) */
  2349. uint format;
  2350. /* (readonly) */
  2351. bool compressed;
  2352. /* (readonly) */
  2353. uint levels;
  2354. /* (readonly) */
  2355. int width;
  2356. /* (readonly) */
  2357. int height;
  2358. /* (readonly) */
  2359. Array<int> levelWidth;
  2360. /* (readonly) */
  2361. Array<int> levelHeight;
  2362. TextureFilterMode filterMode;
  2363. Array<TextureAddressMode> addressMode;
  2364. Color borderColor;
  2365. bool sRGB;
  2366. Texture backupTexture;
  2367. Array<int> mipsToSkip;
  2368. /* (readonly) */
  2369. bool dataLost;
  2370. /* (readonly) */
  2371. Array<RenderSurface> renderSurfaces;
  2372. };
  2373. class BiasParameters
  2374. {
  2375. // Properties:
  2376. float constantBias;
  2377. float slopeScaledBias;
  2378. };
  2379. class Pass
  2380. {
  2381. // Properties:
  2382. /* (readonly) */
  2383. int refs;
  2384. /* (readonly) */
  2385. int weakRefs;
  2386. BlendMode blendMode;
  2387. CompareMode depthTestMode;
  2388. PassLightingMode lightingMode;
  2389. bool depthWrite;
  2390. bool alphaMask;
  2391. String vertexShader;
  2392. String pixelShader;
  2393. };
  2394. class Technique
  2395. {
  2396. // Methods:
  2397. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2398. bool Load(File);
  2399. bool Save(File) const;
  2400. Pass CreatePass(StringHash);
  2401. void RemovePass(StringHash);
  2402. bool HasPass(StringHash) const;
  2403. // Properties:
  2404. /* (readonly) */
  2405. int refs;
  2406. /* (readonly) */
  2407. int weakRefs;
  2408. /* (readonly) */
  2409. ShortStringHash type;
  2410. /* (readonly) */
  2411. ShortStringHash baseType;
  2412. /* (readonly) */
  2413. String typeName;
  2414. /* (readonly) */
  2415. String category;
  2416. String name;
  2417. /* (readonly) */
  2418. uint memoryUse;
  2419. /* (readonly) */
  2420. uint useTimer;
  2421. bool sm3;
  2422. /* (readonly) */
  2423. Array<Pass> passes;
  2424. };
  2425. class TechniqueEntry
  2426. {
  2427. // Properties:
  2428. Technique technique;
  2429. int qualityLevel;
  2430. float lodDistance;
  2431. };
  2432. class Material
  2433. {
  2434. // Methods:
  2435. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2436. bool Load(File);
  2437. bool Save(File) const;
  2438. bool Load(const XMLElement&);
  2439. bool Save(XMLElement&) const;
  2440. void SetTechnique(uint, Technique, uint = 0, float = 0.0);
  2441. void SetUVTransform(const Vector2&, float, const Vector2&);
  2442. void SetUVTransform(const Vector2&, float, float);
  2443. void RemoveShaderParameter(const String&);
  2444. void SortTechniques();
  2445. Material Clone(const String& = String ( )) const;
  2446. // Properties:
  2447. /* (readonly) */
  2448. int refs;
  2449. /* (readonly) */
  2450. int weakRefs;
  2451. /* (readonly) */
  2452. ShortStringHash type;
  2453. /* (readonly) */
  2454. ShortStringHash baseType;
  2455. /* (readonly) */
  2456. String typeName;
  2457. /* (readonly) */
  2458. String category;
  2459. String name;
  2460. /* (readonly) */
  2461. uint memoryUse;
  2462. /* (readonly) */
  2463. uint useTimer;
  2464. uint numTechniques;
  2465. /* (readonly) */
  2466. Array<Technique> techniques;
  2467. /* (readonly) */
  2468. Array<TechniqueEntry> techniqueEntries;
  2469. Array<Variant> shaderParameters;
  2470. /* (readonly) */
  2471. Array<String> shaderParameterNames;
  2472. Array<Texture> textures;
  2473. /* (readonly) */
  2474. bool occlusion;
  2475. CullMode cullMode;
  2476. CullMode shadowCullMode;
  2477. BiasParameters depthBias;
  2478. };
  2479. class Model
  2480. {
  2481. // Methods:
  2482. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2483. bool Load(File);
  2484. bool Save(File) const;
  2485. // Properties:
  2486. /* (readonly) */
  2487. int refs;
  2488. /* (readonly) */
  2489. int weakRefs;
  2490. /* (readonly) */
  2491. ShortStringHash type;
  2492. /* (readonly) */
  2493. ShortStringHash baseType;
  2494. /* (readonly) */
  2495. String typeName;
  2496. /* (readonly) */
  2497. String category;
  2498. String name;
  2499. /* (readonly) */
  2500. uint memoryUse;
  2501. /* (readonly) */
  2502. uint useTimer;
  2503. /* (readonly) */
  2504. BoundingBox boundingBox;
  2505. /* (readonly) */
  2506. Skeleton skeleton;
  2507. /* (readonly) */
  2508. uint numGeometries;
  2509. /* (readonly) */
  2510. Array<uint> numGeometryLodLevels;
  2511. /* (readonly) */
  2512. uint numMorphs;
  2513. };
  2514. class AnimationTriggerPoint
  2515. {
  2516. // Properties:
  2517. float time;
  2518. Variant data;
  2519. };
  2520. class Animation
  2521. {
  2522. // Methods:
  2523. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2524. bool Load(File);
  2525. bool Save(File) const;
  2526. void AddTrigger(float, bool, const Variant&);
  2527. void RemoveTrigger(uint);
  2528. void RemoveAllTriggers();
  2529. // Properties:
  2530. /* (readonly) */
  2531. int refs;
  2532. /* (readonly) */
  2533. int weakRefs;
  2534. /* (readonly) */
  2535. ShortStringHash type;
  2536. /* (readonly) */
  2537. ShortStringHash baseType;
  2538. /* (readonly) */
  2539. String typeName;
  2540. /* (readonly) */
  2541. String category;
  2542. String name;
  2543. /* (readonly) */
  2544. uint memoryUse;
  2545. /* (readonly) */
  2546. uint useTimer;
  2547. /* (readonly) */
  2548. String animationName;
  2549. /* (readonly) */
  2550. float length;
  2551. /* (readonly) */
  2552. uint numTracks;
  2553. uint numTriggers;
  2554. /* (readonly) */
  2555. Array<AnimationTriggerPoint> triggers;
  2556. };
  2557. class Drawable
  2558. {
  2559. // Methods:
  2560. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2561. bool Load(File, bool = false);
  2562. bool Save(File) const;
  2563. bool LoadXML(const XMLElement&, bool = false);
  2564. bool SaveXML(XMLElement&) const;
  2565. void ApplyAttributes();
  2566. bool SetAttribute(const String&, const Variant&);
  2567. void ResetToDefault();
  2568. void RemoveInstanceDefault();
  2569. Variant GetAttribute(const String&) const;
  2570. Variant GetAttributeDefault(const String&) const;
  2571. void Remove();
  2572. void MarkNetworkUpdate() const;
  2573. void DrawDebugGeometry(DebugRenderer, bool);
  2574. // Properties:
  2575. /* (readonly) */
  2576. int refs;
  2577. /* (readonly) */
  2578. int weakRefs;
  2579. /* (readonly) */
  2580. ShortStringHash type;
  2581. /* (readonly) */
  2582. ShortStringHash baseType;
  2583. /* (readonly) */
  2584. String typeName;
  2585. /* (readonly) */
  2586. String category;
  2587. /* (readonly) */
  2588. uint numAttributes;
  2589. Array<Variant> attributes;
  2590. /* (readonly) */
  2591. Array<Variant> attributeDefaults;
  2592. /* (readonly) */
  2593. Array<AttributeInfo> attributeInfos;
  2594. bool temporary;
  2595. bool enabled;
  2596. /* (readonly) */
  2597. bool enabledEffective;
  2598. /* (readonly) */
  2599. uint id;
  2600. /* (readonly) */
  2601. Node node;
  2602. /* (readonly) */
  2603. bool inView;
  2604. bool castShadows;
  2605. bool occluder;
  2606. bool occludee;
  2607. float drawDistance;
  2608. float shadowDistance;
  2609. float lodBias;
  2610. uint viewMask;
  2611. uint lightMask;
  2612. uint shadowMask;
  2613. uint zoneMask;
  2614. uint maxLights;
  2615. /* (readonly) */
  2616. BoundingBox boundingBox;
  2617. /* (readonly) */
  2618. BoundingBox worldBoundingBox;
  2619. };
  2620. class CascadeParameters
  2621. {
  2622. // Properties:
  2623. float split1;
  2624. float split2;
  2625. float split3;
  2626. float split4;
  2627. float fadeStart;
  2628. float biasAutoAdjust;
  2629. };
  2630. class FocusParameters
  2631. {
  2632. // Properties:
  2633. bool focus;
  2634. bool nonUniform;
  2635. bool autoSize;
  2636. float quantize;
  2637. float minView;
  2638. };
  2639. class Light
  2640. {
  2641. // Methods:
  2642. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2643. bool Load(File, bool = false);
  2644. bool Save(File) const;
  2645. bool LoadXML(const XMLElement&, bool = false);
  2646. bool SaveXML(XMLElement&) const;
  2647. void ApplyAttributes();
  2648. bool SetAttribute(const String&, const Variant&);
  2649. void ResetToDefault();
  2650. void RemoveInstanceDefault();
  2651. Variant GetAttribute(const String&) const;
  2652. Variant GetAttributeDefault(const String&) const;
  2653. void Remove();
  2654. void MarkNetworkUpdate() const;
  2655. void DrawDebugGeometry(DebugRenderer, bool);
  2656. // Properties:
  2657. /* (readonly) */
  2658. int refs;
  2659. /* (readonly) */
  2660. int weakRefs;
  2661. /* (readonly) */
  2662. ShortStringHash type;
  2663. /* (readonly) */
  2664. ShortStringHash baseType;
  2665. /* (readonly) */
  2666. String typeName;
  2667. /* (readonly) */
  2668. String category;
  2669. /* (readonly) */
  2670. uint numAttributes;
  2671. Array<Variant> attributes;
  2672. /* (readonly) */
  2673. Array<Variant> attributeDefaults;
  2674. /* (readonly) */
  2675. Array<AttributeInfo> attributeInfos;
  2676. bool temporary;
  2677. bool enabled;
  2678. /* (readonly) */
  2679. bool enabledEffective;
  2680. /* (readonly) */
  2681. uint id;
  2682. /* (readonly) */
  2683. Node node;
  2684. /* (readonly) */
  2685. bool inView;
  2686. bool castShadows;
  2687. bool occluder;
  2688. bool occludee;
  2689. float drawDistance;
  2690. float shadowDistance;
  2691. float lodBias;
  2692. uint viewMask;
  2693. uint lightMask;
  2694. uint shadowMask;
  2695. uint zoneMask;
  2696. uint maxLights;
  2697. /* (readonly) */
  2698. BoundingBox boundingBox;
  2699. /* (readonly) */
  2700. BoundingBox worldBoundingBox;
  2701. LightType lightType;
  2702. bool perVertex;
  2703. Color color;
  2704. float specularIntensity;
  2705. float range;
  2706. float fov;
  2707. float aspectRatio;
  2708. float fadeDistance;
  2709. BiasParameters shadowBias;
  2710. CascadeParameters shadowCascade;
  2711. FocusParameters shadowFocus;
  2712. float shadowFadeDistance;
  2713. float shadowIntensity;
  2714. float shadowResolution;
  2715. float shadowNearFarRatio;
  2716. Texture rampTexture;
  2717. Texture shapeTexture;
  2718. /* (readonly) */
  2719. Frustum frustum;
  2720. };
  2721. class Zone
  2722. {
  2723. // Methods:
  2724. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2725. bool Load(File, bool = false);
  2726. bool Save(File) const;
  2727. bool LoadXML(const XMLElement&, bool = false);
  2728. bool SaveXML(XMLElement&) const;
  2729. void ApplyAttributes();
  2730. bool SetAttribute(const String&, const Variant&);
  2731. void ResetToDefault();
  2732. void RemoveInstanceDefault();
  2733. Variant GetAttribute(const String&) const;
  2734. Variant GetAttributeDefault(const String&) const;
  2735. void Remove();
  2736. void MarkNetworkUpdate() const;
  2737. void DrawDebugGeometry(DebugRenderer, bool);
  2738. // Properties:
  2739. /* (readonly) */
  2740. int refs;
  2741. /* (readonly) */
  2742. int weakRefs;
  2743. /* (readonly) */
  2744. ShortStringHash type;
  2745. /* (readonly) */
  2746. ShortStringHash baseType;
  2747. /* (readonly) */
  2748. String typeName;
  2749. /* (readonly) */
  2750. String category;
  2751. /* (readonly) */
  2752. uint numAttributes;
  2753. Array<Variant> attributes;
  2754. /* (readonly) */
  2755. Array<Variant> attributeDefaults;
  2756. /* (readonly) */
  2757. Array<AttributeInfo> attributeInfos;
  2758. bool temporary;
  2759. bool enabled;
  2760. /* (readonly) */
  2761. bool enabledEffective;
  2762. /* (readonly) */
  2763. uint id;
  2764. /* (readonly) */
  2765. Node node;
  2766. /* (readonly) */
  2767. bool inView;
  2768. bool castShadows;
  2769. bool occluder;
  2770. bool occludee;
  2771. float drawDistance;
  2772. float shadowDistance;
  2773. float lodBias;
  2774. uint viewMask;
  2775. uint lightMask;
  2776. uint shadowMask;
  2777. uint zoneMask;
  2778. uint maxLights;
  2779. BoundingBox boundingBox;
  2780. /* (readonly) */
  2781. BoundingBox worldBoundingBox;
  2782. /* (readonly) */
  2783. Matrix3x4 inverseWorldTransform;
  2784. Color ambientColor;
  2785. /* (readonly) */
  2786. Color ambientStartColor;
  2787. /* (readonly) */
  2788. Color ambientEndColor;
  2789. Color fogColor;
  2790. float fogStart;
  2791. float fogEnd;
  2792. int priority;
  2793. bool override;
  2794. bool ambientGradient;
  2795. };
  2796. class StaticModel
  2797. {
  2798. // Methods:
  2799. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2800. bool Load(File, bool = false);
  2801. bool Save(File) const;
  2802. bool LoadXML(const XMLElement&, bool = false);
  2803. bool SaveXML(XMLElement&) const;
  2804. void ApplyAttributes();
  2805. bool SetAttribute(const String&, const Variant&);
  2806. void ResetToDefault();
  2807. void RemoveInstanceDefault();
  2808. Variant GetAttribute(const String&) const;
  2809. Variant GetAttributeDefault(const String&) const;
  2810. void Remove();
  2811. void MarkNetworkUpdate() const;
  2812. void DrawDebugGeometry(DebugRenderer, bool);
  2813. void ApplyMaterialList(const String& = String ( ));
  2814. bool IsInside(const Vector3&) const;
  2815. bool IsInsideLocal(const Vector3&) const;
  2816. // Properties:
  2817. /* (readonly) */
  2818. int refs;
  2819. /* (readonly) */
  2820. int weakRefs;
  2821. /* (readonly) */
  2822. ShortStringHash type;
  2823. /* (readonly) */
  2824. ShortStringHash baseType;
  2825. /* (readonly) */
  2826. String typeName;
  2827. /* (readonly) */
  2828. String category;
  2829. /* (readonly) */
  2830. uint numAttributes;
  2831. Array<Variant> attributes;
  2832. /* (readonly) */
  2833. Array<Variant> attributeDefaults;
  2834. /* (readonly) */
  2835. Array<AttributeInfo> attributeInfos;
  2836. bool temporary;
  2837. bool enabled;
  2838. /* (readonly) */
  2839. bool enabledEffective;
  2840. /* (readonly) */
  2841. uint id;
  2842. /* (readonly) */
  2843. Node node;
  2844. /* (readonly) */
  2845. bool inView;
  2846. bool castShadows;
  2847. bool occluder;
  2848. bool occludee;
  2849. float drawDistance;
  2850. float shadowDistance;
  2851. float lodBias;
  2852. uint viewMask;
  2853. uint lightMask;
  2854. uint shadowMask;
  2855. uint zoneMask;
  2856. uint maxLights;
  2857. /* (readonly) */
  2858. BoundingBox boundingBox;
  2859. /* (readonly) */
  2860. BoundingBox worldBoundingBox;
  2861. Model model;
  2862. /* (writeonly) */
  2863. Material material;
  2864. Array<Material> materials;
  2865. /* (readonly) */
  2866. uint numGeometries;
  2867. uint occlusionLodLevel;
  2868. };
  2869. class StaticModelGroup
  2870. {
  2871. // Methods:
  2872. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2873. bool Load(File, bool = false);
  2874. bool Save(File) const;
  2875. bool LoadXML(const XMLElement&, bool = false);
  2876. bool SaveXML(XMLElement&) const;
  2877. void ApplyAttributes();
  2878. bool SetAttribute(const String&, const Variant&);
  2879. void ResetToDefault();
  2880. void RemoveInstanceDefault();
  2881. Variant GetAttribute(const String&) const;
  2882. Variant GetAttributeDefault(const String&) const;
  2883. void Remove();
  2884. void MarkNetworkUpdate() const;
  2885. void DrawDebugGeometry(DebugRenderer, bool);
  2886. void ApplyMaterialList(const String& = String ( ));
  2887. void AddInstanceNode(Node);
  2888. void RemoveInstanceNode(Node);
  2889. void RemoveAllInstanceNodes();
  2890. // Properties:
  2891. /* (readonly) */
  2892. int refs;
  2893. /* (readonly) */
  2894. int weakRefs;
  2895. /* (readonly) */
  2896. ShortStringHash type;
  2897. /* (readonly) */
  2898. ShortStringHash baseType;
  2899. /* (readonly) */
  2900. String typeName;
  2901. /* (readonly) */
  2902. String category;
  2903. /* (readonly) */
  2904. uint numAttributes;
  2905. Array<Variant> attributes;
  2906. /* (readonly) */
  2907. Array<Variant> attributeDefaults;
  2908. /* (readonly) */
  2909. Array<AttributeInfo> attributeInfos;
  2910. bool temporary;
  2911. bool enabled;
  2912. /* (readonly) */
  2913. bool enabledEffective;
  2914. /* (readonly) */
  2915. uint id;
  2916. /* (readonly) */
  2917. Node node;
  2918. /* (readonly) */
  2919. bool inView;
  2920. bool castShadows;
  2921. bool occluder;
  2922. bool occludee;
  2923. float drawDistance;
  2924. float shadowDistance;
  2925. float lodBias;
  2926. uint viewMask;
  2927. uint lightMask;
  2928. uint shadowMask;
  2929. uint zoneMask;
  2930. uint maxLights;
  2931. /* (readonly) */
  2932. BoundingBox boundingBox;
  2933. /* (readonly) */
  2934. BoundingBox worldBoundingBox;
  2935. Model model;
  2936. /* (writeonly) */
  2937. Material material;
  2938. Array<Material> materials;
  2939. /* (readonly) */
  2940. uint numGeometries;
  2941. /* (readonly) */
  2942. Zone zone;
  2943. uint occlusionLodLevel;
  2944. /* (readonly) */
  2945. uint numInstanceNodes;
  2946. /* (readonly) */
  2947. Array<Node> instanceNodes;
  2948. };
  2949. class Skybox
  2950. {
  2951. // Methods:
  2952. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2953. bool Load(File, bool = false);
  2954. bool Save(File) const;
  2955. bool LoadXML(const XMLElement&, bool = false);
  2956. bool SaveXML(XMLElement&) const;
  2957. void ApplyAttributes();
  2958. bool SetAttribute(const String&, const Variant&);
  2959. void ResetToDefault();
  2960. void RemoveInstanceDefault();
  2961. Variant GetAttribute(const String&) const;
  2962. Variant GetAttributeDefault(const String&) const;
  2963. void Remove();
  2964. void MarkNetworkUpdate() const;
  2965. void DrawDebugGeometry(DebugRenderer, bool);
  2966. void ApplyMaterialList(const String& = String ( ));
  2967. // Properties:
  2968. /* (readonly) */
  2969. int refs;
  2970. /* (readonly) */
  2971. int weakRefs;
  2972. /* (readonly) */
  2973. ShortStringHash type;
  2974. /* (readonly) */
  2975. ShortStringHash baseType;
  2976. /* (readonly) */
  2977. String typeName;
  2978. /* (readonly) */
  2979. String category;
  2980. /* (readonly) */
  2981. uint numAttributes;
  2982. Array<Variant> attributes;
  2983. /* (readonly) */
  2984. Array<Variant> attributeDefaults;
  2985. /* (readonly) */
  2986. Array<AttributeInfo> attributeInfos;
  2987. bool temporary;
  2988. bool enabled;
  2989. /* (readonly) */
  2990. bool enabledEffective;
  2991. /* (readonly) */
  2992. uint id;
  2993. /* (readonly) */
  2994. Node node;
  2995. /* (readonly) */
  2996. bool inView;
  2997. bool castShadows;
  2998. bool occluder;
  2999. bool occludee;
  3000. float drawDistance;
  3001. float shadowDistance;
  3002. float lodBias;
  3003. uint viewMask;
  3004. uint lightMask;
  3005. uint shadowMask;
  3006. uint zoneMask;
  3007. uint maxLights;
  3008. /* (readonly) */
  3009. BoundingBox boundingBox;
  3010. /* (readonly) */
  3011. BoundingBox worldBoundingBox;
  3012. Model model;
  3013. /* (writeonly) */
  3014. Material material;
  3015. Array<Material> materials;
  3016. /* (readonly) */
  3017. uint numGeometries;
  3018. /* (readonly) */
  3019. Zone zone;
  3020. };
  3021. class AnimationState
  3022. {
  3023. // Methods:
  3024. void AddWeight(float);
  3025. void AddTime(float);
  3026. void Apply();
  3027. void SetBoneWeight(uint, float, bool = false);
  3028. void SetBoneWeight(const String&, float, bool = false);
  3029. void SetBoneWeight(StringHash, float, bool = false);
  3030. float GetBoneWeight(uint) const;
  3031. float GetBoneWeight(StringHash) const;
  3032. uint GetTrackIndex(const String&) const;
  3033. uint GetTrackIndex(StringHash) const;
  3034. // Properties:
  3035. /* (readonly) */
  3036. int refs;
  3037. /* (readonly) */
  3038. int weakRefs;
  3039. Bone startBone;
  3040. bool looped;
  3041. float weight;
  3042. float time;
  3043. uint8 layer;
  3044. /* (readonly) */
  3045. Animation animation;
  3046. /* (readonly) */
  3047. AnimatedModel model;
  3048. /* (readonly) */
  3049. Node node;
  3050. /* (readonly) */
  3051. bool enabled;
  3052. /* (readonly) */
  3053. float length;
  3054. Array<float> boneWeights;
  3055. };
  3056. class AnimatedModel
  3057. {
  3058. // Methods:
  3059. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3060. bool Load(File, bool = false);
  3061. bool Save(File) const;
  3062. bool LoadXML(const XMLElement&, bool = false);
  3063. bool SaveXML(XMLElement&) const;
  3064. void ApplyAttributes();
  3065. bool SetAttribute(const String&, const Variant&);
  3066. void ResetToDefault();
  3067. void RemoveInstanceDefault();
  3068. Variant GetAttribute(const String&) const;
  3069. Variant GetAttributeDefault(const String&) const;
  3070. void Remove();
  3071. void MarkNetworkUpdate() const;
  3072. void DrawDebugGeometry(DebugRenderer, bool);
  3073. void ApplyMaterialList(const String& = String ( ));
  3074. AnimationState AddAnimationState(Animation);
  3075. void RemoveAnimationState(Animation);
  3076. void RemoveAnimationState(const String&);
  3077. void RemoveAnimationState(AnimationState);
  3078. void RemoveAnimationState(uint);
  3079. void RemoveAllAnimationStates();
  3080. void SetMorphWeight(uint, float);
  3081. void ResetMorphWeights();
  3082. float GetMorphWeight(uint) const;
  3083. AnimationState GetAnimationState(Animation) const;
  3084. AnimationState GetAnimationState(uint) const;
  3085. // Properties:
  3086. /* (readonly) */
  3087. int refs;
  3088. /* (readonly) */
  3089. int weakRefs;
  3090. /* (readonly) */
  3091. ShortStringHash type;
  3092. /* (readonly) */
  3093. ShortStringHash baseType;
  3094. /* (readonly) */
  3095. String typeName;
  3096. /* (readonly) */
  3097. String category;
  3098. /* (readonly) */
  3099. uint numAttributes;
  3100. Array<Variant> attributes;
  3101. /* (readonly) */
  3102. Array<Variant> attributeDefaults;
  3103. /* (readonly) */
  3104. Array<AttributeInfo> attributeInfos;
  3105. bool temporary;
  3106. bool enabled;
  3107. /* (readonly) */
  3108. bool enabledEffective;
  3109. /* (readonly) */
  3110. uint id;
  3111. /* (readonly) */
  3112. Node node;
  3113. /* (readonly) */
  3114. bool inView;
  3115. bool castShadows;
  3116. bool occluder;
  3117. bool occludee;
  3118. float drawDistance;
  3119. float shadowDistance;
  3120. float lodBias;
  3121. uint viewMask;
  3122. uint lightMask;
  3123. uint shadowMask;
  3124. uint zoneMask;
  3125. uint maxLights;
  3126. /* (readonly) */
  3127. BoundingBox boundingBox;
  3128. /* (readonly) */
  3129. BoundingBox worldBoundingBox;
  3130. Model model;
  3131. /* (writeonly) */
  3132. Material material;
  3133. Array<Material> materials;
  3134. /* (readonly) */
  3135. uint numGeometries;
  3136. /* (readonly) */
  3137. Zone zone;
  3138. float animationLodBias;
  3139. bool updateInvisible;
  3140. /* (readonly) */
  3141. Skeleton skeleton;
  3142. /* (readonly) */
  3143. uint numAnimationStates;
  3144. /* (readonly) */
  3145. Array<AnimationState> animationStates;
  3146. /* (readonly) */
  3147. uint numMorphs;
  3148. /* (readonly) */
  3149. Array<String> morphNames;
  3150. Array<float> morphWeights;
  3151. };
  3152. class AnimationController
  3153. {
  3154. // Methods:
  3155. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3156. bool Load(File, bool = false);
  3157. bool Save(File) const;
  3158. bool LoadXML(const XMLElement&, bool = false);
  3159. bool SaveXML(XMLElement&) const;
  3160. void ApplyAttributes();
  3161. bool SetAttribute(const String&, const Variant&);
  3162. void ResetToDefault();
  3163. void RemoveInstanceDefault();
  3164. Variant GetAttribute(const String&) const;
  3165. Variant GetAttributeDefault(const String&) const;
  3166. void Remove();
  3167. void MarkNetworkUpdate() const;
  3168. void DrawDebugGeometry(DebugRenderer, bool);
  3169. bool Play(const String&, uint8, bool, float = 0.0f);
  3170. bool PlayExclusive(const String&, uint8, bool, float = 0.0f);
  3171. void Stop(const String&, float = 0.0f);
  3172. void StopLayer(uint8, float = 0.0f);
  3173. void StopAll(float = 0.0f);
  3174. bool Fade(const String&, float, float);
  3175. bool FadeOthers(const String&, float, float);
  3176. bool SetLayer(const String&, uint8);
  3177. bool SetStartBone(const String&, const String&);
  3178. bool SetTime(const String&, float);
  3179. bool SetWeight(const String&, float);
  3180. bool SetLooped(const String&, bool);
  3181. bool SetSpeed(const String&, float);
  3182. bool SetAutoFade(const String&, float);
  3183. bool IsPlaying(const String&) const;
  3184. bool IsFadingIn(const String&) const;
  3185. bool IsFadingOut(const String&) const;
  3186. uint8 GetLayer(const String&) const;
  3187. const String& GetStartBone(const String&) const;
  3188. float GetTime(const String&) const;
  3189. float GetWeight(const String&) const;
  3190. bool GetLooped(const String&) const;
  3191. float GetLength(const String&) const;
  3192. float GetSpeed(const String&) const;
  3193. float GetAutoFade(const String&) const;
  3194. float GetFadeTarget(const String&) const;
  3195. AnimationState GetAnimationState(const String&) const;
  3196. AnimationState GetAnimationState(StringHash) const;
  3197. // Properties:
  3198. /* (readonly) */
  3199. int refs;
  3200. /* (readonly) */
  3201. int weakRefs;
  3202. /* (readonly) */
  3203. ShortStringHash type;
  3204. /* (readonly) */
  3205. ShortStringHash baseType;
  3206. /* (readonly) */
  3207. String typeName;
  3208. /* (readonly) */
  3209. String category;
  3210. /* (readonly) */
  3211. uint numAttributes;
  3212. Array<Variant> attributes;
  3213. /* (readonly) */
  3214. Array<Variant> attributeDefaults;
  3215. /* (readonly) */
  3216. Array<AttributeInfo> attributeInfos;
  3217. bool temporary;
  3218. bool enabled;
  3219. /* (readonly) */
  3220. bool enabledEffective;
  3221. /* (readonly) */
  3222. uint id;
  3223. /* (readonly) */
  3224. Node node;
  3225. };
  3226. class Billboard
  3227. {
  3228. // Properties:
  3229. Vector3 position;
  3230. Vector2 size;
  3231. Rect uv;
  3232. Color color;
  3233. float rotation;
  3234. bool enabled;
  3235. };
  3236. class BillboardSet
  3237. {
  3238. // Methods:
  3239. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3240. bool Load(File, bool = false);
  3241. bool Save(File) const;
  3242. bool LoadXML(const XMLElement&, bool = false);
  3243. bool SaveXML(XMLElement&) const;
  3244. void ApplyAttributes();
  3245. bool SetAttribute(const String&, const Variant&);
  3246. void ResetToDefault();
  3247. void RemoveInstanceDefault();
  3248. Variant GetAttribute(const String&) const;
  3249. Variant GetAttributeDefault(const String&) const;
  3250. void Remove();
  3251. void MarkNetworkUpdate() const;
  3252. void DrawDebugGeometry(DebugRenderer, bool);
  3253. void Commit();
  3254. // Properties:
  3255. /* (readonly) */
  3256. int refs;
  3257. /* (readonly) */
  3258. int weakRefs;
  3259. /* (readonly) */
  3260. ShortStringHash type;
  3261. /* (readonly) */
  3262. ShortStringHash baseType;
  3263. /* (readonly) */
  3264. String typeName;
  3265. /* (readonly) */
  3266. String category;
  3267. /* (readonly) */
  3268. uint numAttributes;
  3269. Array<Variant> attributes;
  3270. /* (readonly) */
  3271. Array<Variant> attributeDefaults;
  3272. /* (readonly) */
  3273. Array<AttributeInfo> attributeInfos;
  3274. bool temporary;
  3275. bool enabled;
  3276. /* (readonly) */
  3277. bool enabledEffective;
  3278. /* (readonly) */
  3279. uint id;
  3280. /* (readonly) */
  3281. Node node;
  3282. /* (readonly) */
  3283. bool inView;
  3284. bool castShadows;
  3285. bool occluder;
  3286. bool occludee;
  3287. float drawDistance;
  3288. float shadowDistance;
  3289. float lodBias;
  3290. uint viewMask;
  3291. uint lightMask;
  3292. uint shadowMask;
  3293. uint zoneMask;
  3294. uint maxLights;
  3295. /* (readonly) */
  3296. BoundingBox boundingBox;
  3297. /* (readonly) */
  3298. BoundingBox worldBoundingBox;
  3299. Material material;
  3300. uint numBillboards;
  3301. bool relative;
  3302. bool sorted;
  3303. bool scaled;
  3304. bool faceCamera;
  3305. float animationLodBias;
  3306. /* (readonly) */
  3307. Array<Billboard> billboards;
  3308. /* (readonly) */
  3309. Zone zone;
  3310. };
  3311. class ColorFrame
  3312. {
  3313. // Properties:
  3314. Color color;
  3315. float time;
  3316. };
  3317. class TextureFrame
  3318. {
  3319. // Properties:
  3320. Rect uv;
  3321. float time;
  3322. };
  3323. class ParticleEmitter
  3324. {
  3325. // Methods:
  3326. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3327. bool Load(File, bool = false);
  3328. bool Save(File) const;
  3329. bool LoadXML(const XMLElement&, bool = false);
  3330. bool SaveXML(XMLElement&) const;
  3331. void ApplyAttributes();
  3332. bool SetAttribute(const String&, const Variant&);
  3333. void ResetToDefault();
  3334. void RemoveInstanceDefault();
  3335. Variant GetAttribute(const String&) const;
  3336. Variant GetAttributeDefault(const String&) const;
  3337. void Remove();
  3338. void MarkNetworkUpdate() const;
  3339. void DrawDebugGeometry(DebugRenderer, bool);
  3340. bool Load(XMLFile);
  3341. bool Save(XMLFile);
  3342. void SetEmitting(bool, bool);
  3343. void SetColor(const Color&);
  3344. // Properties:
  3345. /* (readonly) */
  3346. int refs;
  3347. /* (readonly) */
  3348. int weakRefs;
  3349. /* (readonly) */
  3350. ShortStringHash type;
  3351. /* (readonly) */
  3352. ShortStringHash baseType;
  3353. /* (readonly) */
  3354. String typeName;
  3355. /* (readonly) */
  3356. String category;
  3357. /* (readonly) */
  3358. uint numAttributes;
  3359. Array<Variant> attributes;
  3360. /* (readonly) */
  3361. Array<Variant> attributeDefaults;
  3362. /* (readonly) */
  3363. Array<AttributeInfo> attributeInfos;
  3364. bool temporary;
  3365. bool enabled;
  3366. /* (readonly) */
  3367. bool enabledEffective;
  3368. /* (readonly) */
  3369. uint id;
  3370. /* (readonly) */
  3371. Node node;
  3372. /* (readonly) */
  3373. bool inView;
  3374. bool castShadows;
  3375. bool occluder;
  3376. bool occludee;
  3377. float drawDistance;
  3378. float shadowDistance;
  3379. float lodBias;
  3380. uint viewMask;
  3381. uint lightMask;
  3382. uint shadowMask;
  3383. uint zoneMask;
  3384. uint maxLights;
  3385. /* (readonly) */
  3386. BoundingBox boundingBox;
  3387. /* (readonly) */
  3388. BoundingBox worldBoundingBox;
  3389. Material material;
  3390. bool relative;
  3391. bool sorted;
  3392. bool scaled;
  3393. bool updateInvisible;
  3394. float animationLodBias;
  3395. bool emitting;
  3396. uint numParticles;
  3397. /* (writeonly) */
  3398. float emissionRate;
  3399. float minEmissionRate;
  3400. float maxEmissionRate;
  3401. EmitterType emitterType;
  3402. Vector3 emitterSize;
  3403. float activeTime;
  3404. float inactiveTime;
  3405. /* (writeonly) */
  3406. float timeToLive;
  3407. float minTimeToLive;
  3408. float maxTimeToLive;
  3409. /* (writeonly) */
  3410. Vector2 particleSize;
  3411. Vector2 minParticleSize;
  3412. Vector3 maxParticleSize;
  3413. Vector3 minDirection;
  3414. Vector3 maxDirection;
  3415. /* (writeonly) */
  3416. float velocity;
  3417. float minVelocity;
  3418. float maxVelocity;
  3419. /* (writeonly) */
  3420. float rotation;
  3421. float minRotation;
  3422. float maxRotation;
  3423. /* (writeonly) */
  3424. float rotationSpeed;
  3425. float minRotationSpeed;
  3426. float maxRotationSpeed;
  3427. Vector3 constantForce;
  3428. float dampingForce;
  3429. float sizeAdd;
  3430. float sizeMul;
  3431. /* (readonly) */
  3432. Array<ColorFrame> colors;
  3433. uint numColors;
  3434. /* (readonly) */
  3435. Array<TextureFrame> textureFrames;
  3436. uint numTextureFrames;
  3437. /* (readonly) */
  3438. Zone zone;
  3439. };
  3440. class CustomGeometry
  3441. {
  3442. // Methods:
  3443. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3444. bool Load(File, bool = false);
  3445. bool Save(File) const;
  3446. bool LoadXML(const XMLElement&, bool = false);
  3447. bool SaveXML(XMLElement&) const;
  3448. void ApplyAttributes();
  3449. bool SetAttribute(const String&, const Variant&);
  3450. void ResetToDefault();
  3451. void RemoveInstanceDefault();
  3452. Variant GetAttribute(const String&) const;
  3453. Variant GetAttributeDefault(const String&) const;
  3454. void Remove();
  3455. void MarkNetworkUpdate() const;
  3456. void DrawDebugGeometry(DebugRenderer, bool);
  3457. void Clear();
  3458. void BeginGeometry(uint, PrimitiveType);
  3459. void DefineVertex(const Vector3&);
  3460. void DefineNormal(const Vector3&);
  3461. void DefineColor(const Color&);
  3462. void DefineTexCoord(const Vector2&);
  3463. void DefineTangent(const Vector4&);
  3464. void Commit();
  3465. // Properties:
  3466. /* (readonly) */
  3467. int refs;
  3468. /* (readonly) */
  3469. int weakRefs;
  3470. /* (readonly) */
  3471. ShortStringHash type;
  3472. /* (readonly) */
  3473. ShortStringHash baseType;
  3474. /* (readonly) */
  3475. String typeName;
  3476. /* (readonly) */
  3477. String category;
  3478. /* (readonly) */
  3479. uint numAttributes;
  3480. Array<Variant> attributes;
  3481. /* (readonly) */
  3482. Array<Variant> attributeDefaults;
  3483. /* (readonly) */
  3484. Array<AttributeInfo> attributeInfos;
  3485. bool temporary;
  3486. bool enabled;
  3487. /* (readonly) */
  3488. bool enabledEffective;
  3489. /* (readonly) */
  3490. uint id;
  3491. /* (readonly) */
  3492. Node node;
  3493. /* (readonly) */
  3494. bool inView;
  3495. bool castShadows;
  3496. bool occluder;
  3497. bool occludee;
  3498. float drawDistance;
  3499. float shadowDistance;
  3500. float lodBias;
  3501. uint viewMask;
  3502. uint lightMask;
  3503. uint shadowMask;
  3504. uint zoneMask;
  3505. uint maxLights;
  3506. /* (readonly) */
  3507. BoundingBox boundingBox;
  3508. /* (readonly) */
  3509. BoundingBox worldBoundingBox;
  3510. /* (writeonly) */
  3511. Material material;
  3512. Array<Material> materials;
  3513. uint numGeometries;
  3514. /* (readonly) */
  3515. Zone zone;
  3516. };
  3517. class DecalSet
  3518. {
  3519. // Methods:
  3520. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3521. bool Load(File, bool = false);
  3522. bool Save(File) const;
  3523. bool LoadXML(const XMLElement&, bool = false);
  3524. bool SaveXML(XMLElement&) const;
  3525. void ApplyAttributes();
  3526. bool SetAttribute(const String&, const Variant&);
  3527. void ResetToDefault();
  3528. void RemoveInstanceDefault();
  3529. Variant GetAttribute(const String&) const;
  3530. Variant GetAttributeDefault(const String&) const;
  3531. void Remove();
  3532. void MarkNetworkUpdate() const;
  3533. void DrawDebugGeometry(DebugRenderer, bool);
  3534. bool AddDecal(Drawable, const Vector3&, const Quaternion&, float, float, float, const Vector2&, const Vector2&, float = 0.0, float = 0.1, uint = 0xffffffff);
  3535. void RemoveDecals(uint);
  3536. void RemoveAllDecals();
  3537. // Properties:
  3538. /* (readonly) */
  3539. int refs;
  3540. /* (readonly) */
  3541. int weakRefs;
  3542. /* (readonly) */
  3543. ShortStringHash type;
  3544. /* (readonly) */
  3545. ShortStringHash baseType;
  3546. /* (readonly) */
  3547. String typeName;
  3548. /* (readonly) */
  3549. String category;
  3550. /* (readonly) */
  3551. uint numAttributes;
  3552. Array<Variant> attributes;
  3553. /* (readonly) */
  3554. Array<Variant> attributeDefaults;
  3555. /* (readonly) */
  3556. Array<AttributeInfo> attributeInfos;
  3557. bool temporary;
  3558. bool enabled;
  3559. /* (readonly) */
  3560. bool enabledEffective;
  3561. /* (readonly) */
  3562. uint id;
  3563. /* (readonly) */
  3564. Node node;
  3565. /* (readonly) */
  3566. bool inView;
  3567. bool castShadows;
  3568. bool occluder;
  3569. bool occludee;
  3570. float drawDistance;
  3571. float shadowDistance;
  3572. float lodBias;
  3573. uint viewMask;
  3574. uint lightMask;
  3575. uint shadowMask;
  3576. uint zoneMask;
  3577. uint maxLights;
  3578. /* (readonly) */
  3579. BoundingBox boundingBox;
  3580. /* (readonly) */
  3581. BoundingBox worldBoundingBox;
  3582. Material material;
  3583. /* (readonly) */
  3584. uint numDecals;
  3585. /* (readonly) */
  3586. uint numVertices;
  3587. /* (readonly) */
  3588. uint numIndices;
  3589. uint maxVertices;
  3590. uint maxIndices;
  3591. /* (readonly) */
  3592. Zone zone;
  3593. };
  3594. class TerrainPatch
  3595. {
  3596. // Methods:
  3597. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3598. bool Load(File, bool = false);
  3599. bool Save(File) const;
  3600. bool LoadXML(const XMLElement&, bool = false);
  3601. bool SaveXML(XMLElement&) const;
  3602. void ApplyAttributes();
  3603. bool SetAttribute(const String&, const Variant&);
  3604. void ResetToDefault();
  3605. void RemoveInstanceDefault();
  3606. Variant GetAttribute(const String&) const;
  3607. Variant GetAttributeDefault(const String&) const;
  3608. void Remove();
  3609. void MarkNetworkUpdate() const;
  3610. void DrawDebugGeometry(DebugRenderer, bool);
  3611. // Properties:
  3612. /* (readonly) */
  3613. int refs;
  3614. /* (readonly) */
  3615. int weakRefs;
  3616. /* (readonly) */
  3617. ShortStringHash type;
  3618. /* (readonly) */
  3619. ShortStringHash baseType;
  3620. /* (readonly) */
  3621. String typeName;
  3622. /* (readonly) */
  3623. String category;
  3624. /* (readonly) */
  3625. uint numAttributes;
  3626. Array<Variant> attributes;
  3627. /* (readonly) */
  3628. Array<Variant> attributeDefaults;
  3629. /* (readonly) */
  3630. Array<AttributeInfo> attributeInfos;
  3631. bool temporary;
  3632. bool enabled;
  3633. /* (readonly) */
  3634. bool enabledEffective;
  3635. /* (readonly) */
  3636. uint id;
  3637. /* (readonly) */
  3638. Node node;
  3639. /* (readonly) */
  3640. bool inView;
  3641. bool castShadows;
  3642. bool occluder;
  3643. bool occludee;
  3644. float drawDistance;
  3645. float shadowDistance;
  3646. float lodBias;
  3647. uint viewMask;
  3648. uint lightMask;
  3649. uint shadowMask;
  3650. uint zoneMask;
  3651. uint maxLights;
  3652. /* (readonly) */
  3653. BoundingBox boundingBox;
  3654. /* (readonly) */
  3655. BoundingBox worldBoundingBox;
  3656. };
  3657. class Terrain
  3658. {
  3659. // Methods:
  3660. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3661. bool Load(File, bool = false);
  3662. bool Save(File) const;
  3663. bool LoadXML(const XMLElement&, bool = false);
  3664. bool SaveXML(XMLElement&) const;
  3665. void ApplyAttributes();
  3666. bool SetAttribute(const String&, const Variant&);
  3667. void ResetToDefault();
  3668. void RemoveInstanceDefault();
  3669. Variant GetAttribute(const String&) const;
  3670. Variant GetAttributeDefault(const String&) const;
  3671. void Remove();
  3672. void MarkNetworkUpdate() const;
  3673. void DrawDebugGeometry(DebugRenderer, bool);
  3674. float GetHeight(const Vector3&) const;
  3675. Vector3 GetNormal(const Vector3&) const;
  3676. TerrainPatch GetPatch(int, int) const;
  3677. // Properties:
  3678. /* (readonly) */
  3679. int refs;
  3680. /* (readonly) */
  3681. int weakRefs;
  3682. /* (readonly) */
  3683. ShortStringHash type;
  3684. /* (readonly) */
  3685. ShortStringHash baseType;
  3686. /* (readonly) */
  3687. String typeName;
  3688. /* (readonly) */
  3689. String category;
  3690. /* (readonly) */
  3691. uint numAttributes;
  3692. Array<Variant> attributes;
  3693. /* (readonly) */
  3694. Array<Variant> attributeDefaults;
  3695. /* (readonly) */
  3696. Array<AttributeInfo> attributeInfos;
  3697. bool temporary;
  3698. bool enabled;
  3699. /* (readonly) */
  3700. bool enabledEffective;
  3701. /* (readonly) */
  3702. uint id;
  3703. /* (readonly) */
  3704. Node node;
  3705. Material material;
  3706. bool smoothing;
  3707. Image heightMap;
  3708. int patchSize;
  3709. Vector3 spacing;
  3710. /* (readonly) */
  3711. IntVector2 numVertices;
  3712. /* (readonly) */
  3713. IntVector2 numPatches;
  3714. /* (readonly) */
  3715. Array<TerrainPatch> patches;
  3716. bool castShadows;
  3717. bool occluder;
  3718. bool occludee;
  3719. float drawDistance;
  3720. float shadowDistance;
  3721. float lodBias;
  3722. uint viewMask;
  3723. uint lightMask;
  3724. uint shadowMask;
  3725. uint zoneMask;
  3726. uint maxLights;
  3727. };
  3728. class RayQueryResult
  3729. {
  3730. // Properties:
  3731. /* (readonly) */
  3732. Drawable drawable;
  3733. /* (readonly) */
  3734. Node node;
  3735. Vector3 position;
  3736. Vector3 normal;
  3737. float distance;
  3738. uint subObject;
  3739. };
  3740. class Octree
  3741. {
  3742. // Methods:
  3743. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3744. bool Load(File, bool = false);
  3745. bool Save(File) const;
  3746. bool LoadXML(const XMLElement&, bool = false);
  3747. bool SaveXML(XMLElement&) const;
  3748. void ApplyAttributes();
  3749. bool SetAttribute(const String&, const Variant&);
  3750. void ResetToDefault();
  3751. void RemoveInstanceDefault();
  3752. Variant GetAttribute(const String&) const;
  3753. Variant GetAttributeDefault(const String&) const;
  3754. void Remove();
  3755. void MarkNetworkUpdate() const;
  3756. void DrawDebugGeometry(DebugRenderer, bool);
  3757. void SetSize(const BoundingBox&, uint);
  3758. void DrawDebugGeometry(bool) const;
  3759. void AddManualDrawable(Drawable);
  3760. void RemoveManualDrawable(Drawable);
  3761. Array<RayQueryResult> Raycast(const Ray&, RayQueryLevel = RAY_TRIANGLE, float = M_INFINITY, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK) const;
  3762. RayQueryResult RaycastSingle(const Ray&, RayQueryLevel = RAY_TRIANGLE, float = M_INFINITY, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK) const;
  3763. Array<Node> GetDrawables(const Vector3&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  3764. Array<Node> GetDrawables(const BoundingBox&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  3765. Array<Node> GetDrawables(const Frustum&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  3766. Array<Node> GetDrawables(const Sphere&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  3767. // Properties:
  3768. /* (readonly) */
  3769. int refs;
  3770. /* (readonly) */
  3771. int weakRefs;
  3772. /* (readonly) */
  3773. ShortStringHash type;
  3774. /* (readonly) */
  3775. ShortStringHash baseType;
  3776. /* (readonly) */
  3777. String typeName;
  3778. /* (readonly) */
  3779. String category;
  3780. /* (readonly) */
  3781. uint numAttributes;
  3782. Array<Variant> attributes;
  3783. /* (readonly) */
  3784. Array<Variant> attributeDefaults;
  3785. /* (readonly) */
  3786. Array<AttributeInfo> attributeInfos;
  3787. bool temporary;
  3788. bool enabled;
  3789. /* (readonly) */
  3790. bool enabledEffective;
  3791. /* (readonly) */
  3792. uint id;
  3793. /* (readonly) */
  3794. Node node;
  3795. /* (readonly) */
  3796. BoundingBox worldBoundingBox;
  3797. /* (readonly) */
  3798. uint numLevels;
  3799. };
  3800. class Graphics
  3801. {
  3802. // Methods:
  3803. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3804. bool SetMode(int, int, bool, bool, bool, bool, bool, int);
  3805. bool SetMode(int, int);
  3806. void SetWindowPosition(int, int);
  3807. bool ToggleFullscreen();
  3808. void Maximize();
  3809. void Minimize();
  3810. void Close();
  3811. bool TakeScreenShot(Image);
  3812. // Properties:
  3813. /* (readonly) */
  3814. int refs;
  3815. /* (readonly) */
  3816. int weakRefs;
  3817. /* (readonly) */
  3818. ShortStringHash type;
  3819. /* (readonly) */
  3820. ShortStringHash baseType;
  3821. /* (readonly) */
  3822. String typeName;
  3823. /* (readonly) */
  3824. String category;
  3825. String windowTitle;
  3826. /* (writeonly) */
  3827. Image windowIcon;
  3828. IntVector2 windowPosition;
  3829. bool sRGB;
  3830. bool flushGPU;
  3831. /* (readonly) */
  3832. int width;
  3833. /* (readonly) */
  3834. int height;
  3835. /* (readonly) */
  3836. int multiSample;
  3837. /* (readonly) */
  3838. bool fullscreen;
  3839. /* (readonly) */
  3840. bool resizable;
  3841. /* (readonly) */
  3842. bool borderless;
  3843. /* (readonly) */
  3844. bool vsync;
  3845. /* (readonly) */
  3846. bool tripleBuffer;
  3847. /* (readonly) */
  3848. bool initialized;
  3849. /* (readonly) */
  3850. bool deviceLost;
  3851. /* (readonly) */
  3852. uint numPrimitives;
  3853. /* (readonly) */
  3854. uint numBatches;
  3855. /* (readonly) */
  3856. bool sm3Support;
  3857. /* (readonly) */
  3858. bool instancingSupport;
  3859. /* (readonly) */
  3860. bool lightPrepassSupport;
  3861. /* (readonly) */
  3862. bool deferredSupport;
  3863. /* (readonly) */
  3864. bool hardwareShadowSupport;
  3865. /* (readonly) */
  3866. bool sRGBSupport;
  3867. /* (readonly) */
  3868. bool sRGBWriteSupport;
  3869. bool forceSM2;
  3870. /* (readonly) */
  3871. Array<IntVector2> resolutions;
  3872. /* (readonly) */
  3873. Array<int> multiSampleLevels;
  3874. /* (readonly) */
  3875. IntVector2 desktopResolution;
  3876. };
  3877. class Renderer
  3878. {
  3879. // Methods:
  3880. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3881. void DrawDebugGeometry(bool) const;
  3882. void ReloadShaders() const;
  3883. void SetDefaultRenderPath(XMLFile);
  3884. // Properties:
  3885. /* (readonly) */
  3886. int refs;
  3887. /* (readonly) */
  3888. int weakRefs;
  3889. /* (readonly) */
  3890. ShortStringHash type;
  3891. /* (readonly) */
  3892. ShortStringHash baseType;
  3893. /* (readonly) */
  3894. String typeName;
  3895. /* (readonly) */
  3896. String category;
  3897. uint numViewports;
  3898. Array<Viewport> viewports;
  3899. RenderPath defaultRenderPath;
  3900. /* (readonly) */
  3901. Zone defaultZone;
  3902. bool specularLighting;
  3903. int textureAnisotropy;
  3904. TextureFilterMode textureFilterMode;
  3905. int textureQuality;
  3906. int materialQuality;
  3907. bool drawShadows;
  3908. int shadowMapSize;
  3909. int shadowQuality;
  3910. int maxShadowCascades;
  3911. int maxShadowMaps;
  3912. bool reuseShadowMaps;
  3913. bool dynamicInstancing;
  3914. int minInstances;
  3915. int maxInstanceTriangles;
  3916. int maxSortedInstances;
  3917. int maxOccluderTriangles;
  3918. int occlusionBufferSize;
  3919. float occluderSizeThreshold;
  3920. /* (readonly) */
  3921. uint numPrimitives;
  3922. /* (readonly) */
  3923. uint numBatches;
  3924. /* (readonly) */
  3925. uint numViews;
  3926. /* (readonly) */
  3927. Array<uint> numGeometries;
  3928. /* (readonly) */
  3929. Array<uint> numLights;
  3930. /* (readonly) */
  3931. Array<uint> numShadowMaps;
  3932. /* (readonly) */
  3933. Array<uint> numOccluders;
  3934. };
  3935. class TouchState
  3936. {
  3937. // Properties:
  3938. int touchID;
  3939. IntVector2 position;
  3940. IntVector2 delta;
  3941. float pressure;
  3942. };
  3943. class JoystickState
  3944. {
  3945. // Properties:
  3946. /* (readonly) */
  3947. uint numButtons;
  3948. /* (readonly) */
  3949. uint numAxes;
  3950. /* (readonly) */
  3951. uint numHats;
  3952. /* (readonly) */
  3953. Array<bool> buttonDown;
  3954. /* (readonly) */
  3955. Array<bool> buttonPress;
  3956. /* (readonly) */
  3957. Array<float> axisPosition;
  3958. /* (readonly) */
  3959. Array<int> hatPosition;
  3960. String name;
  3961. };
  3962. class Input
  3963. {
  3964. // Methods:
  3965. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3966. bool OpenJoystick(uint);
  3967. void CloseJoystick(uint);
  3968. bool DetectJoysticks();
  3969. // Properties:
  3970. /* (readonly) */
  3971. int refs;
  3972. /* (readonly) */
  3973. int weakRefs;
  3974. /* (readonly) */
  3975. ShortStringHash type;
  3976. /* (readonly) */
  3977. ShortStringHash baseType;
  3978. /* (readonly) */
  3979. String typeName;
  3980. /* (readonly) */
  3981. String category;
  3982. bool mouseVisible;
  3983. bool toggleFullscreen;
  3984. /* (readonly) */
  3985. Array<bool> keyDown;
  3986. /* (readonly) */
  3987. Array<bool> keyPress;
  3988. /* (readonly) */
  3989. Array<bool> mouseButtonDown;
  3990. /* (readonly) */
  3991. Array<bool> mouseButtonPress;
  3992. /* (readonly) */
  3993. Array<bool> qualifierDown;
  3994. /* (readonly) */
  3995. Array<bool> qualifierPress;
  3996. /* (readonly) */
  3997. int qualifiers;
  3998. /* (readonly) */
  3999. IntVector2 mousePosition;
  4000. /* (readonly) */
  4001. IntVector2 mouseMove;
  4002. /* (readonly) */
  4003. int mouseMoveX;
  4004. /* (readonly) */
  4005. int mouseMoveY;
  4006. /* (readonly) */
  4007. int mouseMoveWheel;
  4008. /* (readonly) */
  4009. uint numTouches;
  4010. /* (readonly) */
  4011. Array<TouchState> touches;
  4012. /* (readonly) */
  4013. uint numJoysticks;
  4014. /* (readonly) */
  4015. Array<String> joystickNames;
  4016. /* (readonly) */
  4017. Array<JoystickState> joysticks;
  4018. /* (readonly) */
  4019. bool focus;
  4020. /* (readonly) */
  4021. bool minimized;
  4022. };
  4023. class Sound
  4024. {
  4025. // Methods:
  4026. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4027. bool Load(File);
  4028. bool Save(File) const;
  4029. // Properties:
  4030. /* (readonly) */
  4031. int refs;
  4032. /* (readonly) */
  4033. int weakRefs;
  4034. /* (readonly) */
  4035. ShortStringHash type;
  4036. /* (readonly) */
  4037. ShortStringHash baseType;
  4038. /* (readonly) */
  4039. String typeName;
  4040. /* (readonly) */
  4041. String category;
  4042. String name;
  4043. /* (readonly) */
  4044. uint memoryUse;
  4045. /* (readonly) */
  4046. uint useTimer;
  4047. /* (readonly) */
  4048. float length;
  4049. /* (readonly) */
  4050. uint sampleSize;
  4051. /* (readonly) */
  4052. float frequency;
  4053. bool looped;
  4054. /* (readonly) */
  4055. bool sixteenBit;
  4056. /* (readonly) */
  4057. bool stereo;
  4058. /* (readonly) */
  4059. bool compressed;
  4060. };
  4061. class SoundListener
  4062. {
  4063. // Methods:
  4064. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4065. bool Load(File, bool = false);
  4066. bool Save(File) const;
  4067. bool LoadXML(const XMLElement&, bool = false);
  4068. bool SaveXML(XMLElement&) const;
  4069. void ApplyAttributes();
  4070. bool SetAttribute(const String&, const Variant&);
  4071. void ResetToDefault();
  4072. void RemoveInstanceDefault();
  4073. Variant GetAttribute(const String&) const;
  4074. Variant GetAttributeDefault(const String&) const;
  4075. void Remove();
  4076. void MarkNetworkUpdate() const;
  4077. void DrawDebugGeometry(DebugRenderer, bool);
  4078. // Properties:
  4079. /* (readonly) */
  4080. int refs;
  4081. /* (readonly) */
  4082. int weakRefs;
  4083. /* (readonly) */
  4084. ShortStringHash type;
  4085. /* (readonly) */
  4086. ShortStringHash baseType;
  4087. /* (readonly) */
  4088. String typeName;
  4089. /* (readonly) */
  4090. String category;
  4091. /* (readonly) */
  4092. uint numAttributes;
  4093. Array<Variant> attributes;
  4094. /* (readonly) */
  4095. Array<Variant> attributeDefaults;
  4096. /* (readonly) */
  4097. Array<AttributeInfo> attributeInfos;
  4098. bool temporary;
  4099. bool enabled;
  4100. /* (readonly) */
  4101. bool enabledEffective;
  4102. /* (readonly) */
  4103. uint id;
  4104. /* (readonly) */
  4105. Node node;
  4106. };
  4107. class SoundSource
  4108. {
  4109. // Methods:
  4110. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4111. bool Load(File, bool = false);
  4112. bool Save(File) const;
  4113. bool LoadXML(const XMLElement&, bool = false);
  4114. bool SaveXML(XMLElement&) const;
  4115. void ApplyAttributes();
  4116. bool SetAttribute(const String&, const Variant&);
  4117. void ResetToDefault();
  4118. void RemoveInstanceDefault();
  4119. Variant GetAttribute(const String&) const;
  4120. Variant GetAttributeDefault(const String&) const;
  4121. void Remove();
  4122. void MarkNetworkUpdate() const;
  4123. void DrawDebugGeometry(DebugRenderer, bool);
  4124. void Play(Sound);
  4125. void Play(Sound, float);
  4126. void Play(Sound, float, float);
  4127. void Play(Sound, float, float, float);
  4128. void Stop();
  4129. // Properties:
  4130. /* (readonly) */
  4131. int refs;
  4132. /* (readonly) */
  4133. int weakRefs;
  4134. /* (readonly) */
  4135. ShortStringHash type;
  4136. /* (readonly) */
  4137. ShortStringHash baseType;
  4138. /* (readonly) */
  4139. String typeName;
  4140. /* (readonly) */
  4141. String category;
  4142. /* (readonly) */
  4143. uint numAttributes;
  4144. Array<Variant> attributes;
  4145. /* (readonly) */
  4146. Array<Variant> attributeDefaults;
  4147. /* (readonly) */
  4148. Array<AttributeInfo> attributeInfos;
  4149. bool temporary;
  4150. bool enabled;
  4151. /* (readonly) */
  4152. bool enabledEffective;
  4153. /* (readonly) */
  4154. uint id;
  4155. /* (readonly) */
  4156. Node node;
  4157. SoundType soundType;
  4158. float frequency;
  4159. float gain;
  4160. float panning;
  4161. /* (readonly) */
  4162. Sound sound;
  4163. /* (readonly) */
  4164. float timePosition;
  4165. /* (readonly) */
  4166. float attenuation;
  4167. bool autoRemove;
  4168. /* (readonly) */
  4169. bool playing;
  4170. };
  4171. class SoundSource3D
  4172. {
  4173. // Methods:
  4174. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4175. bool Load(File, bool = false);
  4176. bool Save(File) const;
  4177. bool LoadXML(const XMLElement&, bool = false);
  4178. bool SaveXML(XMLElement&) const;
  4179. void ApplyAttributes();
  4180. bool SetAttribute(const String&, const Variant&);
  4181. void ResetToDefault();
  4182. void RemoveInstanceDefault();
  4183. Variant GetAttribute(const String&) const;
  4184. Variant GetAttributeDefault(const String&) const;
  4185. void Remove();
  4186. void MarkNetworkUpdate() const;
  4187. void DrawDebugGeometry(DebugRenderer, bool);
  4188. void Play(Sound);
  4189. void Play(Sound, float);
  4190. void Play(Sound, float, float);
  4191. void Play(Sound, float, float, float);
  4192. void Stop();
  4193. void SetDistanceAttenuation(float, float, float);
  4194. void SetAngleAttenuation(float, float);
  4195. // Properties:
  4196. /* (readonly) */
  4197. int refs;
  4198. /* (readonly) */
  4199. int weakRefs;
  4200. /* (readonly) */
  4201. ShortStringHash type;
  4202. /* (readonly) */
  4203. ShortStringHash baseType;
  4204. /* (readonly) */
  4205. String typeName;
  4206. /* (readonly) */
  4207. String category;
  4208. /* (readonly) */
  4209. uint numAttributes;
  4210. Array<Variant> attributes;
  4211. /* (readonly) */
  4212. Array<Variant> attributeDefaults;
  4213. /* (readonly) */
  4214. Array<AttributeInfo> attributeInfos;
  4215. bool temporary;
  4216. bool enabled;
  4217. /* (readonly) */
  4218. bool enabledEffective;
  4219. /* (readonly) */
  4220. uint id;
  4221. /* (readonly) */
  4222. Node node;
  4223. SoundType soundType;
  4224. float frequency;
  4225. float gain;
  4226. float panning;
  4227. /* (readonly) */
  4228. Sound sound;
  4229. /* (readonly) */
  4230. float timePosition;
  4231. /* (readonly) */
  4232. float attenuation;
  4233. bool autoRemove;
  4234. /* (readonly) */
  4235. bool playing;
  4236. float nearDistance;
  4237. float farDistance;
  4238. float innerAngle;
  4239. float outerAngle;
  4240. float rolloffFactor;
  4241. };
  4242. class Audio
  4243. {
  4244. // Methods:
  4245. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4246. void SetMode(int, int, bool, bool = true);
  4247. bool Play();
  4248. void Stop();
  4249. // Properties:
  4250. /* (readonly) */
  4251. int refs;
  4252. /* (readonly) */
  4253. int weakRefs;
  4254. /* (readonly) */
  4255. ShortStringHash type;
  4256. /* (readonly) */
  4257. ShortStringHash baseType;
  4258. /* (readonly) */
  4259. String typeName;
  4260. /* (readonly) */
  4261. String category;
  4262. Array<float> masterGain;
  4263. SoundListener listener;
  4264. /* (readonly) */
  4265. uint sampleSize;
  4266. /* (readonly) */
  4267. int mixRate;
  4268. /* (readonly) */
  4269. bool stereo;
  4270. /* (readonly) */
  4271. bool interpolation;
  4272. /* (readonly) */
  4273. bool playing;
  4274. /* (readonly) */
  4275. bool initialized;
  4276. };
  4277. class Font
  4278. {
  4279. // Methods:
  4280. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4281. bool Load(File);
  4282. bool Save(File) const;
  4283. bool SaveXML(File, int, bool = false);
  4284. bool SaveXML(const String&, int, bool = false);
  4285. // Properties:
  4286. /* (readonly) */
  4287. int refs;
  4288. /* (readonly) */
  4289. int weakRefs;
  4290. /* (readonly) */
  4291. ShortStringHash type;
  4292. /* (readonly) */
  4293. ShortStringHash baseType;
  4294. /* (readonly) */
  4295. String typeName;
  4296. /* (readonly) */
  4297. String category;
  4298. String name;
  4299. /* (readonly) */
  4300. uint memoryUse;
  4301. /* (readonly) */
  4302. uint useTimer;
  4303. };
  4304. class UIElement
  4305. {
  4306. // Methods:
  4307. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4308. bool Load(File, bool = false);
  4309. bool Save(File) const;
  4310. bool LoadXML(const XMLElement&, bool = false);
  4311. bool SaveXML(XMLElement&) const;
  4312. void ApplyAttributes();
  4313. bool SetAttribute(const String&, const Variant&);
  4314. void ResetToDefault();
  4315. void RemoveInstanceDefault();
  4316. Variant GetAttribute(const String&) const;
  4317. Variant GetAttributeDefault(const String&) const;
  4318. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4319. bool LoadXML(File);
  4320. bool LoadXML(XMLFile, XMLFile);
  4321. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4322. bool LoadChildXML(XMLFile, XMLFile = null);
  4323. bool SaveXML(File);
  4324. bool SetStyle(const XMLElement&);
  4325. bool SetStyle(const String&, XMLFile = null);
  4326. bool SetStyleAuto(XMLFile = null);
  4327. void SetPosition(int, int);
  4328. void SetSize(int, int);
  4329. void SetMinSize(int, int);
  4330. void SetMaxSize(int, int);
  4331. void SetFixedSize(int, int);
  4332. void SetFixedWidth(int);
  4333. void SetFixedHeight(int);
  4334. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4335. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4336. void UpdateLayout();
  4337. void DisableLayoutUpdate();
  4338. void EnableLayoutUpdate();
  4339. void BringToFront();
  4340. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4341. void AddChild(UIElement);
  4342. void InsertChild(uint, UIElement);
  4343. void RemoveChild(UIElement, uint = 0);
  4344. void RemoveChild(uint);
  4345. void RemoveAllChildren();
  4346. void Remove();
  4347. uint FindChild(UIElement) const;
  4348. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4349. UIElement GetChild(const String&, bool = false) const;
  4350. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  4351. Array<UIElement> GetChildren(bool = false) const;
  4352. UIElement GetElementEventSender() const;
  4353. const Variant& GetVar(const ShortStringHash&);
  4354. IntVector2 ScreenToElement(const IntVector2&);
  4355. IntVector2 ElementToScreen(const IntVector2&);
  4356. bool IsInside(IntVector2, bool);
  4357. bool IsInsideCombined(IntVector2, bool);
  4358. // Properties:
  4359. /* (readonly) */
  4360. int refs;
  4361. /* (readonly) */
  4362. int weakRefs;
  4363. /* (readonly) */
  4364. ShortStringHash type;
  4365. /* (readonly) */
  4366. ShortStringHash baseType;
  4367. /* (readonly) */
  4368. String typeName;
  4369. /* (readonly) */
  4370. String category;
  4371. /* (readonly) */
  4372. uint numAttributes;
  4373. Array<Variant> attributes;
  4374. /* (readonly) */
  4375. Array<Variant> attributeDefaults;
  4376. /* (readonly) */
  4377. Array<AttributeInfo> attributeInfos;
  4378. bool temporary;
  4379. String style;
  4380. String name;
  4381. IntVector2 position;
  4382. IntVector2 size;
  4383. int width;
  4384. int height;
  4385. IntVector2 minSize;
  4386. int minWidth;
  4387. int minHeight;
  4388. IntVector2 maxSize;
  4389. int maxWidth;
  4390. int maxHeight;
  4391. /* (readonly) */
  4392. bool fixedSize;
  4393. /* (readonly) */
  4394. bool fixedWidth;
  4395. /* (readonly) */
  4396. bool fixedHeight;
  4397. HorizontalAlignment horizontalAlignment;
  4398. VerticalAlignment verticalAlignment;
  4399. IntRect clipBorder;
  4400. /* (writeonly) */
  4401. Color color;
  4402. Array<Color> colors;
  4403. int priority;
  4404. float opacity;
  4405. bool bringToFront;
  4406. bool bringToBack;
  4407. bool clipChildren;
  4408. bool sortChildren;
  4409. bool useDerivedOpacity;
  4410. bool enabled;
  4411. bool editable;
  4412. bool focus;
  4413. bool selected;
  4414. bool visible;
  4415. /* (readonly) */
  4416. bool hovering;
  4417. bool internal;
  4418. /* (readonly) */
  4419. bool colorGradient;
  4420. FocusMode focusMode;
  4421. uint dragDropMode;
  4422. TraversalMode traversalMode;
  4423. XMLFile defaultStyle;
  4424. LayoutMode layoutMode;
  4425. int layoutSpacing;
  4426. IntRect layoutBorder;
  4427. int indent;
  4428. int indentSpacing;
  4429. /* (readonly) */
  4430. int indentWidth;
  4431. /* (readonly) */
  4432. IntVector2 childOffset;
  4433. bool elementEventSender;
  4434. /* (readonly) */
  4435. Array<uint> numChildren;
  4436. /* (readonly) */
  4437. uint numAllChildren;
  4438. /* (readonly) */
  4439. Array<UIElement> children;
  4440. UIElement parent;
  4441. /* (readonly) */
  4442. UIElement root;
  4443. /* (readonly) */
  4444. IntVector2 screenPosition;
  4445. /* (readonly) */
  4446. IntRect combinedScreenRect;
  4447. /* (readonly) */
  4448. float derivedOpacity;
  4449. /* (readonly) */
  4450. VariantMap vars;
  4451. };
  4452. class BorderImage
  4453. {
  4454. // Methods:
  4455. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4456. bool Load(File, bool = false);
  4457. bool Save(File) const;
  4458. bool LoadXML(const XMLElement&, bool = false);
  4459. bool SaveXML(XMLElement&) const;
  4460. void ApplyAttributes();
  4461. bool SetAttribute(const String&, const Variant&);
  4462. void ResetToDefault();
  4463. void RemoveInstanceDefault();
  4464. Variant GetAttribute(const String&) const;
  4465. Variant GetAttributeDefault(const String&) const;
  4466. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4467. bool LoadXML(File);
  4468. bool LoadXML(XMLFile, XMLFile);
  4469. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4470. bool LoadChildXML(XMLFile, XMLFile = null);
  4471. bool SaveXML(File);
  4472. bool SetStyle(const XMLElement&);
  4473. bool SetStyle(const String&, XMLFile = null);
  4474. bool SetStyleAuto(XMLFile = null);
  4475. void SetPosition(int, int);
  4476. void SetSize(int, int);
  4477. void SetMinSize(int, int);
  4478. void SetMaxSize(int, int);
  4479. void SetFixedSize(int, int);
  4480. void SetFixedWidth(int);
  4481. void SetFixedHeight(int);
  4482. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4483. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4484. void UpdateLayout();
  4485. void DisableLayoutUpdate();
  4486. void EnableLayoutUpdate();
  4487. void BringToFront();
  4488. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4489. void AddChild(UIElement);
  4490. void InsertChild(uint, UIElement);
  4491. void RemoveChild(UIElement, uint = 0);
  4492. void RemoveChild(uint);
  4493. void RemoveAllChildren();
  4494. void Remove();
  4495. uint FindChild(UIElement) const;
  4496. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4497. UIElement GetChild(const String&, bool = false) const;
  4498. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  4499. Array<UIElement> GetChildren(bool = false) const;
  4500. UIElement GetElementEventSender() const;
  4501. const Variant& GetVar(const ShortStringHash&);
  4502. IntVector2 ScreenToElement(const IntVector2&);
  4503. IntVector2 ElementToScreen(const IntVector2&);
  4504. bool IsInside(IntVector2, bool);
  4505. bool IsInsideCombined(IntVector2, bool);
  4506. void SetFullImageRect();
  4507. void SetHoverOffset(int, int);
  4508. // Properties:
  4509. /* (readonly) */
  4510. int refs;
  4511. /* (readonly) */
  4512. int weakRefs;
  4513. /* (readonly) */
  4514. ShortStringHash type;
  4515. /* (readonly) */
  4516. ShortStringHash baseType;
  4517. /* (readonly) */
  4518. String typeName;
  4519. /* (readonly) */
  4520. String category;
  4521. /* (readonly) */
  4522. uint numAttributes;
  4523. Array<Variant> attributes;
  4524. /* (readonly) */
  4525. Array<Variant> attributeDefaults;
  4526. /* (readonly) */
  4527. Array<AttributeInfo> attributeInfos;
  4528. bool temporary;
  4529. String style;
  4530. String name;
  4531. IntVector2 position;
  4532. IntVector2 size;
  4533. int width;
  4534. int height;
  4535. IntVector2 minSize;
  4536. int minWidth;
  4537. int minHeight;
  4538. IntVector2 maxSize;
  4539. int maxWidth;
  4540. int maxHeight;
  4541. /* (readonly) */
  4542. bool fixedSize;
  4543. /* (readonly) */
  4544. bool fixedWidth;
  4545. /* (readonly) */
  4546. bool fixedHeight;
  4547. HorizontalAlignment horizontalAlignment;
  4548. VerticalAlignment verticalAlignment;
  4549. IntRect clipBorder;
  4550. /* (writeonly) */
  4551. Color color;
  4552. Array<Color> colors;
  4553. int priority;
  4554. float opacity;
  4555. bool bringToFront;
  4556. bool bringToBack;
  4557. bool clipChildren;
  4558. bool sortChildren;
  4559. bool useDerivedOpacity;
  4560. bool enabled;
  4561. bool editable;
  4562. bool focus;
  4563. bool selected;
  4564. bool visible;
  4565. /* (readonly) */
  4566. bool hovering;
  4567. bool internal;
  4568. /* (readonly) */
  4569. bool colorGradient;
  4570. FocusMode focusMode;
  4571. uint dragDropMode;
  4572. TraversalMode traversalMode;
  4573. XMLFile defaultStyle;
  4574. LayoutMode layoutMode;
  4575. int layoutSpacing;
  4576. IntRect layoutBorder;
  4577. int indent;
  4578. int indentSpacing;
  4579. /* (readonly) */
  4580. int indentWidth;
  4581. /* (readonly) */
  4582. IntVector2 childOffset;
  4583. bool elementEventSender;
  4584. /* (readonly) */
  4585. Array<uint> numChildren;
  4586. /* (readonly) */
  4587. uint numAllChildren;
  4588. /* (readonly) */
  4589. Array<UIElement> children;
  4590. UIElement parent;
  4591. /* (readonly) */
  4592. UIElement root;
  4593. /* (readonly) */
  4594. IntVector2 screenPosition;
  4595. /* (readonly) */
  4596. IntRect combinedScreenRect;
  4597. /* (readonly) */
  4598. float derivedOpacity;
  4599. /* (readonly) */
  4600. VariantMap vars;
  4601. Texture texture;
  4602. IntRect imageRect;
  4603. IntRect border;
  4604. IntVector2 hoverOffset;
  4605. BlendMode blendMode;
  4606. bool tiled;
  4607. };
  4608. class Sprite
  4609. {
  4610. // Methods:
  4611. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4612. bool Load(File, bool = false);
  4613. bool Save(File) const;
  4614. bool LoadXML(const XMLElement&, bool = false);
  4615. bool SaveXML(XMLElement&) const;
  4616. void ApplyAttributes();
  4617. bool SetAttribute(const String&, const Variant&);
  4618. void ResetToDefault();
  4619. void RemoveInstanceDefault();
  4620. Variant GetAttribute(const String&) const;
  4621. Variant GetAttributeDefault(const String&) const;
  4622. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4623. bool LoadXML(File);
  4624. bool LoadXML(XMLFile, XMLFile);
  4625. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4626. bool LoadChildXML(XMLFile, XMLFile = null);
  4627. bool SaveXML(File);
  4628. bool SetStyle(const XMLElement&);
  4629. bool SetStyle(const String&, XMLFile = null);
  4630. bool SetStyleAuto(XMLFile = null);
  4631. void SetSize(int, int);
  4632. void SetMinSize(int, int);
  4633. void SetMaxSize(int, int);
  4634. void SetFixedSize(int, int);
  4635. void SetFixedWidth(int);
  4636. void SetFixedHeight(int);
  4637. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4638. void BringToFront();
  4639. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4640. void AddChild(UIElement);
  4641. void InsertChild(uint, UIElement);
  4642. void RemoveChild(UIElement, uint = 0);
  4643. void RemoveChild(uint);
  4644. void RemoveAllChildren();
  4645. void Remove();
  4646. uint FindChild(UIElement) const;
  4647. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4648. UIElement GetChild(const String&, bool = false) const;
  4649. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  4650. Array<UIElement> GetChildren(bool = false) const;
  4651. UIElement GetElementEventSender() const;
  4652. const Variant& GetVar(const ShortStringHash&);
  4653. void SetPosition(float, float);
  4654. void SetHotSpot(int, int);
  4655. void SetScale(float, float);
  4656. void SetScale(float);
  4657. void SetFullImageRect();
  4658. // Properties:
  4659. /* (readonly) */
  4660. int refs;
  4661. /* (readonly) */
  4662. int weakRefs;
  4663. /* (readonly) */
  4664. ShortStringHash type;
  4665. /* (readonly) */
  4666. ShortStringHash baseType;
  4667. /* (readonly) */
  4668. String typeName;
  4669. /* (readonly) */
  4670. String category;
  4671. /* (readonly) */
  4672. uint numAttributes;
  4673. Array<Variant> attributes;
  4674. /* (readonly) */
  4675. Array<Variant> attributeDefaults;
  4676. /* (readonly) */
  4677. Array<AttributeInfo> attributeInfos;
  4678. bool temporary;
  4679. String style;
  4680. String name;
  4681. IntVector2 size;
  4682. int width;
  4683. int height;
  4684. HorizontalAlignment horizontalAlignment;
  4685. VerticalAlignment verticalAlignment;
  4686. /* (writeonly) */
  4687. Color color;
  4688. Array<Color> colors;
  4689. int priority;
  4690. float opacity;
  4691. bool bringToFront;
  4692. bool bringToBack;
  4693. bool sortChildren;
  4694. bool useDerivedOpacity;
  4695. bool visible;
  4696. /* (readonly) */
  4697. bool colorGradient;
  4698. XMLFile defaultStyle;
  4699. bool elementEventSender;
  4700. /* (readonly) */
  4701. Array<uint> numChildren;
  4702. /* (readonly) */
  4703. uint numAllChildren;
  4704. /* (readonly) */
  4705. Array<UIElement> children;
  4706. UIElement parent;
  4707. /* (readonly) */
  4708. UIElement root;
  4709. /* (readonly) */
  4710. float derivedOpacity;
  4711. /* (readonly) */
  4712. VariantMap vars;
  4713. Vector2 position;
  4714. IntVector2 hotSpot;
  4715. Vector2 scale;
  4716. float rotation;
  4717. Texture texture;
  4718. IntRect imageRect;
  4719. BlendMode blendMode;
  4720. };
  4721. class Button
  4722. {
  4723. // Methods:
  4724. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4725. bool Load(File, bool = false);
  4726. bool Save(File) const;
  4727. bool LoadXML(const XMLElement&, bool = false);
  4728. bool SaveXML(XMLElement&) const;
  4729. void ApplyAttributes();
  4730. bool SetAttribute(const String&, const Variant&);
  4731. void ResetToDefault();
  4732. void RemoveInstanceDefault();
  4733. Variant GetAttribute(const String&) const;
  4734. Variant GetAttributeDefault(const String&) const;
  4735. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4736. bool LoadXML(File);
  4737. bool LoadXML(XMLFile, XMLFile);
  4738. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4739. bool LoadChildXML(XMLFile, XMLFile = null);
  4740. bool SaveXML(File);
  4741. bool SetStyle(const XMLElement&);
  4742. bool SetStyle(const String&, XMLFile = null);
  4743. bool SetStyleAuto(XMLFile = null);
  4744. void SetPosition(int, int);
  4745. void SetSize(int, int);
  4746. void SetMinSize(int, int);
  4747. void SetMaxSize(int, int);
  4748. void SetFixedSize(int, int);
  4749. void SetFixedWidth(int);
  4750. void SetFixedHeight(int);
  4751. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4752. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4753. void UpdateLayout();
  4754. void DisableLayoutUpdate();
  4755. void EnableLayoutUpdate();
  4756. void BringToFront();
  4757. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4758. void AddChild(UIElement);
  4759. void InsertChild(uint, UIElement);
  4760. void RemoveChild(UIElement, uint = 0);
  4761. void RemoveChild(uint);
  4762. void RemoveAllChildren();
  4763. void Remove();
  4764. uint FindChild(UIElement) const;
  4765. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4766. UIElement GetChild(const String&, bool = false) const;
  4767. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  4768. Array<UIElement> GetChildren(bool = false) const;
  4769. UIElement GetElementEventSender() const;
  4770. const Variant& GetVar(const ShortStringHash&);
  4771. IntVector2 ScreenToElement(const IntVector2&);
  4772. IntVector2 ElementToScreen(const IntVector2&);
  4773. bool IsInside(IntVector2, bool);
  4774. bool IsInsideCombined(IntVector2, bool);
  4775. void SetFullImageRect();
  4776. void SetHoverOffset(int, int);
  4777. void SetPressedOffset(int, int);
  4778. void SetPressedChildOffset(int, int);
  4779. void SetRepeat(float, float);
  4780. // Properties:
  4781. /* (readonly) */
  4782. int refs;
  4783. /* (readonly) */
  4784. int weakRefs;
  4785. /* (readonly) */
  4786. ShortStringHash type;
  4787. /* (readonly) */
  4788. ShortStringHash baseType;
  4789. /* (readonly) */
  4790. String typeName;
  4791. /* (readonly) */
  4792. String category;
  4793. /* (readonly) */
  4794. uint numAttributes;
  4795. Array<Variant> attributes;
  4796. /* (readonly) */
  4797. Array<Variant> attributeDefaults;
  4798. /* (readonly) */
  4799. Array<AttributeInfo> attributeInfos;
  4800. bool temporary;
  4801. String style;
  4802. String name;
  4803. IntVector2 position;
  4804. IntVector2 size;
  4805. int width;
  4806. int height;
  4807. IntVector2 minSize;
  4808. int minWidth;
  4809. int minHeight;
  4810. IntVector2 maxSize;
  4811. int maxWidth;
  4812. int maxHeight;
  4813. /* (readonly) */
  4814. bool fixedSize;
  4815. /* (readonly) */
  4816. bool fixedWidth;
  4817. /* (readonly) */
  4818. bool fixedHeight;
  4819. HorizontalAlignment horizontalAlignment;
  4820. VerticalAlignment verticalAlignment;
  4821. IntRect clipBorder;
  4822. /* (writeonly) */
  4823. Color color;
  4824. Array<Color> colors;
  4825. int priority;
  4826. float opacity;
  4827. bool bringToFront;
  4828. bool bringToBack;
  4829. bool clipChildren;
  4830. bool sortChildren;
  4831. bool useDerivedOpacity;
  4832. bool enabled;
  4833. bool editable;
  4834. bool focus;
  4835. bool selected;
  4836. bool visible;
  4837. /* (readonly) */
  4838. bool hovering;
  4839. bool internal;
  4840. /* (readonly) */
  4841. bool colorGradient;
  4842. FocusMode focusMode;
  4843. uint dragDropMode;
  4844. TraversalMode traversalMode;
  4845. XMLFile defaultStyle;
  4846. LayoutMode layoutMode;
  4847. int layoutSpacing;
  4848. IntRect layoutBorder;
  4849. int indent;
  4850. int indentSpacing;
  4851. /* (readonly) */
  4852. int indentWidth;
  4853. /* (readonly) */
  4854. IntVector2 childOffset;
  4855. bool elementEventSender;
  4856. /* (readonly) */
  4857. Array<uint> numChildren;
  4858. /* (readonly) */
  4859. uint numAllChildren;
  4860. /* (readonly) */
  4861. Array<UIElement> children;
  4862. UIElement parent;
  4863. /* (readonly) */
  4864. UIElement root;
  4865. /* (readonly) */
  4866. IntVector2 screenPosition;
  4867. /* (readonly) */
  4868. IntRect combinedScreenRect;
  4869. /* (readonly) */
  4870. float derivedOpacity;
  4871. /* (readonly) */
  4872. VariantMap vars;
  4873. Texture texture;
  4874. IntRect imageRect;
  4875. IntRect border;
  4876. IntVector2 hoverOffset;
  4877. BlendMode blendMode;
  4878. bool tiled;
  4879. IntVector2 pressedOffset;
  4880. IntVector2 pressedChildOffset;
  4881. float repeatDelay;
  4882. float repeatRate;
  4883. /* (readonly) */
  4884. bool pressed;
  4885. };
  4886. class CheckBox
  4887. {
  4888. // Methods:
  4889. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4890. bool Load(File, bool = false);
  4891. bool Save(File) const;
  4892. bool LoadXML(const XMLElement&, bool = false);
  4893. bool SaveXML(XMLElement&) const;
  4894. void ApplyAttributes();
  4895. bool SetAttribute(const String&, const Variant&);
  4896. void ResetToDefault();
  4897. void RemoveInstanceDefault();
  4898. Variant GetAttribute(const String&) const;
  4899. Variant GetAttributeDefault(const String&) const;
  4900. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4901. bool LoadXML(File);
  4902. bool LoadXML(XMLFile, XMLFile);
  4903. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4904. bool LoadChildXML(XMLFile, XMLFile = null);
  4905. bool SaveXML(File);
  4906. bool SetStyle(const XMLElement&);
  4907. bool SetStyle(const String&, XMLFile = null);
  4908. bool SetStyleAuto(XMLFile = null);
  4909. void SetPosition(int, int);
  4910. void SetSize(int, int);
  4911. void SetMinSize(int, int);
  4912. void SetMaxSize(int, int);
  4913. void SetFixedSize(int, int);
  4914. void SetFixedWidth(int);
  4915. void SetFixedHeight(int);
  4916. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4917. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4918. void UpdateLayout();
  4919. void DisableLayoutUpdate();
  4920. void EnableLayoutUpdate();
  4921. void BringToFront();
  4922. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4923. void AddChild(UIElement);
  4924. void InsertChild(uint, UIElement);
  4925. void RemoveChild(UIElement, uint = 0);
  4926. void RemoveChild(uint);
  4927. void RemoveAllChildren();
  4928. void Remove();
  4929. uint FindChild(UIElement) const;
  4930. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4931. UIElement GetChild(const String&, bool = false) const;
  4932. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  4933. Array<UIElement> GetChildren(bool = false) const;
  4934. UIElement GetElementEventSender() const;
  4935. const Variant& GetVar(const ShortStringHash&);
  4936. IntVector2 ScreenToElement(const IntVector2&);
  4937. IntVector2 ElementToScreen(const IntVector2&);
  4938. bool IsInside(IntVector2, bool);
  4939. bool IsInsideCombined(IntVector2, bool);
  4940. void SetFullImageRect();
  4941. void SetHoverOffset(int, int);
  4942. void SetCheckedOffset(int, int);
  4943. // Properties:
  4944. /* (readonly) */
  4945. int refs;
  4946. /* (readonly) */
  4947. int weakRefs;
  4948. /* (readonly) */
  4949. ShortStringHash type;
  4950. /* (readonly) */
  4951. ShortStringHash baseType;
  4952. /* (readonly) */
  4953. String typeName;
  4954. /* (readonly) */
  4955. String category;
  4956. /* (readonly) */
  4957. uint numAttributes;
  4958. Array<Variant> attributes;
  4959. /* (readonly) */
  4960. Array<Variant> attributeDefaults;
  4961. /* (readonly) */
  4962. Array<AttributeInfo> attributeInfos;
  4963. bool temporary;
  4964. String style;
  4965. String name;
  4966. IntVector2 position;
  4967. IntVector2 size;
  4968. int width;
  4969. int height;
  4970. IntVector2 minSize;
  4971. int minWidth;
  4972. int minHeight;
  4973. IntVector2 maxSize;
  4974. int maxWidth;
  4975. int maxHeight;
  4976. /* (readonly) */
  4977. bool fixedSize;
  4978. /* (readonly) */
  4979. bool fixedWidth;
  4980. /* (readonly) */
  4981. bool fixedHeight;
  4982. HorizontalAlignment horizontalAlignment;
  4983. VerticalAlignment verticalAlignment;
  4984. IntRect clipBorder;
  4985. /* (writeonly) */
  4986. Color color;
  4987. Array<Color> colors;
  4988. int priority;
  4989. float opacity;
  4990. bool bringToFront;
  4991. bool bringToBack;
  4992. bool clipChildren;
  4993. bool sortChildren;
  4994. bool useDerivedOpacity;
  4995. bool enabled;
  4996. bool editable;
  4997. bool focus;
  4998. bool selected;
  4999. bool visible;
  5000. /* (readonly) */
  5001. bool hovering;
  5002. bool internal;
  5003. /* (readonly) */
  5004. bool colorGradient;
  5005. FocusMode focusMode;
  5006. uint dragDropMode;
  5007. TraversalMode traversalMode;
  5008. XMLFile defaultStyle;
  5009. LayoutMode layoutMode;
  5010. int layoutSpacing;
  5011. IntRect layoutBorder;
  5012. int indent;
  5013. int indentSpacing;
  5014. /* (readonly) */
  5015. int indentWidth;
  5016. /* (readonly) */
  5017. IntVector2 childOffset;
  5018. bool elementEventSender;
  5019. /* (readonly) */
  5020. Array<uint> numChildren;
  5021. /* (readonly) */
  5022. uint numAllChildren;
  5023. /* (readonly) */
  5024. Array<UIElement> children;
  5025. UIElement parent;
  5026. /* (readonly) */
  5027. UIElement root;
  5028. /* (readonly) */
  5029. IntVector2 screenPosition;
  5030. /* (readonly) */
  5031. IntRect combinedScreenRect;
  5032. /* (readonly) */
  5033. float derivedOpacity;
  5034. /* (readonly) */
  5035. VariantMap vars;
  5036. Texture texture;
  5037. IntRect imageRect;
  5038. IntRect border;
  5039. IntVector2 hoverOffset;
  5040. BlendMode blendMode;
  5041. bool tiled;
  5042. bool checked;
  5043. IntVector2 checkedOffset;
  5044. };
  5045. class Cursor
  5046. {
  5047. // Methods:
  5048. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5049. bool Load(File, bool = false);
  5050. bool Save(File) const;
  5051. bool LoadXML(const XMLElement&, bool = false);
  5052. bool SaveXML(XMLElement&) const;
  5053. void ApplyAttributes();
  5054. bool SetAttribute(const String&, const Variant&);
  5055. void ResetToDefault();
  5056. void RemoveInstanceDefault();
  5057. Variant GetAttribute(const String&) const;
  5058. Variant GetAttributeDefault(const String&) const;
  5059. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5060. bool LoadXML(File);
  5061. bool LoadXML(XMLFile, XMLFile);
  5062. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5063. bool LoadChildXML(XMLFile, XMLFile = null);
  5064. bool SaveXML(File);
  5065. bool SetStyle(const XMLElement&);
  5066. bool SetStyle(const String&, XMLFile = null);
  5067. bool SetStyleAuto(XMLFile = null);
  5068. void SetPosition(int, int);
  5069. void SetSize(int, int);
  5070. void SetMinSize(int, int);
  5071. void SetMaxSize(int, int);
  5072. void SetFixedSize(int, int);
  5073. void SetFixedWidth(int);
  5074. void SetFixedHeight(int);
  5075. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5076. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5077. void UpdateLayout();
  5078. void DisableLayoutUpdate();
  5079. void EnableLayoutUpdate();
  5080. void BringToFront();
  5081. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5082. void AddChild(UIElement);
  5083. void InsertChild(uint, UIElement);
  5084. void RemoveChild(UIElement, uint = 0);
  5085. void RemoveChild(uint);
  5086. void RemoveAllChildren();
  5087. void Remove();
  5088. uint FindChild(UIElement) const;
  5089. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5090. UIElement GetChild(const String&, bool = false) const;
  5091. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  5092. Array<UIElement> GetChildren(bool = false) const;
  5093. UIElement GetElementEventSender() const;
  5094. const Variant& GetVar(const ShortStringHash&);
  5095. IntVector2 ScreenToElement(const IntVector2&);
  5096. IntVector2 ElementToScreen(const IntVector2&);
  5097. bool IsInside(IntVector2, bool);
  5098. bool IsInsideCombined(IntVector2, bool);
  5099. void SetFullImageRect();
  5100. void SetHoverOffset(int, int);
  5101. void DefineShape(CursorShape, Texture, const IntRect&, const IntVector2&);
  5102. // Properties:
  5103. /* (readonly) */
  5104. int refs;
  5105. /* (readonly) */
  5106. int weakRefs;
  5107. /* (readonly) */
  5108. ShortStringHash type;
  5109. /* (readonly) */
  5110. ShortStringHash baseType;
  5111. /* (readonly) */
  5112. String typeName;
  5113. /* (readonly) */
  5114. String category;
  5115. /* (readonly) */
  5116. uint numAttributes;
  5117. Array<Variant> attributes;
  5118. /* (readonly) */
  5119. Array<Variant> attributeDefaults;
  5120. /* (readonly) */
  5121. Array<AttributeInfo> attributeInfos;
  5122. bool temporary;
  5123. String style;
  5124. String name;
  5125. IntVector2 position;
  5126. IntVector2 size;
  5127. int width;
  5128. int height;
  5129. IntVector2 minSize;
  5130. int minWidth;
  5131. int minHeight;
  5132. IntVector2 maxSize;
  5133. int maxWidth;
  5134. int maxHeight;
  5135. /* (readonly) */
  5136. bool fixedSize;
  5137. /* (readonly) */
  5138. bool fixedWidth;
  5139. /* (readonly) */
  5140. bool fixedHeight;
  5141. HorizontalAlignment horizontalAlignment;
  5142. VerticalAlignment verticalAlignment;
  5143. IntRect clipBorder;
  5144. /* (writeonly) */
  5145. Color color;
  5146. Array<Color> colors;
  5147. int priority;
  5148. float opacity;
  5149. bool bringToFront;
  5150. bool bringToBack;
  5151. bool clipChildren;
  5152. bool sortChildren;
  5153. bool useDerivedOpacity;
  5154. bool enabled;
  5155. bool editable;
  5156. bool focus;
  5157. bool selected;
  5158. bool visible;
  5159. /* (readonly) */
  5160. bool hovering;
  5161. bool internal;
  5162. /* (readonly) */
  5163. bool colorGradient;
  5164. FocusMode focusMode;
  5165. uint dragDropMode;
  5166. TraversalMode traversalMode;
  5167. XMLFile defaultStyle;
  5168. LayoutMode layoutMode;
  5169. int layoutSpacing;
  5170. IntRect layoutBorder;
  5171. int indent;
  5172. int indentSpacing;
  5173. /* (readonly) */
  5174. int indentWidth;
  5175. /* (readonly) */
  5176. IntVector2 childOffset;
  5177. bool elementEventSender;
  5178. /* (readonly) */
  5179. Array<uint> numChildren;
  5180. /* (readonly) */
  5181. uint numAllChildren;
  5182. /* (readonly) */
  5183. Array<UIElement> children;
  5184. UIElement parent;
  5185. /* (readonly) */
  5186. UIElement root;
  5187. /* (readonly) */
  5188. IntVector2 screenPosition;
  5189. /* (readonly) */
  5190. IntRect combinedScreenRect;
  5191. /* (readonly) */
  5192. float derivedOpacity;
  5193. /* (readonly) */
  5194. VariantMap vars;
  5195. Texture texture;
  5196. IntRect imageRect;
  5197. IntRect border;
  5198. IntVector2 hoverOffset;
  5199. BlendMode blendMode;
  5200. bool tiled;
  5201. CursorShape shape;
  5202. bool useSystemShapes;
  5203. };
  5204. class Slider
  5205. {
  5206. // Methods:
  5207. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5208. bool Load(File, bool = false);
  5209. bool Save(File) const;
  5210. bool LoadXML(const XMLElement&, bool = false);
  5211. bool SaveXML(XMLElement&) const;
  5212. void ApplyAttributes();
  5213. bool SetAttribute(const String&, const Variant&);
  5214. void ResetToDefault();
  5215. void RemoveInstanceDefault();
  5216. Variant GetAttribute(const String&) const;
  5217. Variant GetAttributeDefault(const String&) const;
  5218. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5219. bool LoadXML(File);
  5220. bool LoadXML(XMLFile, XMLFile);
  5221. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5222. bool LoadChildXML(XMLFile, XMLFile = null);
  5223. bool SaveXML(File);
  5224. bool SetStyle(const XMLElement&);
  5225. bool SetStyle(const String&, XMLFile = null);
  5226. bool SetStyleAuto(XMLFile = null);
  5227. void SetPosition(int, int);
  5228. void SetSize(int, int);
  5229. void SetMinSize(int, int);
  5230. void SetMaxSize(int, int);
  5231. void SetFixedSize(int, int);
  5232. void SetFixedWidth(int);
  5233. void SetFixedHeight(int);
  5234. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5235. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5236. void UpdateLayout();
  5237. void DisableLayoutUpdate();
  5238. void EnableLayoutUpdate();
  5239. void BringToFront();
  5240. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5241. void AddChild(UIElement);
  5242. void InsertChild(uint, UIElement);
  5243. void RemoveChild(UIElement, uint = 0);
  5244. void RemoveChild(uint);
  5245. void RemoveAllChildren();
  5246. void Remove();
  5247. uint FindChild(UIElement) const;
  5248. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5249. UIElement GetChild(const String&, bool = false) const;
  5250. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  5251. Array<UIElement> GetChildren(bool = false) const;
  5252. UIElement GetElementEventSender() const;
  5253. const Variant& GetVar(const ShortStringHash&);
  5254. IntVector2 ScreenToElement(const IntVector2&);
  5255. IntVector2 ElementToScreen(const IntVector2&);
  5256. bool IsInside(IntVector2, bool);
  5257. bool IsInsideCombined(IntVector2, bool);
  5258. void SetFullImageRect();
  5259. void SetHoverOffset(int, int);
  5260. void ChangeValue(float);
  5261. // Properties:
  5262. /* (readonly) */
  5263. int refs;
  5264. /* (readonly) */
  5265. int weakRefs;
  5266. /* (readonly) */
  5267. ShortStringHash type;
  5268. /* (readonly) */
  5269. ShortStringHash baseType;
  5270. /* (readonly) */
  5271. String typeName;
  5272. /* (readonly) */
  5273. String category;
  5274. /* (readonly) */
  5275. uint numAttributes;
  5276. Array<Variant> attributes;
  5277. /* (readonly) */
  5278. Array<Variant> attributeDefaults;
  5279. /* (readonly) */
  5280. Array<AttributeInfo> attributeInfos;
  5281. bool temporary;
  5282. String style;
  5283. String name;
  5284. IntVector2 position;
  5285. IntVector2 size;
  5286. int width;
  5287. int height;
  5288. IntVector2 minSize;
  5289. int minWidth;
  5290. int minHeight;
  5291. IntVector2 maxSize;
  5292. int maxWidth;
  5293. int maxHeight;
  5294. /* (readonly) */
  5295. bool fixedSize;
  5296. /* (readonly) */
  5297. bool fixedWidth;
  5298. /* (readonly) */
  5299. bool fixedHeight;
  5300. HorizontalAlignment horizontalAlignment;
  5301. VerticalAlignment verticalAlignment;
  5302. IntRect clipBorder;
  5303. /* (writeonly) */
  5304. Color color;
  5305. Array<Color> colors;
  5306. int priority;
  5307. float opacity;
  5308. bool bringToFront;
  5309. bool bringToBack;
  5310. bool clipChildren;
  5311. bool sortChildren;
  5312. bool useDerivedOpacity;
  5313. bool enabled;
  5314. bool editable;
  5315. bool focus;
  5316. bool selected;
  5317. bool visible;
  5318. /* (readonly) */
  5319. bool hovering;
  5320. bool internal;
  5321. /* (readonly) */
  5322. bool colorGradient;
  5323. FocusMode focusMode;
  5324. uint dragDropMode;
  5325. TraversalMode traversalMode;
  5326. XMLFile defaultStyle;
  5327. LayoutMode layoutMode;
  5328. int layoutSpacing;
  5329. IntRect layoutBorder;
  5330. int indent;
  5331. int indentSpacing;
  5332. /* (readonly) */
  5333. int indentWidth;
  5334. /* (readonly) */
  5335. IntVector2 childOffset;
  5336. bool elementEventSender;
  5337. /* (readonly) */
  5338. Array<uint> numChildren;
  5339. /* (readonly) */
  5340. uint numAllChildren;
  5341. /* (readonly) */
  5342. Array<UIElement> children;
  5343. UIElement parent;
  5344. /* (readonly) */
  5345. UIElement root;
  5346. /* (readonly) */
  5347. IntVector2 screenPosition;
  5348. /* (readonly) */
  5349. IntRect combinedScreenRect;
  5350. /* (readonly) */
  5351. float derivedOpacity;
  5352. /* (readonly) */
  5353. VariantMap vars;
  5354. Texture texture;
  5355. IntRect imageRect;
  5356. IntRect border;
  5357. IntVector2 hoverOffset;
  5358. BlendMode blendMode;
  5359. bool tiled;
  5360. Orientation orientation;
  5361. float range;
  5362. float value;
  5363. /* (readonly) */
  5364. BorderImage knob;
  5365. float repeatRate;
  5366. };
  5367. class ScrollBar
  5368. {
  5369. // Methods:
  5370. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5371. bool Load(File, bool = false);
  5372. bool Save(File) const;
  5373. bool LoadXML(const XMLElement&, bool = false);
  5374. bool SaveXML(XMLElement&) const;
  5375. void ApplyAttributes();
  5376. bool SetAttribute(const String&, const Variant&);
  5377. void ResetToDefault();
  5378. void RemoveInstanceDefault();
  5379. Variant GetAttribute(const String&) const;
  5380. Variant GetAttributeDefault(const String&) const;
  5381. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5382. bool LoadXML(File);
  5383. bool LoadXML(XMLFile, XMLFile);
  5384. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5385. bool LoadChildXML(XMLFile, XMLFile = null);
  5386. bool SaveXML(File);
  5387. bool SetStyle(const XMLElement&);
  5388. bool SetStyle(const String&, XMLFile = null);
  5389. bool SetStyleAuto(XMLFile = null);
  5390. void SetPosition(int, int);
  5391. void SetSize(int, int);
  5392. void SetMinSize(int, int);
  5393. void SetMaxSize(int, int);
  5394. void SetFixedSize(int, int);
  5395. void SetFixedWidth(int);
  5396. void SetFixedHeight(int);
  5397. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5398. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5399. void UpdateLayout();
  5400. void DisableLayoutUpdate();
  5401. void EnableLayoutUpdate();
  5402. void BringToFront();
  5403. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5404. void AddChild(UIElement);
  5405. void InsertChild(uint, UIElement);
  5406. void RemoveChild(UIElement, uint = 0);
  5407. void RemoveChild(uint);
  5408. void RemoveAllChildren();
  5409. void Remove();
  5410. uint FindChild(UIElement) const;
  5411. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5412. UIElement GetChild(const String&, bool = false) const;
  5413. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  5414. Array<UIElement> GetChildren(bool = false) const;
  5415. UIElement GetElementEventSender() const;
  5416. const Variant& GetVar(const ShortStringHash&);
  5417. IntVector2 ScreenToElement(const IntVector2&);
  5418. IntVector2 ElementToScreen(const IntVector2&);
  5419. bool IsInside(IntVector2, bool);
  5420. bool IsInsideCombined(IntVector2, bool);
  5421. void ChangeValue(float);
  5422. void StepBack();
  5423. void StepForward();
  5424. // Properties:
  5425. /* (readonly) */
  5426. int refs;
  5427. /* (readonly) */
  5428. int weakRefs;
  5429. /* (readonly) */
  5430. ShortStringHash type;
  5431. /* (readonly) */
  5432. ShortStringHash baseType;
  5433. /* (readonly) */
  5434. String typeName;
  5435. /* (readonly) */
  5436. String category;
  5437. /* (readonly) */
  5438. uint numAttributes;
  5439. Array<Variant> attributes;
  5440. /* (readonly) */
  5441. Array<Variant> attributeDefaults;
  5442. /* (readonly) */
  5443. Array<AttributeInfo> attributeInfos;
  5444. bool temporary;
  5445. String style;
  5446. String name;
  5447. IntVector2 position;
  5448. IntVector2 size;
  5449. int width;
  5450. int height;
  5451. IntVector2 minSize;
  5452. int minWidth;
  5453. int minHeight;
  5454. IntVector2 maxSize;
  5455. int maxWidth;
  5456. int maxHeight;
  5457. /* (readonly) */
  5458. bool fixedSize;
  5459. /* (readonly) */
  5460. bool fixedWidth;
  5461. /* (readonly) */
  5462. bool fixedHeight;
  5463. HorizontalAlignment horizontalAlignment;
  5464. VerticalAlignment verticalAlignment;
  5465. IntRect clipBorder;
  5466. /* (writeonly) */
  5467. Color color;
  5468. Array<Color> colors;
  5469. int priority;
  5470. float opacity;
  5471. bool bringToFront;
  5472. bool bringToBack;
  5473. bool clipChildren;
  5474. bool sortChildren;
  5475. bool useDerivedOpacity;
  5476. bool enabled;
  5477. bool editable;
  5478. bool focus;
  5479. bool selected;
  5480. bool visible;
  5481. /* (readonly) */
  5482. bool hovering;
  5483. bool internal;
  5484. /* (readonly) */
  5485. bool colorGradient;
  5486. FocusMode focusMode;
  5487. uint dragDropMode;
  5488. TraversalMode traversalMode;
  5489. XMLFile defaultStyle;
  5490. LayoutMode layoutMode;
  5491. int layoutSpacing;
  5492. IntRect layoutBorder;
  5493. int indent;
  5494. int indentSpacing;
  5495. /* (readonly) */
  5496. int indentWidth;
  5497. /* (readonly) */
  5498. IntVector2 childOffset;
  5499. bool elementEventSender;
  5500. /* (readonly) */
  5501. Array<uint> numChildren;
  5502. /* (readonly) */
  5503. uint numAllChildren;
  5504. /* (readonly) */
  5505. Array<UIElement> children;
  5506. UIElement parent;
  5507. /* (readonly) */
  5508. UIElement root;
  5509. /* (readonly) */
  5510. IntVector2 screenPosition;
  5511. /* (readonly) */
  5512. IntRect combinedScreenRect;
  5513. /* (readonly) */
  5514. float derivedOpacity;
  5515. /* (readonly) */
  5516. VariantMap vars;
  5517. Orientation orientation;
  5518. float range;
  5519. float value;
  5520. float scrollStep;
  5521. float stepFactor;
  5522. /* (readonly) */
  5523. float effectiveScrollStep;
  5524. /* (readonly) */
  5525. Button backButton;
  5526. /* (readonly) */
  5527. Button forwardButton;
  5528. /* (readonly) */
  5529. Slider slider;
  5530. };
  5531. class ScrollView
  5532. {
  5533. // Methods:
  5534. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5535. bool Load(File, bool = false);
  5536. bool Save(File) const;
  5537. bool LoadXML(const XMLElement&, bool = false);
  5538. bool SaveXML(XMLElement&) const;
  5539. void ApplyAttributes();
  5540. bool SetAttribute(const String&, const Variant&);
  5541. void ResetToDefault();
  5542. void RemoveInstanceDefault();
  5543. Variant GetAttribute(const String&) const;
  5544. Variant GetAttributeDefault(const String&) const;
  5545. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5546. bool LoadXML(File);
  5547. bool LoadXML(XMLFile, XMLFile);
  5548. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5549. bool LoadChildXML(XMLFile, XMLFile = null);
  5550. bool SaveXML(File);
  5551. bool SetStyle(const XMLElement&);
  5552. bool SetStyle(const String&, XMLFile = null);
  5553. bool SetStyleAuto(XMLFile = null);
  5554. void SetPosition(int, int);
  5555. void SetSize(int, int);
  5556. void SetMinSize(int, int);
  5557. void SetMaxSize(int, int);
  5558. void SetFixedSize(int, int);
  5559. void SetFixedWidth(int);
  5560. void SetFixedHeight(int);
  5561. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5562. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5563. void UpdateLayout();
  5564. void DisableLayoutUpdate();
  5565. void EnableLayoutUpdate();
  5566. void BringToFront();
  5567. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5568. void AddChild(UIElement);
  5569. void InsertChild(uint, UIElement);
  5570. void RemoveChild(UIElement, uint = 0);
  5571. void RemoveChild(uint);
  5572. void RemoveAllChildren();
  5573. void Remove();
  5574. uint FindChild(UIElement) const;
  5575. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5576. UIElement GetChild(const String&, bool = false) const;
  5577. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  5578. Array<UIElement> GetChildren(bool = false) const;
  5579. UIElement GetElementEventSender() const;
  5580. const Variant& GetVar(const ShortStringHash&);
  5581. IntVector2 ScreenToElement(const IntVector2&);
  5582. IntVector2 ElementToScreen(const IntVector2&);
  5583. bool IsInside(IntVector2, bool);
  5584. bool IsInsideCombined(IntVector2, bool);
  5585. void SetViewPosition(int, int);
  5586. void SetScrollBarsVisible(bool, bool);
  5587. // Properties:
  5588. /* (readonly) */
  5589. int refs;
  5590. /* (readonly) */
  5591. int weakRefs;
  5592. /* (readonly) */
  5593. ShortStringHash type;
  5594. /* (readonly) */
  5595. ShortStringHash baseType;
  5596. /* (readonly) */
  5597. String typeName;
  5598. /* (readonly) */
  5599. String category;
  5600. /* (readonly) */
  5601. uint numAttributes;
  5602. Array<Variant> attributes;
  5603. /* (readonly) */
  5604. Array<Variant> attributeDefaults;
  5605. /* (readonly) */
  5606. Array<AttributeInfo> attributeInfos;
  5607. bool temporary;
  5608. String style;
  5609. String name;
  5610. IntVector2 position;
  5611. IntVector2 size;
  5612. int width;
  5613. int height;
  5614. IntVector2 minSize;
  5615. int minWidth;
  5616. int minHeight;
  5617. IntVector2 maxSize;
  5618. int maxWidth;
  5619. int maxHeight;
  5620. /* (readonly) */
  5621. bool fixedSize;
  5622. /* (readonly) */
  5623. bool fixedWidth;
  5624. /* (readonly) */
  5625. bool fixedHeight;
  5626. HorizontalAlignment horizontalAlignment;
  5627. VerticalAlignment verticalAlignment;
  5628. IntRect clipBorder;
  5629. /* (writeonly) */
  5630. Color color;
  5631. Array<Color> colors;
  5632. int priority;
  5633. float opacity;
  5634. bool bringToFront;
  5635. bool bringToBack;
  5636. bool clipChildren;
  5637. bool sortChildren;
  5638. bool useDerivedOpacity;
  5639. bool enabled;
  5640. bool editable;
  5641. bool focus;
  5642. bool selected;
  5643. bool visible;
  5644. /* (readonly) */
  5645. bool hovering;
  5646. bool internal;
  5647. /* (readonly) */
  5648. bool colorGradient;
  5649. FocusMode focusMode;
  5650. uint dragDropMode;
  5651. TraversalMode traversalMode;
  5652. XMLFile defaultStyle;
  5653. LayoutMode layoutMode;
  5654. int layoutSpacing;
  5655. IntRect layoutBorder;
  5656. int indent;
  5657. int indentSpacing;
  5658. /* (readonly) */
  5659. int indentWidth;
  5660. /* (readonly) */
  5661. IntVector2 childOffset;
  5662. bool elementEventSender;
  5663. /* (readonly) */
  5664. Array<uint> numChildren;
  5665. /* (readonly) */
  5666. uint numAllChildren;
  5667. /* (readonly) */
  5668. Array<UIElement> children;
  5669. UIElement parent;
  5670. /* (readonly) */
  5671. UIElement root;
  5672. /* (readonly) */
  5673. IntVector2 screenPosition;
  5674. /* (readonly) */
  5675. IntRect combinedScreenRect;
  5676. /* (readonly) */
  5677. float derivedOpacity;
  5678. /* (readonly) */
  5679. VariantMap vars;
  5680. UIElement contentElement;
  5681. IntVector2 viewPosition;
  5682. float scrollStep;
  5683. float pageStep;
  5684. /* (readonly) */
  5685. ScrollBar horizontalScrollBar;
  5686. /* (readonly) */
  5687. ScrollBar verticalScrollBar;
  5688. /* (readonly) */
  5689. BorderImage scrollPanel;
  5690. bool scrollBarsAutoVisible;
  5691. };
  5692. class ListView
  5693. {
  5694. // Methods:
  5695. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5696. bool Load(File, bool = false);
  5697. bool Save(File) const;
  5698. bool LoadXML(const XMLElement&, bool = false);
  5699. bool SaveXML(XMLElement&) const;
  5700. void ApplyAttributes();
  5701. bool SetAttribute(const String&, const Variant&);
  5702. void ResetToDefault();
  5703. void RemoveInstanceDefault();
  5704. Variant GetAttribute(const String&) const;
  5705. Variant GetAttributeDefault(const String&) const;
  5706. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5707. bool LoadXML(File);
  5708. bool LoadXML(XMLFile, XMLFile);
  5709. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5710. bool LoadChildXML(XMLFile, XMLFile = null);
  5711. bool SaveXML(File);
  5712. bool SetStyle(const XMLElement&);
  5713. bool SetStyle(const String&, XMLFile = null);
  5714. bool SetStyleAuto(XMLFile = null);
  5715. void SetPosition(int, int);
  5716. void SetSize(int, int);
  5717. void SetMinSize(int, int);
  5718. void SetMaxSize(int, int);
  5719. void SetFixedSize(int, int);
  5720. void SetFixedWidth(int);
  5721. void SetFixedHeight(int);
  5722. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5723. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5724. void UpdateLayout();
  5725. void DisableLayoutUpdate();
  5726. void EnableLayoutUpdate();
  5727. void BringToFront();
  5728. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5729. void AddChild(UIElement);
  5730. void InsertChild(uint, UIElement);
  5731. void RemoveChild(UIElement, uint = 0);
  5732. void RemoveChild(uint);
  5733. void RemoveAllChildren();
  5734. void Remove();
  5735. uint FindChild(UIElement) const;
  5736. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5737. UIElement GetChild(const String&, bool = false) const;
  5738. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  5739. Array<UIElement> GetChildren(bool = false) const;
  5740. UIElement GetElementEventSender() const;
  5741. const Variant& GetVar(const ShortStringHash&);
  5742. IntVector2 ScreenToElement(const IntVector2&);
  5743. IntVector2 ElementToScreen(const IntVector2&);
  5744. bool IsInside(IntVector2, bool);
  5745. bool IsInsideCombined(IntVector2, bool);
  5746. void SetViewPosition(int, int);
  5747. void SetScrollBarsVisible(bool, bool);
  5748. void AddItem(UIElement);
  5749. void InsertItem(uint, UIElement, UIElement = null);
  5750. void RemoveItem(UIElement, uint = 0);
  5751. void RemoveItem(uint);
  5752. void RemoveAllItems();
  5753. void AddSelection(uint);
  5754. void RemoveSelection(uint);
  5755. void ToggleSelection(uint);
  5756. void ChangeSelection(int, bool);
  5757. void SetSelections(Array<uint>);
  5758. void ClearSelection();
  5759. void Expand(uint, bool, bool = false);
  5760. void ToggleExpand(uint, bool = false);
  5761. bool IsSelected(uint) const;
  5762. bool IsExpanded(uint) const;
  5763. Array<UIElement> GetItems() const;
  5764. uint FindItem(UIElement);
  5765. // Properties:
  5766. /* (readonly) */
  5767. int refs;
  5768. /* (readonly) */
  5769. int weakRefs;
  5770. /* (readonly) */
  5771. ShortStringHash type;
  5772. /* (readonly) */
  5773. ShortStringHash baseType;
  5774. /* (readonly) */
  5775. String typeName;
  5776. /* (readonly) */
  5777. String category;
  5778. /* (readonly) */
  5779. uint numAttributes;
  5780. Array<Variant> attributes;
  5781. /* (readonly) */
  5782. Array<Variant> attributeDefaults;
  5783. /* (readonly) */
  5784. Array<AttributeInfo> attributeInfos;
  5785. bool temporary;
  5786. String style;
  5787. String name;
  5788. IntVector2 position;
  5789. IntVector2 size;
  5790. int width;
  5791. int height;
  5792. IntVector2 minSize;
  5793. int minWidth;
  5794. int minHeight;
  5795. IntVector2 maxSize;
  5796. int maxWidth;
  5797. int maxHeight;
  5798. /* (readonly) */
  5799. bool fixedSize;
  5800. /* (readonly) */
  5801. bool fixedWidth;
  5802. /* (readonly) */
  5803. bool fixedHeight;
  5804. HorizontalAlignment horizontalAlignment;
  5805. VerticalAlignment verticalAlignment;
  5806. IntRect clipBorder;
  5807. /* (writeonly) */
  5808. Color color;
  5809. Array<Color> colors;
  5810. int priority;
  5811. float opacity;
  5812. bool bringToFront;
  5813. bool bringToBack;
  5814. bool clipChildren;
  5815. bool sortChildren;
  5816. bool useDerivedOpacity;
  5817. bool enabled;
  5818. bool editable;
  5819. bool focus;
  5820. bool selected;
  5821. bool visible;
  5822. /* (readonly) */
  5823. bool hovering;
  5824. bool internal;
  5825. /* (readonly) */
  5826. bool colorGradient;
  5827. FocusMode focusMode;
  5828. uint dragDropMode;
  5829. TraversalMode traversalMode;
  5830. XMLFile defaultStyle;
  5831. LayoutMode layoutMode;
  5832. int layoutSpacing;
  5833. IntRect layoutBorder;
  5834. int indent;
  5835. int indentSpacing;
  5836. /* (readonly) */
  5837. int indentWidth;
  5838. /* (readonly) */
  5839. IntVector2 childOffset;
  5840. bool elementEventSender;
  5841. /* (readonly) */
  5842. Array<uint> numChildren;
  5843. /* (readonly) */
  5844. uint numAllChildren;
  5845. /* (readonly) */
  5846. Array<UIElement> children;
  5847. UIElement parent;
  5848. /* (readonly) */
  5849. UIElement root;
  5850. /* (readonly) */
  5851. IntVector2 screenPosition;
  5852. /* (readonly) */
  5853. IntRect combinedScreenRect;
  5854. /* (readonly) */
  5855. float derivedOpacity;
  5856. /* (readonly) */
  5857. VariantMap vars;
  5858. IntVector2 viewPosition;
  5859. /* (readonly) */
  5860. UIElement contentElement;
  5861. /* (readonly) */
  5862. ScrollBar horizontalScrollBar;
  5863. /* (readonly) */
  5864. ScrollBar verticalScrollBar;
  5865. /* (readonly) */
  5866. BorderImage scrollPanel;
  5867. bool scrollBarsAutoVisible;
  5868. float scrollStep;
  5869. float pageStep;
  5870. /* (readonly) */
  5871. uint numItems;
  5872. /* (readonly) */
  5873. Array<UIElement> items;
  5874. uint selection;
  5875. /* (readonly) */
  5876. Array<uint> selections;
  5877. /* (readonly) */
  5878. UIElement selectedItem;
  5879. /* (readonly) */
  5880. Array<UIElement> selectedItems;
  5881. HighlightMode highlightMode;
  5882. bool multiselect;
  5883. bool hierarchyMode;
  5884. int baseIndent;
  5885. bool clearSelectionOnDefocus;
  5886. };
  5887. class Text
  5888. {
  5889. // Methods:
  5890. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5891. bool Load(File, bool = false);
  5892. bool Save(File) const;
  5893. bool LoadXML(const XMLElement&, bool = false);
  5894. bool SaveXML(XMLElement&) const;
  5895. void ApplyAttributes();
  5896. bool SetAttribute(const String&, const Variant&);
  5897. void ResetToDefault();
  5898. void RemoveInstanceDefault();
  5899. Variant GetAttribute(const String&) const;
  5900. Variant GetAttributeDefault(const String&) const;
  5901. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5902. bool LoadXML(File);
  5903. bool LoadXML(XMLFile, XMLFile);
  5904. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5905. bool LoadChildXML(XMLFile, XMLFile = null);
  5906. bool SaveXML(File);
  5907. bool SetStyle(const XMLElement&);
  5908. bool SetStyle(const String&, XMLFile = null);
  5909. bool SetStyleAuto(XMLFile = null);
  5910. void SetPosition(int, int);
  5911. void SetSize(int, int);
  5912. void SetMinSize(int, int);
  5913. void SetMaxSize(int, int);
  5914. void SetFixedSize(int, int);
  5915. void SetFixedWidth(int);
  5916. void SetFixedHeight(int);
  5917. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5918. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5919. void UpdateLayout();
  5920. void DisableLayoutUpdate();
  5921. void EnableLayoutUpdate();
  5922. void BringToFront();
  5923. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5924. void AddChild(UIElement);
  5925. void InsertChild(uint, UIElement);
  5926. void RemoveChild(UIElement, uint = 0);
  5927. void RemoveChild(uint);
  5928. void RemoveAllChildren();
  5929. void Remove();
  5930. uint FindChild(UIElement) const;
  5931. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5932. UIElement GetChild(const String&, bool = false) const;
  5933. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  5934. Array<UIElement> GetChildren(bool = false) const;
  5935. UIElement GetElementEventSender() const;
  5936. const Variant& GetVar(const ShortStringHash&);
  5937. IntVector2 ScreenToElement(const IntVector2&);
  5938. IntVector2 ElementToScreen(const IntVector2&);
  5939. bool IsInside(IntVector2, bool);
  5940. bool IsInsideCombined(IntVector2, bool);
  5941. bool SetFont(const String&, int);
  5942. bool SetFont(Font, int);
  5943. void SetSelection(uint, uint = M_MAX_UNSIGNED);
  5944. void ClearSelection();
  5945. // Properties:
  5946. /* (readonly) */
  5947. int refs;
  5948. /* (readonly) */
  5949. int weakRefs;
  5950. /* (readonly) */
  5951. ShortStringHash type;
  5952. /* (readonly) */
  5953. ShortStringHash baseType;
  5954. /* (readonly) */
  5955. String typeName;
  5956. /* (readonly) */
  5957. String category;
  5958. /* (readonly) */
  5959. uint numAttributes;
  5960. Array<Variant> attributes;
  5961. /* (readonly) */
  5962. Array<Variant> attributeDefaults;
  5963. /* (readonly) */
  5964. Array<AttributeInfo> attributeInfos;
  5965. bool temporary;
  5966. String style;
  5967. String name;
  5968. IntVector2 position;
  5969. IntVector2 size;
  5970. int width;
  5971. int height;
  5972. IntVector2 minSize;
  5973. int minWidth;
  5974. int minHeight;
  5975. IntVector2 maxSize;
  5976. int maxWidth;
  5977. int maxHeight;
  5978. /* (readonly) */
  5979. bool fixedSize;
  5980. /* (readonly) */
  5981. bool fixedWidth;
  5982. /* (readonly) */
  5983. bool fixedHeight;
  5984. HorizontalAlignment horizontalAlignment;
  5985. VerticalAlignment verticalAlignment;
  5986. IntRect clipBorder;
  5987. /* (writeonly) */
  5988. Color color;
  5989. Array<Color> colors;
  5990. int priority;
  5991. float opacity;
  5992. bool bringToFront;
  5993. bool bringToBack;
  5994. bool clipChildren;
  5995. bool sortChildren;
  5996. bool useDerivedOpacity;
  5997. bool enabled;
  5998. bool editable;
  5999. bool focus;
  6000. bool selected;
  6001. bool visible;
  6002. /* (readonly) */
  6003. bool hovering;
  6004. bool internal;
  6005. /* (readonly) */
  6006. bool colorGradient;
  6007. FocusMode focusMode;
  6008. uint dragDropMode;
  6009. TraversalMode traversalMode;
  6010. XMLFile defaultStyle;
  6011. LayoutMode layoutMode;
  6012. int layoutSpacing;
  6013. IntRect layoutBorder;
  6014. int indent;
  6015. int indentSpacing;
  6016. /* (readonly) */
  6017. int indentWidth;
  6018. /* (readonly) */
  6019. IntVector2 childOffset;
  6020. bool elementEventSender;
  6021. /* (readonly) */
  6022. Array<uint> numChildren;
  6023. /* (readonly) */
  6024. uint numAllChildren;
  6025. /* (readonly) */
  6026. Array<UIElement> children;
  6027. UIElement parent;
  6028. /* (readonly) */
  6029. UIElement root;
  6030. /* (readonly) */
  6031. IntVector2 screenPosition;
  6032. /* (readonly) */
  6033. IntRect combinedScreenRect;
  6034. /* (readonly) */
  6035. float derivedOpacity;
  6036. /* (readonly) */
  6037. VariantMap vars;
  6038. /* (readonly) */
  6039. Font font;
  6040. /* (readonly) */
  6041. int fontSize;
  6042. String text;
  6043. HorizontalAlignment textAlignment;
  6044. float rowSpacing;
  6045. bool wordwrap;
  6046. /* (readonly) */
  6047. uint selectionStart;
  6048. /* (readonly) */
  6049. uint selectionLength;
  6050. Color selectionColor;
  6051. Color hoverColor;
  6052. TextEffect textEffect;
  6053. Color effectColor;
  6054. /* (readonly) */
  6055. uint numRows;
  6056. /* (readonly) */
  6057. int rowHeight;
  6058. };
  6059. class Text3D
  6060. {
  6061. // Methods:
  6062. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6063. bool Load(File, bool = false);
  6064. bool Save(File) const;
  6065. bool LoadXML(const XMLElement&, bool = false);
  6066. bool SaveXML(XMLElement&) const;
  6067. void ApplyAttributes();
  6068. bool SetAttribute(const String&, const Variant&);
  6069. void ResetToDefault();
  6070. void RemoveInstanceDefault();
  6071. Variant GetAttribute(const String&) const;
  6072. Variant GetAttributeDefault(const String&) const;
  6073. void Remove();
  6074. void MarkNetworkUpdate() const;
  6075. void DrawDebugGeometry(DebugRenderer, bool);
  6076. bool SetFont(const String&, int);
  6077. bool SetFont(Font, int);
  6078. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6079. // Properties:
  6080. /* (readonly) */
  6081. int refs;
  6082. /* (readonly) */
  6083. int weakRefs;
  6084. /* (readonly) */
  6085. ShortStringHash type;
  6086. /* (readonly) */
  6087. ShortStringHash baseType;
  6088. /* (readonly) */
  6089. String typeName;
  6090. /* (readonly) */
  6091. String category;
  6092. /* (readonly) */
  6093. uint numAttributes;
  6094. Array<Variant> attributes;
  6095. /* (readonly) */
  6096. Array<Variant> attributeDefaults;
  6097. /* (readonly) */
  6098. Array<AttributeInfo> attributeInfos;
  6099. bool temporary;
  6100. bool enabled;
  6101. /* (readonly) */
  6102. bool enabledEffective;
  6103. /* (readonly) */
  6104. uint id;
  6105. /* (readonly) */
  6106. Node node;
  6107. /* (readonly) */
  6108. bool inView;
  6109. bool castShadows;
  6110. bool occluder;
  6111. bool occludee;
  6112. float drawDistance;
  6113. float shadowDistance;
  6114. float lodBias;
  6115. uint viewMask;
  6116. uint lightMask;
  6117. uint shadowMask;
  6118. uint zoneMask;
  6119. uint maxLights;
  6120. /* (readonly) */
  6121. BoundingBox boundingBox;
  6122. /* (readonly) */
  6123. BoundingBox worldBoundingBox;
  6124. /* (readonly) */
  6125. Font font;
  6126. /* (readonly) */
  6127. int fontSize;
  6128. Material material;
  6129. String text;
  6130. HorizontalAlignment textAlignment;
  6131. HorizontalAlignment horizontalAlignment;
  6132. VerticalAlignment verticalAlignment;
  6133. float rowSpacing;
  6134. bool wordwrap;
  6135. TextEffect textEffect;
  6136. Color effectColor;
  6137. float effectDepthBias;
  6138. int width;
  6139. /* (writeonly) */
  6140. Color color;
  6141. Array<Color> colors;
  6142. float opacity;
  6143. bool faceCamera;
  6144. /* (readonly) */
  6145. uint numRows;
  6146. /* (readonly) */
  6147. int rowHeight;
  6148. };
  6149. class LineEdit
  6150. {
  6151. // Methods:
  6152. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6153. bool Load(File, bool = false);
  6154. bool Save(File) const;
  6155. bool LoadXML(const XMLElement&, bool = false);
  6156. bool SaveXML(XMLElement&) const;
  6157. void ApplyAttributes();
  6158. bool SetAttribute(const String&, const Variant&);
  6159. void ResetToDefault();
  6160. void RemoveInstanceDefault();
  6161. Variant GetAttribute(const String&) const;
  6162. Variant GetAttributeDefault(const String&) const;
  6163. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6164. bool LoadXML(File);
  6165. bool LoadXML(XMLFile, XMLFile);
  6166. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6167. bool LoadChildXML(XMLFile, XMLFile = null);
  6168. bool SaveXML(File);
  6169. bool SetStyle(const XMLElement&);
  6170. bool SetStyle(const String&, XMLFile = null);
  6171. bool SetStyleAuto(XMLFile = null);
  6172. void SetPosition(int, int);
  6173. void SetSize(int, int);
  6174. void SetMinSize(int, int);
  6175. void SetMaxSize(int, int);
  6176. void SetFixedSize(int, int);
  6177. void SetFixedWidth(int);
  6178. void SetFixedHeight(int);
  6179. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6180. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6181. void UpdateLayout();
  6182. void DisableLayoutUpdate();
  6183. void EnableLayoutUpdate();
  6184. void BringToFront();
  6185. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6186. void AddChild(UIElement);
  6187. void InsertChild(uint, UIElement);
  6188. void RemoveChild(UIElement, uint = 0);
  6189. void RemoveChild(uint);
  6190. void RemoveAllChildren();
  6191. void Remove();
  6192. uint FindChild(UIElement) const;
  6193. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6194. UIElement GetChild(const String&, bool = false) const;
  6195. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  6196. Array<UIElement> GetChildren(bool = false) const;
  6197. UIElement GetElementEventSender() const;
  6198. const Variant& GetVar(const ShortStringHash&);
  6199. IntVector2 ScreenToElement(const IntVector2&);
  6200. IntVector2 ElementToScreen(const IntVector2&);
  6201. bool IsInside(IntVector2, bool);
  6202. bool IsInsideCombined(IntVector2, bool);
  6203. void SetFullImageRect();
  6204. void SetHoverOffset(int, int);
  6205. // Properties:
  6206. /* (readonly) */
  6207. int refs;
  6208. /* (readonly) */
  6209. int weakRefs;
  6210. /* (readonly) */
  6211. ShortStringHash type;
  6212. /* (readonly) */
  6213. ShortStringHash baseType;
  6214. /* (readonly) */
  6215. String typeName;
  6216. /* (readonly) */
  6217. String category;
  6218. /* (readonly) */
  6219. uint numAttributes;
  6220. Array<Variant> attributes;
  6221. /* (readonly) */
  6222. Array<Variant> attributeDefaults;
  6223. /* (readonly) */
  6224. Array<AttributeInfo> attributeInfos;
  6225. bool temporary;
  6226. String style;
  6227. String name;
  6228. IntVector2 position;
  6229. IntVector2 size;
  6230. int width;
  6231. int height;
  6232. IntVector2 minSize;
  6233. int minWidth;
  6234. int minHeight;
  6235. IntVector2 maxSize;
  6236. int maxWidth;
  6237. int maxHeight;
  6238. /* (readonly) */
  6239. bool fixedSize;
  6240. /* (readonly) */
  6241. bool fixedWidth;
  6242. /* (readonly) */
  6243. bool fixedHeight;
  6244. HorizontalAlignment horizontalAlignment;
  6245. VerticalAlignment verticalAlignment;
  6246. IntRect clipBorder;
  6247. /* (writeonly) */
  6248. Color color;
  6249. Array<Color> colors;
  6250. int priority;
  6251. float opacity;
  6252. bool bringToFront;
  6253. bool bringToBack;
  6254. bool clipChildren;
  6255. bool sortChildren;
  6256. bool useDerivedOpacity;
  6257. bool enabled;
  6258. bool editable;
  6259. bool focus;
  6260. bool selected;
  6261. bool visible;
  6262. /* (readonly) */
  6263. bool hovering;
  6264. bool internal;
  6265. /* (readonly) */
  6266. bool colorGradient;
  6267. FocusMode focusMode;
  6268. uint dragDropMode;
  6269. TraversalMode traversalMode;
  6270. XMLFile defaultStyle;
  6271. LayoutMode layoutMode;
  6272. int layoutSpacing;
  6273. IntRect layoutBorder;
  6274. int indent;
  6275. int indentSpacing;
  6276. /* (readonly) */
  6277. int indentWidth;
  6278. /* (readonly) */
  6279. IntVector2 childOffset;
  6280. bool elementEventSender;
  6281. /* (readonly) */
  6282. Array<uint> numChildren;
  6283. /* (readonly) */
  6284. uint numAllChildren;
  6285. /* (readonly) */
  6286. Array<UIElement> children;
  6287. UIElement parent;
  6288. /* (readonly) */
  6289. UIElement root;
  6290. /* (readonly) */
  6291. IntVector2 screenPosition;
  6292. /* (readonly) */
  6293. IntRect combinedScreenRect;
  6294. /* (readonly) */
  6295. float derivedOpacity;
  6296. /* (readonly) */
  6297. VariantMap vars;
  6298. Texture texture;
  6299. IntRect imageRect;
  6300. IntRect border;
  6301. IntVector2 hoverOffset;
  6302. BlendMode blendMode;
  6303. bool tiled;
  6304. String text;
  6305. uint cursorPosition;
  6306. float cursorBlinkRate;
  6307. uint maxLength;
  6308. uint echoCharacter;
  6309. bool cursorMovable;
  6310. bool textSelectable;
  6311. bool textCopyable;
  6312. /* (readonly) */
  6313. Text textElement;
  6314. /* (readonly) */
  6315. BorderImage cursor;
  6316. };
  6317. class Menu
  6318. {
  6319. // Methods:
  6320. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6321. bool Load(File, bool = false);
  6322. bool Save(File) const;
  6323. bool LoadXML(const XMLElement&, bool = false);
  6324. bool SaveXML(XMLElement&) const;
  6325. void ApplyAttributes();
  6326. bool SetAttribute(const String&, const Variant&);
  6327. void ResetToDefault();
  6328. void RemoveInstanceDefault();
  6329. Variant GetAttribute(const String&) const;
  6330. Variant GetAttributeDefault(const String&) const;
  6331. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6332. bool LoadXML(File);
  6333. bool LoadXML(XMLFile, XMLFile);
  6334. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6335. bool LoadChildXML(XMLFile, XMLFile = null);
  6336. bool SaveXML(File);
  6337. bool SetStyle(const XMLElement&);
  6338. bool SetStyle(const String&, XMLFile = null);
  6339. bool SetStyleAuto(XMLFile = null);
  6340. void SetPosition(int, int);
  6341. void SetSize(int, int);
  6342. void SetMinSize(int, int);
  6343. void SetMaxSize(int, int);
  6344. void SetFixedSize(int, int);
  6345. void SetFixedWidth(int);
  6346. void SetFixedHeight(int);
  6347. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6348. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6349. void UpdateLayout();
  6350. void DisableLayoutUpdate();
  6351. void EnableLayoutUpdate();
  6352. void BringToFront();
  6353. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6354. void AddChild(UIElement);
  6355. void InsertChild(uint, UIElement);
  6356. void RemoveChild(UIElement, uint = 0);
  6357. void RemoveChild(uint);
  6358. void RemoveAllChildren();
  6359. void Remove();
  6360. uint FindChild(UIElement) const;
  6361. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6362. UIElement GetChild(const String&, bool = false) const;
  6363. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  6364. Array<UIElement> GetChildren(bool = false) const;
  6365. UIElement GetElementEventSender() const;
  6366. const Variant& GetVar(const ShortStringHash&);
  6367. IntVector2 ScreenToElement(const IntVector2&);
  6368. IntVector2 ElementToScreen(const IntVector2&);
  6369. bool IsInside(IntVector2, bool);
  6370. bool IsInsideCombined(IntVector2, bool);
  6371. void SetFullImageRect();
  6372. void SetHoverOffset(int, int);
  6373. void SetPressedOffset(int, int);
  6374. void SetPressedChildOffset(int, int);
  6375. void SetRepeat(float, float);
  6376. void SetPopupOffset(int, int);
  6377. void SetAccelerator(int, int);
  6378. // Properties:
  6379. /* (readonly) */
  6380. int refs;
  6381. /* (readonly) */
  6382. int weakRefs;
  6383. /* (readonly) */
  6384. ShortStringHash type;
  6385. /* (readonly) */
  6386. ShortStringHash baseType;
  6387. /* (readonly) */
  6388. String typeName;
  6389. /* (readonly) */
  6390. String category;
  6391. /* (readonly) */
  6392. uint numAttributes;
  6393. Array<Variant> attributes;
  6394. /* (readonly) */
  6395. Array<Variant> attributeDefaults;
  6396. /* (readonly) */
  6397. Array<AttributeInfo> attributeInfos;
  6398. bool temporary;
  6399. String style;
  6400. String name;
  6401. IntVector2 position;
  6402. IntVector2 size;
  6403. int width;
  6404. int height;
  6405. IntVector2 minSize;
  6406. int minWidth;
  6407. int minHeight;
  6408. IntVector2 maxSize;
  6409. int maxWidth;
  6410. int maxHeight;
  6411. /* (readonly) */
  6412. bool fixedSize;
  6413. /* (readonly) */
  6414. bool fixedWidth;
  6415. /* (readonly) */
  6416. bool fixedHeight;
  6417. HorizontalAlignment horizontalAlignment;
  6418. VerticalAlignment verticalAlignment;
  6419. IntRect clipBorder;
  6420. /* (writeonly) */
  6421. Color color;
  6422. Array<Color> colors;
  6423. int priority;
  6424. float opacity;
  6425. bool bringToFront;
  6426. bool bringToBack;
  6427. bool clipChildren;
  6428. bool sortChildren;
  6429. bool useDerivedOpacity;
  6430. bool enabled;
  6431. bool editable;
  6432. bool focus;
  6433. bool selected;
  6434. bool visible;
  6435. /* (readonly) */
  6436. bool hovering;
  6437. bool internal;
  6438. /* (readonly) */
  6439. bool colorGradient;
  6440. FocusMode focusMode;
  6441. uint dragDropMode;
  6442. TraversalMode traversalMode;
  6443. XMLFile defaultStyle;
  6444. LayoutMode layoutMode;
  6445. int layoutSpacing;
  6446. IntRect layoutBorder;
  6447. int indent;
  6448. int indentSpacing;
  6449. /* (readonly) */
  6450. int indentWidth;
  6451. /* (readonly) */
  6452. IntVector2 childOffset;
  6453. bool elementEventSender;
  6454. /* (readonly) */
  6455. Array<uint> numChildren;
  6456. /* (readonly) */
  6457. uint numAllChildren;
  6458. /* (readonly) */
  6459. Array<UIElement> children;
  6460. UIElement parent;
  6461. /* (readonly) */
  6462. UIElement root;
  6463. /* (readonly) */
  6464. IntVector2 screenPosition;
  6465. /* (readonly) */
  6466. IntRect combinedScreenRect;
  6467. /* (readonly) */
  6468. float derivedOpacity;
  6469. /* (readonly) */
  6470. VariantMap vars;
  6471. Texture texture;
  6472. IntRect imageRect;
  6473. IntRect border;
  6474. IntVector2 hoverOffset;
  6475. BlendMode blendMode;
  6476. bool tiled;
  6477. IntVector2 pressedOffset;
  6478. IntVector2 pressedChildOffset;
  6479. float repeatDelay;
  6480. float repeatRate;
  6481. /* (readonly) */
  6482. bool pressed;
  6483. UIElement popup;
  6484. IntVector2 popupOffset;
  6485. bool showPopup;
  6486. /* (readonly) */
  6487. int acceleratorKey;
  6488. /* (readonly) */
  6489. int acceleratorQualifiers;
  6490. };
  6491. class DropDownList
  6492. {
  6493. // Methods:
  6494. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6495. bool Load(File, bool = false);
  6496. bool Save(File) const;
  6497. bool LoadXML(const XMLElement&, bool = false);
  6498. bool SaveXML(XMLElement&) const;
  6499. void ApplyAttributes();
  6500. bool SetAttribute(const String&, const Variant&);
  6501. void ResetToDefault();
  6502. void RemoveInstanceDefault();
  6503. Variant GetAttribute(const String&) const;
  6504. Variant GetAttributeDefault(const String&) const;
  6505. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6506. bool LoadXML(File);
  6507. bool LoadXML(XMLFile, XMLFile);
  6508. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6509. bool LoadChildXML(XMLFile, XMLFile = null);
  6510. bool SaveXML(File);
  6511. bool SetStyle(const XMLElement&);
  6512. bool SetStyle(const String&, XMLFile = null);
  6513. bool SetStyleAuto(XMLFile = null);
  6514. void SetPosition(int, int);
  6515. void SetSize(int, int);
  6516. void SetMinSize(int, int);
  6517. void SetMaxSize(int, int);
  6518. void SetFixedSize(int, int);
  6519. void SetFixedWidth(int);
  6520. void SetFixedHeight(int);
  6521. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6522. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6523. void UpdateLayout();
  6524. void DisableLayoutUpdate();
  6525. void EnableLayoutUpdate();
  6526. void BringToFront();
  6527. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6528. void AddChild(UIElement);
  6529. void InsertChild(uint, UIElement);
  6530. void RemoveChild(UIElement, uint = 0);
  6531. void RemoveChild(uint);
  6532. void RemoveAllChildren();
  6533. void Remove();
  6534. uint FindChild(UIElement) const;
  6535. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6536. UIElement GetChild(const String&, bool = false) const;
  6537. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  6538. Array<UIElement> GetChildren(bool = false) const;
  6539. UIElement GetElementEventSender() const;
  6540. const Variant& GetVar(const ShortStringHash&);
  6541. IntVector2 ScreenToElement(const IntVector2&);
  6542. IntVector2 ElementToScreen(const IntVector2&);
  6543. bool IsInside(IntVector2, bool);
  6544. bool IsInsideCombined(IntVector2, bool);
  6545. void SetFullImageRect();
  6546. void SetHoverOffset(int, int);
  6547. void SetPressedOffset(int, int);
  6548. void SetPressedChildOffset(int, int);
  6549. void SetRepeat(float, float);
  6550. void SetAccelerator(int, int);
  6551. void AddItem(UIElement);
  6552. void InsertItem(uint, UIElement);
  6553. void RemoveItem(UIElement);
  6554. void RemoveItem(uint);
  6555. void RemoveAllItems();
  6556. Array<UIElement> GetItems() const;
  6557. UIElement getPopup() const;
  6558. // Properties:
  6559. /* (readonly) */
  6560. int refs;
  6561. /* (readonly) */
  6562. int weakRefs;
  6563. /* (readonly) */
  6564. ShortStringHash type;
  6565. /* (readonly) */
  6566. ShortStringHash baseType;
  6567. /* (readonly) */
  6568. String typeName;
  6569. /* (readonly) */
  6570. String category;
  6571. /* (readonly) */
  6572. uint numAttributes;
  6573. Array<Variant> attributes;
  6574. /* (readonly) */
  6575. Array<Variant> attributeDefaults;
  6576. /* (readonly) */
  6577. Array<AttributeInfo> attributeInfos;
  6578. bool temporary;
  6579. String style;
  6580. String name;
  6581. IntVector2 position;
  6582. IntVector2 size;
  6583. int width;
  6584. int height;
  6585. IntVector2 minSize;
  6586. int minWidth;
  6587. int minHeight;
  6588. IntVector2 maxSize;
  6589. int maxWidth;
  6590. int maxHeight;
  6591. /* (readonly) */
  6592. bool fixedSize;
  6593. /* (readonly) */
  6594. bool fixedWidth;
  6595. /* (readonly) */
  6596. bool fixedHeight;
  6597. HorizontalAlignment horizontalAlignment;
  6598. VerticalAlignment verticalAlignment;
  6599. IntRect clipBorder;
  6600. /* (writeonly) */
  6601. Color color;
  6602. Array<Color> colors;
  6603. int priority;
  6604. float opacity;
  6605. bool bringToFront;
  6606. bool bringToBack;
  6607. bool clipChildren;
  6608. bool sortChildren;
  6609. bool useDerivedOpacity;
  6610. bool enabled;
  6611. bool editable;
  6612. bool focus;
  6613. bool selected;
  6614. bool visible;
  6615. /* (readonly) */
  6616. bool hovering;
  6617. bool internal;
  6618. /* (readonly) */
  6619. bool colorGradient;
  6620. FocusMode focusMode;
  6621. uint dragDropMode;
  6622. TraversalMode traversalMode;
  6623. XMLFile defaultStyle;
  6624. LayoutMode layoutMode;
  6625. int layoutSpacing;
  6626. IntRect layoutBorder;
  6627. int indent;
  6628. int indentSpacing;
  6629. /* (readonly) */
  6630. int indentWidth;
  6631. /* (readonly) */
  6632. IntVector2 childOffset;
  6633. bool elementEventSender;
  6634. /* (readonly) */
  6635. Array<uint> numChildren;
  6636. /* (readonly) */
  6637. uint numAllChildren;
  6638. /* (readonly) */
  6639. Array<UIElement> children;
  6640. UIElement parent;
  6641. /* (readonly) */
  6642. UIElement root;
  6643. /* (readonly) */
  6644. IntVector2 screenPosition;
  6645. /* (readonly) */
  6646. IntRect combinedScreenRect;
  6647. /* (readonly) */
  6648. float derivedOpacity;
  6649. /* (readonly) */
  6650. VariantMap vars;
  6651. Texture texture;
  6652. IntRect imageRect;
  6653. IntRect border;
  6654. IntVector2 hoverOffset;
  6655. BlendMode blendMode;
  6656. bool tiled;
  6657. IntVector2 pressedOffset;
  6658. IntVector2 pressedChildOffset;
  6659. float repeatDelay;
  6660. float repeatRate;
  6661. /* (readonly) */
  6662. bool pressed;
  6663. bool showPopup;
  6664. uint selection;
  6665. bool resizePopup;
  6666. /* (readonly) */
  6667. int acceleratorKey;
  6668. /* (readonly) */
  6669. int acceleratorQualifiers;
  6670. /* (readonly) */
  6671. uint numItems;
  6672. /* (readonly) */
  6673. Array<UIElement> items;
  6674. /* (readonly) */
  6675. UIElement selectedItem;
  6676. /* (readonly) */
  6677. ListView listView;
  6678. /* (readonly) */
  6679. UIElement placeholder;
  6680. String placeholderText;
  6681. };
  6682. class Window
  6683. {
  6684. // Methods:
  6685. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6686. bool Load(File, bool = false);
  6687. bool Save(File) const;
  6688. bool LoadXML(const XMLElement&, bool = false);
  6689. bool SaveXML(XMLElement&) const;
  6690. void ApplyAttributes();
  6691. bool SetAttribute(const String&, const Variant&);
  6692. void ResetToDefault();
  6693. void RemoveInstanceDefault();
  6694. Variant GetAttribute(const String&) const;
  6695. Variant GetAttributeDefault(const String&) const;
  6696. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6697. bool LoadXML(File);
  6698. bool LoadXML(XMLFile, XMLFile);
  6699. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6700. bool LoadChildXML(XMLFile, XMLFile = null);
  6701. bool SaveXML(File);
  6702. bool SetStyle(const XMLElement&);
  6703. bool SetStyle(const String&, XMLFile = null);
  6704. bool SetStyleAuto(XMLFile = null);
  6705. void SetPosition(int, int);
  6706. void SetSize(int, int);
  6707. void SetMinSize(int, int);
  6708. void SetMaxSize(int, int);
  6709. void SetFixedSize(int, int);
  6710. void SetFixedWidth(int);
  6711. void SetFixedHeight(int);
  6712. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6713. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6714. void UpdateLayout();
  6715. void DisableLayoutUpdate();
  6716. void EnableLayoutUpdate();
  6717. void BringToFront();
  6718. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6719. void AddChild(UIElement);
  6720. void InsertChild(uint, UIElement);
  6721. void RemoveChild(UIElement, uint = 0);
  6722. void RemoveChild(uint);
  6723. void RemoveAllChildren();
  6724. void Remove();
  6725. uint FindChild(UIElement) const;
  6726. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6727. UIElement GetChild(const String&, bool = false) const;
  6728. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  6729. Array<UIElement> GetChildren(bool = false) const;
  6730. UIElement GetElementEventSender() const;
  6731. const Variant& GetVar(const ShortStringHash&);
  6732. IntVector2 ScreenToElement(const IntVector2&);
  6733. IntVector2 ElementToScreen(const IntVector2&);
  6734. bool IsInside(IntVector2, bool);
  6735. bool IsInsideCombined(IntVector2, bool);
  6736. // Properties:
  6737. /* (readonly) */
  6738. int refs;
  6739. /* (readonly) */
  6740. int weakRefs;
  6741. /* (readonly) */
  6742. ShortStringHash type;
  6743. /* (readonly) */
  6744. ShortStringHash baseType;
  6745. /* (readonly) */
  6746. String typeName;
  6747. /* (readonly) */
  6748. String category;
  6749. /* (readonly) */
  6750. uint numAttributes;
  6751. Array<Variant> attributes;
  6752. /* (readonly) */
  6753. Array<Variant> attributeDefaults;
  6754. /* (readonly) */
  6755. Array<AttributeInfo> attributeInfos;
  6756. bool temporary;
  6757. String style;
  6758. String name;
  6759. IntVector2 position;
  6760. IntVector2 size;
  6761. int width;
  6762. int height;
  6763. IntVector2 minSize;
  6764. int minWidth;
  6765. int minHeight;
  6766. IntVector2 maxSize;
  6767. int maxWidth;
  6768. int maxHeight;
  6769. /* (readonly) */
  6770. bool fixedSize;
  6771. /* (readonly) */
  6772. bool fixedWidth;
  6773. /* (readonly) */
  6774. bool fixedHeight;
  6775. HorizontalAlignment horizontalAlignment;
  6776. VerticalAlignment verticalAlignment;
  6777. IntRect clipBorder;
  6778. /* (writeonly) */
  6779. Color color;
  6780. Array<Color> colors;
  6781. int priority;
  6782. float opacity;
  6783. bool bringToFront;
  6784. bool bringToBack;
  6785. bool clipChildren;
  6786. bool sortChildren;
  6787. bool useDerivedOpacity;
  6788. bool enabled;
  6789. bool editable;
  6790. bool focus;
  6791. bool selected;
  6792. bool visible;
  6793. /* (readonly) */
  6794. bool hovering;
  6795. bool internal;
  6796. /* (readonly) */
  6797. bool colorGradient;
  6798. FocusMode focusMode;
  6799. uint dragDropMode;
  6800. TraversalMode traversalMode;
  6801. XMLFile defaultStyle;
  6802. LayoutMode layoutMode;
  6803. int layoutSpacing;
  6804. IntRect layoutBorder;
  6805. int indent;
  6806. int indentSpacing;
  6807. /* (readonly) */
  6808. int indentWidth;
  6809. /* (readonly) */
  6810. IntVector2 childOffset;
  6811. bool elementEventSender;
  6812. /* (readonly) */
  6813. Array<uint> numChildren;
  6814. /* (readonly) */
  6815. uint numAllChildren;
  6816. /* (readonly) */
  6817. Array<UIElement> children;
  6818. UIElement parent;
  6819. /* (readonly) */
  6820. UIElement root;
  6821. /* (readonly) */
  6822. IntVector2 screenPosition;
  6823. /* (readonly) */
  6824. IntRect combinedScreenRect;
  6825. /* (readonly) */
  6826. float derivedOpacity;
  6827. /* (readonly) */
  6828. VariantMap vars;
  6829. bool movable;
  6830. bool resizable;
  6831. IntRect resizeBorder;
  6832. bool modal;
  6833. Color modalShadeColor;
  6834. Color modalFrameColor;
  6835. IntVector2 modalFrameSize;
  6836. bool fixedWidthResizing;
  6837. bool fixedHeightResizing;
  6838. };
  6839. class View3D
  6840. {
  6841. // Methods:
  6842. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6843. bool Load(File, bool = false);
  6844. bool Save(File) const;
  6845. bool LoadXML(const XMLElement&, bool = false);
  6846. bool SaveXML(XMLElement&) const;
  6847. void ApplyAttributes();
  6848. bool SetAttribute(const String&, const Variant&);
  6849. void ResetToDefault();
  6850. void RemoveInstanceDefault();
  6851. Variant GetAttribute(const String&) const;
  6852. Variant GetAttributeDefault(const String&) const;
  6853. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6854. bool LoadXML(File);
  6855. bool LoadXML(XMLFile, XMLFile);
  6856. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6857. bool LoadChildXML(XMLFile, XMLFile = null);
  6858. bool SaveXML(File);
  6859. bool SetStyle(const XMLElement&);
  6860. bool SetStyle(const String&, XMLFile = null);
  6861. bool SetStyleAuto(XMLFile = null);
  6862. void SetPosition(int, int);
  6863. void SetSize(int, int);
  6864. void SetMinSize(int, int);
  6865. void SetMaxSize(int, int);
  6866. void SetFixedSize(int, int);
  6867. void SetFixedWidth(int);
  6868. void SetFixedHeight(int);
  6869. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6870. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6871. void UpdateLayout();
  6872. void DisableLayoutUpdate();
  6873. void EnableLayoutUpdate();
  6874. void BringToFront();
  6875. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6876. void AddChild(UIElement);
  6877. void InsertChild(uint, UIElement);
  6878. void RemoveChild(UIElement, uint = 0);
  6879. void RemoveChild(uint);
  6880. void RemoveAllChildren();
  6881. void Remove();
  6882. uint FindChild(UIElement) const;
  6883. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6884. UIElement GetChild(const String&, bool = false) const;
  6885. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  6886. Array<UIElement> GetChildren(bool = false) const;
  6887. UIElement GetElementEventSender() const;
  6888. const Variant& GetVar(const ShortStringHash&);
  6889. IntVector2 ScreenToElement(const IntVector2&);
  6890. IntVector2 ElementToScreen(const IntVector2&);
  6891. bool IsInside(IntVector2, bool);
  6892. bool IsInsideCombined(IntVector2, bool);
  6893. void SetView(Scene, Camera);
  6894. void QueueUpdate();
  6895. // Properties:
  6896. /* (readonly) */
  6897. int refs;
  6898. /* (readonly) */
  6899. int weakRefs;
  6900. /* (readonly) */
  6901. ShortStringHash type;
  6902. /* (readonly) */
  6903. ShortStringHash baseType;
  6904. /* (readonly) */
  6905. String typeName;
  6906. /* (readonly) */
  6907. String category;
  6908. /* (readonly) */
  6909. uint numAttributes;
  6910. Array<Variant> attributes;
  6911. /* (readonly) */
  6912. Array<Variant> attributeDefaults;
  6913. /* (readonly) */
  6914. Array<AttributeInfo> attributeInfos;
  6915. bool temporary;
  6916. String style;
  6917. String name;
  6918. IntVector2 position;
  6919. IntVector2 size;
  6920. int width;
  6921. int height;
  6922. IntVector2 minSize;
  6923. int minWidth;
  6924. int minHeight;
  6925. IntVector2 maxSize;
  6926. int maxWidth;
  6927. int maxHeight;
  6928. /* (readonly) */
  6929. bool fixedSize;
  6930. /* (readonly) */
  6931. bool fixedWidth;
  6932. /* (readonly) */
  6933. bool fixedHeight;
  6934. HorizontalAlignment horizontalAlignment;
  6935. VerticalAlignment verticalAlignment;
  6936. IntRect clipBorder;
  6937. /* (writeonly) */
  6938. Color color;
  6939. Array<Color> colors;
  6940. int priority;
  6941. float opacity;
  6942. bool bringToFront;
  6943. bool bringToBack;
  6944. bool clipChildren;
  6945. bool sortChildren;
  6946. bool useDerivedOpacity;
  6947. bool enabled;
  6948. bool editable;
  6949. bool focus;
  6950. bool selected;
  6951. bool visible;
  6952. /* (readonly) */
  6953. bool hovering;
  6954. bool internal;
  6955. /* (readonly) */
  6956. bool colorGradient;
  6957. FocusMode focusMode;
  6958. uint dragDropMode;
  6959. TraversalMode traversalMode;
  6960. XMLFile defaultStyle;
  6961. LayoutMode layoutMode;
  6962. int layoutSpacing;
  6963. IntRect layoutBorder;
  6964. int indent;
  6965. int indentSpacing;
  6966. /* (readonly) */
  6967. int indentWidth;
  6968. /* (readonly) */
  6969. IntVector2 childOffset;
  6970. bool elementEventSender;
  6971. /* (readonly) */
  6972. Array<uint> numChildren;
  6973. /* (readonly) */
  6974. uint numAllChildren;
  6975. /* (readonly) */
  6976. Array<UIElement> children;
  6977. UIElement parent;
  6978. /* (readonly) */
  6979. UIElement root;
  6980. /* (readonly) */
  6981. IntVector2 screenPosition;
  6982. /* (readonly) */
  6983. IntRect combinedScreenRect;
  6984. /* (readonly) */
  6985. float derivedOpacity;
  6986. /* (readonly) */
  6987. VariantMap vars;
  6988. bool movable;
  6989. bool resizable;
  6990. IntRect resizeBorder;
  6991. bool modal;
  6992. Color modalShadeColor;
  6993. Color modalFrameColor;
  6994. IntVector2 modalFrameSize;
  6995. bool fixedWidthResizing;
  6996. bool fixedHeightResizing;
  6997. uint format;
  6998. bool autoUpdate;
  6999. /* (readonly) */
  7000. Texture2D renderTexture;
  7001. /* (readonly) */
  7002. Texture2D depthTexture;
  7003. /* (readonly) */
  7004. Viewport viewport;
  7005. /* (readonly) */
  7006. Scene scene;
  7007. /* (readonly) */
  7008. Node cameraNode;
  7009. };
  7010. class FileSelector
  7011. {
  7012. // Methods:
  7013. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7014. void SetButtonTexts(const String&, const String&);
  7015. void SetFilters(Array<String>, uint);
  7016. void UpdateElements();
  7017. // Properties:
  7018. /* (readonly) */
  7019. int refs;
  7020. /* (readonly) */
  7021. int weakRefs;
  7022. /* (readonly) */
  7023. ShortStringHash type;
  7024. /* (readonly) */
  7025. ShortStringHash baseType;
  7026. /* (readonly) */
  7027. String typeName;
  7028. /* (readonly) */
  7029. String category;
  7030. String title;
  7031. String path;
  7032. String fileName;
  7033. bool directoryMode;
  7034. /* (readonly) */
  7035. String filter;
  7036. /* (readonly) */
  7037. uint filterIndex;
  7038. XMLFile defaultStyle;
  7039. /* (readonly) */
  7040. Window window;
  7041. /* (readonly) */
  7042. Text titleText;
  7043. /* (readonly) */
  7044. ListView fileList;
  7045. /* (readonly) */
  7046. LineEdit pathEdit;
  7047. /* (readonly) */
  7048. LineEdit fileNameEdit;
  7049. /* (readonly) */
  7050. DropDownList filterList;
  7051. /* (readonly) */
  7052. Button okButton;
  7053. /* (readonly) */
  7054. Button cancelButton;
  7055. };
  7056. class ToolTip
  7057. {
  7058. // Methods:
  7059. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7060. bool Load(File, bool = false);
  7061. bool Save(File) const;
  7062. bool LoadXML(const XMLElement&, bool = false);
  7063. bool SaveXML(XMLElement&) const;
  7064. void ApplyAttributes();
  7065. bool SetAttribute(const String&, const Variant&);
  7066. void ResetToDefault();
  7067. void RemoveInstanceDefault();
  7068. Variant GetAttribute(const String&) const;
  7069. Variant GetAttributeDefault(const String&) const;
  7070. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  7071. bool LoadXML(File);
  7072. bool LoadXML(XMLFile, XMLFile);
  7073. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  7074. bool LoadChildXML(XMLFile, XMLFile = null);
  7075. bool SaveXML(File);
  7076. bool SetStyle(const XMLElement&);
  7077. bool SetStyle(const String&, XMLFile = null);
  7078. bool SetStyleAuto(XMLFile = null);
  7079. void SetPosition(int, int);
  7080. void SetSize(int, int);
  7081. void SetMinSize(int, int);
  7082. void SetMaxSize(int, int);
  7083. void SetFixedSize(int, int);
  7084. void SetFixedWidth(int);
  7085. void SetFixedHeight(int);
  7086. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  7087. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  7088. void UpdateLayout();
  7089. void DisableLayoutUpdate();
  7090. void EnableLayoutUpdate();
  7091. void BringToFront();
  7092. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  7093. void AddChild(UIElement);
  7094. void InsertChild(uint, UIElement);
  7095. void RemoveChild(UIElement, uint = 0);
  7096. void RemoveChild(uint);
  7097. void RemoveAllChildren();
  7098. void Remove();
  7099. uint FindChild(UIElement) const;
  7100. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  7101. UIElement GetChild(const String&, bool = false) const;
  7102. UIElement GetChild(const ShortStringHash&, const Variant& = Variant ( ), bool = false) const;
  7103. Array<UIElement> GetChildren(bool = false) const;
  7104. UIElement GetElementEventSender() const;
  7105. const Variant& GetVar(const ShortStringHash&);
  7106. IntVector2 ScreenToElement(const IntVector2&);
  7107. IntVector2 ElementToScreen(const IntVector2&);
  7108. bool IsInside(IntVector2, bool);
  7109. bool IsInsideCombined(IntVector2, bool);
  7110. // Properties:
  7111. /* (readonly) */
  7112. int refs;
  7113. /* (readonly) */
  7114. int weakRefs;
  7115. /* (readonly) */
  7116. ShortStringHash type;
  7117. /* (readonly) */
  7118. ShortStringHash baseType;
  7119. /* (readonly) */
  7120. String typeName;
  7121. /* (readonly) */
  7122. String category;
  7123. /* (readonly) */
  7124. uint numAttributes;
  7125. Array<Variant> attributes;
  7126. /* (readonly) */
  7127. Array<Variant> attributeDefaults;
  7128. /* (readonly) */
  7129. Array<AttributeInfo> attributeInfos;
  7130. bool temporary;
  7131. String style;
  7132. String name;
  7133. IntVector2 position;
  7134. IntVector2 size;
  7135. int width;
  7136. int height;
  7137. IntVector2 minSize;
  7138. int minWidth;
  7139. int minHeight;
  7140. IntVector2 maxSize;
  7141. int maxWidth;
  7142. int maxHeight;
  7143. /* (readonly) */
  7144. bool fixedSize;
  7145. /* (readonly) */
  7146. bool fixedWidth;
  7147. /* (readonly) */
  7148. bool fixedHeight;
  7149. HorizontalAlignment horizontalAlignment;
  7150. VerticalAlignment verticalAlignment;
  7151. IntRect clipBorder;
  7152. /* (writeonly) */
  7153. Color color;
  7154. Array<Color> colors;
  7155. int priority;
  7156. float opacity;
  7157. bool bringToFront;
  7158. bool bringToBack;
  7159. bool clipChildren;
  7160. bool sortChildren;
  7161. bool useDerivedOpacity;
  7162. bool enabled;
  7163. bool editable;
  7164. bool focus;
  7165. bool selected;
  7166. bool visible;
  7167. /* (readonly) */
  7168. bool hovering;
  7169. bool internal;
  7170. /* (readonly) */
  7171. bool colorGradient;
  7172. FocusMode focusMode;
  7173. uint dragDropMode;
  7174. TraversalMode traversalMode;
  7175. XMLFile defaultStyle;
  7176. LayoutMode layoutMode;
  7177. int layoutSpacing;
  7178. IntRect layoutBorder;
  7179. int indent;
  7180. int indentSpacing;
  7181. /* (readonly) */
  7182. int indentWidth;
  7183. /* (readonly) */
  7184. IntVector2 childOffset;
  7185. bool elementEventSender;
  7186. /* (readonly) */
  7187. Array<uint> numChildren;
  7188. /* (readonly) */
  7189. uint numAllChildren;
  7190. /* (readonly) */
  7191. Array<UIElement> children;
  7192. UIElement parent;
  7193. /* (readonly) */
  7194. UIElement root;
  7195. /* (readonly) */
  7196. IntVector2 screenPosition;
  7197. /* (readonly) */
  7198. IntRect combinedScreenRect;
  7199. /* (readonly) */
  7200. float derivedOpacity;
  7201. /* (readonly) */
  7202. VariantMap vars;
  7203. float delay;
  7204. };
  7205. class UI
  7206. {
  7207. // Methods:
  7208. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7209. void Clear();
  7210. void DebugDraw(UIElement);
  7211. UIElement LoadLayout(File);
  7212. UIElement LoadLayout(File, XMLFile);
  7213. UIElement LoadLayout(XMLFile);
  7214. UIElement LoadLayout(XMLFile, XMLFile);
  7215. bool SaveLayout(File, UIElement);
  7216. UIElement GetElementAt(const IntVector2&, bool = true);
  7217. UIElement GetElementAt(int, int, bool = true);
  7218. bool HasModalElement() const;
  7219. // Properties:
  7220. /* (readonly) */
  7221. int refs;
  7222. /* (readonly) */
  7223. int weakRefs;
  7224. /* (readonly) */
  7225. ShortStringHash type;
  7226. /* (readonly) */
  7227. ShortStringHash baseType;
  7228. /* (readonly) */
  7229. String typeName;
  7230. /* (readonly) */
  7231. String category;
  7232. Cursor cursor;
  7233. /* (readonly) */
  7234. IntVector2 cursorPosition;
  7235. UIElement focusElement;
  7236. /* (readonly) */
  7237. UIElement frontElement;
  7238. /* (readonly) */
  7239. UIElement dragElement;
  7240. /* (readonly) */
  7241. UIElement root;
  7242. /* (readonly) */
  7243. UIElement modalRoot;
  7244. String clipBoardText;
  7245. float doubleClickInterval;
  7246. float dragBeginInterval;
  7247. int dragBeginDistance;
  7248. float defaultToolTipDelay;
  7249. int maxFontTextureSize;
  7250. bool nonFocusedMouseWheel;
  7251. bool useSystemClipBoard;
  7252. bool useMutableGlyphs;
  7253. bool forceAutoHint;
  7254. };
  7255. class Controls
  7256. {
  7257. // Methods:
  7258. void Reset();
  7259. void Set(uint, bool);
  7260. bool IsDown(uint) const;
  7261. bool IsPressed(uint, const Controls&) const;
  7262. // Properties:
  7263. uint buttons;
  7264. float yaw;
  7265. float pitch;
  7266. VariantMap extraData;
  7267. };
  7268. class NetworkPriority
  7269. {
  7270. // Methods:
  7271. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7272. bool Load(File, bool = false);
  7273. bool Save(File) const;
  7274. bool LoadXML(const XMLElement&, bool = false);
  7275. bool SaveXML(XMLElement&) const;
  7276. void ApplyAttributes();
  7277. bool SetAttribute(const String&, const Variant&);
  7278. void ResetToDefault();
  7279. void RemoveInstanceDefault();
  7280. Variant GetAttribute(const String&) const;
  7281. Variant GetAttributeDefault(const String&) const;
  7282. void Remove();
  7283. void MarkNetworkUpdate() const;
  7284. void DrawDebugGeometry(DebugRenderer, bool);
  7285. // Properties:
  7286. /* (readonly) */
  7287. int refs;
  7288. /* (readonly) */
  7289. int weakRefs;
  7290. /* (readonly) */
  7291. ShortStringHash type;
  7292. /* (readonly) */
  7293. ShortStringHash baseType;
  7294. /* (readonly) */
  7295. String typeName;
  7296. /* (readonly) */
  7297. String category;
  7298. /* (readonly) */
  7299. uint numAttributes;
  7300. Array<Variant> attributes;
  7301. /* (readonly) */
  7302. Array<Variant> attributeDefaults;
  7303. /* (readonly) */
  7304. Array<AttributeInfo> attributeInfos;
  7305. bool temporary;
  7306. bool enabled;
  7307. /* (readonly) */
  7308. bool enabledEffective;
  7309. /* (readonly) */
  7310. uint id;
  7311. /* (readonly) */
  7312. Node node;
  7313. float basePriority;
  7314. float distanceFactor;
  7315. float minPriority;
  7316. bool alwaysUpdateOwner;
  7317. };
  7318. class Connection
  7319. {
  7320. // Methods:
  7321. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7322. void SendMessage(int, bool, bool, const VectorBuffer&, uint = 0);
  7323. void SendRemoteEvent(const String&, bool, const VariantMap& = VariantMap ( ));
  7324. void SendRemoteEvent(Node, const String&, bool, const VariantMap& = VariantMap ( ));
  7325. void Disconnect(int = 0);
  7326. String ToString() const;
  7327. // Properties:
  7328. /* (readonly) */
  7329. int refs;
  7330. /* (readonly) */
  7331. int weakRefs;
  7332. /* (readonly) */
  7333. ShortStringHash type;
  7334. /* (readonly) */
  7335. ShortStringHash baseType;
  7336. /* (readonly) */
  7337. String typeName;
  7338. /* (readonly) */
  7339. String category;
  7340. Scene scene;
  7341. bool logStatistics;
  7342. /* (readonly) */
  7343. bool client;
  7344. /* (readonly) */
  7345. bool connected;
  7346. /* (readonly) */
  7347. bool connectPending;
  7348. /* (readonly) */
  7349. bool sceneLoaded;
  7350. /* (readonly) */
  7351. String address;
  7352. /* (readonly) */
  7353. uint16 port;
  7354. /* (readonly) */
  7355. uint numDownloads;
  7356. /* (readonly) */
  7357. String downloadName;
  7358. /* (readonly) */
  7359. float downloadProgress;
  7360. Vector3 position;
  7361. Controls controls;
  7362. VariantMap identity;
  7363. };
  7364. class HttpRequest
  7365. {
  7366. // Methods:
  7367. Array<uint8> Read(uint);
  7368. int ReadInt();
  7369. int16 ReadShort();
  7370. int8 ReadByte();
  7371. uint ReadUInt();
  7372. uint16 ReadUShort();
  7373. uint8 ReadUByte();
  7374. bool ReadBool();
  7375. float ReadFloat();
  7376. IntRect ReadIntRect();
  7377. IntVector2 ReadIntVector2();
  7378. Vector2 ReadVector2();
  7379. Vector3 ReadVector3();
  7380. Vector3 ReadPackedVector3(float);
  7381. Vector4 ReadVector4();
  7382. Quaternion ReadQuaternion();
  7383. Quaternion ReadPackedQuaternion();
  7384. Color ReadColor();
  7385. BoundingBox ReadBoundingBox();
  7386. String ReadString();
  7387. String ReadFileID();
  7388. StringHash ReadStringHash();
  7389. ShortStringHash ReadShortStringHash();
  7390. Variant ReadVariant();
  7391. VariantMap ReadVariantMap();
  7392. uint ReadVLE();
  7393. uint ReadNetID();
  7394. String ReadLine();
  7395. uint Seek(uint);
  7396. // Properties:
  7397. /* (readonly) */
  7398. int refs;
  7399. /* (readonly) */
  7400. int weakRefs;
  7401. /* (readonly) */
  7402. String name;
  7403. /* (readonly) */
  7404. uint checksum;
  7405. /* (readonly) */
  7406. uint position;
  7407. /* (readonly) */
  7408. uint size;
  7409. /* (readonly) */
  7410. bool eof;
  7411. /* (readonly) */
  7412. String url;
  7413. /* (readonly) */
  7414. String verb;
  7415. /* (readonly) */
  7416. String error;
  7417. /* (readonly) */
  7418. HttpRequestState state;
  7419. /* (readonly) */
  7420. uint availableSize;
  7421. /* (readonly) */
  7422. bool open;
  7423. };
  7424. class Network
  7425. {
  7426. // Methods:
  7427. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7428. bool Connect(const String&, uint16, Scene, const VariantMap& = VariantMap ( ));
  7429. void Disconnect(int = 0);
  7430. bool StartServer(uint16);
  7431. void StopServer();
  7432. void BroadcastMessage(int, bool, bool, const VectorBuffer&, uint = 0);
  7433. void BroadcastRemoteEvent(const String&, bool, const VariantMap& = VariantMap ( ));
  7434. void BroadcastRemoteEvent(Scene, const String&, bool, const VariantMap& = VariantMap ( ));
  7435. void BroadcastRemoteEvent(Node, const String&, bool, const VariantMap& = VariantMap ( ));
  7436. void RegisterRemoteEvent(const String&) const;
  7437. void UnregisterRemoteEvent(const String&) const;
  7438. void UnregisterAllRemoteEvents();
  7439. bool CheckRemoteEvent(const String&) const;
  7440. HttpRequest MakeHttpRequest(const String&, const String& = String ( ), Array<String> = null, const String& = String ( ));
  7441. // Properties:
  7442. /* (readonly) */
  7443. int refs;
  7444. /* (readonly) */
  7445. int weakRefs;
  7446. /* (readonly) */
  7447. ShortStringHash type;
  7448. /* (readonly) */
  7449. ShortStringHash baseType;
  7450. /* (readonly) */
  7451. String typeName;
  7452. /* (readonly) */
  7453. String category;
  7454. int updateFps;
  7455. String packageCacheDir;
  7456. /* (readonly) */
  7457. bool serverRunning;
  7458. /* (readonly) */
  7459. Connection serverConnection;
  7460. /* (readonly) */
  7461. Array<Connection> clientConnections;
  7462. };
  7463. class CollisionShape
  7464. {
  7465. // Methods:
  7466. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7467. bool Load(File, bool = false);
  7468. bool Save(File) const;
  7469. bool LoadXML(const XMLElement&, bool = false);
  7470. bool SaveXML(XMLElement&) const;
  7471. void ApplyAttributes();
  7472. bool SetAttribute(const String&, const Variant&);
  7473. void ResetToDefault();
  7474. void RemoveInstanceDefault();
  7475. Variant GetAttribute(const String&) const;
  7476. Variant GetAttributeDefault(const String&) const;
  7477. void Remove();
  7478. void MarkNetworkUpdate() const;
  7479. void DrawDebugGeometry(DebugRenderer, bool);
  7480. void SetBox(const Vector3&, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7481. void SetSphere(float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7482. void SetStaticPlane(const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7483. void SetCylinder(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7484. void SetCapsule(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7485. void SetCone(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7486. void SetTriangleMesh(Model, uint = 0, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7487. void SetConvexHull(Model, uint = 0, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7488. void SetCustomConvexHull(CustomGeometry, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  7489. void SetTerrain();
  7490. void SetTransform(const Vector3&, const Quaternion&);
  7491. // Properties:
  7492. /* (readonly) */
  7493. int refs;
  7494. /* (readonly) */
  7495. int weakRefs;
  7496. /* (readonly) */
  7497. ShortStringHash type;
  7498. /* (readonly) */
  7499. ShortStringHash baseType;
  7500. /* (readonly) */
  7501. String typeName;
  7502. /* (readonly) */
  7503. String category;
  7504. /* (readonly) */
  7505. uint numAttributes;
  7506. Array<Variant> attributes;
  7507. /* (readonly) */
  7508. Array<Variant> attributeDefaults;
  7509. /* (readonly) */
  7510. Array<AttributeInfo> attributeInfos;
  7511. bool temporary;
  7512. bool enabled;
  7513. /* (readonly) */
  7514. bool enabledEffective;
  7515. /* (readonly) */
  7516. uint id;
  7517. /* (readonly) */
  7518. Node node;
  7519. ShapeType shapeType;
  7520. Vector3 size;
  7521. Vector3 position;
  7522. Quaternion rotation;
  7523. float margin;
  7524. Model model;
  7525. uint lodLevel;
  7526. /* (readonly) */
  7527. BoundingBox worldBoundingBox;
  7528. };
  7529. class RigidBody
  7530. {
  7531. // Methods:
  7532. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7533. bool Load(File, bool = false);
  7534. bool Save(File) const;
  7535. bool LoadXML(const XMLElement&, bool = false);
  7536. bool SaveXML(XMLElement&) const;
  7537. void ApplyAttributes();
  7538. bool SetAttribute(const String&, const Variant&);
  7539. void ResetToDefault();
  7540. void RemoveInstanceDefault();
  7541. Variant GetAttribute(const String&) const;
  7542. Variant GetAttributeDefault(const String&) const;
  7543. void Remove();
  7544. void MarkNetworkUpdate() const;
  7545. void DrawDebugGeometry(DebugRenderer, bool);
  7546. void SetTransform(const Vector3&, const Quaternion&);
  7547. void SetCollisionLayerAndMask(uint, uint);
  7548. void ApplyForce(const Vector3&);
  7549. void ApplyForce(const Vector3&, const Vector3&);
  7550. void ApplyTorque(const Vector3&);
  7551. void ApplyImpulse(const Vector3&);
  7552. void ApplyImpulse(const Vector3&, const Vector3&);
  7553. void ApplyTorqueImpulse(const Vector3&);
  7554. void ResetForces();
  7555. void Activate();
  7556. void ReAddBodyToWorld();
  7557. Vector3 GetVelocityAtPoint(const Vector3&) const;
  7558. // Properties:
  7559. /* (readonly) */
  7560. int refs;
  7561. /* (readonly) */
  7562. int weakRefs;
  7563. /* (readonly) */
  7564. ShortStringHash type;
  7565. /* (readonly) */
  7566. ShortStringHash baseType;
  7567. /* (readonly) */
  7568. String typeName;
  7569. /* (readonly) */
  7570. String category;
  7571. /* (readonly) */
  7572. uint numAttributes;
  7573. Array<Variant> attributes;
  7574. /* (readonly) */
  7575. Array<Variant> attributeDefaults;
  7576. /* (readonly) */
  7577. Array<AttributeInfo> attributeInfos;
  7578. bool temporary;
  7579. bool enabled;
  7580. /* (readonly) */
  7581. bool enabledEffective;
  7582. /* (readonly) */
  7583. uint id;
  7584. /* (readonly) */
  7585. Node node;
  7586. float mass;
  7587. Vector3 position;
  7588. Quaternion rotation;
  7589. Vector3 linearVelocity;
  7590. Vector3 linearFactor;
  7591. float linearRestThreshold;
  7592. float linearDamping;
  7593. Vector3 angularVelocity;
  7594. Vector3 angularFactor;
  7595. float angularRestThreshold;
  7596. float angularDamping;
  7597. float friction;
  7598. Vector3 anisotropicFriction;
  7599. float rollingFriction;
  7600. float restitution;
  7601. float contactProcessingThreshold;
  7602. float ccdRadius;
  7603. float ccdMotionThreshold;
  7604. bool useGravity;
  7605. Vector3 gravityOverride;
  7606. /* (readonly) */
  7607. Vector3 centerOfMass;
  7608. bool phantom;
  7609. bool kinematic;
  7610. /* (readonly) */
  7611. bool active;
  7612. uint collisionLayer;
  7613. uint collisionMask;
  7614. CollisionEventMode collisionEventMode;
  7615. /* (readonly) */
  7616. Array<RigidBody> collidingBodies;
  7617. };
  7618. class Constraint
  7619. {
  7620. // Methods:
  7621. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7622. bool Load(File, bool = false);
  7623. bool Save(File) const;
  7624. bool LoadXML(const XMLElement&, bool = false);
  7625. bool SaveXML(XMLElement&) const;
  7626. void ApplyAttributes();
  7627. bool SetAttribute(const String&, const Variant&);
  7628. void ResetToDefault();
  7629. void RemoveInstanceDefault();
  7630. Variant GetAttribute(const String&) const;
  7631. Variant GetAttributeDefault(const String&) const;
  7632. void Remove();
  7633. void MarkNetworkUpdate() const;
  7634. void DrawDebugGeometry(DebugRenderer, bool);
  7635. // Properties:
  7636. /* (readonly) */
  7637. int refs;
  7638. /* (readonly) */
  7639. int weakRefs;
  7640. /* (readonly) */
  7641. ShortStringHash type;
  7642. /* (readonly) */
  7643. ShortStringHash baseType;
  7644. /* (readonly) */
  7645. String typeName;
  7646. /* (readonly) */
  7647. String category;
  7648. /* (readonly) */
  7649. uint numAttributes;
  7650. Array<Variant> attributes;
  7651. /* (readonly) */
  7652. Array<Variant> attributeDefaults;
  7653. /* (readonly) */
  7654. Array<AttributeInfo> attributeInfos;
  7655. bool temporary;
  7656. bool enabled;
  7657. /* (readonly) */
  7658. bool enabledEffective;
  7659. /* (readonly) */
  7660. uint id;
  7661. /* (readonly) */
  7662. Node node;
  7663. ConstraintType constraintType;
  7664. Vector3 position;
  7665. Quaternion rotation;
  7666. /* (writeonly) */
  7667. Vector3 axis;
  7668. Vector3 otherPosition;
  7669. Quaternion otherRotation;
  7670. /* (writeonly) */
  7671. Vector3 otherAxis;
  7672. Vector3 worldPosition;
  7673. Vector2 highLimit;
  7674. Vector2 lowLimit;
  7675. float erp;
  7676. float cfm;
  7677. bool disableCollision;
  7678. /* (readonly) */
  7679. RigidBody ownBody;
  7680. RigidBody otherBody;
  7681. };
  7682. class PhysicsRaycastResult
  7683. {
  7684. // Properties:
  7685. /* (readonly) */
  7686. RigidBody body;
  7687. Vector3 position;
  7688. Vector3 normal;
  7689. float distance;
  7690. };
  7691. class PhysicsWorld
  7692. {
  7693. // Methods:
  7694. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7695. bool Load(File, bool = false);
  7696. bool Save(File) const;
  7697. bool LoadXML(const XMLElement&, bool = false);
  7698. bool SaveXML(XMLElement&) const;
  7699. void ApplyAttributes();
  7700. bool SetAttribute(const String&, const Variant&);
  7701. void ResetToDefault();
  7702. void RemoveInstanceDefault();
  7703. Variant GetAttribute(const String&) const;
  7704. Variant GetAttributeDefault(const String&) const;
  7705. void Remove();
  7706. void MarkNetworkUpdate() const;
  7707. void DrawDebugGeometry(DebugRenderer, bool);
  7708. void Update(float);
  7709. void UpdateCollisions();
  7710. Array<PhysicsRaycastResult> Raycast(const Ray&, float = M_INFINITY, uint = 0xffff);
  7711. PhysicsRaycastResult RaycastSingle(const Ray&, float = M_INFINITY, uint = 0xffff);
  7712. PhysicsRaycastResult SphereCast(const Ray&, float, float = M_INFINITY, uint = 0xffff);
  7713. Array<RigidBody> GetRigidBodies(const Sphere&, uint = 0xffff);
  7714. Array<RigidBody> GetRigidBodies(const BoundingBox&, uint = 0xffff);
  7715. Array<RigidBody> GetRigidBodies(RigidBody);
  7716. void DrawDebugGeometry(bool);
  7717. // Properties:
  7718. /* (readonly) */
  7719. int refs;
  7720. /* (readonly) */
  7721. int weakRefs;
  7722. /* (readonly) */
  7723. ShortStringHash type;
  7724. /* (readonly) */
  7725. ShortStringHash baseType;
  7726. /* (readonly) */
  7727. String typeName;
  7728. /* (readonly) */
  7729. String category;
  7730. /* (readonly) */
  7731. uint numAttributes;
  7732. Array<Variant> attributes;
  7733. /* (readonly) */
  7734. Array<Variant> attributeDefaults;
  7735. /* (readonly) */
  7736. Array<AttributeInfo> attributeInfos;
  7737. bool temporary;
  7738. bool enabled;
  7739. /* (readonly) */
  7740. bool enabledEffective;
  7741. /* (readonly) */
  7742. uint id;
  7743. /* (readonly) */
  7744. Node node;
  7745. Vector3 gravity;
  7746. int numIterations;
  7747. int fps;
  7748. bool interpolation;
  7749. bool internalEdge;
  7750. bool splitImpulse;
  7751. };
  7752. class Navigable
  7753. {
  7754. // Methods:
  7755. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7756. bool Load(File, bool = false);
  7757. bool Save(File) const;
  7758. bool LoadXML(const XMLElement&, bool = false);
  7759. bool SaveXML(XMLElement&) const;
  7760. void ApplyAttributes();
  7761. bool SetAttribute(const String&, const Variant&);
  7762. void ResetToDefault();
  7763. void RemoveInstanceDefault();
  7764. Variant GetAttribute(const String&) const;
  7765. Variant GetAttributeDefault(const String&) const;
  7766. void Remove();
  7767. void MarkNetworkUpdate() const;
  7768. void DrawDebugGeometry(DebugRenderer, bool);
  7769. // Properties:
  7770. /* (readonly) */
  7771. int refs;
  7772. /* (readonly) */
  7773. int weakRefs;
  7774. /* (readonly) */
  7775. ShortStringHash type;
  7776. /* (readonly) */
  7777. ShortStringHash baseType;
  7778. /* (readonly) */
  7779. String typeName;
  7780. /* (readonly) */
  7781. String category;
  7782. /* (readonly) */
  7783. uint numAttributes;
  7784. Array<Variant> attributes;
  7785. /* (readonly) */
  7786. Array<Variant> attributeDefaults;
  7787. /* (readonly) */
  7788. Array<AttributeInfo> attributeInfos;
  7789. bool temporary;
  7790. bool enabled;
  7791. /* (readonly) */
  7792. bool enabledEffective;
  7793. /* (readonly) */
  7794. uint id;
  7795. /* (readonly) */
  7796. Node node;
  7797. bool recursive;
  7798. };
  7799. class NavigationMesh
  7800. {
  7801. // Methods:
  7802. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7803. bool Load(File, bool = false);
  7804. bool Save(File) const;
  7805. bool LoadXML(const XMLElement&, bool = false);
  7806. bool SaveXML(XMLElement&) const;
  7807. void ApplyAttributes();
  7808. bool SetAttribute(const String&, const Variant&);
  7809. void ResetToDefault();
  7810. void RemoveInstanceDefault();
  7811. Variant GetAttribute(const String&) const;
  7812. Variant GetAttributeDefault(const String&) const;
  7813. void Remove();
  7814. void MarkNetworkUpdate() const;
  7815. void DrawDebugGeometry(DebugRenderer, bool);
  7816. bool Build();
  7817. bool Build(const BoundingBox&);
  7818. Vector3 FindNearestPoint();
  7819. Vector3 MoveAlongSurface();
  7820. Array<Vector3> FindPath(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7821. Vector3 GetRandomPoint();
  7822. Vector3 GetRandomPointInCircle(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7823. float GetDistanceToWall(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7824. Vector3 Raycast(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7825. void DrawDebugGeometry(bool);
  7826. // Properties:
  7827. /* (readonly) */
  7828. int refs;
  7829. /* (readonly) */
  7830. int weakRefs;
  7831. /* (readonly) */
  7832. ShortStringHash type;
  7833. /* (readonly) */
  7834. ShortStringHash baseType;
  7835. /* (readonly) */
  7836. String typeName;
  7837. /* (readonly) */
  7838. String category;
  7839. /* (readonly) */
  7840. uint numAttributes;
  7841. Array<Variant> attributes;
  7842. /* (readonly) */
  7843. Array<Variant> attributeDefaults;
  7844. /* (readonly) */
  7845. Array<AttributeInfo> attributeInfos;
  7846. bool temporary;
  7847. bool enabled;
  7848. /* (readonly) */
  7849. bool enabledEffective;
  7850. /* (readonly) */
  7851. uint id;
  7852. /* (readonly) */
  7853. Node node;
  7854. int tileSize;
  7855. float cellSize;
  7856. float cellHeight;
  7857. float agentHeight;
  7858. float agentRadius;
  7859. float agentMaxClimb;
  7860. float agentMaxSlope;
  7861. float regionMinSize;
  7862. float regionMergeSize;
  7863. float edgeMaxLength;
  7864. float edgeMaxError;
  7865. float detailSampleDistance;
  7866. float detailSampleMaxError;
  7867. Vector3 padding;
  7868. /* (readonly) */
  7869. bool initialized;
  7870. /* (readonly) */
  7871. BoundingBox boundingBox;
  7872. /* (readonly) */
  7873. BoundingBox worldBoundingBox;
  7874. /* (readonly) */
  7875. IntVector2 numTiles;
  7876. };
  7877. class OffMeshConnection
  7878. {
  7879. // Methods:
  7880. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7881. bool Load(File, bool = false);
  7882. bool Save(File) const;
  7883. bool LoadXML(const XMLElement&, bool = false);
  7884. bool SaveXML(XMLElement&) const;
  7885. void ApplyAttributes();
  7886. bool SetAttribute(const String&, const Variant&);
  7887. void ResetToDefault();
  7888. void RemoveInstanceDefault();
  7889. Variant GetAttribute(const String&) const;
  7890. Variant GetAttributeDefault(const String&) const;
  7891. void Remove();
  7892. void MarkNetworkUpdate() const;
  7893. void DrawDebugGeometry(DebugRenderer, bool);
  7894. // Properties:
  7895. /* (readonly) */
  7896. int refs;
  7897. /* (readonly) */
  7898. int weakRefs;
  7899. /* (readonly) */
  7900. ShortStringHash type;
  7901. /* (readonly) */
  7902. ShortStringHash baseType;
  7903. /* (readonly) */
  7904. String typeName;
  7905. /* (readonly) */
  7906. String category;
  7907. /* (readonly) */
  7908. uint numAttributes;
  7909. Array<Variant> attributes;
  7910. /* (readonly) */
  7911. Array<Variant> attributeDefaults;
  7912. /* (readonly) */
  7913. Array<AttributeInfo> attributeInfos;
  7914. bool temporary;
  7915. bool enabled;
  7916. /* (readonly) */
  7917. bool enabledEffective;
  7918. /* (readonly) */
  7919. uint id;
  7920. /* (readonly) */
  7921. Node node;
  7922. Node endPoint;
  7923. float radius;
  7924. bool bidirectional;
  7925. };
  7926. class ScriptFile
  7927. {
  7928. // Methods:
  7929. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7930. bool Load(File);
  7931. bool Save(File) const;
  7932. bool Execute(const String&, const Array<Variant>);
  7933. void DelayedExecute(float, bool, const String&, const Array<Variant>);
  7934. void DelayedExecute(float, bool, const String&);
  7935. void ClearDelayedExecute(const String& = String ( ));
  7936. // Properties:
  7937. /* (readonly) */
  7938. int refs;
  7939. /* (readonly) */
  7940. int weakRefs;
  7941. /* (readonly) */
  7942. ShortStringHash type;
  7943. /* (readonly) */
  7944. ShortStringHash baseType;
  7945. /* (readonly) */
  7946. String typeName;
  7947. /* (readonly) */
  7948. String category;
  7949. String name;
  7950. /* (readonly) */
  7951. uint memoryUse;
  7952. /* (readonly) */
  7953. uint useTimer;
  7954. /* (readonly) */
  7955. bool compiled;
  7956. };
  7957. class ScriptObject
  7958. {
  7959. };
  7960. class ScriptInstance
  7961. {
  7962. // Methods:
  7963. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7964. bool Load(File, bool = false);
  7965. bool Save(File) const;
  7966. bool LoadXML(const XMLElement&, bool = false);
  7967. bool SaveXML(XMLElement&) const;
  7968. void ApplyAttributes();
  7969. bool SetAttribute(const String&, const Variant&);
  7970. void ResetToDefault();
  7971. void RemoveInstanceDefault();
  7972. Variant GetAttribute(const String&) const;
  7973. Variant GetAttributeDefault(const String&) const;
  7974. void Remove();
  7975. void MarkNetworkUpdate() const;
  7976. void DrawDebugGeometry(DebugRenderer, bool);
  7977. bool CreateObject(ScriptFile, const String&);
  7978. bool Execute(const String&, const Array<Variant>);
  7979. bool Execute(const String&);
  7980. void DelayedExecute(float, bool, const String&, const Array<Variant>);
  7981. void DelayedExecute(float, bool, const String&);
  7982. void ClearDelayedExecute(const String& = String ( ));
  7983. // Properties:
  7984. /* (readonly) */
  7985. int refs;
  7986. /* (readonly) */
  7987. int weakRefs;
  7988. /* (readonly) */
  7989. ShortStringHash type;
  7990. /* (readonly) */
  7991. ShortStringHash baseType;
  7992. /* (readonly) */
  7993. String typeName;
  7994. /* (readonly) */
  7995. String category;
  7996. /* (readonly) */
  7997. uint numAttributes;
  7998. Array<Variant> attributes;
  7999. /* (readonly) */
  8000. Array<Variant> attributeDefaults;
  8001. /* (readonly) */
  8002. Array<AttributeInfo> attributeInfos;
  8003. bool temporary;
  8004. bool enabled;
  8005. /* (readonly) */
  8006. bool enabledEffective;
  8007. /* (readonly) */
  8008. uint id;
  8009. /* (readonly) */
  8010. Node node;
  8011. int fixedUpdateFps;
  8012. ScriptFile scriptFile;
  8013. /* (readonly) */
  8014. ScriptObject object;
  8015. String className;
  8016. };
  8017. class Script
  8018. {
  8019. // Methods:
  8020. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8021. bool Execute(const String&);
  8022. void DumpAPI(DumpMode = DOXYGEN);
  8023. // Properties:
  8024. /* (readonly) */
  8025. int refs;
  8026. /* (readonly) */
  8027. int weakRefs;
  8028. /* (readonly) */
  8029. ShortStringHash type;
  8030. /* (readonly) */
  8031. ShortStringHash baseType;
  8032. /* (readonly) */
  8033. String typeName;
  8034. /* (readonly) */
  8035. String category;
  8036. ScriptFile defaultScriptFile;
  8037. Scene defaultScene;
  8038. };
  8039. class Console
  8040. {
  8041. // Methods:
  8042. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8043. void Toggle();
  8044. void UpdateElements();
  8045. // Properties:
  8046. /* (readonly) */
  8047. int refs;
  8048. /* (readonly) */
  8049. int weakRefs;
  8050. /* (readonly) */
  8051. ShortStringHash type;
  8052. /* (readonly) */
  8053. ShortStringHash baseType;
  8054. /* (readonly) */
  8055. String typeName;
  8056. /* (readonly) */
  8057. String category;
  8058. XMLFile defaultStyle;
  8059. bool visible;
  8060. uint numRows;
  8061. uint numHistoryRows;
  8062. /* (readonly) */
  8063. uint historyPosition;
  8064. /* (readonly) */
  8065. Array<String> historyRow;
  8066. /* (readonly) */
  8067. BorderImage background;
  8068. /* (readonly) */
  8069. LineEdit lineEdit;
  8070. };
  8071. class DebugHud
  8072. {
  8073. // Methods:
  8074. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8075. void Toggle(uint);
  8076. void ToggleAll();
  8077. void SetAppStats(const String&, const Variant&);
  8078. void SetAppStats(const String&, const String&);
  8079. void ResetAppStats(const String&);
  8080. void ClearAppStats();
  8081. // Properties:
  8082. /* (readonly) */
  8083. int refs;
  8084. /* (readonly) */
  8085. int weakRefs;
  8086. /* (readonly) */
  8087. ShortStringHash type;
  8088. /* (readonly) */
  8089. ShortStringHash baseType;
  8090. /* (readonly) */
  8091. String typeName;
  8092. /* (readonly) */
  8093. String category;
  8094. XMLFile defaultStyle;
  8095. uint mode;
  8096. uint profilerMaxDepth;
  8097. float profilerInterval;
  8098. bool useRendererStats;
  8099. /* (readonly) */
  8100. Text statsText;
  8101. /* (readonly) */
  8102. Text modeText;
  8103. /* (readonly) */
  8104. Text profilerText;
  8105. };
  8106. class Engine
  8107. {
  8108. // Methods:
  8109. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8110. void RunFrame();
  8111. void Exit();
  8112. void DumpProfiler();
  8113. void DumpResources();
  8114. void DumpMemory();
  8115. Console CreateConsole();
  8116. DebugHud CreateDebugHud();
  8117. // Properties:
  8118. /* (readonly) */
  8119. int refs;
  8120. /* (readonly) */
  8121. int weakRefs;
  8122. /* (readonly) */
  8123. ShortStringHash type;
  8124. /* (readonly) */
  8125. ShortStringHash baseType;
  8126. /* (readonly) */
  8127. String typeName;
  8128. /* (readonly) */
  8129. String category;
  8130. int minFps;
  8131. int maxFps;
  8132. int timeStepSmoothing;
  8133. int maxInactiveFps;
  8134. bool pauseMinimized;
  8135. bool autoExit;
  8136. /* (readonly) */
  8137. bool initialized;
  8138. /* (readonly) */
  8139. bool exiting;
  8140. /* (readonly) */
  8141. bool headless;
  8142. };
  8143. // Global functions
  8144. bool Equals(float, float);
  8145. float Sin(float);
  8146. float Cos(float);
  8147. float Tan(float);
  8148. float Asin(float);
  8149. float Acos(float);
  8150. float Atan(float);
  8151. float Atan2(float, float);
  8152. float Abs(float);
  8153. float Sqrt(float);
  8154. float Pow(float, float);
  8155. float Min(float, float);
  8156. int Min(int, int);
  8157. float Max(float, float);
  8158. int Max(int, int);
  8159. float Clamp(float, float, float);
  8160. int Clamp(int, int, int);
  8161. float Lerp(float, float, float);
  8162. float Mod(float, float);
  8163. float Floor(float);
  8164. float Ceil(float);
  8165. float Random();
  8166. float Random(float);
  8167. float Random(float, float);
  8168. int RandomInt();
  8169. int RandomInt(int);
  8170. int RandomInt(int, int);
  8171. void SetRandomSeed(uint);
  8172. uint GetRandomSeed();
  8173. String ToStringHex(int);
  8174. String Join(Array<String>&, const String&);
  8175. bool IsDigit(uint);
  8176. bool IsAlpha(uint);
  8177. void ErrorDialog(const String&, const String&);
  8178. void OpenConsoleWindow();
  8179. String GetConsoleInput();
  8180. Array<String> GetArguments();
  8181. String GetPlatform();
  8182. uint GetNumPhysicalCPUs();
  8183. uint GetNumLogicalCPUs();
  8184. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8185. void SubscribeToEvent(const String&, const String&);
  8186. void SubscribeToEvent(Object, const String&, const String&);
  8187. void UnsubscribeFromEvent(const String&);
  8188. void UnsubscribeFromEvent(Object, const String&);
  8189. void UnsubscribeFromEvents(Object);
  8190. void UnsubscribeFromAllEvents();
  8191. void UnsubscribeFromAllEventsExcept(Array<String>);
  8192. Object GetEventSender();
  8193. const String& GetTypeName(ShortStringHash);
  8194. void Print(const String&, bool = false);
  8195. void Print(int, bool = false);
  8196. void Print(uint, bool = false);
  8197. void Print(float, bool = false);
  8198. void Print(bool, bool = false);
  8199. void Print(const Variant&, bool = false);
  8200. void PrintCallStack(bool = false);
  8201. String GetPath(const String&);
  8202. String GetFileName(const String&);
  8203. String GetExtension(const String&, bool = true);
  8204. String GetFileNameAndExtension(const String&, bool = false);
  8205. String ReplaceExtension(const String&, const String&);
  8206. String AddTrailingSlash(const String&);
  8207. String RemoveTrailingSlash(const String&);
  8208. String GetParentPath(const String&);
  8209. String GetInternalPath(const String&);
  8210. bool IsAbsolutePath(const String&);
  8211. Array<String> GetObjectCategories();
  8212. Array<String> GetObjectsByCategory(const String&);
  8213. uint GetAlphaFormat();
  8214. uint GetLuminanceFormat();
  8215. uint GetLuminanceAlphaFormat();
  8216. uint GetRGBFormat();
  8217. uint GetRGBAFormat();
  8218. uint GetRGBA16Format();
  8219. uint GetRGBAFloat16Format();
  8220. uint GetRGBAFloat32Format();
  8221. uint GetRG16Format();
  8222. uint GetRGFloat16Format();
  8223. uint GetRGFloat32Format();
  8224. uint GetFloat16Format();
  8225. uint GetFloat32Format();
  8226. uint GetDepthStencilFormat();
  8227. uint GetFormat(const String&);
  8228. String GetTextureUnitName(TextureUnit);
  8229. void MarkNetworkUpdate();
  8230. void DelayedExecute(float, bool, const String&, const Array<Variant>);
  8231. void DelayedExecute(float, bool, const String&);
  8232. void ClearDelayedExecute(const String& = String ( ));
  8233. void Remove();
  8234. // Global properties
  8235. Time time;
  8236. Log log;
  8237. FileSystem fileSystem;
  8238. ResourceCache resourceCache;
  8239. ResourceCache cache;
  8240. Node node;
  8241. Scene scene;
  8242. DebugRenderer debugRenderer;
  8243. Octree octree;
  8244. Graphics graphics;
  8245. Renderer renderer;
  8246. Input input;
  8247. Audio audio;
  8248. UI ui;
  8249. Network network;
  8250. PhysicsWorld physicsWorld;
  8251. ScriptFile scriptFile;
  8252. ScriptInstance self;
  8253. Script script;
  8254. Console console;
  8255. DebugHud debugHud;
  8256. Engine engine;
  8257. // Global constants
  8258. float M_INFINITY;
  8259. float M_EPSILON;
  8260. float M_LARGE_EPSILON;
  8261. float M_LARGE_VALUE;
  8262. float M_DEGTORAD;
  8263. float M_DEGTORAD_2;
  8264. float M_RADTODEG;
  8265. float M_PI;
  8266. int M_MIN_INT;
  8267. int M_MAX_INT;
  8268. uint M_MIN_UNSIGNED;
  8269. uint M_MAX_UNSIGNED;
  8270. int LOG_DEBUG;
  8271. int LOG_INFO;
  8272. int LOG_WARNING;
  8273. int LOG_ERROR;
  8274. int LOG_NONE;
  8275. uint SCAN_FILES;
  8276. uint SCAN_DIRS;
  8277. uint SCAN_HIDDEN;
  8278. uint AM_FILE;
  8279. uint AM_NET;
  8280. uint AM_DEFAULT;
  8281. uint AM_LATESTDATA;
  8282. uint AM_NOEDIT;
  8283. uint AM_NODEID;
  8284. uint AM_COMPONENTID;
  8285. uint AM_NODEIDVECTOR;
  8286. uint FIRST_REPLICATED_ID;
  8287. uint LAST_REPLICATED_ID;
  8288. uint FIRST_LOCAL_ID;
  8289. uint LAST_LOCAL_ID;
  8290. uint VO_NONE;
  8291. uint VO_LOW_MATERIAL_QUALITY;
  8292. uint VO_DISABLE_SHADOWS;
  8293. uint VO_DISABLE_OCCLUSION;
  8294. uint DRAWABLE_GEOMETRY;
  8295. uint DRAWABLE_LIGHT;
  8296. uint DRAWABLE_ZONE;
  8297. uint DRAWABLE_ANY;
  8298. uint DEFAULT_VIEWMASK;
  8299. uint DEFAULT_LIGHTMASK;
  8300. int QUALITY_LOW;
  8301. int QUALITY_MEDIUM;
  8302. int QUALITY_HIGH;
  8303. int SHADOWQUALITY_LOW_16BIT;
  8304. int SHADOWQUALITY_LOW_24BIT;
  8305. int SHADOWQUALITY_HIGH_16BIT;
  8306. int SHADOWQUALITY_HIGH_24BIT;
  8307. int MOUSEB_LEFT;
  8308. int MOUSEB_RIGHT;
  8309. int MOUSEB_MIDDLE;
  8310. int QUAL_SHIFT;
  8311. int QUAL_CTRL;
  8312. int QUAL_ALT;
  8313. int QUAL_ANY;
  8314. int KEY_BACKSPACE;
  8315. int KEY_TAB;
  8316. int KEY_RETURN;
  8317. int KEY_RETURN2;
  8318. int KEY_KP_ENTER;
  8319. int KEY_PAUSE;
  8320. int KEY_CAPSLOCK;
  8321. int KEY_ESC;
  8322. int KEY_SPACE;
  8323. int KEY_PAGEUP;
  8324. int KEY_PAGEDOWN;
  8325. int KEY_END;
  8326. int KEY_HOME;
  8327. int KEY_LEFT;
  8328. int KEY_UP;
  8329. int KEY_RIGHT;
  8330. int KEY_DOWN;
  8331. int KEY_INSERT;
  8332. int KEY_DELETE;
  8333. int KEY_LWIN;
  8334. int KEY_RWIN;
  8335. int KEY_APPS;
  8336. int KEY_NUMPAD0;
  8337. int KEY_NUMPAD1;
  8338. int KEY_NUMPAD2;
  8339. int KEY_NUMPAD3;
  8340. int KEY_NUMPAD4;
  8341. int KEY_NUMPAD5;
  8342. int KEY_NUMPAD6;
  8343. int KEY_NUMPAD7;
  8344. int KEY_NUMPAD8;
  8345. int KEY_NUMPAD9;
  8346. int KEY_MULTIPLY;
  8347. int KEY_ADD;
  8348. int KEY_SUBTRACT;
  8349. int KEY_DECIMAL;
  8350. int KEY_DIVIDE;
  8351. int KEY_F1;
  8352. int KEY_F2;
  8353. int KEY_F3;
  8354. int KEY_F4;
  8355. int KEY_F5;
  8356. int KEY_F6;
  8357. int KEY_F7;
  8358. int KEY_F8;
  8359. int KEY_F9;
  8360. int KEY_F10;
  8361. int KEY_F11;
  8362. int KEY_F12;
  8363. int KEY_F13;
  8364. int KEY_F14;
  8365. int KEY_F15;
  8366. int KEY_F16;
  8367. int KEY_F17;
  8368. int KEY_F18;
  8369. int KEY_F19;
  8370. int KEY_F20;
  8371. int KEY_F21;
  8372. int KEY_F22;
  8373. int KEY_F23;
  8374. int KEY_F24;
  8375. int KEY_NUMLOCK;
  8376. int KEY_SCROLLLOCK;
  8377. int KEY_LSHIFT;
  8378. int KEY_RSHIFT;
  8379. int KEY_LCTRL;
  8380. int KEY_RCTRL;
  8381. int KEY_LALT;
  8382. int KEY_RALT;
  8383. int HAT_CENTER;
  8384. int HAT_UP;
  8385. int HAT_RIGHT;
  8386. int HAT_DOWN;
  8387. int HAT_LEFT;
  8388. uint DD_DISABLED;
  8389. uint DD_SOURCE;
  8390. uint DD_TARGET;
  8391. uint DD_SOURCE_AND_TARGET;
  8392. uint DEBUGHUD_SHOW_NONE;
  8393. uint DEBUGHUD_SHOW_STATS;
  8394. uint DEBUGHUD_SHOW_MODE;
  8395. uint DEBUGHUD_SHOW_PROFILER;
  8396. uint DEBUGHUD_SHOW_ALL;