internal.pyi 473 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514
  1. ###############################################################################
  2. # This file is a part of Dear ImGui Bundle, NOT a part of Dear ImGui
  3. # -----------------------------------------------------------------------------
  4. # imgui/internal.pyi is the equivalent of imgui_internal.h, using the
  5. # bindings provided by Dear ImGui Bundle.
  6. #
  7. # It is automatically generated (using https://pthom.github.io/litgen/),
  8. # and is generally very close to the C++ version. Comments, docs are identical.
  9. ###############################################################################
  10. # ruff: noqa: F403, F405, B008
  11. # mypy: disable-error-code="overload-cannot-match, overload-overlap, call-arg"
  12. from typing import Any, Tuple, Optional, Callable, overload
  13. import enum
  14. import numpy as np
  15. # from imgui_bundle.imgui import *
  16. from imgui_bundle.imgui import (
  17. ButtonFlags,
  18. ChildFlags,
  19. Col,
  20. ColorEditFlags,
  21. ComboFlags,
  22. Cond,
  23. ConfigFlags,
  24. DataType,
  25. Dir,
  26. DockNodeFlags,
  27. DragDropFlags,
  28. HoveredFlags,
  29. ID,
  30. IM_COL32,
  31. IO,
  32. ImDrawCmd,
  33. ImDrawData,
  34. ImDrawFlags,
  35. ImDrawList,
  36. ImDrawListFlags,
  37. ImDrawListSplitter,
  38. ImFont,
  39. ImFontAtlas,
  40. ImFontAtlasRect,
  41. ImFontBaked,
  42. ImFontConfig,
  43. ImFontFlags,
  44. ImFontGlyph,
  45. ImS16,
  46. ImS32,
  47. ImS64,
  48. ImS8,
  49. ImTextureData,
  50. ImTextureFormat,
  51. ImTextureID,
  52. ImTextureRect,
  53. ImTextureRef,
  54. ImTextureStatus,
  55. ImU16,
  56. ImU32,
  57. ImU64,
  58. ImU8,
  59. ImVec2,
  60. ImVec2Like,
  61. ImVec4,
  62. ImVec4Like,
  63. ImVector_ColorMod,
  64. ImVector_FocusScopeData,
  65. ImVector_GroupData,
  66. ImVector_ID,
  67. ImVector_ImDrawChannel,
  68. ImVector_ImDrawList_ptr,
  69. ImVector_ImTextureData_ptr,
  70. ImVector_ImTextureRect,
  71. ImVector_ImU32,
  72. ImVector_ImVec2,
  73. ImVector_InputEvent,
  74. ImVector_ItemFlags,
  75. ImVector_KeyRoutingData,
  76. ImVector_ListClipperData,
  77. ImVector_ListClipperRange,
  78. ImVector_MultiSelectTempData,
  79. ImVector_OldColumnData,
  80. ImVector_OldColumns,
  81. ImVector_PopupData,
  82. ImVector_PtrOrIndex,
  83. ImVector_SettingsHandler,
  84. ImVector_ShrinkWidthItem,
  85. ImVector_StackLevelInfo,
  86. ImVector_StyleMod,
  87. ImVector_TabItem,
  88. ImVector_TableColumnSortSpecs,
  89. ImVector_TableHeaderData,
  90. ImVector_TableInstanceData,
  91. ImVector_TableTempData,
  92. ImVector_TreeNodeStackData,
  93. ImVector_ViewportP_ptr,
  94. ImVector_WindowStackData,
  95. ImVector_Window_ptr,
  96. ImVector_char,
  97. ImVector_float,
  98. ImVector_int,
  99. ImVector_uchar,
  100. ImWchar,
  101. InputTextCallback,
  102. InputTextFlags,
  103. Key,
  104. KeyChord,
  105. KeyData,
  106. ListClipper,
  107. MouseButton,
  108. MouseCursor,
  109. MouseSource,
  110. MultiSelectIO,
  111. Payload,
  112. PlatformIO,
  113. PlatformImeData,
  114. PlatformMonitor,
  115. PopupFlags,
  116. PopupFlags_,
  117. SizeCallback,
  118. SliderFlags,
  119. SortDirection,
  120. Storage,
  121. StoragePair,
  122. Style,
  123. StyleVar,
  124. TabBarFlags,
  125. TabItemFlags,
  126. TableColumnFlags,
  127. TableColumnSortSpecs,
  128. TableFlags,
  129. TableSortSpecs,
  130. TextBuffer,
  131. TreeNodeFlags,
  132. Viewport,
  133. WindowClass,
  134. WindowFlags,
  135. )
  136. ImVector_Window = ImVector_Window_ptr
  137. ImDrawTextFlags = int
  138. uchar = int
  139. char = str
  140. ##################################################
  141. # Manually inserted code (typedefs, etc.)
  142. ##################################################
  143. # ErrorStringCallback represent a function that accepts a string as a single param (it will contain the error message)
  144. ErrorStringCallback = Callable[[str], None]
  145. """
  146. // Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists.
  147. typedef int ImGuiDataAuthority; // -> enum ImGuiDataAuthority_ // Enum: for storing the source authority (dock node vs window) of a field
  148. typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ // Enum: Horizontal or vertical
  149. typedef int ImGuiActivateFlags; // -> enum ImGuiActivateFlags_ // Flags: for navigation/focus function (will be for ActivateItem() later)
  150. typedef int ImGuiDebugLogFlags; // -> enum ImGuiDebugLogFlags_ // Flags: for ShowDebugLogWindow(), g.DebugLogFlags
  151. typedef int ImGuiInputFlags; // -> enum ImGuiInputFlags_ // Flags: for IsKeyPressed(), IsMouseClicked(), SetKeyOwner(), SetItemKeyOwner() etc.
  152. typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag()
  153. typedef int ImGuiItemStatusFlags; // -> enum ImGuiItemStatusFlags_ // Flags: for DC.LastItemStatusFlags
  154. typedef int ImGuiOldColumnFlags; // -> enum ImGuiOldColumnFlags_ // Flags: for BeginColumns()
  155. typedef int ImGuiNavHighlightFlags; // -> enum ImGuiNavHighlightFlags_ // Flags: for RenderNavHighlight()
  156. typedef int ImGuiNavDirSourceFlags; // -> enum ImGuiNavDirSourceFlags_ // Flags: for GetNavInputAmount2d()
  157. typedef int ImGuiNavMoveFlags; // -> enum ImGuiNavMoveFlags_ // Flags: for navigation requests
  158. typedef int ImGuiNextItemDataFlags; // -> enum ImGuiNextItemDataFlags_ // Flags: for SetNextItemXXX() functions
  159. typedef int ImGuiNextWindowDataFlags; // -> enum ImGuiNextWindowDataFlags_// Flags: for SetNextWindowXXX() functions
  160. typedef int ImGuiScrollFlags; // -> enum ImGuiScrollFlags_ // Flags: for ScrollToItem() and navigation requests
  161. typedef int ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // Flags: for SeparatorEx()
  162. typedef int ImGuiTextFlags; // -> enum ImGuiTextFlags_ // Flags: for TextEx()
  163. typedef int ImGuiTooltipFlags; // -> enum ImGuiTooltipFlags_ // Flags: for BeginTooltipEx()
  164. """
  165. DataAuthority = int # // -> enum DataAuthority_ // Enum: for storing the source authority (dock node vs window) of a field
  166. LayoutType = int # // -> enum LayoutType_ // Enum: Horizontal or vertical
  167. ActivateFlags = int # // -> enum ActivateFlags_ // Flags: for navigation/focus function (will be for ActivateItem() later)
  168. DebugLogFlags = int # // -> enum DebugLogFlags_ // Flags: for ShowDebugLogWindow(), g.DebugLogFlags
  169. InputFlags = int # // -> enum ImGuiInputFlags_ // Flags: for IsKeyPressed(), IsMouseClicked(), SetKeyOwner(), SetItemKeyOwner() etc.
  170. ItemFlags = int # // -> enum ItemFlags_ // Flags: for PushItemFlag()
  171. ItemStatusFlags = int # // -> enum ItemStatusFlags_ // Flags: for DC.LastItemStatusFlags
  172. OldColumnFlags = int # // -> enum OldColumnFlags_ // Flags: for BeginColumns()
  173. NavHighlightFlags = int # // -> enum NavHighlightFlags_ // Flags: for RenderNavHighlight()
  174. NavDirSourceFlags = int # // -> enum NavDirSourceFlags_ // Flags: for GetNavInputAmount2d()
  175. NavMoveFlags = int # // -> enum NavMoveFlags_ // Flags: for navigation requests
  176. NextItemDataFlags = int # // -> enum NextItemDataFlags_ // Flags: for SetNextItemXXX() functions
  177. NextWindowDataFlags = int # // -> enum NextWindowDataFlags_// Flags: for SetNextWindowXXX() functions
  178. ScrollFlags = int # // -> enum ScrollFlags_ // Flags: for ScrollToItem() and navigation requests
  179. SeparatorFlags = int # // -> enum SeparatorFlags_ // Flags: for SeparatorEx()
  180. TextFlags = int # // -> enum TextFlags_ // Flags: for TextEx()
  181. TooltipFlags = int # // -> enum TooltipFlags_ // Flags: for BeginTooltipEx()
  182. TypingSelectFlags = int
  183. FocusRequestFlags = int
  184. WindowRefreshFlags = int
  185. MultiSelectFlags = int
  186. LogFlags = int
  187. NavRenderCursorFlags = int
  188. ImFontAtlasRectId = int # An identifier to a rectangle in the atlas. -1 when invalid. The rectangle may move, use GetCustomRect() to retrieve it.
  189. TypingSelectFlags_None = 0
  190. NavHighlightFlags_None = 0
  191. NavRenderCursorFlags_None = 0
  192. ImFileHandle = Any
  193. # // Our current column maximum is 64 but we may raise that in the future.
  194. # typedef ImS8 ImGuiTableColumnIdx;
  195. # typedef ImU8 ImGuiTableDrawChannelIdx;
  196. TableColumnIdx = int
  197. TableDrawChannelIdx = int
  198. SelectionUserData = int
  199. PopupFlags_None = PopupFlags_.none
  200. KeyRoutingIndex = int
  201. # Disable black formatter
  202. ##################################################
  203. # AUTO GENERATED CODE BELOW
  204. ##################################################
  205. # <litgen_stub> // Autogenerated code below! Do not edit!
  206. #################### <generated_from:imgui_internal.h> ####################
  207. # dear imgui, v1.92.8
  208. # (internal structures/api)
  209. # You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
  210. #
  211. #
  212. # Index of this file:
  213. #
  214. # // [SECTION] Header mess
  215. # // [SECTION] Forward declarations
  216. # // [SECTION] Context pointer
  217. # // [SECTION] STB libraries includes
  218. # // [SECTION] Stack Layout includes
  219. # // [SECTION] Macros
  220. # // [SECTION] Generic helpers
  221. # // [SECTION] ImDrawList support
  222. # // [SECTION] Style support
  223. # // [SECTION] Data types support
  224. # // [SECTION] Widgets support: flags, enums, data structures
  225. # // [SECTION] Popup support
  226. # // [SECTION] Inputs support
  227. # // [SECTION] Clipper support
  228. # // [SECTION] Navigation support
  229. # // [SECTION] Typing-select support
  230. # // [SECTION] Columns support
  231. # // [SECTION] Box-select support
  232. # // [SECTION] Multi-select support
  233. # // [SECTION] Docking support
  234. # // [SECTION] Viewport support
  235. # // [SECTION] Settings support
  236. # // [SECTION] Localization support
  237. # // [SECTION] Error handling, State recovery support
  238. # // [SECTION] Metrics, Debug tools
  239. # // [SECTION] Generic context hooks
  240. # // [SECTION] ImGuiContext (main imgui context)
  241. # // [SECTION] ImGuiWindowTempData, ImGuiWindow
  242. # // [SECTION] Tab bar, Tab item support
  243. # // [SECTION] Table support
  244. # // [SECTION] ImGui internal API
  245. # // [SECTION] ImFontLoader
  246. # // [SECTION] ImFontAtlas internal API
  247. # // [SECTION] Test Engine specific hooks (imgui_test_engine)
  248. #
  249. #
  250. # #ifndef IMGUI_DISABLE
  251. #
  252. # -----------------------------------------------------------------------------
  253. # [SECTION] Header mess
  254. # -----------------------------------------------------------------------------
  255. #
  256. # Adaptations for ImGui Bundle are noted with [ADAPT_IMGUI_BUNDLE]
  257. #
  258. # [ADAPT_IMGUI_BUNDLE]
  259. # #ifdef IMGUI_BUNDLE_PYTHON_API
  260. #
  261. # #endif
  262. #
  263. # [/ADAPT_IMGUI_BUNDLE]
  264. # Enable SSE intrinsics if available
  265. # Emscripten has partial SSE 4.2 support where _mm_crc32_u32 is not available. See https://emscripten.org/docs/porting/simd.html#id11 and #8213
  266. # Visual Studio warnings
  267. # Clang/GCC warnings with -Weverything
  268. # In 1.89.4, we moved the implementation of "courtesy maths operators" from imgui_internal.h in imgui.h
  269. # As they are frequently requested, we do not want to encourage to many people using imgui_internal.h
  270. # Legacy defines
  271. # Enable stb_truetype by default unless FreeType is enabled.
  272. # You can compile with both by defining both IMGUI_ENABLE_FREETYPE and IMGUI_ENABLE_STB_TRUETYPE together.
  273. # -----------------------------------------------------------------------------
  274. # [SECTION] Forward declarations
  275. # -----------------------------------------------------------------------------
  276. # Utilities
  277. # (other types which are not forwarded declared are: ImBitArray<>, ImSpan<>, ImSpanAllocator<>, ImStableVector<>, ImPool<>, ImChunkStream<>)
  278. # ImDrawList/ImFontAtlas
  279. # ImGui
  280. # Enumerations
  281. # Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists.
  282. # Flags
  283. # [ADAPT_IMGUI_BUNDLE]
  284. # #ifdef IMGUI_BUNDLE_PYTHON_API
  285. #
  286. # #endif
  287. #
  288. # [/ADAPT_IMGUI_BUNDLE]
  289. # Table column indexing
  290. # -----------------------------------------------------------------------------
  291. # [SECTION] Context pointer
  292. # See implementation of this variable in imgui.cpp for comments and details.
  293. # -----------------------------------------------------------------------------
  294. # -------------------------------------------------------------------------
  295. # [SECTION] Stack Layout includes
  296. # -------------------------------------------------------------------------
  297. # -----------------------------------------------------------------------------
  298. # [SECTION] Macros
  299. # -----------------------------------------------------------------------------
  300. # Internal Drag and Drop payload types. String starting with '_' are reserved for Dear ImGui.
  301. # Debug Printing Into TTY
  302. # (since IMGUI_VERSION_NUM >= 18729: IMGUI_DEBUG_LOG was reworked into IMGUI_DEBUG_PRINTF (and removed framecount from it). If you were using a #define IMGUI_DEBUG_LOG please rename)
  303. # Debug Logging for ShowDebugLogWindow(). This is designed for relatively rare events so please don't spam.
  304. # Debug options (also see ones on top of imgui.cpp)
  305. ##define IMGUI_DEBUG_BOXSELECT
  306. # "Paranoid" Debug Asserts are meant to only be enabled during specific debugging/work, otherwise would slow down the code too much.
  307. # We currently don't have many of those so the effect is currently negligible, but onward intent to add more aggressive ones in the code.
  308. ##define IMGUI_DEBUG_PARANOID
  309. ##define IM_FLOOR IM_TRUNC // [OBSOLETE] Renamed in 1.90.0 (Sept 2023)
  310. # Hint for branch prediction
  311. # Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall
  312. # Warnings
  313. # Debug Tools
  314. # Use 'Metrics/Debugger->Tools->Item Picker' to break into the call-stack of a specific item.
  315. # This will call IM_DEBUG_BREAK() which you may redefine yourself. See https://github.com/scottt/debugbreak for more reference.
  316. # Format specifiers, printing 64-bit hasn't been decently standardized...
  317. # In a real application you should be using PRId64 and PRIu64 from <inttypes.h> (non-windows) and on Windows define them yourself.
  318. # -----------------------------------------------------------------------------
  319. # [SECTION] Generic helpers
  320. # Note that the ImXXX helpers functions are lower-level than ImGui functions.
  321. # ImGui functions or the ImGui context are never called/used from other ImXXX functions.
  322. # -----------------------------------------------------------------------------
  323. # - Helpers: Hashing
  324. # - Helpers: Sorting
  325. # - Helpers: Bit manipulation
  326. # - Helpers: String
  327. # - Helpers: Formatting
  328. # - Helpers: UTF-8 <> wchar conversions
  329. # - Helpers: ImVec2/ImVec4 operators
  330. # - Helpers: Maths
  331. # - Helpers: Geometry
  332. # - Helper: ImVec1
  333. # - Helper: ImVec2ih
  334. # - Helper: ImRect
  335. # - Helper: ImBitArray
  336. # - Helper: ImBitVector
  337. # - Helper: ImSpan<>, ImSpanAllocator<>
  338. # - Helper: ImStableVector<>
  339. # - Helper: ImPool<>
  340. # - Helper: ImChunkStream<>
  341. # - Helper: ImGuiTextIndex
  342. # - Helper: ImGuiStorage
  343. # -----------------------------------------------------------------------------
  344. # Helpers: Hashing
  345. # IMGUI_API ImGuiID ImHashData(const void* data, size_t data_size, ImGuiID seed = 0); /* original C++ signature */
  346. def im_hash_data(data: Any, data_size: int, seed: ID = 0) -> ID:
  347. pass
  348. # IMGUI_API ImGuiID ImHashStr(const char* data, size_t data_size = 0, ImGuiID seed = 0); /* original C++ signature */
  349. def im_hash_str(data: str, data_size: int = 0, seed: ID = 0) -> ID:
  350. pass
  351. # IMGUI_API const char* ImHashSkipUncontributingPrefix(const char* label); /* original C++ signature */
  352. def im_hash_skip_uncontributing_prefix(label: str) -> str:
  353. pass
  354. # Helpers: Sorting
  355. # IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b); /* original C++ signature */
  356. def im_alpha_blend_colors(col_a: ImU32, col_b: ImU32) -> ImU32:
  357. """Helpers: Color Blending"""
  358. pass
  359. # Helpers: Bit manipulation
  360. # inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; } /* original C++ signature */
  361. @overload
  362. def im_is_power_of_two(v: int) -> bool:
  363. """(private API)"""
  364. pass
  365. # inline bool ImIsPowerOfTwo(ImU64 v) { return v != 0 && (v & (v - 1)) == 0; } /* original C++ signature */
  366. @overload
  367. def im_is_power_of_two(v: ImU64) -> bool:
  368. """(private API)"""
  369. pass
  370. # inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; } /* original C++ signature */
  371. def im_upper_power_of_two(v: int) -> int:
  372. """(private API)"""
  373. pass
  374. # inline unsigned int ImCountSetBits(unsigned int v) { unsigned int count = 0; while (v > 0) { v = v & (v - 1); count++; } return count; } /* original C++ signature */
  375. def im_count_set_bits(v: int) -> int:
  376. """(private API)"""
  377. pass
  378. # Helpers: String
  379. # IMGUI_API void* ImMemdup(const void* src, size_t size); /* original C++ signature */
  380. def im_memdup(src: Any, size: int) -> Any:
  381. """Duplicate a chunk of memory."""
  382. pass
  383. # inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; } /* original C++ signature */
  384. def im_char_is_blank_w(c: int) -> bool:
  385. """(private API)"""
  386. pass
  387. # Helpers: Formatting
  388. # Helpers: UTF-8 <> wchar conversions
  389. # IMGUI_API const char* ImTextFindPreviousUtf8Codepoint(const char* in_text_start, const char* in_p); /* original C++ signature */
  390. def im_text_find_previous_utf8_codepoint(in_text_start: str, in_p: str) -> str:
  391. """return previous UTF-8 code-point."""
  392. pass
  393. # IMGUI_API const char* ImTextFindValidUtf8CodepointEnd(const char* in_text_start, const char* in_text_end, const char* in_p); /* original C++ signature */
  394. def im_text_find_valid_utf8_codepoint_end(in_text_start: str, in_text_end: str, in_p: str) -> str:
  395. """return previous UTF-8 code-point if 'in_p' is not the end of a valid one."""
  396. pass
  397. # IMGUI_API int ImTextCountLines(const char* in_text, const char* in_text_end); /* original C++ signature */
  398. def im_text_count_lines(in_text: str, in_text_end: str) -> int:
  399. """return number of lines taken by text. trailing carriage return doesn't count as an extra line."""
  400. pass
  401. class ImDrawTextFlags_(enum.IntFlag):
  402. """Helpers: High-level text functions (DO NOT USE!!! THIS IS A MINIMAL SUBSET OF LARGER UPCOMING CHANGES)"""
  403. # ImDrawTextFlags_None = 0, /* original C++ signature */
  404. none = enum.auto() # (= 0)
  405. # ImDrawTextFlags_CpuFineClip = 1 << 0, /* original C++ signature */
  406. cpu_fine_clip = (
  407. enum.auto()
  408. ) # (= 1 << 0) # Must be == 1/True for legacy with 'bool cpu_fine_clip' arg to RenderText()
  409. # ImDrawTextFlags_WrapKeepBlanks = 1 << 1, /* original C++ signature */
  410. wrap_keep_blanks = enum.auto() # (= 1 << 1)
  411. # ImDrawTextFlags_StopOnNewLine = 1 << 2, /* original C++ signature */
  412. # }
  413. stop_on_new_line = enum.auto() # (= 1 << 2)
  414. # IMGUI_API const char* ImFontCalcWordWrapPositionEx(ImFont* font, float size, const char* text, const char* text_end, float wrap_width, ImDrawTextFlags flags = 0); /* original C++ signature */
  415. def im_font_calc_word_wrap_position_ex(
  416. font: ImFont, size: float, text: str, text_end: str, wrap_width: float, flags: ImDrawTextFlags = 0
  417. ) -> str:
  418. pass
  419. # IMGUI_API const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_end, ImDrawTextFlags flags = 0); /* original C++ signature */
  420. def im_text_calc_word_wrap_next_line_start(text: str, text_end: str, flags: ImDrawTextFlags = 0) -> str:
  421. """trim trailing space and find beginning of next line"""
  422. pass
  423. class ImWcharClass(enum.IntFlag):
  424. """Character classification for word-wrapping logic"""
  425. # ImWcharClass_Blank, /* original C++ signature */
  426. blank = enum.auto() # (= 0)
  427. # ImWcharClass_Punct, /* original C++ signature */
  428. punct = enum.auto() # (= 1)
  429. # ImWcharClass_Other /* original C++ signature */
  430. # }
  431. other = enum.auto() # (= 2)
  432. # IMGUI_API void ImTextInitClassifiers(); /* original C++ signature */
  433. def im_text_init_classifiers() -> None:
  434. pass
  435. # IMGUI_API void ImTextClassifierClear(ImU32* bits, unsigned int codepoint_min, unsigned int codepoint_end, ImWcharClass char_class); /* original C++ signature */
  436. def im_text_classifier_clear(bits: ImU32, codepoint_min: int, codepoint_end: int, char_class: ImWcharClass) -> None:
  437. pass
  438. # IMGUI_API void ImTextClassifierSetCharClass(ImU32* bits, unsigned int codepoint_min, unsigned int codepoint_end, ImWcharClass char_class, unsigned int c); /* original C++ signature */
  439. def im_text_classifier_set_char_class(
  440. bits: ImU32, codepoint_min: int, codepoint_end: int, char_class: ImWcharClass, c: int
  441. ) -> None:
  442. pass
  443. # Helpers: File System
  444. # - Wrapper for standard libs functions. (Note that imgui_demo.cpp does _not_ use them to keep the code easy to copy)
  445. # - ImMin/ImMax/ImClamp/ImLerp/ImSwap are used by widgets which support variety of types: signed/unsigned int/long long float/double
  446. # (Exceptionally using templates here but we could also redefine them for those types)
  447. # inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); } /* original C++ signature */
  448. def im_min(lhs: ImVec2Like, rhs: ImVec2Like) -> ImVec2:
  449. """(private API)"""
  450. pass
  451. # inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x >= rhs.x ? lhs.x : rhs.x, lhs.y >= rhs.y ? lhs.y : rhs.y); } /* original C++ signature */
  452. def im_max(lhs: ImVec2Like, rhs: ImVec2Like) -> ImVec2:
  453. """(private API)"""
  454. pass
  455. # inline ImVec2 ImClamp(const ImVec2& v, const ImVec2&mn, const ImVec2&mx){ return ImVec2((v.x < mn.x) ? mn.x : (v.x > mx.x) ? mx.x : v.x, (v.y < mn.y) ? mn.y : (v.y > mx.y) ? mx.y : v.y); } /* original C++ signature */
  456. def im_clamp(v: ImVec2Like, mn: ImVec2Like, mx: ImVec2Like) -> ImVec2:
  457. """(private API)"""
  458. pass
  459. # inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) { return ImVec2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); } /* original C++ signature */
  460. @overload
  461. def im_lerp(a: ImVec2Like, b: ImVec2Like, t: float) -> ImVec2:
  462. """(private API)"""
  463. pass
  464. # inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); } /* original C++ signature */
  465. @overload
  466. def im_lerp(a: ImVec2Like, b: ImVec2Like, t: ImVec2Like) -> ImVec2:
  467. """(private API)"""
  468. pass
  469. # inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); } /* original C++ signature */
  470. @overload
  471. def im_lerp(a: ImVec4Like, b: ImVec4Like, t: float) -> ImVec4:
  472. """(private API)"""
  473. pass
  474. # - Misc maths helpers
  475. # inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; } /* original C++ signature */
  476. def im_saturate(f: float) -> float:
  477. """(private API)"""
  478. pass
  479. # inline float ImLengthSqr(const ImVec2& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y); } /* original C++ signature */
  480. @overload
  481. def im_length_sqr(lhs: ImVec2Like) -> float:
  482. """(private API)"""
  483. pass
  484. # inline float ImLengthSqr(const ImVec4& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); } /* original C++ signature */
  485. @overload
  486. def im_length_sqr(lhs: ImVec4Like) -> float:
  487. """(private API)"""
  488. pass
  489. # inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = (lhs.x * lhs.x) + (lhs.y * lhs.y); if (d > 0.0f) return ImRsqrt(d); return fail_value; } /* original C++ signature */
  490. def im_inv_length(lhs: ImVec2Like, fail_value: float) -> float:
  491. """(private API)"""
  492. pass
  493. # inline float ImTrunc(float f) { return (float)(int)(f); } /* original C++ signature */
  494. @overload
  495. def im_trunc(f: float) -> float:
  496. """(private API)"""
  497. pass
  498. # inline ImVec2 ImTrunc(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); } /* original C++ signature */
  499. @overload
  500. def im_trunc(v: ImVec2Like) -> ImVec2:
  501. """(private API)"""
  502. pass
  503. # inline float ImFloor(float f) { return (float)((f >= 0 || (float)(int)f == f) ? (int)f : (int)f - 1); } /* original C++ signature */
  504. @overload
  505. def im_floor(f: float) -> float:
  506. """(private API)
  507. Decent replacement for floorf()
  508. """
  509. pass
  510. # inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2(ImFloor(v.x), ImFloor(v.y)); } /* original C++ signature */
  511. @overload
  512. def im_floor(v: ImVec2Like) -> ImVec2:
  513. """(private API)"""
  514. pass
  515. # inline float ImTrunc64(float f) { return (float)(ImS64)(f); } /* original C++ signature */
  516. def im_trunc64(f: float) -> float:
  517. """(private API)"""
  518. pass
  519. # inline float ImRound64(float f) { return (float)(ImS64)(f + 0.5f); } /* original C++ signature */
  520. def im_round64(f: float) -> float:
  521. """(private API)
  522. FIXME: Positive values only.
  523. """
  524. pass
  525. # inline int ImModPositive(int a, int b) { return (a + b) % b; } /* original C++ signature */
  526. def im_mod_positive(a: int, b: int) -> int:
  527. """(private API)"""
  528. pass
  529. # inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; } /* original C++ signature */
  530. def im_dot(a: ImVec2Like, b: ImVec2Like) -> float:
  531. """(private API)"""
  532. pass
  533. # inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); } /* original C++ signature */
  534. def im_rotate(v: ImVec2Like, cos_a: float, sin_a: float) -> ImVec2:
  535. """(private API)"""
  536. pass
  537. # inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; } /* original C++ signature */
  538. def im_linear_sweep(current: float, target: float, speed: float) -> float:
  539. """(private API)"""
  540. pass
  541. # inline float ImLinearRemapClamp(float s0, float s1, float d0, float d1, float x) { return ImSaturate((x - s0) / (s1 - s0)) * (d1 - d0) + d0; } /* original C++ signature */
  542. def im_linear_remap_clamp(s0: float, s1: float, d0: float, d1: float, x: float) -> float:
  543. """(private API)"""
  544. pass
  545. # inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); } /* original C++ signature */
  546. def im_mul(lhs: ImVec2Like, rhs: ImVec2Like) -> ImVec2:
  547. """(private API)"""
  548. pass
  549. # inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; } /* original C++ signature */
  550. def im_is_float_above_guaranteed_integer_precision(f: float) -> bool:
  551. """(private API)"""
  552. pass
  553. # inline float ImExponentialMovingAverage(float avg, float sample, int n){ avg -= avg / (float)n; avg += sample / (float)n; return avg; } /* original C++ signature */
  554. def im_exponential_moving_average(avg: float, sample: float, n: int) -> float:
  555. """(private API)"""
  556. pass
  557. # Helpers: Geometry
  558. # IMGUI_API ImVec2 ImBezierCubicCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, float t); /* original C++ signature */
  559. def im_bezier_cubic_calc(p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, p4: ImVec2Like, t: float) -> ImVec2:
  560. pass
  561. # IMGUI_API ImVec2 ImBezierCubicClosestPoint(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, int num_segments); /* original C++ signature */
  562. def im_bezier_cubic_closest_point(
  563. p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, p4: ImVec2Like, p: ImVec2Like, num_segments: int
  564. ) -> ImVec2:
  565. """For curves with explicit number of segments"""
  566. pass
  567. # IMGUI_API ImVec2 ImBezierCubicClosestPointCasteljau(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, float tess_tol); /* original C++ signature */
  568. def im_bezier_cubic_closest_point_casteljau(
  569. p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, p4: ImVec2Like, p: ImVec2Like, tess_tol: float
  570. ) -> ImVec2:
  571. """For auto-tessellated curves you can use tess_tol = style.CurveTessellationTol"""
  572. pass
  573. # IMGUI_API ImVec2 ImBezierQuadraticCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, float t); /* original C++ signature */
  574. def im_bezier_quadratic_calc(p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, t: float) -> ImVec2:
  575. pass
  576. # IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p); /* original C++ signature */
  577. def im_line_closest_point(a: ImVec2Like, b: ImVec2Like, p: ImVec2Like) -> ImVec2:
  578. pass
  579. # IMGUI_API bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p); /* original C++ signature */
  580. def im_triangle_contains_point(a: ImVec2Like, b: ImVec2Like, c: ImVec2Like, p: ImVec2Like) -> bool:
  581. pass
  582. # IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p); /* original C++ signature */
  583. def im_triangle_closest_point(a: ImVec2Like, b: ImVec2Like, c: ImVec2Like, p: ImVec2Like) -> ImVec2:
  584. pass
  585. # IMGUI_API void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w); /* original C++ signature */
  586. def im_triangle_barycentric_coords(
  587. a: ImVec2Like, b: ImVec2Like, c: ImVec2Like, p: ImVec2Like, out_u: float, out_v: float, out_w: float
  588. ) -> Tuple[float, float, float]:
  589. pass
  590. # inline float ImTriangleArea(const ImVec2& a, const ImVec2& b, const ImVec2& c) { return ImFabs((a.x * (b.y - c.y)) + (b.x * (c.y - a.y)) + (c.x * (a.y - b.y))) * 0.5f; } /* original C++ signature */
  591. def im_triangle_area(a: ImVec2Like, b: ImVec2Like, c: ImVec2Like) -> float:
  592. """(private API)"""
  593. pass
  594. # inline bool ImTriangleIsClockwise(const ImVec2& a, const ImVec2& b, const ImVec2& c) { return ((b.x - a.x) * (c.y - b.y)) - ((c.x - b.x) * (b.y - a.y)) > 0.0f; } /* original C++ signature */
  595. def im_triangle_is_clockwise(a: ImVec2Like, b: ImVec2Like, c: ImVec2Like) -> bool:
  596. """(private API)"""
  597. pass
  598. class ImVec1:
  599. # float x; /* original C++ signature */
  600. x: float
  601. # constexpr ImVec1() : x(0.0f) { } /* original C++ signature */
  602. @overload
  603. def __init__(self) -> None:
  604. pass
  605. # constexpr ImVec1(float _x) : x(_x) { } /* original C++ signature */
  606. @overload
  607. def __init__(self, _x: float) -> None:
  608. pass
  609. class ImVec2i:
  610. """Helper: ImVec2i (2D vector, integer)"""
  611. # int x, /* original C++ signature */
  612. x: int
  613. # y; /* original C++ signature */
  614. y: int
  615. # constexpr ImVec2i() : x(0), y(0) {} /* original C++ signature */
  616. @overload
  617. def __init__(self) -> None:
  618. pass
  619. # constexpr ImVec2i(int _x, int _y) : x(_x), y(_y) {} /* original C++ signature */
  620. @overload
  621. def __init__(self, _x: int, _y: int) -> None:
  622. pass
  623. class ImVec2ih:
  624. """Helper: ImVec2ih (2D vector, half-size integer, for long-term packed storage)"""
  625. # short x, /* original C++ signature */
  626. x: int
  627. # y; /* original C++ signature */
  628. y: int
  629. # constexpr ImVec2ih() : x(0), y(0) {} /* original C++ signature */
  630. @overload
  631. def __init__(self) -> None:
  632. pass
  633. # constexpr ImVec2ih(short _x, short _y) : x(_x), y(_y) {} /* original C++ signature */
  634. @overload
  635. def __init__(self, _x: int, _y: int) -> None:
  636. pass
  637. # constexpr explicit ImVec2ih(const ImVec2& rhs) : x((short)rhs.x), y((short)rhs.y) {} /* original C++ signature */
  638. @overload
  639. def __init__(self, rhs: ImVec2Like) -> None:
  640. pass
  641. class ImRect:
  642. """Helper: ImRect (2D axis aligned bounding-box)
  643. NB: we can't rely on ImVec2 math operators being available here!
  644. """
  645. # ImVec2 Min; /* original C++ signature */
  646. min: ImVec2 # Upper-left
  647. # ImVec2 Max; /* original C++ signature */
  648. max: ImVec2 # Lower-right
  649. # constexpr ImRect() : Min(0.0f, 0.0f), Max(0.0f, 0.0f) {} /* original C++ signature */
  650. @overload
  651. def __init__(self) -> None:
  652. pass
  653. # constexpr ImRect(const ImVec2& min, const ImVec2& max) : Min(min), Max(max) {} /* original C++ signature */
  654. @overload
  655. def __init__(self, min: ImVec2Like, max: ImVec2Like) -> None:
  656. pass
  657. # constexpr ImRect(const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {} /* original C++ signature */
  658. @overload
  659. def __init__(self, v: ImVec4Like) -> None:
  660. pass
  661. # constexpr ImRect(float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {} /* original C++ signature */
  662. @overload
  663. def __init__(self, x1: float, y1: float, x2: float, y2: float) -> None:
  664. pass
  665. # ImVec2 GetCenter() const { return ImVec2((Min.x + Max.x) * 0.5f, (Min.y + Max.y) * 0.5f); } /* original C++ signature */
  666. def get_center(self) -> ImVec2:
  667. """(private API)"""
  668. pass
  669. # ImVec2 GetSize() const { return ImVec2(Max.x - Min.x, Max.y - Min.y); } /* original C++ signature */
  670. def get_size(self) -> ImVec2:
  671. """(private API)"""
  672. pass
  673. # float GetWidth() const { return Max.x - Min.x; } /* original C++ signature */
  674. def get_width(self) -> float:
  675. """(private API)"""
  676. pass
  677. # float GetHeight() const { return Max.y - Min.y; } /* original C++ signature */
  678. def get_height(self) -> float:
  679. """(private API)"""
  680. pass
  681. # float GetArea() const { return (Max.x - Min.x) * (Max.y - Min.y); } /* original C++ signature */
  682. def get_area(self) -> float:
  683. """(private API)"""
  684. pass
  685. # ImVec2 GetTL() const { return Min; } /* original C++ signature */
  686. def get_tl(self) -> ImVec2:
  687. """(private API)
  688. Top-left
  689. """
  690. pass
  691. # ImVec2 GetTR() const { return ImVec2(Max.x, Min.y); } /* original C++ signature */
  692. def get_tr(self) -> ImVec2:
  693. """(private API)
  694. Top-right
  695. """
  696. pass
  697. # ImVec2 GetBL() const { return ImVec2(Min.x, Max.y); } /* original C++ signature */
  698. def get_bl(self) -> ImVec2:
  699. """(private API)
  700. Bottom-left
  701. """
  702. pass
  703. # ImVec2 GetBR() const { return Max; } /* original C++ signature */
  704. def get_br(self) -> ImVec2:
  705. """(private API)
  706. Bottom-right
  707. """
  708. pass
  709. # bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; } /* original C++ signature */
  710. @overload
  711. def contains(self, p: ImVec2Like) -> bool:
  712. """(private API)"""
  713. pass
  714. # bool Contains(const ImRect& r) const { return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x <= Max.x && r.Max.y <= Max.y; } /* original C++ signature */
  715. @overload
  716. def contains(self, r: ImRect) -> bool:
  717. """(private API)"""
  718. pass
  719. # bool ContainsWithPad(const ImVec2& p, const ImVec2& pad) const { return p.x >= Min.x - pad.x && p.y >= Min.y - pad.y && p.x < Max.x + pad.x && p.y < Max.y + pad.y; } /* original C++ signature */
  720. def contains_with_pad(self, p: ImVec2Like, pad: ImVec2Like) -> bool:
  721. """(private API)"""
  722. pass
  723. # bool Overlaps(const ImRect& r) const { return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; } /* original C++ signature */
  724. def overlaps(self, r: ImRect) -> bool:
  725. """(private API)"""
  726. pass
  727. # void Add(const ImVec2& p) { if (Min.x > p.x) Min.x = p.x; if (Min.y > p.y) Min.y = p.y; if (Max.x < p.x) Max.x = p.x; if (Max.y < p.y) Max.y = p.y; } /* original C++ signature */
  728. @overload
  729. def add(self, p: ImVec2Like) -> None:
  730. """(private API)"""
  731. pass
  732. # void Add(const ImRect& r) { if (Min.x > r.Min.x) Min.x = r.Min.x; if (Min.y > r.Min.y) Min.y = r.Min.y; if (Max.x < r.Max.x) Max.x = r.Max.x; if (Max.y < r.Max.y) Max.y = r.Max.y; } /* original C++ signature */
  733. @overload
  734. def add(self, r: ImRect) -> None:
  735. """(private API)"""
  736. pass
  737. # void AddX(float x) { if (Min.x > x) Min.x = x; if (Max.x < x) Max.x = x; } /* original C++ signature */
  738. def add_x(self, x: float) -> None:
  739. """(private API)"""
  740. pass
  741. # void AddY(float y) { if (Min.y > y) Min.y = y; if (Max.y < y) Max.y = y; } /* original C++ signature */
  742. def add_y(self, y: float) -> None:
  743. """(private API)"""
  744. pass
  745. # void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; } /* original C++ signature */
  746. @overload
  747. def expand(self, amount: float) -> None:
  748. """(private API)"""
  749. pass
  750. # void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; } /* original C++ signature */
  751. @overload
  752. def expand(self, amount: ImVec2Like) -> None:
  753. """(private API)"""
  754. pass
  755. # void Translate(const ImVec2& d) { Min.x += d.x; Min.y += d.y; Max.x += d.x; Max.y += d.y; } /* original C++ signature */
  756. def translate(self, d: ImVec2Like) -> None:
  757. """(private API)"""
  758. pass
  759. # void TranslateX(float dx) { Min.x += dx; Max.x += dx; } /* original C++ signature */
  760. def translate_x(self, dx: float) -> None:
  761. """(private API)"""
  762. pass
  763. # void TranslateY(float dy) { Min.y += dy; Max.y += dy; } /* original C++ signature */
  764. def translate_y(self, dy: float) -> None:
  765. """(private API)"""
  766. pass
  767. # void ClipWith(const ImRect& r) { Min = ImMax(Min, r.Min); Max = ImMin(Max, r.Max); } /* original C++ signature */
  768. def clip_with(self, r: ImRect) -> None:
  769. """(private API)
  770. Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display.
  771. """
  772. pass
  773. # void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); } /* original C++ signature */
  774. def clip_with_full(self, r: ImRect) -> None:
  775. """(private API)
  776. Full version, ensure both points are fully clipped.
  777. """
  778. pass
  779. # bool IsInverted() const { return Min.x > Max.x || Min.y > Max.y; } /* original C++ signature */
  780. def is_inverted(self) -> bool:
  781. """(private API)"""
  782. pass
  783. # ImVec4 ToVec4() const { return ImVec4(Min.x, Min.y, Max.x, Max.y); } /* original C++ signature */
  784. def to_vec4(self) -> ImVec4:
  785. """(private API)"""
  786. pass
  787. # const ImVec4& AsVec4() const { return *(const ImVec4*)&Min.x; } /* original C++ signature */
  788. def as_vec4(self) -> ImVec4:
  789. """(private API)"""
  790. pass
  791. # Helper: ImBitArray
  792. # inline size_t ImBitArrayGetStorageSizeInBytes(int bitcount) { return (size_t)((bitcount + 31) >> 5) << 2; } /* original C++ signature */
  793. def im_bit_array_get_storage_size_in_bytes(bitcount: int) -> int:
  794. """(private API)"""
  795. pass
  796. # inline void ImBitArrayClearAllBits(ImU32* arr, int bitcount){ memset(arr, 0, ImBitArrayGetStorageSizeInBytes(bitcount)); } /* original C++ signature */
  797. def im_bit_array_clear_all_bits(arr: ImU32, bitcount: int) -> None:
  798. """(private API)"""
  799. pass
  800. # inline bool ImBitArrayTestBit(const ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); return (arr[n >> 5] & mask) != 0; } /* original C++ signature */
  801. def im_bit_array_test_bit(arr: ImU32, n: int) -> bool:
  802. """(private API)"""
  803. pass
  804. # inline void ImBitArrayClearBit(ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] &= ~mask; } /* original C++ signature */
  805. def im_bit_array_clear_bit(arr: ImU32, n: int) -> None:
  806. """(private API)"""
  807. pass
  808. # inline void ImBitArraySetBit(ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] |= mask; } /* original C++ signature */
  809. def im_bit_array_set_bit(arr: ImU32, n: int) -> None:
  810. """(private API)"""
  811. pass
  812. # inline void ImBitArraySetBitRange(ImU32* arr, int n, int n2) // Works on range [n..n2) /* original C++ signature */
  813. # {
  814. # n2--;
  815. # while (n <= n2)
  816. # {
  817. # int a_mod = (n & 31);
  818. # int b_mod = (n2 > (n | 31) ? 31 : (n2 & 31)) + 1;
  819. # ImU32 mask = (ImU32)(((ImU64)1 << b_mod) - 1) & ~(ImU32)(((ImU64)1 << a_mod) - 1);
  820. # arr[n >> 5] |= mask;
  821. # n = (n + 32) & ~31;
  822. # }
  823. # }
  824. def im_bit_array_set_bit_range(arr: ImU32, n: int, n2: int) -> None:
  825. """(private API)
  826. // Works on range [n..n2)
  827. """
  828. pass
  829. class ImBitVector:
  830. """Helper: ImBitVector
  831. Store 1-bit per value.
  832. """
  833. # ImVector<ImU32> Storage; /* original C++ signature */
  834. storage: ImVector_ImU32
  835. # void Create(int sz) { Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (size_t)Storage.Size * sizeof(Storage.Data[0])); } /* original C++ signature */
  836. def create(self, sz: int) -> None:
  837. """(private API)"""
  838. pass
  839. # void Clear() { Storage.clear(); } /* original C++ signature */
  840. def clear(self) -> None:
  841. """(private API)"""
  842. pass
  843. # bool TestBit(int n) const { IM_ASSERT(n < (Storage.Size << 5)); return IM_BITARRAY_TESTBIT(Storage.Data, n); } /* original C++ signature */
  844. def test_bit(self, n: int) -> bool:
  845. """(private API)"""
  846. pass
  847. # void SetBit(int n) { IM_ASSERT(n < (Storage.Size << 5)); ImBitArraySetBit(Storage.Data, n); } /* original C++ signature */
  848. def set_bit(self, n: int) -> None:
  849. """(private API)"""
  850. pass
  851. # void ClearBit(int n) { IM_ASSERT(n < (Storage.Size << 5)); ImBitArrayClearBit(Storage.Data, n); } /* original C++ signature */
  852. def clear_bit(self, n: int) -> None:
  853. """(private API)"""
  854. pass
  855. # ImBitVector(ImVector<ImU32> Storage = ImVector<ImU32>()); /* original C++ signature */
  856. def __init__(self, storage: Optional[ImVector_ImU32] = None) -> None:
  857. """Auto-generated default constructor with named params
  858. Python bindings defaults:
  859. If Storage is None, then its default value will be: ImVector_ImU32()
  860. """
  861. pass
  862. class TextIndex:
  863. """Helper: ImGuiTextIndex
  864. Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API.
  865. """
  866. # ImVector<int> Offsets; /* original C++ signature */
  867. offsets: ImVector_int
  868. # int EndOffset = 0; /* original C++ signature */
  869. end_offset: int = 0 # Because we don't own text buffer we need to maintain EndOffset (may bake in LineOffsets?)
  870. # void clear() { Offsets.clear(); EndOffset = 0; } /* original C++ signature */
  871. def clear(self) -> None:
  872. """(private API)"""
  873. pass
  874. # int size() { return Offsets.Size; } /* original C++ signature */
  875. def size(self) -> int:
  876. """(private API)"""
  877. pass
  878. # const char* get_line_begin(const char* base, int n) { return base + (Offsets.Size != 0 ? Offsets[n] : 0); } /* original C++ signature */
  879. def get_line_begin(self, base: str, n: int) -> str:
  880. """(private API)"""
  881. pass
  882. # const char* get_line_end(const char* base, int n) { return base + (n + 1 < Offsets.Size ? (Offsets[n + 1] - 1) : EndOffset); } /* original C++ signature */
  883. def get_line_end(self, base: str, n: int) -> str:
  884. """(private API)"""
  885. pass
  886. # void append(const char* base, int old_size, int new_size); /* original C++ signature */
  887. def append(self, base: str, old_size: int, new_size: int) -> None:
  888. """(private API)"""
  889. pass
  890. # ImGuiTextIndex(ImVector<int> Offsets = ImVector<int>(), int EndOffset = 0); /* original C++ signature */
  891. def __init__(self, offsets: Optional[ImVector_int] = None, end_offset: int = 0) -> None:
  892. """Auto-generated default constructor with named params
  893. Python bindings defaults:
  894. If Offsets is None, then its default value will be: ImVector_int()
  895. """
  896. pass
  897. # IMGUI_API ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_end, ImGuiID key); /* original C++ signature */
  898. def im_lower_bound(in_begin: StoragePair, in_end: StoragePair, key: ID) -> StoragePair:
  899. """Helper: ImGuiStorage"""
  900. pass
  901. # -----------------------------------------------------------------------------
  902. # [SECTION] ImDrawList support
  903. # -----------------------------------------------------------------------------
  904. # ImDrawList: Helper function to calculate a circle's segment count given its radius and a "maximum error" value.
  905. # Estimation of number of circle segment based on error is derived using method described in https://stackoverflow.com/a/2244088/15194693
  906. # Number of segments (N) is calculated using equation:
  907. # N = ceil ( pi / acos(1 - error / r) ) where r > 0, error <= r
  908. # Our equation is significantly simpler that one in the post thanks for choosing segment that is
  909. # perpendicular to X axis. Follow steps in the article from this starting condition and you will
  910. # will get this result.
  911. #
  912. # Rendering circles with an odd number of segments, while mathematically correct will produce
  913. # asymmetrical results on the raster grid. Therefore we're rounding N to next even number (7->8, 8->8, 9->10 etc.)
  914. # Raw equation from IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC rewritten for 'r' and 'error'.
  915. # ImDrawList: Lookup table size for adaptive arc drawing, cover full circle.
  916. class ImDrawListSharedData:
  917. """Data shared between all ImDrawList instances
  918. Conceptually this could have been called e.g. ImDrawListSharedContext
  919. Typically one ImGui context would create and maintain one of this.
  920. You may want to create your own instance of you try to ImDrawList completely without ImGui. In that case, watch out for future changes to this structure.
  921. """
  922. # ImVec2 TexUvWhitePixel; /* original C++ signature */
  923. tex_uv_white_pixel: ImVec2 # UV of white pixel in the atlas (== FontAtlas->TexUvWhitePixel)
  924. # const ImVec4* TexUvLines; /* original C++ signature */
  925. tex_uv_lines: ImVec4 # UV of anti-aliased lines in the atlas (== FontAtlas->TexUvLines) # (const)
  926. # ImFontAtlas* FontAtlas; /* original C++ signature */
  927. font_atlas: ImFontAtlas # Current font atlas
  928. # ImFont* Font; /* original C++ signature */
  929. font: ImFont # Current font (used for simplified AddText overload)
  930. # float FontSize; /* original C++ signature */
  931. font_size: float # Current font size (used for for simplified AddText overload)
  932. # float FontScale; /* original C++ signature */
  933. font_scale: float # Current font scale (== FontSize / Font->FontSize)
  934. # float CurveTessellationTol; /* original C++ signature */
  935. curve_tessellation_tol: float # Tessellation tolerance when using PathBezierCurveTo()
  936. # float CircleSegmentMaxError; /* original C++ signature */
  937. circle_segment_max_error: float # Number of circle segments to use per pixel of radius for AddCircle() etc
  938. # float InitialFringeScale; /* original C++ signature */
  939. initial_fringe_scale: float # Initial scale to apply to AA fringe
  940. # ImDrawListFlags InitialFlags; /* original C++ signature */
  941. initial_flags: ImDrawListFlags # Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)
  942. # ImVec4 ClipRectFullscreen; /* original C++ signature */
  943. clip_rect_fullscreen: ImVec4 # Value for PushClipRectFullscreen()
  944. # ImVector<ImVec2> TempBuffer; /* original C++ signature */
  945. temp_buffer: ImVector_ImVec2 # Temporary write buffer
  946. # ImVector<ImDrawList*> DrawLists; /* original C++ signature */
  947. draw_lists: ImVector_ImDrawList_ptr # All draw lists associated to this ImDrawListSharedData
  948. # ImGuiContext* Context; /* original C++ signature */
  949. context: Context # [OPTIONAL] Link to Dear ImGui context. 99% of ImDrawList/ImFontAtlas can function without an ImGui context, but this facilitate handling one legacy edge case.
  950. # Lookup tables
  951. # float ArcFastRadiusCutoff; /* original C++ signature */
  952. arc_fast_radius_cutoff: float # Cutoff radius after which arc drawing will fallback to slower PathArcTo()
  953. # ImU8 CircleSegmentCounts[64]; /* original C++ signature */
  954. circle_segment_counts: (
  955. np.ndarray
  956. ) # ndarray[type=ImU8, size=64] # Precomputed segment count for given radius before we calculate it dynamically (to avoid calculation overhead)
  957. # ImDrawListSharedData(); /* original C++ signature */
  958. def __init__(self) -> None:
  959. pass
  960. # void SetCircleTessellationMaxError(float max_error); /* original C++ signature */
  961. def set_circle_tessellation_max_error(self, max_error: float) -> None:
  962. """(private API)"""
  963. pass
  964. class ImDrawDataBuilder:
  965. # ImVector<ImDrawList*> LayerData1; /* original C++ signature */
  966. layer_data1: ImVector_ImDrawList_ptr
  967. # ImDrawDataBuilder() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  968. def __init__(self) -> None:
  969. pass
  970. class ImFontStackData:
  971. # ImFont* Font; /* original C++ signature */
  972. font: ImFont
  973. # float FontSizeBeforeScaling; /* original C++ signature */
  974. font_size_before_scaling: float # ~~ style.FontSizeBase
  975. # float FontSizeAfterScaling; /* original C++ signature */
  976. font_size_after_scaling: float # ~~ g.FontSize
  977. # ImFontStackData(float FontSizeBeforeScaling = float(), float FontSizeAfterScaling = float()); /* original C++ signature */
  978. def __init__(self, font_size_before_scaling: float = float(), font_size_after_scaling: float = float()) -> None:
  979. """Auto-generated default constructor with named params"""
  980. pass
  981. # -----------------------------------------------------------------------------
  982. # [SECTION] Style support
  983. # -----------------------------------------------------------------------------
  984. class StyleVarInfo:
  985. # void* GetVarPtr(void* parent) const { return (void*)((uchar*)parent + Offset); } /* original C++ signature */
  986. def get_var_ptr(self, parent: Any) -> Any:
  987. """(private API)"""
  988. pass
  989. # ImGuiStyleVarInfo(); /* original C++ signature */
  990. def __init__(self) -> None:
  991. """Auto-generated default constructor"""
  992. pass
  993. class ColorMod:
  994. """Stacked color modifier, backup of modified data so we can restore it"""
  995. # ImGuiCol Col; /* original C++ signature */
  996. col: Col
  997. # ImVec4 BackupValue; /* original C++ signature */
  998. backup_value: ImVec4
  999. # ImGuiColorMod(ImGuiCol Col = ImGuiCol(), ImVec4 BackupValue = ImVec4()); /* original C++ signature */
  1000. def __init__(self, col: Optional[Col] = None, backup_value: Optional[ImVec4Like] = None) -> None:
  1001. """Auto-generated default constructor with named params
  1002. Python bindings defaults:
  1003. If any of the params below is None, then its default value below will be used:
  1004. * Col: Col()
  1005. * BackupValue: ImVec4()
  1006. """
  1007. pass
  1008. class StyleMod:
  1009. """Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the variable."""
  1010. # ImGuiStyleVar VarIdx; /* original C++ signature */
  1011. var_idx: StyleVar
  1012. # ImGuiStyleMod(ImGuiStyleVar idx, int v) { VarIdx = idx; BackupInt[0] = v; } /* original C++ signature */
  1013. @overload
  1014. def __init__(self, idx: StyleVar, v: int) -> None:
  1015. pass
  1016. # ImGuiStyleMod(ImGuiStyleVar idx, float v) { VarIdx = idx; BackupFloat[0] = v; } /* original C++ signature */
  1017. @overload
  1018. def __init__(self, idx: StyleVar, v: float) -> None:
  1019. pass
  1020. # ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloat[0] = v.x; BackupFloat[1] = v.y; } /* original C++ signature */
  1021. @overload
  1022. def __init__(self, idx: StyleVar, v: ImVec2Like) -> None:
  1023. pass
  1024. # -----------------------------------------------------------------------------
  1025. # [SECTION] Data types support
  1026. # -----------------------------------------------------------------------------
  1027. class DataTypeStorage:
  1028. # ImU8 Data[8]; /* original C++ signature */
  1029. data: np.ndarray # ndarray[type=ImU8, size=8] # Opaque storage to fit any data up to ImGuiDataType_COUNT
  1030. # ImGuiDataTypeStorage(); /* original C++ signature */
  1031. def __init__(self) -> None:
  1032. """Auto-generated default constructor"""
  1033. pass
  1034. class DataTypeInfo:
  1035. """Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo()."""
  1036. # size_t Size; /* original C++ signature */
  1037. size: int # Size in bytes
  1038. # const char* Name; /* original C++ signature */
  1039. name: str # Short descriptive name for the type, for debugging # (const)
  1040. # const char* PrintFmt; /* original C++ signature */
  1041. print_fmt: str # Default printf format for the type # (const)
  1042. # const char* ScanFmt; /* original C++ signature */
  1043. scan_fmt: str # Default scanf format for the type # (const)
  1044. # ImGuiDataTypeInfo(size_t Size = size_t()); /* original C++ signature */
  1045. def __init__(self, size: int = int()) -> None:
  1046. """Auto-generated default constructor with named params"""
  1047. pass
  1048. class DataTypePrivate_(enum.IntFlag):
  1049. """Extend ImGuiDataType_"""
  1050. # ImGuiDataType_Pointer = ImGuiDataType_COUNT, /* original C++ signature */
  1051. pointer = enum.auto() # (= DataType_COUNT)
  1052. # ImGuiDataType_ID, /* original C++ signature */
  1053. # }
  1054. id_ = enum.auto() # (= )
  1055. # -----------------------------------------------------------------------------
  1056. # [SECTION] Widgets support: flags, enums, data structures
  1057. # -----------------------------------------------------------------------------
  1058. class ItemFlagsPrivate_(enum.IntFlag):
  1059. """Extend ImGuiItemFlags
  1060. - input: PushItemFlag() manipulates g.CurrentItemFlags, g.NextItemData.ItemFlags, ItemAdd() calls may add extra flags too.
  1061. - output: stored in g.LastItemData.ItemFlags
  1062. """
  1063. # Controlled by user
  1064. # ImGuiItemFlags_ReadOnly = 1 << 11, /* original C++ signature */
  1065. read_only = (
  1066. enum.auto()
  1067. ) # (= 1 << 11) # False // [ALPHA] Allow hovering interactions but underlying value is not changed.
  1068. # ImGuiItemFlags_MixedValue = 1 << 12, /* original C++ signature */
  1069. mixed_value = (
  1070. enum.auto()
  1071. ) # (= 1 << 12) # False // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
  1072. # ImGuiItemFlags_NoWindowHoverableCheck = 1 << 13, /* original C++ signature */
  1073. no_window_hoverable_check = enum.auto() # (= 1 << 13) # False // Disable hoverable check in ItemHoverable()
  1074. # ImGuiItemFlags_AllowOverlap = 1 << 14, /* original C++ signature */
  1075. allow_overlap = (
  1076. enum.auto()
  1077. ) # (= 1 << 14) # False // Allow being overlapped by another widget. Not-hovered to Hovered transition deferred by a frame.
  1078. # ImGuiItemFlags_NoNavDisableMouseHover = 1 << 15, /* original C++ signature */
  1079. no_nav_disable_mouse_hover = (
  1080. enum.auto()
  1081. ) # (= 1 << 15) # False // Nav keyboard/gamepad mode doesn't disable hover highlight (behave as if NavHighlightItemUnderNav==False).
  1082. # ImGuiItemFlags_NoMarkEdited = 1 << 16, /* original C++ signature */
  1083. no_mark_edited = enum.auto() # (= 1 << 16) # False // Skip calling MarkItemEdited()
  1084. # ImGuiItemFlags_NoFocus = 1 << 17, /* original C++ signature */
  1085. no_focus = (
  1086. enum.auto()
  1087. ) # (= 1 << 17) # False // [EXPERIMENTAL: Not very well specced] Clicking doesn't take focus. Automatically sets ImGuiButtonFlags_NoFocus + ImGuiButtonFlags_NoNavFocus in ButtonBehavior().
  1088. # Controlled by widget code
  1089. # ImGuiItemFlags_Inputable = 1 << 20, /* original C++ signature */
  1090. inputable = (
  1091. enum.auto()
  1092. ) # (= 1 << 20) # False // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
  1093. # ImGuiItemFlags_HasSelectionUserData = 1 << 21, /* original C++ signature */
  1094. has_selection_user_data = enum.auto() # (= 1 << 21) # False // Set by SetNextItemSelectionUserData()
  1095. # ImGuiItemFlags_IsMultiSelect = 1 << 22, /* original C++ signature */
  1096. is_multi_select = enum.auto() # (= 1 << 22) # False // Set by SetNextItemSelectionUserData()
  1097. # ImGuiItemFlags_Default_ = ImGuiItemFlags_AutoClosePopups, /* original C++ signature */
  1098. default_ = enum.auto() # (= ItemFlags_AutoClosePopups) # Please don't change, use PushItemFlag() instead.
  1099. # Obsolete
  1100. # ImGuiItemFlags_SelectableDontClosePopup = !ImGuiItemFlags_AutoClosePopups, // Can't have a redirect as we inverted the behavior
  1101. class ItemStatusFlags_(enum.IntFlag):
  1102. """Status flags for an already submitted item
  1103. - output: stored in g.LastItemData.StatusFlags
  1104. """
  1105. # ImGuiItemStatusFlags_None = 0, /* original C++ signature */
  1106. none = enum.auto() # (= 0)
  1107. # ImGuiItemStatusFlags_HoveredRect = 1 << 0, /* original C++ signature */
  1108. hovered_rect = (
  1109. enum.auto()
  1110. ) # (= 1 << 0) # Mouse position is within item rectangle (does NOT mean that the window is in correct z-order and can be hovered!, this is only one part of the most-common IsItemHovered test)
  1111. # ImGuiItemStatusFlags_HasDisplayRect = 1 << 1, /* original C++ signature */
  1112. has_display_rect = enum.auto() # (= 1 << 1) # g.LastItemData.DisplayRect is valid
  1113. # ImGuiItemStatusFlags_Edited = 1 << 2, /* original C++ signature */
  1114. edited = (
  1115. enum.auto()
  1116. ) # (= 1 << 2) # Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
  1117. # ImGuiItemStatusFlags_ToggledSelection = 1 << 3, /* original C++ signature */
  1118. toggled_selection = (
  1119. enum.auto()
  1120. ) # (= 1 << 3) # Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected", only state changes, in order to easily handle clipping with less issues.
  1121. # ImGuiItemStatusFlags_ToggledOpen = 1 << 4, /* original C++ signature */
  1122. toggled_open = enum.auto() # (= 1 << 4) # Set when TreeNode() reports toggling their open state.
  1123. # ImGuiItemStatusFlags_HasDeactivated = 1 << 5, /* original C++ signature */
  1124. has_deactivated = (
  1125. enum.auto()
  1126. ) # (= 1 << 5) # Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
  1127. # ImGuiItemStatusFlags_Deactivated = 1 << 6, /* original C++ signature */
  1128. deactivated = enum.auto() # (= 1 << 6) # Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
  1129. # ImGuiItemStatusFlags_HoveredWindow = 1 << 7, /* original C++ signature */
  1130. hovered_window = enum.auto() # (= 1 << 7) # Override the HoveredWindow test to allow cross-window hover testing.
  1131. # ImGuiItemStatusFlags_Visible = 1 << 8, /* original C++ signature */
  1132. visible = (
  1133. enum.auto()
  1134. ) # (= 1 << 8) # [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).
  1135. # ImGuiItemStatusFlags_HasClipRect = 1 << 9, /* original C++ signature */
  1136. has_clip_rect = enum.auto() # (= 1 << 9) # g.LastItemData.ClipRect is valid.
  1137. # ImGuiItemStatusFlags_HasShortcut = 1 << 10, /* original C++ signature */
  1138. has_shortcut = (
  1139. enum.auto()
  1140. ) # (= 1 << 10) # g.LastItemData.Shortcut valid. Set by SetNextItemShortcut() -> ItemAdd().
  1141. # ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8, // Removed IN 1.90.1 (Dec 2023). The trigger is part of g.NavActivateId. See commit 54c1bdeceb.
  1142. # ImGuiItemStatusFlags_EditedInternal = 1 << 11, /* original C++ signature */
  1143. edited_internal = (
  1144. enum.auto()
  1145. ) # (= 1 << 11) # Similar to ImGuiItemStatusFlags_Edited but bypassing ImGuiItemFlags_NoMarkEdited.
  1146. # Additional status + semantic for ImGuiTestEngine
  1147. class HoveredFlagsPrivate_(enum.IntFlag):
  1148. """Extend ImGuiHoveredFlags_"""
  1149. # ImGuiHoveredFlags_DelayMask_ = ImGuiHoveredFlags_DelayNone | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_DelayNormal | ImGuiHoveredFlags_NoSharedDelay, /* original C++ signature */
  1150. delay_mask_ = (
  1151. enum.auto()
  1152. ) # (= HoveredFlags_DelayNone | HoveredFlags_DelayShort | HoveredFlags_DelayNormal | HoveredFlags_NoSharedDelay)
  1153. # ImGuiHoveredFlags_AllowedMaskForIsWindowHovered = ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_AnyWindow | ImGuiHoveredFlags_NoPopupHierarchy | ImGuiHoveredFlags_DockHierarchy | ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary, /* original C++ signature */
  1154. allowed_mask_for_is_window_hovered = (
  1155. enum.auto()
  1156. ) # (= HoveredFlags_ChildWindows | HoveredFlags_RootWindow | HoveredFlags_AnyWindow | HoveredFlags_NoPopupHierarchy | HoveredFlags_DockHierarchy | HoveredFlags_AllowWhenBlockedByPopup | HoveredFlags_AllowWhenBlockedByActiveItem | HoveredFlags_ForTooltip | HoveredFlags_Stationary)
  1157. # ImGuiHoveredFlags_AllowedMaskForIsItemHovered = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped | ImGuiHoveredFlags_AllowWhenDisabled | ImGuiHoveredFlags_NoNavOverride | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayMask_, /* original C++ signature */
  1158. # }
  1159. allowed_mask_for_is_item_hovered = (
  1160. enum.auto()
  1161. ) # (= HoveredFlags_AllowWhenBlockedByPopup | HoveredFlags_AllowWhenBlockedByActiveItem | HoveredFlags_AllowWhenOverlapped | HoveredFlags_AllowWhenDisabled | HoveredFlags_NoNavOverride | HoveredFlags_ForTooltip | HoveredFlags_Stationary | HoveredFlags_DelayMask_)
  1162. class InputTextFlagsPrivate_(enum.IntFlag):
  1163. """Extend ImGuiInputTextFlags_"""
  1164. # [Internal]
  1165. # ImGuiInputTextFlags_Multiline = 1 << 26, /* original C++ signature */
  1166. multiline = enum.auto() # (= 1 << 26) # For internal use by InputTextMultiline()
  1167. # ImGuiInputTextFlags_TempInput = 1 << 27, /* original C++ signature */
  1168. temp_input = (
  1169. enum.auto()
  1170. ) # (= 1 << 27) # For internal use by TempInputText(), will skip calling ItemAdd(). Require bounding-box to strictly match.
  1171. # ImGuiInputTextFlags_LocalizeDecimalPoint= 1 << 28, /* original C++ signature */
  1172. localize_decimal_point = enum.auto() # (= 1 << 28) # For internal use by InputScalar() and TempInputScalar()
  1173. class ButtonFlagsPrivate_(enum.IntFlag):
  1174. """Extend ImGuiButtonFlags_"""
  1175. # ImGuiButtonFlags_PressedOnClick = 1 << 4, /* original C++ signature */
  1176. pressed_on_click = enum.auto() # (= 1 << 4) # return True on click (mouse down event)
  1177. # ImGuiButtonFlags_PressedOnClickRelease = 1 << 5, /* original C++ signature */
  1178. pressed_on_click_release = (
  1179. enum.auto()
  1180. ) # (= 1 << 5) # [Default] return True on click + release on same item <-- this is what the majority of Button are using
  1181. # ImGuiButtonFlags_PressedOnClickReleaseAnywhere = 1 << 6, /* original C++ signature */
  1182. pressed_on_click_release_anywhere = (
  1183. enum.auto()
  1184. ) # (= 1 << 6) # return True on click + release even if the release event is not done while hovering the item
  1185. # ImGuiButtonFlags_PressedOnRelease = 1 << 7, /* original C++ signature */
  1186. pressed_on_release = (
  1187. enum.auto()
  1188. ) # (= 1 << 7) # return True on release (default requires click+release). Prior to 2026/03/20 this implied ImGuiButtonFlags_NoHoldingActiveId but they are separate now.
  1189. # ImGuiButtonFlags_PressedOnDoubleClick = 1 << 8, /* original C++ signature */
  1190. pressed_on_double_click = enum.auto() # (= 1 << 8) # return True on double-click (default requires click+release)
  1191. # ImGuiButtonFlags_PressedOnDragDropHold = 1 << 9, /* original C++ signature */
  1192. pressed_on_drag_drop_hold = (
  1193. enum.auto()
  1194. ) # (= 1 << 9) # return True when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
  1195. # ImGuiButtonFlags_Repeat = 1 << 10, // hold to repeat -> use ImGuiItemFlags_ButtonRepeat instead.
  1196. # ImGuiButtonFlags_FlattenChildren = 1 << 11, /* original C++ signature */
  1197. flatten_children = enum.auto() # (= 1 << 11) # allow interactions even if a child window is overlapping
  1198. # ImGuiButtonFlags_DontClosePopups = 1 << 13, // disable automatically closing parent popup on press
  1199. # ImGuiButtonFlags_Disabled = 1 << 14, // disable interactions -> use BeginDisabled() or ImGuiItemFlags_Disabled
  1200. # ImGuiButtonFlags_AlignTextBaseLine = 1 << 15, /* original C++ signature */
  1201. align_text_base_line = (
  1202. enum.auto()
  1203. ) # (= 1 << 15) # vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
  1204. # ImGuiButtonFlags_NoKeyModsAllowed = 1 << 16, /* original C++ signature */
  1205. no_key_mods_allowed = enum.auto() # (= 1 << 16) # disable mouse interaction if a key modifier is held
  1206. # ImGuiButtonFlags_NoHoldingActiveId = 1 << 17, /* original C++ signature */
  1207. no_holding_active_id = (
  1208. enum.auto()
  1209. ) # (= 1 << 17) # don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
  1210. # ImGuiButtonFlags_NoNavFocus = 1 << 18, /* original C++ signature */
  1211. no_nav_focus = (
  1212. enum.auto()
  1213. ) # (= 1 << 18) # don't override navigation focus when activated (FIXME: this is essentially used every time an item uses ImGuiItemFlags_NoNav, but because legacy specs don't requires LastItemData to be set ButtonBehavior(), we can't poll g.LastItemData.ItemFlags)
  1214. # ImGuiButtonFlags_NoHoveredOnFocus = 1 << 19, /* original C++ signature */
  1215. no_hovered_on_focus = enum.auto() # (= 1 << 19) # don't report as hovered when nav focus is on this item
  1216. # ImGuiButtonFlags_NoSetKeyOwner = 1 << 20, /* original C++ signature */
  1217. no_set_key_owner = (
  1218. enum.auto()
  1219. ) # (= 1 << 20) # don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
  1220. # ImGuiButtonFlags_NoTestKeyOwner = 1 << 21, /* original C++ signature */
  1221. no_test_key_owner = (
  1222. enum.auto()
  1223. ) # (= 1 << 21) # don't test key/input owner when polling the key (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
  1224. # ImGuiButtonFlags_NoFocus = 1 << 22, /* original C++ signature */
  1225. no_focus = (
  1226. enum.auto()
  1227. ) # (= 1 << 22) # [EXPERIMENTAL: Not very well specced]. Don't focus parent window when clicking.
  1228. # ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold, /* original C++ signature */
  1229. pressed_on_mask_ = (
  1230. enum.auto()
  1231. ) # (= ButtonFlags_PressedOnClick | ButtonFlags_PressedOnClickRelease | ButtonFlags_PressedOnClickReleaseAnywhere | ButtonFlags_PressedOnRelease | ButtonFlags_PressedOnDoubleClick | ButtonFlags_PressedOnDragDropHold)
  1232. # ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease, /* original C++ signature */
  1233. pressed_on_default_ = enum.auto() # (= ButtonFlags_PressedOnClickRelease)
  1234. # ImGuiButtonFlags_NoKeyModifiers = ImGuiButtonFlags_NoKeyModsAllowed, // Renamed in 1.91.4
  1235. class ComboFlagsPrivate_(enum.IntFlag):
  1236. """Extend ImGuiComboFlags_"""
  1237. # ImGuiComboFlags_CustomPreview = 1 << 20, /* original C++ signature */
  1238. custom_preview = enum.auto() # (= 1 << 20) # enable BeginComboPreview()
  1239. class SliderFlagsPrivate_(enum.IntFlag):
  1240. """Extend ImGuiSliderFlags_"""
  1241. # ImGuiSliderFlags_Vertical = 1 << 20, /* original C++ signature */
  1242. vertical = enum.auto() # (= 1 << 20) # Should this slider be orientated vertically?
  1243. # ImGuiSliderFlags_ReadOnly = 1 << 21, /* original C++ signature */
  1244. read_only = (
  1245. enum.auto()
  1246. ) # (= 1 << 21) # Consider using g.NextItemData.ItemFlags |= ImGuiItemFlags_ReadOnly instead.
  1247. class SelectableFlagsPrivate_(enum.IntFlag):
  1248. """Extend ImGuiSelectableFlags_"""
  1249. # NB: need to be in sync with last value of ImGuiSelectableFlags_
  1250. # ImGuiSelectableFlags_NoHoldingActiveID = 1 << 20, /* original C++ signature */
  1251. no_holding_active_id = enum.auto() # (= 1 << 20)
  1252. # ImGuiSelectableFlags_SelectOnClick = 1 << 22, /* original C++ signature */
  1253. select_on_click = (
  1254. enum.auto()
  1255. ) # (= 1 << 22) # Override button behavior to react on Click (default is Click+Release)
  1256. # ImGuiSelectableFlags_SelectOnRelease = 1 << 23, /* original C++ signature */
  1257. select_on_release = (
  1258. enum.auto()
  1259. ) # (= 1 << 23) # Override button behavior to react on Release (default is Click+Release)
  1260. # ImGuiSelectableFlags_SpanAvailWidth = 1 << 24, /* original C++ signature */
  1261. span_avail_width = (
  1262. enum.auto()
  1263. ) # (= 1 << 24) # Span all avail width even if we declared less for layout purpose. FIXME: We may be able to remove this (added in 6251379, 2bcafc86 for menus)
  1264. # ImGuiSelectableFlags_SetNavIdOnHover = 1 << 25, /* original C++ signature */
  1265. set_nav_id_on_hover = enum.auto() # (= 1 << 25) # Set Nav/Focus ID on mouse hover (used by MenuItem)
  1266. # ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 26, /* original C++ signature */
  1267. no_pad_with_half_spacing = enum.auto() # (= 1 << 26) # Disable padding each side with ItemSpacing * 0.5
  1268. # ImGuiSelectableFlags_NoSetKeyOwner = 1 << 27, /* original C++ signature */
  1269. no_set_key_owner = (
  1270. enum.auto()
  1271. ) # (= 1 << 27) # Don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
  1272. class TreeNodeFlagsPrivate_(enum.IntFlag):
  1273. """Extend ImGuiTreeNodeFlags_"""
  1274. # ImGuiTreeNodeFlags_NoNavFocus = 1 << 27, /* original C++ signature */
  1275. no_nav_focus = enum.auto() # (= 1 << 27) # Don't claim nav focus when interacting with this item (#8551)
  1276. # ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 28, /* original C++ signature */
  1277. clip_label_for_trailing_button = enum.auto() # (= 1 << 28) # FIXME-WIP: Hard-coded for CollapsingHeader()
  1278. # ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 29, /* original C++ signature */
  1279. upside_down_arrow = (
  1280. enum.auto()
  1281. ) # (= 1 << 29) # FIXME-WIP: Turn Down arrow into an Up arrow, for reversed trees (#6517)
  1282. # ImGuiTreeNodeFlags_OpenOnMask_ = ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow, /* original C++ signature */
  1283. open_on_mask_ = enum.auto() # (= TreeNodeFlags_OpenOnDoubleClick | TreeNodeFlags_OpenOnArrow)
  1284. # ImGuiTreeNodeFlags_DrawLinesMask_ = ImGuiTreeNodeFlags_DrawLinesNone | ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes, /* original C++ signature */
  1285. # }
  1286. draw_lines_mask_ = (
  1287. enum.auto()
  1288. ) # (= TreeNodeFlags_DrawLinesNone | TreeNodeFlags_DrawLinesFull | TreeNodeFlags_DrawLinesToNodes)
  1289. class SeparatorFlags_(enum.IntFlag):
  1290. # ImGuiSeparatorFlags_None = 0, /* original C++ signature */
  1291. none = enum.auto() # (= 0)
  1292. # ImGuiSeparatorFlags_Horizontal = 1 << 0, /* original C++ signature */
  1293. horizontal = (
  1294. enum.auto()
  1295. ) # (= 1 << 0) # Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar
  1296. # ImGuiSeparatorFlags_Vertical = 1 << 1, /* original C++ signature */
  1297. vertical = enum.auto() # (= 1 << 1)
  1298. # ImGuiSeparatorFlags_SpanAllColumns = 1 << 2, /* original C++ signature */
  1299. span_all_columns = enum.auto() # (= 1 << 2) # Make separator cover all columns of a legacy Columns() set.
  1300. class FocusRequestFlags_(enum.IntFlag):
  1301. """Flags for FocusWindow(). This is not called ImGuiFocusFlags to avoid confusion with public-facing ImGuiFocusedFlags.
  1302. FIXME: Once we finishing replacing more uses of GetTopMostPopupModal()+IsWindowWithinBeginStackOf()
  1303. and FindBlockingModal() with this, we may want to change the flag to be opt-out instead of opt-in.
  1304. """
  1305. # ImGuiFocusRequestFlags_None = 0, /* original C++ signature */
  1306. none = enum.auto() # (= 0)
  1307. # ImGuiFocusRequestFlags_RestoreFocusedChild = 1 << 0, /* original C++ signature */
  1308. restore_focused_child = enum.auto() # (= 1 << 0) # Find last focused child (if any) and focus it instead.
  1309. # ImGuiFocusRequestFlags_UnlessBelowModal = 1 << 1, /* original C++ signature */
  1310. unless_below_modal = enum.auto() # (= 1 << 1) # Do not set focus if the window is below a modal.
  1311. class TextFlags_(enum.IntFlag):
  1312. # ImGuiTextFlags_None = 0, /* original C++ signature */
  1313. none = enum.auto() # (= 0)
  1314. # ImGuiTextFlags_NoWidthForLargeClippedText = 1 << 0, /* original C++ signature */
  1315. # }
  1316. no_width_for_large_clipped_text = enum.auto() # (= 1 << 0)
  1317. class TooltipFlags_(enum.IntFlag):
  1318. # ImGuiTooltipFlags_None = 0, /* original C++ signature */
  1319. none = enum.auto() # (= 0)
  1320. # ImGuiTooltipFlags_OverridePrevious = 1 << 1, /* original C++ signature */
  1321. override_previous = enum.auto() # (= 1 << 1) # Clear/ignore previously submitted tooltip (defaults to append)
  1322. class LayoutType_(enum.IntFlag):
  1323. """FIXME: this is in development, not exposed/functional as a generic feature yet.
  1324. Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2
  1325. """
  1326. # ImGuiLayoutType_Horizontal = 0, /* original C++ signature */
  1327. horizontal = enum.auto() # (= 0)
  1328. # ImGuiLayoutType_Vertical = 1 /* original C++ signature */
  1329. # }
  1330. vertical = enum.auto() # (= 1)
  1331. class LogFlags_(enum.IntFlag):
  1332. """Flags for LogBegin() text capturing function"""
  1333. # ImGuiLogFlags_None = 0, /* original C++ signature */
  1334. none = enum.auto() # (= 0)
  1335. # ImGuiLogFlags_OutputTTY = 1 << 0, /* original C++ signature */
  1336. output_tty = enum.auto() # (= 1 << 0)
  1337. # ImGuiLogFlags_OutputFile = 1 << 1, /* original C++ signature */
  1338. output_file = enum.auto() # (= 1 << 1)
  1339. # ImGuiLogFlags_OutputBuffer = 1 << 2, /* original C++ signature */
  1340. output_buffer = enum.auto() # (= 1 << 2)
  1341. # ImGuiLogFlags_OutputClipboard = 1 << 3, /* original C++ signature */
  1342. output_clipboard = enum.auto() # (= 1 << 3)
  1343. # ImGuiLogFlags_OutputMask_ = ImGuiLogFlags_OutputTTY | ImGuiLogFlags_OutputFile | ImGuiLogFlags_OutputBuffer | ImGuiLogFlags_OutputClipboard, /* original C++ signature */
  1344. # }
  1345. output_mask_ = (
  1346. enum.auto()
  1347. ) # (= LogFlags_OutputTTY | LogFlags_OutputFile | LogFlags_OutputBuffer | LogFlags_OutputClipboard)
  1348. class Axis(enum.IntFlag):
  1349. """X/Y enums are fixed to 0/1 so they may be used to index ImVec2"""
  1350. # ImGuiAxis_None = -1, /* original C++ signature */
  1351. none = enum.auto() # (= -1)
  1352. # ImGuiAxis_X = 0, /* original C++ signature */
  1353. x = enum.auto() # (= 0)
  1354. # ImGuiAxis_Y = 1 /* original C++ signature */
  1355. # }
  1356. y = enum.auto() # (= 1)
  1357. class PlotType(enum.IntFlag):
  1358. # ImGuiPlotType_Lines, /* original C++ signature */
  1359. lines = enum.auto() # (= 0)
  1360. # ImGuiPlotType_Histogram, /* original C++ signature */
  1361. # }
  1362. histogram = enum.auto() # (= 1)
  1363. class ComboPreviewData:
  1364. """Storage data for BeginComboPreview()/EndComboPreview()"""
  1365. # ImRect PreviewRect; /* original C++ signature */
  1366. preview_rect: ImRect
  1367. # ImVec2 BackupCursorPos; /* original C++ signature */
  1368. backup_cursor_pos: ImVec2
  1369. # ImVec2 BackupCursorMaxPos; /* original C++ signature */
  1370. backup_cursor_max_pos: ImVec2
  1371. # ImVec2 BackupCursorPosPrevLine; /* original C++ signature */
  1372. backup_cursor_pos_prev_line: ImVec2
  1373. # float BackupPrevLineTextBaseOffset; /* original C++ signature */
  1374. backup_prev_line_text_base_offset: float
  1375. # ImGuiLayoutType BackupLayout; /* original C++ signature */
  1376. backup_layout: LayoutType
  1377. # ImGuiComboPreviewData() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  1378. def __init__(self) -> None:
  1379. pass
  1380. class GroupData:
  1381. """Stacked storage data for BeginGroup()/EndGroup()"""
  1382. # ImGuiID WindowID; /* original C++ signature */
  1383. window_id: ID
  1384. # ImVec2 BackupCursorPos; /* original C++ signature */
  1385. backup_cursor_pos: ImVec2
  1386. # ImVec2 BackupCursorMaxPos; /* original C++ signature */
  1387. backup_cursor_max_pos: ImVec2
  1388. # ImVec2 BackupCursorPosPrevLine; /* original C++ signature */
  1389. backup_cursor_pos_prev_line: ImVec2
  1390. # ImVec1 BackupIndent; /* original C++ signature */
  1391. backup_indent: ImVec1
  1392. # ImVec1 BackupGroupOffset; /* original C++ signature */
  1393. backup_group_offset: ImVec1
  1394. # ImVec2 BackupCurrLineSize; /* original C++ signature */
  1395. backup_curr_line_size: ImVec2
  1396. # float BackupCurrLineTextBaseOffset; /* original C++ signature */
  1397. backup_curr_line_text_base_offset: float
  1398. # ImGuiID BackupActiveIdIsAlive; /* original C++ signature */
  1399. backup_active_id_is_alive: ID
  1400. # bool BackupActiveIdHasBeenEditedThisFrame; /* original C++ signature */
  1401. backup_active_id_has_been_edited_this_frame: bool
  1402. # bool BackupDeactivatedIdIsAlive; /* original C++ signature */
  1403. backup_deactivated_id_is_alive: bool
  1404. # bool BackupHoveredIdIsAlive; /* original C++ signature */
  1405. backup_hovered_id_is_alive: bool
  1406. # bool BackupIsSameLine; /* original C++ signature */
  1407. backup_is_same_line: bool
  1408. # bool EmitItem; /* original C++ signature */
  1409. emit_item: bool
  1410. # ImGuiGroupData(ImGuiID WindowID = ImGuiID(), ImVec2 BackupCursorPos = ImVec2(), ImVec2 BackupCursorMaxPos = ImVec2(), ImVec2 BackupCursorPosPrevLine = ImVec2(), ImVec1 BackupIndent = ImVec1(), ImVec1 BackupGroupOffset = ImVec1(), ImVec2 BackupCurrLineSize = ImVec2(), float BackupCurrLineTextBaseOffset = float(), ImGuiID BackupActiveIdIsAlive = ImGuiID(), bool BackupActiveIdHasBeenEditedThisFrame = bool(), bool BackupDeactivatedIdIsAlive = bool(), bool BackupHoveredIdIsAlive = bool(), bool BackupIsSameLine = bool(), bool EmitItem = bool()); /* original C++ signature */
  1411. def __init__(
  1412. self,
  1413. window_id: ID = ID(),
  1414. backup_cursor_pos: Optional[ImVec2Like] = None,
  1415. backup_cursor_max_pos: Optional[ImVec2Like] = None,
  1416. backup_cursor_pos_prev_line: Optional[ImVec2Like] = None,
  1417. backup_indent: Optional[ImVec1] = None,
  1418. backup_group_offset: Optional[ImVec1] = None,
  1419. backup_curr_line_size: Optional[ImVec2Like] = None,
  1420. backup_curr_line_text_base_offset: float = float(),
  1421. backup_active_id_is_alive: ID = ID(),
  1422. backup_active_id_has_been_edited_this_frame: bool = bool(),
  1423. backup_deactivated_id_is_alive: bool = bool(),
  1424. backup_hovered_id_is_alive: bool = bool(),
  1425. backup_is_same_line: bool = bool(),
  1426. emit_item: bool = bool(),
  1427. ) -> None:
  1428. """Auto-generated default constructor with named params
  1429. Python bindings defaults:
  1430. If any of the params below is None, then its default value below will be used:
  1431. * BackupCursorPos: ImVec2()
  1432. * BackupCursorMaxPos: ImVec2()
  1433. * BackupCursorPosPrevLine: ImVec2()
  1434. * BackupIndent: ImVec1()
  1435. * BackupGroupOffset: ImVec1()
  1436. * BackupCurrLineSize: ImVec2()
  1437. """
  1438. pass
  1439. class MenuColumns:
  1440. """Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper."""
  1441. # ImU32 TotalWidth; /* original C++ signature */
  1442. total_width: ImU32
  1443. # ImU32 NextTotalWidth; /* original C++ signature */
  1444. next_total_width: ImU32
  1445. # ImU16 Spacing; /* original C++ signature */
  1446. spacing: ImU16
  1447. # ImU16 OffsetIcon; /* original C++ signature */
  1448. offset_icon: ImU16 # Always zero for now
  1449. # ImU16 OffsetLabel; /* original C++ signature */
  1450. offset_label: ImU16 # Offsets are locked in Update()
  1451. # ImU16 OffsetShortcut; /* original C++ signature */
  1452. offset_shortcut: ImU16
  1453. # ImU16 OffsetMark; /* original C++ signature */
  1454. offset_mark: ImU16
  1455. # ImU16 Widths[4]; /* original C++ signature */
  1456. widths: (
  1457. np.ndarray
  1458. ) # ndarray[type=ImU16, size=4] # Width of: Icon, Label, Shortcut, Mark (accumulators for current frame)
  1459. # ImGuiMenuColumns() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  1460. def __init__(self) -> None:
  1461. pass
  1462. # void Update(float spacing, bool window_reappearing); /* original C++ signature */
  1463. def update(self, spacing: float, window_reappearing: bool) -> None:
  1464. """(private API)"""
  1465. pass
  1466. # float DeclColumns(float w_icon, float w_label, float w_shortcut, float w_mark); /* original C++ signature */
  1467. def decl_columns(self, w_icon: float, w_label: float, w_shortcut: float, w_mark: float) -> float:
  1468. """(private API)"""
  1469. pass
  1470. # void CalcNextTotalWidth(bool update_offsets); /* original C++ signature */
  1471. def calc_next_total_width(self, update_offsets: bool) -> None:
  1472. """(private API)"""
  1473. pass
  1474. class InputTextDeactivatedState:
  1475. """Internal temporary state for deactivating InputText() instances.
  1476. Store as part of ImGuiDeactivatedItemData?
  1477. """
  1478. # ImGuiID ID; /* original C++ signature */
  1479. id_: ID # widget id owning the text state (which just got deactivated)
  1480. # ImVector<char> TextA; /* original C++ signature */
  1481. text_a: ImVector_char # text buffer
  1482. # ImGuiInputTextDeactivatedState() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  1483. def __init__(self) -> None:
  1484. pass
  1485. # void ClearFreeMemory() { ID = 0; TextA.clear(); } /* original C++ signature */
  1486. def clear_free_memory(self) -> None:
  1487. """(private API)"""
  1488. pass
  1489. # Forward declare imstb_textedit.h structure + make its main configuration define accessible
  1490. class InputTextState:
  1491. """Internal state of the currently focused/edited text input box
  1492. For a given item ID, access with ImGui::GetInputTextState()
  1493. """
  1494. # ImGuiContext* Ctx; /* original C++ signature */
  1495. ctx: Context # parent UI context (needs to be set explicitly by parent).
  1496. # ImGuiInputTextFlags Flags; /* original C++ signature */
  1497. flags: (
  1498. InputTextFlags # copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.
  1499. )
  1500. # ImGuiID ID; /* original C++ signature */
  1501. id_: ID # widget id owning the text state
  1502. # int TextLen; /* original C++ signature */
  1503. text_len: int # UTF-8 length of the string in TextA (in bytes)
  1504. # const char* TextSrc; /* original C++ signature */
  1505. text_src: str # == TextA.Data unless read-only, in which case == buf passed to InputText(). For _ReadOnly fields, pointer will be null outside the InputText() call. # (const)
  1506. # ImVector<char> TextA; /* original C++ signature */
  1507. text_a: ImVector_char # main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).
  1508. # ImVector<char> TextToRevertTo; /* original C++ signature */
  1509. text_to_revert_to: ImVector_char # value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)
  1510. # ImVector<char> CallbackTextBackup; /* original C++ signature */
  1511. callback_text_backup: ImVector_char # temporary storage for callback to support automatic reconcile of undo-stack
  1512. # int BufCapacity; /* original C++ signature */
  1513. buf_capacity: int # end-user buffer capacity (include zero terminator)
  1514. # ImVec2 Scroll; /* original C++ signature */
  1515. scroll: (
  1516. ImVec2 # horizontal offset (managed manually) + vertical scrolling (pulled from child window's own Scroll.y)
  1517. )
  1518. # int LineCount; /* original C++ signature */
  1519. line_count: int # last line count (solely for debugging)
  1520. # float WrapWidth; /* original C++ signature */
  1521. wrap_width: float # word-wrapping width
  1522. # float CursorAnim; /* original C++ signature */
  1523. cursor_anim: float # timer for cursor blink, reset on every user action so the cursor reappears immediately
  1524. # bool CursorFollow; /* original C++ signature */
  1525. cursor_follow: bool # set when we want scrolling to follow the current cursor position (not always!)
  1526. # bool CursorCenterY; /* original C++ signature */
  1527. cursor_center_y: bool # set when we want scrolling to be centered over the cursor position (while resizing a word-wrapping field)
  1528. # bool SelectedAllMouseLock; /* original C++ signature */
  1529. selected_all_mouse_lock: (
  1530. bool # after a double-click to select all, we ignore further mouse drags to update selection
  1531. )
  1532. # bool EditedBefore; /* original C++ signature */
  1533. edited_before: bool # edited since activated
  1534. # bool EditedThisFrame; /* original C++ signature */
  1535. edited_this_frame: bool # edited this frame
  1536. # bool WantReloadUserBuf; /* original C++ signature */
  1537. want_reload_user_buf: (
  1538. bool # force a reload of user buf so it may be modified externally. may be automatic in future version.
  1539. )
  1540. # ImS8 LastMoveDirectionLR; /* original C++ signature */
  1541. last_move_direction_lr: ImS8 # ImGuiDir_Left or ImGuiDir_Right. track last movement direction so when cursor cross over a word-wrapping boundaries we can display it on either line depending on last move.s
  1542. # int ReloadSelectionStart; /* original C++ signature */
  1543. reload_selection_start: int
  1544. # int ReloadSelectionEnd; /* original C++ signature */
  1545. reload_selection_end: int
  1546. # ImGuiInputTextState(); /* original C++ signature */
  1547. def __init__(self) -> None:
  1548. pass
  1549. # void ClearText() { TextLen = 0; TextA[0] = 0; CursorClamp(); } /* original C++ signature */
  1550. def clear_text(self) -> None:
  1551. """(private API)"""
  1552. pass
  1553. # void ClearFreeMemory() { TextA.clear(); TextToRevertTo.clear(); } /* original C++ signature */
  1554. def clear_free_memory(self) -> None:
  1555. """(private API)"""
  1556. pass
  1557. # void OnKeyPressed(int key); /* original C++ signature */
  1558. def on_key_pressed(self, key: int) -> None:
  1559. """(private API)
  1560. Cannot be inline because we call in code in stb_textedit.h implementation
  1561. """
  1562. pass
  1563. # void OnCharPressed(unsigned int c); /* original C++ signature */
  1564. def on_char_pressed(self, c: int) -> None:
  1565. """(private API)"""
  1566. pass
  1567. # float GetPreferredOffsetX() const; /* original C++ signature */
  1568. def get_preferred_offset_x(self) -> float:
  1569. """(private API)"""
  1570. pass
  1571. # const char* GetText() { return TextA.Data ? TextA.Data : ""; } /* original C++ signature */
  1572. def get_text(self) -> str:
  1573. """(private API)"""
  1574. pass
  1575. # Cursor & Selection
  1576. # void CursorAnimReset(); /* original C++ signature */
  1577. def cursor_anim_reset(self) -> None:
  1578. """(private API)"""
  1579. pass
  1580. # void CursorClamp(); /* original C++ signature */
  1581. def cursor_clamp(self) -> None:
  1582. """(private API)"""
  1583. pass
  1584. # bool HasSelection() const; /* original C++ signature */
  1585. def has_selection(self) -> bool:
  1586. """(private API)"""
  1587. pass
  1588. # void ClearSelection(); /* original C++ signature */
  1589. def clear_selection(self) -> None:
  1590. """(private API)"""
  1591. pass
  1592. # int GetCursorPos() const; /* original C++ signature */
  1593. def get_cursor_pos(self) -> int:
  1594. """(private API)"""
  1595. pass
  1596. # int GetSelectionStart() const; /* original C++ signature */
  1597. def get_selection_start(self) -> int:
  1598. """(private API)"""
  1599. pass
  1600. # int GetSelectionEnd() const; /* original C++ signature */
  1601. def get_selection_end(self) -> int:
  1602. """(private API)"""
  1603. pass
  1604. # void SetSelection(int start, int end); /* original C++ signature */
  1605. def set_selection(self, start: int, end: int) -> None:
  1606. """(private API)"""
  1607. pass
  1608. # void SelectAll(); /* original C++ signature */
  1609. def select_all(self) -> None:
  1610. """(private API)"""
  1611. pass
  1612. # Reload user buf (WIP #2890)
  1613. # If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this)
  1614. # strcpy(my_buf, "hello");
  1615. # if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item
  1616. # state->ReloadUserBufAndSelectAll();
  1617. # void ReloadUserBufAndSelectAll(); /* original C++ signature */
  1618. def reload_user_buf_and_select_all(self) -> None:
  1619. """(private API)"""
  1620. pass
  1621. # void ReloadUserBufAndKeepSelection(); /* original C++ signature */
  1622. def reload_user_buf_and_keep_selection(self) -> None:
  1623. """(private API)"""
  1624. pass
  1625. # void ReloadUserBufAndMoveToEnd(); /* original C++ signature */
  1626. def reload_user_buf_and_move_to_end(self) -> None:
  1627. """(private API)"""
  1628. pass
  1629. class WindowRefreshFlags_(enum.IntFlag):
  1630. # ImGuiWindowRefreshFlags_None = 0, /* original C++ signature */
  1631. none = enum.auto() # (= 0)
  1632. # ImGuiWindowRefreshFlags_TryToAvoidRefresh = 1 << 0, /* original C++ signature */
  1633. try_to_avoid_refresh = (
  1634. enum.auto()
  1635. ) # (= 1 << 0) # [EXPERIMENTAL] Try to keep existing contents, USER MUST NOT HONOR BEGIN() RETURNING FALSE AND NOT APPEND.
  1636. # ImGuiWindowRefreshFlags_RefreshOnHover = 1 << 1, /* original C++ signature */
  1637. refresh_on_hover = enum.auto() # (= 1 << 1) # [EXPERIMENTAL] Always refresh on hover
  1638. # ImGuiWindowRefreshFlags_RefreshOnFocus = 1 << 2, /* original C++ signature */
  1639. refresh_on_focus = enum.auto() # (= 1 << 2) # [EXPERIMENTAL] Always refresh on focus
  1640. # Refresh policy/frequency, Load Balancing etc.
  1641. class WindowBgClickFlags_(enum.IntFlag):
  1642. # ImGuiWindowBgClickFlags_None = 0, /* original C++ signature */
  1643. none = enum.auto() # (= 0)
  1644. # ImGuiWindowBgClickFlags_Move = 1 << 0, /* original C++ signature */
  1645. move = (
  1646. enum.auto()
  1647. ) # (= 1 << 0) # Click on bg/None + drag to move window. Cleared by default when using io.ConfigWindowsMoveFromTitleBarOnly.
  1648. class NextWindowDataFlags_(enum.IntFlag):
  1649. # ImGuiNextWindowDataFlags_None = 0, /* original C++ signature */
  1650. none = enum.auto() # (= 0)
  1651. # ImGuiNextWindowDataFlags_HasPos = 1 << 0, /* original C++ signature */
  1652. has_pos = enum.auto() # (= 1 << 0)
  1653. # ImGuiNextWindowDataFlags_HasSize = 1 << 1, /* original C++ signature */
  1654. has_size = enum.auto() # (= 1 << 1)
  1655. # ImGuiNextWindowDataFlags_HasContentSize = 1 << 2, /* original C++ signature */
  1656. has_content_size = enum.auto() # (= 1 << 2)
  1657. # ImGuiNextWindowDataFlags_HasCollapsed = 1 << 3, /* original C++ signature */
  1658. has_collapsed = enum.auto() # (= 1 << 3)
  1659. # ImGuiNextWindowDataFlags_HasSizeConstraint = 1 << 4, /* original C++ signature */
  1660. has_size_constraint = enum.auto() # (= 1 << 4)
  1661. # ImGuiNextWindowDataFlags_HasFocus = 1 << 5, /* original C++ signature */
  1662. has_focus = enum.auto() # (= 1 << 5)
  1663. # ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 6, /* original C++ signature */
  1664. has_bg_alpha = enum.auto() # (= 1 << 6)
  1665. # ImGuiNextWindowDataFlags_HasScroll = 1 << 7, /* original C++ signature */
  1666. has_scroll = enum.auto() # (= 1 << 7)
  1667. # ImGuiNextWindowDataFlags_HasWindowFlags = 1 << 8, /* original C++ signature */
  1668. has_window_flags = enum.auto() # (= 1 << 8)
  1669. # ImGuiNextWindowDataFlags_HasChildFlags = 1 << 9, /* original C++ signature */
  1670. has_child_flags = enum.auto() # (= 1 << 9)
  1671. # ImGuiNextWindowDataFlags_HasRefreshPolicy = 1 << 10, /* original C++ signature */
  1672. has_refresh_policy = enum.auto() # (= 1 << 10)
  1673. # ImGuiNextWindowDataFlags_HasViewport = 1 << 11, /* original C++ signature */
  1674. has_viewport = enum.auto() # (= 1 << 11)
  1675. # ImGuiNextWindowDataFlags_HasDock = 1 << 12, /* original C++ signature */
  1676. has_dock = enum.auto() # (= 1 << 12)
  1677. # ImGuiNextWindowDataFlags_HasWindowClass = 1 << 13, /* original C++ signature */
  1678. # }
  1679. has_window_class = enum.auto() # (= 1 << 13)
  1680. class NextWindowData:
  1681. """Storage for SetNexWindow** functions"""
  1682. # ImGuiNextWindowDataFlags HasFlags; /* original C++ signature */
  1683. has_flags: NextWindowDataFlags
  1684. # Members below are NOT cleared. Always rely on HasFlags.
  1685. # ImGuiCond PosCond; /* original C++ signature */
  1686. pos_cond: Cond
  1687. # ImGuiCond SizeCond; /* original C++ signature */
  1688. size_cond: Cond
  1689. # ImGuiCond CollapsedCond; /* original C++ signature */
  1690. collapsed_cond: Cond
  1691. # ImGuiCond DockCond; /* original C++ signature */
  1692. dock_cond: Cond
  1693. # ImVec2 PosVal; /* original C++ signature */
  1694. pos_val: ImVec2
  1695. # ImVec2 PosPivotVal; /* original C++ signature */
  1696. pos_pivot_val: ImVec2
  1697. # ImVec2 SizeVal; /* original C++ signature */
  1698. size_val: ImVec2
  1699. # ImVec2 ContentSizeVal; /* original C++ signature */
  1700. content_size_val: ImVec2
  1701. # ImVec2 ScrollVal; /* original C++ signature */
  1702. scroll_val: ImVec2
  1703. # ImGuiWindowFlags WindowFlags; /* original C++ signature */
  1704. window_flags: WindowFlags # Only honored by BeginTable()
  1705. # ImGuiChildFlags ChildFlags; /* original C++ signature */
  1706. child_flags: ChildFlags
  1707. # bool PosUndock; /* original C++ signature */
  1708. pos_undock: bool
  1709. # bool CollapsedVal; /* original C++ signature */
  1710. collapsed_val: bool
  1711. # ImRect SizeConstraintRect; /* original C++ signature */
  1712. size_constraint_rect: ImRect
  1713. # ImGuiSizeCallback SizeCallback; /* original C++ signature */
  1714. size_callback: SizeCallback
  1715. # void* SizeCallbackUserData; /* original C++ signature */
  1716. size_callback_user_data: Any
  1717. # float BgAlphaVal; /* original C++ signature */
  1718. bg_alpha_val: float # Override background alpha
  1719. # ImGuiID ViewportId; /* original C++ signature */
  1720. viewport_id: ID
  1721. # ImGuiID DockId; /* original C++ signature */
  1722. dock_id: ID
  1723. # ImGuiWindowClass WindowClass; /* original C++ signature */
  1724. window_class: WindowClass
  1725. # ImVec2 MenuBarOffsetMinVal; /* original C++ signature */
  1726. menu_bar_offset_min_val: ImVec2 # (Always on) This is not exposed publicly, so we don't clear it and it doesn't have a corresponding flag (could we? for consistency?)
  1727. # ImGuiWindowRefreshFlags RefreshFlagsVal; /* original C++ signature */
  1728. refresh_flags_val: WindowRefreshFlags
  1729. # ImGuiNextWindowData() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  1730. def __init__(self) -> None:
  1731. pass
  1732. # inline void ClearFlags() { HasFlags = ImGuiNextWindowDataFlags_None; } /* original C++ signature */
  1733. def clear_flags(self) -> None:
  1734. """(private API)"""
  1735. pass
  1736. class NextItemDataFlags_(enum.IntFlag):
  1737. # ImGuiNextItemDataFlags_None = 0, /* original C++ signature */
  1738. none = enum.auto() # (= 0)
  1739. # ImGuiNextItemDataFlags_HasWidth = 1 << 0, /* original C++ signature */
  1740. has_width = enum.auto() # (= 1 << 0)
  1741. # ImGuiNextItemDataFlags_HasOpen = 1 << 1, /* original C++ signature */
  1742. has_open = enum.auto() # (= 1 << 1)
  1743. # ImGuiNextItemDataFlags_HasShortcut = 1 << 2, /* original C++ signature */
  1744. has_shortcut = enum.auto() # (= 1 << 2)
  1745. # ImGuiNextItemDataFlags_HasRefVal = 1 << 3, /* original C++ signature */
  1746. has_ref_val = enum.auto() # (= 1 << 3)
  1747. # ImGuiNextItemDataFlags_HasStorageID = 1 << 4, /* original C++ signature */
  1748. has_storage_id = enum.auto() # (= 1 << 4)
  1749. # ImGuiNextItemDataFlags_HasColorMarker = 1 << 5, /* original C++ signature */
  1750. # }
  1751. has_color_marker = enum.auto() # (= 1 << 5)
  1752. class NextItemData:
  1753. # ImGuiNextItemDataFlags HasFlags; /* original C++ signature */
  1754. has_flags: NextItemDataFlags # Called HasFlags instead of Flags to avoid mistaking this
  1755. # ImGuiItemFlags ItemFlags; /* original C++ signature */
  1756. item_flags: (
  1757. ItemFlags # Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData.
  1758. )
  1759. # Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). Always rely on HasFlags.
  1760. # ImGuiID FocusScopeId; /* original C++ signature */
  1761. focus_scope_id: ID # Set by SetNextItemSelectionUserData()
  1762. # ImGuiSelectionUserData SelectionUserData; /* original C++ signature */
  1763. selection_user_data: SelectionUserData # Set by SetNextItemSelectionUserData() (note that None/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
  1764. # float Width; /* original C++ signature */
  1765. width: float # Set by SetNextItemWidth()
  1766. # ImGuiKeyChord Shortcut; /* original C++ signature */
  1767. shortcut: KeyChord # Set by SetNextItemShortcut()
  1768. # ImGuiInputFlags ShortcutFlags; /* original C++ signature */
  1769. shortcut_flags: InputFlags # Set by SetNextItemShortcut()
  1770. # bool OpenVal; /* original C++ signature */
  1771. open_val: bool # Set by SetNextItemOpen()
  1772. # ImU8 OpenCond; /* original C++ signature */
  1773. open_cond: ImU8 # Set by SetNextItemOpen()
  1774. # ImGuiDataTypeStorage RefVal; /* original C++ signature */
  1775. ref_val: DataTypeStorage # Not exposed yet, for ImGuiInputTextFlags_ParseEmptyAsRefVal
  1776. # ImGuiID StorageId; /* original C++ signature */
  1777. storage_id: ID # Set by SetNextItemStorageID()
  1778. # ImU32 ColorMarker; /* original C++ signature */
  1779. color_marker: ImU32 # Set by SetNextItemColorMarker(). Not exposed yet, supported by DragScalar,SliderScalar and for ImGuiSliderFlags_ColorMarkers.
  1780. # ImGuiNextItemData() { memset((void*)this, 0, sizeof(*this)); SelectionUserData = -1; } /* original C++ signature */
  1781. def __init__(self) -> None:
  1782. pass
  1783. # inline void ClearFlags() { HasFlags = ImGuiNextItemDataFlags_None; ItemFlags = ImGuiItemFlags_None; } /* original C++ signature */
  1784. def clear_flags(self) -> None:
  1785. """(private API)
  1786. Also cleared manually by ItemAdd()!
  1787. """
  1788. pass
  1789. class LastItemData:
  1790. """Status storage for the last submitted item"""
  1791. # ImGuiID ID; /* original C++ signature */
  1792. id_: ID
  1793. # ImGuiItemFlags ItemFlags; /* original C++ signature */
  1794. item_flags: ItemFlags # See ImGuiItemFlags_ (called 'InFlags' before v1.91.4).
  1795. # ImGuiItemStatusFlags StatusFlags; /* original C++ signature */
  1796. status_flags: ItemStatusFlags # See ImGuiItemStatusFlags_
  1797. # ImRect Rect; /* original C++ signature */
  1798. rect: ImRect # Full rectangle
  1799. # ImRect NavRect; /* original C++ signature */
  1800. nav_rect: ImRect # Navigation scoring rectangle (not displayed)
  1801. # Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags are set.
  1802. # ImRect DisplayRect; /* original C++ signature */
  1803. display_rect: ImRect # Display rectangle. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasDisplayRect) is set.
  1804. # ImRect ClipRect; /* original C++ signature */
  1805. clip_rect: ImRect # Clip rectangle at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasClipRect) is set..
  1806. # ImGuiKeyChord Shortcut; /* original C++ signature */
  1807. shortcut: KeyChord # Shortcut at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasShortcut) is set..
  1808. # ImGuiLastItemData() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  1809. def __init__(self) -> None:
  1810. pass
  1811. class TreeNodeStackData:
  1812. """Store data emitted by TreeNode() for usage by TreePop()
  1813. - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data
  1814. which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult().
  1815. Only stored when the node is a potential candidate for landing on a Left arrow jump.
  1816. """
  1817. # ImGuiID ID; /* original C++ signature */
  1818. id_: ID
  1819. # ImGuiTreeNodeFlags TreeFlags; /* original C++ signature */
  1820. tree_flags: TreeNodeFlags
  1821. # ImGuiItemFlags ItemFlags; /* original C++ signature */
  1822. item_flags: ItemFlags # Used for nav landing
  1823. # ImRect NavRect; /* original C++ signature */
  1824. nav_rect: ImRect # Used for nav landing
  1825. # float DrawLinesX1; /* original C++ signature */
  1826. draw_lines_x1: float
  1827. # float DrawLinesToNodesY2; /* original C++ signature */
  1828. draw_lines_to_nodes_y2: float
  1829. # ImGuiTableColumnIdx DrawLinesTableColumn; /* original C++ signature */
  1830. draw_lines_table_column: TableColumnIdx
  1831. # ImGuiTreeNodeStackData(ImGuiID ID = ImGuiID(), ImGuiTreeNodeFlags TreeFlags = ImGuiTreeNodeFlags(), ImGuiItemFlags ItemFlags = ImGuiItemFlags(), ImRect NavRect = ImRect(), float DrawLinesX1 = float(), float DrawLinesToNodesY2 = float(), ImGuiTableColumnIdx DrawLinesTableColumn = ImGuiTableColumnIdx()); /* original C++ signature */
  1832. def __init__(
  1833. self,
  1834. id_: ID = ID(),
  1835. tree_flags: TreeNodeFlags = TreeNodeFlags(),
  1836. item_flags: ItemFlags = ItemFlags(),
  1837. nav_rect: Optional[ImRect] = None,
  1838. draw_lines_x1: float = float(),
  1839. draw_lines_to_nodes_y2: float = float(),
  1840. draw_lines_table_column: Optional[TableColumnIdx] = None,
  1841. ) -> None:
  1842. """Auto-generated default constructor with named params
  1843. Python bindings defaults:
  1844. If any of the params below is None, then its default value below will be used:
  1845. * NavRect: ImRect()
  1846. * DrawLinesTableColumn: TableColumnIdx()
  1847. """
  1848. pass
  1849. class ErrorRecoveryState:
  1850. """sizeof() = 20"""
  1851. # short SizeOfWindowStack; /* original C++ signature */
  1852. size_of_window_stack: int
  1853. # short SizeOfIDStack; /* original C++ signature */
  1854. size_of_id_stack: int
  1855. # short SizeOfTreeStack; /* original C++ signature */
  1856. size_of_tree_stack: int
  1857. # short SizeOfColorStack; /* original C++ signature */
  1858. size_of_color_stack: int
  1859. # short SizeOfStyleVarStack; /* original C++ signature */
  1860. size_of_style_var_stack: int
  1861. # short SizeOfFontStack; /* original C++ signature */
  1862. size_of_font_stack: int
  1863. # short SizeOfFocusScopeStack; /* original C++ signature */
  1864. size_of_focus_scope_stack: int
  1865. # short SizeOfGroupStack; /* original C++ signature */
  1866. size_of_group_stack: int
  1867. # short SizeOfItemFlagsStack; /* original C++ signature */
  1868. size_of_item_flags_stack: int
  1869. # short SizeOfBeginPopupStack; /* original C++ signature */
  1870. size_of_begin_popup_stack: int
  1871. # short SizeOfDisabledStack; /* original C++ signature */
  1872. size_of_disabled_stack: int
  1873. # ImGuiErrorRecoveryState() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  1874. def __init__(self) -> None:
  1875. pass
  1876. class WindowStackData:
  1877. """Data saved for each window pushed into the stack"""
  1878. # ImGuiWindow* Window; /* original C++ signature */
  1879. window: Window
  1880. # ImGuiLastItemData ParentLastItemDataBackup; /* original C++ signature */
  1881. parent_last_item_data_backup: LastItemData
  1882. # ImGuiErrorRecoveryState StackSizesInBegin; /* original C++ signature */
  1883. stack_sizes_in_begin: ErrorRecoveryState # Store size of various stacks for asserting
  1884. # bool DisabledOverrideReenable; /* original C++ signature */
  1885. disabled_override_reenable: bool # Non-child window override disabled flag
  1886. # float DisabledOverrideReenableAlphaBackup; /* original C++ signature */
  1887. disabled_override_reenable_alpha_backup: float
  1888. # ImGuiWindowStackData(ImGuiLastItemData ParentLastItemDataBackup = ImGuiLastItemData(), ImGuiErrorRecoveryState StackSizesInBegin = ImGuiErrorRecoveryState(), bool DisabledOverrideReenable = bool(), float DisabledOverrideReenableAlphaBackup = float()); /* original C++ signature */
  1889. def __init__(
  1890. self,
  1891. parent_last_item_data_backup: Optional[LastItemData] = None,
  1892. stack_sizes_in_begin: Optional[ErrorRecoveryState] = None,
  1893. disabled_override_reenable: bool = bool(),
  1894. disabled_override_reenable_alpha_backup: float = float(),
  1895. ) -> None:
  1896. """Auto-generated default constructor with named params
  1897. Python bindings defaults:
  1898. If any of the params below is None, then its default value below will be used:
  1899. * ParentLastItemDataBackup: LastItemData()
  1900. * StackSizesInBegin: ErrorRecoveryState()
  1901. """
  1902. pass
  1903. class ShrinkWidthItem:
  1904. # int Index; /* original C++ signature */
  1905. index: int
  1906. # float Width; /* original C++ signature */
  1907. width: float
  1908. # float InitialWidth; /* original C++ signature */
  1909. initial_width: float
  1910. # ImGuiShrinkWidthItem(int Index = int(), float Width = float(), float InitialWidth = float()); /* original C++ signature */
  1911. def __init__(self, index: int = int(), width: float = float(), initial_width: float = float()) -> None:
  1912. """Auto-generated default constructor with named params"""
  1913. pass
  1914. class PtrOrIndex:
  1915. # void* Ptr; /* original C++ signature */
  1916. ptr: Any # Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a pool.
  1917. # int Index; /* original C++ signature */
  1918. index: int # Usually index in a main pool.
  1919. # ImGuiPtrOrIndex(void* ptr) { Ptr = ptr; Index = -1; } /* original C++ signature */
  1920. @overload
  1921. def __init__(self, ptr: Any) -> None:
  1922. pass
  1923. # ImGuiPtrOrIndex(int index) { Ptr = NULL; Index = index; } /* original C++ signature */
  1924. @overload
  1925. def __init__(self, index: int) -> None:
  1926. pass
  1927. class DeactivatedItemData:
  1928. """Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions
  1929. Also see ImGuiInputTextDeactivatedState which is an extension for this for InputText()
  1930. """
  1931. # ImGuiID ID; /* original C++ signature */
  1932. id_: ID
  1933. # int ElapseFrame; /* original C++ signature */
  1934. elapse_frame: int
  1935. # bool HasBeenEditedBefore; /* original C++ signature */
  1936. has_been_edited_before: bool
  1937. # bool IsAlive; /* original C++ signature */
  1938. is_alive: bool
  1939. # ImGuiDeactivatedItemData(ImGuiID ID = ImGuiID(), int ElapseFrame = int(), bool HasBeenEditedBefore = bool(), bool IsAlive = bool()); /* original C++ signature */
  1940. def __init__(
  1941. self, id_: ID = ID(), elapse_frame: int = int(), has_been_edited_before: bool = bool(), is_alive: bool = bool()
  1942. ) -> None:
  1943. """Auto-generated default constructor with named params"""
  1944. pass
  1945. # -----------------------------------------------------------------------------
  1946. # [SECTION] Popup support
  1947. # -----------------------------------------------------------------------------
  1948. class PopupPositionPolicy(enum.IntFlag):
  1949. # ImGuiPopupPositionPolicy_Default, /* original C++ signature */
  1950. default = enum.auto() # (= 0)
  1951. # ImGuiPopupPositionPolicy_ComboBox, /* original C++ signature */
  1952. combo_box = enum.auto() # (= 1)
  1953. # ImGuiPopupPositionPolicy_Tooltip, /* original C++ signature */
  1954. # }
  1955. tooltip = enum.auto() # (= 2)
  1956. class PopupData:
  1957. """Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack)"""
  1958. # ImGuiID PopupId; /* original C++ signature */
  1959. popup_id: ID # Set on OpenPopup()
  1960. # ImGuiWindow* Window; /* original C++ signature */
  1961. window: Window # Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup()
  1962. # ImGuiWindow* RestoreNavWindow; /* original C++ signature */
  1963. restore_nav_window: Window # Set on OpenPopup(), a NavWindow that will be restored on popup close
  1964. # int ParentNavLayer; /* original C++ signature */
  1965. parent_nav_layer: int # Resolved on BeginPopup(). Actually a ImGuiNavLayer type (declared down below), initialized to -1 which is not part of an enum, but serves well-enough as "not any of layers" value
  1966. # int OpenFrameCount; /* original C++ signature */
  1967. open_frame_count: int # Set on OpenPopup()
  1968. # ImGuiID OpenParentId; /* original C++ signature */
  1969. open_parent_id: ID # Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu bar vs loose menu items)
  1970. # ImVec2 OpenPopupPos; /* original C++ signature */
  1971. open_popup_pos: ImVec2 # Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse)
  1972. # ImVec2 OpenMousePos; /* original C++ signature */
  1973. open_mouse_pos: ImVec2 # Set on OpenPopup(), copy of mouse position at the time of opening popup
  1974. # ImGuiPopupData() { memset((void*)this, 0, sizeof(*this)); ParentNavLayer = OpenFrameCount = -1; } /* original C++ signature */
  1975. def __init__(self) -> None:
  1976. pass
  1977. # -----------------------------------------------------------------------------
  1978. # [SECTION] Inputs support
  1979. # -----------------------------------------------------------------------------
  1980. # [Internal] Key ranges
  1981. # [Internal] Named shortcuts for Navigation
  1982. class InputEventType(enum.IntFlag):
  1983. # ImGuiInputEventType_None = 0, /* original C++ signature */
  1984. none = enum.auto() # (= 0)
  1985. # ImGuiInputEventType_MousePos, /* original C++ signature */
  1986. mouse_pos = enum.auto() # (= 1)
  1987. # ImGuiInputEventType_MouseWheel, /* original C++ signature */
  1988. mouse_wheel = enum.auto() # (= 2)
  1989. # ImGuiInputEventType_MouseButton, /* original C++ signature */
  1990. mouse_button = enum.auto() # (= 3)
  1991. # ImGuiInputEventType_MouseViewport, /* original C++ signature */
  1992. mouse_viewport = enum.auto() # (= 4)
  1993. # ImGuiInputEventType_Key, /* original C++ signature */
  1994. key = enum.auto() # (= 5)
  1995. # ImGuiInputEventType_Text, /* original C++ signature */
  1996. text = enum.auto() # (= 6)
  1997. # ImGuiInputEventType_Focus, /* original C++ signature */
  1998. focus = enum.auto() # (= 7)
  1999. # ImGuiInputEventType_COUNT /* original C++ signature */
  2000. # }
  2001. count = enum.auto() # (= 8)
  2002. class InputSource(enum.IntFlag):
  2003. # ImGuiInputSource_None = 0, /* original C++ signature */
  2004. none = enum.auto() # (= 0)
  2005. # ImGuiInputSource_Mouse, /* original C++ signature */
  2006. mouse = enum.auto() # (= 1) # Note: may be Mouse or TouchScreen or Pen. See io.MouseSource to distinguish them.
  2007. # ImGuiInputSource_Keyboard, /* original C++ signature */
  2008. keyboard = enum.auto() # (= 2)
  2009. # ImGuiInputSource_Gamepad, /* original C++ signature */
  2010. gamepad = enum.auto() # (= 3)
  2011. # ImGuiInputSource_COUNT /* original C++ signature */
  2012. # }
  2013. count = enum.auto() # (= 4)
  2014. # FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension?
  2015. # Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor'
  2016. class InputEventMousePos:
  2017. # float PosX, /* original C++ signature */
  2018. pos_x: float
  2019. # PosY; /* original C++ signature */
  2020. pos_y: float
  2021. # ImGuiMouseSource MouseSource; /* original C++ signature */
  2022. mouse_source: MouseSource
  2023. # ImGuiInputEventMousePos(float PosX = float(), float PosY = float(), ImGuiMouseSource MouseSource = ImGuiMouseSource()); /* original C++ signature */
  2024. def __init__(
  2025. self, pos_x: float = float(), pos_y: float = float(), mouse_source: Optional[MouseSource] = None
  2026. ) -> None:
  2027. """Auto-generated default constructor with named params
  2028. Python bindings defaults:
  2029. If MouseSource is None, then its default value will be: MouseSource()
  2030. """
  2031. pass
  2032. class InputEventMouseWheel:
  2033. # float WheelX, /* original C++ signature */
  2034. wheel_x: float
  2035. # WheelY; /* original C++ signature */
  2036. wheel_y: float
  2037. # ImGuiMouseSource MouseSource; /* original C++ signature */
  2038. mouse_source: MouseSource
  2039. # ImGuiInputEventMouseWheel(float WheelX = float(), float WheelY = float(), ImGuiMouseSource MouseSource = ImGuiMouseSource()); /* original C++ signature */
  2040. def __init__(
  2041. self, wheel_x: float = float(), wheel_y: float = float(), mouse_source: Optional[MouseSource] = None
  2042. ) -> None:
  2043. """Auto-generated default constructor with named params
  2044. Python bindings defaults:
  2045. If MouseSource is None, then its default value will be: MouseSource()
  2046. """
  2047. pass
  2048. class InputEventMouseButton:
  2049. # int Button; /* original C++ signature */
  2050. button: int
  2051. # bool Down; /* original C++ signature */
  2052. down: bool
  2053. # ImGuiMouseSource MouseSource; /* original C++ signature */
  2054. mouse_source: MouseSource
  2055. # ImGuiInputEventMouseButton(int Button = int(), bool Down = bool(), ImGuiMouseSource MouseSource = ImGuiMouseSource()); /* original C++ signature */
  2056. def __init__(self, button: int = int(), down: bool = bool(), mouse_source: Optional[MouseSource] = None) -> None:
  2057. """Auto-generated default constructor with named params
  2058. Python bindings defaults:
  2059. If MouseSource is None, then its default value will be: MouseSource()
  2060. """
  2061. pass
  2062. class InputEventMouseViewport:
  2063. # ImGuiID HoveredViewportID; /* original C++ signature */
  2064. hovered_viewport_id: ID
  2065. # ImGuiInputEventMouseViewport(ImGuiID HoveredViewportID = ImGuiID()); /* original C++ signature */
  2066. def __init__(self, hovered_viewport_id: ID = ID()) -> None:
  2067. """Auto-generated default constructor with named params"""
  2068. pass
  2069. class InputEventKey:
  2070. # ImGuiKey Key; /* original C++ signature */
  2071. key: Key
  2072. # bool Down; /* original C++ signature */
  2073. down: bool
  2074. # float AnalogValue; /* original C++ signature */
  2075. analog_value: float
  2076. # ImGuiInputEventKey(ImGuiKey Key = ImGuiKey(), bool Down = bool(), float AnalogValue = float()); /* original C++ signature */
  2077. def __init__(self, key: Key = Key(), down: bool = bool(), analog_value: float = float()) -> None:
  2078. """Auto-generated default constructor with named params"""
  2079. pass
  2080. class InputEventText:
  2081. # unsigned int Char; /* original C++ signature */
  2082. char: int
  2083. # ImGuiInputEventText(); /* original C++ signature */
  2084. def __init__(self) -> None:
  2085. """Auto-generated default constructor"""
  2086. pass
  2087. class InputEventAppFocused:
  2088. # bool Focused; /* original C++ signature */
  2089. focused: bool
  2090. # ImGuiInputEventAppFocused(bool Focused = bool()); /* original C++ signature */
  2091. def __init__(self, focused: bool = bool()) -> None:
  2092. """Auto-generated default constructor with named params"""
  2093. pass
  2094. class InputEvent:
  2095. # ImGuiInputEventType Type; /* original C++ signature */
  2096. type: InputEventType
  2097. # ImGuiInputSource Source; /* original C++ signature */
  2098. source: InputSource
  2099. # ImU32 EventId; /* original C++ signature */
  2100. event_id: ImU32 # Unique, sequential increasing integer to identify an event (if you need to correlate them to other data).
  2101. # bool AddedByTestEngine; /* original C++ signature */
  2102. added_by_test_engine: bool
  2103. # ImGuiInputEvent() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2104. def __init__(self) -> None:
  2105. pass
  2106. # Input function taking an 'ImGuiID owner_id' argument defaults to (ImGuiKeyOwner_Any == 0) aka don't test ownership, which matches legacy behavior.
  2107. ##define ImGuiKeyOwner_None ImGuiKeyOwner_NoOwner // We previously called this 'ImGuiKeyOwner_None' but it was inconsistent with our pattern that _None values == 0 and quite dangerous. Also using _NoOwner makes the IsKeyPressed() calls more explicit.
  2108. class KeyRoutingData:
  2109. """Routing table entry (sizeof() == 16 bytes)"""
  2110. # ImGuiKeyRoutingIndex NextEntryIndex; /* original C++ signature */
  2111. next_entry_index: KeyRoutingIndex
  2112. # ImU16 Mods; /* original C++ signature */
  2113. mods: ImU16 # Technically we'd only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits.
  2114. # ImU16 RoutingCurrScore; /* original C++ signature */
  2115. routing_curr_score: ImU16 # [DEBUG] For debug display
  2116. # ImU16 RoutingNextScore; /* original C++ signature */
  2117. routing_next_score: ImU16 # Lower is better (0: perfect score)
  2118. # ImGuiID RoutingCurr; /* original C++ signature */
  2119. routing_curr: ID
  2120. # ImGuiID RoutingNext; /* original C++ signature */
  2121. routing_next: ID
  2122. # ImGuiKeyRoutingData() { NextEntryIndex = -1; Mods = 0; RoutingCurrScore = RoutingNextScore = 0; RoutingCurr = RoutingNext = ImGuiKeyOwner_NoOwner; } /* original C++ signature */
  2123. def __init__(self) -> None:
  2124. pass
  2125. class KeyRoutingTable:
  2126. """Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching.
  2127. Stored in main context (1 instance)
  2128. """
  2129. # ImVector<ImGuiKeyRoutingData> Entries; /* original C++ signature */
  2130. entries: ImVector_KeyRoutingData
  2131. # ImVector<ImGuiKeyRoutingData> EntriesNext; /* original C++ signature */
  2132. entries_next: ImVector_KeyRoutingData # Double-buffer to avoid reallocation (could use a shared buffer)
  2133. # ImGuiKeyRoutingTable() { Clear(); } /* original C++ signature */
  2134. def __init__(self) -> None:
  2135. pass
  2136. # void Clear() { for (int n = 0; n < IM_COUNTOF(Index); n++) Index[n] = -1; Entries.clear(); EntriesNext.clear(); } /* original C++ signature */
  2137. def clear(self) -> None:
  2138. """(private API)"""
  2139. pass
  2140. class KeyOwnerData:
  2141. """This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features)
  2142. Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData.
  2143. """
  2144. # ImGuiID OwnerCurr; /* original C++ signature */
  2145. owner_curr: ID
  2146. # ImGuiID OwnerNext; /* original C++ signature */
  2147. owner_next: ID
  2148. # bool LockThisFrame; /* original C++ signature */
  2149. lock_this_frame: (
  2150. bool # Reading this key requires explicit owner id (until end of frame). Set by ImGuiInputFlags_LockThisFrame.
  2151. )
  2152. # bool LockUntilRelease; /* original C++ signature */
  2153. lock_until_release: bool # Reading this key requires explicit owner id (until key is released). Set by ImGuiInputFlags_LockUntilRelease. When this is True LockThisFrame is always True as well.
  2154. # ImGuiKeyOwnerData() { OwnerCurr = OwnerNext = ImGuiKeyOwner_NoOwner; LockThisFrame = LockUntilRelease = false; } /* original C++ signature */
  2155. def __init__(self) -> None:
  2156. pass
  2157. class InputFlagsPrivate_(enum.IntFlag):
  2158. """Extend ImGuiInputFlags_
  2159. Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner()
  2160. Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function)
  2161. """
  2162. # Flags for IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked(), Shortcut()
  2163. # - Repeat mode: Repeat rate selection
  2164. # ImGuiInputFlags_RepeatRateDefault = 1 << 1, /* original C++ signature */
  2165. repeat_rate_default = enum.auto() # (= 1 << 1) # Repeat rate: Regular (default)
  2166. # ImGuiInputFlags_RepeatRateNavMove = 1 << 2, /* original C++ signature */
  2167. repeat_rate_nav_move = enum.auto() # (= 1 << 2) # Repeat rate: Fast
  2168. # ImGuiInputFlags_RepeatRateNavTweak = 1 << 3, /* original C++ signature */
  2169. repeat_rate_nav_tweak = enum.auto() # (= 1 << 3) # Repeat rate: Faster
  2170. # - Repeat mode: Specify when repeating key pressed can be interrupted.
  2171. # - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in.
  2172. # ImGuiInputFlags_RepeatUntilRelease = 1 << 4, /* original C++ signature */
  2173. repeat_until_release = (
  2174. enum.auto()
  2175. ) # (= 1 << 4) # Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior.
  2176. # ImGuiInputFlags_RepeatUntilKeyModsChange = 1 << 5, /* original C++ signature */
  2177. repeat_until_key_mods_change = (
  2178. enum.auto()
  2179. ) # (= 1 << 5) # Stop repeating when released OR if keyboard mods are changed (default for Shortcut)
  2180. # ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone = 1 << 6, /* original C++ signature */
  2181. repeat_until_key_mods_change_from_none = (
  2182. enum.auto()
  2183. ) # (= 1 << 6) # Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod.
  2184. # ImGuiInputFlags_RepeatUntilOtherKeyPress = 1 << 7, /* original C++ signature */
  2185. repeat_until_other_key_press = (
  2186. enum.auto()
  2187. ) # (= 1 << 7) # Stop repeating when released OR if any other keyboard key is pressed during the repeat
  2188. # Flags for SetKeyOwner(), SetItemKeyOwner()
  2189. # - Locking key away from non-input aware code. Locking is useful to make input-owner-aware code steal keys from non-input-owner-aware code. If all code is input-owner-aware locking would never be necessary.
  2190. # ImGuiInputFlags_LockThisFrame = 1 << 20, /* original C++ signature */
  2191. lock_this_frame = (
  2192. enum.auto()
  2193. ) # (= 1 << 20) # Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame.
  2194. # ImGuiInputFlags_LockUntilRelease = 1 << 21, /* original C++ signature */
  2195. lock_until_release = (
  2196. enum.auto()
  2197. ) # (= 1 << 21) # Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released.
  2198. # - Condition for SetItemKeyOwner()
  2199. # ImGuiInputFlags_CondHovered = 1 << 22, /* original C++ signature */
  2200. cond_hovered = enum.auto() # (= 1 << 22) # Only set if item is hovered (default to both)
  2201. # ImGuiInputFlags_CondActive = 1 << 23, /* original C++ signature */
  2202. cond_active = enum.auto() # (= 1 << 23) # Only set if item is active (default to both)
  2203. # ImGuiInputFlags_CondDefault_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, /* original C++ signature */
  2204. cond_default_ = enum.auto() # (= InputFlags_CondHovered | InputFlags_CondActive)
  2205. # [Internal] Mask of which function support which flags
  2206. # ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak, /* original C++ signature */
  2207. repeat_rate_mask_ = (
  2208. enum.auto()
  2209. ) # (= InputFlags_RepeatRateDefault | InputFlags_RepeatRateNavMove | InputFlags_RepeatRateNavTweak)
  2210. # ImGuiInputFlags_RepeatUntilMask_ = ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPress, /* original C++ signature */
  2211. repeat_until_mask_ = (
  2212. enum.auto()
  2213. ) # (= InputFlags_RepeatUntilRelease | InputFlags_RepeatUntilKeyModsChange | InputFlags_RepeatUntilKeyModsChangeFromNone | InputFlags_RepeatUntilOtherKeyPress)
  2214. # ImGuiInputFlags_RepeatMask_ = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_, /* original C++ signature */
  2215. repeat_mask_ = enum.auto() # (= InputFlags_Repeat | InputFlags_RepeatRateMask_ | InputFlags_RepeatUntilMask_)
  2216. # ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, /* original C++ signature */
  2217. cond_mask_ = enum.auto() # (= InputFlags_CondHovered | InputFlags_CondActive)
  2218. # ImGuiInputFlags_RouteTypeMask_ = ImGuiInputFlags_RouteActive | ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteAlways, /* original C++ signature */
  2219. route_type_mask_ = (
  2220. enum.auto()
  2221. ) # (= InputFlags_RouteActive | InputFlags_RouteFocused | InputFlags_RouteGlobal | InputFlags_RouteAlways)
  2222. # ImGuiInputFlags_RouteOptionsMask_ = ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive | ImGuiInputFlags_RouteUnlessBgFocused | ImGuiInputFlags_RouteFromRootWindow, /* original C++ signature */
  2223. route_options_mask_ = (
  2224. enum.auto()
  2225. ) # (= InputFlags_RouteOverFocused | InputFlags_RouteOverActive | InputFlags_RouteUnlessBgFocused | InputFlags_RouteFromRootWindow)
  2226. # ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_RepeatMask_, /* original C++ signature */
  2227. supported_by_is_key_pressed = enum.auto() # (= InputFlags_RepeatMask_)
  2228. # ImGuiInputFlags_SupportedByIsMouseClicked = ImGuiInputFlags_Repeat, /* original C++ signature */
  2229. supported_by_is_mouse_clicked = enum.auto() # (= InputFlags_Repeat)
  2230. # ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_, /* original C++ signature */
  2231. supported_by_shortcut = (
  2232. enum.auto()
  2233. ) # (= InputFlags_RepeatMask_ | InputFlags_RouteTypeMask_ | InputFlags_RouteOptionsMask_)
  2234. # ImGuiInputFlags_SupportedBySetNextItemShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_ | ImGuiInputFlags_Tooltip, /* original C++ signature */
  2235. supported_by_set_next_item_shortcut = (
  2236. enum.auto()
  2237. ) # (= InputFlags_RepeatMask_ | InputFlags_RouteTypeMask_ | InputFlags_RouteOptionsMask_ | InputFlags_Tooltip)
  2238. # ImGuiInputFlags_SupportedBySetKeyOwner = ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease, /* original C++ signature */
  2239. supported_by_set_key_owner = enum.auto() # (= InputFlags_LockThisFrame | InputFlags_LockUntilRelease)
  2240. # ImGuiInputFlags_SupportedBySetItemKeyOwner = ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_, /* original C++ signature */
  2241. # }
  2242. supported_by_set_item_key_owner = enum.auto() # (= InputFlags_SupportedBySetKeyOwner | InputFlags_CondMask_)
  2243. # -----------------------------------------------------------------------------
  2244. # [SECTION] Clipper support
  2245. # -----------------------------------------------------------------------------
  2246. class ListClipperRange:
  2247. """Note that Max is exclusive, so perhaps should be using a Begin/End convention."""
  2248. # int Min; /* original C++ signature */
  2249. min: int
  2250. # int Max; /* original C++ signature */
  2251. max: int
  2252. # bool PosToIndexConvert; /* original C++ signature */
  2253. pos_to_index_convert: bool # Begin/End are absolute position (will be converted to indices later)
  2254. # ImS8 PosToIndexOffsetMin; /* original C++ signature */
  2255. pos_to_index_offset_min: ImS8 # Add to Min after converting to indices
  2256. # ImS8 PosToIndexOffsetMax; /* original C++ signature */
  2257. pos_to_index_offset_max: ImS8 # Add to Min after converting to indices
  2258. # static ImGuiListClipperRange FromIndices(int min, int max) { ImGuiListClipperRange r = { min, max, false, 0, 0 }; return r; } /* original C++ signature */
  2259. @staticmethod
  2260. def from_indices(min: int, max: int) -> ListClipperRange:
  2261. """(private API)"""
  2262. pass
  2263. # static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max) { ImGuiListClipperRange r = { (int)y1, (int)y2, true, (ImS8)off_min, (ImS8)off_max }; return r; } /* original C++ signature */
  2264. @staticmethod
  2265. def from_positions(y1: float, y2: float, off_min: int, off_max: int) -> ListClipperRange:
  2266. """(private API)"""
  2267. pass
  2268. # ImGuiListClipperRange(int Min = int(), int Max = int(), bool PosToIndexConvert = bool(), ImS8 PosToIndexOffsetMin = ImS8(), ImS8 PosToIndexOffsetMax = ImS8()); /* original C++ signature */
  2269. def __init__(
  2270. self,
  2271. min: int = int(),
  2272. max: int = int(),
  2273. pos_to_index_convert: bool = bool(),
  2274. pos_to_index_offset_min: ImS8 = ImS8(),
  2275. pos_to_index_offset_max: ImS8 = ImS8(),
  2276. ) -> None:
  2277. """Auto-generated default constructor with named params"""
  2278. pass
  2279. class ListClipperData:
  2280. """Temporary clipper data, buffers shared/reused between instances"""
  2281. # ImGuiListClipper* ListClipper; /* original C++ signature */
  2282. list_clipper: ListClipper
  2283. # float LossynessOffset; /* original C++ signature */
  2284. lossyness_offset: float
  2285. # int StepNo; /* original C++ signature */
  2286. step_no: int
  2287. # int ItemsFrozen; /* original C++ signature */
  2288. items_frozen: int
  2289. # ImVector<ImGuiListClipperRange> Ranges; /* original C++ signature */
  2290. ranges: ImVector_ListClipperRange
  2291. # ImGuiListClipperData() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2292. def __init__(self) -> None:
  2293. pass
  2294. # void Reset(ImGuiListClipper* clipper) { ListClipper = clipper; StepNo = ItemsFrozen = 0; Ranges.resize(0); } /* original C++ signature */
  2295. def reset(self, clipper: ListClipper) -> None:
  2296. """(private API)"""
  2297. pass
  2298. # -----------------------------------------------------------------------------
  2299. # [SECTION] Navigation support
  2300. # -----------------------------------------------------------------------------
  2301. class ActivateFlags_(enum.IntFlag):
  2302. # ImGuiActivateFlags_None = 0, /* original C++ signature */
  2303. none = enum.auto() # (= 0)
  2304. # ImGuiActivateFlags_PreferInput = 1 << 0, /* original C++ signature */
  2305. prefer_input = (
  2306. enum.auto()
  2307. ) # (= 1 << 0) # Favor activation that requires keyboard text input (e.g. for Slider/Drag). Default for Enter key.
  2308. # ImGuiActivateFlags_PreferTweak = 1 << 1, /* original C++ signature */
  2309. prefer_tweak = (
  2310. enum.auto()
  2311. ) # (= 1 << 1) # Favor activation for tweaking with arrows or gamepad (e.g. for Slider/Drag). Default for Space key and if keyboard is not used.
  2312. # ImGuiActivateFlags_TryToPreserveState = 1 << 2, /* original C++ signature */
  2313. try_to_preserve_state = (
  2314. enum.auto()
  2315. ) # (= 1 << 2) # Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection)
  2316. # ImGuiActivateFlags_FromTabbing = 1 << 3, /* original C++ signature */
  2317. from_tabbing = enum.auto() # (= 1 << 3) # Activation requested by a tabbing request (ImGuiNavMoveFlags_IsTabbing)
  2318. # ImGuiActivateFlags_FromShortcut = 1 << 4, /* original C++ signature */
  2319. from_shortcut = (
  2320. enum.auto()
  2321. ) # (= 1 << 4) # Activation requested by an item shortcut via SetNextItemShortcut() function.
  2322. # ImGuiActivateFlags_FromFocusApi = 1 << 5, /* original C++ signature */
  2323. from_focus_api = enum.auto() # (= 1 << 5) # Activation requested by an api request (ImGuiNavMoveFlags_FocusApi)
  2324. class ScrollFlags_(enum.IntFlag):
  2325. """Early work-in-progress API for ScrollToItem()"""
  2326. # ImGuiScrollFlags_None = 0, /* original C++ signature */
  2327. none = enum.auto() # (= 0)
  2328. # ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0, /* original C++ signature */
  2329. keep_visible_edge_x = (
  2330. enum.auto()
  2331. ) # (= 1 << 0) # If item is not visible: scroll as little as possible on X axis to bring item back into view [default for X axis]
  2332. # ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1, /* original C++ signature */
  2333. keep_visible_edge_y = (
  2334. enum.auto()
  2335. ) # (= 1 << 1) # If item is not visible: scroll as little as possible on Y axis to bring item back into view [default for Y axis for windows that are already visible]
  2336. # ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2, /* original C++ signature */
  2337. keep_visible_center_x = (
  2338. enum.auto()
  2339. ) # (= 1 << 2) # If item is not visible: scroll to make the item centered on X axis [rarely used]
  2340. # ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3, /* original C++ signature */
  2341. keep_visible_center_y = (
  2342. enum.auto()
  2343. ) # (= 1 << 3) # If item is not visible: scroll to make the item centered on Y axis
  2344. # ImGuiScrollFlags_AlwaysCenterX = 1 << 4, /* original C++ signature */
  2345. always_center_x = enum.auto() # (= 1 << 4) # Always center the result item on X axis [rarely used]
  2346. # ImGuiScrollFlags_AlwaysCenterY = 1 << 5, /* original C++ signature */
  2347. always_center_y = (
  2348. enum.auto()
  2349. ) # (= 1 << 5) # Always center the result item on Y axis [default for Y axis for appearing window)
  2350. # ImGuiScrollFlags_NoScrollParent = 1 << 6, /* original C++ signature */
  2351. no_scroll_parent = (
  2352. enum.auto()
  2353. ) # (= 1 << 6) # Disable forwarding scrolling to parent window if required to keep item/rect visible (only scroll window the function was applied to).
  2354. # ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterX, /* original C++ signature */
  2355. mask_x_ = (
  2356. enum.auto()
  2357. ) # (= ScrollFlags_KeepVisibleEdgeX | ScrollFlags_KeepVisibleCenterX | ScrollFlags_AlwaysCenterX)
  2358. # ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY, /* original C++ signature */
  2359. # }
  2360. mask_y_ = (
  2361. enum.auto()
  2362. ) # (= ScrollFlags_KeepVisibleEdgeY | ScrollFlags_KeepVisibleCenterY | ScrollFlags_AlwaysCenterY)
  2363. class NavRenderCursorFlags_(enum.IntFlag):
  2364. # ImGuiNavRenderCursorFlags_None = 0, /* original C++ signature */
  2365. none = enum.auto() # (= 0)
  2366. # ImGuiNavRenderCursorFlags_Compact = 1 << 1, /* original C++ signature */
  2367. compact = enum.auto() # (= 1 << 1) # Compact highlight, no padding/distance from focused item
  2368. # ImGuiNavRenderCursorFlags_AlwaysDraw = 1 << 2, /* original C++ signature */
  2369. always_draw = (
  2370. enum.auto()
  2371. ) # (= 1 << 2) # Draw rectangular highlight if (g.NavId == id) even when g.NavCursorVisible == False, aka even when using the mouse.
  2372. # ImGuiNavRenderCursorFlags_NoRounding = 1 << 3, /* original C++ signature */
  2373. no_rounding = enum.auto() # (= 1 << 3)
  2374. class NavMoveFlags_(enum.IntFlag):
  2375. # ImGuiNavMoveFlags_None = 0, /* original C++ signature */
  2376. none = enum.auto() # (= 0)
  2377. # ImGuiNavMoveFlags_LoopX = 1 << 0, /* original C++ signature */
  2378. loop_x = enum.auto() # (= 1 << 0) # On failed request, restart from opposite side
  2379. # ImGuiNavMoveFlags_LoopY = 1 << 1, /* original C++ signature */
  2380. loop_y = enum.auto() # (= 1 << 1)
  2381. # ImGuiNavMoveFlags_WrapX = 1 << 2, /* original C++ signature */
  2382. wrap_x = (
  2383. enum.auto()
  2384. ) # (= 1 << 2) # On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
  2385. # ImGuiNavMoveFlags_WrapY = 1 << 3, /* original C++ signature */
  2386. wrap_y = enum.auto() # (= 1 << 3) # This is not super useful but provided for completeness
  2387. # ImGuiNavMoveFlags_WrapMask_ = ImGuiNavMoveFlags_LoopX | ImGuiNavMoveFlags_LoopY | ImGuiNavMoveFlags_WrapX | ImGuiNavMoveFlags_WrapY, /* original C++ signature */
  2388. wrap_mask_ = enum.auto() # (= NavMoveFlags_LoopX | NavMoveFlags_LoopY | NavMoveFlags_WrapX | NavMoveFlags_WrapY)
  2389. # ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, /* original C++ signature */
  2390. allow_current_nav_id = (
  2391. enum.auto()
  2392. ) # (= 1 << 4) # Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
  2393. # ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, /* original C++ signature */
  2394. also_score_visible_set = (
  2395. enum.auto()
  2396. ) # (= 1 << 5) # Store alternate result in NavMoveResultLocalVisible that only comprise elements that are already fully visible (used by PageUp/PageDown)
  2397. # ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6, /* original C++ signature */
  2398. scroll_to_edge_y = (
  2399. enum.auto()
  2400. ) # (= 1 << 6) # Force scrolling to min/max (used by Home/End) // FIXME-NAV: Aim to remove or reword as ImGuiScrollFlags
  2401. # ImGuiNavMoveFlags_Forwarded = 1 << 7, /* original C++ signature */
  2402. forwarded = enum.auto() # (= 1 << 7)
  2403. # ImGuiNavMoveFlags_DebugNoResult = 1 << 8, /* original C++ signature */
  2404. debug_no_result = enum.auto() # (= 1 << 8) # Dummy scoring for debug purpose, don't apply result
  2405. # ImGuiNavMoveFlags_FocusApi = 1 << 9, /* original C++ signature */
  2406. focus_api = (
  2407. enum.auto()
  2408. ) # (= 1 << 9) # Requests from focus API can land/focus/activate items even if they are marked with _NoTabStop (see NavProcessItemForTabbingRequest() for details)
  2409. # ImGuiNavMoveFlags_IsTabbing = 1 << 10, /* original C++ signature */
  2410. is_tabbing = enum.auto() # (= 1 << 10) # == Focus + Activate if item is Inputable + DontChangeNavHighlight
  2411. # ImGuiNavMoveFlags_IsPageMove = 1 << 11, /* original C++ signature */
  2412. is_page_move = enum.auto() # (= 1 << 11) # Identify a PageDown/PageUp request.
  2413. # ImGuiNavMoveFlags_Activate = 1 << 12, /* original C++ signature */
  2414. activate = enum.auto() # (= 1 << 12) # Activate/select target item.
  2415. # ImGuiNavMoveFlags_NoSelect = 1 << 13, /* original C++ signature */
  2416. no_select = enum.auto() # (= 1 << 13) # Don't trigger selection by not setting g.NavJustMovedTo
  2417. # ImGuiNavMoveFlags_NoSetNavCursorVisible = 1 << 14, /* original C++ signature */
  2418. no_set_nav_cursor_visible = enum.auto() # (= 1 << 14) # Do not alter the nav cursor visible state
  2419. # ImGuiNavMoveFlags_NoClearActiveId = 1 << 15, /* original C++ signature */
  2420. no_clear_active_id = enum.auto() # (= 1 << 15) # (Experimental) Do not clear active id when applying move result
  2421. class NavLayer(enum.IntFlag):
  2422. # ImGuiNavLayer_Main = 0, /* original C++ signature */
  2423. main = enum.auto() # (= 0) # Main scrolling layer
  2424. # ImGuiNavLayer_Menu = 1, /* original C++ signature */
  2425. menu = enum.auto() # (= 1) # Menu layer (access with Alt)
  2426. # ImGuiNavLayer_COUNT /* original C++ signature */
  2427. # }
  2428. count = enum.auto() # (= 2)
  2429. class NavItemData:
  2430. """Storage for navigation query/results"""
  2431. # ImGuiWindow* Window; /* original C++ signature */
  2432. window: Window # Init,Move // Best candidate window (result->ItemWindow->RootWindowForNav == request->Window)
  2433. # ImGuiID ID; /* original C++ signature */
  2434. id_: ID # Init,Move // Best candidate item ID
  2435. # ImGuiID FocusScopeId; /* original C++ signature */
  2436. focus_scope_id: ID # Init,Move // Best candidate focus scope ID
  2437. # ImRect RectRel; /* original C++ signature */
  2438. rect_rel: ImRect # Init,Move // Best candidate bounding box in window relative space
  2439. # ImGuiItemFlags ItemFlags; /* original C++ signature */
  2440. item_flags: ItemFlags # ????,Move // Best candidate item flags
  2441. # float DistBox; /* original C++ signature */
  2442. dist_box: float # Move // Best candidate box distance to current NavId
  2443. # float DistCenter; /* original C++ signature */
  2444. dist_center: float # Move // Best candidate center distance to current NavId
  2445. # float DistAxial; /* original C++ signature */
  2446. dist_axial: float # Move // Best candidate axial distance to current NavId
  2447. # ImGuiSelectionUserData SelectionUserData; /* original C++ signature */
  2448. selection_user_data: SelectionUserData # I+Mov // Best candidate SetNextItemSelectionUserData() value. Valid if (ItemFlags & ImGuiItemFlags_HasSelectionUserData)
  2449. # ImGuiNavItemData() { Clear(); } /* original C++ signature */
  2450. def __init__(self) -> None:
  2451. pass
  2452. # void Clear() { Window = NULL; ID = FocusScopeId = 0; ItemFlags = 0; SelectionUserData = -1; DistBox = DistCenter = DistAxial = FLT_MAX; } /* original C++ signature */
  2453. def clear(self) -> None:
  2454. """(private API)"""
  2455. pass
  2456. class FocusScopeData:
  2457. """Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[]"""
  2458. # ImGuiID ID; /* original C++ signature */
  2459. id_: ID
  2460. # ImGuiID WindowID; /* original C++ signature */
  2461. window_id: ID
  2462. # ImGuiFocusScopeData(ImGuiID ID = ImGuiID(), ImGuiID WindowID = ImGuiID()); /* original C++ signature */
  2463. def __init__(self, id_: ID = ID(), window_id: ID = ID()) -> None:
  2464. """Auto-generated default constructor with named params"""
  2465. pass
  2466. # -----------------------------------------------------------------------------
  2467. # [SECTION] Typing-select support
  2468. # -----------------------------------------------------------------------------
  2469. class TypingSelectFlags_(enum.IntFlag):
  2470. """Flags for GetTypingSelectRequest()"""
  2471. # ImGuiTypingSelectFlags_None = 0, /* original C++ signature */
  2472. none = enum.auto() # (= 0)
  2473. # ImGuiTypingSelectFlags_AllowBackspace = 1 << 0, /* original C++ signature */
  2474. allow_backspace = (
  2475. enum.auto()
  2476. ) # (= 1 << 0) # Backspace to delete character inputs. If using: ensure GetTypingSelectRequest() is not called more than once per frame (filter by e.g. focus state)
  2477. # ImGuiTypingSelectFlags_AllowSingleCharMode = 1 << 1, /* original C++ signature */
  2478. allow_single_char_mode = (
  2479. enum.auto()
  2480. ) # (= 1 << 1) # Allow "single char" search mode which is activated when pressing the same character multiple times.
  2481. class TypingSelectRequest:
  2482. """Returned by GetTypingSelectRequest(), designed to eventually be public."""
  2483. # ImGuiTypingSelectFlags Flags; /* original C++ signature */
  2484. flags: TypingSelectFlags # Flags passed to GetTypingSelectRequest()
  2485. # int SearchBufferLen; /* original C++ signature */
  2486. search_buffer_len: int
  2487. # const char* SearchBuffer; /* original C++ signature */
  2488. search_buffer: str # Search buffer contents (use full string. unless SingleCharMode is set, in which case use SingleCharSize). # (const)
  2489. # bool SelectRequest; /* original C++ signature */
  2490. select_request: bool # Set when buffer was modified this frame, requesting a selection.
  2491. # bool SingleCharMode; /* original C++ signature */
  2492. single_char_mode: bool # Notify when buffer contains same character repeated, to implement special mode. In this situation it preferred to not display any on-screen search indication.
  2493. # ImS8 SingleCharSize; /* original C++ signature */
  2494. single_char_size: ImS8 # Length in bytes of first letter codepoint (1 for ascii, 2-4 for UTF-8). If (SearchBufferLen==RepeatCharSize) only 1 letter has been input.
  2495. # ImGuiTypingSelectRequest(ImGuiTypingSelectFlags Flags = ImGuiTypingSelectFlags(), int SearchBufferLen = int(), bool SelectRequest = bool(), bool SingleCharMode = bool(), ImS8 SingleCharSize = ImS8()); /* original C++ signature */
  2496. def __init__(
  2497. self,
  2498. flags: TypingSelectFlags = TypingSelectFlags(),
  2499. search_buffer_len: int = int(),
  2500. select_request: bool = bool(),
  2501. single_char_mode: bool = bool(),
  2502. single_char_size: ImS8 = ImS8(),
  2503. ) -> None:
  2504. """Auto-generated default constructor with named params"""
  2505. pass
  2506. class TypingSelectState:
  2507. """Storage for GetTypingSelectRequest()"""
  2508. # ImGuiTypingSelectRequest Request; /* original C++ signature */
  2509. request: TypingSelectRequest # User-facing data
  2510. # ImGuiID FocusScope; /* original C++ signature */
  2511. focus_scope: ID
  2512. # int LastRequestFrame = 0; /* original C++ signature */
  2513. last_request_frame: int = 0
  2514. # float LastRequestTime = 0.0f; /* original C++ signature */
  2515. last_request_time: float = 0.0
  2516. # bool SingleCharModeLock = false; /* original C++ signature */
  2517. single_char_mode_lock: bool = (
  2518. False # After a certain single char repeat count we lock into SingleCharMode. Two benefits: 1) buffer never fill, 2) we can provide an immediate SingleChar mode without timer elapsing.
  2519. )
  2520. # ImGuiTypingSelectState() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2521. def __init__(self) -> None:
  2522. pass
  2523. # void Clear() { SearchBuffer[0] = 0; SingleCharModeLock = false; } /* original C++ signature */
  2524. def clear(self) -> None:
  2525. """(private API)
  2526. We preserve remaining data for easier debugging
  2527. """
  2528. pass
  2529. # -----------------------------------------------------------------------------
  2530. # [SECTION] Columns support
  2531. # -----------------------------------------------------------------------------
  2532. class OldColumnFlags_(enum.IntFlag):
  2533. """Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays!"""
  2534. # ImGuiOldColumnFlags_None = 0, /* original C++ signature */
  2535. none = enum.auto() # (= 0)
  2536. # ImGuiOldColumnFlags_NoBorder = 1 << 0, /* original C++ signature */
  2537. no_border = enum.auto() # (= 1 << 0) # Disable column dividers
  2538. # ImGuiOldColumnFlags_NoResize = 1 << 1, /* original C++ signature */
  2539. no_resize = enum.auto() # (= 1 << 1) # Disable resizing columns when clicking on the dividers
  2540. # ImGuiOldColumnFlags_NoPreserveWidths = 1 << 2, /* original C++ signature */
  2541. no_preserve_widths = enum.auto() # (= 1 << 2) # Disable column width preservation when adjusting columns
  2542. # ImGuiOldColumnFlags_NoForceWithinWindow = 1 << 3, /* original C++ signature */
  2543. no_force_within_window = enum.auto() # (= 1 << 3) # Disable forcing columns to fit within window
  2544. # ImGuiOldColumnFlags_GrowParentContentsSize = 1 << 4, /* original C++ signature */
  2545. grow_parent_contents_size = (
  2546. enum.auto()
  2547. ) # (= 1 << 4) # Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.
  2548. # Obsolete names (will be removed)
  2549. class OldColumnData:
  2550. # float OffsetNorm; /* original C++ signature */
  2551. offset_norm: float # Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
  2552. # float OffsetNormBeforeResize; /* original C++ signature */
  2553. offset_norm_before_resize: float
  2554. # ImGuiOldColumnFlags Flags; /* original C++ signature */
  2555. flags: OldColumnFlags # Not exposed
  2556. # ImRect ClipRect; /* original C++ signature */
  2557. clip_rect: ImRect
  2558. # ImGuiOldColumnData() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2559. def __init__(self) -> None:
  2560. pass
  2561. class OldColumns:
  2562. # ImGuiID ID; /* original C++ signature */
  2563. id_: ID
  2564. # ImGuiOldColumnFlags Flags; /* original C++ signature */
  2565. flags: OldColumnFlags
  2566. # bool IsFirstFrame; /* original C++ signature */
  2567. is_first_frame: bool
  2568. # bool IsBeingResized; /* original C++ signature */
  2569. is_being_resized: bool
  2570. # int Current; /* original C++ signature */
  2571. current: int
  2572. # int Count; /* original C++ signature */
  2573. count: int
  2574. # float OffMinX, /* original C++ signature */
  2575. off_min_x: float # Offsets from HostWorkRect.Min.x
  2576. # OffMaxX; /* original C++ signature */
  2577. off_max_x: float # Offsets from HostWorkRect.Min.x
  2578. # float LineMinY, /* original C++ signature */
  2579. line_min_y: float
  2580. # LineMaxY; /* original C++ signature */
  2581. line_max_y: float
  2582. # float HostCursorPosY; /* original C++ signature */
  2583. host_cursor_pos_y: float # Backup of CursorPos at the time of BeginColumns()
  2584. # float HostCursorMaxPosX; /* original C++ signature */
  2585. host_cursor_max_pos_x: float # Backup of CursorMaxPos at the time of BeginColumns()
  2586. # ImRect HostInitialClipRect; /* original C++ signature */
  2587. host_initial_clip_rect: ImRect # Backup of ClipRect at the time of BeginColumns()
  2588. # ImRect HostBackupClipRect; /* original C++ signature */
  2589. host_backup_clip_rect: ImRect # Backup of ClipRect during PushColumnsBackground()/PopColumnsBackground()
  2590. # ImRect HostBackupParentWorkRect; /* original C++ signature */
  2591. host_backup_parent_work_rect: ImRect # Backup of WorkRect at the time of BeginColumns()
  2592. # ImVector<ImGuiOldColumnData> Columns; /* original C++ signature */
  2593. columns: ImVector_OldColumnData
  2594. # ImDrawListSplitter Splitter; /* original C++ signature */
  2595. splitter: ImDrawListSplitter
  2596. # ImGuiOldColumns() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2597. def __init__(self) -> None:
  2598. pass
  2599. # -----------------------------------------------------------------------------
  2600. # [SECTION] Box-select support
  2601. # -----------------------------------------------------------------------------
  2602. class BoxSelectState:
  2603. # Active box-selection data (persistent, 1 active at a time)
  2604. # ImGuiID ID; /* original C++ signature */
  2605. id_: ID
  2606. # bool IsActive; /* original C++ signature */
  2607. is_active: bool
  2608. # bool IsStarting; /* original C++ signature */
  2609. is_starting: bool
  2610. # bool IsStartedFromVoid; /* original C++ signature */
  2611. is_started_from_void: bool # Starting click was not from an item.
  2612. # bool IsStartedSetNavIdOnce; /* original C++ signature */
  2613. is_started_set_nav_id_once: bool
  2614. # bool RequestClear; /* original C++ signature */
  2615. request_clear: bool
  2616. # ImVec2 StartPosRel; /* original C++ signature */
  2617. start_pos_rel: ImVec2 # Start position in window-contents relative space (to support scrolling)
  2618. # ImVec2 EndPosRel; /* original C++ signature */
  2619. end_pos_rel: ImVec2 # End position in window-contents relative space
  2620. # ImVec2 ScrollAccum; /* original C++ signature */
  2621. scroll_accum: ImVec2 # Scrolling accumulator (to behave at high-frame spaces)
  2622. # ImGuiWindow* Window; /* original C++ signature */
  2623. window: Window
  2624. # Temporary/Transient data
  2625. # bool UnclipMode; /* original C++ signature */
  2626. unclip_mode: bool # (Temp/Transient, here in hot area). Set/cleared by the BeginMultiSelect()/EndMultiSelect() owning active box-select.
  2627. # ImRect UnclipRect; /* original C++ signature */
  2628. unclip_rect: ImRect # Rectangle where ItemAdd() clipping may be temporarily disabled. Need support by multi-select supporting widgets.
  2629. # ImRect BoxSelectRectPrev; /* original C++ signature */
  2630. box_select_rect_prev: ImRect # Selection rectangle in absolute coordinates (derived every frame from BoxSelectStartPosRel and MousePos)
  2631. # ImRect BoxSelectRectCurr; /* original C++ signature */
  2632. box_select_rect_curr: ImRect
  2633. # ImGuiBoxSelectState() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2634. def __init__(self) -> None:
  2635. pass
  2636. # -----------------------------------------------------------------------------
  2637. # [SECTION] Multi-select support
  2638. # -----------------------------------------------------------------------------
  2639. class MultiSelectTempData:
  2640. """Temporary storage for multi-select"""
  2641. # ImGuiMultiSelectIO IO; /* original C++ signature */
  2642. io: MultiSelectIO # MUST BE FIRST FIELD. Requests are set and returned by BeginMultiSelect()/EndMultiSelect() + written to by user during the loop.
  2643. # ImGuiMultiSelectState* Storage; /* original C++ signature */
  2644. storage: MultiSelectState
  2645. # ImGuiID FocusScopeId; /* original C++ signature */
  2646. focus_scope_id: ID # Copied from g.CurrentFocusScopeId (unless another selection scope was pushed manually)
  2647. # ImGuiMultiSelectFlags Flags; /* original C++ signature */
  2648. flags: MultiSelectFlags
  2649. # ImVec2 ScopeRectMin; /* original C++ signature */
  2650. scope_rect_min: ImVec2
  2651. # ImVec2 BackupCursorMaxPos; /* original C++ signature */
  2652. backup_cursor_max_pos: ImVec2
  2653. # ImGuiSelectionUserData CurrSubmittedItem; // Copy of last submitted item data, used to merge output ranges.
  2654. # ImGuiSelectionUserData PrevSubmittedItem; // Copy of previous submitted item data, used to merge output ranges.
  2655. # ImGuiID BoxSelectId; /* original C++ signature */
  2656. box_select_id: ID
  2657. # ImGuiKeyChord KeyMods; /* original C++ signature */
  2658. key_mods: KeyChord
  2659. # ImS8 LoopRequestSetAll; /* original C++ signature */
  2660. loop_request_set_all: ImS8 # -1: no operation, 0: clear all, 1: select all.
  2661. # bool IsEndIO; /* original C++ signature */
  2662. is_end_io: bool # Set when switching IO from BeginMultiSelect() to EndMultiSelect() state.
  2663. # bool IsFocused; /* original C++ signature */
  2664. is_focused: bool # Set if currently focusing the selection scope (any item of the selection). May be used if you have custom shortcut associated to selection.
  2665. # bool IsKeyboardSetRange; /* original C++ signature */
  2666. is_keyboard_set_range: bool # Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford a frame of lag with Shift+Navigation.
  2667. # bool NavIdPassedBy; /* original C++ signature */
  2668. nav_id_passed_by: bool
  2669. # bool RangeSrcPassedBy; /* original C++ signature */
  2670. range_src_passed_by: bool # Set by the item that matches RangeSrcItem.
  2671. # bool RangeDstPassedBy; /* original C++ signature */
  2672. range_dst_passed_by: bool # Set by the item that matches NavJustMovedToId when IsSetRange is set.
  2673. # ImGuiMultiSelectTempData() { Clear(); } /* original C++ signature */
  2674. def __init__(self) -> None:
  2675. pass
  2676. # void Clear() { size_t io_sz = sizeof(IO); ClearIO(); memset((void*)(&IO + 1), 0, sizeof(*this) - io_sz); } /* original C++ signature */
  2677. def clear(self) -> None:
  2678. """(private API)
  2679. Zero-clear except IO as we preserve IO.Requests[] buffer allocation.
  2680. """
  2681. pass
  2682. # void ClearIO() { IO.Requests.resize(0); IO.RangeSrcItem = IO.NavIdItem = ImGuiSelectionUserData_Invalid; IO.NavIdSelected = IO.RangeSrcReset = false; } /* original C++ signature */
  2683. def clear_io(self) -> None:
  2684. """(private API)"""
  2685. pass
  2686. class MultiSelectState:
  2687. """Persistent storage for multi-select (as long as selection is alive)"""
  2688. # ImGuiWindow* Window; /* original C++ signature */
  2689. window: Window
  2690. # ImGuiID ID; /* original C++ signature */
  2691. id_: ID
  2692. # int LastFrameActive; /* original C++ signature */
  2693. last_frame_active: int # Last used frame-count, for GC.
  2694. # int LastSelectionSize; /* original C++ signature */
  2695. last_selection_size: int # Set by BeginMultiSelect() based on optional info provided by user. May be -1 if unknown.
  2696. # ImS8 RangeSelected; /* original C++ signature */
  2697. range_selected: ImS8 # -1 (don't have) or True/False
  2698. # ImS8 NavIdSelected; /* original C++ signature */
  2699. nav_id_selected: ImS8 # -1 (don't have) or True/False
  2700. # ImGuiSelectionUserData RangeSrcItem; /* original C++ signature */
  2701. range_src_item: SelectionUserData
  2702. # ImGuiSelectionUserData NavIdItem; /* original C++ signature */
  2703. nav_id_item: SelectionUserData # SetNextItemSelectionUserData() value for NavId (if part of submitted items)
  2704. # ImGuiMultiSelectState() { Window = NULL; ID = 0; LastFrameActive = LastSelectionSize = 0; RangeSelected = NavIdSelected = -1; RangeSrcItem = NavIdItem = ImGuiSelectionUserData_Invalid; } /* original C++ signature */
  2705. def __init__(self) -> None:
  2706. pass
  2707. # -----------------------------------------------------------------------------
  2708. # [SECTION] Docking support
  2709. # -----------------------------------------------------------------------------
  2710. # #ifdef IMGUI_HAS_DOCK
  2711. #
  2712. class DockNodeFlagsPrivate_(enum.IntFlag):
  2713. """Extend ImGuiDockNodeFlags_"""
  2714. # [Internal]
  2715. # ImGuiDockNodeFlags_DockSpace = 1 << 10, /* original C++ signature */
  2716. dock_space = (
  2717. enum.auto()
  2718. ) # (= 1 << 10) # Saved // A dockspace is a node that occupy space within an existing user window. Otherwise the node is floating and create its own window.
  2719. # ImGuiDockNodeFlags_CentralNode = 1 << 11, /* original C++ signature */
  2720. central_node = (
  2721. enum.auto()
  2722. ) # (= 1 << 11) # Saved // The central node has 2 main properties: stay visible when empty, only use "remaining" spaces from its neighbor.
  2723. # ImGuiDockNodeFlags_NoTabBar = 1 << 12, /* original C++ signature */
  2724. no_tab_bar = (
  2725. enum.auto()
  2726. ) # (= 1 << 12) # Saved // Tab bar is completely unavailable. No triangle in the corner to enable it back.
  2727. # ImGuiDockNodeFlags_HiddenTabBar = 1 << 13, /* original C++ signature */
  2728. hidden_tab_bar = (
  2729. enum.auto()
  2730. ) # (= 1 << 13) # Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance may be destroyed as this is only used for single-window tab bar)
  2731. # ImGuiDockNodeFlags_NoWindowMenuButton = 1 << 14, /* original C++ signature */
  2732. no_window_menu_button = (
  2733. enum.auto()
  2734. ) # (= 1 << 14) # Saved // Disable window/docking menu (that one that appears instead of the collapse button)
  2735. # ImGuiDockNodeFlags_NoCloseButton = 1 << 15, /* original C++ signature */
  2736. no_close_button = enum.auto() # (= 1 << 15) # Saved // Disable close button
  2737. # ImGuiDockNodeFlags_NoResizeX = 1 << 16, /* original C++ signature */
  2738. no_resize_x = enum.auto() # (= 1 << 16) # //
  2739. # ImGuiDockNodeFlags_NoResizeY = 1 << 17, /* original C++ signature */
  2740. no_resize_y = enum.auto() # (= 1 << 17) # //
  2741. # ImGuiDockNodeFlags_DockedWindowsInFocusRoute= 1 << 18, /* original C++ signature */
  2742. docked_windows_in_focus_route = (
  2743. enum.auto()
  2744. ) # (= 1 << 18) # // Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused.
  2745. # Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved)
  2746. # Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand.
  2747. # The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues.
  2748. # ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 19, /* original C++ signature */
  2749. no_docking_split_other = (
  2750. enum.auto()
  2751. ) # (= 1 << 19) # // Disable this node from splitting other windows/nodes.
  2752. # ImGuiDockNodeFlags_NoDockingOverMe = 1 << 20, /* original C++ signature */
  2753. no_docking_over_me = (
  2754. enum.auto()
  2755. ) # (= 1 << 20) # // Disable other windows/nodes from being docked over this node.
  2756. # ImGuiDockNodeFlags_NoDockingOverOther = 1 << 21, /* original C++ signature */
  2757. no_docking_over_other = (
  2758. enum.auto()
  2759. ) # (= 1 << 21) # // Disable this node from being docked over another window or non-empty node.
  2760. # ImGuiDockNodeFlags_NoDockingOverEmpty = 1 << 22, /* original C++ signature */
  2761. no_docking_over_empty = (
  2762. enum.auto()
  2763. ) # (= 1 << 22) # // Disable this node from being docked over an empty node (e.g. DockSpace with no other windows)
  2764. # ImGuiDockNodeFlags_NoDocking = ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoDockingSplitOther, /* original C++ signature */
  2765. no_docking = (
  2766. enum.auto()
  2767. ) # (= DockNodeFlags_NoDockingOverMe | DockNodeFlags_NoDockingOverOther | DockNodeFlags_NoDockingOverEmpty | DockNodeFlags_NoDockingSplit | DockNodeFlags_NoDockingSplitOther)
  2768. # Masks
  2769. # ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0, /* original C++ signature */
  2770. shared_flags_inherit_mask_ = enum.auto() # (= ~0)
  2771. # ImGuiDockNodeFlags_NoResizeFlagsMask_ = (int)ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY, /* original C++ signature */
  2772. no_resize_flags_mask_ = (
  2773. enum.auto()
  2774. ) # (= (int)DockNodeFlags_NoResize | DockNodeFlags_NoResizeX | DockNodeFlags_NoResizeY)
  2775. # When splitting, those local flags are moved to the inheriting child, never duplicated
  2776. # ImGuiDockNodeFlags_LocalFlagsTransferMask_ = (int)ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | (int)ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton, /* original C++ signature */
  2777. local_flags_transfer_mask_ = (
  2778. enum.auto()
  2779. ) # (= (int)DockNodeFlags_NoDockingSplit | DockNodeFlags_NoResizeFlagsMask_ | (int)DockNodeFlags_AutoHideTabBar | DockNodeFlags_CentralNode | DockNodeFlags_NoTabBar | DockNodeFlags_HiddenTabBar | DockNodeFlags_NoWindowMenuButton | DockNodeFlags_NoCloseButton)
  2780. # ImGuiDockNodeFlags_SavedFlagsMask_ = ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton, /* original C++ signature */
  2781. # }
  2782. saved_flags_mask_ = (
  2783. enum.auto()
  2784. ) # (= DockNodeFlags_NoResizeFlagsMask_ | DockNodeFlags_DockSpace | DockNodeFlags_CentralNode | DockNodeFlags_NoTabBar | DockNodeFlags_HiddenTabBar | DockNodeFlags_NoWindowMenuButton | DockNodeFlags_NoCloseButton)
  2785. class DataAuthority_(enum.IntFlag):
  2786. """Store the source authority (dock node vs window) of a field"""
  2787. # ImGuiDataAuthority_Auto, /* original C++ signature */
  2788. auto = enum.auto() # (= 0)
  2789. # ImGuiDataAuthority_DockNode, /* original C++ signature */
  2790. dock_node = enum.auto() # (= 1)
  2791. # ImGuiDataAuthority_Window, /* original C++ signature */
  2792. # }
  2793. window = enum.auto() # (= 2)
  2794. class DockNodeState(enum.IntFlag):
  2795. # ImGuiDockNodeState_Unknown, /* original C++ signature */
  2796. unknown = enum.auto() # (= 0)
  2797. # ImGuiDockNodeState_HostWindowHiddenBecauseSingleWindow, /* original C++ signature */
  2798. host_window_hidden_because_single_window = enum.auto() # (= 1)
  2799. # ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing, /* original C++ signature */
  2800. host_window_hidden_because_windows_are_resizing = enum.auto() # (= 2)
  2801. # ImGuiDockNodeState_HostWindowVisible, /* original C++ signature */
  2802. # }
  2803. host_window_visible = enum.auto() # (= 3)
  2804. class DockNode:
  2805. """sizeof() 176~216"""
  2806. # ImGuiID ID; /* original C++ signature */
  2807. id_: ID
  2808. # ImGuiDockNodeFlags SharedFlags; /* original C++ signature */
  2809. shared_flags: (
  2810. DockNodeFlags # (Write) Flags shared by all nodes of a same dockspace hierarchy (inherited from the root node)
  2811. )
  2812. # ImGuiDockNodeFlags LocalFlags; /* original C++ signature */
  2813. local_flags: DockNodeFlags # (Write) Flags specific to this node
  2814. # ImGuiDockNodeFlags LocalFlagsInWindows; /* original C++ signature */
  2815. local_flags_in_windows: DockNodeFlags # (Write) Flags specific to this node, applied from windows
  2816. # ImGuiDockNodeFlags MergedFlags; /* original C++ signature */
  2817. merged_flags: DockNodeFlags # (Read) Effective flags (== SharedFlags | LocalFlagsInNode | LocalFlagsInWindows)
  2818. # ImGuiDockNodeState State; /* original C++ signature */
  2819. state: DockNodeState
  2820. # ImGuiDockNode* ParentNode; /* original C++ signature */
  2821. parent_node: DockNode
  2822. # ImVector<ImGuiWindow*> Windows; /* original C++ signature */
  2823. windows: ImVector_Window_ptr # Note: unordered list! Iterate TabBar->Tabs for user-order.
  2824. # ImGuiTabBar* TabBar; /* original C++ signature */
  2825. tab_bar: TabBar
  2826. # ImVec2 Pos; /* original C++ signature */
  2827. pos: ImVec2 # Current position
  2828. # ImVec2 Size; /* original C++ signature */
  2829. size: ImVec2 # Current size
  2830. # ImVec2 SizeRef; /* original C++ signature */
  2831. size_ref: ImVec2 # [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
  2832. # ImGuiAxis SplitAxis; /* original C++ signature */
  2833. split_axis: Axis # [Split node only] Split axis (X or Y)
  2834. # ImU32 LastBgColor; /* original C++ signature */
  2835. last_bg_color: ImU32
  2836. # ImGuiWindowClass WindowClass; /* original C++ signature */
  2837. window_class: WindowClass # [Root node only]
  2838. # ImGuiWindow* HostWindow; /* original C++ signature */
  2839. host_window: Window
  2840. # ImGuiWindow* VisibleWindow; /* original C++ signature */
  2841. visible_window: Window # Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different window.
  2842. # ImGuiDockNode* CentralNode; /* original C++ signature */
  2843. central_node: DockNode # [Root node only] Pointer to central node.
  2844. # ImGuiDockNode* OnlyNodeWithWindows; /* original C++ signature */
  2845. only_node_with_windows: DockNode # [Root node only] Set when there is a single visible node within the hierarchy.
  2846. # int CountNodeWithWindows; /* original C++ signature */
  2847. count_node_with_windows: int # [Root node only]
  2848. # int LastFrameAlive; /* original C++ signature */
  2849. last_frame_alive: int # Last frame number the node was updated or kept alive explicitly with DockSpace() + ImGuiDockNodeFlags_KeepAliveOnly
  2850. # int LastFrameActive; /* original C++ signature */
  2851. last_frame_active: int # Last frame number the node was updated.
  2852. # int LastFrameFocused; /* original C++ signature */
  2853. last_frame_focused: int # Last frame number the node was focused.
  2854. # ImGuiID LastFocusedNodeId; /* original C++ signature */
  2855. last_focused_node_id: (
  2856. ID # [Root node only] Which of our child docking node (any ancestor in the hierarchy) was last focused.
  2857. )
  2858. # ImGuiID SelectedTabId; /* original C++ signature */
  2859. selected_tab_id: ID # [Leaf node only] Which of our tab/window is selected.
  2860. # ImGuiID WantCloseTabId; /* original C++ signature */
  2861. want_close_tab_id: ID # [Leaf node only] Set when closing a specific tab/window.
  2862. # ImGuiID RefViewportId; /* original C++ signature */
  2863. ref_viewport_id: ID # Reference viewport ID from visible window when HostWindow == None.
  2864. # ImGuiDockNode(ImGuiID id); /* original C++ signature */
  2865. def __init__(self, id_: ID) -> None:
  2866. pass
  2867. # bool IsRootNode() const { return ParentNode == NULL; } /* original C++ signature */
  2868. def is_root_node(self) -> bool:
  2869. """(private API)"""
  2870. pass
  2871. # bool IsDockSpace() const { return (MergedFlags & ImGuiDockNodeFlags_DockSpace) != 0; } /* original C++ signature */
  2872. def is_dock_space(self) -> bool:
  2873. """(private API)"""
  2874. pass
  2875. # bool IsFloatingNode() const { return ParentNode == NULL && (MergedFlags & ImGuiDockNodeFlags_DockSpace) == 0; } /* original C++ signature */
  2876. def is_floating_node(self) -> bool:
  2877. """(private API)"""
  2878. pass
  2879. # bool IsCentralNode() const { return (MergedFlags & ImGuiDockNodeFlags_CentralNode) != 0; } /* original C++ signature */
  2880. def is_central_node(self) -> bool:
  2881. """(private API)"""
  2882. pass
  2883. # bool IsHiddenTabBar() const { return (MergedFlags & ImGuiDockNodeFlags_HiddenTabBar) != 0; } /* original C++ signature */
  2884. def is_hidden_tab_bar(self) -> bool:
  2885. """(private API)
  2886. Hidden tab bar can be shown back by clicking the small triangle
  2887. """
  2888. pass
  2889. # bool IsNoTabBar() const { return (MergedFlags & ImGuiDockNodeFlags_NoTabBar) != 0; } /* original C++ signature */
  2890. def is_no_tab_bar(self) -> bool:
  2891. """(private API)
  2892. Never show a tab bar
  2893. """
  2894. pass
  2895. # bool IsSplitNode() const { return ChildNodes[0] != NULL; } /* original C++ signature */
  2896. def is_split_node(self) -> bool:
  2897. """(private API)"""
  2898. pass
  2899. # bool IsLeafNode() const { return ChildNodes[0] == NULL; } /* original C++ signature */
  2900. def is_leaf_node(self) -> bool:
  2901. """(private API)"""
  2902. pass
  2903. # bool IsEmpty() const { return ChildNodes[0] == NULL && Windows.Size == 0; } /* original C++ signature */
  2904. def is_empty(self) -> bool:
  2905. """(private API)"""
  2906. pass
  2907. # ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); } /* original C++ signature */
  2908. def rect(self) -> ImRect:
  2909. """(private API)"""
  2910. pass
  2911. # void SetLocalFlags(ImGuiDockNodeFlags flags) { LocalFlags = flags; UpdateMergedFlags(); } /* original C++ signature */
  2912. def set_local_flags(self, flags: DockNodeFlags) -> None:
  2913. """(private API)"""
  2914. pass
  2915. # void UpdateMergedFlags() { MergedFlags = SharedFlags | LocalFlags | LocalFlagsInWindows; } /* original C++ signature */
  2916. def update_merged_flags(self) -> None:
  2917. """(private API)"""
  2918. pass
  2919. class WindowDockStyleCol(enum.IntFlag):
  2920. """List of colors that are stored at the time of Begin() into Docked Windows.
  2921. We currently store the packed colors in a simple array window->DockStyle.Colors[].
  2922. A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow,
  2923. but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame.
  2924. """
  2925. # ImGuiWindowDockStyleCol_Text, /* original C++ signature */
  2926. text = enum.auto() # (= 0)
  2927. # ImGuiWindowDockStyleCol_TabHovered, /* original C++ signature */
  2928. tab_hovered = enum.auto() # (= 1)
  2929. # ImGuiWindowDockStyleCol_TabFocused, /* original C++ signature */
  2930. tab_focused = enum.auto() # (= 2)
  2931. # ImGuiWindowDockStyleCol_TabSelected, /* original C++ signature */
  2932. tab_selected = enum.auto() # (= 3)
  2933. # ImGuiWindowDockStyleCol_TabSelectedOverline, /* original C++ signature */
  2934. tab_selected_overline = enum.auto() # (= 4)
  2935. # ImGuiWindowDockStyleCol_TabDimmed, /* original C++ signature */
  2936. tab_dimmed = enum.auto() # (= 5)
  2937. # ImGuiWindowDockStyleCol_TabDimmedSelected, /* original C++ signature */
  2938. tab_dimmed_selected = enum.auto() # (= 6)
  2939. # ImGuiWindowDockStyleCol_TabDimmedSelectedOverline, /* original C++ signature */
  2940. tab_dimmed_selected_overline = enum.auto() # (= 7)
  2941. # ImGuiWindowDockStyleCol_UnsavedMarker, /* original C++ signature */
  2942. unsaved_marker = enum.auto() # (= 8)
  2943. # ImGuiWindowDockStyleCol_COUNT /* original C++ signature */
  2944. # }
  2945. count = enum.auto() # (= 9)
  2946. class WindowDockStyle:
  2947. """We don't store style.Alpha: dock_node->LastBgColor embeds it and otherwise it would only affect the docking tab, which intuitively I would say we don't want to."""
  2948. # ImGuiWindowDockStyle(); /* original C++ signature */
  2949. def __init__(self) -> None:
  2950. """Auto-generated default constructor"""
  2951. pass
  2952. class DockContext:
  2953. # ImGuiStorage Nodes; /* original C++ signature */
  2954. nodes: Storage # Map ID -> ImGuiDockNode*: Active nodes
  2955. # bool WantFullRebuild; /* original C++ signature */
  2956. want_full_rebuild: bool
  2957. # ImGuiDockContext() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  2958. def __init__(self) -> None:
  2959. pass
  2960. # #endif
  2961. # -----------------------------------------------------------------------------
  2962. # [SECTION] Viewport support
  2963. # -----------------------------------------------------------------------------
  2964. class ViewportP:
  2965. """ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!)
  2966. Every instance of ImGuiViewport is in fact a ImGuiViewportP.
  2967. """
  2968. # ImGuiWindow* Window; /* original C++ signature */
  2969. window: Window # Set when the viewport is owned by a window (and ImGuiViewportFlags_CanHostOtherWindows is NOT set)
  2970. # int Idx; /* original C++ signature */
  2971. idx: int
  2972. # int LastFrameActive; /* original C++ signature */
  2973. last_frame_active: int # Last frame number this viewport was activated by a window
  2974. # int LastFocusedStampCount; /* original C++ signature */
  2975. last_focused_stamp_count: int # Last stamp number from when a window hosted by this viewport was focused (by comparing this value between two viewport we have an implicit viewport z-order we use as fallback)
  2976. # ImGuiID LastNameHash; /* original C++ signature */
  2977. last_name_hash: ID
  2978. # ImVec2 LastPos; /* original C++ signature */
  2979. last_pos: ImVec2
  2980. # ImVec2 LastSize; /* original C++ signature */
  2981. last_size: ImVec2
  2982. # float Alpha; /* original C++ signature */
  2983. alpha: float # Window opacity (when dragging dockable windows/viewports we make them transparent)
  2984. # float LastAlpha; /* original C++ signature */
  2985. last_alpha: float
  2986. # bool LastFocusedHadNavWindow; /* original C++ signature */
  2987. last_focused_had_nav_window: bool # Instead of maintaining a LastFocusedWindow (which may harder to correctly maintain), we merely store weither NavWindow != None last time the viewport was focused.
  2988. # short PlatformMonitor; /* original C++ signature */
  2989. platform_monitor: int
  2990. # float BgFgDrawListsLastTimeActive[2]; /* original C++ signature */
  2991. bg_fg_draw_lists_last_time_active: (
  2992. np.ndarray
  2993. ) # ndarray[type=float, size=2] # Last frame number the background (0) and foreground (1) draw lists were used
  2994. # ImDrawData DrawDataP; /* original C++ signature */
  2995. draw_data_p: ImDrawData
  2996. # ImDrawDataBuilder DrawDataBuilder; /* original C++ signature */
  2997. draw_data_builder: ImDrawDataBuilder # Temporary data while building final ImDrawData
  2998. # ImVec2 LastPlatformPos; /* original C++ signature */
  2999. last_platform_pos: ImVec2
  3000. # ImVec2 LastPlatformSize; /* original C++ signature */
  3001. last_platform_size: ImVec2
  3002. # ImVec2 LastRendererSize; /* original C++ signature */
  3003. last_renderer_size: ImVec2
  3004. # Per-viewport work area
  3005. # - Insets are >= 0.0 values, distance from viewport corners to work area.
  3006. # - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents.
  3007. # - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land.
  3008. # ImVec2 WorkInsetMin; /* original C++ signature */
  3009. work_inset_min: ImVec2 # Work Area inset locked for the frame. GetWorkRect() always fits within GetMainRect().
  3010. # ImVec2 WorkInsetMax; /* original C++ signature */
  3011. work_inset_max: ImVec2 # "
  3012. # ImVec2 BuildWorkInsetMin; /* original C++ signature */
  3013. build_work_inset_min: ImVec2 # Work Area inset accumulator for current frame, to become next frame's WorkInset
  3014. # ImVec2 BuildWorkInsetMax; /* original C++ signature */
  3015. build_work_inset_max: ImVec2 # "
  3016. # ImGuiViewportP() { Window = NULL; Idx = -1; LastFrameActive = LastFocusedStampCount = -1; BgFgDrawListsLastTimeActive[0] = BgFgDrawListsLastTimeActive[1] = -1.0f; LastNameHash = 0; Alpha = LastAlpha = 1.0f; LastFocusedHadNavWindow = false; PlatformMonitor = -1; BgFgDrawLists[0] = BgFgDrawLists[1] = NULL; LastPlatformPos = LastPlatformSize = LastRendererSize = ImVec2(FLT_MAX, FLT_MAX); } /* original C++ signature */
  3017. def __init__(self) -> None:
  3018. pass
  3019. # void ClearRequestFlags() { PlatformRequestClose = PlatformRequestMove = PlatformRequestResize = false; } /* original C++ signature */
  3020. def clear_request_flags(self) -> None:
  3021. """(private API)"""
  3022. pass
  3023. # Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last frame data, and 1 pair for currently building rect)
  3024. # ImVec2 CalcWorkRectPos(const ImVec2& inset_min) const { return ImVec2(Pos.x + inset_min.x, Pos.y + inset_min.y); } /* original C++ signature */
  3025. def calc_work_rect_pos(self, inset_min: ImVec2Like) -> ImVec2:
  3026. """(private API)"""
  3027. pass
  3028. # ImVec2 CalcWorkRectSize(const ImVec2& inset_min, const ImVec2& inset_max) const { return ImVec2(ImMax(0.0f, Size.x - inset_min.x - inset_max.x), ImMax(0.0f, Size.y - inset_min.y - inset_max.y)); } /* original C++ signature */
  3029. def calc_work_rect_size(self, inset_min: ImVec2Like, inset_max: ImVec2Like) -> ImVec2:
  3030. """(private API)"""
  3031. pass
  3032. # void UpdateWorkRect() { WorkPos = CalcWorkRectPos(WorkInsetMin); WorkSize = CalcWorkRectSize(WorkInsetMin, WorkInsetMax); } /* original C++ signature */
  3033. def update_work_rect(self) -> None:
  3034. """(private API)
  3035. Update public fields
  3036. """
  3037. pass
  3038. # Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, hence the code asymmetry)
  3039. # ImRect GetMainRect() const { return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); } /* original C++ signature */
  3040. def get_main_rect(self) -> ImRect:
  3041. """(private API)"""
  3042. pass
  3043. # ImRect GetWorkRect() const { return ImRect(WorkPos.x, WorkPos.y, WorkPos.x + WorkSize.x, WorkPos.y + WorkSize.y); } /* original C++ signature */
  3044. def get_work_rect(self) -> ImRect:
  3045. """(private API)"""
  3046. pass
  3047. # ImRect GetBuildWorkRect() const { ImVec2 pos = CalcWorkRectPos(BuildWorkInsetMin); ImVec2 size = CalcWorkRectSize(BuildWorkInsetMin, BuildWorkInsetMax); return ImRect(pos.x, pos.y, pos.x + size.x, pos.y + size.y); } /* original C++ signature */
  3048. def get_build_work_rect(self) -> ImRect:
  3049. """(private API)"""
  3050. pass
  3051. # -----------------------------------------------------------------------------
  3052. # [SECTION] Settings support
  3053. # -----------------------------------------------------------------------------
  3054. class WindowSettings:
  3055. """Windows data saved in imgui.ini file
  3056. Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily.
  3057. (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure)
  3058. """
  3059. # ImGuiID ID; /* original C++ signature */
  3060. id_: ID
  3061. # ImVec2ih Pos; /* original C++ signature */
  3062. pos: ImVec2ih # NB: Settings position are stored RELATIVE to the viewport! Whereas runtime ones are absolute positions.
  3063. # ImVec2ih Size; /* original C++ signature */
  3064. size: ImVec2ih
  3065. # ImVec2ih ViewportPos; /* original C++ signature */
  3066. viewport_pos: ImVec2ih
  3067. # ImGuiID ViewportId; /* original C++ signature */
  3068. viewport_id: ID
  3069. # ImGuiID DockId; /* original C++ signature */
  3070. dock_id: ID # ID of last known DockNode (even if the DockNode is invisible because it has only 1 active window), or 0 if none.
  3071. # ImGuiID ClassId; /* original C++ signature */
  3072. class_id: ID # ID of window class if specified
  3073. # short DockOrder; /* original C++ signature */
  3074. dock_order: int # Order of the last time the window was visible within its DockNode. This is used to reorder windows that are reappearing on the same frame. Same value between windows that were active and windows that were none are possible.
  3075. # bool Collapsed; /* original C++ signature */
  3076. collapsed: bool
  3077. # bool IsChild; /* original C++ signature */
  3078. is_child: bool
  3079. # bool WantApply; /* original C++ signature */
  3080. want_apply: (
  3081. bool # Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
  3082. )
  3083. # bool WantDelete; /* original C++ signature */
  3084. want_delete: bool # Set to invalidate/delete the settings entry
  3085. # ImGuiWindowSettings() { memset((void*)this, 0, sizeof(*this)); DockOrder = -1; } /* original C++ signature */
  3086. def __init__(self) -> None:
  3087. pass
  3088. # [ADAPT_IMGUI_BUNDLE]
  3089. # #ifdef IMGUI_BUNDLE_PYTHON_API
  3090. #
  3091. # std::string GetNameStr() { return std::string((const char*)(this + 1)); } /* original C++ signature */
  3092. def get_name_str(self) -> str:
  3093. """(private API)"""
  3094. pass
  3095. # #endif
  3096. #
  3097. # [/ADAPT_IMGUI_BUNDLE]
  3098. class SettingsHandler:
  3099. # const char* TypeName; /* original C++ signature */
  3100. type_name: str # Short description stored in .ini file. Disallowed characters: '[' ']' # (const)
  3101. # ImGuiID TypeHash; /* original C++ signature */
  3102. type_hash: ID # == ImHashStr(TypeName)
  3103. # void* UserData; /* original C++ signature */
  3104. user_data: Any
  3105. # ImGuiSettingsHandler() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  3106. def __init__(self) -> None:
  3107. pass
  3108. # -----------------------------------------------------------------------------
  3109. # [SECTION] Localization support
  3110. # -----------------------------------------------------------------------------
  3111. class LocKey(enum.IntFlag):
  3112. """This is experimental and not officially supported, it'll probably fall short of features, if/when it does we may backtrack."""
  3113. # ImGuiLocKey_VersionStr, /* original C++ signature */
  3114. version_str = enum.auto() # (= 0)
  3115. # ImGuiLocKey_TableSizeOne, /* original C++ signature */
  3116. table_size_one = enum.auto() # (= 1)
  3117. # ImGuiLocKey_TableSizeAllFit, /* original C++ signature */
  3118. table_size_all_fit = enum.auto() # (= 2)
  3119. # ImGuiLocKey_TableSizeAllDefault, /* original C++ signature */
  3120. table_size_all_default = enum.auto() # (= 3)
  3121. # ImGuiLocKey_TableResetOrder, /* original C++ signature */
  3122. table_reset_order = enum.auto() # (= 4)
  3123. # ImGuiLocKey_WindowingMainMenuBar, /* original C++ signature */
  3124. windowing_main_menu_bar = enum.auto() # (= 5)
  3125. # ImGuiLocKey_WindowingPopup, /* original C++ signature */
  3126. windowing_popup = enum.auto() # (= 6)
  3127. # ImGuiLocKey_WindowingUntitled, /* original C++ signature */
  3128. windowing_untitled = enum.auto() # (= 7)
  3129. # ImGuiLocKey_OpenLink_s, /* original C++ signature */
  3130. open_link_s = enum.auto() # (= 8)
  3131. # ImGuiLocKey_CopyLink, /* original C++ signature */
  3132. copy_link = enum.auto() # (= 9)
  3133. # ImGuiLocKey_DockingHideTabBar, /* original C++ signature */
  3134. docking_hide_tab_bar = enum.auto() # (= 10)
  3135. # ImGuiLocKey_DockingHoldShiftToDock, /* original C++ signature */
  3136. docking_hold_shift_to_dock = enum.auto() # (= 11)
  3137. # ImGuiLocKey_DockingDragToUndockOrMoveNode, /* original C++ signature */
  3138. docking_drag_to_undock_or_move_node = enum.auto() # (= 12)
  3139. # ImGuiLocKey_COUNT /* original C++ signature */
  3140. # }
  3141. count = enum.auto() # (= 13)
  3142. class LocEntry:
  3143. # ImGuiLocKey Key; /* original C++ signature */
  3144. key: LocKey
  3145. # const char* Text; /* original C++ signature */
  3146. text: str # (const)
  3147. # ImGuiLocEntry(ImGuiLocKey Key = ImGuiLocKey()); /* original C++ signature */
  3148. def __init__(self, key: LocKey = LocKey()) -> None:
  3149. """Auto-generated default constructor with named params"""
  3150. pass
  3151. # -----------------------------------------------------------------------------
  3152. # [SECTION] Error handling, State recovery support
  3153. # -----------------------------------------------------------------------------
  3154. # Macros used by Recoverable Error handling
  3155. # - Only dispatch error if _EXPR: evaluate as assert (similar to an assert macro).
  3156. # - The message will always be a string literal, in order to increase likelihood of being display by an assert handler.
  3157. # - See 'Demo->Configuration->Error Handling' and ImGuiIO definitions for details on error handling.
  3158. # - Read https://github.com/ocornut/imgui/wiki/Error-Handling for details on error handling.
  3159. # The error callback is currently not public, as it is expected that only advanced users will rely on it.
  3160. # -----------------------------------------------------------------------------
  3161. # [SECTION] Metrics, Debug Tools
  3162. # -----------------------------------------------------------------------------
  3163. class DebugLogFlags_(enum.IntFlag):
  3164. """See IMGUI_DEBUG_LOG() and IMGUI_DEBUG_LOG_XXX() macros."""
  3165. # Event types
  3166. # ImGuiDebugLogFlags_None = 0, /* original C++ signature */
  3167. none = enum.auto() # (= 0)
  3168. # ImGuiDebugLogFlags_EventError = 1 << 0, /* original C++ signature */
  3169. event_error = enum.auto() # (= 1 << 0) # Error submitted by IM_ASSERT_USER_ERROR()
  3170. # ImGuiDebugLogFlags_EventActiveId = 1 << 1, /* original C++ signature */
  3171. event_active_id = enum.auto() # (= 1 << 1)
  3172. # ImGuiDebugLogFlags_EventFocus = 1 << 2, /* original C++ signature */
  3173. event_focus = enum.auto() # (= 1 << 2)
  3174. # ImGuiDebugLogFlags_EventPopup = 1 << 3, /* original C++ signature */
  3175. event_popup = enum.auto() # (= 1 << 3)
  3176. # ImGuiDebugLogFlags_EventNav = 1 << 4, /* original C++ signature */
  3177. event_nav = enum.auto() # (= 1 << 4)
  3178. # ImGuiDebugLogFlags_EventClipper = 1 << 5, /* original C++ signature */
  3179. event_clipper = enum.auto() # (= 1 << 5)
  3180. # ImGuiDebugLogFlags_EventSelection = 1 << 6, /* original C++ signature */
  3181. event_selection = enum.auto() # (= 1 << 6)
  3182. # ImGuiDebugLogFlags_EventIO = 1 << 7, /* original C++ signature */
  3183. event_io = enum.auto() # (= 1 << 7)
  3184. # ImGuiDebugLogFlags_EventFont = 1 << 8, /* original C++ signature */
  3185. event_font = enum.auto() # (= 1 << 8)
  3186. # ImGuiDebugLogFlags_EventInputRouting = 1 << 9, /* original C++ signature */
  3187. event_input_routing = enum.auto() # (= 1 << 9)
  3188. # ImGuiDebugLogFlags_EventDocking = 1 << 10, /* original C++ signature */
  3189. event_docking = enum.auto() # (= 1 << 10)
  3190. # ImGuiDebugLogFlags_EventViewport = 1 << 11, /* original C++ signature */
  3191. event_viewport = enum.auto() # (= 1 << 11)
  3192. # ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventError | ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventFont | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, /* original C++ signature */
  3193. event_mask_ = (
  3194. enum.auto()
  3195. ) # (= DebugLogFlags_EventError | DebugLogFlags_EventActiveId | DebugLogFlags_EventFocus | DebugLogFlags_EventPopup | DebugLogFlags_EventNav | DebugLogFlags_EventClipper | DebugLogFlags_EventSelection | DebugLogFlags_EventIO | DebugLogFlags_EventFont | DebugLogFlags_EventInputRouting | DebugLogFlags_EventDocking | DebugLogFlags_EventViewport)
  3196. # ImGuiDebugLogFlags_OutputToTTY = 1 << 20, /* original C++ signature */
  3197. output_to_tty = enum.auto() # (= 1 << 20) # Also send output to TTY
  3198. # ImGuiDebugLogFlags_OutputToDebugger = 1 << 21, /* original C++ signature */
  3199. output_to_debugger = enum.auto() # (= 1 << 21) # Also send output to Debugger Console [Windows only]
  3200. # ImGuiDebugLogFlags_OutputToTestEngine = 1 << 22, /* original C++ signature */
  3201. output_to_test_engine = enum.auto() # (= 1 << 22) # Also send output to Dear ImGui Test Engine
  3202. class DebugAllocEntry:
  3203. # int FrameCount; /* original C++ signature */
  3204. frame_count: int
  3205. # ImS16 AllocCount; /* original C++ signature */
  3206. alloc_count: ImS16
  3207. # ImS16 FreeCount; /* original C++ signature */
  3208. free_count: ImS16
  3209. # ImGuiDebugAllocEntry(int FrameCount = int(), ImS16 AllocCount = ImS16(), ImS16 FreeCount = ImS16()); /* original C++ signature */
  3210. def __init__(self, frame_count: int = int(), alloc_count: ImS16 = ImS16(), free_count: ImS16 = ImS16()) -> None:
  3211. """Auto-generated default constructor with named params"""
  3212. pass
  3213. class DebugAllocInfo:
  3214. # int TotalAllocCount; /* original C++ signature */
  3215. total_alloc_count: int # Number of call to MemAlloc().
  3216. # int TotalFreeCount; /* original C++ signature */
  3217. total_free_count: int
  3218. # ImS16 LastEntriesIdx; /* original C++ signature */
  3219. last_entries_idx: ImS16 # Current index in buffer
  3220. # ImGuiDebugAllocInfo() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  3221. def __init__(self) -> None:
  3222. pass
  3223. class MetricsConfig:
  3224. # bool ShowDebugLog = false; /* original C++ signature */
  3225. show_debug_log: bool = False
  3226. # bool ShowIDStackTool = false; /* original C++ signature */
  3227. show_id_stack_tool: bool = False
  3228. # bool ShowWindowsRects = false; /* original C++ signature */
  3229. show_windows_rects: bool = False
  3230. # bool ShowWindowsBeginOrder = false; /* original C++ signature */
  3231. show_windows_begin_order: bool = False
  3232. # bool ShowTablesRects = false; /* original C++ signature */
  3233. show_tables_rects: bool = False
  3234. # bool ShowDrawCmdMesh = true; /* original C++ signature */
  3235. show_draw_cmd_mesh: bool = True
  3236. # bool ShowDrawCmdBoundingBoxes = true; /* original C++ signature */
  3237. show_draw_cmd_bounding_boxes: bool = True
  3238. # bool ShowTextEncodingViewer = false; /* original C++ signature */
  3239. show_text_encoding_viewer: bool = False
  3240. # bool ShowTextureUsedRect = false; /* original C++ signature */
  3241. show_texture_used_rect: bool = False
  3242. # bool ShowDockingNodes = false; /* original C++ signature */
  3243. show_docking_nodes: bool = False
  3244. # int ShowWindowsRectsType = -1; /* original C++ signature */
  3245. show_windows_rects_type: int = -1
  3246. # int ShowTablesRectsType = -1; /* original C++ signature */
  3247. show_tables_rects_type: int = -1
  3248. # int HighlightMonitorIdx = -1; /* original C++ signature */
  3249. highlight_monitor_idx: int = -1
  3250. # ImGuiID HighlightViewportID = 0; /* original C++ signature */
  3251. highlight_viewport_id: ID = 0
  3252. # bool ShowFontPreview = true; /* original C++ signature */
  3253. show_font_preview: bool = True
  3254. # ImGuiMetricsConfig(bool ShowDebugLog = false, bool ShowIDStackTool = false, bool ShowWindowsRects = false, bool ShowWindowsBeginOrder = false, bool ShowTablesRects = false, bool ShowDrawCmdMesh = true, bool ShowDrawCmdBoundingBoxes = true, bool ShowTextEncodingViewer = false, bool ShowTextureUsedRect = false, bool ShowDockingNodes = false, int ShowWindowsRectsType = -1, int ShowTablesRectsType = -1, int HighlightMonitorIdx = -1, ImGuiID HighlightViewportID = 0, bool ShowFontPreview = true); /* original C++ signature */
  3255. def __init__(
  3256. self,
  3257. show_debug_log: bool = False,
  3258. show_id_stack_tool: bool = False,
  3259. show_windows_rects: bool = False,
  3260. show_windows_begin_order: bool = False,
  3261. show_tables_rects: bool = False,
  3262. show_draw_cmd_mesh: bool = True,
  3263. show_draw_cmd_bounding_boxes: bool = True,
  3264. show_text_encoding_viewer: bool = False,
  3265. show_texture_used_rect: bool = False,
  3266. show_docking_nodes: bool = False,
  3267. show_windows_rects_type: int = -1,
  3268. show_tables_rects_type: int = -1,
  3269. highlight_monitor_idx: int = -1,
  3270. highlight_viewport_id: ID = 0,
  3271. show_font_preview: bool = True,
  3272. ) -> None:
  3273. """Auto-generated default constructor with named params"""
  3274. pass
  3275. class StackLevelInfo:
  3276. # ImGuiID ID; /* original C++ signature */
  3277. id_: ID
  3278. # ImS8 QueryFrameCount; /* original C++ signature */
  3279. query_frame_count: ImS8 # >= 1: Sub-query in progress
  3280. # bool QuerySuccess; /* original C++ signature */
  3281. query_success: bool # Sub-query obtained result from DebugHookIdInfo()
  3282. # ImS8 DataType; /* original C++ signature */
  3283. data_type: ImS8 # ImGuiDataType
  3284. # int DescOffset; /* original C++ signature */
  3285. desc_offset: int # -1 or offset into parent's ResultsPathsBuf
  3286. # ImGuiStackLevelInfo() { memset((void*)this, 0, sizeof(*this)); DataType = -1; DescOffset = -1; } /* original C++ signature */
  3287. def __init__(self) -> None:
  3288. pass
  3289. class DebugItemPathQuery:
  3290. # ImGuiID MainID; /* original C++ signature */
  3291. main_id: ID # ID to query details for.
  3292. # bool Active; /* original C++ signature */
  3293. active: bool # Used to disambiguate the case when ID == 0 and e.g. some code calls PushOverrideID(0).
  3294. # bool Complete; /* original C++ signature */
  3295. complete: bool # All sub-queries are finished (some may have failed).
  3296. # ImS8 Step; /* original C++ signature */
  3297. step: ImS8 # -1: query stack + init Results, >= 0: filling individual stack level.
  3298. # ImVector<ImGuiStackLevelInfo> Results; /* original C++ signature */
  3299. results: ImVector_StackLevelInfo
  3300. # ImGuiTextBuffer ResultsDescBuf; /* original C++ signature */
  3301. results_desc_buf: TextBuffer
  3302. # ImGuiTextBuffer ResultPathBuf; /* original C++ signature */
  3303. result_path_buf: TextBuffer
  3304. # ImGuiDebugItemPathQuery() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  3305. def __init__(self) -> None:
  3306. pass
  3307. class IDStackTool:
  3308. """State for ID Stack tool queries"""
  3309. # bool OptHexEncodeNonAsciiChars; /* original C++ signature */
  3310. opt_hex_encode_non_ascii_chars: bool
  3311. # bool OptCopyToClipboardOnCtrlC; /* original C++ signature */
  3312. opt_copy_to_clipboard_on_ctrl_c: bool
  3313. # int LastActiveFrame; /* original C++ signature */
  3314. last_active_frame: int
  3315. # float CopyToClipboardLastTime; /* original C++ signature */
  3316. copy_to_clipboard_last_time: float
  3317. # ImGuiIDStackTool() { memset((void*)this, 0, sizeof(*this)); LastActiveFrame = -1; OptHexEncodeNonAsciiChars = true; CopyToClipboardLastTime = -FLT_MAX; } /* original C++ signature */
  3318. def __init__(self) -> None:
  3319. pass
  3320. # -----------------------------------------------------------------------------
  3321. # [SECTION] Generic context hooks
  3322. # -----------------------------------------------------------------------------
  3323. class ContextHookType(enum.IntFlag):
  3324. """[ADAPT_IMGUI_BUNDLE]: added ImGuiContextHookType_BeginWindow, ImGuiContextHookType_EndWindow, cf https://github.com/thedmd/imgui-node-editor/issues/242#issuecomment-1681806764"""
  3325. # ImGuiContextHookType_NewFramePre, /* original C++ signature */
  3326. new_frame_pre = enum.auto() # (= 0)
  3327. # ImGuiContextHookType_NewFramePost, /* original C++ signature */
  3328. new_frame_post = enum.auto() # (= 1)
  3329. # ImGuiContextHookType_EndFramePre, /* original C++ signature */
  3330. end_frame_pre = enum.auto() # (= 2)
  3331. # ImGuiContextHookType_EndFramePost, /* original C++ signature */
  3332. end_frame_post = enum.auto() # (= 3)
  3333. # ImGuiContextHookType_RenderPre, /* original C++ signature */
  3334. render_pre = enum.auto() # (= 4)
  3335. # ImGuiContextHookType_RenderPost, /* original C++ signature */
  3336. render_post = enum.auto() # (= 5)
  3337. # ImGuiContextHookType_Shutdown, /* original C++ signature */
  3338. shutdown = enum.auto() # (= 6)
  3339. # ImGuiContextHookType_PendingRemoval_, /* original C++ signature */
  3340. pending_removal_ = enum.auto() # (= 7)
  3341. # ImGuiContextHookType_BeginWindow, /* original C++ signature */
  3342. begin_window = enum.auto() # (= 8)
  3343. # ImGuiContextHookType_EndWindow } /* original C++ signature */
  3344. end_window = enum.auto() # (= 9)
  3345. class ContextHook:
  3346. # ImGuiID HookId; /* original C++ signature */
  3347. hook_id: ID # A unique ID assigned by AddContextHook()
  3348. # ImGuiContextHookType Type; /* original C++ signature */
  3349. type: ContextHookType
  3350. # ImGuiID Owner; /* original C++ signature */
  3351. owner: ID
  3352. # void* UserData; /* original C++ signature */
  3353. user_data: Any
  3354. # ImGuiContextHook() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  3355. def __init__(self) -> None:
  3356. pass
  3357. # -----------------------------------------------------------------------------
  3358. # [SECTION] ImGuiContext (main Dear ImGui context)
  3359. # -----------------------------------------------------------------------------
  3360. class Context:
  3361. # bool Initialized; /* original C++ signature */
  3362. initialized: bool
  3363. # bool WithinFrameScope; /* original C++ signature */
  3364. within_frame_scope: bool # Set by NewFrame(), cleared by EndFrame()
  3365. # bool WithinFrameScopeWithImplicitWindow; /* original C++ signature */
  3366. within_frame_scope_with_implicit_window: (
  3367. bool # Set by NewFrame(), cleared by EndFrame() when the implicit debug window has been pushed
  3368. )
  3369. # bool TestEngineHookItems; /* original C++ signature */
  3370. test_engine_hook_items: bool # Will call test engine hooks: ImGuiTestEngineHook_ItemAdd(), ImGuiTestEngineHook_ItemInfo(), ImGuiTestEngineHook_Log()
  3371. # int FrameCount; /* original C++ signature */
  3372. frame_count: int
  3373. # int FrameCountEnded; /* original C++ signature */
  3374. frame_count_ended: int
  3375. # int FrameCountPlatformEnded; /* original C++ signature */
  3376. frame_count_platform_ended: int
  3377. # int FrameCountRendered; /* original C++ signature */
  3378. frame_count_rendered: int
  3379. # double Time; /* original C++ signature */
  3380. time: float
  3381. # ImGuiIO IO; /* original C++ signature */
  3382. io: IO
  3383. # ImGuiPlatformIO PlatformIO; /* original C++ signature */
  3384. platform_io: PlatformIO
  3385. # ImGuiStyle Style; /* original C++ signature */
  3386. style: Style
  3387. # ImGuiConfigFlags ConfigFlagsCurrFrame; /* original C++ signature */
  3388. config_flags_curr_frame: ConfigFlags # = g.IO.ConfigFlags at the time of NewFrame()
  3389. # ImGuiConfigFlags ConfigFlagsLastFrame; /* original C++ signature */
  3390. config_flags_last_frame: ConfigFlags
  3391. # ImFont* Font; /* original C++ signature */
  3392. font: ImFont # Currently bound font. (== FontStack.back().Font)
  3393. # ImFontBaked* FontBaked; /* original C++ signature */
  3394. font_baked: ImFontBaked # Currently bound font at currently bound size. (== Font->GetFontBaked(FontSize))
  3395. # float FontSize; /* original C++ signature */
  3396. font_size: float # Currently bound font size == line height (== FontSizeBase + externals scales applied in the UpdateCurrentFontSize() function).
  3397. # float FontSizeBase; /* original C++ signature */
  3398. font_size_base: (
  3399. float # Font size before scaling == style.FontSizeBase == value passed to PushFont() when specified.
  3400. )
  3401. # float FontBakedScale; /* original C++ signature */
  3402. font_baked_scale: (
  3403. float # == FontBaked->Size / FontSize. Scale factor over baked size. Rarely used nowadays, very often == 1.0.
  3404. )
  3405. # float FontRasterizerDensity; /* original C++ signature */
  3406. font_rasterizer_density: float # Current font density. Used by all calls to GetFontBaked().
  3407. # float CurrentDpiScale; /* original C++ signature */
  3408. current_dpi_scale: float # Current window/viewport DpiScale == CurrentViewport->DpiScale
  3409. # ImDrawListSharedData DrawListSharedData; /* original C++ signature */
  3410. draw_list_shared_data: ImDrawListSharedData
  3411. # ImGuiID WithinEndChildID; /* original C++ signature */
  3412. within_end_child_id: ID # Set within EndChild()
  3413. # ImGuiID WithinEndPopupID; /* original C++ signature */
  3414. within_end_popup_id: ID # Set within EndPopup()
  3415. # void* TestEngine; /* original C++ signature */
  3416. test_engine: Any # Test engine user data
  3417. # Inputs
  3418. # ImVector<ImGuiInputEvent> InputEventsQueue; /* original C++ signature */
  3419. input_events_queue: ImVector_InputEvent # Input events which will be trickled/written into IO structure.
  3420. # ImVector<ImGuiInputEvent> InputEventsTrail; /* original C++ signature */
  3421. input_events_trail: ImVector_InputEvent # Past input events processed in NewFrame(). This is to allow domain-specific application to access e.g mouse/pen trail.
  3422. # ImGuiMouseSource InputEventsNextMouseSource; /* original C++ signature */
  3423. input_events_next_mouse_source: MouseSource
  3424. # ImU32 InputEventsNextEventId; /* original C++ signature */
  3425. input_events_next_event_id: ImU32
  3426. # Windows state
  3427. # ImVector<ImGuiWindow*> Windows; /* original C++ signature */
  3428. windows: ImVector_Window_ptr # Windows, sorted in display order, back to front
  3429. # ImVector<ImGuiWindow*> WindowsFocusOrder; /* original C++ signature */
  3430. windows_focus_order: ImVector_Window_ptr # Root windows, sorted in focus order, back to front.
  3431. # ImVector<ImGuiWindow*> WindowsTempSortBuffer; /* original C++ signature */
  3432. windows_temp_sort_buffer: ImVector_Window_ptr # Temporary buffer used in EndFrame() to reorder windows so parents are kept before their child
  3433. # ImVector<ImGuiWindowStackData> CurrentWindowStack; /* original C++ signature */
  3434. current_window_stack: ImVector_WindowStackData
  3435. # ImGuiStorage WindowsById; /* original C++ signature */
  3436. windows_by_id: Storage # Map window's ImGuiID to ImGuiWindow*
  3437. # int WindowsActiveCount; /* original C++ signature */
  3438. windows_active_count: int # Number of unique windows submitted by frame
  3439. # float WindowsBorderHoverPadding; /* original C++ signature */
  3440. windows_border_hover_padding: float # Padding around resizable windows for which hovering on counts as hovering the window == ImMax(style.TouchExtraPadding, style.WindowBorderHoverPadding). This isn't so multi-dpi friendly.
  3441. # ImGuiID DebugBreakInWindow; /* original C++ signature */
  3442. debug_break_in_window: ID # Set to break in Begin() call.
  3443. # ImGuiWindow* CurrentWindow; /* original C++ signature */
  3444. current_window: Window # Window being drawn into
  3445. # ImGuiWindow* HoveredWindow; /* original C++ signature */
  3446. hovered_window: Window # Window the mouse is hovering. Will typically catch mouse inputs.
  3447. # ImGuiWindow* HoveredWindowUnderMovingWindow; /* original C++ signature */
  3448. hovered_window_under_moving_window: Window # Hovered window ignoring MovingWindow. Only set if MovingWindow is set.
  3449. # ImGuiWindow* HoveredWindowBeforeClear; /* original C++ signature */
  3450. hovered_window_before_clear: Window # Window the mouse is hovering. Filled even with _NoMouse. This is currently useful for multi-context compositors.
  3451. # ImGuiWindow* MovingWindow; /* original C++ signature */
  3452. moving_window: Window # Track the window we clicked on (in order to preserve focus). The actual window that is moved is generally MovingWindow->RootWindowDockTree.
  3453. # ImGuiWindow* WheelingWindow; /* original C++ signature */
  3454. wheeling_window: Window # Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
  3455. # ImVec2 WheelingWindowRefMousePos; /* original C++ signature */
  3456. wheeling_window_ref_mouse_pos: ImVec2
  3457. # int WheelingWindowStartFrame; /* original C++ signature */
  3458. wheeling_window_start_frame: int # This may be set one frame before WheelingWindow is != None
  3459. # int WheelingWindowScrolledFrame; /* original C++ signature */
  3460. wheeling_window_scrolled_frame: int
  3461. # float WheelingWindowReleaseTimer; /* original C++ signature */
  3462. wheeling_window_release_timer: float
  3463. # ImVec2 WheelingWindowWheelRemainder; /* original C++ signature */
  3464. wheeling_window_wheel_remainder: ImVec2
  3465. # ImVec2 WheelingAxisAvg; /* original C++ signature */
  3466. wheeling_axis_avg: ImVec2
  3467. # Item/widgets state and tracking information
  3468. # ImGuiID DebugDrawIdConflictsId; /* original C++ signature */
  3469. debug_draw_id_conflicts_id: ID # Set when we detect multiple items with the same identifier
  3470. # ImGuiID DebugHookIdInfoId; /* original C++ signature */
  3471. debug_hook_id_info_id: ID # Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
  3472. # ImGuiID HoveredId; /* original C++ signature */
  3473. hovered_id: ID # Hovered widget, filled during the frame
  3474. # ImGuiID HoveredIdPreviousFrame; /* original C++ signature */
  3475. hovered_id_previous_frame: ID
  3476. # int HoveredIdPreviousFrameItemCount; /* original C++ signature */
  3477. hovered_id_previous_frame_item_count: int # Count numbers of items using the same ID as last frame's hovered id
  3478. # float HoveredIdTimer; /* original C++ signature */
  3479. hovered_id_timer: float # Measure contiguous hovering time
  3480. # float HoveredIdNotActiveTimer; /* original C++ signature */
  3481. hovered_id_not_active_timer: float # Measure contiguous hovering time where the item has not been active
  3482. # bool HoveredIdAllowOverlap; /* original C++ signature */
  3483. hovered_id_allow_overlap: bool
  3484. # bool HoveredIdIsDisabled; /* original C++ signature */
  3485. hovered_id_is_disabled: bool # At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be True even if HoveredId == 0.
  3486. # bool ItemUnclipByLog; /* original C++ signature */
  3487. item_unclip_by_log: bool # Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled
  3488. # ImGuiID ActiveId; /* original C++ signature */
  3489. active_id: ID # Active widget
  3490. # ImGuiID ActiveIdIsAlive; /* original C++ signature */
  3491. active_id_is_alive: (
  3492. ID # Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
  3493. )
  3494. # float ActiveIdTimer; /* original C++ signature */
  3495. active_id_timer: float
  3496. # bool ActiveIdIsJustActivated; /* original C++ signature */
  3497. active_id_is_just_activated: bool # Set at the time of activation for one frame
  3498. # bool ActiveIdAllowOverlap; /* original C++ signature */
  3499. active_id_allow_overlap: bool # Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
  3500. # bool ActiveIdNoClearOnFocusLoss; /* original C++ signature */
  3501. active_id_no_clear_on_focus_loss: bool # Disable losing active id if the active id window gets unfocused.
  3502. # bool ActiveIdHasBeenPressedBefore; /* original C++ signature */
  3503. active_id_has_been_pressed_before: bool # Track whether the active id led to a press (this is to allow changing between PressOnClick and PressOnRelease without pressing twice). Used by range_select branch.
  3504. # bool ActiveIdHasBeenEditedBefore; /* original C++ signature */
  3505. active_id_has_been_edited_before: (
  3506. bool # Was the value associated to the widget Edited over the course of the Active state.
  3507. )
  3508. # bool ActiveIdHasBeenEditedThisFrame; /* original C++ signature */
  3509. active_id_has_been_edited_this_frame: bool
  3510. # bool ActiveIdFromShortcut; /* original C++ signature */
  3511. active_id_from_shortcut: bool
  3512. # ImS8 ActiveIdMouseButton; /* original C++ signature */
  3513. active_id_mouse_button: ImS8
  3514. # ImGuiID ActiveIdDisabledId; /* original C++ signature */
  3515. active_id_disabled_id: ID # When clicking a disabled item we set ActiveId=window->MoveId to avoid interference with widget code. Actual item ID is stored here.
  3516. # ImVec2 ActiveIdClickOffset; /* original C++ signature */
  3517. active_id_click_offset: (
  3518. ImVec2 # Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
  3519. )
  3520. # ImGuiInputSource ActiveIdSource; /* original C++ signature */
  3521. active_id_source: InputSource # Activating source: ImGuiInputSource_Mouse OR ImGuiInputSource_Keyboard OR ImGuiInputSource_Gamepad
  3522. # ImGuiWindow* ActiveIdWindow; /* original C++ signature */
  3523. active_id_window: Window
  3524. # ImGuiID ActiveIdPreviousFrame; /* original C++ signature */
  3525. active_id_previous_frame: ID
  3526. # ImGuiDeactivatedItemData DeactivatedItemData; /* original C++ signature */
  3527. deactivated_item_data: DeactivatedItemData
  3528. # ImGuiDataTypeStorage ActiveIdValueOnActivation; /* original C++ signature */
  3529. active_id_value_on_activation: DataTypeStorage # Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX.
  3530. # ImGuiID LastActiveId; /* original C++ signature */
  3531. last_active_id: ID # Store the last non-zero ActiveId, useful for animation.
  3532. # float LastActiveIdTimer; /* original C++ signature */
  3533. last_active_id_timer: (
  3534. float # Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
  3535. )
  3536. # Key/Input Ownership + Shortcut Routing system
  3537. # - The idea is that instead of "eating" a given key, we can link to an owner.
  3538. # - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID.
  3539. # - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame().
  3540. # double LastKeyModsChangeTime; /* original C++ signature */
  3541. last_key_mods_change_time: (
  3542. float # Record the last time key mods changed (affect repeat delay when using shortcut logic)
  3543. )
  3544. # double LastKeyModsChangeFromNoneTime; /* original C++ signature */
  3545. last_key_mods_change_from_none_time: (
  3546. float # Record the last time key mods changed away from being 0 (affect repeat delay when using shortcut logic)
  3547. )
  3548. # double LastKeyboardKeyPressTime; /* original C++ signature */
  3549. last_keyboard_key_press_time: float # Record the last time a keyboard key (ignore mouse/gamepad ones) was pressed.
  3550. # ImGuiKeyRoutingTable KeysRoutingTable; /* original C++ signature */
  3551. keys_routing_table: KeyRoutingTable
  3552. # ImU32 ActiveIdUsingNavDirMask; /* original C++ signature */
  3553. active_id_using_nav_dir_mask: ImU32 # Active widget will want to read those nav move requests (e.g. can activate a button and move away from it)
  3554. # bool ActiveIdUsingAllKeyboardKeys; /* original C++ signature */
  3555. active_id_using_all_keyboard_keys: bool # Active widget will want to read all keyboard keys inputs. (this is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations)
  3556. # ImGuiKeyChord DebugBreakInShortcutRouting; /* original C++ signature */
  3557. debug_break_in_shortcut_routing: KeyChord # Set to break in SetShortcutRouting()/Shortcut() calls.
  3558. # ImU32 ActiveIdUsingNavInputMask; // [OBSOLETE] Since (IMGUI_VERSION_NUM >= 18804) : 'g.ActiveIdUsingNavInputMask |= (1 << ImGuiNavInput_Cancel);' becomes --> 'SetKeyOwner(ImGuiKey_Escape, g.ActiveId) and/or SetKeyOwner(ImGuiKey_NavGamepadCancel, g.ActiveId);'
  3559. # Next window/item data
  3560. # ImGuiID CurrentFocusScopeId; /* original C++ signature */
  3561. current_focus_scope_id: ID # Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with g.NavFocusScopeId.
  3562. # ImGuiItemFlags CurrentItemFlags; /* original C++ signature */
  3563. current_item_flags: ItemFlags # Value for currently appending items == g.ItemFlagsStack.back()
  3564. # ImGuiID DebugLocateId; /* original C++ signature */
  3565. debug_locate_id: ID # Storage for DebugLocateItemOnHover() feature: this is read by ItemAdd() so we keep it in a hot/cached location
  3566. # ImGuiNextItemData NextItemData; /* original C++ signature */
  3567. next_item_data: NextItemData # Storage for SetNextItem** functions
  3568. # ImGuiLastItemData LastItemData; /* original C++ signature */
  3569. last_item_data: LastItemData # Storage for last submitted item (setup by ItemAdd)
  3570. # ImGuiNextWindowData NextWindowData; /* original C++ signature */
  3571. next_window_data: NextWindowData # Storage for SetNextWindow** functions
  3572. # bool DebugShowGroupRects; /* original C++ signature */
  3573. debug_show_group_rects: bool
  3574. # bool GcCompactAll; /* original C++ signature */
  3575. gc_compact_all: bool # Request full GC
  3576. # Shared stacks
  3577. # ImGuiCol DebugFlashStyleColorIdx; /* original C++ signature */
  3578. debug_flash_style_color_idx: Col # (Keep close to ColorStack to share cache line)
  3579. # ImVector<ImGuiColorMod> ColorStack; /* original C++ signature */
  3580. color_stack: ImVector_ColorMod # Stack for PushStyleColor()/PopStyleColor() - inherited by Begin()
  3581. # ImVector<ImGuiStyleMod> StyleVarStack; /* original C++ signature */
  3582. style_var_stack: ImVector_StyleMod # Stack for PushStyleVar()/PopStyleVar() - inherited by Begin()
  3583. # ImVector<ImGuiFocusScopeData> FocusScopeStack; /* original C++ signature */
  3584. focus_scope_stack: ImVector_FocusScopeData # Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin()
  3585. # ImVector<ImGuiItemFlags> ItemFlagsStack; /* original C++ signature */
  3586. item_flags_stack: ImVector_ItemFlags # Stack for PushItemFlag()/PopItemFlag() - inherited by Begin()
  3587. # ImVector<ImGuiGroupData> GroupStack; /* original C++ signature */
  3588. group_stack: ImVector_GroupData # Stack for BeginGroup()/EndGroup() - not inherited by Begin()
  3589. # ImVector<ImGuiPopupData> OpenPopupStack; /* original C++ signature */
  3590. open_popup_stack: ImVector_PopupData # Which popups are open (persistent)
  3591. # ImVector<ImGuiPopupData> BeginPopupStack; /* original C++ signature */
  3592. begin_popup_stack: ImVector_PopupData # Which level of BeginPopup() we are in (reset every frame)
  3593. # ImVector<ImGuiTreeNodeStackData>TreeNodeStack; /* original C++ signature */
  3594. tree_node_stack: ImVector_TreeNodeStackData # Stack for TreeNode()
  3595. # Viewports
  3596. # ImVector<ImGuiViewportP*> Viewports; /* original C++ signature */
  3597. viewports: ImVector_ViewportP_ptr # Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData.
  3598. # ImGuiViewportP* CurrentViewport; /* original C++ signature */
  3599. current_viewport: (
  3600. ViewportP # We track changes of viewport (happening in Begin) so we can call Platform_OnChangedViewport()
  3601. )
  3602. # ImGuiViewportP* MouseViewport; /* original C++ signature */
  3603. mouse_viewport: ViewportP
  3604. # ImGuiViewportP* MouseLastHoveredViewport; /* original C++ signature */
  3605. mouse_last_hovered_viewport: ViewportP # Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + honoring the _NoInputs flag.
  3606. # ImGuiID PlatformLastFocusedViewportId; /* original C++ signature */
  3607. platform_last_focused_viewport_id: ID
  3608. # ImGuiPlatformMonitor FallbackMonitor; /* original C++ signature */
  3609. fallback_monitor: (
  3610. PlatformMonitor # Virtual monitor used as fallback if backend doesn't provide monitor information.
  3611. )
  3612. # ImRect PlatformMonitorsFullWorkRect; /* original C++ signature */
  3613. platform_monitors_full_work_rect: ImRect # Bounding box of all platform monitors
  3614. # int ViewportCreatedCount; /* original C++ signature */
  3615. viewport_created_count: int # Unique sequential creation counter (mostly for testing/debugging)
  3616. # int PlatformWindowsCreatedCount; /* original C++ signature */
  3617. platform_windows_created_count: int # Unique sequential creation counter (mostly for testing/debugging)
  3618. # int ViewportFocusedStampCount; /* original C++ signature */
  3619. viewport_focused_stamp_count: (
  3620. int # Every time the front-most window changes, we stamp its viewport with an incrementing counter
  3621. )
  3622. # Keyboard/Gamepad Navigation
  3623. # bool NavCursorVisible; /* original C++ signature */
  3624. nav_cursor_visible: (
  3625. bool # Nav focus cursor/rectangle is visible? We hide it after a mouse click. We show it after a nav move.
  3626. )
  3627. # bool NavHighlightItemUnderNav; /* original C++ signature */
  3628. nav_highlight_item_under_nav: (
  3629. bool # Disable mouse hovering highlight. Highlight navigation focused item instead of mouse hovered item.
  3630. )
  3631. # bool NavDisableHighlight; // Old name for !g.NavCursorVisible before 1.91.4 (2024/10/18). OPPOSITE VALUE (g.NavDisableHighlight == !g.NavCursorVisible)
  3632. # bool NavDisableMouseHover; // Old name for g.NavHighlightItemUnderNav before 1.91.1 (2024/10/18) this was called When user starts using keyboard/gamepad, we hide mouse hovering highlight until mouse is touched again.
  3633. # bool NavMousePosDirty; /* original C++ signature */
  3634. nav_mouse_pos_dirty: (
  3635. bool # When set we will update mouse position if io.ConfigNavMoveSetMousePos is set (not enabled by default)
  3636. )
  3637. # bool NavIdIsAlive; /* original C++ signature */
  3638. nav_id_is_alive: bool # Nav widget has been seen this frame ~~ NavRectRel is valid
  3639. # ImGuiID NavId; /* original C++ signature */
  3640. nav_id: ID # Focused item for navigation
  3641. # ImGuiWindow* NavWindow; /* original C++ signature */
  3642. nav_window: Window # Focused window for navigation. Could be called 'FocusedWindow'
  3643. # ImGuiID NavFocusScopeId; /* original C++ signature */
  3644. nav_focus_scope_id: ID # Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of the same scope)
  3645. # ImGuiNavLayer NavLayer; /* original C++ signature */
  3646. nav_layer: NavLayer # Focused layer (main scrolling layer, or menu/title bar layer)
  3647. # ImGuiItemFlags NavIdItemFlags; /* original C++ signature */
  3648. nav_id_item_flags: ItemFlags
  3649. # ImGuiID NavActivateId; /* original C++ signature */
  3650. nav_activate_id: ID # ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItemByID()
  3651. # ImGuiID NavActivateDownId; /* original C++ signature */
  3652. nav_activate_down_id: ID # ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0
  3653. # ImGuiID NavActivatePressedId; /* original C++ signature */
  3654. nav_activate_pressed_id: ID # ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat)
  3655. # ImGuiActivateFlags NavActivateFlags; /* original C++ signature */
  3656. nav_activate_flags: ActivateFlags
  3657. # ImVector<ImGuiFocusScopeData> NavFocusRoute; /* original C++ signature */
  3658. nav_focus_route: ImVector_FocusScopeData # Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
  3659. # ImGuiID NavHighlightActivatedId; /* original C++ signature */
  3660. nav_highlight_activated_id: ID
  3661. # float NavHighlightActivatedTimer; /* original C++ signature */
  3662. nav_highlight_activated_timer: float
  3663. # ImGuiID NavOpenContextMenuItemId; /* original C++ signature */
  3664. nav_open_context_menu_item_id: ID
  3665. # ImGuiID NavOpenContextMenuWindowId; /* original C++ signature */
  3666. nav_open_context_menu_window_id: ID
  3667. # ImGuiID NavNextActivateId; /* original C++ signature */
  3668. nav_next_activate_id: ID # Set by ActivateItemByID(), queued until next frame.
  3669. # ImGuiActivateFlags NavNextActivateFlags; /* original C++ signature */
  3670. nav_next_activate_flags: ActivateFlags
  3671. # ImGuiInputSource NavInputSource; /* original C++ signature */
  3672. nav_input_source: (
  3673. InputSource # Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Gamepad
  3674. )
  3675. # ImGuiSelectionUserData NavLastValidSelectionUserData; /* original C++ signature */
  3676. nav_last_valid_selection_user_data: SelectionUserData # Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn't have selection data.
  3677. # ImS8 NavCursorHideFrames; /* original C++ signature */
  3678. nav_cursor_hide_frames: ImS8
  3679. # ImGuiID NavActivateInputId; // Removed in 1.89.4 (July 2023). This is now part of g.NavActivateId and sets g.NavActivateFlags |= ImGuiActivateFlags_PreferInput. See commit c9a53aa74, issue #5606.
  3680. # Navigation: Init & Move Requests
  3681. # bool NavAnyRequest; /* original C++ signature */
  3682. nav_any_request: bool # ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd()
  3683. # bool NavInitRequest; /* original C++ signature */
  3684. nav_init_request: bool # Init request for appearing window to select first item
  3685. # bool NavInitRequestFromMove; /* original C++ signature */
  3686. nav_init_request_from_move: bool
  3687. # ImGuiNavItemData NavInitResult; /* original C++ signature */
  3688. nav_init_result: (
  3689. NavItemData # Init request result (first item of the window, or one for which SetItemDefaultFocus() was called)
  3690. )
  3691. # bool NavMoveSubmitted; /* original C++ signature */
  3692. nav_move_submitted: bool # Move request submitted, will process result on next NewFrame()
  3693. # bool NavMoveScoringItems; /* original C++ signature */
  3694. nav_move_scoring_items: bool # Move request submitted, still scoring incoming items
  3695. # bool NavMoveForwardToNextFrame; /* original C++ signature */
  3696. nav_move_forward_to_next_frame: bool
  3697. # ImGuiNavMoveFlags NavMoveFlags; /* original C++ signature */
  3698. nav_move_flags: NavMoveFlags
  3699. # ImGuiScrollFlags NavMoveScrollFlags; /* original C++ signature */
  3700. nav_move_scroll_flags: ScrollFlags
  3701. # ImGuiKeyChord NavMoveKeyMods; /* original C++ signature */
  3702. nav_move_key_mods: KeyChord
  3703. # ImGuiDir NavMoveDir; /* original C++ signature */
  3704. nav_move_dir: Dir # Direction of the move request (left/right/up/down)
  3705. # ImGuiDir NavMoveDirForDebug; /* original C++ signature */
  3706. nav_move_dir_for_debug: Dir
  3707. # ImGuiDir NavMoveClipDir; /* original C++ signature */
  3708. nav_move_clip_dir: Dir # FIXME-NAV: Describe the purpose of this better. Might want to rename?
  3709. # ImRect NavScoringRect; /* original C++ signature */
  3710. nav_scoring_rect: ImRect # Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
  3711. # ImRect NavScoringNoClipRect; /* original C++ signature */
  3712. nav_scoring_no_clip_rect: ImRect # Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep submitted. Unset/invalid if inverted.
  3713. # int NavScoringDebugCount; /* original C++ signature */
  3714. nav_scoring_debug_count: int # Metrics for debugging
  3715. # int NavTabbingDir; /* original C++ signature */
  3716. nav_tabbing_dir: int # Generally -1 or +1, 0 when tabbing without a nav id
  3717. # int NavTabbingCounter; /* original C++ signature */
  3718. nav_tabbing_counter: int # >0 when counting items for tabbing
  3719. # ImGuiNavItemData NavMoveResultLocal; /* original C++ signature */
  3720. nav_move_result_local: NavItemData # Best move request candidate within NavWindow
  3721. # ImGuiNavItemData NavMoveResultLocalVisible; /* original C++ signature */
  3722. nav_move_result_local_visible: NavItemData # Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
  3723. # ImGuiNavItemData NavMoveResultOther; /* original C++ signature */
  3724. nav_move_result_other: NavItemData # Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
  3725. # ImGuiNavItemData NavTabbingResultFirst; /* original C++ signature */
  3726. nav_tabbing_result_first: NavItemData # First tabbing request candidate within NavWindow and flattened hierarchy
  3727. # Navigation: record of last move request
  3728. # ImGuiID NavJustMovedFromFocusScopeId; /* original C++ signature */
  3729. nav_just_moved_from_focus_scope_id: (
  3730. ID # Just navigated from this focus scope id (result of a successfully MoveRequest).
  3731. )
  3732. # ImGuiID NavJustMovedToId; /* original C++ signature */
  3733. nav_just_moved_to_id: ID # Just navigated to this id (result of a successfully MoveRequest).
  3734. # ImGuiID NavJustMovedToFocusScopeId; /* original C++ signature */
  3735. nav_just_moved_to_focus_scope_id: (
  3736. ID # Just navigated to this focus scope id (result of a successfully MoveRequest).
  3737. )
  3738. # ImGuiKeyChord NavJustMovedToKeyMods; /* original C++ signature */
  3739. nav_just_moved_to_key_mods: KeyChord
  3740. # bool NavJustMovedToIsTabbing; /* original C++ signature */
  3741. nav_just_moved_to_is_tabbing: bool # Copy of ImGuiNavMoveFlags_IsTabbing. Maybe we should store whole flags.
  3742. # bool NavJustMovedToHasSelectionData; /* original C++ signature */
  3743. nav_just_moved_to_has_selection_data: bool # Copy of move result's ItemFlags & ImGuiItemFlags_HasSelectionUserData). Maybe we should just store ImGuiNavItemData.
  3744. # Navigation: extra config options (will be made public eventually)
  3745. # - Tabbing (Tab, Shift+Tab) and Windowing (Ctrl+Tab, Ctrl+Shift+Tab) are enabled REGARDLESS of ImGuiConfigFlags_NavEnableKeyboard being set.
  3746. # - Ctrl+Tab is reconfigurable because it is the only shortcut that may be polled when no window are focused. It also doesn't work e.g. Web platforms.
  3747. # bool ConfigNavEnableTabbing; /* original C++ signature */
  3748. config_nav_enable_tabbing: bool # = True. Enable tabbing (Tab, Shift+Tab). PLEASE LET ME KNOW IF YOU USE THIS.
  3749. # bool ConfigNavWindowingWithGamepad; /* original C++ signature */
  3750. config_nav_windowing_with_gamepad: bool # = True. Enable Ctrl+Tab by holding ImGuiKey_GamepadFaceLeft (== ImGuiKey_NavGamepadMenu). When False, the button may still be used to toggle Menu layer.
  3751. # ImGuiKeyChord ConfigNavWindowingKeyNext; /* original C++ signature */
  3752. config_nav_windowing_key_next: KeyChord # = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). Set to 0 to disable. For reconfiguration (see #4828)
  3753. # ImGuiKeyChord ConfigNavWindowingKeyPrev; /* original C++ signature */
  3754. config_nav_windowing_key_prev: KeyChord # = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS X)
  3755. # Navigation: Windowing (Ctrl+Tab for list, or Menu button + keys or directional pads to move/resize)
  3756. # ImGuiWindow* NavWindowingTarget; /* original C++ signature */
  3757. nav_windowing_target: Window # Target window when doing Ctrl+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed top-most!
  3758. # ImGuiWindow* NavWindowingTargetAnim; /* original C++ signature */
  3759. nav_windowing_target_anim: Window # Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0, so the fade-out can stay on it.
  3760. # ImGuiWindow* NavWindowingListWindow; /* original C++ signature */
  3761. nav_windowing_list_window: Window # Internal window actually listing the Ctrl+Tab contents
  3762. # float NavWindowingTimer; /* original C++ signature */
  3763. nav_windowing_timer: float
  3764. # float NavWindowingHighlightAlpha; /* original C++ signature */
  3765. nav_windowing_highlight_alpha: float
  3766. # ImGuiInputSource NavWindowingInputSource; /* original C++ signature */
  3767. nav_windowing_input_source: InputSource
  3768. # bool NavWindowingToggleLayer; /* original C++ signature */
  3769. nav_windowing_toggle_layer: bool # Set while Alt or GamepadMenu is held, may be cleared by other operations, and processed when releasing the key.
  3770. # ImGuiKey NavWindowingToggleKey; /* original C++ signature */
  3771. nav_windowing_toggle_key: Key # Keyboard/gamepad key used when toggling to menu layer.
  3772. # ImVec2 NavWindowingAccumDeltaPos; /* original C++ signature */
  3773. nav_windowing_accum_delta_pos: ImVec2
  3774. # ImVec2 NavWindowingAccumDeltaSize; /* original C++ signature */
  3775. nav_windowing_accum_delta_size: ImVec2
  3776. # Render
  3777. # float DimBgRatio; /* original C++ signature */
  3778. dim_bg_ratio: float # 0.0..1.0 animation when fading in a dimming background (for modal window and Ctrl+Tab list)
  3779. # Drag and Drop
  3780. # bool DragDropActive; /* original C++ signature */
  3781. drag_drop_active: bool
  3782. # bool DragDropWithinSource; /* original C++ signature */
  3783. drag_drop_within_source: bool # Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag source.
  3784. # bool DragDropWithinTarget; /* original C++ signature */
  3785. drag_drop_within_target: bool # Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag target.
  3786. # ImGuiDragDropFlags DragDropSourceFlags; /* original C++ signature */
  3787. drag_drop_source_flags: DragDropFlags
  3788. # int DragDropSourceFrameCount; /* original C++ signature */
  3789. drag_drop_source_frame_count: int
  3790. # int DragDropMouseButton; /* original C++ signature */
  3791. drag_drop_mouse_button: int
  3792. # ImGuiPayload DragDropPayload; /* original C++ signature */
  3793. drag_drop_payload: Payload
  3794. # ImRect DragDropTargetRect; /* original C++ signature */
  3795. drag_drop_target_rect: (
  3796. ImRect # Store rectangle of current target candidate (we favor small targets when overlapping)
  3797. )
  3798. # ImRect DragDropTargetClipRect; /* original C++ signature */
  3799. drag_drop_target_clip_rect: ImRect # Store ClipRect at the time of item's drawing
  3800. # ImGuiID DragDropTargetId; /* original C++ signature */
  3801. drag_drop_target_id: ID
  3802. # ImGuiID DragDropTargetFullViewport; /* original C++ signature */
  3803. drag_drop_target_full_viewport: ID
  3804. # ImGuiDragDropFlags DragDropAcceptFlagsCurr; /* original C++ signature */
  3805. drag_drop_accept_flags_curr: DragDropFlags
  3806. # ImGuiDragDropFlags DragDropAcceptFlagsPrev; /* original C++ signature */
  3807. drag_drop_accept_flags_prev: DragDropFlags
  3808. # float DragDropAcceptIdCurrRectSurface; /* original C++ signature */
  3809. drag_drop_accept_id_curr_rect_surface: (
  3810. float # Target item surface (we resolve overlapping targets by prioritizing the smaller surface)
  3811. )
  3812. # ImGuiID DragDropAcceptIdCurr; /* original C++ signature */
  3813. drag_drop_accept_id_curr: ID # Target item id (set at the time of accepting the payload)
  3814. # ImGuiID DragDropAcceptIdPrev; /* original C++ signature */
  3815. drag_drop_accept_id_prev: (
  3816. ID # Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets)
  3817. )
  3818. # int DragDropAcceptFrameCount; /* original C++ signature */
  3819. drag_drop_accept_frame_count: int # Last time a target expressed a desire to accept the source
  3820. # ImGuiID DragDropHoldJustPressedId; /* original C++ signature */
  3821. drag_drop_hold_just_pressed_id: ID # Set when holding a payload just made ButtonBehavior() return a press.
  3822. # ImVector<uchar> DragDropPayloadBufHeap; /* original C++ signature */
  3823. drag_drop_payload_buf_heap: (
  3824. ImVector_uchar # We don't expose the ImVector<> directly, ImGuiPayload only holds pointer+size
  3825. )
  3826. # Clipper
  3827. # int ClipperTempDataStacked; /* original C++ signature */
  3828. clipper_temp_data_stacked: int
  3829. # ImVector<ImGuiListClipperData> ClipperTempData; /* original C++ signature */
  3830. clipper_temp_data: ImVector_ListClipperData
  3831. # Tables
  3832. # ImGuiTable* CurrentTable; /* original C++ signature */
  3833. current_table: Table
  3834. # ImGuiID DebugBreakInTable; /* original C++ signature */
  3835. debug_break_in_table: ID # Set to break in BeginTable() call.
  3836. # int TablesTempDataStacked; /* original C++ signature */
  3837. tables_temp_data_stacked: int # Temporary table data size (because we leave previous instances undestructed, we generally don't use TablesTempData.Size)
  3838. # ImVector<ImGuiTableTempData> TablesTempData; /* original C++ signature */
  3839. tables_temp_data: (
  3840. ImVector_TableTempData # Temporary table data (buffers reused/shared across instances, support nesting)
  3841. )
  3842. # ImVector<float> TablesLastTimeActive; /* original C++ signature */
  3843. tables_last_time_active: ImVector_float # Last used timestamp of each tables (SOA, for efficient GC)
  3844. # ImVector<ImDrawChannel> DrawChannelsTempMergeBuffer; /* original C++ signature */
  3845. draw_channels_temp_merge_buffer: ImVector_ImDrawChannel
  3846. # Tab bars
  3847. # ImGuiTabBar* CurrentTabBar; /* original C++ signature */
  3848. current_tab_bar: TabBar
  3849. # ImVector<ImGuiPtrOrIndex> CurrentTabBarStack; /* original C++ signature */
  3850. current_tab_bar_stack: ImVector_PtrOrIndex
  3851. # ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer; /* original C++ signature */
  3852. shrink_width_buffer: ImVector_ShrinkWidthItem
  3853. # Multi-Select state
  3854. # ImGuiBoxSelectState BoxSelectState; /* original C++ signature */
  3855. box_select_state: BoxSelectState
  3856. # ImGuiMultiSelectTempData* CurrentMultiSelect; /* original C++ signature */
  3857. current_multi_select: MultiSelectTempData
  3858. # int MultiSelectTempDataStacked; /* original C++ signature */
  3859. multi_select_temp_data_stacked: int # Temporary multi-select data size (because we leave previous instances undestructed, we generally don't use MultiSelectTempData.Size)
  3860. # ImVector<ImGuiMultiSelectTempData> MultiSelectTempData; /* original C++ signature */
  3861. multi_select_temp_data: ImVector_MultiSelectTempData
  3862. # Hover Delay system
  3863. # ImGuiID HoverItemDelayId; /* original C++ signature */
  3864. hover_item_delay_id: ID
  3865. # ImGuiID HoverItemDelayIdPreviousFrame; /* original C++ signature */
  3866. hover_item_delay_id_previous_frame: ID
  3867. # float HoverItemDelayTimer; /* original C++ signature */
  3868. hover_item_delay_timer: float # Currently used by IsItemHovered()
  3869. # float HoverItemDelayClearTimer; /* original C++ signature */
  3870. hover_item_delay_clear_timer: (
  3871. float # Currently used by IsItemHovered(): grace time before g.TooltipHoverTimer gets cleared.
  3872. )
  3873. # ImGuiID HoverItemUnlockedStationaryId; /* original C++ signature */
  3874. hover_item_unlocked_stationary_id: (
  3875. ID # Mouse has once been stationary on this item. Only reset after departing the item.
  3876. )
  3877. # ImGuiID HoverWindowUnlockedStationaryId; /* original C++ signature */
  3878. hover_window_unlocked_stationary_id: (
  3879. ID # Mouse has once been stationary on this window. Only reset after departing the window.
  3880. )
  3881. # Mouse state
  3882. # ImGuiMouseCursor MouseCursor; /* original C++ signature */
  3883. mouse_cursor: MouseCursor
  3884. # float MouseStationaryTimer; /* original C++ signature */
  3885. mouse_stationary_timer: float # Time the mouse has been stationary (with some loose heuristic)
  3886. # ImVec2 MouseLastValidPos; /* original C++ signature */
  3887. mouse_last_valid_pos: ImVec2
  3888. # Widget state
  3889. # ImGuiInputTextState InputTextState; /* original C++ signature */
  3890. input_text_state: InputTextState
  3891. # ImGuiTextIndex InputTextLineIndex; /* original C++ signature */
  3892. input_text_line_index: TextIndex # Temporary storage
  3893. # ImGuiInputTextDeactivatedState InputTextDeactivatedState; /* original C++ signature */
  3894. input_text_deactivated_state: InputTextDeactivatedState
  3895. # ImFontBaked InputTextPasswordFontBackupBaked; /* original C++ signature */
  3896. input_text_password_font_backup_baked: ImFontBaked
  3897. # ImFontFlags InputTextPasswordFontBackupFlags; /* original C++ signature */
  3898. input_text_password_font_backup_flags: ImFontFlags
  3899. # ImGuiID InputTextReactivateId; /* original C++ signature */
  3900. input_text_reactivate_id: (
  3901. ID # ID of InputText to reactivate on next frame (for io.ConfigInputTextEnterKeepActive behavior)
  3902. )
  3903. # ImGuiID TempInputId; /* original C++ signature */
  3904. temp_input_id: ID # Temporary text input when using Ctrl+Click on a slider, etc.
  3905. # ImGuiDataTypeStorage DataTypeZeroValue; /* original C++ signature */
  3906. data_type_zero_value: DataTypeStorage # 0 for all data types
  3907. # int BeginMenuDepth; /* original C++ signature */
  3908. begin_menu_depth: int
  3909. # int BeginComboDepth; /* original C++ signature */
  3910. begin_combo_depth: int
  3911. # ImGuiColorEditFlags ColorEditOptions; /* original C++ signature */
  3912. color_edit_options: ColorEditFlags # Store user options for color edit widgets
  3913. # ImGuiID ColorEditCurrentID; /* original C++ signature */
  3914. color_edit_current_id: (
  3915. ID # Set temporarily while inside of the parent-most ColorEdit4/ColorPicker4 (because they call each others).
  3916. )
  3917. # ImGuiID ColorEditSavedID; /* original C++ signature */
  3918. color_edit_saved_id: ID # ID we are saving/restoring HS for
  3919. # float ColorEditSavedHue; /* original C++ signature */
  3920. color_edit_saved_hue: (
  3921. float # Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips
  3922. )
  3923. # float ColorEditSavedSat; /* original C++ signature */
  3924. color_edit_saved_sat: float # Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV round trips
  3925. # ImU32 ColorEditSavedColor; /* original C++ signature */
  3926. color_edit_saved_color: ImU32 # RGB value with alpha set to 0.
  3927. # ImVec4 ColorPickerRef; /* original C++ signature */
  3928. color_picker_ref: ImVec4 # Initial/reference color at the time of opening the color picker.
  3929. # ImGuiComboPreviewData ComboPreviewData; /* original C++ signature */
  3930. combo_preview_data: ComboPreviewData
  3931. # ImRect WindowResizeBorderExpectedRect; /* original C++ signature */
  3932. window_resize_border_expected_rect: ImRect # Expected border rect, switch to relative edit if moving
  3933. # bool WindowResizeRelativeMode; /* original C++ signature */
  3934. window_resize_relative_mode: bool
  3935. # short ScrollbarSeekMode; /* original C++ signature */
  3936. scrollbar_seek_mode: int # 0: scroll to clicked location, -1/+1: prev/next page.
  3937. # float ScrollbarClickDeltaToGrabCenter; /* original C++ signature */
  3938. scrollbar_click_delta_to_grab_center: float # When scrolling to mouse location: distance between mouse and center of grab box, normalized in parent space.
  3939. # float SliderGrabClickOffset; /* original C++ signature */
  3940. slider_grab_click_offset: float
  3941. # float SliderCurrentAccum; /* original C++ signature */
  3942. slider_current_accum: float # Accumulated slider delta when using navigation controls.
  3943. # bool SliderCurrentAccumDirty; /* original C++ signature */
  3944. slider_current_accum_dirty: bool # Has the accumulated slider delta changed since last time we tried to apply it?
  3945. # bool DragCurrentAccumDirty; /* original C++ signature */
  3946. drag_current_accum_dirty: bool
  3947. # float DragCurrentAccum; /* original C++ signature */
  3948. drag_current_accum: float # Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
  3949. # float DragSpeedDefaultRatio; /* original C++ signature */
  3950. drag_speed_default_ratio: float # If speed == 0.0, uses (max-min) * DragSpeedDefaultRatio
  3951. # float DisabledAlphaBackup; /* original C++ signature */
  3952. disabled_alpha_backup: float # Backup for style.Alpha for BeginDisabled()
  3953. # short DisabledStackSize; /* original C++ signature */
  3954. disabled_stack_size: int
  3955. # short TooltipOverrideCount; /* original C++ signature */
  3956. tooltip_override_count: int
  3957. # ImGuiWindow* TooltipPreviousWindow; /* original C++ signature */
  3958. tooltip_previous_window: Window # Window of last tooltip submitted during the frame
  3959. # ImVector<char> ClipboardHandlerData; /* original C++ signature */
  3960. clipboard_handler_data: ImVector_char # If no custom clipboard handler is defined
  3961. # ImVector<ImGuiID> MenusIdSubmittedThisFrame; /* original C++ signature */
  3962. menus_id_submitted_this_frame: ImVector_ID # A list of menu IDs that were rendered at least once
  3963. # ImGuiTypingSelectState TypingSelectState; /* original C++ signature */
  3964. typing_select_state: TypingSelectState # State for GetTypingSelectRequest()
  3965. # Platform support
  3966. # ImGuiPlatformImeData PlatformImeData; /* original C++ signature */
  3967. platform_ime_data: PlatformImeData # Data updated by current frame. Will be applied at end of the frame. For some backends, this is required to have WantVisible=True in order to receive text message.
  3968. # ImGuiPlatformImeData PlatformImeDataPrev; /* original C++ signature */
  3969. platform_ime_data_prev: (
  3970. PlatformImeData # Previous frame data. When changed we call the platform_io.Platform_SetImeDataFn() handler.
  3971. )
  3972. # Extensions
  3973. # FIXME: We could provide an API to register one slot in an array held in ImGuiContext?
  3974. # ImVector<ImTextureData*> UserTextures; /* original C++ signature */
  3975. user_textures: ImVector_ImTextureData_ptr # List of textures created/managed by user or third-party extension. Automatically appended into platform_io.Textures[].
  3976. # ImGuiDockContext DockContext; /* original C++ signature */
  3977. dock_context: DockContext
  3978. # Settings
  3979. # bool SettingsLoaded; /* original C++ signature */
  3980. settings_loaded: bool
  3981. # float SettingsDirtyTimer; /* original C++ signature */
  3982. settings_dirty_timer: float # Save .ini Settings to memory when time reaches zero
  3983. # ImGuiTextBuffer SettingsIniData; /* original C++ signature */
  3984. settings_ini_data: TextBuffer # In memory .ini settings
  3985. # ImVector<ImGuiSettingsHandler> SettingsHandlers; /* original C++ signature */
  3986. settings_handlers: ImVector_SettingsHandler # List of .ini settings handlers
  3987. # Hooks
  3988. # ImGuiID HookIdNext; /* original C++ signature */
  3989. hook_id_next: ID # Next available HookId
  3990. # Capture/Logging
  3991. # bool LogEnabled; /* original C++ signature */
  3992. log_enabled: bool # Currently capturing
  3993. # bool LogLineFirstItem; /* original C++ signature */
  3994. log_line_first_item: bool
  3995. # ImGuiLogFlags LogFlags; /* original C++ signature */
  3996. log_flags: LogFlags # Capture flags/type
  3997. # ImGuiWindow* LogWindow; /* original C++ signature */
  3998. log_window: Window
  3999. # ImGuiTextBuffer LogBuffer; /* original C++ signature */
  4000. log_buffer: TextBuffer # Accumulation buffer when log to clipboard. This is pointer so our GImGui static constructor doesn't call heap allocators.
  4001. # const char* LogNextPrefix; /* original C++ signature */
  4002. log_next_prefix: (
  4003. str # See comment in LogSetNextTextDecoration(): doesn't copy underlying data, use carefully! # (const)
  4004. )
  4005. # const char* LogNextSuffix; /* original C++ signature */
  4006. log_next_suffix: str # (const)
  4007. # float LogLinePosY; /* original C++ signature */
  4008. log_line_pos_y: float
  4009. # int LogDepthRef; /* original C++ signature */
  4010. log_depth_ref: int
  4011. # int LogDepthToExpand; /* original C++ signature */
  4012. log_depth_to_expand: int
  4013. # int LogDepthToExpandDefault; /* original C++ signature */
  4014. log_depth_to_expand_default: (
  4015. int # Default/stored value for LogDepthMaxExpand if not specified in the LogXXX function call.
  4016. )
  4017. # Error Handling
  4018. # void* ErrorCallbackUserData; /* original C++ signature */
  4019. error_callback_user_data: Any # = None
  4020. # ImVec2 ErrorTooltipLockedPos; /* original C++ signature */
  4021. error_tooltip_locked_pos: ImVec2
  4022. # bool ErrorFirst; /* original C++ signature */
  4023. error_first: bool
  4024. # int ErrorCountCurrentFrame; /* original C++ signature */
  4025. error_count_current_frame: int # [Internal] Number of errors submitted this frame.
  4026. # ImGuiErrorRecoveryState StackSizesInNewFrame; /* original C++ signature */
  4027. stack_sizes_in_new_frame: ErrorRecoveryState # [Internal]
  4028. # ImGuiErrorRecoveryState*StackSizesInBeginForCurrentWindow; /* original C++ signature */
  4029. stack_sizes_in_begin_for_current_window: ErrorRecoveryState # [Internal]
  4030. # Debug Tools
  4031. # (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.)
  4032. # int DebugDrawIdConflictsCount; /* original C++ signature */
  4033. debug_draw_id_conflicts_count: int # Locked count (preserved when holding Ctrl)
  4034. # ImGuiDebugLogFlags DebugLogFlags; /* original C++ signature */
  4035. debug_log_flags: DebugLogFlags
  4036. # ImGuiTextBuffer DebugLogBuf; /* original C++ signature */
  4037. debug_log_buf: TextBuffer
  4038. # ImGuiTextIndex DebugLogIndex; /* original C++ signature */
  4039. debug_log_index: TextIndex
  4040. # int DebugLogSkippedErrors; /* original C++ signature */
  4041. debug_log_skipped_errors: int
  4042. # ImGuiDebugLogFlags DebugLogAutoDisableFlags; /* original C++ signature */
  4043. debug_log_auto_disable_flags: DebugLogFlags
  4044. # ImU8 DebugLogAutoDisableFrames; /* original C++ signature */
  4045. debug_log_auto_disable_frames: ImU8
  4046. # ImU8 DebugLocateFrames; /* original C++ signature */
  4047. debug_locate_frames: ImU8 # For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot above.
  4048. # bool DebugBreakInLocateId; /* original C++ signature */
  4049. debug_break_in_locate_id: bool # Debug break in ItemAdd() call for g.DebugLocateId.
  4050. # ImGuiKeyChord DebugBreakKeyChord; /* original C++ signature */
  4051. debug_break_key_chord: KeyChord # = ImGuiKey_Pause
  4052. # ImS8 DebugBeginReturnValueCullDepth; /* original C++ signature */
  4053. debug_begin_return_value_cull_depth: ImS8 # Cycle between 0..9 then wrap around.
  4054. # bool DebugItemPickerActive; /* original C++ signature */
  4055. debug_item_picker_active: bool # Item picker is active (started with DebugStartItemPicker())
  4056. # ImU8 DebugItemPickerMouseButton; /* original C++ signature */
  4057. debug_item_picker_mouse_button: ImU8
  4058. # ImGuiID DebugItemPickerBreakId; /* original C++ signature */
  4059. debug_item_picker_break_id: ID # Will call IM_DEBUG_BREAK() when encountering this ID
  4060. # float DebugFlashStyleColorTime; /* original C++ signature */
  4061. debug_flash_style_color_time: float
  4062. # ImVec4 DebugFlashStyleColorBackup; /* original C++ signature */
  4063. debug_flash_style_color_backup: ImVec4
  4064. # ImGuiMetricsConfig DebugMetricsConfig; /* original C++ signature */
  4065. debug_metrics_config: MetricsConfig
  4066. # ImGuiDebugItemPathQuery DebugItemPathQuery; /* original C++ signature */
  4067. debug_item_path_query: DebugItemPathQuery
  4068. # ImGuiIDStackTool DebugIDStackTool; /* original C++ signature */
  4069. debug_id_stack_tool: IDStackTool
  4070. # ImGuiDebugAllocInfo DebugAllocInfo; /* original C++ signature */
  4071. debug_alloc_info: DebugAllocInfo
  4072. # ImGuiDockNode* DebugHoveredDockNode; /* original C++ signature */
  4073. debug_hovered_dock_node: DockNode # Hovered dock node.
  4074. # Misc
  4075. # float FramerateSecPerFrame[60]; /* original C++ signature */
  4076. framerate_sec_per_frame: (
  4077. np.ndarray
  4078. ) # ndarray[type=float, size=60] # Calculate estimate of framerate for user over the last 60 frames..
  4079. # int FramerateSecPerFrameIdx; /* original C++ signature */
  4080. framerate_sec_per_frame_idx: int
  4081. # int FramerateSecPerFrameCount; /* original C++ signature */
  4082. framerate_sec_per_frame_count: int
  4083. # float FramerateSecPerFrameAccum; /* original C++ signature */
  4084. framerate_sec_per_frame_accum: float
  4085. # int WantCaptureMouseNextFrame; /* original C++ signature */
  4086. want_capture_mouse_next_frame: int # Explicit capture override via SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard(). Default to -1.
  4087. # int WantCaptureKeyboardNextFrame; /* original C++ signature */
  4088. want_capture_keyboard_next_frame: int # "
  4089. # int WantTextInputNextFrame; /* original C++ signature */
  4090. want_text_input_next_frame: int # Copied in EndFrame() from g.PlatformImeData.WantTextInput. Needs to be set for some backends (SDL3) to emit character inputs.
  4091. # ImVector<char> TempBuffer; /* original C++ signature */
  4092. temp_buffer: ImVector_char # Temporary text buffer
  4093. # ImGuiContext(ImFontAtlas* shared_font_atlas); /* original C++ signature */
  4094. def __init__(self, shared_font_atlas: ImFontAtlas) -> None:
  4095. pass
  4096. # -----------------------------------------------------------------------------
  4097. # [SECTION] ImGuiWindowTempData, ImGuiWindow
  4098. # -----------------------------------------------------------------------------
  4099. class WindowTempData:
  4100. """Transient per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the DC variable name in ImGuiWindow.
  4101. (That's theory, in practice the delimitation between ImGuiWindow and ImGuiWindowTempData is quite tenuous and could be reconsidered..)
  4102. (This doesn't need a constructor because we zero-clear it as part of ImGuiWindow and all frame-temporary data are setup on Begin)
  4103. """
  4104. # Layout
  4105. # ImVec2 CursorPos; /* original C++ signature */
  4106. cursor_pos: ImVec2 # Current emitting position, in absolute coordinates.
  4107. # ImVec2 CursorPosPrevLine; /* original C++ signature */
  4108. cursor_pos_prev_line: ImVec2
  4109. # ImVec2 CursorStartPos; /* original C++ signature */
  4110. cursor_start_pos: ImVec2 # Initial position after Begin(), generally ~ window position + WindowPadding.
  4111. # ImVec2 CursorMaxPos; /* original C++ signature */
  4112. cursor_max_pos: ImVec2 # Used to implicitly calculate ContentSize at the beginning of next frame, for scrolling range and auto-resize. Always growing during the frame.
  4113. # ImVec2 IdealMaxPos; /* original C++ signature */
  4114. ideal_max_pos: ImVec2 # Used to implicitly calculate ContentSizeIdeal at the beginning of next frame, for auto-resize only. Always growing during the frame.
  4115. # ImVec2 CurrLineSize; /* original C++ signature */
  4116. curr_line_size: ImVec2
  4117. # ImVec2 PrevLineSize; /* original C++ signature */
  4118. prev_line_size: ImVec2
  4119. # float CurrLineTextBaseOffset; /* original C++ signature */
  4120. curr_line_text_base_offset: float # Baseline offset (0.0 by default on a new line, generally == style.FramePadding.y when a framed item has been added).
  4121. # float PrevLineTextBaseOffset; /* original C++ signature */
  4122. prev_line_text_base_offset: float
  4123. # bool IsSameLine; /* original C++ signature */
  4124. is_same_line: bool
  4125. # bool IsSetPos; /* original C++ signature */
  4126. is_set_pos: bool
  4127. # ImVec1 Indent; /* original C++ signature */
  4128. indent: ImVec1 # Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
  4129. # ImVec1 ColumnsOffset; /* original C++ signature */
  4130. columns_offset: ImVec1 # Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
  4131. # ImVec1 GroupOffset; /* original C++ signature */
  4132. group_offset: ImVec1
  4133. # ImVec2 CursorStartPosLossyness; /* original C++ signature */
  4134. cursor_start_pos_lossyness: ImVec2 # Record the loss of precision of CursorStartPos due to really large scrolling amount. This is used by clipper to compensate and fix the most common use case of large scroll area.
  4135. # Keyboard/Gamepad navigation
  4136. # ImGuiNavLayer NavLayerCurrent; /* original C++ signature */
  4137. nav_layer_current: NavLayer # Current layer, 0..31 (we currently only use 0..1)
  4138. # short NavLayersActiveMask; /* original C++ signature */
  4139. nav_layers_active_mask: int # Which layers have been written to (result from previous frame)
  4140. # short NavLayersActiveMaskNext; /* original C++ signature */
  4141. nav_layers_active_mask_next: int # Which layers have been written to (accumulator for current frame)
  4142. # bool NavIsScrollPushableX; /* original C++ signature */
  4143. nav_is_scroll_pushable_x: bool # Set when current work location may be scrolled horizontally when moving left / right. This is generally always True UNLESS within a column.
  4144. # bool NavHideHighlightOneFrame; /* original C++ signature */
  4145. nav_hide_highlight_one_frame: bool
  4146. # bool NavWindowHasScrollY; /* original C++ signature */
  4147. nav_window_has_scroll_y: bool # Set per window when scrolling can be used (== ScrollMax.y > 0.0)
  4148. # Miscellaneous
  4149. # bool MenuBarAppending; /* original C++ signature */
  4150. menu_bar_appending: bool # FIXME: Remove this
  4151. # ImVec2 MenuBarOffset; /* original C++ signature */
  4152. menu_bar_offset: ImVec2 # MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
  4153. # ImGuiMenuColumns MenuColumns; /* original C++ signature */
  4154. menu_columns: MenuColumns # Simplified columns storage for menu items measurement
  4155. # int TreeDepth; /* original C++ signature */
  4156. tree_depth: int # Current tree depth.
  4157. # ImU32 TreeHasStackDataDepthMask; /* original C++ signature */
  4158. tree_has_stack_data_depth_mask: (
  4159. ImU32 # Store whether given depth has ImGuiTreeNodeStackData data. Could be turned into a ImU64 if necessary.
  4160. )
  4161. # ImU32 TreeRecordsClippedNodesY2Mask; /* original C++ signature */
  4162. tree_records_clipped_nodes_y2_mask: ImU32 # Store whether we should keep recording Y2. Cleared when passing clip max. Equivalent TreeHasStackDataDepthMask value should always be set.
  4163. # ImVector<ImGuiWindow*> ChildWindows; /* original C++ signature */
  4164. child_windows: ImVector_Window_ptr
  4165. # ImGuiStorage* StateStorage; /* original C++ signature */
  4166. state_storage: Storage # Current persistent per-window storage (store e.g. tree node open/close state)
  4167. # ImGuiOldColumns* CurrentColumns; /* original C++ signature */
  4168. current_columns: OldColumns # Current columns set
  4169. # int CurrentTableIdx; /* original C++ signature */
  4170. current_table_idx: int # Current table index (into g.Tables)
  4171. # ImGuiLayoutType LayoutType; /* original C++ signature */
  4172. layout_type: LayoutType
  4173. # ImGuiLayoutType ParentLayoutType; /* original C++ signature */
  4174. parent_layout_type: LayoutType # Layout type of parent window at the time of Begin()
  4175. # ImU32 ModalDimBgColor; /* original C++ signature */
  4176. modal_dim_bg_color: ImU32
  4177. # Status flags
  4178. # ImGuiItemStatusFlags WindowItemStatusFlags; /* original C++ signature */
  4179. window_item_status_flags: ItemStatusFlags
  4180. # ImGuiItemStatusFlags ChildItemStatusFlags; /* original C++ signature */
  4181. child_item_status_flags: ItemStatusFlags
  4182. # ImGuiItemStatusFlags DockTabItemStatusFlags; /* original C++ signature */
  4183. dock_tab_item_status_flags: ItemStatusFlags
  4184. # ImRect DockTabItemRect; /* original C++ signature */
  4185. dock_tab_item_rect: ImRect
  4186. # Local parameters stacks
  4187. # We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
  4188. # float ItemWidth; /* original C++ signature */
  4189. item_width: float # Current item width (>0.0: width in pixels, <0.0: align xx pixels to the right of window).
  4190. # float ItemWidthDefault; /* original C++ signature */
  4191. item_width_default: float
  4192. # float TextWrapPos; /* original C++ signature */
  4193. text_wrap_pos: float # Current text wrap pos.
  4194. # ImVector<float> ItemWidthStack; /* original C++ signature */
  4195. item_width_stack: ImVector_float # Store item widths to restore (attention: .back() is not == ItemWidth)
  4196. # ImVector<float> TextWrapPosStack; /* original C++ signature */
  4197. text_wrap_pos_stack: ImVector_float # Store text wrap pos to restore (attention: .back() is not == TextWrapPos)
  4198. # ImGuiWindowTempData(ImVec2 CursorPos = ImVec2(), ImVec2 CursorPosPrevLine = ImVec2(), ImVec2 CursorStartPos = ImVec2(), ImVec2 CursorMaxPos = ImVec2(), ImVec2 IdealMaxPos = ImVec2(), ImVec2 CurrLineSize = ImVec2(), ImVec2 PrevLineSize = ImVec2(), float CurrLineTextBaseOffset = float(), float PrevLineTextBaseOffset = float(), bool IsSameLine = bool(), bool IsSetPos = bool(), ImVec1 Indent = ImVec1(), ImVec1 ColumnsOffset = ImVec1(), ImVec1 GroupOffset = ImVec1(), ImVec2 CursorStartPosLossyness = ImVec2(), ImGuiNavLayer NavLayerCurrent = ImGuiNavLayer(), short NavLayersActiveMask = short(), short NavLayersActiveMaskNext = short(), bool NavIsScrollPushableX = bool(), bool NavHideHighlightOneFrame = bool(), bool NavWindowHasScrollY = bool(), bool MenuBarAppending = bool(), ImVec2 MenuBarOffset = ImVec2(), ImGuiMenuColumns MenuColumns = ImGuiMenuColumns(), int TreeDepth = int(), ImU32 TreeHasStackDataDepthMask = ImU32(), ImU32 TreeRecordsClippedNodesY2Mask = ImU32(), ImVector<ImGuiWindow*> ChildWindows = ImVector<ImGuiWindow*>(), int CurrentTableIdx = int(), ImGuiLayoutType LayoutType = ImGuiLayoutType(), ImGuiLayoutType ParentLayoutType = ImGuiLayoutType(), ImU32 ModalDimBgColor = ImU32(), ImGuiItemStatusFlags WindowItemStatusFlags = ImGuiItemStatusFlags(), ImGuiItemStatusFlags ChildItemStatusFlags = ImGuiItemStatusFlags(), ImGuiItemStatusFlags DockTabItemStatusFlags = ImGuiItemStatusFlags(), ImRect DockTabItemRect = ImRect(), float ItemWidth = float(), float ItemWidthDefault = float(), float TextWrapPos = float(), ImVector<float> ItemWidthStack = ImVector<float>(), ImVector<float> TextWrapPosStack = ImVector<float>()); /* original C++ signature */
  4199. def __init__(
  4200. self,
  4201. cursor_pos: Optional[ImVec2Like] = None,
  4202. cursor_pos_prev_line: Optional[ImVec2Like] = None,
  4203. cursor_start_pos: Optional[ImVec2Like] = None,
  4204. cursor_max_pos: Optional[ImVec2Like] = None,
  4205. ideal_max_pos: Optional[ImVec2Like] = None,
  4206. curr_line_size: Optional[ImVec2Like] = None,
  4207. prev_line_size: Optional[ImVec2Like] = None,
  4208. curr_line_text_base_offset: float = float(),
  4209. prev_line_text_base_offset: float = float(),
  4210. is_same_line: bool = bool(),
  4211. is_set_pos: bool = bool(),
  4212. indent: Optional[ImVec1] = None,
  4213. columns_offset: Optional[ImVec1] = None,
  4214. group_offset: Optional[ImVec1] = None,
  4215. cursor_start_pos_lossyness: Optional[ImVec2Like] = None,
  4216. nav_layer_current: NavLayer = NavLayer(),
  4217. nav_layers_active_mask: int = int(),
  4218. nav_layers_active_mask_next: int = int(),
  4219. nav_is_scroll_pushable_x: bool = bool(),
  4220. nav_hide_highlight_one_frame: bool = bool(),
  4221. nav_window_has_scroll_y: bool = bool(),
  4222. menu_bar_appending: bool = bool(),
  4223. menu_bar_offset: Optional[ImVec2Like] = None,
  4224. menu_columns: Optional[MenuColumns] = None,
  4225. tree_depth: int = int(),
  4226. tree_has_stack_data_depth_mask: ImU32 = ImU32(),
  4227. tree_records_clipped_nodes_y2_mask: ImU32 = ImU32(),
  4228. child_windows: Optional[ImVector_Window] = None,
  4229. current_table_idx: int = int(),
  4230. layout_type: Optional[LayoutType] = None,
  4231. parent_layout_type: Optional[LayoutType] = None,
  4232. modal_dim_bg_color: ImU32 = ImU32(),
  4233. window_item_status_flags: ItemStatusFlags = ItemStatusFlags(),
  4234. child_item_status_flags: ItemStatusFlags = ItemStatusFlags(),
  4235. dock_tab_item_status_flags: ItemStatusFlags = ItemStatusFlags(),
  4236. dock_tab_item_rect: Optional[ImRect] = None,
  4237. item_width: float = float(),
  4238. item_width_default: float = float(),
  4239. text_wrap_pos: float = float(),
  4240. item_width_stack: Optional[ImVector_float] = None,
  4241. text_wrap_pos_stack: Optional[ImVector_float] = None,
  4242. ) -> None:
  4243. """Auto-generated default constructor with named params
  4244. Python bindings defaults:
  4245. If any of the params below is None, then its default value below will be used:
  4246. * CursorPos: ImVec2()
  4247. * CursorPosPrevLine: ImVec2()
  4248. * CursorStartPos: ImVec2()
  4249. * CursorMaxPos: ImVec2()
  4250. * IdealMaxPos: ImVec2()
  4251. * CurrLineSize: ImVec2()
  4252. * PrevLineSize: ImVec2()
  4253. * Indent: ImVec1()
  4254. * ColumnsOffset: ImVec1()
  4255. * GroupOffset: ImVec1()
  4256. * CursorStartPosLossyness: ImVec2()
  4257. * MenuBarOffset: ImVec2()
  4258. * MenuColumns: MenuColumns()
  4259. * ChildWindows: ImVector_Window_ptr()
  4260. * LayoutType: LayoutType()
  4261. * ParentLayoutType: LayoutType()
  4262. * DockTabItemRect: ImRect()
  4263. * ItemWidthStack: ImVector_float()
  4264. * TextWrapPosStack: ImVector_float()
  4265. """
  4266. pass
  4267. class Window:
  4268. """Storage for one window"""
  4269. # ImGuiContext* Ctx; /* original C++ signature */
  4270. ctx: Context # Parent UI context (needs to be set explicitly by parent).
  4271. # char* Name; /* original C++ signature */
  4272. name: char # Window name, owned by the window. # (read-only)
  4273. # ImGuiID ID; /* original C++ signature */
  4274. id_: ID # == ImHashStr(Name)
  4275. # ImGuiWindowFlags Flags, /* original C++ signature */
  4276. flags: WindowFlags # See enum ImGuiWindowFlags_
  4277. # FlagsPreviousFrame; /* original C++ signature */
  4278. flags_previous_frame: WindowFlags # See enum ImGuiWindowFlags_
  4279. # ImGuiChildFlags ChildFlags; /* original C++ signature */
  4280. child_flags: ChildFlags # Set when window is a child window. See enum ImGuiChildFlags_
  4281. # ImGuiWindowClass WindowClass; /* original C++ signature */
  4282. window_class: WindowClass # Advanced users only. Set with SetNextWindowClass()
  4283. # ImGuiViewportP* Viewport; /* original C++ signature */
  4284. viewport: (
  4285. ViewportP # Always set in Begin(). Inactive windows may have a None value here if their viewport was discarded.
  4286. )
  4287. # ImGuiID ViewportId; /* original C++ signature */
  4288. viewport_id: (
  4289. ID # We backup the viewport id (since the viewport may disappear or never be created if the window is inactive)
  4290. )
  4291. # ImVec2 ViewportPos; /* original C++ signature */
  4292. viewport_pos: ImVec2 # We backup the viewport position (since the viewport may disappear or never be created if the window is inactive)
  4293. # int ViewportAllowPlatformMonitorExtend; /* original C++ signature */
  4294. viewport_allow_platform_monitor_extend: int # Reset to -1 every frame (index is guaranteed to be valid between NewFrame..EndFrame), only used in the Appearing frame of a tooltip/popup to enforce clamping to a given monitor
  4295. # ImVec2 Pos; /* original C++ signature */
  4296. pos: ImVec2 # Position (always rounded-up to nearest pixel)
  4297. # ImVec2 Size; /* original C++ signature */
  4298. size: ImVec2 # Current size (==SizeFull or collapsed title bar size)
  4299. # ImVec2 SizeFull; /* original C++ signature */
  4300. size_full: ImVec2 # Size when non collapsed
  4301. # ImVec2 ContentSize; /* original C++ signature */
  4302. content_size: ImVec2 # Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous frame. Does not include window decoration or window padding.
  4303. # ImVec2 ContentSizeIdeal; /* original C++ signature */
  4304. content_size_ideal: ImVec2
  4305. # ImVec2 ContentSizeExplicit; /* original C++ signature */
  4306. content_size_explicit: (
  4307. ImVec2 # Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize().
  4308. )
  4309. # ImVec2 WindowPadding; /* original C++ signature */
  4310. window_padding: ImVec2 # Window padding at the time of Begin().
  4311. # float WindowRounding; /* original C++ signature */
  4312. window_rounding: float # Window rounding at the time of Begin(). May be clamped lower to avoid rendering artifacts with title bar, menu bar etc.
  4313. # float WindowBorderSize; /* original C++ signature */
  4314. window_border_size: float # Window border size at the time of Begin().
  4315. # float TitleBarHeight, /* original C++ signature */
  4316. title_bar_height: float # Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you can change it to TitleBarHeight.
  4317. # MenuBarHeight; /* original C++ signature */
  4318. menu_bar_height: float # Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you can change it to TitleBarHeight.
  4319. # float DecoOuterSizeX1, /* original C++ signature */
  4320. deco_outer_size_x1: float # Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0. Y1 generally = TitleBarHeight + MenuBarHeight). Locked during Begin().
  4321. # DecoOuterSizeY1; /* original C++ signature */
  4322. deco_outer_size_y1: float # Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0. Y1 generally = TitleBarHeight + MenuBarHeight). Locked during Begin().
  4323. # float DecoOuterSizeX2, /* original C++ signature */
  4324. deco_outer_size_x2: float # Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y).
  4325. # DecoOuterSizeY2; /* original C++ signature */
  4326. deco_outer_size_y2: float # Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y).
  4327. # float DecoInnerSizeX1, /* original C++ signature */
  4328. deco_inner_size_x1: float # Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen rows/columns are inside InnerRect (and not part of regular decoration sizes).
  4329. # DecoInnerSizeY1; /* original C++ signature */
  4330. deco_inner_size_y1: float # Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen rows/columns are inside InnerRect (and not part of regular decoration sizes).
  4331. # int NameBufLen; /* original C++ signature */
  4332. name_buf_len: int # Size of buffer storing Name. May be larger than strlen(Name)!
  4333. # ImGuiID MoveId; /* original C++ signature */
  4334. move_id: ID # == window->GetID("#MOVE")
  4335. # ImGuiID TabId; /* original C++ signature */
  4336. tab_id: ID # == window->GetID("#TAB")
  4337. # ImGuiID ChildId; /* original C++ signature */
  4338. child_id: (
  4339. ID # ID of corresponding item in parent window (for navigation to return from child window to parent window)
  4340. )
  4341. # ImGuiID PopupId; /* original C++ signature */
  4342. popup_id: ID # ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
  4343. # ImVec2 Scroll; /* original C++ signature */
  4344. scroll: ImVec2
  4345. # ImVec2 ScrollMax; /* original C++ signature */
  4346. scroll_max: ImVec2
  4347. # ImVec2 ScrollTarget; /* original C++ signature */
  4348. scroll_target: ImVec2 # target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0. (FLT_MAX for no change)
  4349. # ImVec2 ScrollTargetCenterRatio; /* original C++ signature */
  4350. scroll_target_center_ratio: (
  4351. ImVec2 # 0.0 = scroll so that target position is at top, 0.5 = scroll so that target position is centered
  4352. )
  4353. # ImVec2 ScrollTargetEdgeSnapDist; /* original C++ signature */
  4354. scroll_target_edge_snap_dist: ImVec2 # 0.0 = no snapping, >0.0 snapping threshold
  4355. # ImVec2 ScrollbarSizes; /* original C++ signature */
  4356. scrollbar_sizes: ImVec2 # Size taken by each scrollbars on their smaller axis. Pay attention! ScrollbarSizes.x == width of the vertical scrollbar, ScrollbarSizes.y = height of the horizontal scrollbar.
  4357. # bool ScrollbarX, /* original C++ signature */
  4358. scrollbar_x: bool # Are scrollbars visible?
  4359. # ScrollbarY; /* original C++ signature */
  4360. scrollbar_y: bool # Are scrollbars visible?
  4361. # bool ScrollbarXStabilizeEnabled; /* original C++ signature */
  4362. scrollbar_x_stabilize_enabled: bool # Was ScrollbarX previously auto-stabilized?
  4363. # ImU8 ScrollbarXStabilizeToggledHistory; /* original C++ signature */
  4364. scrollbar_x_stabilize_toggled_history: ImU8 # Used to stabilize scrollbar visibility in case of feedback loops
  4365. # bool ViewportOwned; /* original C++ signature */
  4366. viewport_owned: bool
  4367. # bool Active; /* original C++ signature */
  4368. active: bool # Set to True on Begin(), unless Collapsed
  4369. # bool WasActive; /* original C++ signature */
  4370. was_active: bool
  4371. # bool WriteAccessed; /* original C++ signature */
  4372. write_accessed: bool # Set to True when any widget access the current window
  4373. # bool Collapsed; /* original C++ signature */
  4374. collapsed: bool # Set when collapsing window to become only title-bar
  4375. # bool WantCollapseToggle; /* original C++ signature */
  4376. want_collapse_toggle: bool
  4377. # bool SkipItems; /* original C++ signature */
  4378. skip_items: bool # Set when items can safely be all clipped (e.g. window not visible or collapsed)
  4379. # bool SkipRefresh; /* original C++ signature */
  4380. skip_refresh: bool # [EXPERIMENTAL] Reuse previous frame drawn contents, Begin() returns False.
  4381. # bool Appearing; /* original C++ signature */
  4382. appearing: bool # Set during the frame where the window is appearing (or re-appearing)
  4383. # bool Hidden; /* original C++ signature */
  4384. hidden: bool # Do not display (== HiddenFrames*** > 0)
  4385. # bool IsFallbackWindow; /* original C++ signature */
  4386. is_fallback_window: bool # Set on the "Debug##Default" window.
  4387. # bool IsExplicitChild; /* original C++ signature */
  4388. is_explicit_child: bool # Set when passed _ChildWindow, left to False by BeginDocked()
  4389. # bool HasCloseButton; /* original C++ signature */
  4390. has_close_button: bool # Set when the window has a close button (p_open != None)
  4391. # signed char ResizeBorderHovered; /* original C++ signature */
  4392. resize_border_hovered: int # Current border being hovered for resize (-1: none, otherwise 0-3)
  4393. # signed char ResizeBorderHeld; /* original C++ signature */
  4394. resize_border_held: int # Current border being held for resize (-1: none, otherwise 0-3)
  4395. # short BeginCount; /* original C++ signature */
  4396. begin_count: int # Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
  4397. # short BeginCountPreviousFrame; /* original C++ signature */
  4398. begin_count_previous_frame: int # Number of Begin() during the previous frame
  4399. # short BeginOrderWithinParent; /* original C++ signature */
  4400. begin_order_within_parent: (
  4401. int # Begin() order within immediate parent window, if we are a child window. Otherwise 0.
  4402. )
  4403. # short BeginOrderWithinContext; /* original C++ signature */
  4404. begin_order_within_context: int # Begin() order within entire imgui context. This is mostly used for debugging submission order related issues.
  4405. # short FocusOrder; /* original C++ signature */
  4406. focus_order: int # Order within WindowsFocusOrder[], altered when windows are focused.
  4407. # ImGuiDir AutoPosLastDirection; /* original C++ signature */
  4408. auto_pos_last_direction: Dir
  4409. # ImS8 AutoFitFramesX, /* original C++ signature */
  4410. auto_fit_frames_x: ImS8
  4411. # AutoFitFramesY; /* original C++ signature */
  4412. auto_fit_frames_y: ImS8
  4413. # bool AutoFitOnlyGrows; /* original C++ signature */
  4414. auto_fit_only_grows: bool
  4415. # ImS8 HiddenFramesCanSkipItems; /* original C++ signature */
  4416. hidden_frames_can_skip_items: ImS8 # Hide the window for N frames
  4417. # ImS8 HiddenFramesCannotSkipItems; /* original C++ signature */
  4418. hidden_frames_cannot_skip_items: (
  4419. ImS8 # Hide the window for N frames while allowing items to be submitted so we can measure their size
  4420. )
  4421. # ImS8 HiddenFramesForRenderOnly; /* original C++ signature */
  4422. hidden_frames_for_render_only: ImS8 # Hide the window until frame N at Render() time only
  4423. # ImS8 DisableInputsFrames; /* original C++ signature */
  4424. disable_inputs_frames: ImS8 # Disable window interactions for N frames
  4425. # ImVec2 SetWindowPosVal; /* original C++ signature */
  4426. set_window_pos_val: ImVec2 # store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
  4427. # ImVec2 SetWindowPosPivot; /* original C++ signature */
  4428. set_window_pos_pivot: ImVec2 # store window pivot for positioning. ImVec2(0, 0) when positioning from top-left corner; ImVec2(0.5, 0.5) for centering; ImVec2(1, 1) for bottom right.
  4429. # ImVector<ImGuiID> IDStack; /* original C++ signature */
  4430. id_stack: ImVector_ID # ID stack. ID are hashes seeded with the value at the top of the stack. (In theory this should be in the TempData structure)
  4431. # ImGuiWindowTempData DC; /* original C++ signature */
  4432. dc: WindowTempData # Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the "DC" variable name.
  4433. # The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer.
  4434. # The main 'OuterRect', omitted as a field, is window->Rect().
  4435. # ImRect OuterRectClipped; /* original C++ signature */
  4436. outer_rect_clipped: ImRect # == Window->Rect() just after setup in Begin(). == window->Rect() for root window.
  4437. # ImRect InnerRect; /* original C++ signature */
  4438. inner_rect: ImRect # Inner rectangle (omit title bar, menu bar, scroll bar)
  4439. # ImRect InnerClipRect; /* original C++ signature */
  4440. inner_clip_rect: (
  4441. ImRect # == InnerRect shrunk by WindowPadding*0.5 on each side, clipped within viewport or parent clip rect.
  4442. )
  4443. # ImRect WorkRect; /* original C++ signature */
  4444. work_rect: ImRect # Initially covers the whole scrolling region. Reduced by containers e.g columns/tables when active. Shrunk by WindowPadding*1.0 on each side. This is meant to replace ContentRegionRect over time (from 1.71+ onward).
  4445. # ImRect ParentWorkRect; /* original C++ signature */
  4446. parent_work_rect: ImRect # Backup of WorkRect before entering a container such as columns/tables. Used by e.g. SpanAllColumns functions to easily access. Stacked containers are responsible for maintaining this. // FIXME-WORKRECT: Could be a stack?
  4447. # ImRect ClipRect; /* original C++ signature */
  4448. clip_rect: ImRect # Current clipping/scissoring rectangle, evolve as we are using PushClipRect(), etc. == DrawList->clip_rect_stack.back().
  4449. # ImRect ContentRegionRect; /* original C++ signature */
  4450. content_region_rect: ImRect # FIXME: This is currently confusing/misleading. It is essentially WorkRect but not handling of scrolling. We currently rely on it as right/bottom aligned sizing operation need some size to rely on.
  4451. # ImVec2ih HitTestHoleSize; /* original C++ signature */
  4452. hit_test_hole_size: ImVec2ih # Define an optional rectangular hole where mouse will pass-through the window.
  4453. # ImVec2ih HitTestHoleOffset; /* original C++ signature */
  4454. hit_test_hole_offset: ImVec2ih
  4455. # int LastFrameActive; /* original C++ signature */
  4456. last_frame_active: int # Last frame number the window was Active.
  4457. # int LastFrameJustFocused; /* original C++ signature */
  4458. last_frame_just_focused: int # Last frame number the window was made Focused.
  4459. # float LastTimeActive; /* original C++ signature */
  4460. last_time_active: float # Last timestamp the window was Active (using float as we don't need high precision there)
  4461. # ImGuiStorage StateStorage; /* original C++ signature */
  4462. state_storage: Storage
  4463. # ImVector<ImGuiOldColumns> ColumnsStorage; /* original C++ signature */
  4464. columns_storage: ImVector_OldColumns
  4465. # float FontWindowScale; /* original C++ signature */
  4466. font_window_scale: float # User scale multiplier per-window, via SetWindowFontScale()
  4467. # float FontWindowScaleParents; /* original C++ signature */
  4468. font_window_scale_parents: float
  4469. # float FontRefSize; /* original C++ signature */
  4470. font_ref_size: float # This is a copy of window->CalcFontSize() at the time of Begin(), trying to phase out CalcFontSize() especially as it may be called on non-current window.
  4471. # int SettingsOffset; /* original C++ signature */
  4472. settings_offset: (
  4473. int # Offset into SettingsWindows[] (offsets are always valid as we only grow the array from the back)
  4474. )
  4475. # ImDrawList* DrawList; /* original C++ signature */
  4476. draw_list: ImDrawList # == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
  4477. # ImDrawList DrawListInst; /* original C++ signature */
  4478. draw_list_inst: ImDrawList
  4479. # ImGuiWindow* ParentWindow; /* original C++ signature */
  4480. parent_window: (
  4481. Window # If we are a child _or_ popup _or_ docked window, this is pointing to our parent. Otherwise None.
  4482. )
  4483. # ImGuiWindow* ParentWindowInBeginStack; /* original C++ signature */
  4484. parent_window_in_begin_stack: Window
  4485. # ImGuiWindow* RootWindow; /* original C++ signature */
  4486. root_window: Window # Point to ourself or first ancestor that is not a child window. Doesn't cross through popups/dock nodes.
  4487. # ImGuiWindow* RootWindowPopupTree; /* original C++ signature */
  4488. root_window_popup_tree: (
  4489. Window # Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child.
  4490. )
  4491. # ImGuiWindow* RootWindowDockTree; /* original C++ signature */
  4492. root_window_dock_tree: (
  4493. Window # Point to ourself or first ancestor that is not a child window. Cross through dock nodes.
  4494. )
  4495. # ImGuiWindow* RootWindowForTitleBarHighlight; /* original C++ signature */
  4496. root_window_for_title_bar_highlight: (
  4497. Window # Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
  4498. )
  4499. # ImGuiWindow* RootWindowForNav; /* original C++ signature */
  4500. root_window_for_nav: Window # Point to ourself or first ancestor which doesn't have the NavFlattened flag.
  4501. # ImGuiWindow* ParentWindowForFocusRoute; /* original C++ signature */
  4502. parent_window_for_focus_route: Window # Set to manual link a window to its logical parent so that Shortcut() chain are honored (e.g. Tool linked to Document)
  4503. # ImGuiWindow* NavLastChildNavWindow; /* original C++ signature */
  4504. nav_last_child_nav_window: Window # When going to the menu bar, we remember the child window we came from. (This could probably be made implicit if we kept g.Windows sorted by last focused including child window.)
  4505. # ImGuiID NavRootFocusScopeId; /* original C++ signature */
  4506. nav_root_focus_scope_id: ID # Focus Scope ID at the time of Begin()
  4507. # int MemoryDrawListIdxCapacity; /* original C++ signature */
  4508. memory_draw_list_idx_capacity: int # Backup of last idx/vtx count, so when waking up the window we can preallocate and avoid iterative alloc/copy
  4509. # int MemoryDrawListVtxCapacity; /* original C++ signature */
  4510. memory_draw_list_vtx_capacity: int
  4511. # bool MemoryCompacted; /* original C++ signature */
  4512. memory_compacted: bool # Set when window extraneous data have been garbage collected
  4513. # Docking
  4514. # short DockOrder; /* original C++ signature */
  4515. dock_order: int # Order of the last time the window was visible within its DockNode. This is used to reorder windows that are reappearing on the same frame. Same value between windows that were active and windows that were none are possible.
  4516. # ImGuiWindowDockStyle DockStyle; /* original C++ signature */
  4517. dock_style: WindowDockStyle
  4518. # ImGuiDockNode* DockNode; /* original C++ signature */
  4519. dock_node: DockNode # Which node are we docked into. Important: Prefer testing DockIsActive in many cases as this will still be set when the dock node is hidden.
  4520. # ImGuiDockNode* DockNodeAsHost; /* original C++ signature */
  4521. dock_node_as_host: DockNode # Which node are we owning (for parent windows)
  4522. # ImGuiID DockId; /* original C++ signature */
  4523. dock_id: ID # Backup of last valid DockNode->ID, so single window remember their dock node id even when they are not bound any more
  4524. # ImGuiWindow(ImGuiContext* context, const char* name); /* original C++ signature */
  4525. def __init__(self, context: Context, name: str) -> None:
  4526. pass
  4527. # ImGuiID GetID(const char* str, const char* str_end = NULL); /* original C++ signature */
  4528. @overload
  4529. def get_id(self, str: str, str_end: Optional[str] = None) -> ID:
  4530. """(private API)"""
  4531. pass
  4532. # ImGuiID GetID(const void* ptr); /* original C++ signature */
  4533. @overload
  4534. def get_id(self, ptr: Any) -> ID:
  4535. """(private API)"""
  4536. pass
  4537. # ImGuiID GetID(int n); /* original C++ signature */
  4538. @overload
  4539. def get_id(self, n: int) -> ID:
  4540. """(private API)"""
  4541. pass
  4542. # ImGuiID GetIDFromPos(const ImVec2& p_abs); /* original C++ signature */
  4543. def get_id_from_pos(self, p_abs: ImVec2Like) -> ID:
  4544. """(private API)"""
  4545. pass
  4546. # ImGuiID GetIDFromRectangle(const ImRect& r_abs); /* original C++ signature */
  4547. def get_id_from_rectangle(self, r_abs: ImRect) -> ID:
  4548. """(private API)"""
  4549. pass
  4550. # We don't use g.FontSize because the window may be != g.CurrentWindow.
  4551. # ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); } /* original C++ signature */
  4552. def rect(self) -> ImRect:
  4553. """(private API)"""
  4554. pass
  4555. # ImRect TitleBarRect() const { return ImRect(Pos, ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight)); } /* original C++ signature */
  4556. def title_bar_rect(self) -> ImRect:
  4557. """(private API)"""
  4558. pass
  4559. # ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight; return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight); } /* original C++ signature */
  4560. def menu_bar_rect(self) -> ImRect:
  4561. """(private API)"""
  4562. pass
  4563. # [OBSOLETE] ImGuiWindow::CalcFontSize() was removed in 1.92.0 because error-prone/misleading. You can use window->FontRefSize for a copy of g.FontSize at the time of the last Begin() call for this window.
  4564. # float CalcFontSize() const { ImGuiContext& g = *Ctx; return g.FontSizeBase * FontWindowScale * FontDpiScale * FontWindowScaleParents;
  4565. # -----------------------------------------------------------------------------
  4566. # [SECTION] Tab bar, Tab item support
  4567. # -----------------------------------------------------------------------------
  4568. class TabBarFlagsPrivate_(enum.IntFlag):
  4569. """Extend ImGuiTabBarFlags_"""
  4570. # ImGuiTabBarFlags_DockNode = 1 << 20, /* original C++ signature */
  4571. dock_node = (
  4572. enum.auto()
  4573. ) # (= 1 << 20) # Part of a dock node [we don't use this in the master branch but it facilitate branch syncing to keep this around]
  4574. # ImGuiTabBarFlags_IsFocused = 1 << 21, /* original C++ signature */
  4575. is_focused = enum.auto() # (= 1 << 21)
  4576. # ImGuiTabBarFlags_SaveSettings = 1 << 22, /* original C++ signature */
  4577. save_settings = (
  4578. enum.auto()
  4579. ) # (= 1 << 22) # FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty when reordering tabs
  4580. class TabItemFlagsPrivate_(enum.IntFlag):
  4581. """Extend ImGuiTabItemFlags_"""
  4582. # ImGuiTabItemFlags_SectionMask_ = ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_Trailing, /* original C++ signature */
  4583. section_mask_ = enum.auto() # (= TabItemFlags_Leading | TabItemFlags_Trailing)
  4584. # ImGuiTabItemFlags_NoCloseButton = 1 << 20, /* original C++ signature */
  4585. no_close_button = (
  4586. enum.auto()
  4587. ) # (= 1 << 20) # Track whether p_open was set or not (we'll need this info on the next frame to recompute ContentWidth during layout)
  4588. # ImGuiTabItemFlags_Button = 1 << 21, /* original C++ signature */
  4589. button = enum.auto() # (= 1 << 21) # Used by TabItemButton, change the tab item behavior to mimic a button
  4590. # ImGuiTabItemFlags_Invisible = 1 << 22, /* original C++ signature */
  4591. invisible = enum.auto() # (= 1 << 22) # To reserve space e.g. with ImGuiTabItemFlags_Leading
  4592. # ImGuiTabItemFlags_Unsorted = 1 << 23, /* original C++ signature */
  4593. unsorted = (
  4594. enum.auto()
  4595. ) # (= 1 << 23) # [Docking] Trailing tabs with the _Unsorted flag will be sorted based on the DockOrder of their Window.
  4596. class TabItem:
  4597. """Storage for one active tab item (sizeof() 48 bytes)"""
  4598. # ImGuiID ID; /* original C++ signature */
  4599. id_: ID
  4600. # ImGuiTabItemFlags Flags; /* original C++ signature */
  4601. flags: TabItemFlags
  4602. # ImGuiWindow* Window; /* original C++ signature */
  4603. window: Window # When TabItem is part of a DockNode's TabBar, we hold on to a window.
  4604. # int LastFrameVisible; /* original C++ signature */
  4605. last_frame_visible: int
  4606. # int LastFrameSelected; /* original C++ signature */
  4607. last_frame_selected: (
  4608. int # This allows us to infer an ordered list of the last activated tabs with little maintenance
  4609. )
  4610. # float Offset; /* original C++ signature */
  4611. offset: float # Position relative to beginning of tab bar
  4612. # float Width; /* original C++ signature */
  4613. width: float # Width currently displayed
  4614. # float ContentWidth; /* original C++ signature */
  4615. content_width: float # Width of label + padding, stored during BeginTabItem() call (misnamed as "Content" would normally imply width of label only)
  4616. # float RequestedWidth; /* original C++ signature */
  4617. requested_width: float # Width optionally requested by caller, -1.0 is unused
  4618. # ImS32 NameOffset; /* original C++ signature */
  4619. name_offset: ImS32 # When Window==None, offset to name within parent ImGuiTabBar::TabsNames
  4620. # ImS16 BeginOrder; /* original C++ signature */
  4621. begin_order: ImS16 # BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable
  4622. # ImS16 IndexDuringLayout; /* original C++ signature */
  4623. index_during_layout: ImS16 # Index only used during TabBarLayout(). Tabs gets reordered so 'Tabs[n].IndexDuringLayout == n' but may mismatch during additions.
  4624. # bool WantClose; /* original C++ signature */
  4625. want_close: bool # Marked as closed by SetTabItemClosed()
  4626. # ImGuiTabItem() { memset((void*)this, 0, sizeof(*this)); LastFrameVisible = LastFrameSelected = -1; RequestedWidth = -1.0f; NameOffset = -1; BeginOrder = IndexDuringLayout = -1; } /* original C++ signature */
  4627. def __init__(self) -> None:
  4628. pass
  4629. class TabBar:
  4630. """Storage for a tab bar (sizeof() 160 bytes)"""
  4631. # ImGuiWindow* Window; /* original C++ signature */
  4632. window: Window
  4633. # ImVector<ImGuiTabItem> Tabs; /* original C++ signature */
  4634. tabs: ImVector_TabItem
  4635. # ImGuiTabBarFlags Flags; /* original C++ signature */
  4636. flags: TabBarFlags
  4637. # ImGuiID ID; /* original C++ signature */
  4638. id_: ID # Zero for tab-bars used by docking
  4639. # ImGuiID SelectedTabId; /* original C++ signature */
  4640. selected_tab_id: ID # Selected tab/window
  4641. # ImGuiID NextSelectedTabId; /* original C++ signature */
  4642. next_selected_tab_id: ID # Next selected tab/window. Will also trigger a scrolling animation
  4643. # ImGuiID NextScrollToTabId; /* original C++ signature */
  4644. next_scroll_to_tab_id: ID
  4645. # ImGuiID VisibleTabId; /* original C++ signature */
  4646. visible_tab_id: ID # Can occasionally be != SelectedTabId (e.g. when previewing contents for Ctrl+Tab preview)
  4647. # int CurrFrameVisible; /* original C++ signature */
  4648. curr_frame_visible: int
  4649. # int PrevFrameVisible; /* original C++ signature */
  4650. prev_frame_visible: int
  4651. # ImRect BarRect; /* original C++ signature */
  4652. bar_rect: ImRect
  4653. # float BarRectPrevWidth; /* original C++ signature */
  4654. bar_rect_prev_width: (
  4655. float # Backup of previous width. When width change we enforce keep horizontal scroll on focused tab.
  4656. )
  4657. # float CurrTabsContentsHeight; /* original C++ signature */
  4658. curr_tabs_contents_height: float
  4659. # float PrevTabsContentsHeight; /* original C++ signature */
  4660. prev_tabs_contents_height: float # Record the height of contents submitted below the tab bar
  4661. # float WidthAllTabs; /* original C++ signature */
  4662. width_all_tabs: float # Actual width of all tabs (locked during layout)
  4663. # float WidthAllTabsIdeal; /* original C++ signature */
  4664. width_all_tabs_ideal: float # Ideal width if all tabs were visible and not clipped
  4665. # float ScrollingAnim; /* original C++ signature */
  4666. scrolling_anim: float
  4667. # float ScrollingTarget; /* original C++ signature */
  4668. scrolling_target: float
  4669. # float ScrollingTargetDistToVisibility; /* original C++ signature */
  4670. scrolling_target_dist_to_visibility: float
  4671. # float ScrollingSpeed; /* original C++ signature */
  4672. scrolling_speed: float
  4673. # float ScrollingRectMinX; /* original C++ signature */
  4674. scrolling_rect_min_x: float
  4675. # float ScrollingRectMaxX; /* original C++ signature */
  4676. scrolling_rect_max_x: float
  4677. # float SeparatorMinX; /* original C++ signature */
  4678. separator_min_x: float
  4679. # float SeparatorMaxX; /* original C++ signature */
  4680. separator_max_x: float
  4681. # ImGuiID ReorderRequestTabId; /* original C++ signature */
  4682. reorder_request_tab_id: ID
  4683. # ImS16 ReorderRequestOffset; /* original C++ signature */
  4684. reorder_request_offset: ImS16
  4685. # ImS8 BeginCount; /* original C++ signature */
  4686. begin_count: ImS8
  4687. # bool WantLayout; /* original C++ signature */
  4688. want_layout: bool
  4689. # bool VisibleTabWasSubmitted; /* original C++ signature */
  4690. visible_tab_was_submitted: bool
  4691. # bool TabsAddedNew; /* original C++ signature */
  4692. tabs_added_new: bool # Set to True when a new tab item or button has been added to the tab bar during last frame
  4693. # bool ScrollButtonEnabled; /* original C++ signature */
  4694. scroll_button_enabled: bool
  4695. # ImS16 TabsActiveCount; /* original C++ signature */
  4696. tabs_active_count: ImS16 # Number of tabs submitted this frame.
  4697. # ImS16 LastTabItemIdx; /* original C++ signature */
  4698. last_tab_item_idx: ImS16 # Index of last BeginTabItem() tab for use by EndTabItem()
  4699. # float ItemSpacingY; /* original C++ signature */
  4700. item_spacing_y: float
  4701. # ImVec2 FramePadding; /* original C++ signature */
  4702. frame_padding: ImVec2 # style.FramePadding locked at the time of BeginTabBar()
  4703. # ImVec2 BackupCursorPos; /* original C++ signature */
  4704. backup_cursor_pos: ImVec2
  4705. # ImGuiTextBuffer TabsNames; /* original C++ signature */
  4706. tabs_names: TextBuffer # For non-docking tab bar we re-append names in a contiguous buffer.
  4707. # ImGuiTabBar(); /* original C++ signature */
  4708. def __init__(self) -> None:
  4709. pass
  4710. # -----------------------------------------------------------------------------
  4711. # [SECTION] Table support
  4712. # -----------------------------------------------------------------------------
  4713. class TableColumn:
  4714. """[Internal] sizeof() ~ 112
  4715. We use the terminology "Enabled" to refer to a column that is not Hidden by user/api.
  4716. We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping.
  4717. This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped".
  4718. """
  4719. # ImGuiTableColumnFlags Flags; /* original C++ signature */
  4720. flags: TableColumnFlags # Flags after some patching (not directly same as provided by user). See ImGuiTableColumnFlags_
  4721. # float WidthGiven; /* original C++ signature */
  4722. width_given: float # Final/actual width visible == (MaxX - MinX), locked in TableUpdateLayout(). May be > WidthRequest to honor minimum width, may be < WidthRequest to honor shrinking columns down in tight space.
  4723. # float MinX; /* original C++ signature */
  4724. min_x: float # Absolute positions
  4725. # float MaxX; /* original C++ signature */
  4726. max_x: float
  4727. # float WidthRequest; /* original C++ signature */
  4728. width_request: float # Master width absolute value when !(Flags & _WidthStretch). When Stretch this is derived every frame from StretchWeight in TableUpdateLayout()
  4729. # float WidthAuto; /* original C++ signature */
  4730. width_auto: float # Automatic width
  4731. # float WidthMax; /* original C++ signature */
  4732. width_max: float # Maximum width (FIXME: overwritten by each instance)
  4733. # float StretchWeight; /* original C++ signature */
  4734. stretch_weight: float # Master width weight when (Flags & _WidthStretch). Often around ~1.0 initially.
  4735. # float InitStretchWeightOrWidth; /* original C++ signature */
  4736. init_stretch_weight_or_width: (
  4737. float # Value passed to TableSetupColumn(). For Width it is a content width (_without padding_).
  4738. )
  4739. # ImRect ClipRect; /* original C++ signature */
  4740. clip_rect: ImRect # Clipping rectangle for the column
  4741. # ImGuiID UserID; /* original C++ signature */
  4742. user_id: ID # Optional, value passed to TableSetupColumn()
  4743. # float WorkMinX; /* original C++ signature */
  4744. work_min_x: float # Contents region min ~(MinX + CellPaddingX + CellSpacingX1) == cursor start position when entering column
  4745. # float WorkMaxX; /* original C++ signature */
  4746. work_max_x: float # Contents region max ~(MaxX - CellPaddingX - CellSpacingX2)
  4747. # float ItemWidth; /* original C++ signature */
  4748. item_width: float # Current item width for the column, preserved across rows
  4749. # float ContentMaxXFrozen; /* original C++ signature */
  4750. content_max_x_frozen: (
  4751. float # Contents maximum position for frozen rows (apart from headers), from which we can infer content width.
  4752. )
  4753. # float ContentMaxXUnfrozen; /* original C++ signature */
  4754. content_max_x_unfrozen: float
  4755. # float ContentMaxXHeadersUsed; /* original C++ signature */
  4756. content_max_x_headers_used: float # Contents maximum position for headers rows (regardless of freezing). TableHeader() automatically softclip itself + report ideal desired size, to avoid creating extraneous draw calls
  4757. # float ContentMaxXHeadersIdeal; /* original C++ signature */
  4758. content_max_x_headers_ideal: float
  4759. # ImS16 NameOffset; /* original C++ signature */
  4760. name_offset: ImS16 # Offset into parent ColumnsNames[]
  4761. # ImGuiTableColumnIdx DisplayOrder; /* original C++ signature */
  4762. display_order: TableColumnIdx # Index within Table's IndexToDisplayOrder[] (column may be reordered by users)
  4763. # ImGuiTableColumnIdx IndexWithinEnabledSet; /* original C++ signature */
  4764. index_within_enabled_set: TableColumnIdx # Index within enabled/visible set (<= IndexToDisplayOrder)
  4765. # ImGuiTableColumnIdx PrevEnabledColumn; /* original C++ signature */
  4766. prev_enabled_column: (
  4767. TableColumnIdx # Index of prev enabled/visible column within Columns[], -1 if first enabled/visible column
  4768. )
  4769. # ImGuiTableColumnIdx NextEnabledColumn; /* original C++ signature */
  4770. next_enabled_column: (
  4771. TableColumnIdx # Index of next enabled/visible column within Columns[], -1 if last enabled/visible column
  4772. )
  4773. # ImGuiTableColumnIdx SortOrder; /* original C++ signature */
  4774. sort_order: TableColumnIdx # Index of this column within sort specs, -1 if not sorting on this column, 0 for single-sort, may be >0 on multi-sort
  4775. # ImGuiTableDrawChannelIdx DrawChannelCurrent; /* original C++ signature */
  4776. draw_channel_current: TableDrawChannelIdx # Index within DrawSplitter.Channels[]
  4777. # ImGuiTableDrawChannelIdx DrawChannelFrozen; /* original C++ signature */
  4778. draw_channel_frozen: TableDrawChannelIdx # Draw channels for frozen rows (often headers)
  4779. # ImGuiTableDrawChannelIdx DrawChannelUnfrozen; /* original C++ signature */
  4780. draw_channel_unfrozen: TableDrawChannelIdx # Draw channels for unfrozen rows
  4781. # bool IsEnabled; /* original C++ signature */
  4782. is_enabled: bool # IsUserEnabled && (Flags & ImGuiTableColumnFlags_Disabled) == 0
  4783. # bool IsUserEnabled; /* original C++ signature */
  4784. is_user_enabled: (
  4785. bool # Is the column not marked Hidden by the user? (unrelated to being off view, e.g. clipped by scrolling).
  4786. )
  4787. # bool IsUserEnabledNextFrame; /* original C++ signature */
  4788. is_user_enabled_next_frame: bool
  4789. # bool IsVisibleX; /* original C++ signature */
  4790. is_visible_x: bool # Is actually in view (e.g. overlapping the host window clipping rectangle, not scrolled).
  4791. # bool IsVisibleY; /* original C++ signature */
  4792. is_visible_y: bool
  4793. # bool IsRequestOutput; /* original C++ signature */
  4794. is_request_output: bool # Return value for TableSetColumnIndex() / TableNextColumn(): whether we request user to output contents or not.
  4795. # bool IsSkipItems; /* original C++ signature */
  4796. is_skip_items: bool # Do we want item submissions to this column to be completely ignored (no layout will happen).
  4797. # bool IsPreserveWidthAuto; /* original C++ signature */
  4798. is_preserve_width_auto: bool
  4799. # ImS8 NavLayerCurrent; /* original C++ signature */
  4800. nav_layer_current: ImS8 # ImGuiNavLayer in 1 byte
  4801. # ImU8 AutoFitQueue; /* original C++ signature */
  4802. auto_fit_queue: ImU8 # Queue of 8 values for the next 8 frames to request auto-fit
  4803. # ImU8 CannotSkipItemsQueue; /* original C++ signature */
  4804. cannot_skip_items_queue: ImU8 # Queue of 8 values for the next 8 frames to disable Clipped/SkipItem
  4805. # ImU8 SortDirectionsAvailList; /* original C++ signature */
  4806. sort_directions_avail_list: ImU8 # Ordered list of available sort directions (2-bits each, total 8-bits)
  4807. # ImGuiTableColumn() /* original C++ signature */
  4808. # {
  4809. # memset((void*)this, 0, sizeof(*this));
  4810. # StretchWeight = WidthRequest = -1.0f;
  4811. # NameOffset = -1;
  4812. # DisplayOrder = IndexWithinEnabledSet = -1;
  4813. # PrevEnabledColumn = NextEnabledColumn = -1;
  4814. # SortOrder = -1;
  4815. # SortDirection = ImGuiSortDirection_None;
  4816. # DrawChannelCurrent = DrawChannelFrozen = DrawChannelUnfrozen = (ImU8)-1;
  4817. # }
  4818. def __init__(self) -> None:
  4819. pass
  4820. class TableCellData:
  4821. """Transient cell data stored per row.
  4822. sizeof() ~ 6 bytes
  4823. """
  4824. # ImU32 BgColor; /* original C++ signature */
  4825. bg_color: ImU32 # Actual color
  4826. # ImGuiTableColumnIdx Column; /* original C++ signature */
  4827. column: TableColumnIdx # Column number
  4828. # ImGuiTableCellData(ImU32 BgColor = ImU32(), ImGuiTableColumnIdx Column = ImGuiTableColumnIdx()); /* original C++ signature */
  4829. def __init__(self, bg_color: ImU32 = ImU32(), column: Optional[TableColumnIdx] = None) -> None:
  4830. """Auto-generated default constructor with named params
  4831. Python bindings defaults:
  4832. If Column is None, then its default value will be: TableColumnIdx()
  4833. """
  4834. pass
  4835. class TableHeaderData:
  4836. """Parameters for TableAngledHeadersRowEx()
  4837. This may end up being refactored for more general purpose.
  4838. sizeof() ~ 12 bytes
  4839. """
  4840. # ImGuiTableColumnIdx Index; /* original C++ signature */
  4841. index: TableColumnIdx # Column index
  4842. # ImU32 TextColor; /* original C++ signature */
  4843. text_color: ImU32
  4844. # ImU32 BgColor0; /* original C++ signature */
  4845. bg_color0: ImU32
  4846. # ImU32 BgColor1; /* original C++ signature */
  4847. bg_color1: ImU32
  4848. # ImGuiTableHeaderData(ImGuiTableColumnIdx Index = ImGuiTableColumnIdx(), ImU32 TextColor = ImU32(), ImU32 BgColor0 = ImU32(), ImU32 BgColor1 = ImU32()); /* original C++ signature */
  4849. def __init__(
  4850. self,
  4851. index: Optional[TableColumnIdx] = None,
  4852. text_color: ImU32 = ImU32(),
  4853. bg_color0: ImU32 = ImU32(),
  4854. bg_color1: ImU32 = ImU32(),
  4855. ) -> None:
  4856. """Auto-generated default constructor with named params
  4857. Python bindings defaults:
  4858. If Index is None, then its default value will be: TableColumnIdx()
  4859. """
  4860. pass
  4861. class TableInstanceData:
  4862. """Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?)
  4863. sizeof() ~ 24 bytes
  4864. """
  4865. # ImGuiID TableInstanceID; /* original C++ signature */
  4866. table_instance_id: ID
  4867. # float LastOuterHeight; /* original C++ signature */
  4868. last_outer_height: float # Outer height from last frame
  4869. # float LastTopHeadersRowHeight; /* original C++ signature */
  4870. last_top_headers_row_height: float # Height of first consecutive header rows from last frame (FIXME: this is used assuming consecutive headers are in same frozen set)
  4871. # float LastFrozenHeight; /* original C++ signature */
  4872. last_frozen_height: float # Height of frozen section from last frame
  4873. # int HoveredRowLast; /* original C++ signature */
  4874. hovered_row_last: int # Index of row which was hovered last frame.
  4875. # int HoveredRowNext; /* original C++ signature */
  4876. hovered_row_next: int # Index of row hovered this frame, set after encountering it.
  4877. # ImGuiTableInstanceData() { TableInstanceID = 0; LastOuterHeight = LastTopHeadersRowHeight = LastFrozenHeight = 0.0f; HoveredRowLast = HoveredRowNext = -1; } /* original C++ signature */
  4878. def __init__(self) -> None:
  4879. pass
  4880. class Table:
  4881. """sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory()"""
  4882. # ImGuiID ID; /* original C++ signature */
  4883. id_: ID
  4884. # ImGuiTableFlags Flags; /* original C++ signature */
  4885. flags: TableFlags
  4886. # void* RawData; /* original C++ signature */
  4887. raw_data: Any # Single allocation to hold Columns[], DisplayOrderToIndex[], and RowCellData[]
  4888. # ImGuiTableTempData* TempData; /* original C++ signature */
  4889. temp_data: TableTempData # Transient data while table is active. Point within g.CurrentTableStack[]
  4890. # ImGuiTableFlags SettingsLoadedFlags; /* original C++ signature */
  4891. settings_loaded_flags: (
  4892. TableFlags # Which data were loaded from the .ini file (e.g. when order is not altered we won't save order)
  4893. )
  4894. # int SettingsOffset; /* original C++ signature */
  4895. settings_offset: int # Offset in g.SettingsTables
  4896. # int LastFrameActive; /* original C++ signature */
  4897. last_frame_active: int
  4898. # int ColumnsCount; /* original C++ signature */
  4899. columns_count: int # Number of columns declared in BeginTable()
  4900. # int CurrentRow; /* original C++ signature */
  4901. current_row: int
  4902. # int CurrentColumn; /* original C++ signature */
  4903. current_column: int
  4904. # ImS16 InstanceCurrent; /* original C++ signature */
  4905. instance_current: ImS16 # Count of BeginTable() calls with same ID in the same frame (generally 0). This is a little bit similar to BeginCount for a window, but multiple tables with the same ID are multiple tables, they are just synced.
  4906. # ImS16 InstanceInteracted; /* original C++ signature */
  4907. instance_interacted: ImS16 # Mark which instance (generally 0) of the same ID is being interacted with
  4908. # float RowPosY1; /* original C++ signature */
  4909. row_pos_y1: float
  4910. # float RowPosY2; /* original C++ signature */
  4911. row_pos_y2: float
  4912. # float RowMinHeight; /* original C++ signature */
  4913. row_min_height: float # Height submitted to TableNextRow()
  4914. # float RowCellPaddingY; /* original C++ signature */
  4915. row_cell_padding_y: float # Top and bottom padding. Reloaded during row change.
  4916. # float RowTextBaseline; /* original C++ signature */
  4917. row_text_baseline: float
  4918. # float RowIndentOffsetX; /* original C++ signature */
  4919. row_indent_offset_x: float
  4920. # int RowBgColorCounter; /* original C++ signature */
  4921. row_bg_color_counter: int # Counter for alternating background colors (can be fast-forwarded by e.g clipper), not same as CurrentRow because header rows typically don't increase this.
  4922. # ImU32 RowBgColor[2]; /* original C++ signature */
  4923. row_bg_color: np.ndarray # ndarray[type=ImU32, size=2] # Background color override for current row.
  4924. # ImU32 BorderColorStrong; /* original C++ signature */
  4925. border_color_strong: ImU32
  4926. # ImU32 BorderColorLight; /* original C++ signature */
  4927. border_color_light: ImU32
  4928. # float BorderX1; /* original C++ signature */
  4929. border_x1: float
  4930. # float BorderX2; /* original C++ signature */
  4931. border_x2: float
  4932. # float HostIndentX; /* original C++ signature */
  4933. host_indent_x: float
  4934. # float MinColumnWidth; /* original C++ signature */
  4935. min_column_width: float
  4936. # float OuterPaddingX; /* original C++ signature */
  4937. outer_padding_x: float
  4938. # float CellPaddingX; /* original C++ signature */
  4939. cell_padding_x: float # Padding from each borders. Locked in BeginTable()/Layout.
  4940. # float CellSpacingX1; /* original C++ signature */
  4941. cell_spacing_x1: float # Spacing between non-bordered cells. Locked in BeginTable()/Layout.
  4942. # float CellSpacingX2; /* original C++ signature */
  4943. cell_spacing_x2: float
  4944. # float InnerWidth; /* original C++ signature */
  4945. inner_width: float # User value passed to BeginTable(), see comments at the top of BeginTable() for details.
  4946. # float ColumnsGivenWidth; /* original C++ signature */
  4947. columns_given_width: float # Sum of current column width
  4948. # float ColumnsAutoFitWidth; /* original C++ signature */
  4949. columns_auto_fit_width: float # Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width submission in outer window
  4950. # float ColumnsStretchSumWeights; /* original C++ signature */
  4951. columns_stretch_sum_weights: float # Sum of weight of all enabled stretching columns
  4952. # float ResizedColumnNextWidth; /* original C++ signature */
  4953. resized_column_next_width: float
  4954. # float ResizeLockMinContentsX2; /* original C++ signature */
  4955. resize_lock_min_contents_x2: float # Lock minimum contents width while resizing down in order to not create feedback loops. But we allow growing the table.
  4956. # float RefScale; /* original C++ signature */
  4957. ref_scale: float # Reference scale to be able to rescale columns on font/dpi changes.
  4958. # float AngledHeadersHeight; /* original C++ signature */
  4959. angled_headers_height: float # Set by TableAngledHeadersRow(), used in TableUpdateLayout()
  4960. # float AngledHeadersSlope; /* original C++ signature */
  4961. angled_headers_slope: float # Set by TableAngledHeadersRow(), used in TableUpdateLayout()
  4962. # ImRect OuterRect; /* original C++ signature */
  4963. outer_rect: ImRect # Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable().
  4964. # ImRect InnerRect; /* original C++ signature */
  4965. inner_rect: (
  4966. ImRect # InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is "
  4967. )
  4968. # ImRect WorkRect; /* original C++ signature */
  4969. work_rect: ImRect
  4970. # ImRect InnerClipRect; /* original C++ signature */
  4971. inner_clip_rect: ImRect
  4972. # ImRect BgClipRect; /* original C++ signature */
  4973. bg_clip_rect: ImRect # We use this to cpu-clip cell background color fill, evolve during the frame as we cross frozen rows boundaries
  4974. # ImRect Bg0ClipRectForDrawCmd; /* original C++ signature */
  4975. bg0_clip_rect_for_draw_cmd: ImRect # Actual ImDrawCmd clip rect for BG0/1 channel. This tends to be == OuterWindow->ClipRect at BeginTable() because output in BG0/BG1 is cpu-clipped
  4976. # ImRect Bg2ClipRectForDrawCmd; /* original C++ signature */
  4977. bg2_clip_rect_for_draw_cmd: ImRect # Actual ImDrawCmd clip rect for BG2 channel. This tends to be a correct, tight-fit, because output to BG2 are done by widgets relying on regular ClipRect.
  4978. # ImRect HostClipRect; /* original C++ signature */
  4979. host_clip_rect: ImRect # This is used to check if we can eventually merge our columns draw calls into the current draw call of the current window.
  4980. # ImRect HostBackupInnerClipRect; /* original C++ signature */
  4981. host_backup_inner_clip_rect: (
  4982. ImRect # Backup of InnerWindow->ClipRect during PushTableBackground()/PopTableBackground()
  4983. )
  4984. # ImGuiWindow* OuterWindow; /* original C++ signature */
  4985. outer_window: Window # Parent window for the table
  4986. # ImGuiWindow* InnerWindow; /* original C++ signature */
  4987. inner_window: Window # Window holding the table data (== OuterWindow or a child window)
  4988. # ImGuiTextBuffer ColumnsNames; /* original C++ signature */
  4989. columns_names: TextBuffer # Contiguous buffer holding columns names
  4990. # ImDrawListSplitter* DrawSplitter; /* original C++ signature */
  4991. draw_splitter: ImDrawListSplitter # Shortcut to TempData->DrawSplitter while in table. Isolate draw commands per columns to avoid switching clip rect constantly
  4992. # ImGuiTableInstanceData InstanceDataFirst; /* original C++ signature */
  4993. instance_data_first: TableInstanceData
  4994. # ImVector<ImGuiTableInstanceData> InstanceDataExtra; /* original C++ signature */
  4995. instance_data_extra: ImVector_TableInstanceData # FIXME-OPT: Using a small-vector pattern would be good.
  4996. # ImGuiTableColumnSortSpecs SortSpecsSingle; /* original C++ signature */
  4997. sort_specs_single: TableColumnSortSpecs
  4998. # ImVector<ImGuiTableColumnSortSpecs> SortSpecsMulti; /* original C++ signature */
  4999. sort_specs_multi: ImVector_TableColumnSortSpecs # FIXME-OPT: Using a small-vector pattern would be good.
  5000. # ImGuiTableSortSpecs SortSpecs; /* original C++ signature */
  5001. sort_specs: TableSortSpecs # Public facing sorts specs, this is what we return in TableGetSortSpecs()
  5002. # ImGuiTableColumnIdx SortSpecsCount; /* original C++ signature */
  5003. sort_specs_count: TableColumnIdx
  5004. # ImGuiTableColumnIdx ColumnsEnabledCount; /* original C++ signature */
  5005. columns_enabled_count: TableColumnIdx # Number of enabled columns (<= ColumnsCount)
  5006. # ImGuiTableColumnIdx ColumnsEnabledFixedCount; /* original C++ signature */
  5007. columns_enabled_fixed_count: TableColumnIdx # Number of enabled columns using fixed width (<= ColumnsCount)
  5008. # ImGuiTableColumnIdx DeclColumnsCount; /* original C++ signature */
  5009. decl_columns_count: TableColumnIdx # Count calls to TableSetupColumn()
  5010. # ImGuiTableColumnIdx AngledHeadersCount; /* original C++ signature */
  5011. angled_headers_count: TableColumnIdx # Count columns with angled headers
  5012. # ImGuiTableColumnIdx HoveredColumnBody; /* original C++ signature */
  5013. hovered_column_body: TableColumnIdx # Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty region after the right-most column!
  5014. # ImGuiTableColumnIdx HoveredColumnBorder; /* original C++ signature */
  5015. hovered_column_border: TableColumnIdx # Index of column whose right-border is being hovered (for resizing).
  5016. # ImGuiTableColumnIdx HighlightColumnHeader; /* original C++ signature */
  5017. highlight_column_header: TableColumnIdx # Index of column which should be highlighted.
  5018. # ImGuiTableColumnIdx AutoFitSingleColumn; /* original C++ signature */
  5019. auto_fit_single_column: TableColumnIdx # Index of single column requesting auto-fit.
  5020. # ImGuiTableColumnIdx ResizedColumn; /* original C++ signature */
  5021. resized_column: TableColumnIdx # Index of column being resized. Reset when InstanceCurrent==0.
  5022. # ImGuiTableColumnIdx LastResizedColumn; /* original C++ signature */
  5023. last_resized_column: TableColumnIdx # Index of column being resized from previous frame.
  5024. # ImGuiTableColumnIdx HeldHeaderColumn; /* original C++ signature */
  5025. held_header_column: TableColumnIdx # Index of column header being held.
  5026. # ImGuiTableColumnIdx LastHeldHeaderColumn; /* original C++ signature */
  5027. last_held_header_column: TableColumnIdx # Index of column header being held from previous frame.
  5028. # ImGuiTableColumnIdx ReorderColumn; /* original C++ signature */
  5029. reorder_column: TableColumnIdx # Index of column being reordered. (not cleared)
  5030. # ImGuiTableColumnIdx ReorderColumnDstOrder; /* original C++ signature */
  5031. reorder_column_dst_order: TableColumnIdx # Requested display order of column being reordered.
  5032. # ImGuiTableColumnIdx LeftMostEnabledColumn; /* original C++ signature */
  5033. left_most_enabled_column: TableColumnIdx # Index of left-most non-hidden column.
  5034. # ImGuiTableColumnIdx RightMostEnabledColumn; /* original C++ signature */
  5035. right_most_enabled_column: TableColumnIdx # Index of right-most non-hidden column.
  5036. # ImGuiTableColumnIdx LeftMostStretchedColumn; /* original C++ signature */
  5037. left_most_stretched_column: TableColumnIdx # Index of left-most stretched column.
  5038. # ImGuiTableColumnIdx RightMostStretchedColumn; /* original C++ signature */
  5039. right_most_stretched_column: TableColumnIdx # Index of right-most stretched column.
  5040. # ImGuiTableColumnIdx ContextPopupColumn; /* original C++ signature */
  5041. context_popup_column: (
  5042. TableColumnIdx # Column right-clicked on, of -1 if opening context menu from a neutral/empty spot
  5043. )
  5044. # ImGuiTableColumnIdx FreezeRowsRequest; /* original C++ signature */
  5045. freeze_rows_request: TableColumnIdx # Requested frozen rows count
  5046. # ImGuiTableColumnIdx FreezeRowsCount; /* original C++ signature */
  5047. freeze_rows_count: (
  5048. TableColumnIdx # Actual frozen row count (== FreezeRowsRequest, or == 0 when no scrolling offset)
  5049. )
  5050. # ImGuiTableColumnIdx FreezeColumnsRequest; /* original C++ signature */
  5051. freeze_columns_request: TableColumnIdx # Requested frozen columns count
  5052. # ImGuiTableColumnIdx FreezeColumnsCount; /* original C++ signature */
  5053. freeze_columns_count: (
  5054. TableColumnIdx # Actual frozen columns count (== FreezeColumnsRequest, or == 0 when no scrolling offset)
  5055. )
  5056. # ImGuiTableColumnIdx RowCellDataCurrent; /* original C++ signature */
  5057. row_cell_data_current: TableColumnIdx # Index of current RowCellData[] entry in current row
  5058. # ImGuiTableDrawChannelIdx DummyDrawChannel; /* original C++ signature */
  5059. dummy_draw_channel: TableDrawChannelIdx # Redirect non-visible columns here.
  5060. # ImGuiTableDrawChannelIdx Bg2DrawChannelCurrent; /* original C++ signature */
  5061. bg2_draw_channel_current: TableDrawChannelIdx # For Selectable() and other widgets drawing across columns after the freezing line. Index within DrawSplitter.Channels[]
  5062. # ImGuiTableDrawChannelIdx Bg2DrawChannelUnfrozen; /* original C++ signature */
  5063. bg2_draw_channel_unfrozen: TableDrawChannelIdx
  5064. # ImS8 NavLayer; /* original C++ signature */
  5065. nav_layer: ImS8 # ImGuiNavLayer at the time of BeginTable().
  5066. # bool IsLayoutLocked; /* original C++ signature */
  5067. is_layout_locked: bool # Set by TableUpdateLayout() which is called when beginning the first row.
  5068. # bool IsInsideRow; /* original C++ signature */
  5069. is_inside_row: bool # Set when inside TableBeginRow()/TableEndRow().
  5070. # bool IsInitializing; /* original C++ signature */
  5071. is_initializing: bool
  5072. # bool IsSortSpecsDirty; /* original C++ signature */
  5073. is_sort_specs_dirty: bool
  5074. # bool IsUsingHeaders; /* original C++ signature */
  5075. is_using_headers: bool # Set when the first row had the ImGuiTableRowFlags_Headers flag.
  5076. # bool IsContextPopupOpen; /* original C++ signature */
  5077. is_context_popup_open: (
  5078. bool # Set when default context menu is open (also see: ContextPopupColumn, InstanceInteracted).
  5079. )
  5080. # bool DisableDefaultContextMenu; /* original C++ signature */
  5081. disable_default_context_menu: (
  5082. bool # Disable default context menu. You may submit your own using TableBeginContextMenuPopup()/EndPopup()
  5083. )
  5084. # bool IsSettingsRequestLoad; /* original C++ signature */
  5085. is_settings_request_load: bool
  5086. # bool IsSettingsDirty; /* original C++ signature */
  5087. is_settings_dirty: (
  5088. bool # Set when table settings have changed and needs to be reported into ImGuiTableSettings data.
  5089. )
  5090. # bool IsDefaultDisplayOrder; /* original C++ signature */
  5091. is_default_display_order: (
  5092. bool # Set when display order is unchanged from default (DisplayOrder contains 0...Count-1)
  5093. )
  5094. # bool IsResetAllRequest; /* original C++ signature */
  5095. is_reset_all_request: bool
  5096. # bool IsResetDisplayOrderRequest; /* original C++ signature */
  5097. is_reset_display_order_request: bool
  5098. # bool IsUnfrozenRows; /* original C++ signature */
  5099. is_unfrozen_rows: bool # Set when we got past the frozen row.
  5100. # bool IsDefaultSizingPolicy; /* original C++ signature */
  5101. is_default_sizing_policy: bool # Set if user didn't explicitly set a sizing policy in BeginTable()
  5102. # bool IsActiveIdAliveBeforeTable; /* original C++ signature */
  5103. is_active_id_alive_before_table: bool
  5104. # bool IsActiveIdInTable; /* original C++ signature */
  5105. is_active_id_in_table: bool
  5106. # bool HasScrollbarYCurr; /* original C++ signature */
  5107. has_scrollbar_y_curr: bool # Whether ANY instance of this table had a vertical scrollbar during the current frame.
  5108. # bool HasScrollbarYPrev; /* original C++ signature */
  5109. has_scrollbar_y_prev: bool # Whether ANY instance of this table had a vertical scrollbar during the previous.
  5110. # bool MemoryCompacted; /* original C++ signature */
  5111. memory_compacted: bool
  5112. # bool HostSkipItems; /* original C++ signature */
  5113. host_skip_items: bool # Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis
  5114. # ImGuiTable() { memset((void*)this, 0, sizeof(*this)); LastFrameActive = -1; } /* original C++ signature */
  5115. def __init__(self) -> None:
  5116. pass
  5117. class TableTempData:
  5118. """Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table).
  5119. - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure.
  5120. - We also leave out of this structure data that tend to be particularly useful for debugging/metrics.
  5121. FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs.
  5122. sizeof() ~ 136 bytes.
  5123. """
  5124. # ImGuiID WindowID; /* original C++ signature */
  5125. window_id: ID # Shortcut to g.Tables[TableIndex]->OuterWindow->ID.
  5126. # int TableIndex; /* original C++ signature */
  5127. table_index: int # Index in g.Tables.Buf[] pool
  5128. # float LastTimeActive; /* original C++ signature */
  5129. last_time_active: float # Last timestamp this structure was used
  5130. # float AngledHeadersExtraWidth; /* original C++ signature */
  5131. angled_headers_extra_width: float # Used in EndTable()
  5132. # ImVector<ImGuiTableHeaderData> AngledHeadersRequests; /* original C++ signature */
  5133. angled_headers_requests: ImVector_TableHeaderData # Used in TableAngledHeadersRow()
  5134. # ImVec2 UserOuterSize; /* original C++ signature */
  5135. user_outer_size: ImVec2 # outer_size.x passed to BeginTable()
  5136. # ImDrawListSplitter DrawSplitter; /* original C++ signature */
  5137. draw_splitter: ImDrawListSplitter
  5138. # ImRect HostBackupWorkRect; /* original C++ signature */
  5139. host_backup_work_rect: ImRect # Backup of InnerWindow->WorkRect at the end of BeginTable()
  5140. # ImRect HostBackupParentWorkRect; /* original C++ signature */
  5141. host_backup_parent_work_rect: ImRect # Backup of InnerWindow->ParentWorkRect at the end of BeginTable()
  5142. # ImVec2 HostBackupPrevLineSize; /* original C++ signature */
  5143. host_backup_prev_line_size: ImVec2 # Backup of InnerWindow->DC.PrevLineSize at the end of BeginTable()
  5144. # ImVec2 HostBackupCurrLineSize; /* original C++ signature */
  5145. host_backup_curr_line_size: ImVec2 # Backup of InnerWindow->DC.CurrLineSize at the end of BeginTable()
  5146. # ImVec2 HostBackupCursorMaxPos; /* original C++ signature */
  5147. host_backup_cursor_max_pos: ImVec2 # Backup of InnerWindow->DC.CursorMaxPos at the end of BeginTable()
  5148. # ImVec1 HostBackupColumnsOffset; /* original C++ signature */
  5149. host_backup_columns_offset: ImVec1 # Backup of OuterWindow->DC.ColumnsOffset at the end of BeginTable()
  5150. # float HostBackupItemWidth; /* original C++ signature */
  5151. host_backup_item_width: float # Backup of OuterWindow->DC.ItemWidth at the end of BeginTable()
  5152. # int HostBackupItemWidthStackSize; /* original C++ signature */
  5153. host_backup_item_width_stack_size: int # Backup of OuterWindow->DC.ItemWidthStack.Size at the end of BeginTable()
  5154. # ImGuiTableTempData() { memset((void*)this, 0, sizeof(*this)); LastTimeActive = -1.0f; } /* original C++ signature */
  5155. def __init__(self) -> None:
  5156. pass
  5157. class TableColumnSettings:
  5158. """sizeof() ~ 16"""
  5159. # float WidthOrWeight; /* original C++ signature */
  5160. width_or_weight: float
  5161. # ImGuiID UserID; /* original C++ signature */
  5162. user_id: ID
  5163. # ImGuiTableColumnIdx Index; /* original C++ signature */
  5164. index: TableColumnIdx
  5165. # ImGuiTableColumnIdx DisplayOrder; /* original C++ signature */
  5166. display_order: TableColumnIdx
  5167. # ImGuiTableColumnIdx SortOrder; /* original C++ signature */
  5168. sort_order: TableColumnIdx
  5169. # ImGuiTableColumnSettings() /* original C++ signature */
  5170. # {
  5171. # WidthOrWeight = 0.0f;
  5172. # UserID = 0;
  5173. # Index = -1;
  5174. # DisplayOrder = SortOrder = -1;
  5175. # SortDirection = ImGuiSortDirection_None;
  5176. # IsEnabled = -1;
  5177. # IsStretch = 0;
  5178. # }
  5179. def __init__(self) -> None:
  5180. pass
  5181. class TableSettings:
  5182. """This is designed to be stored in a single ImChunkStream (1 header followed by N ImGuiTableColumnSettings, etc.)"""
  5183. # ImGuiID ID; /* original C++ signature */
  5184. id_: ID # Set to 0 to invalidate/delete the setting
  5185. # ImGuiTableFlags SaveFlags; /* original C++ signature */
  5186. save_flags: TableFlags # Indicate data we want to save using the Resizable/Reorderable/Sortable/Hideable flags (could be using its own flags..)
  5187. # float RefScale; /* original C++ signature */
  5188. ref_scale: float # Reference scale to be able to rescale columns on font/dpi changes.
  5189. # ImGuiTableColumnIdx ColumnsCount; /* original C++ signature */
  5190. columns_count: TableColumnIdx
  5191. # ImGuiTableColumnIdx ColumnsCountMax; /* original C++ signature */
  5192. columns_count_max: TableColumnIdx # Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher
  5193. # bool WantApply; /* original C++ signature */
  5194. want_apply: (
  5195. bool # Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
  5196. )
  5197. # ImGuiTableSettings() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  5198. def __init__(self) -> None:
  5199. pass
  5200. # ImGuiTableColumnSettings* GetColumnSettings() { return (ImGuiTableColumnSettings*)(this + 1); } /* original C++ signature */
  5201. def get_column_settings(self) -> TableColumnSettings:
  5202. """(private API)"""
  5203. pass
  5204. # -----------------------------------------------------------------------------
  5205. # [SECTION] ImGui internal API
  5206. # No guarantee of forward compatibility here!
  5207. # -----------------------------------------------------------------------------
  5208. # Windows
  5209. # We should always have a CurrentWindow in the stack (there is an implicit "Debug" window)
  5210. # If this ever crashes because g.CurrentWindow is None, it means that either:
  5211. # - ImGui::NewFrame() has never been called, which is illegal.
  5212. # - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal.
  5213. # IMGUI_API ImGuiIO& GetIO(ImGuiContext* ctx); /* original C++ signature */
  5214. def get_io(ctx: Context) -> IO:
  5215. pass
  5216. # IMGUI_API ImGuiPlatformIO& GetPlatformIO(ImGuiContext* ctx); /* original C++ signature */
  5217. def get_platform_io(ctx: Context) -> PlatformIO:
  5218. pass
  5219. # inline float GetScale() { ImGuiContext& g = *GImGui; return g.Style._MainScale; } /* original C++ signature */
  5220. def get_scale() -> float:
  5221. """(private API)
  5222. FIXME-DPI: I don't want to formalize this just yet. Because reasons. Please don't use.
  5223. """
  5224. pass
  5225. # inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; } /* original C++ signature */
  5226. def get_current_window_read() -> Window:
  5227. """(private API)"""
  5228. pass
  5229. # IMGUI_API ImGuiWindow* GetCurrentWindow() /* original C++ signature */
  5230. # {
  5231. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5232. # // Help python users, because otherwise, this leads to an un-debuggable segfault
  5233. # IM_ASSERT(GImGui != NULL && "ImGui::GetCurrentWindow() -> ImGuiContext is NULL. This is likely because you are calling ImGui functions even before ImGui::CreateContext().");
  5234. # #endif
  5235. # ImGuiContext& g = *GImGui;
  5236. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5237. # // Help python users, because otherwise, this leads to an un-debuggable segfault
  5238. # IM_ASSERT(g.CurrentWindow != NULL && "ImGui::GetCurrentWindow() -> CurrentWindow is NULL. This is likely because you are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame().");
  5239. # #endif
  5240. # g.CurrentWindow->WriteAccessed = true;
  5241. # return g.CurrentWindow;
  5242. # }
  5243. def get_current_window() -> Window:
  5244. pass
  5245. # IMGUI_API ImGuiWindow* FindWindowByID(ImGuiID id); /* original C++ signature */
  5246. def find_window_by_id(id_: ID) -> Window:
  5247. pass
  5248. # IMGUI_API ImGuiWindow* FindWindowByName(const char* name); /* original C++ signature */
  5249. def find_window_by_name(name: str) -> Window:
  5250. pass
  5251. # IMGUI_API void UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window); /* original C++ signature */
  5252. def update_window_parent_and_root_links(window: Window, flags: WindowFlags, parent_window: Window) -> None:
  5253. pass
  5254. # IMGUI_API void UpdateWindowSkipRefresh(ImGuiWindow* window); /* original C++ signature */
  5255. def update_window_skip_refresh(window: Window) -> None:
  5256. pass
  5257. # IMGUI_API ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow* window); /* original C++ signature */
  5258. def calc_window_next_auto_fit_size(window: Window) -> ImVec2:
  5259. pass
  5260. # IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent, bool popup_hierarchy, bool dock_hierarchy); /* original C++ signature */
  5261. def is_window_child_of(window: Window, potential_parent: Window, popup_hierarchy: bool, dock_hierarchy: bool) -> bool:
  5262. pass
  5263. # IMGUI_API bool IsWindowInBeginStack(ImGuiWindow* window); /* original C++ signature */
  5264. def is_window_in_begin_stack(window: Window) -> bool:
  5265. pass
  5266. # IMGUI_API bool IsWindowWithinBeginStackOf(ImGuiWindow* window, ImGuiWindow* potential_parent); /* original C++ signature */
  5267. def is_window_within_begin_stack_of(window: Window, potential_parent: Window) -> bool:
  5268. pass
  5269. # IMGUI_API bool IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below); /* original C++ signature */
  5270. def is_window_above(potential_above: Window, potential_below: Window) -> bool:
  5271. pass
  5272. # IMGUI_API bool IsWindowNavFocusable(ImGuiWindow* window); /* original C++ signature */
  5273. def is_window_nav_focusable(window: Window) -> bool:
  5274. pass
  5275. # IMGUI_API void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0); /* original C++ signature */
  5276. def set_window_pos(window: Window, pos: ImVec2Like, cond: Cond = 0) -> None:
  5277. pass
  5278. # IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0); /* original C++ signature */
  5279. def set_window_size(window: Window, size: ImVec2Like, cond: Cond = 0) -> None:
  5280. pass
  5281. # IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0); /* original C++ signature */
  5282. def set_window_collapsed(window: Window, collapsed: bool, cond: Cond = 0) -> None:
  5283. pass
  5284. # IMGUI_API void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size); /* original C++ signature */
  5285. def set_window_hit_test_hole(window: Window, pos: ImVec2Like, size: ImVec2Like) -> None:
  5286. pass
  5287. # IMGUI_API void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window); /* original C++ signature */
  5288. def set_window_hidden_and_skip_items_for_current_frame(window: Window) -> None:
  5289. pass
  5290. # inline void SetWindowParentWindowForFocusRoute(ImGuiWindow* window, ImGuiWindow* parent_window) { window->ParentWindowForFocusRoute = parent_window; } /* original C++ signature */
  5291. def set_window_parent_window_for_focus_route(window: Window, parent_window: Window) -> None:
  5292. """(private API)
  5293. You may also use SetNextWindowClass()'s FocusRouteParentWindowId field.
  5294. """
  5295. pass
  5296. # inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); } /* original C++ signature */
  5297. def window_rect_abs_to_rel(window: Window, r: ImRect) -> ImRect:
  5298. """(private API)"""
  5299. pass
  5300. # inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); } /* original C++ signature */
  5301. def window_rect_rel_to_abs(window: Window, r: ImRect) -> ImRect:
  5302. """(private API)"""
  5303. pass
  5304. # inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x - off.x, p.y - off.y); } /* original C++ signature */
  5305. def window_pos_abs_to_rel(window: Window, p: ImVec2Like) -> ImVec2:
  5306. """(private API)"""
  5307. pass
  5308. # inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x + off.x, p.y + off.y); } /* original C++ signature */
  5309. def window_pos_rel_to_abs(window: Window, p: ImVec2Like) -> ImVec2:
  5310. """(private API)"""
  5311. pass
  5312. # Windows: Display Order and Focus Order
  5313. # IMGUI_API void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0); /* original C++ signature */
  5314. def focus_window(window: Window, flags: FocusRequestFlags = 0) -> None:
  5315. pass
  5316. # IMGUI_API void FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window, ImGuiViewport* filter_viewport, ImGuiFocusRequestFlags flags); /* original C++ signature */
  5317. def focus_top_most_window_under_one(
  5318. under_this_window: Window, ignore_window: Window, filter_viewport: Viewport, flags: FocusRequestFlags
  5319. ) -> None:
  5320. pass
  5321. # IMGUI_API void BringWindowToFocusFront(ImGuiWindow* window); /* original C++ signature */
  5322. def bring_window_to_focus_front(window: Window) -> None:
  5323. pass
  5324. # IMGUI_API void BringWindowToDisplayFront(ImGuiWindow* window); /* original C++ signature */
  5325. def bring_window_to_display_front(window: Window) -> None:
  5326. pass
  5327. # IMGUI_API void BringWindowToDisplayBack(ImGuiWindow* window); /* original C++ signature */
  5328. def bring_window_to_display_back(window: Window) -> None:
  5329. pass
  5330. # IMGUI_API void BringWindowToDisplayBehind(ImGuiWindow* window, ImGuiWindow* above_window); /* original C++ signature */
  5331. def bring_window_to_display_behind(window: Window, above_window: Window) -> None:
  5332. pass
  5333. # IMGUI_API int FindWindowDisplayIndex(ImGuiWindow* window); /* original C++ signature */
  5334. def find_window_display_index(window: Window) -> int:
  5335. pass
  5336. # IMGUI_API ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window); /* original C++ signature */
  5337. def find_bottom_most_visible_window_within_begin_stack(window: Window) -> Window:
  5338. pass
  5339. # IMGUI_API void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags); /* original C++ signature */
  5340. def set_next_window_refresh_policy(flags: WindowRefreshFlags) -> None:
  5341. """Windows: Idle, Refresh Policies [EXPERIMENTAL]"""
  5342. pass
  5343. # Fonts, drawing
  5344. # IMGUI_API void RegisterUserTexture(ImTextureData* tex); /* original C++ signature */
  5345. def register_user_texture(tex: ImTextureData) -> None:
  5346. """Register external texture. EXPERIMENTAL."""
  5347. pass
  5348. # IMGUI_API void UnregisterUserTexture(ImTextureData* tex); /* original C++ signature */
  5349. def unregister_user_texture(tex: ImTextureData) -> None:
  5350. pass
  5351. # IMGUI_API void RegisterFontAtlas(ImFontAtlas* atlas); /* original C++ signature */
  5352. def register_font_atlas(atlas: ImFontAtlas) -> None:
  5353. pass
  5354. # IMGUI_API void UnregisterFontAtlas(ImFontAtlas* atlas); /* original C++ signature */
  5355. def unregister_font_atlas(atlas: ImFontAtlas) -> None:
  5356. pass
  5357. # IMGUI_API void SetCurrentFont(ImFont* font, float font_size_before_scaling, float font_size_after_scaling); /* original C++ signature */
  5358. def set_current_font(font: ImFont, font_size_before_scaling: float, font_size_after_scaling: float) -> None:
  5359. pass
  5360. # IMGUI_API void UpdateCurrentFontSize(float restore_font_size_after_scaling); /* original C++ signature */
  5361. def update_current_font_size(restore_font_size_after_scaling: float) -> None:
  5362. pass
  5363. # IMGUI_API void SetFontRasterizerDensity(float rasterizer_density); /* original C++ signature */
  5364. def set_font_rasterizer_density(rasterizer_density: float) -> None:
  5365. pass
  5366. # inline float GetFontRasterizerDensity() { return GImGui->FontRasterizerDensity; } /* original C++ signature */
  5367. def get_font_rasterizer_density() -> float:
  5368. """(private API)"""
  5369. pass
  5370. # inline float GetRoundedFontSize(float size) { return IM_ROUND(size); } /* original C++ signature */
  5371. def get_rounded_font_size(size: float) -> float:
  5372. """(private API)"""
  5373. pass
  5374. # IMGUI_API ImFont* GetDefaultFont(); /* original C++ signature */
  5375. def get_default_font() -> ImFont:
  5376. pass
  5377. # IMGUI_API void PushPasswordFont(); /* original C++ signature */
  5378. def push_password_font() -> None:
  5379. pass
  5380. # IMGUI_API void PopPasswordFont(); /* original C++ signature */
  5381. def pop_password_font() -> None:
  5382. pass
  5383. # inline ImDrawList* GetForegroundDrawList(ImGuiWindow* window) { return GetForegroundDrawList(window->Viewport); } /* original C++ signature */
  5384. def get_foreground_draw_list(window: Window) -> ImDrawList:
  5385. """(private API)"""
  5386. pass
  5387. # IMGUI_API void AddDrawListToDrawDataEx(ImDrawData* draw_data, ImVector<ImDrawList*>* out_list, ImDrawList* draw_list); /* original C++ signature */
  5388. def add_draw_list_to_draw_data_ex(
  5389. draw_data: ImDrawData, out_list: ImVector_ImDrawList_ptr, draw_list: ImDrawList
  5390. ) -> None:
  5391. pass
  5392. # Init
  5393. # IMGUI_API void Initialize(); /* original C++ signature */
  5394. def initialize() -> None:
  5395. pass
  5396. # IMGUI_API void Shutdown(); /* original C++ signature */
  5397. def shutdown() -> None:
  5398. """Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext()."""
  5399. pass
  5400. # Context name & generic context hooks
  5401. # IMGUI_API void SetContextName(ImGuiContext* ctx, const char* name); /* original C++ signature */
  5402. def set_context_name(ctx: Context, name: str) -> None:
  5403. pass
  5404. # IMGUI_API ImGuiID AddContextHook(ImGuiContext* ctx, const ImGuiContextHook* hook); /* original C++ signature */
  5405. def add_context_hook(ctx: Context, hook: ContextHook) -> ID:
  5406. pass
  5407. # IMGUI_API void RemoveContextHook(ImGuiContext* ctx, ImGuiID hook_to_remove); /* original C++ signature */
  5408. def remove_context_hook(ctx: Context, hook_to_remove: ID) -> None:
  5409. pass
  5410. # IMGUI_API void CallContextHooks(ImGuiContext* ctx, ImGuiContextHookType type); /* original C++ signature */
  5411. def call_context_hooks(ctx: Context, type: ContextHookType) -> None:
  5412. pass
  5413. # NewFrame
  5414. # IMGUI_API void UpdateInputEvents(bool trickle_fast_inputs); /* original C++ signature */
  5415. def update_input_events(trickle_fast_inputs: bool) -> None:
  5416. pass
  5417. # IMGUI_API void UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos); /* original C++ signature */
  5418. def update_hovered_window_and_capture_flags(mouse_pos: ImVec2Like) -> None:
  5419. pass
  5420. # IMGUI_API void StartMouseMovingWindow(ImGuiWindow* window); /* original C++ signature */
  5421. def start_mouse_moving_window(window: Window) -> None:
  5422. pass
  5423. # IMGUI_API void StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock); /* original C++ signature */
  5424. def start_mouse_moving_window_or_node(window: Window, node: DockNode, undock: bool) -> None:
  5425. pass
  5426. # IMGUI_API void StopMouseMovingWindow(); /* original C++ signature */
  5427. def stop_mouse_moving_window() -> None:
  5428. pass
  5429. # IMGUI_API void UpdateMouseMovingWindowNewFrame(); /* original C++ signature */
  5430. def update_mouse_moving_window_new_frame() -> None:
  5431. pass
  5432. # IMGUI_API void UpdateMouseMovingWindowEndFrame(); /* original C++ signature */
  5433. def update_mouse_moving_window_end_frame() -> None:
  5434. pass
  5435. # Viewports
  5436. # IMGUI_API void TranslateWindowsInViewport(ImGuiViewportP* viewport, const ImVec2& old_pos, const ImVec2& new_pos, const ImVec2& old_size, const ImVec2& new_size); /* original C++ signature */
  5437. def translate_windows_in_viewport(
  5438. viewport: ViewportP, old_pos: ImVec2Like, new_pos: ImVec2Like, old_size: ImVec2Like, new_size: ImVec2Like
  5439. ) -> None:
  5440. pass
  5441. # IMGUI_API void ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale); /* original C++ signature */
  5442. def scale_windows_in_viewport(viewport: ViewportP, scale: float) -> None:
  5443. pass
  5444. # IMGUI_API void DestroyPlatformWindow(ImGuiViewportP* viewport); /* original C++ signature */
  5445. def destroy_platform_window(viewport: ViewportP) -> None:
  5446. pass
  5447. # IMGUI_API void SetWindowViewport(ImGuiWindow* window, ImGuiViewportP* viewport); /* original C++ signature */
  5448. def set_window_viewport(window: Window, viewport: ViewportP) -> None:
  5449. pass
  5450. # IMGUI_API void SetCurrentViewport(ImGuiWindow* window, ImGuiViewportP* viewport); /* original C++ signature */
  5451. def set_current_viewport(window: Window, viewport: ViewportP) -> None:
  5452. pass
  5453. # IMGUI_API const ImGuiPlatformMonitor* GetViewportPlatformMonitor(ImGuiViewport* viewport); /* original C++ signature */
  5454. def get_viewport_platform_monitor(viewport: Viewport) -> PlatformMonitor:
  5455. pass
  5456. # IMGUI_API ImGuiViewportP* FindHoveredViewportFromPlatformWindowStack(const ImVec2& mouse_platform_pos); /* original C++ signature */
  5457. def find_hovered_viewport_from_platform_window_stack(mouse_platform_pos: ImVec2Like) -> ViewportP:
  5458. pass
  5459. # Settings
  5460. # IMGUI_API void MarkIniSettingsDirty(); /* original C++ signature */
  5461. @overload
  5462. def mark_ini_settings_dirty() -> None:
  5463. pass
  5464. # IMGUI_API void MarkIniSettingsDirty(ImGuiWindow* window); /* original C++ signature */
  5465. @overload
  5466. def mark_ini_settings_dirty(window: Window) -> None:
  5467. pass
  5468. # IMGUI_API void ClearIniSettings(); /* original C++ signature */
  5469. def clear_ini_settings() -> None:
  5470. pass
  5471. # IMGUI_API void AddSettingsHandler(const ImGuiSettingsHandler* handler); /* original C++ signature */
  5472. def add_settings_handler(handler: SettingsHandler) -> None:
  5473. pass
  5474. # IMGUI_API void RemoveSettingsHandler(const char* type_name); /* original C++ signature */
  5475. def remove_settings_handler(type_name: str) -> None:
  5476. pass
  5477. # IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name); /* original C++ signature */
  5478. def find_settings_handler(type_name: str) -> SettingsHandler:
  5479. pass
  5480. # Settings - Windows
  5481. # IMGUI_API ImGuiWindowSettings* CreateNewWindowSettings(const char* name); /* original C++ signature */
  5482. def create_new_window_settings(name: str) -> WindowSettings:
  5483. pass
  5484. # IMGUI_API ImGuiWindowSettings* FindWindowSettingsByID(ImGuiID id); /* original C++ signature */
  5485. def find_window_settings_by_id(id_: ID) -> WindowSettings:
  5486. pass
  5487. # IMGUI_API ImGuiWindowSettings* FindWindowSettingsByWindow(ImGuiWindow* window); /* original C++ signature */
  5488. def find_window_settings_by_window(window: Window) -> WindowSettings:
  5489. pass
  5490. # IMGUI_API void ClearWindowSettings(const char* name); /* original C++ signature */
  5491. def clear_window_settings(name: str) -> None:
  5492. pass
  5493. # IMGUI_API void LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count); /* original C++ signature */
  5494. def localize_register_entries(entries: LocEntry, count: int) -> None:
  5495. """Localization"""
  5496. pass
  5497. # inline const char* LocalizeGetMsg(ImGuiLocKey key) { ImGuiContext& g = *GImGui; const char* msg = g.LocalizationTable[key]; return msg ? msg : "*Missing Text*"; } /* original C++ signature */
  5498. def localize_get_msg(key: LocKey) -> str:
  5499. """(private API)"""
  5500. pass
  5501. # Scrolling
  5502. # IMGUI_API void SetScrollX(ImGuiWindow* window, float scroll_x); /* original C++ signature */
  5503. def set_scroll_x(window: Window, scroll_x: float) -> None:
  5504. pass
  5505. # IMGUI_API void SetScrollY(ImGuiWindow* window, float scroll_y); /* original C++ signature */
  5506. def set_scroll_y(window: Window, scroll_y: float) -> None:
  5507. pass
  5508. # IMGUI_API void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio); /* original C++ signature */
  5509. def set_scroll_from_pos_x(window: Window, local_x: float, center_x_ratio: float) -> None:
  5510. pass
  5511. # IMGUI_API void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio); /* original C++ signature */
  5512. def set_scroll_from_pos_y(window: Window, local_y: float, center_y_ratio: float) -> None:
  5513. pass
  5514. # Early work-in-progress API (ScrollToItem() will become public)
  5515. # IMGUI_API void ScrollToItem(ImGuiScrollFlags flags = 0); /* original C++ signature */
  5516. def scroll_to_item(flags: ScrollFlags = 0) -> None:
  5517. pass
  5518. # IMGUI_API void ScrollToRect(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0); /* original C++ signature */
  5519. def scroll_to_rect(window: Window, rect: ImRect, flags: ScrollFlags = 0) -> None:
  5520. pass
  5521. # IMGUI_API ImVec2 ScrollToRectEx(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0); /* original C++ signature */
  5522. def scroll_to_rect_ex(window: Window, rect: ImRect, flags: ScrollFlags = 0) -> ImVec2:
  5523. pass
  5524. # inline void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& rect) { ScrollToRect(window, rect, ImGuiScrollFlags_KeepVisibleEdgeY); } /* original C++ signature */
  5525. def scroll_to_bring_rect_into_view(window: Window, rect: ImRect) -> None:
  5526. """#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
  5527. (private API)
  5528. """
  5529. pass
  5530. ##endif
  5531. # Basic Accessors
  5532. # inline ImGuiItemStatusFlags GetItemStatusFlags() { ImGuiContext& g = *GImGui; return g.LastItemData.StatusFlags; } /* original C++ signature */
  5533. def get_item_status_flags() -> ItemStatusFlags:
  5534. """(private API)"""
  5535. pass
  5536. # inline ImGuiID GetActiveID() { ImGuiContext& g = *GImGui; return g.ActiveId; } /* original C++ signature */
  5537. def get_active_id() -> ID:
  5538. """(private API)"""
  5539. pass
  5540. # inline ImGuiID GetFocusID() { ImGuiContext& g = *GImGui; return g.NavId; } /* original C++ signature */
  5541. def get_focus_id() -> ID:
  5542. """(private API)"""
  5543. pass
  5544. # IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window); /* original C++ signature */
  5545. def set_active_id(id_: ID, window: Window) -> None:
  5546. pass
  5547. # IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow* window); /* original C++ signature */
  5548. def set_focus_id(id_: ID, window: Window) -> None:
  5549. pass
  5550. # IMGUI_API void ClearActiveID(); /* original C++ signature */
  5551. def clear_active_id() -> None:
  5552. pass
  5553. # IMGUI_API ImGuiID GetHoveredID(); /* original C++ signature */
  5554. def get_hovered_id() -> ID:
  5555. pass
  5556. # IMGUI_API void SetHoveredID(ImGuiID id); /* original C++ signature */
  5557. def set_hovered_id(id_: ID) -> None:
  5558. pass
  5559. # IMGUI_API void KeepAliveID(ImGuiID id); /* original C++ signature */
  5560. def keep_alive_id(id_: ID) -> None:
  5561. pass
  5562. # IMGUI_API void MarkItemEdited(ImGuiID id); /* original C++ signature */
  5563. def mark_item_edited(id_: ID) -> None:
  5564. """Mark data associated to given item as "edited", used by IsItemDeactivatedAfterEdit() function."""
  5565. pass
  5566. # IMGUI_API void PushOverrideID(ImGuiID id); /* original C++ signature */
  5567. def push_override_id(id_: ID) -> None:
  5568. """Push given value as-is at the top of the ID stack (whereas PushID combines old and new hashes)"""
  5569. pass
  5570. # IMGUI_API ImGuiID GetIDWithSeed(const char* str_id_begin, const char* str_id_end, ImGuiID seed); /* original C++ signature */
  5571. @overload
  5572. def get_id_with_seed(str_id_begin: str, str_id_end: str, seed: ID) -> ID:
  5573. pass
  5574. # IMGUI_API ImGuiID GetIDWithSeed(int n, ImGuiID seed); /* original C++ signature */
  5575. @overload
  5576. def get_id_with_seed(n: int, seed: ID) -> ID:
  5577. pass
  5578. # IMGUI_API void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f); /* original C++ signature */
  5579. @overload
  5580. def item_size(size: ImVec2Like, text_baseline_y: float = -1.0) -> None:
  5581. """Basic Helpers for widget code"""
  5582. pass
  5583. # inline void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f) { ItemSize(bb.GetSize(), text_baseline_y); } /* original C++ signature */
  5584. @overload
  5585. def item_size(bb: ImRect, text_baseline_y: float = -1.0) -> None:
  5586. """(private API)
  5587. FIXME: This is a misleading API since we expect CursorPos to be bb.Min.
  5588. """
  5589. pass
  5590. # IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0); /* original C++ signature */
  5591. def item_add(bb: ImRect, id_: ID, nav_bb: Optional[ImRect] = None, extra_flags: ItemFlags = 0) -> bool:
  5592. pass
  5593. # IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flags); /* original C++ signature */
  5594. def item_hoverable(bb: ImRect, id_: ID, item_flags: ItemFlags) -> bool:
  5595. pass
  5596. # IMGUI_API bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flags = 0); /* original C++ signature */
  5597. def is_window_content_hoverable(window: Window, flags: HoveredFlags = 0) -> bool:
  5598. pass
  5599. # IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id); /* original C++ signature */
  5600. def is_clipped_ex(bb: ImRect, id_: ID) -> bool:
  5601. pass
  5602. # IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect); /* original C++ signature */
  5603. def set_last_item_data(item_id: ID, item_flags: ItemFlags, status_flags: ItemStatusFlags, item_rect: ImRect) -> None:
  5604. pass
  5605. # IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h); /* original C++ signature */
  5606. def calc_item_size(size: ImVec2Like, default_w: float, default_h: float) -> ImVec2:
  5607. pass
  5608. # IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x); /* original C++ signature */
  5609. def calc_wrap_width_for_pos(pos: ImVec2Like, wrap_pos_x: float) -> float:
  5610. pass
  5611. # IMGUI_API void PushMultiItemsWidths(int components, float width_full); /* original C++ signature */
  5612. def push_multi_items_widths(components: int, width_full: float) -> None:
  5613. pass
  5614. # IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess, float width_min); /* original C++ signature */
  5615. def shrink_widths(items: ShrinkWidthItem, count: int, width_excess: float, width_min: float) -> None:
  5616. pass
  5617. # IMGUI_API void CalcClipRectVisibleItemsY(const ImRect& clip_rect, const ImVec2& pos, float items_height, int* out_visible_start, int* out_visible_end); /* original C++ signature */
  5618. def calc_clip_rect_visible_items_y(
  5619. clip_rect: ImRect, pos: ImVec2Like, items_height: float, out_visible_start: int, out_visible_end: int
  5620. ) -> Tuple[int, int]:
  5621. pass
  5622. # Parameter stacks (shared)
  5623. # IMGUI_API const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx); /* original C++ signature */
  5624. def get_style_var_info(idx: StyleVar) -> StyleVarInfo:
  5625. pass
  5626. # IMGUI_API void BeginDisabledOverrideReenable(); /* original C++ signature */
  5627. def begin_disabled_override_reenable() -> None:
  5628. pass
  5629. # IMGUI_API void EndDisabledOverrideReenable(); /* original C++ signature */
  5630. def end_disabled_override_reenable() -> None:
  5631. pass
  5632. # Logging/Capture
  5633. # IMGUI_API void LogBegin(ImGuiLogFlags flags, int auto_open_depth); /* original C++ signature */
  5634. def log_begin(flags: LogFlags, auto_open_depth: int) -> None:
  5635. """-> BeginCapture() when we design v2 api, for now stay under the radar by using the old name."""
  5636. pass
  5637. # IMGUI_API void LogToBuffer(int auto_open_depth = -1); /* original C++ signature */
  5638. def log_to_buffer(auto_open_depth: int = -1) -> None:
  5639. """Start logging/capturing to internal buffer"""
  5640. pass
  5641. # IMGUI_API void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL); /* original C++ signature */
  5642. def log_rendered_text(ref_pos: ImVec2Like, text: str, text_end: Optional[str] = None) -> None:
  5643. pass
  5644. # IMGUI_API void LogSetNextTextDecoration(const char* prefix, const char* suffix); /* original C++ signature */
  5645. def log_set_next_text_decoration(prefix: str, suffix: str) -> None:
  5646. pass
  5647. # Childs
  5648. # IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags); /* original C++ signature */
  5649. def begin_child_ex(
  5650. name: str, id_: ID, size_arg: ImVec2Like, child_flags: ChildFlags, window_flags: WindowFlags
  5651. ) -> bool:
  5652. pass
  5653. # IMGUI_API ImGuiWindow* FindFrontMostVisibleChildWindow(ImGuiWindow* window); /* original C++ signature */
  5654. def find_front_most_visible_child_window(window: Window) -> Window:
  5655. pass
  5656. # Popups, Modals
  5657. # IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_window_flags); /* original C++ signature */
  5658. def begin_popup_ex(id_: ID, extra_window_flags: WindowFlags) -> bool:
  5659. pass
  5660. # IMGUI_API bool BeginPopupMenuEx(ImGuiID id, const char* label, ImGuiWindowFlags extra_window_flags); /* original C++ signature */
  5661. def begin_popup_menu_ex(id_: ID, label: str, extra_window_flags: WindowFlags) -> bool:
  5662. pass
  5663. # IMGUI_API void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None); /* original C++ signature */
  5664. def open_popup_ex(id_: ID, popup_flags: PopupFlags = PopupFlags_None) -> None:
  5665. pass
  5666. # IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup); /* original C++ signature */
  5667. def close_popup_to_level(remaining: int, restore_focus_to_window_under_popup: bool) -> None:
  5668. pass
  5669. # IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup); /* original C++ signature */
  5670. def close_popups_over_window(ref_window: Window, restore_focus_to_window_under_popup: bool) -> None:
  5671. pass
  5672. # IMGUI_API void ClosePopupsExceptModals(); /* original C++ signature */
  5673. def close_popups_except_modals() -> None:
  5674. pass
  5675. # IMGUI_API bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags); /* original C++ signature */
  5676. def is_popup_open(id_: ID, popup_flags: PopupFlags) -> bool:
  5677. pass
  5678. # IMGUI_API ImRect GetPopupAllowedExtentRect(ImGuiWindow* window); /* original C++ signature */
  5679. def get_popup_allowed_extent_rect(window: Window) -> ImRect:
  5680. pass
  5681. # IMGUI_API ImGuiWindow* GetTopMostPopupModal(); /* original C++ signature */
  5682. def get_top_most_popup_modal() -> Window:
  5683. pass
  5684. # IMGUI_API ImGuiWindow* GetTopMostAndVisiblePopupModal(); /* original C++ signature */
  5685. def get_top_most_and_visible_popup_modal() -> Window:
  5686. pass
  5687. # IMGUI_API ImGuiWindow* FindBlockingModal(ImGuiWindow* window); /* original C++ signature */
  5688. def find_blocking_modal(window: Window) -> Window:
  5689. pass
  5690. # IMGUI_API ImVec2 FindBestWindowPosForPopup(ImGuiWindow* window); /* original C++ signature */
  5691. def find_best_window_pos_for_popup(window: Window) -> ImVec2:
  5692. pass
  5693. # IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy); /* original C++ signature */
  5694. def find_best_window_pos_for_popup_ex(
  5695. ref_pos: ImVec2Like, size: ImVec2Like, last_dir: Dir, r_outer: ImRect, r_avoid: ImRect, policy: PopupPositionPolicy
  5696. ) -> ImVec2:
  5697. pass
  5698. # IMGUI_API ImGuiMouseButton GetMouseButtonFromPopupFlags(ImGuiPopupFlags flags); /* original C++ signature */
  5699. def get_mouse_button_from_popup_flags(flags: PopupFlags) -> MouseButton:
  5700. pass
  5701. # IMGUI_API bool IsPopupOpenRequestForItem(ImGuiPopupFlags flags, ImGuiID id); /* original C++ signature */
  5702. def is_popup_open_request_for_item(flags: PopupFlags, id_: ID) -> bool:
  5703. pass
  5704. # IMGUI_API bool IsPopupOpenRequestForWindow(ImGuiPopupFlags flags); /* original C++ signature */
  5705. def is_popup_open_request_for_window(flags: PopupFlags) -> bool:
  5706. pass
  5707. # Tooltips
  5708. # IMGUI_API bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags); /* original C++ signature */
  5709. def begin_tooltip_ex(tooltip_flags: TooltipFlags, extra_window_flags: WindowFlags) -> bool:
  5710. pass
  5711. # IMGUI_API bool BeginTooltipHidden(); /* original C++ signature */
  5712. def begin_tooltip_hidden() -> bool:
  5713. pass
  5714. # Menus
  5715. # IMGUI_API bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags); /* original C++ signature */
  5716. def begin_viewport_side_bar(name: str, viewport: Viewport, dir: Dir, size: float, window_flags: WindowFlags) -> bool:
  5717. pass
  5718. # IMGUI_API bool BeginMenuEx(const char* label, const char* icon, bool enabled = true); /* original C++ signature */
  5719. def begin_menu_ex(label: str, icon: str, enabled: bool = True) -> bool:
  5720. pass
  5721. # IMGUI_API bool MenuItemEx(const char* label, const char* icon, const char* shortcut = NULL, bool selected = false, bool enabled = true); /* original C++ signature */
  5722. def menu_item_ex(
  5723. label: str, icon: str, shortcut: Optional[str] = None, selected: bool = False, enabled: bool = True
  5724. ) -> bool:
  5725. pass
  5726. # Combos
  5727. # IMGUI_API bool BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags flags); /* original C++ signature */
  5728. def begin_combo_popup(popup_id: ID, bb: ImRect, flags: ComboFlags) -> bool:
  5729. pass
  5730. # IMGUI_API bool BeginComboPreview(); /* original C++ signature */
  5731. def begin_combo_preview() -> bool:
  5732. pass
  5733. # IMGUI_API void EndComboPreview(); /* original C++ signature */
  5734. def end_combo_preview() -> None:
  5735. pass
  5736. # Keyboard/Gamepad Navigation
  5737. # IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit); /* original C++ signature */
  5738. def nav_init_window(window: Window, force_reinit: bool) -> None:
  5739. pass
  5740. # IMGUI_API void NavInitRequestApplyResult(); /* original C++ signature */
  5741. def nav_init_request_apply_result() -> None:
  5742. pass
  5743. # IMGUI_API bool NavMoveRequestButNoResultYet(); /* original C++ signature */
  5744. def nav_move_request_but_no_result_yet() -> bool:
  5745. pass
  5746. # IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags); /* original C++ signature */
  5747. def nav_move_request_submit(move_dir: Dir, clip_dir: Dir, move_flags: NavMoveFlags, scroll_flags: ScrollFlags) -> None:
  5748. pass
  5749. # IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags); /* original C++ signature */
  5750. def nav_move_request_forward(move_dir: Dir, clip_dir: Dir, move_flags: NavMoveFlags, scroll_flags: ScrollFlags) -> None:
  5751. pass
  5752. # IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result); /* original C++ signature */
  5753. def nav_move_request_resolve_with_last_item(result: NavItemData) -> None:
  5754. pass
  5755. # IMGUI_API void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, const ImGuiTreeNodeStackData* tree_node_data); /* original C++ signature */
  5756. def nav_move_request_resolve_with_past_tree_node(result: NavItemData, tree_node_data: TreeNodeStackData) -> None:
  5757. pass
  5758. # IMGUI_API void NavMoveRequestCancel(); /* original C++ signature */
  5759. def nav_move_request_cancel() -> None:
  5760. pass
  5761. # IMGUI_API void NavMoveRequestApplyResult(); /* original C++ signature */
  5762. def nav_move_request_apply_result() -> None:
  5763. pass
  5764. # IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags); /* original C++ signature */
  5765. def nav_move_request_try_wrapping(window: Window, move_flags: NavMoveFlags) -> None:
  5766. pass
  5767. # IMGUI_API void NavHighlightActivated(ImGuiID id); /* original C++ signature */
  5768. def nav_highlight_activated(id_: ID) -> None:
  5769. pass
  5770. # IMGUI_API void NavClearPreferredPosForAxis(ImGuiAxis axis); /* original C++ signature */
  5771. def nav_clear_preferred_pos_for_axis(axis: Axis) -> None:
  5772. pass
  5773. # IMGUI_API void SetNavCursorVisibleAfterMove(); /* original C++ signature */
  5774. def set_nav_cursor_visible_after_move() -> None:
  5775. pass
  5776. # IMGUI_API void NavUpdateCurrentWindowIsScrollPushableX(); /* original C++ signature */
  5777. def nav_update_current_window_is_scroll_pushable_x() -> None:
  5778. pass
  5779. # IMGUI_API void SetNavWindow(ImGuiWindow* window); /* original C++ signature */
  5780. def set_nav_window(window: Window) -> None:
  5781. pass
  5782. # IMGUI_API void SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id, const ImRect& rect_rel); /* original C++ signature */
  5783. def set_nav_id(id_: ID, nav_layer: NavLayer, focus_scope_id: ID, rect_rel: ImRect) -> None:
  5784. pass
  5785. # IMGUI_API void SetNavFocusScope(ImGuiID focus_scope_id); /* original C++ signature */
  5786. def set_nav_focus_scope(focus_scope_id: ID) -> None:
  5787. pass
  5788. # Focus/Activation
  5789. # This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are
  5790. # much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones.
  5791. # IMGUI_API void FocusItem(); /* original C++ signature */
  5792. def focus_item() -> None:
  5793. """Focus last item (no selection/activation)."""
  5794. pass
  5795. # IMGUI_API void ActivateItemByID(ImGuiID id); /* original C++ signature */
  5796. def activate_item_by_id(id_: ID) -> None:
  5797. """Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again. Was called 'ActivateItem()' before 1.89.7."""
  5798. pass
  5799. # Inputs
  5800. # FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions.
  5801. # inline bool IsNamedKey(ImGuiKey key) { return key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END; } /* original C++ signature */
  5802. def is_named_key(key: Key) -> bool:
  5803. """(private API)"""
  5804. pass
  5805. # inline bool IsNamedKeyOrMod(ImGuiKey key) { return (key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END) || key == ImGuiMod_Ctrl || key == ImGuiMod_Shift || key == ImGuiMod_Alt || key == ImGuiMod_Super; } /* original C++ signature */
  5806. def is_named_key_or_mod(key: Key) -> bool:
  5807. """(private API)"""
  5808. pass
  5809. # inline bool IsLegacyKey(ImGuiKey key) { return key >= ImGuiKey_LegacyNativeKey_BEGIN && key < ImGuiKey_LegacyNativeKey_END; } /* original C++ signature */
  5810. def is_legacy_key(key: Key) -> bool:
  5811. """(private API)"""
  5812. pass
  5813. # inline bool IsKeyboardKey(ImGuiKey key) { return key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END; } /* original C++ signature */
  5814. def is_keyboard_key(key: Key) -> bool:
  5815. """(private API)"""
  5816. pass
  5817. # inline bool IsGamepadKey(ImGuiKey key) { return key >= ImGuiKey_Gamepad_BEGIN && key < ImGuiKey_Gamepad_END; } /* original C++ signature */
  5818. def is_gamepad_key(key: Key) -> bool:
  5819. """(private API)"""
  5820. pass
  5821. # inline bool IsMouseKey(ImGuiKey key) { return key >= ImGuiKey_Mouse_BEGIN && key < ImGuiKey_Mouse_END; } /* original C++ signature */
  5822. def is_mouse_key(key: Key) -> bool:
  5823. """(private API)"""
  5824. pass
  5825. # inline bool IsAliasKey(ImGuiKey key) { return key >= ImGuiKey_Aliases_BEGIN && key < ImGuiKey_Aliases_END; } /* original C++ signature */
  5826. def is_alias_key(key: Key) -> bool:
  5827. """(private API)"""
  5828. pass
  5829. # inline bool IsLRModKey(ImGuiKey key) { return key >= ImGuiKey_LeftCtrl && key <= ImGuiKey_RightSuper; } /* original C++ signature */
  5830. def is_lr_mod_key(key: Key) -> bool:
  5831. """(private API)"""
  5832. pass
  5833. # ImGuiKeyChord FixupKeyChord(ImGuiKeyChord key_chord); /* original C++ signature */
  5834. def fixup_key_chord(key_chord: KeyChord) -> KeyChord:
  5835. """(private API)"""
  5836. pass
  5837. # inline ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key) /* original C++ signature */
  5838. # {
  5839. # if (key == ImGuiMod_Ctrl) return ImGuiKey_ReservedForModCtrl;
  5840. # if (key == ImGuiMod_Shift) return ImGuiKey_ReservedForModShift;
  5841. # if (key == ImGuiMod_Alt) return ImGuiKey_ReservedForModAlt;
  5842. # if (key == ImGuiMod_Super) return ImGuiKey_ReservedForModSuper;
  5843. # return key;
  5844. # }
  5845. def convert_single_mod_flag_to_key(key: Key) -> Key:
  5846. """(private API)"""
  5847. pass
  5848. # IMGUI_API ImGuiKeyData* GetKeyData(ImGuiContext* ctx, ImGuiKey key); /* original C++ signature */
  5849. @overload
  5850. def get_key_data(ctx: Context, key: Key) -> KeyData:
  5851. pass
  5852. # inline ImGuiKeyData* GetKeyData(ImGuiKey key) { ImGuiContext& g = *GImGui; return GetKeyData(&g, key); } /* original C++ signature */
  5853. @overload
  5854. def get_key_data(key: Key) -> KeyData:
  5855. """(private API)"""
  5856. pass
  5857. # inline ImGuiKey MouseButtonToKey(ImGuiMouseButton button) { IM_ASSERT(button >= 0 && button < ImGuiMouseButton_COUNT); return (ImGuiKey)(ImGuiKey_MouseLeft + button); } /* original C++ signature */
  5858. def mouse_button_to_key(button: MouseButton) -> Key:
  5859. """(private API)"""
  5860. pass
  5861. # IMGUI_API bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold = -1.0f); /* original C++ signature */
  5862. def is_mouse_drag_past_threshold(button: MouseButton, lock_threshold: float = -1.0) -> bool:
  5863. pass
  5864. # IMGUI_API ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down); /* original C++ signature */
  5865. def get_key_magnitude2d(key_left: Key, key_right: Key, key_up: Key, key_down: Key) -> ImVec2:
  5866. pass
  5867. # IMGUI_API float GetNavTweakPressedAmount(ImGuiAxis axis); /* original C++ signature */
  5868. def get_nav_tweak_pressed_amount(axis: Axis) -> float:
  5869. pass
  5870. # IMGUI_API int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate); /* original C++ signature */
  5871. def calc_typematic_repeat_amount(t0: float, t1: float, repeat_delay: float, repeat_rate: float) -> int:
  5872. pass
  5873. # IMGUI_API void GetTypematicRepeatRate(ImGuiInputFlags flags, float* repeat_delay, float* repeat_rate); /* original C++ signature */
  5874. def get_typematic_repeat_rate(flags: InputFlags, repeat_delay: float, repeat_rate: float) -> Tuple[float, float]:
  5875. pass
  5876. # IMGUI_API void TeleportMousePos(const ImVec2& pos); /* original C++ signature */
  5877. def teleport_mouse_pos(pos: ImVec2Like) -> None:
  5878. pass
  5879. # IMGUI_API void SetActiveIdUsingAllKeyboardKeys(); /* original C++ signature */
  5880. def set_active_id_using_all_keyboard_keys() -> None:
  5881. pass
  5882. # inline bool IsActiveIdUsingNavDir(ImGuiDir dir) { ImGuiContext& g = *GImGui; return (g.ActiveIdUsingNavDirMask & (1 << dir)) != 0; } /* original C++ signature */
  5883. def is_active_id_using_nav_dir(dir: Dir) -> bool:
  5884. """(private API)"""
  5885. pass
  5886. # [EXPERIMENTAL] Low-Level: Key/Input Ownership
  5887. # - The idea is that instead of "eating" a given input, we can link to an owner id.
  5888. # - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead).
  5889. # - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID.
  5890. # - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0).
  5891. # - Input ownership is automatically released on the frame after a key is released. Therefore:
  5892. # - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case).
  5893. # - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover).
  5894. # - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state.
  5895. # - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step.
  5896. # Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved.
  5897. # IMGUI_API ImGuiID GetKeyOwner(ImGuiKey key); /* original C++ signature */
  5898. def get_key_owner(key: Key) -> ID:
  5899. pass
  5900. # IMGUI_API void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0); /* original C++ signature */
  5901. def set_key_owner(key: Key, owner_id: ID, flags: InputFlags = 0) -> None:
  5902. pass
  5903. # IMGUI_API void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0); /* original C++ signature */
  5904. def set_key_owners_for_key_chord(key: KeyChord, owner_id: ID, flags: InputFlags = 0) -> None:
  5905. pass
  5906. # IMGUI_API bool SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags); /* original C++ signature */
  5907. def set_item_key_owner(key: Key, flags: InputFlags) -> bool:
  5908. pass
  5909. # IMGUI_API bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id); /* original C++ signature */
  5910. def test_key_owner(key: Key, owner_id: ID) -> bool:
  5911. """Test that key is either not owned, either owned by 'owner_id'"""
  5912. pass
  5913. # inline ImGuiKeyOwnerData* GetKeyOwnerData(ImGuiContext* ctx, ImGuiKey key) { if (key & ImGuiMod_Mask_) key = ConvertSingleModFlagToKey(key); IM_ASSERT(IsNamedKey(key)); return &ctx->KeysOwnerData[key - ImGuiKey_NamedKey_BEGIN]; } /* original C++ signature */
  5914. def get_key_owner_data(ctx: Context, key: Key) -> KeyOwnerData:
  5915. """(private API)"""
  5916. pass
  5917. # [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership
  5918. # - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=True) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag.
  5919. # - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0)
  5920. # - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'.
  5921. # Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease.
  5922. # - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API.
  5923. # IMGUI_API bool IsKeyDown(ImGuiKey key, ImGuiID owner_id); /* original C++ signature */
  5924. def is_key_down(key: Key, owner_id: ID) -> bool:
  5925. pass
  5926. # IMGUI_API bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0); /* original C++ signature */
  5927. def is_key_pressed(key: Key, flags: InputFlags, owner_id: ID = 0) -> bool:
  5928. """Important: when transitioning from old to new IsKeyPressed(): old API has "bool repeat = True", so would default to repeat. New API requires explicit ImGuiInputFlags_Repeat."""
  5929. pass
  5930. # IMGUI_API bool IsKeyReleased(ImGuiKey key, ImGuiID owner_id); /* original C++ signature */
  5931. def is_key_released(key: Key, owner_id: ID) -> bool:
  5932. pass
  5933. # IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id = 0); /* original C++ signature */
  5934. def is_key_chord_pressed(key_chord: KeyChord, flags: InputFlags, owner_id: ID = 0) -> bool:
  5935. pass
  5936. # IMGUI_API bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id); /* original C++ signature */
  5937. def is_mouse_down(button: MouseButton, owner_id: ID) -> bool:
  5938. pass
  5939. # IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0); /* original C++ signature */
  5940. def is_mouse_clicked(button: MouseButton, flags: InputFlags, owner_id: ID = 0) -> bool:
  5941. pass
  5942. # IMGUI_API bool IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id); /* original C++ signature */
  5943. def is_mouse_released(button: MouseButton, owner_id: ID) -> bool:
  5944. pass
  5945. # IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id); /* original C++ signature */
  5946. def is_mouse_double_clicked(button: MouseButton, owner_id: ID) -> bool:
  5947. pass
  5948. # Shortcut Testing & Routing
  5949. # - Set Shortcut() and SetNextItemShortcut() in imgui.h
  5950. # - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(),
  5951. # allowing the system to decide where to route the input among other route-aware calls.
  5952. # (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check)
  5953. # - When using one of the routing option:
  5954. # - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.)
  5955. # - Routes are requested given a chord (key + modifiers) and a routing policy.
  5956. # - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame.
  5957. # - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window).
  5958. # - Multiple read sites may use the same owner id can all access the granted route.
  5959. # - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location.
  5960. # - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute()
  5961. # e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused.
  5962. # IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id); /* original C++ signature */
  5963. def shortcut(key_chord: KeyChord, flags: InputFlags, owner_id: ID) -> bool:
  5964. pass
  5965. # IMGUI_API bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id); /* original C++ signature */
  5966. def set_shortcut_routing(key_chord: KeyChord, flags: InputFlags, owner_id: ID) -> bool:
  5967. """owner_id needs to be explicit and cannot be 0"""
  5968. pass
  5969. # IMGUI_API bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id); /* original C++ signature */
  5970. def test_shortcut_routing(key_chord: KeyChord, owner_id: ID) -> bool:
  5971. pass
  5972. # IMGUI_API ImGuiKeyRoutingData* GetShortcutRoutingData(ImGuiKeyChord key_chord); /* original C++ signature */
  5973. def get_shortcut_routing_data(key_chord: KeyChord) -> KeyRoutingData:
  5974. pass
  5975. # Docking
  5976. # (some functions are only declared in imgui.cpp, see Docking section)
  5977. # IMGUI_API void DockContextInitialize(ImGuiContext* ctx); /* original C++ signature */
  5978. def dock_context_initialize(ctx: Context) -> None:
  5979. pass
  5980. # IMGUI_API void DockContextShutdown(ImGuiContext* ctx); /* original C++ signature */
  5981. def dock_context_shutdown(ctx: Context) -> None:
  5982. pass
  5983. # IMGUI_API void DockContextClearNodes(ImGuiContext* ctx, ImGuiID root_id, bool clear_settings_refs); /* original C++ signature */
  5984. def dock_context_clear_nodes(ctx: Context, root_id: ID, clear_settings_refs: bool) -> None:
  5985. """Use root_id==0 to clear all"""
  5986. pass
  5987. # IMGUI_API void DockContextRebuildNodes(ImGuiContext* ctx); /* original C++ signature */
  5988. def dock_context_rebuild_nodes(ctx: Context) -> None:
  5989. pass
  5990. # IMGUI_API void DockContextNewFrameUpdateUndocking(ImGuiContext* ctx); /* original C++ signature */
  5991. def dock_context_new_frame_update_undocking(ctx: Context) -> None:
  5992. pass
  5993. # IMGUI_API void DockContextNewFrameUpdateDocking(ImGuiContext* ctx); /* original C++ signature */
  5994. def dock_context_new_frame_update_docking(ctx: Context) -> None:
  5995. pass
  5996. # IMGUI_API void DockContextEndFrame(ImGuiContext* ctx); /* original C++ signature */
  5997. def dock_context_end_frame(ctx: Context) -> None:
  5998. pass
  5999. # IMGUI_API ImGuiID DockContextGenNodeID(ImGuiContext* ctx); /* original C++ signature */
  6000. def dock_context_gen_node_id(ctx: Context) -> ID:
  6001. pass
  6002. # IMGUI_API void DockContextQueueDock(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload, ImGuiDir split_dir, float split_ratio, bool split_outer); /* original C++ signature */
  6003. def dock_context_queue_dock(
  6004. ctx: Context,
  6005. target: Window,
  6006. target_node: DockNode,
  6007. payload: Window,
  6008. split_dir: Dir,
  6009. split_ratio: float,
  6010. split_outer: bool,
  6011. ) -> None:
  6012. pass
  6013. # IMGUI_API void DockContextQueueUndockWindow(ImGuiContext* ctx, ImGuiWindow* window); /* original C++ signature */
  6014. def dock_context_queue_undock_window(ctx: Context, window: Window) -> None:
  6015. pass
  6016. # IMGUI_API void DockContextQueueUndockNode(ImGuiContext* ctx, ImGuiDockNode* node); /* original C++ signature */
  6017. def dock_context_queue_undock_node(ctx: Context, node: DockNode) -> None:
  6018. pass
  6019. # IMGUI_API void DockContextProcessUndockWindow(ImGuiContext* ctx, ImGuiWindow* window, bool clear_persistent_docking_ref = true); /* original C++ signature */
  6020. def dock_context_process_undock_window(ctx: Context, window: Window, clear_persistent_docking_ref: bool = True) -> None:
  6021. pass
  6022. # IMGUI_API void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node); /* original C++ signature */
  6023. def dock_context_process_undock_node(ctx: Context, node: DockNode) -> None:
  6024. pass
  6025. # IMGUI_API bool DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos); /* original C++ signature */
  6026. def dock_context_calc_drop_pos_for_docking(
  6027. target: Window,
  6028. target_node: DockNode,
  6029. payload_window: Window,
  6030. payload_node: DockNode,
  6031. split_dir: Dir,
  6032. split_outer: bool,
  6033. out_pos: ImVec2Like,
  6034. ) -> bool:
  6035. pass
  6036. # IMGUI_API ImGuiDockNode*DockContextFindNodeByID(ImGuiContext* ctx, ImGuiID id); /* original C++ signature */
  6037. def dock_context_find_node_by_id(ctx: Context, id_: ID) -> DockNode:
  6038. pass
  6039. # IMGUI_API void DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar); /* original C++ signature */
  6040. def dock_node_window_menu_handler_default(ctx: Context, node: DockNode, tab_bar: TabBar) -> None:
  6041. pass
  6042. # IMGUI_API bool DockNodeBeginAmendTabBar(ImGuiDockNode* node); /* original C++ signature */
  6043. def dock_node_begin_amend_tab_bar(node: DockNode) -> bool:
  6044. pass
  6045. # IMGUI_API void DockNodeEndAmendTabBar(); /* original C++ signature */
  6046. def dock_node_end_amend_tab_bar() -> None:
  6047. pass
  6048. # inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) { while (node->ParentNode) node = node->ParentNode; return node; } /* original C++ signature */
  6049. def dock_node_get_root_node(node: DockNode) -> DockNode:
  6050. """(private API)"""
  6051. pass
  6052. # inline bool DockNodeIsInHierarchyOf(ImGuiDockNode* node, ImGuiDockNode* parent) { while (node) { if (node == parent) return true; node = node->ParentNode; } return false; } /* original C++ signature */
  6053. def dock_node_is_in_hierarchy_of(node: DockNode, parent: DockNode) -> bool:
  6054. """(private API)"""
  6055. pass
  6056. # inline int DockNodeGetDepth(const ImGuiDockNode* node) { int depth = 0; while (node->ParentNode) { node = node->ParentNode; depth++; } return depth; } /* original C++ signature */
  6057. def dock_node_get_depth(node: DockNode) -> int:
  6058. """(private API)"""
  6059. pass
  6060. # inline ImGuiID DockNodeGetWindowMenuButtonId(const ImGuiDockNode* node) { return ImHashStr("#COLLAPSE", 0, node->ID); } /* original C++ signature */
  6061. def dock_node_get_window_menu_button_id(node: DockNode) -> ID:
  6062. """(private API)"""
  6063. pass
  6064. # inline ImGuiDockNode* GetWindowDockNode() { ImGuiContext& g = *GImGui; return g.CurrentWindow->DockNode; } /* original C++ signature */
  6065. def get_window_dock_node() -> DockNode:
  6066. """(private API)"""
  6067. pass
  6068. # IMGUI_API bool GetWindowAlwaysWantOwnTabBar(ImGuiWindow* window); /* original C++ signature */
  6069. def get_window_always_want_own_tab_bar(window: Window) -> bool:
  6070. pass
  6071. # IMGUI_API void BeginDocked(ImGuiWindow* window, bool* p_open); /* original C++ signature */
  6072. def begin_docked(window: Window, p_open: bool) -> bool:
  6073. pass
  6074. # IMGUI_API void BeginDockableDragDropSource(ImGuiWindow* window); /* original C++ signature */
  6075. def begin_dockable_drag_drop_source(window: Window) -> None:
  6076. pass
  6077. # IMGUI_API void BeginDockableDragDropTarget(ImGuiWindow* window); /* original C++ signature */
  6078. def begin_dockable_drag_drop_target(window: Window) -> None:
  6079. pass
  6080. # IMGUI_API void SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond); /* original C++ signature */
  6081. def set_window_dock(window: Window, dock_id: ID, cond: Cond) -> None:
  6082. pass
  6083. # Docking - Builder function needs to be generally called before the node is used/submitted.
  6084. # - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability.
  6085. # - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame.
  6086. # - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode().
  6087. # You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API.
  6088. # - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node.
  6089. # - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure
  6090. # to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable.
  6091. # - Call DockBuilderFinish() after you are done.
  6092. # IMGUI_API void DockBuilderDockWindow(const char* window_name, ImGuiID node_id); /* original C++ signature */
  6093. def dock_builder_dock_window(window_name: str, node_id: ID) -> None:
  6094. pass
  6095. # IMGUI_API ImGuiDockNode*DockBuilderGetNode(ImGuiID node_id); /* original C++ signature */
  6096. def dock_builder_get_node(node_id: ID) -> DockNode:
  6097. pass
  6098. # inline ImGuiDockNode* DockBuilderGetCentralNode(ImGuiID node_id) { ImGuiDockNode* node = DockBuilderGetNode(node_id); if (!node) return NULL; return DockNodeGetRootNode(node)->CentralNode; } /* original C++ signature */
  6099. def dock_builder_get_central_node(node_id: ID) -> DockNode:
  6100. """(private API)"""
  6101. pass
  6102. # IMGUI_API ImGuiID DockBuilderAddNode(ImGuiID node_id = 0, ImGuiDockNodeFlags flags = 0); /* original C++ signature */
  6103. def dock_builder_add_node(node_id: ID = 0, flags: DockNodeFlags = 0) -> ID:
  6104. pass
  6105. # IMGUI_API void DockBuilderRemoveNode(ImGuiID node_id); /* original C++ signature */
  6106. def dock_builder_remove_node(node_id: ID) -> None:
  6107. """Remove node and all its child, undock all windows"""
  6108. pass
  6109. # IMGUI_API void DockBuilderRemoveNodeDockedWindows(ImGuiID node_id, bool clear_settings_refs = true); /* original C++ signature */
  6110. def dock_builder_remove_node_docked_windows(node_id: ID, clear_settings_refs: bool = True) -> None:
  6111. pass
  6112. # IMGUI_API void DockBuilderRemoveNodeChildNodes(ImGuiID node_id); /* original C++ signature */
  6113. def dock_builder_remove_node_child_nodes(node_id: ID) -> None:
  6114. """Remove all split/hierarchy. All remaining docked windows will be re-docked to the remaining root node (node_id)."""
  6115. pass
  6116. # IMGUI_API void DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos); /* original C++ signature */
  6117. def dock_builder_set_node_pos(node_id: ID, pos: ImVec2Like) -> None:
  6118. pass
  6119. # IMGUI_API void DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size); /* original C++ signature */
  6120. def dock_builder_set_node_size(node_id: ID, size: ImVec2Like) -> None:
  6121. pass
  6122. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6123. #
  6124. class DockBuilderSplitNodeResult:
  6125. # ImGuiID id_at_dir; /* original C++ signature */
  6126. id_at_dir: ID
  6127. # ImGuiID id_at_opposite_dir; /* original C++ signature */
  6128. id_at_opposite_dir: ID
  6129. # DockBuilderSplitNodeResult(ImGuiID id_at_dir = ImGuiID(), ImGuiID id_at_opposite_dir = ImGuiID()); /* original C++ signature */
  6130. def __init__(self, id_at_dir: ID = ID(), id_at_opposite_dir: ID = ID()) -> None:
  6131. """Auto-generated default constructor with named params"""
  6132. pass
  6133. # IMGUI_API DockBuilderSplitNodeResult DockBuilderSplitNode( /* original C++ signature */
  6134. # ImGuiID node_id,
  6135. # ImGuiDir split_dir,
  6136. # float size_ratio_for_node_at_dir);
  6137. def dock_builder_split_node(
  6138. node_id: ID, split_dir: Dir, size_ratio_for_node_at_dir: float
  6139. ) -> DockBuilderSplitNodeResult:
  6140. pass
  6141. # #endif
  6142. #
  6143. # IMGUI_API void DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id, ImVector<ImGuiID>* out_node_remap_pairs); /* original C++ signature */
  6144. def dock_builder_copy_node(src_node_id: ID, dst_node_id: ID, out_node_remap_pairs: ImVector_ID) -> None:
  6145. pass
  6146. # IMGUI_API void DockBuilderCopyWindowSettings(const char* src_name, const char* dst_name); /* original C++ signature */
  6147. def dock_builder_copy_window_settings(src_name: str, dst_name: str) -> None:
  6148. pass
  6149. # IMGUI_API void DockBuilderFinish(ImGuiID node_id); /* original C++ signature */
  6150. def dock_builder_finish(node_id: ID) -> None:
  6151. pass
  6152. # [EXPERIMENTAL] Focus Scope
  6153. # This is generally used to identify a unique input location (for e.g. a selection set)
  6154. # There is one per window (automatically set in Begin), but:
  6155. # - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set.
  6156. # So in order to identify a set multiple lists in same window may each need a focus scope.
  6157. # If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope()
  6158. # - Shortcut routing also use focus scope as a default location identifier if an owner is not provided.
  6159. # We don't use the ID Stack for this as it is common to want them separate.
  6160. # IMGUI_API void PushFocusScope(ImGuiID id); /* original C++ signature */
  6161. def push_focus_scope(id_: ID) -> None:
  6162. pass
  6163. # IMGUI_API void PopFocusScope(); /* original C++ signature */
  6164. def pop_focus_scope() -> None:
  6165. pass
  6166. # IMGUI_API bool IsInNavFocusRoute(ImGuiID focus_scope_id); /* original C++ signature */
  6167. def is_in_nav_focus_route(focus_scope_id: ID) -> bool:
  6168. pass
  6169. # inline ImGuiID GetCurrentFocusScope() { ImGuiContext& g = *GImGui; return g.CurrentFocusScopeId; } /* original C++ signature */
  6170. def get_current_focus_scope() -> ID:
  6171. """(private API)
  6172. Focus scope we are outputting into, set by PushFocusScope()
  6173. """
  6174. pass
  6175. # Drag and Drop
  6176. # IMGUI_API bool IsDragDropActive(); /* original C++ signature */
  6177. def is_drag_drop_active() -> bool:
  6178. pass
  6179. # IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id); /* original C++ signature */
  6180. def begin_drag_drop_target_custom(bb: ImRect, id_: ID) -> bool:
  6181. pass
  6182. # IMGUI_API bool BeginDragDropTargetViewport(ImGuiViewport* viewport, const ImRect* p_bb = NULL); /* original C++ signature */
  6183. def begin_drag_drop_target_viewport(viewport: Viewport, p_bb: Optional[ImRect] = None) -> bool:
  6184. pass
  6185. # IMGUI_API void ClearDragDrop(); /* original C++ signature */
  6186. def clear_drag_drop() -> None:
  6187. pass
  6188. # IMGUI_API bool IsDragDropPayloadBeingAccepted(); /* original C++ signature */
  6189. def is_drag_drop_payload_being_accepted() -> bool:
  6190. pass
  6191. # IMGUI_API void RenderDragDropTargetRectForItem(const ImRect& bb); /* original C++ signature */
  6192. def render_drag_drop_target_rect_for_item(bb: ImRect) -> None:
  6193. pass
  6194. # IMGUI_API void RenderDragDropTargetRectEx(ImDrawList* draw_list, const ImRect& bb, float rounding); /* original C++ signature */
  6195. def render_drag_drop_target_rect_ex(draw_list: ImDrawList, bb: ImRect, rounding: float) -> None:
  6196. pass
  6197. # Typing-Select API
  6198. # (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature)
  6199. # (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!)
  6200. # IMGUI_API ImGuiTypingSelectRequest* GetTypingSelectRequest(ImGuiTypingSelectFlags flags = ImGuiTypingSelectFlags_None); /* original C++ signature */
  6201. def get_typing_select_request(flags: TypingSelectFlags = TypingSelectFlags_None) -> TypingSelectRequest:
  6202. pass
  6203. # Box-Select API
  6204. # IMGUI_API bool BeginBoxSelect(const ImRect& scope_rect, ImGuiWindow* window, ImGuiID box_select_id, ImGuiMultiSelectFlags ms_flags); /* original C++ signature */
  6205. def begin_box_select(scope_rect: ImRect, window: Window, box_select_id: ID, ms_flags: MultiSelectFlags) -> bool:
  6206. pass
  6207. # IMGUI_API void EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flags); /* original C++ signature */
  6208. def end_box_select(scope_rect: ImRect, ms_flags: MultiSelectFlags) -> None:
  6209. pass
  6210. # Multi-Select API
  6211. # IMGUI_API void MultiSelectItemHeader(ImGuiID id, bool* p_selected, ImGuiButtonFlags* p_button_flags); /* original C++ signature */
  6212. def multi_select_item_header(id_: ID, p_selected: bool, p_button_flags: ButtonFlags) -> bool:
  6213. pass
  6214. # IMGUI_API void MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed); /* original C++ signature */
  6215. def multi_select_item_footer(id_: ID, p_selected: bool, p_pressed: bool) -> Tuple[bool, bool]:
  6216. pass
  6217. # IMGUI_API void MultiSelectAddSetAll(ImGuiMultiSelectTempData* ms, bool selected); /* original C++ signature */
  6218. def multi_select_add_set_all(ms: MultiSelectTempData, selected: bool) -> None:
  6219. pass
  6220. # IMGUI_API void MultiSelectAddSetRange(ImGuiMultiSelectTempData* ms, bool selected, int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item); /* original C++ signature */
  6221. def multi_select_add_set_range(
  6222. ms: MultiSelectTempData, selected: bool, range_dir: int, first_item: SelectionUserData, last_item: SelectionUserData
  6223. ) -> None:
  6224. pass
  6225. # inline ImGuiBoxSelectState* GetBoxSelectState(ImGuiID id) { ImGuiContext& g = *GImGui; return (id != 0 && g.BoxSelectState.ID == id && g.BoxSelectState.IsActive) ? &g.BoxSelectState : NULL; } /* original C++ signature */
  6226. def get_box_select_state(id_: ID) -> BoxSelectState:
  6227. """(private API)"""
  6228. pass
  6229. # inline ImGuiMultiSelectState* GetMultiSelectState(ImGuiID id) { ImGuiContext& g = *GImGui; return g.MultiSelectStorage.GetByKey(id); } /* original C++ signature */
  6230. def get_multi_select_state(id_: ID) -> MultiSelectState:
  6231. """(private API)"""
  6232. pass
  6233. # Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API)
  6234. # IMGUI_API void SetWindowClipRectBeforeSetChannel(ImGuiWindow* window, const ImRect& clip_rect); /* original C++ signature */
  6235. def set_window_clip_rect_before_set_channel(window: Window, clip_rect: ImRect) -> None:
  6236. pass
  6237. # IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiOldColumnFlags flags = 0); /* original C++ signature */
  6238. def begin_columns(str_id: str, count: int, flags: OldColumnFlags = 0) -> None:
  6239. """setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns()."""
  6240. pass
  6241. # IMGUI_API void EndColumns(); /* original C++ signature */
  6242. def end_columns() -> None:
  6243. """close columns"""
  6244. pass
  6245. # IMGUI_API void PushColumnClipRect(int column_index); /* original C++ signature */
  6246. def push_column_clip_rect(column_index: int) -> None:
  6247. pass
  6248. # IMGUI_API void PushColumnsBackground(); /* original C++ signature */
  6249. def push_columns_background() -> None:
  6250. pass
  6251. # IMGUI_API void PopColumnsBackground(); /* original C++ signature */
  6252. def pop_columns_background() -> None:
  6253. pass
  6254. # IMGUI_API ImGuiID GetColumnsID(const char* str_id, int count); /* original C++ signature */
  6255. def get_columns_id(str_id: str, count: int) -> ID:
  6256. pass
  6257. # IMGUI_API ImGuiOldColumns* FindOrCreateColumns(ImGuiWindow* window, ImGuiID id); /* original C++ signature */
  6258. def find_or_create_columns(window: Window, id_: ID) -> OldColumns:
  6259. pass
  6260. # IMGUI_API float GetColumnOffsetFromNorm(const ImGuiOldColumns* columns, float offset_norm); /* original C++ signature */
  6261. def get_column_offset_from_norm(columns: OldColumns, offset_norm: float) -> float:
  6262. pass
  6263. # IMGUI_API float GetColumnNormFromOffset(const ImGuiOldColumns* columns, float offset); /* original C++ signature */
  6264. def get_column_norm_from_offset(columns: OldColumns, offset: float) -> float:
  6265. pass
  6266. # Tables: Candidates for public API
  6267. # IMGUI_API void TableOpenContextMenu(int column_n = -1); /* original C++ signature */
  6268. def table_open_context_menu(column_n: int = -1) -> None:
  6269. pass
  6270. # IMGUI_API void TableSetColumnWidth(int column_n, float width); /* original C++ signature */
  6271. def table_set_column_width(column_n: int, width: float) -> None:
  6272. pass
  6273. # IMGUI_API void TableSetColumnSortDirection(int column_n, ImGuiSortDirection sort_direction, bool append_to_sort_specs); /* original C++ signature */
  6274. def table_set_column_sort_direction(column_n: int, sort_direction: SortDirection, append_to_sort_specs: bool) -> None:
  6275. pass
  6276. # IMGUI_API int TableGetHoveredRow(); /* original C++ signature */
  6277. def table_get_hovered_row() -> int:
  6278. """Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason why this is not public yet."""
  6279. pass
  6280. # IMGUI_API float TableGetHeaderRowHeight(); /* original C++ signature */
  6281. def table_get_header_row_height() -> float:
  6282. pass
  6283. # IMGUI_API float TableGetHeaderAngledMaxLabelWidth(); /* original C++ signature */
  6284. def table_get_header_angled_max_label_width() -> float:
  6285. pass
  6286. # IMGUI_API void TablePushBackgroundChannel(); /* original C++ signature */
  6287. def table_push_background_channel() -> None:
  6288. pass
  6289. # IMGUI_API void TablePopBackgroundChannel(); /* original C++ signature */
  6290. def table_pop_background_channel() -> None:
  6291. pass
  6292. # IMGUI_API void TablePushColumnChannel(int column_n); /* original C++ signature */
  6293. def table_push_column_channel(column_n: int) -> None:
  6294. pass
  6295. # IMGUI_API void TablePopColumnChannel(); /* original C++ signature */
  6296. def table_pop_column_channel() -> None:
  6297. pass
  6298. # IMGUI_API void TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label_width, const ImGuiTableHeaderData* data, int data_count); /* original C++ signature */
  6299. def table_angled_headers_row_ex(
  6300. row_id: ID, angle: float, max_label_width: float, data: TableHeaderData, data_count: int
  6301. ) -> None:
  6302. pass
  6303. # inline ImGuiTable* GetCurrentTable() { ImGuiContext& g = *GImGui; return g.CurrentTable; } /* original C++ signature */
  6304. def get_current_table() -> Table:
  6305. """Tables: Internals
  6306. (private API)
  6307. """
  6308. pass
  6309. # IMGUI_API ImGuiTable* TableFindByID(ImGuiID id); /* original C++ signature */
  6310. def table_find_by_id(id_: ID) -> Table:
  6311. pass
  6312. # IMGUI_API bool BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f); /* original C++ signature */
  6313. def begin_table_ex(
  6314. name: str,
  6315. id_: ID,
  6316. columns_count: int,
  6317. flags: TableFlags = 0,
  6318. outer_size: Optional[ImVec2Like] = None,
  6319. inner_width: float = 0.0,
  6320. ) -> bool:
  6321. """Python bindings defaults:
  6322. If outer_size is None, then its default value will be: ImVec2(0, 0)
  6323. """
  6324. pass
  6325. # IMGUI_API void TableBeginInitMemory(ImGuiTable* table, int columns_count); /* original C++ signature */
  6326. def table_begin_init_memory(table: Table, columns_count: int) -> None:
  6327. pass
  6328. # IMGUI_API void TableBeginApplyRequests(ImGuiTable* table); /* original C++ signature */
  6329. def table_begin_apply_requests(table: Table) -> None:
  6330. pass
  6331. # IMGUI_API void TableSetupDrawChannels(ImGuiTable* table); /* original C++ signature */
  6332. def table_setup_draw_channels(table: Table) -> None:
  6333. pass
  6334. # IMGUI_API void TableUpdateLayout(ImGuiTable* table); /* original C++ signature */
  6335. def table_update_layout(table: Table) -> None:
  6336. pass
  6337. # IMGUI_API void TableUpdateBorders(ImGuiTable* table); /* original C++ signature */
  6338. def table_update_borders(table: Table) -> None:
  6339. pass
  6340. # IMGUI_API void TableUpdateColumnsWeightFromWidth(ImGuiTable* table); /* original C++ signature */
  6341. def table_update_columns_weight_from_width(table: Table) -> None:
  6342. pass
  6343. # IMGUI_API void TableApplyExternalUnclipRect(ImGuiTable* table, ImRect& rect); /* original C++ signature */
  6344. def table_apply_external_unclip_rect(table: Table, rect: ImRect) -> None:
  6345. pass
  6346. # IMGUI_API void TableDrawBorders(ImGuiTable* table); /* original C++ signature */
  6347. def table_draw_borders(table: Table) -> None:
  6348. pass
  6349. # IMGUI_API void TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display); /* original C++ signature */
  6350. def table_draw_default_context_menu(table: Table, flags_for_section_to_display: TableFlags) -> None:
  6351. pass
  6352. # IMGUI_API bool TableBeginContextMenuPopup(ImGuiTable* table); /* original C++ signature */
  6353. def table_begin_context_menu_popup(table: Table) -> bool:
  6354. pass
  6355. # IMGUI_API void TableMergeDrawChannels(ImGuiTable* table); /* original C++ signature */
  6356. def table_merge_draw_channels(table: Table) -> None:
  6357. pass
  6358. # inline ImGuiTableInstanceData* TableGetInstanceData(ImGuiTable* table, int instance_no) { if (instance_no == 0) return &table->InstanceDataFirst; return &table->InstanceDataExtra[instance_no - 1]; } /* original C++ signature */
  6359. def table_get_instance_data(table: Table, instance_no: int) -> TableInstanceData:
  6360. """(private API)"""
  6361. pass
  6362. # inline ImGuiID TableGetInstanceID(ImGuiTable* table, int instance_no) { return TableGetInstanceData(table, instance_no)->TableInstanceID; } /* original C++ signature */
  6363. def table_get_instance_id(table: Table, instance_no: int) -> ID:
  6364. """(private API)"""
  6365. pass
  6366. # IMGUI_API void TableFixDisplayOrder(ImGuiTable* table); /* original C++ signature */
  6367. def table_fix_display_order(table: Table) -> None:
  6368. pass
  6369. # IMGUI_API void TableSortSpecsSanitize(ImGuiTable* table); /* original C++ signature */
  6370. def table_sort_specs_sanitize(table: Table) -> None:
  6371. pass
  6372. # IMGUI_API void TableSortSpecsBuild(ImGuiTable* table); /* original C++ signature */
  6373. def table_sort_specs_build(table: Table) -> None:
  6374. pass
  6375. # IMGUI_API ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumn* column); /* original C++ signature */
  6376. def table_get_column_next_sort_direction(column: TableColumn) -> SortDirection:
  6377. pass
  6378. # IMGUI_API void TableFixColumnSortDirection(ImGuiTable* table, ImGuiTableColumn* column); /* original C++ signature */
  6379. def table_fix_column_sort_direction(table: Table, column: TableColumn) -> None:
  6380. pass
  6381. # IMGUI_API float TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column); /* original C++ signature */
  6382. def table_get_column_width_auto(table: Table, column: TableColumn) -> float:
  6383. pass
  6384. # IMGUI_API void TableBeginRow(ImGuiTable* table); /* original C++ signature */
  6385. def table_begin_row(table: Table) -> None:
  6386. pass
  6387. # IMGUI_API void TableEndRow(ImGuiTable* table); /* original C++ signature */
  6388. def table_end_row(table: Table) -> None:
  6389. pass
  6390. # IMGUI_API void TableBeginCell(ImGuiTable* table, int column_n); /* original C++ signature */
  6391. def table_begin_cell(table: Table, column_n: int) -> None:
  6392. pass
  6393. # IMGUI_API void TableEndCell(ImGuiTable* table); /* original C++ signature */
  6394. def table_end_cell(table: Table) -> None:
  6395. pass
  6396. # IMGUI_API ImRect TableGetCellBgRect(const ImGuiTable* table, int column_n); /* original C++ signature */
  6397. def table_get_cell_bg_rect(table: Table, column_n: int) -> ImRect:
  6398. pass
  6399. # IMGUI_API const char* TableGetColumnName(const ImGuiTable* table, int column_n); /* original C++ signature */
  6400. def table_get_column_name(table: Table, column_n: int) -> str:
  6401. pass
  6402. # IMGUI_API ImGuiID TableGetColumnResizeID(ImGuiTable* table, int column_n, int instance_no = 0); /* original C++ signature */
  6403. def table_get_column_resize_id(table: Table, column_n: int, instance_no: int = 0) -> ID:
  6404. pass
  6405. # IMGUI_API float TableCalcMaxColumnWidth(const ImGuiTable* table, int column_n); /* original C++ signature */
  6406. def table_calc_max_column_width(table: Table, column_n: int) -> float:
  6407. pass
  6408. # IMGUI_API void TableSetColumnWidthAutoSingle(ImGuiTable* table, int column_n); /* original C++ signature */
  6409. def table_set_column_width_auto_single(table: Table, column_n: int) -> None:
  6410. pass
  6411. # IMGUI_API void TableSetColumnWidthAutoAll(ImGuiTable* table); /* original C++ signature */
  6412. def table_set_column_width_auto_all(table: Table) -> None:
  6413. pass
  6414. # IMGUI_API void TableSetColumnDisplayOrder(ImGuiTable* table, int column_n, int dst_order); /* original C++ signature */
  6415. def table_set_column_display_order(table: Table, column_n: int, dst_order: int) -> None:
  6416. pass
  6417. # IMGUI_API void TableQueueSetColumnDisplayOrder(ImGuiTable* table, int column_n, int dst_order); /* original C++ signature */
  6418. def table_queue_set_column_display_order(table: Table, column_n: int, dst_order: int) -> None:
  6419. pass
  6420. # IMGUI_API void TableRemove(ImGuiTable* table); /* original C++ signature */
  6421. def table_remove(table: Table) -> None:
  6422. pass
  6423. # IMGUI_API void TableGcCompactTransientBuffers(ImGuiTable* table); /* original C++ signature */
  6424. @overload
  6425. def table_gc_compact_transient_buffers(table: Table) -> None:
  6426. pass
  6427. # IMGUI_API void TableGcCompactTransientBuffers(ImGuiTableTempData* table); /* original C++ signature */
  6428. @overload
  6429. def table_gc_compact_transient_buffers(table: TableTempData) -> None:
  6430. pass
  6431. # IMGUI_API void TableGcCompactSettings(); /* original C++ signature */
  6432. def table_gc_compact_settings() -> None:
  6433. pass
  6434. # Tables: Settings
  6435. # IMGUI_API void TableLoadSettings(ImGuiTable* table); /* original C++ signature */
  6436. def table_load_settings(table: Table) -> None:
  6437. pass
  6438. # IMGUI_API void TableSaveSettings(ImGuiTable* table); /* original C++ signature */
  6439. def table_save_settings(table: Table) -> None:
  6440. pass
  6441. # IMGUI_API void TableResetSettings(ImGuiTable* table); /* original C++ signature */
  6442. def table_reset_settings(table: Table) -> None:
  6443. pass
  6444. # IMGUI_API ImGuiTableSettings* TableGetBoundSettings(ImGuiTable* table); /* original C++ signature */
  6445. def table_get_bound_settings(table: Table) -> TableSettings:
  6446. pass
  6447. # IMGUI_API void TableSettingsAddSettingsHandler(); /* original C++ signature */
  6448. def table_settings_add_settings_handler() -> None:
  6449. pass
  6450. # IMGUI_API ImGuiTableSettings* TableSettingsCreate(ImGuiID id, int columns_count); /* original C++ signature */
  6451. def table_settings_create(id_: ID, columns_count: int) -> TableSettings:
  6452. pass
  6453. # IMGUI_API ImGuiTableSettings* TableSettingsFindByID(ImGuiID id); /* original C++ signature */
  6454. def table_settings_find_by_id(id_: ID) -> TableSettings:
  6455. pass
  6456. # inline ImGuiTabBar* GetCurrentTabBar() { ImGuiContext& g = *GImGui; return g.CurrentTabBar; } /* original C++ signature */
  6457. def get_current_tab_bar() -> TabBar:
  6458. """Tab Bars
  6459. (private API)
  6460. """
  6461. pass
  6462. # IMGUI_API ImGuiTabBar* TabBarFindByID(ImGuiID id); /* original C++ signature */
  6463. def tab_bar_find_by_id(id_: ID) -> TabBar:
  6464. pass
  6465. # IMGUI_API void TabBarRemove(ImGuiTabBar* tab_bar); /* original C++ signature */
  6466. def tab_bar_remove(tab_bar: TabBar) -> None:
  6467. pass
  6468. # IMGUI_API bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags); /* original C++ signature */
  6469. def begin_tab_bar_ex(tab_bar: TabBar, bb: ImRect, flags: TabBarFlags) -> bool:
  6470. pass
  6471. # IMGUI_API ImGuiTabItem* TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id); /* original C++ signature */
  6472. def tab_bar_find_tab_by_id(tab_bar: TabBar, tab_id: ID) -> TabItem:
  6473. pass
  6474. # IMGUI_API ImGuiTabItem* TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order); /* original C++ signature */
  6475. def tab_bar_find_tab_by_order(tab_bar: TabBar, order: int) -> TabItem:
  6476. pass
  6477. # IMGUI_API ImGuiTabItem* TabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBar* tab_bar); /* original C++ signature */
  6478. def tab_bar_find_most_recently_selected_tab_for_active_window(tab_bar: TabBar) -> TabItem:
  6479. pass
  6480. # IMGUI_API ImGuiTabItem* TabBarGetCurrentTab(ImGuiTabBar* tab_bar); /* original C++ signature */
  6481. def tab_bar_get_current_tab(tab_bar: TabBar) -> TabItem:
  6482. pass
  6483. # inline int TabBarGetTabOrder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) { return tab_bar->Tabs.index_from_ptr(tab); } /* original C++ signature */
  6484. def tab_bar_get_tab_order(tab_bar: TabBar, tab: TabItem) -> int:
  6485. """(private API)"""
  6486. pass
  6487. # IMGUI_API const char* TabBarGetTabName(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); /* original C++ signature */
  6488. def tab_bar_get_tab_name(tab_bar: TabBar, tab: TabItem) -> str:
  6489. pass
  6490. # IMGUI_API void TabBarAddTab(ImGuiTabBar* tab_bar, ImGuiTabItemFlags tab_flags, ImGuiWindow* window); /* original C++ signature */
  6491. def tab_bar_add_tab(tab_bar: TabBar, tab_flags: TabItemFlags, window: Window) -> None:
  6492. pass
  6493. # IMGUI_API void TabBarRemoveTab(ImGuiTabBar* tab_bar, ImGuiID tab_id); /* original C++ signature */
  6494. def tab_bar_remove_tab(tab_bar: TabBar, tab_id: ID) -> None:
  6495. pass
  6496. # IMGUI_API void TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); /* original C++ signature */
  6497. def tab_bar_close_tab(tab_bar: TabBar, tab: TabItem) -> None:
  6498. pass
  6499. # IMGUI_API void TabBarQueueFocus(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); /* original C++ signature */
  6500. @overload
  6501. def tab_bar_queue_focus(tab_bar: TabBar, tab: TabItem) -> None:
  6502. pass
  6503. # IMGUI_API void TabBarQueueFocus(ImGuiTabBar* tab_bar, const char* tab_name); /* original C++ signature */
  6504. @overload
  6505. def tab_bar_queue_focus(tab_bar: TabBar, tab_name: str) -> None:
  6506. pass
  6507. # IMGUI_API void TabBarQueueReorder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, int offset); /* original C++ signature */
  6508. def tab_bar_queue_reorder(tab_bar: TabBar, tab: TabItem, offset: int) -> None:
  6509. pass
  6510. # IMGUI_API void TabBarQueueReorderFromMousePos(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, ImVec2 mouse_pos); /* original C++ signature */
  6511. def tab_bar_queue_reorder_from_mouse_pos(tab_bar: TabBar, tab: TabItem, mouse_pos: ImVec2Like) -> None:
  6512. pass
  6513. # IMGUI_API bool TabBarProcessReorder(ImGuiTabBar* tab_bar); /* original C++ signature */
  6514. def tab_bar_process_reorder(tab_bar: TabBar) -> bool:
  6515. pass
  6516. # IMGUI_API bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window); /* original C++ signature */
  6517. def tab_item_ex(
  6518. tab_bar: TabBar, label: str, p_open: bool, flags: TabItemFlags, docked_window: Window
  6519. ) -> Tuple[bool, bool]:
  6520. pass
  6521. # IMGUI_API void TabItemSpacing(const char* str_id, ImGuiTabItemFlags flags, float width); /* original C++ signature */
  6522. def tab_item_spacing(str_id: str, flags: TabItemFlags, width: float) -> None:
  6523. pass
  6524. # IMGUI_API ImVec2 TabItemCalcSize(const char* label, bool has_close_button_or_unsaved_marker); /* original C++ signature */
  6525. @overload
  6526. def tab_item_calc_size(label: str, has_close_button_or_unsaved_marker: bool) -> ImVec2:
  6527. pass
  6528. # IMGUI_API ImVec2 TabItemCalcSize(ImGuiWindow* window); /* original C++ signature */
  6529. @overload
  6530. def tab_item_calc_size(window: Window) -> ImVec2:
  6531. pass
  6532. # IMGUI_API void TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col); /* original C++ signature */
  6533. def tab_item_background(draw_list: ImDrawList, bb: ImRect, flags: TabItemFlags, col: ImU32) -> None:
  6534. pass
  6535. # IMGUI_API void TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id, bool is_contents_visible, bool* out_just_closed, bool* out_text_clipped); /* original C++ signature */
  6536. def tab_item_label_and_close_button(
  6537. draw_list: ImDrawList,
  6538. bb: ImRect,
  6539. flags: TabItemFlags,
  6540. frame_padding: ImVec2Like,
  6541. label: str,
  6542. tab_id: ID,
  6543. close_button_id: ID,
  6544. is_contents_visible: bool,
  6545. out_just_closed: bool,
  6546. out_text_clipped: bool,
  6547. ) -> Tuple[bool, bool]:
  6548. pass
  6549. # Render helpers
  6550. # AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT.
  6551. # NB: All position are in absolute pixels coordinates (we are never using window coordinates internally)
  6552. # IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true); /* original C++ signature */
  6553. def render_text(pos: ImVec2Like, text: str, text_end: Optional[str] = None, hide_text_after_hash: bool = True) -> None:
  6554. pass
  6555. # IMGUI_API void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width); /* original C++ signature */
  6556. def render_text_wrapped(pos: ImVec2Like, text: str, text_end: str, wrap_width: float) -> None:
  6557. pass
  6558. # IMGUI_API void RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL); /* original C++ signature */
  6559. def render_text_clipped(
  6560. pos_min: ImVec2Like,
  6561. pos_max: ImVec2Like,
  6562. text: str,
  6563. text_end: str,
  6564. text_size_if_known: ImVec2Like,
  6565. align: Optional[ImVec2Like] = None,
  6566. clip_rect: Optional[ImRect] = None,
  6567. ) -> None:
  6568. """Python bindings defaults:
  6569. If align is None, then its default value will be: ImVec2(0, 0)
  6570. """
  6571. pass
  6572. # IMGUI_API void RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL); /* original C++ signature */
  6573. def render_text_clipped_ex(
  6574. draw_list: ImDrawList,
  6575. pos_min: ImVec2Like,
  6576. pos_max: ImVec2Like,
  6577. text: str,
  6578. text_end: str,
  6579. text_size_if_known: ImVec2Like,
  6580. align: Optional[ImVec2Like] = None,
  6581. clip_rect: Optional[ImRect] = None,
  6582. ) -> None:
  6583. """Python bindings defaults:
  6584. If align is None, then its default value will be: ImVec2(0, 0)
  6585. """
  6586. pass
  6587. # IMGUI_API void RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, float ellipsis_max_x, const char* text, const char* text_end, const ImVec2* text_size_if_known); /* original C++ signature */
  6588. def render_text_ellipsis(
  6589. draw_list: ImDrawList,
  6590. pos_min: ImVec2Like,
  6591. pos_max: ImVec2Like,
  6592. ellipsis_max_x: float,
  6593. text: str,
  6594. text_end: str,
  6595. text_size_if_known: ImVec2Like,
  6596. ) -> None:
  6597. pass
  6598. # IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool borders = true, float rounding = 0.0f); /* original C++ signature */
  6599. def render_frame(
  6600. p_min: ImVec2Like, p_max: ImVec2Like, fill_col: ImU32, borders: bool = True, rounding: float = 0.0
  6601. ) -> None:
  6602. pass
  6603. # IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f); /* original C++ signature */
  6604. def render_frame_border(p_min: ImVec2Like, p_max: ImVec2Like, rounding: float = 0.0) -> None:
  6605. pass
  6606. # IMGUI_API void RenderColorComponentMarker(const ImRect& bb, ImU32 col, float rounding); /* original C++ signature */
  6607. def render_color_component_marker(bb: ImRect, col: ImU32, rounding: float) -> None:
  6608. pass
  6609. # IMGUI_API void RenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list, ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding = 0.0f, ImDrawFlags flags = 0); /* original C++ signature */
  6610. def render_color_rect_with_alpha_checkerboard(
  6611. draw_list: ImDrawList,
  6612. p_min: ImVec2Like,
  6613. p_max: ImVec2Like,
  6614. fill_col: ImU32,
  6615. grid_step: float,
  6616. grid_off: ImVec2Like,
  6617. rounding: float = 0.0,
  6618. flags: ImDrawFlags = 0,
  6619. ) -> None:
  6620. pass
  6621. # IMGUI_API void RenderNavCursor(const ImRect& bb, ImGuiID id, ImGuiNavRenderCursorFlags flags = ImGuiNavRenderCursorFlags_None); /* original C++ signature */
  6622. def render_nav_cursor(bb: ImRect, id_: ID, flags: NavRenderCursorFlags = NavRenderCursorFlags_None) -> None:
  6623. """Navigation highlight"""
  6624. pass
  6625. # IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); /* original C++ signature */
  6626. def find_rendered_text_end(text: str, text_end: Optional[str] = None) -> str:
  6627. """Find the optional ## from which we stop displaying text."""
  6628. pass
  6629. # IMGUI_API void RenderMouseCursor(ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow); /* original C++ signature */
  6630. def render_mouse_cursor(
  6631. pos: ImVec2Like, scale: float, mouse_cursor: MouseCursor, col_fill: ImU32, col_border: ImU32, col_shadow: ImU32
  6632. ) -> None:
  6633. pass
  6634. # Render helpers (those functions don't access any ImGui state!)
  6635. # IMGUI_API void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale = 1.0f); /* original C++ signature */
  6636. def render_arrow(draw_list: ImDrawList, pos: ImVec2Like, col: ImU32, dir: Dir, scale: float = 1.0) -> None:
  6637. pass
  6638. # IMGUI_API void RenderBullet(ImDrawList* draw_list, ImVec2 pos, ImU32 col); /* original C++ signature */
  6639. def render_bullet(draw_list: ImDrawList, pos: ImVec2Like, col: ImU32) -> None:
  6640. pass
  6641. # IMGUI_API void RenderCheckMark(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz); /* original C++ signature */
  6642. def render_check_mark(draw_list: ImDrawList, pos: ImVec2Like, col: ImU32, sz: float) -> None:
  6643. pass
  6644. # IMGUI_API void RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col); /* original C++ signature */
  6645. def render_arrow_pointing_at(
  6646. draw_list: ImDrawList, pos: ImVec2Like, half_sz: ImVec2Like, direction: Dir, col: ImU32
  6647. ) -> None:
  6648. pass
  6649. # IMGUI_API void RenderArrowDockMenu(ImDrawList* draw_list, ImVec2 p_min, float sz, ImU32 col); /* original C++ signature */
  6650. def render_arrow_dock_menu(draw_list: ImDrawList, p_min: ImVec2Like, sz: float, col: ImU32) -> None:
  6651. pass
  6652. # IMGUI_API void RenderRectFilledInRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float fill_x0, float fill_x1, float rounding); /* original C++ signature */
  6653. def render_rect_filled_in_range_h(
  6654. draw_list: ImDrawList, rect: ImRect, col: ImU32, fill_x0: float, fill_x1: float, rounding: float
  6655. ) -> None:
  6656. pass
  6657. # IMGUI_API void RenderRectFilledWithHole(ImDrawList* draw_list, const ImRect& outer, const ImRect& inner, ImU32 col, float rounding); /* original C++ signature */
  6658. def render_rect_filled_with_hole(
  6659. draw_list: ImDrawList, outer: ImRect, inner: ImRect, col: ImU32, rounding: float
  6660. ) -> None:
  6661. pass
  6662. # IMGUI_API ImDrawFlags CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold); /* original C++ signature */
  6663. def calc_rounding_flags_for_rect_in_rect(r_in: ImRect, r_outer: ImRect, threshold: float) -> ImDrawFlags:
  6664. pass
  6665. # Widgets: Text
  6666. # IMGUI_API void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0); /* original C++ signature */
  6667. def text_ex(text: str, text_end: Optional[str] = None, flags: TextFlags = 0) -> None:
  6668. pass
  6669. # IMGUI_API void TextAligned(float align_x, float size_x, const char* fmt, ...); /* original C++ signature */
  6670. def text_aligned(align_x: float, size_x: float, fmt: str) -> None:
  6671. """FIXME-WIP: Works but API is likely to be reworked. This is designed for 1 item on the line. (#7024)"""
  6672. pass
  6673. # Widgets
  6674. # IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0); /* original C++ signature */
  6675. def button_ex(label: str, size_arg: Optional[ImVec2Like] = None, flags: ButtonFlags = 0) -> bool:
  6676. """Python bindings defaults:
  6677. If size_arg is None, then its default value will be: ImVec2(0, 0)
  6678. """
  6679. pass
  6680. # IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0); /* original C++ signature */
  6681. def arrow_button_ex(str_id: str, dir: Dir, size_arg: ImVec2Like, flags: ButtonFlags = 0) -> bool:
  6682. pass
  6683. # IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0); /* original C++ signature */
  6684. def image_button_ex(
  6685. id_: ID,
  6686. tex_ref: ImTextureRef,
  6687. image_size: ImVec2Like,
  6688. uv0: ImVec2Like,
  6689. uv1: ImVec2Like,
  6690. bg_col: ImVec4Like,
  6691. tint_col: ImVec4Like,
  6692. flags: ButtonFlags = 0,
  6693. ) -> bool:
  6694. pass
  6695. # IMGUI_API void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1.0f); /* original C++ signature */
  6696. def separator_ex(flags: SeparatorFlags, thickness: float = 1.0) -> None:
  6697. pass
  6698. # IMGUI_API void SeparatorTextEx(ImGuiID id, const char* label, const char* label_end, float extra_width); /* original C++ signature */
  6699. def separator_text_ex(id_: ID, label: str, label_end: str, extra_width: float) -> None:
  6700. pass
  6701. # IMGUI_API bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value); /* original C++ signature */
  6702. @overload
  6703. def checkbox_flags(label: str, flags: ImS64, flags_value: ImS64) -> bool:
  6704. pass
  6705. # IMGUI_API bool CheckboxFlags(const char* label, ImU64* flags, ImU64 flags_value); /* original C++ signature */
  6706. @overload
  6707. def checkbox_flags(label: str, flags: ImU64, flags_value: ImU64) -> bool:
  6708. pass
  6709. # Widgets: Window Decorations
  6710. # IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos); /* original C++ signature */
  6711. def close_button(id_: ID, pos: ImVec2Like) -> bool:
  6712. pass
  6713. # IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_node); /* original C++ signature */
  6714. def collapse_button(id_: ID, pos: ImVec2Like, dock_node: DockNode) -> bool:
  6715. pass
  6716. # IMGUI_API void Scrollbar(ImGuiAxis axis); /* original C++ signature */
  6717. def scrollbar(axis: Axis) -> None:
  6718. pass
  6719. # IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags draw_rounding_flags = 0); /* original C++ signature */
  6720. def scrollbar_ex(
  6721. bb: ImRect,
  6722. id_: ID,
  6723. axis: Axis,
  6724. p_scroll_v: ImS64,
  6725. avail_v: ImS64,
  6726. contents_v: ImS64,
  6727. draw_rounding_flags: ImDrawFlags = 0,
  6728. ) -> bool:
  6729. pass
  6730. # IMGUI_API ImRect GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis); /* original C++ signature */
  6731. def get_window_scrollbar_rect(window: Window, axis: Axis) -> ImRect:
  6732. pass
  6733. # IMGUI_API ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis); /* original C++ signature */
  6734. def get_window_scrollbar_id(window: Window, axis: Axis) -> ID:
  6735. pass
  6736. # IMGUI_API ImGuiID GetWindowResizeCornerID(ImGuiWindow* window, int n); /* original C++ signature */
  6737. def get_window_resize_corner_id(window: Window, n: int) -> ID:
  6738. """0..3: corners"""
  6739. pass
  6740. # IMGUI_API ImGuiID GetWindowResizeBorderID(ImGuiWindow* window, ImGuiDir dir); /* original C++ signature */
  6741. def get_window_resize_border_id(window: Window, dir: Dir) -> ID:
  6742. pass
  6743. # IMGUI_API void ExtendHitBoxWhenNearViewportEdge(ImGuiWindow* window, ImRect* bb, float threshold, ImGuiAxis axis); /* original C++ signature */
  6744. def extend_hit_box_when_near_viewport_edge(window: Window, bb: ImRect, threshold: float, axis: Axis) -> None:
  6745. pass
  6746. # Widgets low-level behaviors
  6747. # IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0); /* original C++ signature */
  6748. def button_behavior(
  6749. bb: ImRect, id_: ID, out_hovered: bool, out_held: bool, flags: ButtonFlags = 0
  6750. ) -> Tuple[bool, bool, bool]:
  6751. pass
  6752. # IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags); /* original C++ signature */
  6753. def drag_behavior(
  6754. id_: ID, data_type: DataType, p_v: Any, v_speed: float, p_min: Any, p_max: Any, format: str, flags: SliderFlags
  6755. ) -> bool:
  6756. pass
  6757. # IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb); /* original C++ signature */
  6758. def slider_behavior(
  6759. bb: ImRect,
  6760. id_: ID,
  6761. data_type: DataType,
  6762. p_v: Any,
  6763. p_min: Any,
  6764. p_max: Any,
  6765. format: str,
  6766. flags: SliderFlags,
  6767. out_grab_bb: ImRect,
  6768. ) -> bool:
  6769. pass
  6770. # IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0); /* original C++ signature */
  6771. def splitter_behavior(
  6772. bb: ImRect,
  6773. id_: ID,
  6774. axis: Axis,
  6775. size1: float,
  6776. size2: float,
  6777. min_size1: float,
  6778. min_size2: float,
  6779. hover_extend: float = 0.0,
  6780. hover_visibility_delay: float = 0.0,
  6781. bg_col: ImU32 = 0,
  6782. ) -> Tuple[bool, float, float]:
  6783. pass
  6784. # Widgets: Tree Nodes
  6785. # IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL); /* original C++ signature */
  6786. def tree_node_behavior(id_: ID, flags: TreeNodeFlags, label: str, label_end: Optional[str] = None) -> bool:
  6787. pass
  6788. # IMGUI_API void TreeNodeDrawLineToChildNode(const ImVec2& target_pos); /* original C++ signature */
  6789. def tree_node_draw_line_to_child_node(target_pos: ImVec2Like) -> None:
  6790. pass
  6791. # IMGUI_API void TreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data); /* original C++ signature */
  6792. def tree_node_draw_line_to_tree_pop(data: TreeNodeStackData) -> None:
  6793. pass
  6794. # IMGUI_API void TreePushOverrideID(ImGuiID id); /* original C++ signature */
  6795. def tree_push_override_id(id_: ID) -> None:
  6796. pass
  6797. # IMGUI_API void TreeNodeSetOpen(ImGuiID storage_id, bool open); /* original C++ signature */
  6798. def tree_node_set_open(storage_id: ID, open: bool) -> None:
  6799. pass
  6800. # IMGUI_API bool TreeNodeUpdateNextOpen(ImGuiID storage_id, ImGuiTreeNodeFlags flags); /* original C++ signature */
  6801. def tree_node_update_next_open(storage_id: ID, flags: TreeNodeFlags) -> bool:
  6802. """Return open state. Consume previous SetNextItemOpen() data, if any. May return True when logging."""
  6803. pass
  6804. # Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
  6805. # To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
  6806. # e.g. " extern template IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDataType data_type, float v); "
  6807. # Data type helpers
  6808. # InputText
  6809. # [ADAPT_IMGUI_BUNDLE]
  6810. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6811. #
  6812. # IMGUI_API bool InputTextEx(const char* label, const char* hint, std::string* s, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL); /* original C++ signature */
  6813. def input_text_ex(
  6814. label: str, hint: str, s: str, size_arg: ImVec2Like, flags: InputTextFlags, callback: InputTextCallback = None
  6815. ) -> Tuple[bool, str]:
  6816. pass
  6817. # IMGUI_API bool TempInputText(const ImRect& bb, ImGuiID id, const char* label, std::string* s, ImGuiInputTextFlags flags); /* original C++ signature */
  6818. def temp_input_text(bb: ImRect, id_: ID, label: str, s: str, flags: InputTextFlags) -> Tuple[bool, str]:
  6819. pass
  6820. # #endif
  6821. #
  6822. # [/ADAPT_IMGUI_BUNDLE]
  6823. # IMGUI_API void InputTextDeactivateHook(ImGuiID id); /* original C++ signature */
  6824. def input_text_deactivate_hook(id_: ID) -> None:
  6825. pass
  6826. # inline bool TempInputIsActive(ImGuiID id) { ImGuiContext& g = *GImGui; return g.ActiveId == id && g.TempInputId == id; } /* original C++ signature */
  6827. def temp_input_is_active(id_: ID) -> bool:
  6828. """(private API)"""
  6829. pass
  6830. # inline ImGuiInputTextState* GetInputTextState(ImGuiID id) { ImGuiContext& g = *GImGui; return (id != 0 && g.InputTextState.ID == id) ? &g.InputTextState : NULL; } /* original C++ signature */
  6831. def get_input_text_state(id_: ID) -> InputTextState:
  6832. """(private API)
  6833. Get input text state if active
  6834. """
  6835. pass
  6836. # IMGUI_API void SetNextItemRefVal(ImGuiDataType data_type, void* p_data); /* original C++ signature */
  6837. def set_next_item_ref_val(data_type: DataType, p_data: Any) -> None:
  6838. pass
  6839. # inline bool IsItemActiveAsInputText() { ImGuiContext& g = *GImGui; return g.ActiveId != 0 && g.ActiveId == g.LastItemData.ID && g.InputTextState.ID == g.LastItemData.ID; } /* original C++ signature */
  6840. def is_item_active_as_input_text() -> bool:
  6841. """(private API)
  6842. This may be useful to apply workaround that a based on distinguish whenever an item is active as a text input field.
  6843. """
  6844. pass
  6845. # Color
  6846. # IMGUI_API void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags); /* original C++ signature */
  6847. def color_tooltip(text: str, col: float, flags: ColorEditFlags) -> None:
  6848. pass
  6849. # IMGUI_API void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags); /* original C++ signature */
  6850. def color_edit_options_popup(col: float, flags: ColorEditFlags) -> None:
  6851. pass
  6852. # IMGUI_API void ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags); /* original C++ signature */
  6853. def color_picker_options_popup(ref_col: float, flags: ColorEditFlags) -> None:
  6854. pass
  6855. # inline void SetNextItemColorMarker(ImU32 col) { ImGuiContext& g = *GImGui; g.NextItemData.HasFlags |= ImGuiNextItemDataFlags_HasColorMarker; g.NextItemData.ColorMarker = col; } /* original C++ signature */
  6856. def set_next_item_color_marker(col: ImU32) -> None:
  6857. """(private API)"""
  6858. pass
  6859. # Shade functions (write over already created vertices)
  6860. # IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1); /* original C++ signature */
  6861. def shade_verts_linear_color_gradient_keep_alpha(
  6862. draw_list: ImDrawList,
  6863. vert_start_idx: int,
  6864. vert_end_idx: int,
  6865. gradient_p0: ImVec2Like,
  6866. gradient_p1: ImVec2Like,
  6867. col0: ImU32,
  6868. col1: ImU32,
  6869. ) -> None:
  6870. pass
  6871. # IMGUI_API void ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp); /* original C++ signature */
  6872. def shade_verts_linear_uv(
  6873. draw_list: ImDrawList,
  6874. vert_start_idx: int,
  6875. vert_end_idx: int,
  6876. a: ImVec2Like,
  6877. b: ImVec2Like,
  6878. uv_a: ImVec2Like,
  6879. uv_b: ImVec2Like,
  6880. clamp: bool,
  6881. ) -> None:
  6882. pass
  6883. # IMGUI_API void ShadeVertsTransformPos(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& pivot_in, float cos_a, float sin_a, const ImVec2& pivot_out); /* original C++ signature */
  6884. def shade_verts_transform_pos(
  6885. draw_list: ImDrawList,
  6886. vert_start_idx: int,
  6887. vert_end_idx: int,
  6888. pivot_in: ImVec2Like,
  6889. cos_a: float,
  6890. sin_a: float,
  6891. pivot_out: ImVec2Like,
  6892. ) -> None:
  6893. pass
  6894. # Garbage collection
  6895. # IMGUI_API void GcCompactTransientMiscBuffers(); /* original C++ signature */
  6896. def gc_compact_transient_misc_buffers() -> None:
  6897. pass
  6898. # IMGUI_API void GcCompactTransientWindowBuffers(ImGuiWindow* window); /* original C++ signature */
  6899. def gc_compact_transient_window_buffers(window: Window) -> None:
  6900. pass
  6901. # IMGUI_API void GcAwakeTransientWindowBuffers(ImGuiWindow* window); /* original C++ signature */
  6902. def gc_awake_transient_window_buffers(window: Window) -> None:
  6903. pass
  6904. # Error handling, State Recovery
  6905. # IMGUI_API bool ErrorLog(const char* msg); /* original C++ signature */
  6906. def error_log(msg: str) -> bool:
  6907. pass
  6908. # IMGUI_API void ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out); /* original C++ signature */
  6909. def error_recovery_store_state(state_out: ErrorRecoveryState) -> None:
  6910. pass
  6911. # IMGUI_API void ErrorRecoveryTryToRecoverState(const ImGuiErrorRecoveryState* state_in); /* original C++ signature */
  6912. def error_recovery_try_to_recover_state(state_in: ErrorRecoveryState) -> None:
  6913. pass
  6914. # IMGUI_API void ErrorRecoveryTryToRecoverWindowState(const ImGuiErrorRecoveryState* state_in); /* original C++ signature */
  6915. def error_recovery_try_to_recover_window_state(state_in: ErrorRecoveryState) -> None:
  6916. pass
  6917. # IMGUI_API void ErrorCheckUsingSetCursorPosToExtendParentBoundaries(); /* original C++ signature */
  6918. def error_check_using_set_cursor_pos_to_extend_parent_boundaries() -> None:
  6919. pass
  6920. # IMGUI_API void ErrorCheckEndFrameFinalizeErrorTooltip(); /* original C++ signature */
  6921. def error_check_end_frame_finalize_error_tooltip() -> None:
  6922. pass
  6923. # IMGUI_API bool BeginErrorTooltip(); /* original C++ signature */
  6924. def begin_error_tooltip() -> bool:
  6925. pass
  6926. # IMGUI_API void EndErrorTooltip(); /* original C++ signature */
  6927. def end_error_tooltip() -> None:
  6928. pass
  6929. # IMGUI_API void DemoMarker(const char* file, int line, const char* section); /* original C++ signature */
  6930. def demo_marker(file: str, line: int, section: str) -> None:
  6931. """Demo Doc Marker for e.g. imgui_explorer"""
  6932. pass
  6933. # Debug Tools
  6934. # IMGUI_API void DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size); /* original C++ signature */
  6935. def debug_alloc_hook(info: DebugAllocInfo, frame_count: int, ptr: Any, size: int) -> None:
  6936. """size >= 0 : alloc, size = -1 : free"""
  6937. pass
  6938. # IMGUI_API void DebugDrawCursorPos(ImU32 col = IM_COL32(255, 0, 0, 255)); /* original C++ signature */
  6939. def debug_draw_cursor_pos(col: ImU32 = IM_COL32(255, 0, 0, 255)) -> None:
  6940. pass
  6941. # IMGUI_API void DebugDrawLineExtents(ImU32 col = IM_COL32(255, 0, 0, 255)); /* original C++ signature */
  6942. def debug_draw_line_extents(col: ImU32 = IM_COL32(255, 0, 0, 255)) -> None:
  6943. pass
  6944. # IMGUI_API void DebugDrawItemRect(ImU32 col = IM_COL32(255, 0, 0, 255)); /* original C++ signature */
  6945. def debug_draw_item_rect(col: ImU32 = IM_COL32(255, 0, 0, 255)) -> None:
  6946. pass
  6947. # IMGUI_API void DebugTextUnformattedWithLocateItem(const char* line_begin, const char* line_end); /* original C++ signature */
  6948. def debug_text_unformatted_with_locate_item(line_begin: str, line_end: str) -> None:
  6949. pass
  6950. # IMGUI_API void DebugLocateItem(ImGuiID target_id); /* original C++ signature */
  6951. def debug_locate_item(target_id: ID) -> None:
  6952. """Call sparingly: only 1 at the same time!"""
  6953. pass
  6954. # IMGUI_API void DebugLocateItemOnHover(ImGuiID target_id); /* original C++ signature */
  6955. def debug_locate_item_on_hover(target_id: ID) -> None:
  6956. """Only call on reaction to a mouse Hover: because only 1 at the same time!"""
  6957. pass
  6958. # IMGUI_API void DebugLocateItemResolveWithLastItem(); /* original C++ signature */
  6959. def debug_locate_item_resolve_with_last_item() -> None:
  6960. pass
  6961. # IMGUI_API void DebugBreakClearData(); /* original C++ signature */
  6962. def debug_break_clear_data() -> None:
  6963. pass
  6964. # IMGUI_API bool DebugBreakButton(const char* label, const char* description_of_location); /* original C++ signature */
  6965. def debug_break_button(label: str, description_of_location: str) -> bool:
  6966. pass
  6967. # IMGUI_API void DebugBreakButtonTooltip(bool keyboard_only, const char* description_of_location); /* original C++ signature */
  6968. def debug_break_button_tooltip(keyboard_only: bool, description_of_location: str) -> None:
  6969. pass
  6970. # IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas); /* original C++ signature */
  6971. def show_font_atlas(atlas: ImFontAtlas) -> None:
  6972. pass
  6973. # IMGUI_API ImU64 DebugTextureIDToU64(ImTextureID tex_id); /* original C++ signature */
  6974. def debug_texture_id_to_u64(tex_id: ImTextureID) -> ImU64:
  6975. pass
  6976. # IMGUI_API void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end); /* original C++ signature */
  6977. def debug_hook_id_info(id_: ID, data_type: DataType, data_id: Any, data_id_end: Any) -> None:
  6978. pass
  6979. # IMGUI_API void DebugNodeColumns(ImGuiOldColumns* columns); /* original C++ signature */
  6980. def debug_node_columns(columns: OldColumns) -> None:
  6981. pass
  6982. # IMGUI_API void DebugNodeDockNode(ImGuiDockNode* node, const char* label); /* original C++ signature */
  6983. def debug_node_dock_node(node: DockNode, label: str) -> None:
  6984. pass
  6985. # IMGUI_API void DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label); /* original C++ signature */
  6986. def debug_node_draw_list(window: Window, viewport: ViewportP, draw_list: ImDrawList, label: str) -> None:
  6987. pass
  6988. # IMGUI_API void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, const ImDrawList* draw_list, const ImDrawCmd* draw_cmd, bool show_mesh, bool show_aabb); /* original C++ signature */
  6989. def debug_node_draw_cmd_show_mesh_and_bounding_box(
  6990. out_draw_list: ImDrawList, draw_list: ImDrawList, draw_cmd: ImDrawCmd, show_mesh: bool, show_aabb: bool
  6991. ) -> None:
  6992. pass
  6993. # IMGUI_API void DebugNodeFont(ImFont* font); /* original C++ signature */
  6994. def debug_node_font(font: ImFont) -> None:
  6995. pass
  6996. # IMGUI_API void DebugNodeFontGlyphsForSrcMask(ImFont* font, ImFontBaked* baked, int src_mask); /* original C++ signature */
  6997. def debug_node_font_glyphs_for_src_mask(font: ImFont, baked: ImFontBaked, src_mask: int) -> None:
  6998. pass
  6999. # IMGUI_API void DebugNodeFontGlyph(ImFont* font, const ImFontGlyph* glyph); /* original C++ signature */
  7000. def debug_node_font_glyph(font: ImFont, glyph: ImFontGlyph) -> None:
  7001. pass
  7002. # IMGUI_API void DebugNodeTexture(ImTextureData* tex, int int_id, const ImFontAtlasRect* highlight_rect = NULL); /* original C++ signature */
  7003. def debug_node_texture(tex: ImTextureData, int_id: int, highlight_rect: Optional[ImFontAtlasRect] = None) -> None:
  7004. """ID used to facilitate persisting the "current" texture."""
  7005. pass
  7006. # IMGUI_API void DebugNodeStorage(ImGuiStorage* storage, const char* label); /* original C++ signature */
  7007. def debug_node_storage(storage: Storage, label: str) -> None:
  7008. pass
  7009. # IMGUI_API void DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label); /* original C++ signature */
  7010. def debug_node_tab_bar(tab_bar: TabBar, label: str) -> None:
  7011. pass
  7012. # IMGUI_API void DebugNodeTable(ImGuiTable* table); /* original C++ signature */
  7013. def debug_node_table(table: Table) -> None:
  7014. pass
  7015. # IMGUI_API void DebugNodeTableSettings(ImGuiTableSettings* settings); /* original C++ signature */
  7016. def debug_node_table_settings(settings: TableSettings) -> None:
  7017. pass
  7018. # IMGUI_API void DebugNodeInputTextState(ImGuiInputTextState* state); /* original C++ signature */
  7019. def debug_node_input_text_state(state: InputTextState) -> None:
  7020. pass
  7021. # IMGUI_API void DebugNodeTypingSelectState(ImGuiTypingSelectState* state); /* original C++ signature */
  7022. def debug_node_typing_select_state(state: TypingSelectState) -> None:
  7023. pass
  7024. # IMGUI_API void DebugNodeMultiSelectState(ImGuiMultiSelectState* state); /* original C++ signature */
  7025. def debug_node_multi_select_state(state: MultiSelectState) -> None:
  7026. pass
  7027. # IMGUI_API void DebugNodeWindow(ImGuiWindow* window, const char* label); /* original C++ signature */
  7028. def debug_node_window(window: Window, label: str) -> None:
  7029. pass
  7030. # IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings* settings); /* original C++ signature */
  7031. def debug_node_window_settings(settings: WindowSettings) -> None:
  7032. pass
  7033. # IMGUI_API void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label); /* original C++ signature */
  7034. def debug_node_windows_list(windows: ImVector_Window_ptr, label: str) -> None:
  7035. pass
  7036. # IMGUI_API void DebugNodeViewport(ImGuiViewportP* viewport); /* original C++ signature */
  7037. def debug_node_viewport(viewport: ViewportP) -> None:
  7038. pass
  7039. # IMGUI_API void DebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor, const char* label, int idx); /* original C++ signature */
  7040. def debug_node_platform_monitor(monitor: PlatformMonitor, label: str, idx: int) -> None:
  7041. pass
  7042. # IMGUI_API void DebugRenderKeyboardPreview(ImDrawList* draw_list); /* original C++ signature */
  7043. def debug_render_keyboard_preview(draw_list: ImDrawList) -> None:
  7044. pass
  7045. # IMGUI_API void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb); /* original C++ signature */
  7046. def debug_render_viewport_thumbnail(draw_list: ImDrawList, viewport: ViewportP, bb: ImRect) -> None:
  7047. pass
  7048. # Obsolete functions
  7049. # -----------------------------------------------------------------------------
  7050. # [SECTION] ImFontLoader
  7051. # -----------------------------------------------------------------------------
  7052. class ImFontLoader:
  7053. """Hooks and storage for a given font backend.
  7054. This structure is likely to evolve as we add support for incremental atlas updates.
  7055. Conceptually this could be public, but API is still going to be evolve.
  7056. """
  7057. # const char* Name; /* original C++ signature */
  7058. name: str # (const)
  7059. # size_t FontBakedSrcLoaderDataSize; /* original C++ signature */
  7060. # Size of backend data, Per Baked * Per Source. Buffers are managed by core to avoid excessive allocations.
  7061. # FIXME: At this point the two other types of buffers may be managed by core to be consistent?
  7062. font_baked_src_loader_data_size: int
  7063. # ImFontLoader() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  7064. def __init__(self) -> None:
  7065. pass
  7066. # -----------------------------------------------------------------------------
  7067. # [SECTION] ImFontAtlas internal API
  7068. # -----------------------------------------------------------------------------
  7069. # Helpers: ImTextureRef ==/!= operators provided as convenience
  7070. # (note that _TexID and _TexData are never set simultaneously)
  7071. # Refer to ImFontAtlasPackGetRect() to better understand how this works.
  7072. # inline int ImFontAtlasRectId_GetIndex(ImFontAtlasRectId id) { return (id & ImFontAtlasRectId_IndexMask_); } /* original C++ signature */
  7073. def im_font_atlas_rect_id_get_index(id_: ImFontAtlasRectId) -> int:
  7074. """(private API)"""
  7075. pass
  7076. # inline unsigned int ImFontAtlasRectId_GetGeneration(ImFontAtlasRectId id) { return (unsigned int)(id & ImFontAtlasRectId_GenerationMask_) >> ImFontAtlasRectId_GenerationShift_; } /* original C++ signature */
  7077. def im_font_atlas_rect_id_get_generation(id_: ImFontAtlasRectId) -> int:
  7078. """(private API)"""
  7079. pass
  7080. # inline ImFontAtlasRectId ImFontAtlasRectId_Make(int index_idx, int gen_idx) { IM_ASSERT(index_idx >= 0 && index_idx <= ImFontAtlasRectId_IndexMask_ && gen_idx <= (ImFontAtlasRectId_GenerationMask_ >> ImFontAtlasRectId_GenerationShift_)); return (ImFontAtlasRectId)(index_idx | (gen_idx << ImFontAtlasRectId_GenerationShift_)); } /* original C++ signature */
  7081. def im_font_atlas_rect_id_make(index_idx: int, gen_idx: int) -> ImFontAtlasRectId:
  7082. """(private API)"""
  7083. pass
  7084. class ImFontAtlasRectEntry:
  7085. """Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
  7086. User are returned ImFontAtlasRectId values which are meant to be persistent.
  7087. We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
  7088. RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
  7089. Having this also makes it easier to e.g. sort rectangles during repack.
  7090. """
  7091. # ImFontAtlasRectEntry(); /* original C++ signature */
  7092. def __init__(self) -> None:
  7093. """Auto-generated default constructor"""
  7094. pass
  7095. class ImFontAtlasPostProcessData:
  7096. """Data available to potential texture post-processing functions"""
  7097. # ImFontAtlas* FontAtlas; /* original C++ signature */
  7098. font_atlas: ImFontAtlas
  7099. # ImFont* Font; /* original C++ signature */
  7100. font: ImFont
  7101. # ImFontConfig* FontSrc; /* original C++ signature */
  7102. font_src: ImFontConfig
  7103. # ImFontBaked* FontBaked; /* original C++ signature */
  7104. font_baked: ImFontBaked
  7105. # ImFontGlyph* Glyph; /* original C++ signature */
  7106. glyph: ImFontGlyph
  7107. # Pixel data
  7108. # void* Pixels; /* original C++ signature */
  7109. pixels: Any
  7110. # ImTextureFormat Format; /* original C++ signature */
  7111. format: ImTextureFormat
  7112. # int Pitch; /* original C++ signature */
  7113. pitch: int
  7114. # int Width; /* original C++ signature */
  7115. width: int
  7116. # int Height; /* original C++ signature */
  7117. height: int
  7118. # ImFontAtlasPostProcessData(ImTextureFormat Format = ImTextureFormat(), int Pitch = int(), int Width = int(), int Height = int()); /* original C++ signature */
  7119. def __init__(
  7120. self, format: Optional[ImTextureFormat] = None, pitch: int = int(), width: int = int(), height: int = int()
  7121. ) -> None:
  7122. """Auto-generated default constructor with named params
  7123. Python bindings defaults:
  7124. If Format is None, then its default value will be: ImTextureFormat()
  7125. """
  7126. pass
  7127. # We avoid dragging imstb_rectpack.h into public header (partly because binding generators are having issues with it)
  7128. class stbrp_context_opaque:
  7129. # stbrp_context_opaque(); /* original C++ signature */
  7130. def __init__(self) -> None:
  7131. """Auto-generated default constructor"""
  7132. pass
  7133. class ImFontAtlasBuilder:
  7134. """Internal storage for incrementally packing and building a ImFontAtlas"""
  7135. # stbrp_context_opaque PackContext; /* original C++ signature */
  7136. pack_context: stbrp_context_opaque # Actually 'stbrp_context' but we don't want to define this in the header file.
  7137. # ImVector<ImTextureRect> Rects; /* original C++ signature */
  7138. rects: ImVector_ImTextureRect
  7139. # ImVector<uchar> TempBuffer; /* original C++ signature */
  7140. temp_buffer: ImVector_uchar # Misc scratch buffer
  7141. # int RectsIndexFreeListStart; /* original C++ signature */
  7142. rects_index_free_list_start: int # First unused entry
  7143. # int RectsPackedCount; /* original C++ signature */
  7144. rects_packed_count: int # Number of packed rectangles.
  7145. # int RectsPackedSurface; /* original C++ signature */
  7146. rects_packed_surface: (
  7147. int # Number of packed pixels. Used when compacting to heuristically find the ideal texture size.
  7148. )
  7149. # int RectsDiscardedCount; /* original C++ signature */
  7150. rects_discarded_count: int
  7151. # int RectsDiscardedSurface; /* original C++ signature */
  7152. rects_discarded_surface: int
  7153. # int FrameCount; /* original C++ signature */
  7154. frame_count: int # Current frame count
  7155. # ImVec2i MaxRectSize; /* original C++ signature */
  7156. max_rect_size: ImVec2i # Largest rectangle to pack (de-facto used as a "minimum texture size")
  7157. # ImVec2i MaxRectBounds; /* original C++ signature */
  7158. max_rect_bounds: ImVec2i # Bottom-right most used pixels
  7159. # bool LockDisableResize; /* original C++ signature */
  7160. lock_disable_resize: bool # Disable resizing texture
  7161. # bool PreloadedAllGlyphsRanges; /* original C++ signature */
  7162. preloaded_all_glyphs_ranges: (
  7163. bool # Set when missing ImGuiBackendFlags_RendererHasTextures features forces atlas to preload everything.
  7164. )
  7165. # Cache of all ImFontBaked
  7166. # ImGuiStorage BakedMap; /* original C++ signature */
  7167. baked_map: Storage # BakedId --> ImFontBaked*
  7168. # int BakedDiscardedCount; /* original C++ signature */
  7169. baked_discarded_count: int
  7170. # Custom rectangle identifiers
  7171. # ImFontAtlasRectId PackIdMouseCursors; /* original C++ signature */
  7172. pack_id_mouse_cursors: (
  7173. ImFontAtlasRectId # White pixel + mouse cursors. Also happen to be fallback in case of packing failure.
  7174. )
  7175. # ImFontAtlasRectId PackIdLinesTexData; /* original C++ signature */
  7176. pack_id_lines_tex_data: ImFontAtlasRectId
  7177. # IMGUI_API ImTextureData* ImFontAtlasTextureAdd(ImFontAtlas* atlas, int w, int h); /* original C++ signature */
  7178. def im_font_atlas_texture_add(atlas: ImFontAtlas, w: int, h: int) -> ImTextureData:
  7179. pass
  7180. # IMGUI_API void ImFontAtlasTextureMakeSpace(ImFontAtlas* atlas); /* original C++ signature */
  7181. def im_font_atlas_texture_make_space(atlas: ImFontAtlas) -> None:
  7182. pass
  7183. # IMGUI_API void ImFontAtlasTextureRepack(ImFontAtlas* atlas, int w, int h); /* original C++ signature */
  7184. def im_font_atlas_texture_repack(atlas: ImFontAtlas, w: int, h: int) -> None:
  7185. pass
  7186. # IMGUI_API void ImFontAtlasTextureGrow(ImFontAtlas* atlas, int old_w = -1, int old_h = -1); /* original C++ signature */
  7187. def im_font_atlas_texture_grow(atlas: ImFontAtlas, old_w: int = -1, old_h: int = -1) -> None:
  7188. pass
  7189. # IMGUI_API void ImFontAtlasTextureCompact(ImFontAtlas* atlas); /* original C++ signature */
  7190. def im_font_atlas_texture_compact(atlas: ImFontAtlas) -> None:
  7191. pass
  7192. # IMGUI_API ImVec2i ImFontAtlasTextureGetSizeEstimate(ImFontAtlas* atlas); /* original C++ signature */
  7193. def im_font_atlas_texture_get_size_estimate(atlas: ImFontAtlas) -> ImVec2i:
  7194. pass
  7195. # IMGUI_API bool ImFontAtlasFontSourceInit(ImFontAtlas* atlas, ImFontConfig* src); /* original C++ signature */
  7196. def im_font_atlas_font_source_init(atlas: ImFontAtlas, src: ImFontConfig) -> bool:
  7197. pass
  7198. # IMGUI_API void ImFontAtlasFontSourceAddToFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* src); /* original C++ signature */
  7199. def im_font_atlas_font_source_add_to_font(atlas: ImFontAtlas, font: ImFont, src: ImFontConfig) -> None:
  7200. pass
  7201. # IMGUI_API void ImFontAtlasFontDestroySourceData(ImFontAtlas* atlas, ImFontConfig* src); /* original C++ signature */
  7202. def im_font_atlas_font_destroy_source_data(atlas: ImFontAtlas, src: ImFontConfig) -> None:
  7203. pass
  7204. # IMGUI_API bool ImFontAtlasFontInitOutput(ImFontAtlas* atlas, ImFont* font); /* original C++ signature */
  7205. def im_font_atlas_font_init_output(atlas: ImFontAtlas, font: ImFont) -> bool:
  7206. """Using FontDestroyOutput/FontInitOutput sequence useful notably if font loader params have changed"""
  7207. pass
  7208. # IMGUI_API void ImFontAtlasFontDestroyOutput(ImFontAtlas* atlas, ImFont* font); /* original C++ signature */
  7209. def im_font_atlas_font_destroy_output(atlas: ImFontAtlas, font: ImFont) -> None:
  7210. pass
  7211. # IMGUI_API void ImFontAtlasFontRebuildOutput(ImFontAtlas* atlas, ImFont* font); /* original C++ signature */
  7212. def im_font_atlas_font_rebuild_output(atlas: ImFontAtlas, font: ImFont) -> None:
  7213. pass
  7214. # IMGUI_API void ImFontAtlasFontDiscardBakes(ImFontAtlas* atlas, ImFont* font, int unused_frames); /* original C++ signature */
  7215. def im_font_atlas_font_discard_bakes(atlas: ImFontAtlas, font: ImFont, unused_frames: int) -> None:
  7216. pass
  7217. # IMGUI_API ImGuiID ImFontAtlasBakedGetId(ImGuiID font_id, float baked_size, float rasterizer_density); /* original C++ signature */
  7218. def im_font_atlas_baked_get_id(font_id: ID, baked_size: float, rasterizer_density: float) -> ID:
  7219. pass
  7220. # IMGUI_API ImFontBaked* ImFontAtlasBakedGetOrAdd(ImFontAtlas* atlas, ImFont* font, float font_size, float font_rasterizer_density); /* original C++ signature */
  7221. def im_font_atlas_baked_get_or_add(
  7222. atlas: ImFontAtlas, font: ImFont, font_size: float, font_rasterizer_density: float
  7223. ) -> ImFontBaked:
  7224. pass
  7225. # IMGUI_API ImFontBaked* ImFontAtlasBakedGetClosestMatch(ImFontAtlas* atlas, ImFont* font, float font_size, float font_rasterizer_density); /* original C++ signature */
  7226. def im_font_atlas_baked_get_closest_match(
  7227. atlas: ImFontAtlas, font: ImFont, font_size: float, font_rasterizer_density: float
  7228. ) -> ImFontBaked:
  7229. pass
  7230. # IMGUI_API ImFontBaked* ImFontAtlasBakedAdd(ImFontAtlas* atlas, ImFont* font, float font_size, float font_rasterizer_density, ImGuiID baked_id); /* original C++ signature */
  7231. def im_font_atlas_baked_add(
  7232. atlas: ImFontAtlas, font: ImFont, font_size: float, font_rasterizer_density: float, baked_id: ID
  7233. ) -> ImFontBaked:
  7234. pass
  7235. # IMGUI_API void ImFontAtlasBakedDiscard(ImFontAtlas* atlas, ImFont* font, ImFontBaked* baked); /* original C++ signature */
  7236. def im_font_atlas_baked_discard(atlas: ImFontAtlas, font: ImFont, baked: ImFontBaked) -> None:
  7237. pass
  7238. # IMGUI_API ImFontGlyph* ImFontAtlasBakedAddFontGlyph(ImFontAtlas* atlas, ImFontBaked* baked, ImFontConfig* src, const ImFontGlyph* in_glyph); /* original C++ signature */
  7239. def im_font_atlas_baked_add_font_glyph(
  7240. atlas: ImFontAtlas, baked: ImFontBaked, src: ImFontConfig, in_glyph: ImFontGlyph
  7241. ) -> ImFontGlyph:
  7242. pass
  7243. # IMGUI_API void ImFontAtlasBakedAddFontGlyphAdvancedX(ImFontAtlas* atlas, ImFontBaked* baked, ImFontConfig* src, ImWchar codepoint, float advance_x); /* original C++ signature */
  7244. def im_font_atlas_baked_add_font_glyph_advanced_x(
  7245. atlas: ImFontAtlas, baked: ImFontBaked, src: ImFontConfig, codepoint: ImWchar, advance_x: float
  7246. ) -> None:
  7247. pass
  7248. # IMGUI_API void ImFontAtlasBakedDiscardFontGlyph(ImFontAtlas* atlas, ImFont* font, ImFontBaked* baked, ImFontGlyph* glyph); /* original C++ signature */
  7249. def im_font_atlas_baked_discard_font_glyph(
  7250. atlas: ImFontAtlas, font: ImFont, baked: ImFontBaked, glyph: ImFontGlyph
  7251. ) -> None:
  7252. pass
  7253. # IMGUI_API void ImFontAtlasBakedSetFontGlyphBitmap(ImFontAtlas* atlas, ImFontBaked* baked, ImFontConfig* src, ImFontGlyph* glyph, ImTextureRect* r, const uchar* src_pixels, ImTextureFormat src_fmt, int src_pitch); /* original C++ signature */
  7254. def im_font_atlas_baked_set_font_glyph_bitmap(
  7255. atlas: ImFontAtlas,
  7256. baked: ImFontBaked,
  7257. src: ImFontConfig,
  7258. glyph: ImFontGlyph,
  7259. r: ImTextureRect,
  7260. src_pixels: uchar,
  7261. src_fmt: ImTextureFormat,
  7262. src_pitch: int,
  7263. ) -> None:
  7264. pass
  7265. # IMGUI_API void ImFontAtlasPackInit(ImFontAtlas* atlas); /* original C++ signature */
  7266. def im_font_atlas_pack_init(atlas: ImFontAtlas) -> None:
  7267. pass
  7268. # IMGUI_API ImFontAtlasRectId ImFontAtlasPackAddRect(ImFontAtlas* atlas, int w, int h, ImFontAtlasRectEntry* overwrite_entry = NULL); /* original C++ signature */
  7269. def im_font_atlas_pack_add_rect(
  7270. atlas: ImFontAtlas, w: int, h: int, overwrite_entry: Optional[ImFontAtlasRectEntry] = None
  7271. ) -> ImFontAtlasRectId:
  7272. pass
  7273. # IMGUI_API ImTextureRect* ImFontAtlasPackGetRect(ImFontAtlas* atlas, ImFontAtlasRectId id); /* original C++ signature */
  7274. def im_font_atlas_pack_get_rect(atlas: ImFontAtlas, id_: ImFontAtlasRectId) -> ImTextureRect:
  7275. pass
  7276. # IMGUI_API ImTextureRect* ImFontAtlasPackGetRectSafe(ImFontAtlas* atlas, ImFontAtlasRectId id); /* original C++ signature */
  7277. def im_font_atlas_pack_get_rect_safe(atlas: ImFontAtlas, id_: ImFontAtlasRectId) -> ImTextureRect:
  7278. pass
  7279. # IMGUI_API void ImFontAtlasPackDiscardRect(ImFontAtlas* atlas, ImFontAtlasRectId id); /* original C++ signature */
  7280. def im_font_atlas_pack_discard_rect(atlas: ImFontAtlas, id_: ImFontAtlasRectId) -> None:
  7281. pass
  7282. # IMGUI_API void ImFontAtlasUpdateNewFrame(ImFontAtlas* atlas, int frame_count, bool renderer_has_textures); /* original C++ signature */
  7283. def im_font_atlas_update_new_frame(atlas: ImFontAtlas, frame_count: int, renderer_has_textures: bool) -> None:
  7284. pass
  7285. # IMGUI_API void ImFontAtlasAddDrawListSharedData(ImFontAtlas* atlas, ImDrawListSharedData* data); /* original C++ signature */
  7286. def im_font_atlas_add_draw_list_shared_data(atlas: ImFontAtlas, data: ImDrawListSharedData) -> None:
  7287. pass
  7288. # IMGUI_API void ImFontAtlasRemoveDrawListSharedData(ImFontAtlas* atlas, ImDrawListSharedData* data); /* original C++ signature */
  7289. def im_font_atlas_remove_draw_list_shared_data(atlas: ImFontAtlas, data: ImDrawListSharedData) -> None:
  7290. pass
  7291. # IMGUI_API void ImFontAtlasUpdateDrawListsTextures(ImFontAtlas* atlas, ImTextureRef old_tex, ImTextureRef new_tex); /* original C++ signature */
  7292. def im_font_atlas_update_draw_lists_textures(atlas: ImFontAtlas, old_tex: ImTextureRef, new_tex: ImTextureRef) -> None:
  7293. pass
  7294. # IMGUI_API void ImFontAtlasUpdateDrawListsSharedData(ImFontAtlas* atlas); /* original C++ signature */
  7295. def im_font_atlas_update_draw_lists_shared_data(atlas: ImFontAtlas) -> None:
  7296. pass
  7297. # IMGUI_API void ImFontAtlasTextureBlockConvert(const uchar* src_pixels, ImTextureFormat src_fmt, int src_pitch, uchar* dst_pixels, ImTextureFormat dst_fmt, int dst_pitch, int w, int h); /* original C++ signature */
  7298. def im_font_atlas_texture_block_convert(
  7299. src_pixels: uchar,
  7300. src_fmt: ImTextureFormat,
  7301. src_pitch: int,
  7302. dst_pixels: uchar,
  7303. dst_fmt: ImTextureFormat,
  7304. dst_pitch: int,
  7305. w: int,
  7306. h: int,
  7307. ) -> None:
  7308. pass
  7309. # IMGUI_API void ImFontAtlasTextureBlockPostProcess(ImFontAtlasPostProcessData* data); /* original C++ signature */
  7310. def im_font_atlas_texture_block_post_process(data: ImFontAtlasPostProcessData) -> None:
  7311. pass
  7312. # IMGUI_API void ImFontAtlasTextureBlockPostProcessMultiply(ImFontAtlasPostProcessData* data, float multiply_factor); /* original C++ signature */
  7313. def im_font_atlas_texture_block_post_process_multiply(data: ImFontAtlasPostProcessData, multiply_factor: float) -> None:
  7314. pass
  7315. # IMGUI_API void ImFontAtlasTextureBlockFill(ImTextureData* dst_tex, int dst_x, int dst_y, int w, int h, ImU32 col); /* original C++ signature */
  7316. def im_font_atlas_texture_block_fill(
  7317. dst_tex: ImTextureData, dst_x: int, dst_y: int, w: int, h: int, col: ImU32
  7318. ) -> None:
  7319. pass
  7320. # IMGUI_API void ImFontAtlasTextureBlockCopy(ImTextureData* src_tex, int src_x, int src_y, ImTextureData* dst_tex, int dst_x, int dst_y, int w, int h); /* original C++ signature */
  7321. def im_font_atlas_texture_block_copy(
  7322. src_tex: ImTextureData, src_x: int, src_y: int, dst_tex: ImTextureData, dst_x: int, dst_y: int, w: int, h: int
  7323. ) -> None:
  7324. pass
  7325. # IMGUI_API void ImFontAtlasTextureBlockQueueUpload(ImFontAtlas* atlas, ImTextureData* tex, int x, int y, int w, int h); /* original C++ signature */
  7326. def im_font_atlas_texture_block_queue_upload(
  7327. atlas: ImFontAtlas, tex: ImTextureData, x: int, y: int, w: int, h: int
  7328. ) -> None:
  7329. pass
  7330. # IMGUI_API void ImTextureDataQueueUpload(ImTextureData* tex, int x, int y, int w, int h); /* original C++ signature */
  7331. def im_texture_data_queue_upload(tex: ImTextureData, x: int, y: int, w: int, h: int) -> None:
  7332. pass
  7333. # IMGUI_API int ImTextureDataGetFormatBytesPerPixel(ImTextureFormat format); /* original C++ signature */
  7334. def im_texture_data_get_format_bytes_per_pixel(format: ImTextureFormat) -> int:
  7335. pass
  7336. # IMGUI_API const char* ImTextureDataGetStatusName(ImTextureStatus status); /* original C++ signature */
  7337. def im_texture_data_get_status_name(status: ImTextureStatus) -> str:
  7338. pass
  7339. # IMGUI_API const char* ImTextureDataGetFormatName(ImTextureFormat format); /* original C++ signature */
  7340. def im_texture_data_get_format_name(format: ImTextureFormat) -> str:
  7341. pass
  7342. # IMGUI_API bool ImFontAtlasGetMouseCursorTexData(ImFontAtlas* atlas, ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]); /* original C++ signature */
  7343. def im_font_atlas_get_mouse_cursor_tex_data(
  7344. atlas: ImFontAtlas,
  7345. cursor_type: MouseCursor,
  7346. out_offset: ImVec2Like,
  7347. out_size: ImVec2Like,
  7348. out_uv_border: ImVec2Like,
  7349. out_uv_fill: ImVec2Like,
  7350. ) -> bool:
  7351. pass
  7352. # -----------------------------------------------------------------------------
  7353. # [SECTION] Test Engine specific hooks (imgui_test_engine)
  7354. # -----------------------------------------------------------------------------
  7355. # -----------------------------------------------------------------------------
  7356. # [ADAPT_IMGUI_BUNDLE]: Those struct are needed for the bindings => they are moved from imgui.cpp to imgui_internal.h
  7357. # -----------------------------------------------------------------------------
  7358. # Docking: Internal Types
  7359. # -----------------------------------------------------------------------------
  7360. # - ImGuiDockRequestType
  7361. # - ImGuiDockRequest
  7362. # - ImGuiDockPreviewData
  7363. # - ImGuiDockNodeSettings
  7364. # - ImGuiDockContext
  7365. # -----------------------------------------------------------------------------
  7366. class DockRequestType(enum.IntFlag):
  7367. # ImGuiDockRequestType_None = 0, /* original C++ signature */
  7368. none = enum.auto() # (= 0)
  7369. # ImGuiDockRequestType_Dock, /* original C++ signature */
  7370. dock = enum.auto() # (= 1)
  7371. # ImGuiDockRequestType_Undock, /* original C++ signature */
  7372. undock = enum.auto() # (= 2)
  7373. # ImGuiDockRequestType_Split /* original C++ signature */
  7374. split = enum.auto() # (= 3) # Split is the same as Dock but without a DockPayload
  7375. class DockRequest:
  7376. # ImGuiDockRequestType Type; /* original C++ signature */
  7377. type: DockRequestType
  7378. # ImGuiWindow* DockTargetWindow; /* original C++ signature */
  7379. dock_target_window: Window # Destination/Target Window to dock into (may be a loose window or a DockNode, might be None in which case DockTargetNode cannot be None)
  7380. # ImGuiDockNode* DockTargetNode; /* original C++ signature */
  7381. dock_target_node: DockNode # Destination/Target Node to dock into
  7382. # ImGuiWindow* DockPayload; /* original C++ signature */
  7383. dock_payload: Window # Source/Payload window to dock (may be a loose window or a DockNode), [Optional]
  7384. # ImGuiDir DockSplitDir; /* original C++ signature */
  7385. dock_split_dir: Dir
  7386. # float DockSplitRatio; /* original C++ signature */
  7387. dock_split_ratio: float
  7388. # bool DockSplitOuter; /* original C++ signature */
  7389. dock_split_outer: bool
  7390. # ImGuiWindow* UndockTargetWindow; /* original C++ signature */
  7391. undock_target_window: Window
  7392. # ImGuiDockNode* UndockTargetNode; /* original C++ signature */
  7393. undock_target_node: DockNode
  7394. # ImGuiDockRequest() /* original C++ signature */
  7395. # {
  7396. # Type = ImGuiDockRequestType_None;
  7397. # DockTargetWindow = DockPayload = UndockTargetWindow = NULL;
  7398. # DockTargetNode = UndockTargetNode = NULL;
  7399. # DockSplitDir = ImGuiDir_None;
  7400. # DockSplitRatio = 0.5f;
  7401. # DockSplitOuter = false;
  7402. # }
  7403. def __init__(self) -> None:
  7404. pass
  7405. class DockPreviewData:
  7406. # ImGuiDockNode FutureNode; /* original C++ signature */
  7407. future_node: DockNode
  7408. # bool IsDropAllowed; /* original C++ signature */
  7409. is_drop_allowed: bool
  7410. # bool IsCenterAvailable; /* original C++ signature */
  7411. is_center_available: bool
  7412. # bool IsSidesAvailable; /* original C++ signature */
  7413. is_sides_available: bool # Hold your breath, grammar freaks..
  7414. # bool IsSplitDirExplicit; /* original C++ signature */
  7415. is_split_dir_explicit: bool # Set when hovered the drop rect (vs. implicit SplitDir==None when hovered the window)
  7416. # ImGuiDockNode* SplitNode; /* original C++ signature */
  7417. split_node: DockNode
  7418. # ImGuiDir SplitDir; /* original C++ signature */
  7419. split_dir: Dir
  7420. # float SplitRatio; /* original C++ signature */
  7421. split_ratio: float
  7422. # ImGuiDockPreviewData() : FutureNode(0) { IsDropAllowed = IsCenterAvailable = IsSidesAvailable = IsSplitDirExplicit = false; SplitNode = NULL; SplitDir = ImGuiDir_None; SplitRatio = 0.f; for (int n = 0; n < IM_COUNTOF(DropRectsDraw); n++) DropRectsDraw[n] = ImRect(+FLT_MAX, +FLT_MAX, -FLT_MAX, -FLT_MAX); } /* original C++ signature */
  7423. def __init__(self) -> None:
  7424. pass
  7425. class DockNodeSettings:
  7426. """Persistent Settings data, stored contiguously in SettingsNodes (sizeof() ~32 bytes)"""
  7427. # ImGuiID ID; /* original C++ signature */
  7428. id_: ID
  7429. # ImGuiID ParentNodeId; /* original C++ signature */
  7430. parent_node_id: ID
  7431. # ImGuiID ParentWindowId; /* original C++ signature */
  7432. parent_window_id: ID
  7433. # ImGuiID SelectedTabId; /* original C++ signature */
  7434. selected_tab_id: ID
  7435. # signed char SplitAxis; /* original C++ signature */
  7436. split_axis: int
  7437. # char Depth; /* original C++ signature */
  7438. depth: int
  7439. # ImGuiDockNodeFlags Flags; /* original C++ signature */
  7440. flags: DockNodeFlags # NB: We save individual flags one by one in ascii format (ImGuiDockNodeFlags_SavedFlagsMask_)
  7441. # ImVec2ih Pos; /* original C++ signature */
  7442. pos: ImVec2ih
  7443. # ImVec2ih Size; /* original C++ signature */
  7444. size: ImVec2ih
  7445. # ImVec2ih SizeRef; /* original C++ signature */
  7446. size_ref: ImVec2ih
  7447. # ImGuiDockNodeSettings() { memset((void*)this, 0, sizeof(*this)); SplitAxis = ImGuiAxis_None; } /* original C++ signature */
  7448. def __init__(self) -> None:
  7449. pass
  7450. # [/ADAPT_IMGUI_BUNDLE]
  7451. # #endif
  7452. # <submodule im_stb>
  7453. class im_stb: # Proxy class that introduces typings for the *submodule* im_stb
  7454. pass # (This corresponds to a C++ namespace. All methods are static!)
  7455. # </submodule im_stb>
  7456. #################### </generated_from:imgui_internal.h> ####################
  7457. #################### <generated_from:imgui_internal_pywrappers.h> ####################
  7458. # Part of ImGui Bundle - MIT License - Copyright (c) 2022-2026 Pascal Thomet - https://github.com/pthom/imgui_bundle
  7459. # Handwritten wrappers around parts of the imgui API, when needed for the python bindings
  7460. # IMGUI_API std::tuple<ImGuiID, ImGuiID, ImGuiID> DockBuilderSplitNode_Py(ImGuiID node_id, ImGuiDir split_dir, float size_ratio_for_node_at_dir); /* original C++ signature */
  7461. # }
  7462. def dock_builder_split_node_py(node_id: ID, split_dir: Dir, size_ratio_for_node_at_dir: float) -> Tuple[ID, ID, ID]:
  7463. """DockBuilderSplitNode_Py() create 2 child nodes within 1 node. The initial node becomes a parent node.
  7464. This version is an adaptation for the python bindings (the C++ version uses two output parameters for the ID of the child nodes, this version returns a tuple)
  7465. """
  7466. pass
  7467. #################### </generated_from:imgui_internal_pywrappers.h> ####################
  7468. # </litgen_stub>