__init__.pyi 713 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107
  1. ###############################################################################
  2. # This file is a part of Dear ImGui Bundle, NOT a part of Dear ImGui
  3. # -----------------------------------------------------------------------------
  4. # imgui/__init__.pyi is the equivalent of imgui.h, using the bindings provided
  5. # 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: B008, E741
  11. # mypy: disable-error-code="overload-cannot-match, overload-overlap"
  12. from __future__ import annotations
  13. import sys
  14. from typing import (
  15. Dict,
  16. List,
  17. Any,
  18. Optional,
  19. Tuple,
  20. overload,
  21. Iterator,
  22. Callable,
  23. Union,
  24. Protocol,
  25. TypeAlias,
  26. )
  27. import numpy as np
  28. from numpy.typing import NDArray
  29. import enum
  30. from . import internal as internal
  31. from . import backends as backends
  32. from . import test_engine as test_engine
  33. from .internal import TableHeaderData
  34. ##################################################
  35. # Manually inserted code (typedefs, etc.)
  36. ##################################################
  37. from .internal import (
  38. Context,
  39. ImDrawListSharedData,
  40. ImRect,
  41. ColorMod,
  42. GroupData,
  43. PopupData,
  44. ViewportP,
  45. InputEvent,
  46. TableInstanceData,
  47. TableTempData,
  48. PtrOrIndex,
  49. SettingsHandler,
  50. ShrinkWidthItem,
  51. StackLevelInfo,
  52. TabItem,
  53. KeyRoutingData,
  54. ListClipperData,
  55. ListClipperRange,
  56. OldColumnData,
  57. OldColumns,
  58. StyleMod,
  59. WindowStackData,
  60. FocusScopeData,
  61. MultiSelectFlags,
  62. SelectionUserData,
  63. TreeNodeStackData,
  64. MultiSelectTempData,
  65. ItemFlags,
  66. ImFontLoader,
  67. ImDrawTextFlags,
  68. )
  69. VoidPtr = Any
  70. FLT_MIN: float # value defined by this module as the minimum acceptable C(++) float
  71. FLT_MAX: float # value defined by this module as the maximum acceptable C(++) float
  72. IM_COL32_WHITE: int
  73. IM_COL32_BLACK: int # = IM_COL32(0, 0, 0, 255)
  74. Window = internal.Window
  75. uint = int
  76. uchar = int
  77. char = int
  78. ImFontAtlasRectId = int
  79. NpBuffer: TypeAlias = NDArray[np.uint8]
  80. # -----------------------------------------------------------------------------
  81. # [SECTION] Forward declarations and basic types
  82. # -----------------------------------------------------------------------------
  83. """
  84. // Forward declarations
  85. struct ImDrawChannel; // Temporary storage to output draw commands out of order, used by ImDrawListSplitter and ImDrawList::ChannelsSplit()
  86. struct ImDrawCmd; // A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a callback)
  87. struct ImDrawData; // All draw command lists required to render the frame + pos/size coordinates to use for the projection matrix.
  88. struct ImDrawList; // A single draw command list (generally one per window, conceptually you may see this as a dynamic "mesh" builder)
  89. struct ImDrawListSharedData; // Data shared among multiple draw lists (typically owned by parent ImGui context, but you may create one yourself)
  90. struct ImDrawListSplitter; // Helper to split a draw list into different layers which can be drawn into out of order, then flattened back.
  91. struct ImDrawVert; // A single vertex (pos + uv + col = 20 bytes by default. Override layout with IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT)
  92. struct ImFont; // Runtime data for a single font within a parent ImFontAtlas
  93. struct ImFontAtlas; // Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF/OTF font loader
  94. struct ImFontConfig; // Configuration data when adding a font or merging fonts
  95. struct ImFontGlyph; // A single font glyph (code point + coordinates within in ImFontAtlas + offset)
  96. struct ImFontGlyphRangesBuilder; // Helper to build glyph ranges from text/string data
  97. struct ImColor; // Helper functions to create a color that can be converted to either u32 or float4 (*OBSOLETE* please avoid using)
  98. struct ImGuiContext; // Dear ImGui context (opaque structure, unless including imgui_internal.h)
  99. struct ImGuiIO; // Main configuration and I/O between your application and ImGui
  100. struct ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
  101. struct ImGuiKeyData; // Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
  102. struct ImGuiListClipper; // Helper to manually clip large list of items
  103. struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
  104. struct ImGuiPayload; // User data payload for drag and drop operations
  105. struct ImGuiPlatformImeData; // Platform IME data for io.SetPlatformImeDataFn() function.
  106. struct ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
  107. struct ImGuiStorage; // Helper for key->value storage
  108. struct ImGuiStyle; // Runtime data for styling/colors
  109. struct ImGuiTableSortSpecs; // Sorting specifications for a table (often handling sort specs for a single column, occasionally more)
  110. struct ImGuiTableColumnSortSpecs; // Sorting specification for one column of a table
  111. struct ImGuiTextBuffer; // Helper to hold and append into a text buffer (~string builder)
  112. struct ImGuiTextFilter; // Helper to parse and apply text filters (e.g. "aaaaa[,bbbbb][,ccccc]")
  113. struct ImGuiViewport; // A Platform Window (always only one in 'master' branch), in the future may represent Platform Monitor
  114. """
  115. # We forward declare only the opaque structures
  116. # ImDrawVert = Any
  117. """
  118. // Enums/Flags (declared as int for compatibility with old C++, to allow using as flags without overhead, and to not pollute the top of this file)
  119. // - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists!
  120. // In Visual Studio IDE: CTRL+comma ("Edit.GoToAll") can follow symbols in comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot.
  121. // With Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols in comments.
  122. typedef int ImGuiCol; // -> enum ImGuiCol_ // Enum: A color identifier for styling
  123. typedef int ImGuiCond; // -> enum ImGuiCond_ // Enum: A condition for many Set*() functions
  124. typedef int ImGuiDataType; // -> enum ImGuiDataType_ // Enum: A primary data type
  125. typedef int ImGuiDir; // -> enum ImGuiDir_ // Enum: A cardinal direction
  126. typedef int ImGuiKey; // -> enum ImGuiKey_ // Enum: A key identifier
  127. typedef int ImGuiNavInput; // -> enum ImGuiNavInput_ // Enum: An input identifier for navigation
  128. typedef int ImGuiMouseButton; // -> enum ImGuiMouseButton_ // Enum: A mouse button identifier (0=left, 1=right, 2=middle)
  129. typedef int ImGuiMouseCursor; // -> enum ImGuiMouseCursor_ // Enum: A mouse cursor identifier
  130. typedef int ImGuiSortDirection; // -> enum ImGuiSortDirection_ // Enum: A sorting direction (ascending or descending)
  131. typedef int ImGuiStyleVar; // -> enum ImGuiStyleVar_ // Enum: A variable identifier for styling
  132. typedef int ImGuiTableBgTarget; // -> enum ImGuiTableBgTarget_ // Enum: A color target for TableSetBgColor()
  133. typedef int ImDrawFlags; // -> enum ImDrawFlags_ // Flags: for ImDrawList functions
  134. typedef int ImDrawListFlags; // -> enum ImDrawListFlags_ // Flags: for ImDrawList instance
  135. typedef int ImFontAtlasFlags; // -> enum ImFontAtlasFlags_ // Flags: for ImFontAtlas build
  136. typedef int ImGuiBackendFlags; // -> enum ImGuiBackendFlags_ // Flags: for io.BackendFlags
  137. typedef int ImGuiButtonFlags; // -> enum ImGuiButtonFlags_ // Flags: for InvisibleButton()
  138. typedef int ImGuiColorEditFlags; // -> enum ImGuiColorEditFlags_ // Flags: for ColorEdit4(), ColorPicker4() etc.
  139. typedef int ImGuiConfigFlags; // -> enum ImGuiConfigFlags_ // Flags: for io.ConfigFlags
  140. typedef int ImGuiComboFlags; // -> enum ImGuiComboFlags_ // Flags: for BeginCombo()
  141. typedef int ImGuiDockNodeFlags; // -> enum ImGuiDockNodeFlags_ // Flags: for DockSpace()
  142. typedef int ImGuiDragDropFlags; // -> enum ImGuiDragDropFlags_ // Flags: for BeginDragDropSource(), AcceptDragDropPayload()
  143. typedef int ImGuiFocusedFlags; // -> enum ImGuiFocusedFlags_ // Flags: for IsWindowFocused()
  144. typedef int ImGuiHoveredFlags; // -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
  145. typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
  146. typedef int ImGuiModFlags; // -> enum ImGuiModFlags_ // Flags: for io.KeyMods (Ctrl/Shift/Alt/Super)
  147. typedef int ImGuiPopupFlags; // -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
  148. typedef int ImGuiSelectableFlags; // -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
  149. typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
  150. typedef int ImGuiTabBarFlags; // -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
  151. typedef int ImGuiTabItemFlags; // -> enum ImGuiTabItemFlags_ // Flags: for BeginTabItem()
  152. typedef int ImGuiTableFlags; // -> enum ImGuiTableFlags_ // Flags: For BeginTable()
  153. typedef int ImGuiTableColumnFlags; // -> enum ImGuiTableColumnFlags_// Flags: For TableSetupColumn()
  154. typedef int ImGuiTableRowFlags; // -> enum ImGuiTableRowFlags_ // Flags: For TableNextRow()
  155. typedef int ImGuiTreeNodeFlags; // -> enum ImGuiTreeNodeFlags_ // Flags: for TreeNode(), TreeNodeEx(), CollapsingHeader()
  156. typedef int ImGuiViewportFlags; // -> enum ImGuiViewportFlags_ // Flags: for ImGuiViewport
  157. typedef int ImGuiWindowFlags; // -> enum ImGuiWindowFlags_ // Flags: for Begin(), BeginChild()
  158. """
  159. Col = int # -> enum Col_ # Enum: A color identifier for styling
  160. Cond = int # -> enum Cond_ # Enum: A condition for many Set*() functions
  161. DataType = int # -> enum DataType_ # Enum: A primary data type
  162. NavInput = int # -> enum NavInput_ # Enum: An input identifier for navigation
  163. MouseButton = int # -> enum MouseButton_ # Enum: A mouse button identifier (0=left, 1=right, 2=middle)
  164. MouseCursor = int # -> enum MouseCursor_ # Enum: A mouse cursor identifier
  165. StyleVar = int # -> enum StyleVar_ # Enum: A variable identifier for styling
  166. TableBgTarget = int # -> enum TableBgTarget_ # Enum: A color target for TableSetBgColor()
  167. ImDrawFlags = int # -> enum ImDrawFlags_ # Flags: for ImDrawList functions
  168. ImDrawListFlags = int # -> enum ImDrawListFlags_ # Flags: for ImDrawList instance
  169. ImFontAtlasFlags = int # -> enum ImFontAtlasFlags_ # Flags: for ImFontAtlas build
  170. BackendFlags = int # -> enum BackendFlags_ # Flags: for io.BackendFlags
  171. ButtonFlags = int # -> enum ButtonFlags_ # Flags: for InvisibleButton()
  172. ColorEditFlags = int # -> enum ColorEditFlags_ # Flags: for ColorEdit4(), ColorPicker4() etc.
  173. ConfigFlags = int # -> enum ConfigFlags_ # Flags: for io.ConfigFlags
  174. ComboFlags = int # -> enum ComboFlags_ # Flags: for BeginCombo()
  175. DockNodeFlags = int # -> enum DockNodeFlags_ // Flags: for DockSpace()
  176. DragDropFlags = int # -> enum DragDropFlags_ # Flags: for BeginDragDropSource(), AcceptDragDropPayload()
  177. FocusedFlags = int # -> enum FocusedFlags_ # Flags: for IsWindowFocused()
  178. HoveredFlags = int # -> enum HoveredFlags_ # Flags: for IsItemHovered(), IsWindowHovered() etc.
  179. InputTextFlags = int # -> enum InputTextFlags_ # Flags: for InputText(), InputTextMultiline()
  180. ModFlags = int # -> enum ModFlags_ # Flags: for io.KeyMods (Ctrl/Shift/Alt/Super)
  181. PopupFlags = int # -> enum PopupFlags_ # Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
  182. SelectableFlags = int # -> enum SelectableFlags_ # Flags: for Selectable()
  183. SliderFlags = int # -> enum SliderFlags_ # Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
  184. TabBarFlags = int # -> enum TabBarFlags_ # Flags: for BeginTabBar()
  185. TabItemFlags = int # -> enum TabItemFlags_ # Flags: for BeginTabItem()
  186. TableFlags = int # -> enum TableFlags_ # Flags: For BeginTable()
  187. TableColumnFlags = int # -> enum TableColumnFlags_# Flags: For TableSetupColumn()
  188. TableRowFlags = int # -> enum TableRowFlags_ # Flags: For TableNextRow()
  189. TreeNodeFlags = int # -> enum TreeNodeFlags_ # Flags: for TreeNode(), TreeNodeEx(), CollapsingHeader()
  190. ViewportFlags = int # -> enum ViewportFlags_ # Flags: for ImGuiViewport
  191. WindowFlags = int # -> enum WindowFlags_ # Flags: for Begin(), BeginChild()
  192. ToggleFlags = int # -> enum ToggleFlags_
  193. ChildFlags = int # -> enum ChildFlags_
  194. InputFlags = int # -> enum ImGuiInputFlags_ // Flags: for Shortcut(), SetNextItemShortcut()
  195. KeyChord = ModFlags # == int. We generally use ImGuiKeyChord to mean "a ImGuiKey or-ed with any number of ImGuiMod_XXX value", but you may store only mods in there.
  196. ImFontFlags = int # -> enum ImFontFlags_ // Flags: for ImFont
  197. ListClipperFlags = int
  198. """
  199. // ImTexture: user data for renderer backend to identify a texture [Compile-time configurable type]
  200. // - To use something else than an opaque void* pointer: override with e.g. '#define ImTextureID MyTextureType*' in your imconfig.h file.
  201. // - This can be whatever to you want it to be! read the FAQ about ImTextureID for details.
  202. #ifndef ImTextureID
  203. typedef void* ImTextureID; // Default: store a pointer or an integer fitting in a pointer (most renderer backends are ok with that)
  204. #endif
  205. """
  206. ImTextureID = int
  207. """
  208. // ImDrawIdx: vertex index. [Compile-time configurable type]
  209. // - To use 16-bit indices + allow large meshes: backend need to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' and handle ImDrawCmd::VtxOffset (recommended).
  210. // - To use 32-bit indices: override with '#define ImDrawIdx unsigned int' in your imconfig.h file.
  211. #ifndef ImDrawIdx
  212. typedef unsigned short ImDrawIdx; // Default: 16-bit (for maximum compatibility with renderer backends)
  213. #endif
  214. """
  215. ImDrawIdx = int
  216. """
  217. // Scalar data types
  218. typedef unsigned int ImGuiID;// A unique ID used by widgets (typically the result of hashing a stack of string)
  219. typedef signed char ImS8; // 8-bit signed integer
  220. typedef unsigned char ImU8; // 8-bit unsigned integer
  221. typedef signed short ImS16; // 16-bit signed integer
  222. typedef unsigned short ImU16; // 16-bit unsigned integer
  223. typedef signed int ImS32; // 32-bit signed integer == int
  224. typedef unsigned int ImU32; // 32-bit unsigned integer (often used to store packed colors)
  225. typedef signed long long ImS64; // 64-bit signed integer
  226. typedef unsigned long long ImU64; // 64-bit unsigned integer
  227. """
  228. # Scalar data types
  229. ID = int # A unique ID used by widgets (typically the result of hashing a stack of string)
  230. ImS8 = int # 8-bit integer
  231. ImU8 = int # 8-bit integer
  232. ImS16 = int # 16-bit integer
  233. ImU16 = int # 16-bit integer
  234. ImS32 = int # 32-bit integer == int
  235. ImU32 = int # 32-bit integer (often used to store packed colors)
  236. ImS64 = int # 64-bit integer
  237. ImU64 = int # 64-bit integer
  238. """
  239. // Character types
  240. // (we generally use UTF-8 encoded string in the API. This is storage specifically for a decoded character used for keyboard input and display)
  241. typedef unsigned short ImWchar16; // A single decoded U16 character/code point. We encode them as multi bytes UTF-8 when used in strings.
  242. typedef unsigned int ImWchar32; // A single decoded U32 character/code point. We encode them as multi bytes UTF-8 when used in strings.
  243. #ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16]
  244. typedef ImWchar32 ImWchar;
  245. #else
  246. typedef ImWchar16 ImWchar;
  247. #endif
  248. """
  249. ImWchar = int
  250. ImWchar16 = int
  251. ImWchar32 = int
  252. """
  253. // Callback and functions types
  254. typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data); // Callback function for ImGui::InputText()
  255. typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); // Callback function for ImGui::SetNextWindowSizeConstraints()
  256. typedef void* (*ImGuiMemAllocFunc)(size_t sz, void* user_data); // Function signature for ImGui::SetAllocatorFunctions()
  257. typedef void (*ImGuiMemFreeFunc)(void* ptr, void* user_data); // Function signature for ImGui::SetAllocatorFunctions()
  258. """
  259. """
  260. #ifndef ImDrawCallback
  261. typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd);
  262. #endif
  263. """
  264. MemAllocFunc = Any
  265. MemFreeFunc = Any
  266. ImDrawCallback = Any
  267. # using ImGuiInputTextCallback = std::function<int(ImGuiInputTextCallbackData*)>; // Callback function for ImGui::InputText()
  268. # using ImGuiSizeCallback = std::function<void(ImGuiSizeCallbackData*)>; // Callback function for ImGui::SetNextWindowSizeConstraints()
  269. InputTextCallback = Callable[[InputTextCallbackData], int] | None
  270. SizeCallback = Callable[[SizeCallbackData], None] | None
  271. """
  272. // Helpers macros to generate 32-bit encoded colors
  273. // User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file.
  274. #ifndef IM_COL32_R_SHIFT
  275. #ifdef IMGUI_USE_BGRA_PACKED_COLOR
  276. #define IM_COL32_R_SHIFT 16
  277. #define IM_COL32_G_SHIFT 8
  278. #define IM_COL32_B_SHIFT 0
  279. #define IM_COL32_A_SHIFT 24
  280. #define IM_COL32_A_MASK 0xFF000000
  281. #else
  282. #define IM_COL32_R_SHIFT 0
  283. #define IM_COL32_G_SHIFT 8
  284. #define IM_COL32_B_SHIFT 16
  285. #define IM_COL32_A_SHIFT 24
  286. #define IM_COL32_A_MASK 0xFF000000
  287. #endif
  288. #endif
  289. #define IM_COL32(R,G,B,A) (((ImU32)(A)<<IM_COL32_A_SHIFT) | ((ImU32)(B)<<IM_COL32_B_SHIFT) | ((ImU32)(G)<<IM_COL32_G_SHIFT) | ((ImU32)(R)<<IM_COL32_R_SHIFT))
  290. #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF
  291. #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black
  292. #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000
  293. """
  294. IM_COL32_R_SHIFT = 0
  295. IM_COL32_G_SHIFT = 8
  296. IM_COL32_B_SHIFT = 16
  297. IM_COL32_A_SHIFT = 24
  298. def IM_COL32(r: ImU32, g: ImU32, b: ImU32, a: ImU32) -> ImU32:
  299. r = (a << IM_COL32_A_SHIFT) | (b << IM_COL32_B_SHIFT) | (g << IM_COL32_G_SHIFT) | (r << IM_COL32_R_SHIFT)
  300. return r
  301. """
  302. Additional customizations
  303. """
  304. TextRange = Any # internal structure of ImGuiTextFilter, composed of string pointers (cannot be easily adapted)
  305. PayloadId = int
  306. # VERTEX_SIZE, VERTEX_BUFFER_POS_OFFSET, VERTEX_BUFFER_UV_OFFSET, etc.
  307. # Utilities to facilitate rendering in python backends: they provide buffer offsets info
  308. VERTEX_SIZE: int
  309. VERTEX_BUFFER_POS_OFFSET: int
  310. VERTEX_BUFFER_UV_OFFSET: int
  311. VERTEX_BUFFER_COL_OFFSET: int
  312. INDEX_SIZE: int
  313. ImVec2Like = Union[ImVec2, Tuple[int | float, int | float], List[int | float]]
  314. ImVec4Like = Union[ImVec4, Tuple[int | float, int | float, int | float, int | float], List[int | float]]
  315. # Vec2Protocol: add __add__, __sub__, __mul__, __truediv__, __neg__ to ImVec2
  316. class Vec2Protocol(Protocol):
  317. def __iter__(self) -> Iterator[float]: ...
  318. def __add__(self, other: ImVec2Like) -> ImVec2: ...
  319. def __sub__(self, other: ImVec2Like) -> ImVec2: ...
  320. def __mul__(self, other: Union[ImVec2Like, float]) -> ImVec2: ...
  321. def __truediv__(self, other: Union[ImVec2Like, float]) -> ImVec2: ...
  322. def __neg__(self) -> ImVec2: ...
  323. # Vec4Protocol: add __add__, __sub__, __mul__, __truediv__, __neg__ to ImVec4
  324. class Vec4Protocol(Protocol):
  325. def __iter__(self) -> Iterator[float]: ...
  326. def __add__(self, other: ImVec4Like) -> ImVec4: ...
  327. def __sub__(self, other: ImVec4Like) -> ImVec4: ...
  328. def __mul__(self, other: Union[ImVec4Like, float]) -> ImVec4: ...
  329. def __truediv__(self, other: Union[ImVec4Like, float]) -> ImVec4: ...
  330. def __neg__(self) -> ImVec4: ...
  331. ##################################################
  332. # AUTO GENERATED CODE BELOW
  333. ##################################################
  334. # <litgen_stub> // Autogenerated code below! Do not edit!
  335. #################### <generated_from:imgui.h> ####################
  336. # dear imgui, v1.92.8
  337. # (headers)
  338. # Help:
  339. # - Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp. All applications in examples/ are doing that.
  340. # - Read top of imgui.cpp for more details, links and comments.
  341. # - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including imgui.h (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4.
  342. # Resources:
  343. # - FAQ ........................ https://dearimgui.com/faq (in repository as docs/FAQ.md)
  344. # - Homepage ................... https://github.com/ocornut/imgui
  345. # - Releases & Changelog ....... https://github.com/ocornut/imgui/releases
  346. # - Gallery .................... https://github.com/ocornut/imgui/issues?q=label%3Agallery (please post your screenshots/video there!)
  347. # - Wiki ....................... https://github.com/ocornut/imgui/wiki (lots of good stuff there)
  348. # - Getting Started https://github.com/ocornut/imgui/wiki/Getting-Started (how to integrate in an existing app by adding ~25 lines of code)
  349. # - Third-party Extensions https://github.com/ocornut/imgui/wiki/Useful-Extensions (ImPlot & many more)
  350. # - Bindings/Backends https://github.com/ocornut/imgui/wiki/Bindings (language bindings + backends for various tech/engines)
  351. # - Debug Tools https://github.com/ocornut/imgui/wiki/Debug-Tools
  352. # - Glossary https://github.com/ocornut/imgui/wiki/Glossary
  353. # - Software using Dear ImGui https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui
  354. # - Issues & support ........... https://github.com/ocornut/imgui/issues
  355. # - Test Engine & Automation ... https://github.com/ocornut/imgui_test_engine (test suite, test engine to automate your apps)
  356. # - Web version of the Demo .... https://pthom.github.io/imgui_explorer (w/ source code browser)
  357. # For FIRST-TIME users having issues compiling/linking/running:
  358. # please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above.
  359. # EVERYTHING ELSE should be asked in 'Issues'! We are building a database of cross-linked knowledge there.
  360. # Since 1.92, we encourage font loading questions to also be posted in 'Issues'.
  361. # Library Version
  362. # (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
  363. #
  364. # Adaptations for ImGui Bundle are noted with [ADAPT_IMGUI_BUNDLE]
  365. #
  366. # [ADAPT_IMGUI_BUNDLE]
  367. # #ifdef IMGUI_BUNDLE_PYTHON_API
  368. #
  369. # #endif
  370. #
  371. # [/ADAPT_IMGUI_BUNDLE]
  372. # [ADAPT_IMGUI_BUNDLE] utilities
  373. # - std::function: switches between function pointer and std::function
  374. # - std::string: switches between const char* and std::string
  375. # - BundleHybridToChar: converts std::string to const char*
  376. # [/ADAPT_IMGUI_BUNDLE] utilities
  377. #
  378. # Index of this file:
  379. # // [SECTION] Header mess
  380. # // [SECTION] Forward declarations and basic types
  381. # // [SECTION] Texture identifiers (ImTextureID, ImTextureRef)
  382. # // [SECTION] Dear ImGui end-user API functions
  383. # // [SECTION] Flags & Enumerations
  384. # // [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
  385. # // [SECTION] Helpers: Debug log, Memory allocations macros, ImVector<>
  386. # // [SECTION] ImGuiStyle
  387. # // [SECTION] ImGuiIO
  388. # // [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload)
  389. # // [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
  390. # // [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiMultiSelectIO, ImGuiSelectionRequest, ImGuiSelectionBasicStorage, ImGuiSelectionExternalStorage)
  391. # // [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
  392. # // [SECTION] Texture API (ImTextureFormat, ImTextureStatus, ImTextureRect, ImTextureData)
  393. # // [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFontBaked, ImFont)
  394. # // [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
  395. # // [SECTION] ImGuiPlatformIO + other Platform Dependent Interfaces (ImGuiPlatformMonitor, ImGuiPlatformImeData)
  396. # // [SECTION] Obsolete functions and types
  397. #
  398. #
  399. # Configuration file with compile-time options
  400. # (edit imconfig.h or '#define IMGUI_USER_CONFIG "myfilename.h" from your build system)
  401. # #ifndef IMGUI_DISABLE
  402. #
  403. # -----------------------------------------------------------------------------
  404. # [SECTION] Header mess
  405. # -----------------------------------------------------------------------------
  406. # Includes
  407. # Define attributes of all API symbols declarations (e.g. for DLL under Windows)
  408. # IMGUI_API is used for core imgui functions, IMGUI_IMPL_API is used for the default backends files (imgui_impl_xxx.h)
  409. # Using dear imgui via a shared library is not recommended: we don't guarantee backward nor forward ABI compatibility + this is a call-heavy library and function call overhead adds up.
  410. # Helper Macros
  411. # (note: compiling with NDEBUG will usually strip out assert() to nothing, which is NOT recommended because we use asserts to notify of programmer mistakes.)
  412. # Helper Macros - IM_FMTARGS, IM_FMTLIST: Apply printf-style warnings to our formatting functions.
  413. # (MSVC provides an equivalent mechanism via SAL Annotations but it requires the macros in a different
  414. # location. e.g. #include <sal.h> + None myprintf(_Printf_format_string_ const char* format, ...),
  415. # and only works when using Code Analysis, rather than just normal compiling).
  416. # (see https://github.com/ocornut/imgui/issues/8871 for a patch to enable this for MSVC's Code Analysis)
  417. # Disable some of MSVC most aggressive Debug runtime checks in function header/footer (used in some simple/low-level functions)
  418. # Warnings
  419. # -----------------------------------------------------------------------------
  420. # [SECTION] Forward declarations and basic types
  421. # -----------------------------------------------------------------------------
  422. # Scalar data types
  423. # Forward declarations: ImDrawList, ImFontAtlas layer
  424. # Forward declarations: ImGui layer
  425. # Enumerations
  426. # - We don't use strongly typed enums much because they add constraints (can't extend in private code, can't store typed in bit fields, extra casting on iteration)
  427. # - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists!
  428. # - In Visual Studio: Ctrl+Comma ("Edit.GoToAll") can follow symbols inside comments, whereas Ctrl+F12 ("Edit.GoToImplementation") cannot.
  429. # - In Visual Studio w/ Visual Assist installed: Alt+G ("VAssistX.GoToImplementation") can also follow symbols inside comments.
  430. # - In VS Code, CLion, etc.: Ctrl+Click can follow symbols inside comments.
  431. # Flags (declared as int to allow using as flags without overhead, and to not pollute the top of this file)
  432. # - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists!
  433. # - In Visual Studio: Ctrl+Comma ("Edit.GoToAll") can follow symbols inside comments, whereas Ctrl+F12 ("Edit.GoToImplementation") cannot.
  434. # - In Visual Studio w/ Visual Assist installed: Alt+G ("VAssistX.GoToImplementation") can also follow symbols inside comments.
  435. # - In VS Code, CLion, etc.: Ctrl+Click can follow symbols inside comments.
  436. # Character types
  437. # (we generally use UTF-8 encoded string in the API. This is storage specifically for a decoded character used for keyboard input and display)
  438. # Callback and functions types
  439. # #ifdef IMGUI_BUNDLE_PYTHON_API
  440. #
  441. # #else
  442. #
  443. # #endif
  444. #
  445. class ImVec2(Vec2Protocol):
  446. # float x, /* original C++ signature */
  447. x: float
  448. # y; /* original C++ signature */
  449. y: float
  450. # constexpr ImVec2() : x(0.0f), y(0.0f) { } /* original C++ signature */
  451. @overload
  452. def __init__(self) -> None:
  453. pass
  454. # constexpr ImVec2(float _x, float _y) : x(_x), y(_y) { } /* original C++ signature */
  455. @overload
  456. def __init__(self, _x: float, _y: float) -> None:
  457. pass
  458. # #ifdef IMGUI_BUNDLE_PYTHON_API
  459. #
  460. # std::map<std::string, float> to_dict() const { return {{"x", x}, {"y", y}}; } /* original C++ signature */
  461. def to_dict(self) -> Dict[str, float]:
  462. """(private API)"""
  463. pass
  464. # static ImVec2 from_dict(const std::map<std::string, float>& d) { IM_ASSERT((d.find("x") != d.end()) && (d.find("y") != d.end()) && "ImVec2::from_dict dict should contain x and y keys"); return ImVec2(d.at("x"), d.at("y")); } /* original C++ signature */
  465. @staticmethod
  466. def from_dict(d: Dict[str, float]) -> ImVec2:
  467. """(private API)"""
  468. pass
  469. # #endif
  470. #
  471. def __getitem__(self, idx: int) -> float:
  472. """Get the value at the given index (0 for x, 1 for y)"""
  473. ...
  474. def __setitem__(self, idx: int, value: float) -> None:
  475. """Set the value at the given index (0 for x, 1 for y)"""
  476. ...
  477. class ImVec4(Vec4Protocol):
  478. """ImVec4: 4D vector used to store clipping rectangles, colors etc. [Compile-time configurable type]"""
  479. # float x, /* original C++ signature */
  480. x: float
  481. # y, /* original C++ signature */
  482. y: float
  483. # z, /* original C++ signature */
  484. z: float
  485. # w; /* original C++ signature */
  486. w: float
  487. # constexpr ImVec4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) { } /* original C++ signature */
  488. @overload
  489. def __init__(self) -> None:
  490. pass
  491. # constexpr ImVec4(float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) { } /* original C++ signature */
  492. @overload
  493. def __init__(self, _x: float, _y: float, _z: float, _w: float) -> None:
  494. pass
  495. # #ifdef IMGUI_BUNDLE_PYTHON_API
  496. #
  497. # std::map<std::string, float> to_dict() const { return {{"x", x}, {"y", y}, {"z", z}, {"w", w}}; } /* original C++ signature */
  498. def to_dict(self) -> Dict[str, float]:
  499. """(private API)"""
  500. pass
  501. # static ImVec4 from_dict(const std::map<std::string, float>& d) { IM_ASSERT((d.find("x") != d.end()) && (d.find("y") != d.end()) && (d.find("z") != d.end()) && (d.find("w") != d.end()) && "ImVec4::from_dict dict should contain x, y, z and w keys"); return ImVec4(d.at("x"), d.at("y"), d.at("z"), d.at("w")); } /* original C++ signature */
  502. @staticmethod
  503. def from_dict(d: Dict[str, float]) -> ImVec4:
  504. """(private API)"""
  505. pass
  506. # #endif
  507. #
  508. def __getitem__(self, idx: int) -> float:
  509. """Get the value at the given index (0 for x, 1 for y, 2 for z, 3 for w)"""
  510. ...
  511. def __setitem__(self, idx: int, value: float) -> None:
  512. """Set the value at the given index (0 for x, 1 for y, 2 for z, 3 for w)"""
  513. ...
  514. # -----------------------------------------------------------------------------
  515. # [SECTION] Texture identifiers (ImTextureID, ImTextureRef)
  516. # -----------------------------------------------------------------------------
  517. # ImTextureID = backend specific, low-level identifier for a texture uploaded in GPU/graphics system.
  518. # [Compile-time configurable type]
  519. # - When a Rendered Backend creates a texture, it store its native identifier into a ImTextureID value.
  520. # (e.g. Used by DX11 backend to a `ID3D11ShaderResourceView*`; Used by OpenGL backends to store `GLuint`;
  521. # Used by SDLGPU backend to store a `SDL_GPUTextureSamplerBinding*`, etc.).
  522. # - User may submit their own textures to e.g. ImGui::Image() function by passing this value.
  523. # - During the rendering loop, the Renderer Backend retrieve the ImTextureID, which stored inside a
  524. # ImTextureRef, which is stored inside a ImDrawCmd.
  525. # - Compile-time type configuration:
  526. # - To use something other than a 64-bit value: add '#define ImTextureID MyTextureType*' in your imconfig.h file.
  527. # - This can be whatever to you want it to be! read the FAQ entry about textures for details.
  528. # - You may decide to store a higher-level structure containing texture, sampler, shader etc. with various
  529. # constructors if you like. You will need to implement ==/!= operators.
  530. # History:
  531. # - In v1.91.4 (2024/10/08): the default type for ImTextureID was changed from 'None*' to 'ImU64'. This allowed backends requiring 64-bit worth of data to build on 32-bit architectures. Use intermediary intptr_t cast and read FAQ if you have casting warnings.
  532. # - In v1.92.0 (2025/06/11): added ImTextureRef which carry either a ImTextureID either a pointer to internal texture atlas. All user facing functions taking ImTextureID changed to ImTextureRef
  533. # Define this if you need to change the invalid value for your backend.
  534. # - If your backend is using ImTextureID to store an index/offset and you need 0 to be valid, You can add '#define ImTextureID_Invalid ((ImTextureID)-1)' in your imconfig.h file.
  535. # - From 2026/03/12 to 2026/03/19 we experimented with changing to default to -1, but I worried it would cause too many issues in third-party code so it was reverted.
  536. class ImTextureRef:
  537. # ImTextureRef() { _TexData = NULL; _TexID = ImTextureID_Invalid; } /* original C++ signature */
  538. @overload
  539. def __init__(self) -> None:
  540. pass
  541. # ImTextureRef(ImTextureID tex_id) { _TexData = NULL; _TexID = tex_id; } /* original C++ signature */
  542. @overload
  543. def __init__(self, tex_id: ImTextureID) -> None:
  544. pass
  545. # inline ImTextureID GetTexID() const; /* original C++ signature */
  546. def get_tex_id(self) -> ImTextureID:
  547. """(private API)
  548. == (_TexData ? _TexData->TexID : _TexID) // Implemented below in the file.
  549. """
  550. pass
  551. # Members (either are set, never both!)
  552. # ImTextureData* _TexData; /* original C++ signature */
  553. _tex_data: ImTextureData # A texture, generally owned by a ImFontAtlas. Will convert to ImTextureID during render loop, after texture has been uploaded.
  554. # ImTextureID _TexID; /* original C++ signature */
  555. _tex_id: ImTextureID # _OR_ Low-level backend texture identifier, if already uploaded or created by user/app. Generally provided to e.g. ImGui::Image() calls.
  556. # -----------------------------------------------------------------------------
  557. # [SECTION] Dear ImGui end-user API functions
  558. # (Note that ImGui:: being a namespace, you can add extra ImGui:: functions in your own separate file. Please don't modify imgui source files!)
  559. # -----------------------------------------------------------------------------
  560. # Context creation and access
  561. # - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts.
  562. # - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
  563. # for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details.
  564. # IMGUI_API ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL); /* original C++ signature */
  565. def create_context(shared_font_atlas: Optional[ImFontAtlas] = None) -> Context:
  566. pass
  567. # IMGUI_API void DestroyContext(ImGuiContext* ctx = NULL); /* original C++ signature */
  568. def destroy_context(ctx: Optional[Context] = None) -> None:
  569. """None = destroy current context"""
  570. pass
  571. # IMGUI_API ImGuiContext* GetCurrentContext(); /* original C++ signature */
  572. def get_current_context() -> Context:
  573. pass
  574. # IMGUI_API void SetCurrentContext(ImGuiContext* ctx); /* original C++ signature */
  575. def set_current_context(ctx: Context) -> None:
  576. pass
  577. # Main
  578. # IMGUI_API ImGuiIO& GetIO(); /* original C++ signature */
  579. def get_io() -> IO:
  580. """access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)"""
  581. pass
  582. # IMGUI_API ImGuiPlatformIO& GetPlatformIO(); /* original C++ signature */
  583. def get_platform_io() -> PlatformIO:
  584. """access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS Clipboard, IME etc.)"""
  585. pass
  586. # IMGUI_API ImGuiStyle& GetStyle(); /* original C++ signature */
  587. def get_style() -> Style:
  588. """access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!"""
  589. pass
  590. # IMGUI_API void NewFrame(); /* original C++ signature */
  591. def new_frame() -> None:
  592. """start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame()."""
  593. pass
  594. # IMGUI_API void EndFrame(); /* original C++ signature */
  595. def end_frame() -> None:
  596. """ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't need to render, better to not create any windows and not call NewFrame() at all!"""
  597. pass
  598. # IMGUI_API void Render(); /* original C++ signature */
  599. def render() -> None:
  600. """ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData()."""
  601. pass
  602. # IMGUI_API ImDrawData* GetDrawData(); /* original C++ signature */
  603. def get_draw_data() -> ImDrawData:
  604. """valid after Render() and until the next call to NewFrame(). Call ImGui_ImplXXXX_RenderDrawData() function in your Renderer Backend to render."""
  605. pass
  606. # Demo, Debug, Information
  607. # IMGUI_API void ShowDemoWindow(bool* p_open = NULL); /* original C++ signature */
  608. def show_demo_window(p_open: Optional[bool] = None) -> Optional[bool]:
  609. """create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!"""
  610. pass
  611. # [ADAPT_IMGUI_BUNDLE]
  612. # IMGUI_API void ShowDemoWindow_MaybeDocked(bool create_window, bool* p_open = NULL, ImGuiWindowFlags initial_extra_flags = 0, ImVec2 window_pos = ImVec2(0, 0), ImVec2 window_size = ImVec2(0, 0)); /* original C++ signature */
  613. def show_demo_window_maybe_docked(
  614. create_window: bool,
  615. p_open: Optional[bool] = None,
  616. initial_extra_flags: WindowFlags = 0,
  617. window_pos: Optional[ImVec2Like] = None,
  618. window_size: Optional[ImVec2Like] = None,
  619. ) -> Optional[bool]:
  620. """Python bindings defaults:
  621. If any of the params below is None, then its default value below will be used:
  622. * window_pos: ImVec2(0, 0)
  623. * window_size: ImVec2(0, 0)
  624. """
  625. pass
  626. # [/ADAPT_IMGUI_BUNDLE]
  627. # IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); /* original C++ signature */
  628. def show_metrics_window(p_open: Optional[bool] = None) -> Optional[bool]:
  629. """create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc."""
  630. pass
  631. # IMGUI_API void ShowDebugLogWindow(bool* p_open = NULL); /* original C++ signature */
  632. def show_debug_log_window(p_open: Optional[bool] = None) -> Optional[bool]:
  633. """create Debug Log window. display a simplified log of important dear imgui events."""
  634. pass
  635. # IMGUI_API void ShowIDStackToolWindow(bool* p_open = NULL); /* original C++ signature */
  636. def show_id_stack_tool_window(p_open: Optional[bool] = None) -> Optional[bool]:
  637. """create Stack Tool window. hover items with mouse to query information about the source of their unique ID."""
  638. pass
  639. # IMGUI_API void ShowAboutWindow(bool* p_open = NULL); /* original C++ signature */
  640. def show_about_window(p_open: Optional[bool] = None) -> Optional[bool]:
  641. """create About window. display Dear ImGui version, credits and build/system information."""
  642. pass
  643. # IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); /* original C++ signature */
  644. def show_style_editor(ref: Optional[Style] = None) -> None:
  645. """add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)"""
  646. pass
  647. # IMGUI_API bool ShowStyleSelector(const char* label); /* original C++ signature */
  648. def show_style_selector(label: str) -> bool:
  649. """add style selector block (not a window), essentially a combo listing the default styles."""
  650. pass
  651. # IMGUI_API void ShowFontSelector(const char* label); /* original C++ signature */
  652. def show_font_selector(label: str) -> None:
  653. """add font selector block (not a window), essentially a combo listing the loaded fonts."""
  654. pass
  655. # IMGUI_API void ShowUserGuide(); /* original C++ signature */
  656. def show_user_guide() -> None:
  657. """add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls)."""
  658. pass
  659. # IMGUI_API const char* GetVersion(); /* original C++ signature */
  660. def get_version() -> str:
  661. """get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the compiled version of imgui.cpp)"""
  662. pass
  663. # Styles
  664. # IMGUI_API void StyleColorsDark(ImGuiStyle* dst = NULL); /* original C++ signature */
  665. def style_colors_dark(dst: Optional[Style] = None) -> None:
  666. """new, recommended style (default)"""
  667. pass
  668. # IMGUI_API void StyleColorsLight(ImGuiStyle* dst = NULL); /* original C++ signature */
  669. def style_colors_light(dst: Optional[Style] = None) -> None:
  670. """best used with borders and a custom, thicker font"""
  671. pass
  672. # IMGUI_API void StyleColorsClassic(ImGuiStyle* dst = NULL); /* original C++ signature */
  673. def style_colors_classic(dst: Optional[Style] = None) -> None:
  674. """classic imgui style"""
  675. pass
  676. # Windows
  677. # - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
  678. # - Passing 'bool* p_open != None' shows a window-closing widget in the upper-right corner of the window,
  679. # which clicking will set the boolean to False when clicked.
  680. # - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times.
  681. # Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
  682. # - Begin() return False to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
  683. # anything to the window. Always call a matching End() for each Begin() call, regardless of its return value!
  684. # [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
  685. # such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
  686. # BeginXXX function returned True. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
  687. # - Note that the bottom of window stack always contains a window called "Debug".
  688. # IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); /* original C++ signature */
  689. def begin(name: str, p_open: Optional[bool] = None, flags: WindowFlags = 0) -> Tuple[bool, Optional[bool]]:
  690. pass
  691. # IMGUI_API void End(); /* original C++ signature */
  692. def end() -> None:
  693. pass
  694. # Child Windows
  695. # - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
  696. # - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = False".
  697. # This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == True.
  698. # Consider updating your old code:
  699. # BeginChild("Name", size, False) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
  700. # BeginChild("Name", size, True) -> Begin("Name", size, ImGuiChildFlags_Borders);
  701. # - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0, 400.0)):
  702. # == 0.0: use remaining parent window size for this axis.
  703. # > 0.0: use specified size for this axis.
  704. # < 0.0: right/bottom-align to specified distance from available content boundaries.
  705. # - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents.
  706. # Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended.
  707. # - BeginChild() returns False to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
  708. # anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
  709. # [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
  710. # such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
  711. # BeginXXX function returned True. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
  712. # IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); /* original C++ signature */
  713. @overload
  714. def begin_child(
  715. str_id: str, size: Optional[ImVec2Like] = None, child_flags: ChildFlags = 0, window_flags: WindowFlags = 0
  716. ) -> bool:
  717. """Python bindings defaults:
  718. If size is None, then its default value will be: ImVec2(0, 0)
  719. """
  720. pass
  721. # IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); /* original C++ signature */
  722. @overload
  723. def begin_child(
  724. id_: ID, size: Optional[ImVec2Like] = None, child_flags: ChildFlags = 0, window_flags: WindowFlags = 0
  725. ) -> bool:
  726. """Python bindings defaults:
  727. If size is None, then its default value will be: ImVec2(0, 0)
  728. """
  729. pass
  730. # IMGUI_API void EndChild(); /* original C++ signature */
  731. def end_child() -> None:
  732. pass
  733. # Windows Utilities
  734. # - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
  735. # IMGUI_API bool IsWindowAppearing(); /* original C++ signature */
  736. def is_window_appearing() -> bool:
  737. pass
  738. # IMGUI_API bool IsWindowCollapsed(); /* original C++ signature */
  739. def is_window_collapsed() -> bool:
  740. pass
  741. # IMGUI_API bool IsWindowFocused(ImGuiFocusedFlags flags=0); /* original C++ signature */
  742. def is_window_focused(flags: FocusedFlags = 0) -> bool:
  743. """is current window focused? or its root/child, depending on flags. see flags for options."""
  744. pass
  745. # IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags=0); /* original C++ signature */
  746. def is_window_hovered(flags: HoveredFlags = 0) -> bool:
  747. """is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details."""
  748. pass
  749. # IMGUI_API ImDrawList* GetWindowDrawList(); /* original C++ signature */
  750. def get_window_draw_list() -> ImDrawList:
  751. """get draw list associated to the current window, to append your own drawing primitives"""
  752. pass
  753. # IMGUI_API float GetWindowDpiScale(); /* original C++ signature */
  754. def get_window_dpi_scale() -> float:
  755. """get DPI scale currently associated to the current window's viewport."""
  756. pass
  757. # IMGUI_API ImVec2 GetWindowPos(); /* original C++ signature */
  758. def get_window_pos() -> ImVec2:
  759. """get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)"""
  760. pass
  761. # IMGUI_API ImVec2 GetWindowSize(); /* original C++ signature */
  762. def get_window_size() -> ImVec2:
  763. """get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)"""
  764. pass
  765. # IMGUI_API float GetWindowWidth(); /* original C++ signature */
  766. def get_window_width() -> float:
  767. """get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x."""
  768. pass
  769. # IMGUI_API float GetWindowHeight(); /* original C++ signature */
  770. def get_window_height() -> float:
  771. """get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y."""
  772. pass
  773. # IMGUI_API ImGuiViewport*GetWindowViewport(); /* original C++ signature */
  774. def get_window_viewport() -> Viewport:
  775. """get viewport currently associated to the current window."""
  776. pass
  777. # Window manipulation
  778. # - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
  779. # IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0, 0)); /* original C++ signature */
  780. def set_next_window_pos(pos: ImVec2Like, cond: Cond = 0, pivot: Optional[ImVec2Like] = None) -> None:
  781. """Python bindings defaults:
  782. If pivot is None, then its default value will be: ImVec2(0, 0)
  783. set next window position. call before Begin(). use pivot=(0.5,0.5) to center on given point, etc.
  784. """
  785. pass
  786. # IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0); /* original C++ signature */
  787. def set_next_window_size(size: ImVec2Like, cond: Cond = 0) -> None:
  788. """set next window size. set axis to 0.0 to force an auto-fit on this axis. call before Begin()"""
  789. pass
  790. # IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL); /* original C++ signature */
  791. def set_next_window_size_constraints(
  792. size_min: ImVec2Like,
  793. size_max: ImVec2Like,
  794. custom_callback: SizeCallback = None,
  795. custom_callback_data: Optional[Any] = None,
  796. ) -> None:
  797. """set next window size limits. use 0.0 or FLT_MAX if you don't want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial programmatic constraints."""
  798. pass
  799. # IMGUI_API void SetNextWindowContentSize(const ImVec2& size); /* original C++ signature */
  800. def set_next_window_content_size(size: ImVec2Like) -> None:
  801. """set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0 to leave it automatic. call before Begin()"""
  802. pass
  803. # IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0); /* original C++ signature */
  804. def set_next_window_collapsed(collapsed: bool, cond: Cond = 0) -> None:
  805. """set next window collapsed state. call before Begin()"""
  806. pass
  807. # IMGUI_API void SetNextWindowFocus(); /* original C++ signature */
  808. def set_next_window_focus() -> None:
  809. """set next window to be focused / top-most. call before Begin()"""
  810. pass
  811. # IMGUI_API void SetNextWindowScroll(const ImVec2& scroll); /* original C++ signature */
  812. def set_next_window_scroll(scroll: ImVec2Like) -> None:
  813. """set next window scrolling value (use < 0.0 to not affect a given axis)."""
  814. pass
  815. # IMGUI_API void SetNextWindowBgAlpha(float alpha); /* original C++ signature */
  816. def set_next_window_bg_alpha(alpha: float) -> None:
  817. """set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground."""
  818. pass
  819. # IMGUI_API void SetNextWindowViewport(ImGuiID viewport_id); /* original C++ signature */
  820. def set_next_window_viewport(viewport_id: ID) -> None:
  821. """set next window viewport"""
  822. pass
  823. # IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0); /* original C++ signature */
  824. @overload
  825. def set_window_pos(pos: ImVec2Like, cond: Cond = 0) -> None:
  826. """(not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects."""
  827. pass
  828. # IMGUI_API void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0); /* original C++ signature */
  829. @overload
  830. def set_window_pos(name: str, pos: ImVec2Like, cond: Cond = 0) -> None:
  831. """set named window position."""
  832. pass
  833. # IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiCond cond = 0); /* original C++ signature */
  834. @overload
  835. def set_window_size(size: ImVec2Like, cond: Cond = 0) -> None:
  836. """(not recommended) set current window size - call within Begin()/End(). set to ImVec2(0, 0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects."""
  837. pass
  838. # IMGUI_API void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0); /* original C++ signature */
  839. @overload
  840. def set_window_size(name: str, size: ImVec2Like, cond: Cond = 0) -> None:
  841. """set named window size. set axis to 0.0 to force an auto-fit on this axis."""
  842. pass
  843. # IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0); /* original C++ signature */
  844. @overload
  845. def set_window_collapsed(collapsed: bool, cond: Cond = 0) -> None:
  846. """(not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed()."""
  847. pass
  848. # IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0); /* original C++ signature */
  849. @overload
  850. def set_window_collapsed(name: str, collapsed: bool, cond: Cond = 0) -> None:
  851. """set named window collapsed state"""
  852. pass
  853. # IMGUI_API void SetWindowFocus(); /* original C++ signature */
  854. @overload
  855. def set_window_focus() -> None:
  856. """(not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus()."""
  857. pass
  858. # IMGUI_API inline void SetWindowFocus(std::optional<std::string> name) // set named window to be focused / top-most. use NULL to remove focus. /* original C++ signature */
  859. # { if (name.has_value()) SetWindowFocus(name.value()); else SetWindowFocus(NULL); }
  860. @overload
  861. def set_window_focus(name: Optional[str]) -> None:
  862. """// set named window to be focused / top-most. use None to remove focus."""
  863. pass
  864. # #ifdef IMGUI_BUNDLE_PYTHON_API
  865. #
  866. # #endif
  867. #
  868. # Windows Scrolling
  869. # - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
  870. # - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
  871. # IMGUI_API float GetScrollX(); /* original C++ signature */
  872. def get_scroll_x() -> float:
  873. """get scrolling amount [0 .. GetScrollMaxX()]"""
  874. pass
  875. # IMGUI_API float GetScrollY(); /* original C++ signature */
  876. def get_scroll_y() -> float:
  877. """get scrolling amount [0 .. GetScrollMaxY()]"""
  878. pass
  879. # IMGUI_API void SetScrollX(float scroll_x); /* original C++ signature */
  880. def set_scroll_x(scroll_x: float) -> None:
  881. """set scrolling amount [0 .. GetScrollMaxX()]"""
  882. pass
  883. # IMGUI_API void SetScrollY(float scroll_y); /* original C++ signature */
  884. def set_scroll_y(scroll_y: float) -> None:
  885. """set scrolling amount [0 .. GetScrollMaxY()]"""
  886. pass
  887. # IMGUI_API float GetScrollMaxX(); /* original C++ signature */
  888. def get_scroll_max_x() -> float:
  889. """get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x"""
  890. pass
  891. # IMGUI_API float GetScrollMaxY(); /* original C++ signature */
  892. def get_scroll_max_y() -> float:
  893. """get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y"""
  894. pass
  895. # IMGUI_API void SetScrollHereX(float center_x_ratio = 0.5f); /* original C++ signature */
  896. def set_scroll_here_x(center_x_ratio: float = 0.5) -> None:
  897. """adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, 1.0: right. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead."""
  898. pass
  899. # IMGUI_API void SetScrollHereY(float center_y_ratio = 0.5f); /* original C++ signature */
  900. def set_scroll_here_y(center_y_ratio: float = 0.5) -> None:
  901. """adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead."""
  902. pass
  903. # IMGUI_API void SetScrollFromPosX(float local_x, float center_x_ratio = 0.5f); /* original C++ signature */
  904. def set_scroll_from_pos_x(local_x: float, center_x_ratio: float = 0.5) -> None:
  905. """adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position."""
  906. pass
  907. # IMGUI_API void SetScrollFromPosY(float local_y, float center_y_ratio = 0.5f); /* original C++ signature */
  908. def set_scroll_from_pos_y(local_y: float, center_y_ratio: float = 0.5) -> None:
  909. """adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position."""
  910. pass
  911. # Parameters stacks (font)
  912. # - PushFont(font, 0.0) // Change font and keep current size
  913. # - PushFont(None, 20.0) // Keep font and change current size
  914. # - PushFont(font, 20.0) // Change font and set size to 20.0
  915. # - PushFont(font, style.FontSizeBase * 2.0) // Change font and set size to be twice bigger than current size.
  916. # - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
  917. # *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
  918. # - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
  919. # - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
  920. # *IMPORTANT* global scale factors are applied over the provided size.
  921. # - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
  922. # - If you want to apply a factor to the _current_ font size:
  923. # - CORRECT: PushFont(None, style.FontSizeBase) // use current unscaled size == does nothing
  924. # - CORRECT: PushFont(None, style.FontSizeBase * 2.0) // use current unscaled size x2 == make text twice bigger
  925. # - INCORRECT: PushFont(None, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
  926. # - INCORRECT: PushFont(None, GetFontSize() * 2.0) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
  927. # #ifdef IMGUI_BUNDLE_PYTHON_API
  928. #
  929. # IMGUI_API void PushFont(std::optional<ImFont*> font, float font_size_base_unscaled); /* original C++ signature */
  930. def push_font(font: Optional[ImFont], font_size_base_unscaled: float) -> None:
  931. """Use None as a shortcut to keep current font. Use 0.0 to keep current size."""
  932. pass
  933. # #endif
  934. #
  935. # IMGUI_API void PopFont(); /* original C++ signature */
  936. def pop_font() -> None:
  937. pass
  938. # IMGUI_API ImFont* GetFont(); /* original C++ signature */
  939. def get_font() -> ImFont:
  940. """get current font"""
  941. pass
  942. # IMGUI_API float GetFontSize(); /* original C++ signature */
  943. def get_font_size() -> float:
  944. """get current scaled font size (= height in pixels). AFTER global scale factors applied. *IMPORTANT* DO NOT PASS THIS VALUE TO PushFont()! Use ImGui::GetStyle().FontSizeBase to get value before global scale factors."""
  945. pass
  946. # IMGUI_API ImFontBaked* GetFontBaked(); /* original C++ signature */
  947. def get_font_baked() -> ImFontBaked:
  948. """get current font bound at current size // == GetFont()->GetFontBaked(GetFontSize())"""
  949. pass
  950. # Parameters stacks (shared)
  951. # IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col); /* original C++ signature */
  952. @overload
  953. def push_style_color(idx: Col, col: ImU32) -> None:
  954. """modify a style color. always use this if you modify the style after NewFrame()."""
  955. pass
  956. # IMGUI_API void PushStyleColor(ImGuiCol idx, const ImVec4& col); /* original C++ signature */
  957. @overload
  958. def push_style_color(idx: Col, col: ImVec4Like) -> None:
  959. pass
  960. # IMGUI_API void PopStyleColor(int count = 1); /* original C++ signature */
  961. def pop_style_color(count: int = 1) -> None:
  962. pass
  963. # IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val); /* original C++ signature */
  964. @overload
  965. def push_style_var(idx: StyleVar, val: float) -> None:
  966. """modify a style float variable. always use this if you modify the style after NewFrame()!"""
  967. pass
  968. # IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val); /* original C++ signature */
  969. @overload
  970. def push_style_var(idx: StyleVar, val: ImVec2Like) -> None:
  971. """modify a style ImVec2 variable. " """
  972. pass
  973. # IMGUI_API void PushStyleVarX(ImGuiStyleVar idx, float val_x); /* original C++ signature */
  974. def push_style_var_x(idx: StyleVar, val_x: float) -> None:
  975. """modify X component of a style ImVec2 variable. " """
  976. pass
  977. # IMGUI_API void PushStyleVarY(ImGuiStyleVar idx, float val_y); /* original C++ signature */
  978. def push_style_var_y(idx: StyleVar, val_y: float) -> None:
  979. """modify Y component of a style ImVec2 variable. " """
  980. pass
  981. # IMGUI_API void PopStyleVar(int count = 1); /* original C++ signature */
  982. def pop_style_var(count: int = 1) -> None:
  983. pass
  984. # IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled); /* original C++ signature */
  985. def push_item_flag(option: ItemFlags, enabled: bool) -> None:
  986. """modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, True)"""
  987. pass
  988. # IMGUI_API void PopItemFlag(); /* original C++ signature */
  989. def pop_item_flag() -> None:
  990. pass
  991. # Parameters stacks (current window)
  992. # IMGUI_API void PushItemWidth(float item_width); /* original C++ signature */
  993. def push_item_width(item_width: float) -> None:
  994. """push width of items for common large "item+label" widgets. >0.0: width in pixels, <0.0 align xx pixels to the right of window (so -FLT_MIN always align width to the right side)."""
  995. pass
  996. # IMGUI_API void PopItemWidth(); /* original C++ signature */
  997. def pop_item_width() -> None:
  998. pass
  999. # IMGUI_API void SetNextItemWidth(float item_width); /* original C++ signature */
  1000. def set_next_item_width(item_width: float) -> None:
  1001. """set width of the _next_ common large "item+label" widget. >0.0: width in pixels, <0.0 align xx pixels to the right of window (so -FLT_MIN always align width to the right side)"""
  1002. pass
  1003. # IMGUI_API float CalcItemWidth(); /* original C++ signature */
  1004. def calc_item_width() -> float:
  1005. """width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most 'Item' functions."""
  1006. pass
  1007. # IMGUI_API void PushTextWrapPos(float wrap_local_pos_x = 0.0f); /* original C++ signature */
  1008. def push_text_wrap_pos(wrap_local_pos_x: float = 0.0) -> None:
  1009. """push word-wrapping position for Text*() commands. < 0.0: no wrapping; 0.0: wrap to end of window (or column); > 0.0: wrap at 'wrap_pos_x' position in window local space"""
  1010. pass
  1011. # IMGUI_API void PopTextWrapPos(); /* original C++ signature */
  1012. def pop_text_wrap_pos() -> None:
  1013. pass
  1014. # Style read access
  1015. # - Use the ShowStyleEditor() function to interactively see/edit the colors.
  1016. # IMGUI_API ImVec2 GetFontTexUvWhitePixel(); /* original C++ signature */
  1017. def get_font_tex_uv_white_pixel() -> ImVec2:
  1018. """get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API"""
  1019. pass
  1020. # IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f); /* original C++ signature */
  1021. @overload
  1022. def get_color_u32(idx: Col, alpha_mul: float = 1.0) -> ImU32:
  1023. """retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList"""
  1024. pass
  1025. # IMGUI_API ImU32 GetColorU32(const ImVec4& col); /* original C++ signature */
  1026. @overload
  1027. def get_color_u32(col: ImVec4Like) -> ImU32:
  1028. """retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList"""
  1029. pass
  1030. # IMGUI_API ImU32 GetColorU32(ImU32 col, float alpha_mul = 1.0f); /* original C++ signature */
  1031. @overload
  1032. def get_color_u32(col: ImU32, alpha_mul: float = 1.0) -> ImU32:
  1033. """retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList"""
  1034. pass
  1035. # Layout cursor positioning
  1036. # - By "cursor" we mean the current output position.
  1037. # - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
  1038. # - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
  1039. # - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
  1040. # - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
  1041. # - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
  1042. # - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
  1043. # - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM.
  1044. # - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
  1045. # IMGUI_API ImVec2 GetCursorScreenPos(); /* original C++ signature */
  1046. def get_cursor_screen_pos() -> ImVec2:
  1047. """cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than GetCursorPos(), also more useful to work with ImDrawList API)."""
  1048. pass
  1049. # IMGUI_API void SetCursorScreenPos(const ImVec2& pos); /* original C++ signature */
  1050. def set_cursor_screen_pos(pos: ImVec2Like) -> None:
  1051. """cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND."""
  1052. pass
  1053. # IMGUI_API ImVec2 GetContentRegionAvail(); /* original C++ signature */
  1054. def get_content_region_avail() -> ImVec2:
  1055. """available space from current position. THIS IS YOUR BEST FRIEND."""
  1056. pass
  1057. # IMGUI_API ImVec2 GetCursorPos(); /* original C++ signature */
  1058. def get_cursor_pos() -> ImVec2:
  1059. """[window-local] cursor position in window-local coordinates. This is not your best friend."""
  1060. pass
  1061. # IMGUI_API float GetCursorPosX(); /* original C++ signature */
  1062. def get_cursor_pos_x() -> float:
  1063. """[window-local] " """
  1064. pass
  1065. # IMGUI_API float GetCursorPosY(); /* original C++ signature */
  1066. def get_cursor_pos_y() -> float:
  1067. """[window-local] " """
  1068. pass
  1069. # IMGUI_API void SetCursorPos(const ImVec2& local_pos); /* original C++ signature */
  1070. def set_cursor_pos(local_pos: ImVec2Like) -> None:
  1071. """[window-local] " """
  1072. pass
  1073. # IMGUI_API void SetCursorPosX(float local_x); /* original C++ signature */
  1074. def set_cursor_pos_x(local_x: float) -> None:
  1075. """[window-local] " """
  1076. pass
  1077. # IMGUI_API void SetCursorPosY(float local_y); /* original C++ signature */
  1078. def set_cursor_pos_y(local_y: float) -> None:
  1079. """[window-local] " """
  1080. pass
  1081. # IMGUI_API ImVec2 GetCursorStartPos(); /* original C++ signature */
  1082. def get_cursor_start_pos() -> ImVec2:
  1083. """[window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version."""
  1084. pass
  1085. # Other layout functions
  1086. # IMGUI_API void Separator(); /* original C++ signature */
  1087. def separator() -> None:
  1088. """separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator."""
  1089. pass
  1090. # IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f); /* original C++ signature */
  1091. def same_line(offset_from_start_x: float = 0.0, spacing: float = -1.0) -> None:
  1092. """call between widgets or groups to layout them horizontally. X position given in window coordinates."""
  1093. pass
  1094. # IMGUI_API void NewLine(); /* original C++ signature */
  1095. def new_line() -> None:
  1096. """undo a SameLine() or force a new line when in a horizontal-layout context."""
  1097. pass
  1098. # IMGUI_API void Spacing(); /* original C++ signature */
  1099. def spacing() -> None:
  1100. """add vertical spacing."""
  1101. pass
  1102. # IMGUI_API void Dummy(const ImVec2& size); /* original C++ signature */
  1103. def dummy(size: ImVec2Like) -> None:
  1104. """add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be navigable into."""
  1105. pass
  1106. # IMGUI_API void Indent(float indent_w = 0.0f); /* original C++ signature */
  1107. def indent(indent_w: float = 0.0) -> None:
  1108. """move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0"""
  1109. pass
  1110. # IMGUI_API void Unindent(float indent_w = 0.0f); /* original C++ signature */
  1111. def unindent(indent_w: float = 0.0) -> None:
  1112. """move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0"""
  1113. pass
  1114. # IMGUI_API void BeginGroup(); /* original C++ signature */
  1115. def begin_group() -> None:
  1116. """lock horizontal starting position"""
  1117. pass
  1118. # IMGUI_API void EndGroup(); /* original C++ signature */
  1119. def end_group() -> None:
  1120. """unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)"""
  1121. pass
  1122. # IMGUI_API void AlignTextToFramePadding(); /* original C++ signature */
  1123. def align_text_to_frame_padding() -> None:
  1124. """vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)"""
  1125. pass
  1126. # IMGUI_API float GetTextLineHeight(); /* original C++ signature */
  1127. def get_text_line_height() -> float:
  1128. """~ FontSize"""
  1129. pass
  1130. # IMGUI_API float GetTextLineHeightWithSpacing(); /* original C++ signature */
  1131. def get_text_line_height_with_spacing() -> float:
  1132. """~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)"""
  1133. pass
  1134. # IMGUI_API float GetFrameHeight(); /* original C++ signature */
  1135. def get_frame_height() -> float:
  1136. """~ FontSize + style.FramePadding.y * 2"""
  1137. pass
  1138. # IMGUI_API float GetFrameHeightWithSpacing(); /* original C++ signature */
  1139. def get_frame_height_with_spacing() -> float:
  1140. """~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)"""
  1141. pass
  1142. # ID stack/scopes
  1143. # Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
  1144. # - Those questions are answered and impacted by understanding of the ID stack system:
  1145. # - "Q: Why is my widget not reacting when I click on it?"
  1146. # - "Q: How can I have widgets with an empty label?"
  1147. # - "Q: How can I have multiple widgets with the same label?"
  1148. # - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
  1149. # want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
  1150. # - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
  1151. # - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
  1152. # whereas "str_id" denote a string that is only used as an ID and not normally displayed.
  1153. # IMGUI_API void PushID(const char* str_id); /* original C++ signature */
  1154. @overload
  1155. def push_id(str_id: str) -> None:
  1156. """push string into the ID stack (will hash string)."""
  1157. pass
  1158. # IMGUI_API void PushID(const char* str_id_begin, const char* str_id_end); /* original C++ signature */
  1159. @overload
  1160. def push_id(str_id_begin: str, str_id_end: str) -> None:
  1161. """push string into the ID stack (will hash string)."""
  1162. pass
  1163. # IMGUI_API void PushID(const void* ptr_id); /* original C++ signature */
  1164. @overload
  1165. def push_id(ptr_id: Any) -> None:
  1166. """push pointer into the ID stack (will hash pointer)."""
  1167. pass
  1168. # IMGUI_API void PushID(int int_id); /* original C++ signature */
  1169. @overload
  1170. def push_id(int_id: int) -> None:
  1171. """push integer into the ID stack (will hash integer)."""
  1172. pass
  1173. # IMGUI_API void PopID(); /* original C++ signature */
  1174. def pop_id() -> None:
  1175. """pop from the ID stack."""
  1176. pass
  1177. # IMGUI_API ImGuiID GetID(const char* str_id); /* original C++ signature */
  1178. @overload
  1179. def get_id(str_id: str) -> ID:
  1180. """calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself"""
  1181. pass
  1182. # IMGUI_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end); /* original C++ signature */
  1183. @overload
  1184. def get_id(str_id_begin: str, str_id_end: str) -> ID:
  1185. pass
  1186. # IMGUI_API ImGuiID GetID(const void* ptr_id); /* original C++ signature */
  1187. @overload
  1188. def get_id(ptr_id: Any) -> ID:
  1189. pass
  1190. # IMGUI_API ImGuiID GetID(int int_id); /* original C++ signature */
  1191. @overload
  1192. def get_id(int_id: int) -> ID:
  1193. pass
  1194. # Widgets: Text
  1195. # IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); /* original C++ signature */
  1196. def text_unformatted(text: str, text_end: Optional[str] = None) -> None:
  1197. """raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text."""
  1198. pass
  1199. # IMGUI_API void Text(const char* fmt, ...) ; /* original C++ signature */
  1200. def text(fmt: str) -> None:
  1201. """formatted text"""
  1202. pass
  1203. # IMGUI_API void TextColored(const ImVec4& col, const char* fmt, ...) ; /* original C++ signature */
  1204. def text_colored(col: ImVec4Like, fmt: str) -> None:
  1205. """shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();"""
  1206. pass
  1207. # IMGUI_API void TextDisabled(const char* fmt, ...) ; /* original C++ signature */
  1208. def text_disabled(fmt: str) -> None:
  1209. """shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();"""
  1210. pass
  1211. # IMGUI_API void TextWrapped(const char* fmt, ...) ; /* original C++ signature */
  1212. def text_wrapped(fmt: str) -> None:
  1213. """shortcut for PushTextWrapPos(0.0); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize()."""
  1214. pass
  1215. # IMGUI_API void LabelText(const char* label, const char* fmt, ...) ; /* original C++ signature */
  1216. def label_text(label: str, fmt: str) -> None:
  1217. """display text+label aligned the same way as value+label widgets"""
  1218. pass
  1219. # IMGUI_API void BulletText(const char* fmt, ...) ; /* original C++ signature */
  1220. def bullet_text(fmt: str) -> None:
  1221. """shortcut for Bullet()+Text()"""
  1222. pass
  1223. # IMGUI_API void SeparatorText(const char* label); /* original C++ signature */
  1224. def separator_text(label: str) -> None:
  1225. """currently: formatted text with a horizontal line"""
  1226. pass
  1227. # Widgets: Main
  1228. # - Most widgets return True when the value has been changed or when pressed/selected
  1229. # - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
  1230. # IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0, 0)); /* original C++ signature */
  1231. def button(label: str, size: Optional[ImVec2Like] = None) -> bool:
  1232. """Python bindings defaults:
  1233. If size is None, then its default value will be: ImVec2(0, 0)
  1234. button
  1235. """
  1236. pass
  1237. # IMGUI_API bool SmallButton(const char* label); /* original C++ signature */
  1238. def small_button(label: str) -> bool:
  1239. """button with (FramePadding.y == 0) to easily embed within text"""
  1240. pass
  1241. # IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size, ImGuiButtonFlags flags = 0); /* original C++ signature */
  1242. def invisible_button(str_id: str, size: ImVec2Like, flags: ButtonFlags = 0) -> bool:
  1243. """flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)"""
  1244. pass
  1245. # IMGUI_API bool ArrowButton(const char* str_id, ImGuiDir dir); /* original C++ signature */
  1246. def arrow_button(str_id: str, dir: Dir) -> bool:
  1247. """square button with an arrow shape"""
  1248. pass
  1249. # IMGUI_API bool Checkbox(const char* label, bool* v); /* original C++ signature */
  1250. def checkbox(label: str, v: bool) -> Tuple[bool, bool]:
  1251. pass
  1252. # IMGUI_API bool CheckboxFlags(const char* label, int* flags, int flags_value); /* original C++ signature */
  1253. def checkbox_flags(label: str, flags: int, flags_value: int) -> Tuple[bool, int]:
  1254. pass
  1255. # IMGUI_API bool RadioButton(const char* label, bool active); /* original C++ signature */
  1256. @overload
  1257. def radio_button(label: str, active: bool) -> bool:
  1258. """use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; }"""
  1259. pass
  1260. # IMGUI_API bool RadioButton(const char* label, int* v, int v_button); /* original C++ signature */
  1261. @overload
  1262. def radio_button(label: str, v: int, v_button: int) -> Tuple[bool, int]:
  1263. """shortcut to handle the above pattern when value is an integer"""
  1264. pass
  1265. # IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL); /* original C++ signature */
  1266. def progress_bar(fraction: float, size_arg: Optional[ImVec2Like] = None, overlay: Optional[str] = None) -> None:
  1267. """Python bindings defaults:
  1268. If size_arg is None, then its default value will be: ImVec2(-sys.float_info.min, 0)
  1269. """
  1270. pass
  1271. # IMGUI_API void Bullet(); /* original C++ signature */
  1272. def bullet() -> None:
  1273. """draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses"""
  1274. pass
  1275. # IMGUI_API bool TextLink(const char* label); /* original C++ signature */
  1276. def text_link(label: str) -> bool:
  1277. """hyperlink text button, return True when clicked"""
  1278. pass
  1279. # IMGUI_API bool TextLinkOpenURL(const char* label, const char* url = NULL); /* original C++ signature */
  1280. def text_link_open_url(label: str, url: Optional[str] = None) -> bool:
  1281. """hyperlink text button, automatically open file/url when clicked"""
  1282. pass
  1283. # Widgets: Images
  1284. # - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
  1285. # - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
  1286. # - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side.
  1287. # - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified.
  1288. # - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function.
  1289. # IMGUI_API void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1)); /* original C++ signature */
  1290. def image(
  1291. tex_ref: ImTextureRef, image_size: ImVec2Like, uv0: Optional[ImVec2Like] = None, uv1: Optional[ImVec2Like] = None
  1292. ) -> None:
  1293. """Python bindings defaults:
  1294. If any of the params below is None, then its default value below will be used:
  1295. * uv0: ImVec2(0, 0)
  1296. * uv1: ImVec2(1, 1)
  1297. """
  1298. pass
  1299. # IMGUI_API void ImageWithBg(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); /* original C++ signature */
  1300. def image_with_bg(
  1301. tex_ref: ImTextureRef,
  1302. image_size: ImVec2Like,
  1303. uv0: Optional[ImVec2Like] = None,
  1304. uv1: Optional[ImVec2Like] = None,
  1305. bg_col: Optional[ImVec4Like] = None,
  1306. tint_col: Optional[ImVec4Like] = None,
  1307. ) -> None:
  1308. """Python bindings defaults:
  1309. If any of the params below is None, then its default value below will be used:
  1310. * uv0: ImVec2(0, 0)
  1311. * uv1: ImVec2(1, 1)
  1312. * bg_col: ImVec4(0, 0, 0, 0)
  1313. * tint_col: ImVec4(1, 1, 1, 1)
  1314. """
  1315. pass
  1316. # IMGUI_API bool ImageButton(const char* str_id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); /* original C++ signature */
  1317. def image_button(
  1318. str_id: str,
  1319. tex_ref: ImTextureRef,
  1320. image_size: ImVec2Like,
  1321. uv0: Optional[ImVec2Like] = None,
  1322. uv1: Optional[ImVec2Like] = None,
  1323. bg_col: Optional[ImVec4Like] = None,
  1324. tint_col: Optional[ImVec4Like] = None,
  1325. ) -> bool:
  1326. """Python bindings defaults:
  1327. If any of the params below is None, then its default value below will be used:
  1328. * uv0: ImVec2(0, 0)
  1329. * uv1: ImVec2(1, 1)
  1330. * bg_col: ImVec4(0, 0, 0, 0)
  1331. * tint_col: ImVec4(1, 1, 1, 1)
  1332. """
  1333. pass
  1334. # Widgets: Combo Box (Dropdown)
  1335. # - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
  1336. # - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created.
  1337. # IMGUI_API bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0); /* original C++ signature */
  1338. def begin_combo(label: str, preview_value: str, flags: ComboFlags = 0) -> bool:
  1339. pass
  1340. # IMGUI_API void EndCombo(); /* original C++ signature */
  1341. def end_combo() -> None:
  1342. """only call EndCombo() if BeginCombo() returns True!"""
  1343. pass
  1344. # IMGUI_API bool Combo(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items = -1); /* original C++ signature */
  1345. @overload
  1346. def combo(label: str, current_item: int, items: List[str], popup_max_height_in_items: int = -1) -> Tuple[bool, int]:
  1347. pass
  1348. # IMGUI_API bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1); /* original C++ signature */
  1349. @overload
  1350. def combo(
  1351. label: str, current_item: int, items_separated_by_zeros: str, popup_max_height_in_items: int = -1
  1352. ) -> Tuple[bool, int]:
  1353. """Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0" """
  1354. pass
  1355. # Widgets: Drag Sliders
  1356. # - Ctrl+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
  1357. # - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
  1358. # the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
  1359. # - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3" -> 1.234; "%5.2 secs" -> 01.23 secs; "Biscuit: %.0" -> Biscuit: 1; etc.
  1360. # - Format string may also be set to None or use the default format ("%f" or "%d").
  1361. # - Speed are per-pixel of mouse movement (v_speed=0.2: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
  1362. # - Use v_min < v_max to clamp edits to given limits. Note that Ctrl+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
  1363. # - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
  1364. # - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
  1365. # - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0' argument instead of the `ImGuiSliderFlags flags=0' argument.
  1366. # If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
  1367. # IMGUI_API bool DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1368. def drag_float(
  1369. label: str,
  1370. v: float,
  1371. v_speed: float = 1.0,
  1372. v_min: float = 0.0,
  1373. v_max: float = 0.0,
  1374. format: str = "%.3",
  1375. flags: SliderFlags = 0,
  1376. ) -> Tuple[bool, float]:
  1377. """If v_min >= v_max we have no bound"""
  1378. pass
  1379. # IMGUI_API bool DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1380. def drag_float2(
  1381. label: str,
  1382. v: List[float],
  1383. v_speed: float = 1.0,
  1384. v_min: float = 0.0,
  1385. v_max: float = 0.0,
  1386. format: str = "%.3",
  1387. flags: SliderFlags = 0,
  1388. ) -> Tuple[bool, List[float]]:
  1389. pass
  1390. # IMGUI_API bool DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1391. def drag_float3(
  1392. label: str,
  1393. v: List[float],
  1394. v_speed: float = 1.0,
  1395. v_min: float = 0.0,
  1396. v_max: float = 0.0,
  1397. format: str = "%.3",
  1398. flags: SliderFlags = 0,
  1399. ) -> Tuple[bool, List[float]]:
  1400. pass
  1401. # IMGUI_API bool DragFloat4(const char* label, float v[4], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1402. def drag_float4(
  1403. label: str,
  1404. v: List[float],
  1405. v_speed: float = 1.0,
  1406. v_min: float = 0.0,
  1407. v_max: float = 0.0,
  1408. format: str = "%.3",
  1409. flags: SliderFlags = 0,
  1410. ) -> Tuple[bool, List[float]]:
  1411. pass
  1412. # IMGUI_API bool DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", const char* format_max = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1413. def drag_float_range2(
  1414. label: str,
  1415. v_current_min: float,
  1416. v_current_max: float,
  1417. v_speed: float = 1.0,
  1418. v_min: float = 0.0,
  1419. v_max: float = 0.0,
  1420. format: str = "%.3",
  1421. format_max: Optional[str] = None,
  1422. flags: SliderFlags = 0,
  1423. ) -> Tuple[bool, float, float]:
  1424. pass
  1425. # IMGUI_API bool DragInt(const char* label, int* v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1426. def drag_int(
  1427. label: str, v: int, v_speed: float = 1.0, v_min: int = 0, v_max: int = 0, format: str = "%d", flags: SliderFlags = 0
  1428. ) -> Tuple[bool, int]:
  1429. """If v_min >= v_max we have no bound"""
  1430. pass
  1431. # IMGUI_API bool DragInt2(const char* label, int v[2], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1432. def drag_int2(
  1433. label: str,
  1434. v: List[int],
  1435. v_speed: float = 1.0,
  1436. v_min: int = 0,
  1437. v_max: int = 0,
  1438. format: str = "%d",
  1439. flags: SliderFlags = 0,
  1440. ) -> Tuple[bool, List[int]]:
  1441. pass
  1442. # IMGUI_API bool DragInt3(const char* label, int v[3], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1443. def drag_int3(
  1444. label: str,
  1445. v: List[int],
  1446. v_speed: float = 1.0,
  1447. v_min: int = 0,
  1448. v_max: int = 0,
  1449. format: str = "%d",
  1450. flags: SliderFlags = 0,
  1451. ) -> Tuple[bool, List[int]]:
  1452. pass
  1453. # IMGUI_API bool DragInt4(const char* label, int v[4], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1454. def drag_int4(
  1455. label: str,
  1456. v: List[int],
  1457. v_speed: float = 1.0,
  1458. v_min: int = 0,
  1459. v_max: int = 0,
  1460. format: str = "%d",
  1461. flags: SliderFlags = 0,
  1462. ) -> Tuple[bool, List[int]]:
  1463. pass
  1464. # IMGUI_API bool DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", const char* format_max = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1465. def drag_int_range2(
  1466. label: str,
  1467. v_current_min: int,
  1468. v_current_max: int,
  1469. v_speed: float = 1.0,
  1470. v_min: int = 0,
  1471. v_max: int = 0,
  1472. format: str = "%d",
  1473. format_max: Optional[str] = None,
  1474. flags: SliderFlags = 0,
  1475. ) -> Tuple[bool, int, int]:
  1476. pass
  1477. # IMGUI_API bool DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1478. def drag_scalar(
  1479. label: str,
  1480. data_type: DataType,
  1481. p_data: Any,
  1482. v_speed: float = 1.0,
  1483. p_min: Optional[Any] = None,
  1484. p_max: Optional[Any] = None,
  1485. format: Optional[str] = None,
  1486. flags: SliderFlags = 0,
  1487. ) -> bool:
  1488. pass
  1489. # IMGUI_API bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1490. def drag_scalar_n(
  1491. label: str,
  1492. data_type: DataType,
  1493. p_data: Any,
  1494. components: int,
  1495. v_speed: float = 1.0,
  1496. p_min: Optional[Any] = None,
  1497. p_max: Optional[Any] = None,
  1498. format: Optional[str] = None,
  1499. flags: SliderFlags = 0,
  1500. ) -> bool:
  1501. pass
  1502. # Widgets: Regular Sliders
  1503. # - Ctrl+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
  1504. # - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3" -> 1.234; "%5.2 secs" -> 01.23 secs; "Biscuit: %.0" -> Biscuit: 1; etc.
  1505. # - Format string may also be set to None or use the default format ("%f" or "%d").
  1506. # - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0' argument instead of the `ImGuiSliderFlags flags=0' argument.
  1507. # If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
  1508. # IMGUI_API bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1509. def slider_float(
  1510. label: str, v: float, v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1511. ) -> Tuple[bool, float]:
  1512. """adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display."""
  1513. pass
  1514. # IMGUI_API bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1515. @overload
  1516. def slider_float2(
  1517. label: str, v: List[float], v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1518. ) -> Tuple[bool, List[float]]:
  1519. pass
  1520. # IMGUI_API inline std::pair<bool, ImVec2> SliderFloat2(const char* label, ImVec2 v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) /* original C++ signature */
  1521. # { bool changed = SliderFloat2(label, (float*)&v, v_min, v_max, format, flags); return { changed, v }; }
  1522. @overload
  1523. def slider_float2(
  1524. label: str, v: ImVec2Like, v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1525. ) -> Tuple[bool, ImVec2]:
  1526. pass
  1527. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1528. #
  1529. # #endif
  1530. #
  1531. # IMGUI_API bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1532. def slider_float3(
  1533. label: str, v: List[float], v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1534. ) -> Tuple[bool, List[float]]:
  1535. pass
  1536. # IMGUI_API bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1537. @overload
  1538. def slider_float4(
  1539. label: str, v: List[float], v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1540. ) -> Tuple[bool, List[float]]:
  1541. pass
  1542. # IMGUI_API inline std::pair<bool, ImVec4> SliderFloat4(const char* label, ImVec4 v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) /* original C++ signature */
  1543. # { bool changed = SliderFloat4(label, (float*)&v, v_min, v_max, format, flags); return { changed, v }; }
  1544. @overload
  1545. def slider_float4(
  1546. label: str, v: ImVec4Like, v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1547. ) -> Tuple[bool, ImVec4]:
  1548. pass
  1549. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1550. #
  1551. # #endif
  1552. #
  1553. # IMGUI_API bool SliderAngle(const char* label, float* v_rad, float v_degrees_min = -360.0f, float v_degrees_max = +360.0f, const char* format = "%.0f deg", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1554. def slider_angle(
  1555. label: str,
  1556. v_rad: float,
  1557. v_degrees_min: float = -360.0,
  1558. v_degrees_max: float = +360.0,
  1559. format: str = "%.0 deg",
  1560. flags: SliderFlags = 0,
  1561. ) -> Tuple[bool, float]:
  1562. pass
  1563. # IMGUI_API bool SliderInt(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1564. def slider_int(
  1565. label: str, v: int, v_min: int, v_max: int, format: str = "%d", flags: SliderFlags = 0
  1566. ) -> Tuple[bool, int]:
  1567. pass
  1568. # IMGUI_API bool SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1569. def slider_int2(
  1570. label: str, v: List[int], v_min: int, v_max: int, format: str = "%d", flags: SliderFlags = 0
  1571. ) -> Tuple[bool, List[int]]:
  1572. pass
  1573. # IMGUI_API bool SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1574. def slider_int3(
  1575. label: str, v: List[int], v_min: int, v_max: int, format: str = "%d", flags: SliderFlags = 0
  1576. ) -> Tuple[bool, List[int]]:
  1577. pass
  1578. # IMGUI_API bool SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1579. def slider_int4(
  1580. label: str, v: List[int], v_min: int, v_max: int, format: str = "%d", flags: SliderFlags = 0
  1581. ) -> Tuple[bool, List[int]]:
  1582. pass
  1583. # IMGUI_API bool SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1584. def slider_scalar(
  1585. label: str,
  1586. data_type: DataType,
  1587. p_data: Any,
  1588. p_min: Any,
  1589. p_max: Any,
  1590. format: Optional[str] = None,
  1591. flags: SliderFlags = 0,
  1592. ) -> bool:
  1593. pass
  1594. # IMGUI_API bool SliderScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1595. def slider_scalar_n(
  1596. label: str,
  1597. data_type: DataType,
  1598. p_data: Any,
  1599. components: int,
  1600. p_min: Any,
  1601. p_max: Any,
  1602. format: Optional[str] = None,
  1603. flags: SliderFlags = 0,
  1604. ) -> bool:
  1605. pass
  1606. # IMGUI_API bool VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1607. def v_slider_float(
  1608. label: str, size: ImVec2Like, v: float, v_min: float, v_max: float, format: str = "%.3", flags: SliderFlags = 0
  1609. ) -> Tuple[bool, float]:
  1610. pass
  1611. # IMGUI_API bool VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0); /* original C++ signature */
  1612. def v_slider_int(
  1613. label: str, size: ImVec2Like, v: int, v_min: int, v_max: int, format: str = "%d", flags: SliderFlags = 0
  1614. ) -> Tuple[bool, int]:
  1615. pass
  1616. # IMGUI_API bool VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0); /* original C++ signature */
  1617. def v_slider_scalar(
  1618. label: str,
  1619. size: ImVec2Like,
  1620. data_type: DataType,
  1621. p_data: Any,
  1622. p_min: Any,
  1623. p_max: Any,
  1624. format: Optional[str] = None,
  1625. flags: SliderFlags = 0,
  1626. ) -> bool:
  1627. pass
  1628. # Widgets: Input with Keyboard
  1629. # - If you want to use InputText() with std::string or any custom dynamic string type, use the wrapper in misc/cpp/imgui_stdlib.h/.cpp!
  1630. # - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
  1631. # IMGUI_API bool InputFloat(const char* label, float* v, float step = 0.0f, float step_fast = 0.0f, const char* format = "%.3f", ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1632. def input_float(
  1633. label: str, v: float, step: float = 0.0, step_fast: float = 0.0, format: str = "%.3", flags: InputTextFlags = 0
  1634. ) -> Tuple[bool, float]:
  1635. pass
  1636. # IMGUI_API bool InputFloat2(const char* label, float v[2], const char* format = "%.3f", ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1637. @overload
  1638. def input_float2(
  1639. label: str, v: List[float], format: str = "%.3", flags: InputTextFlags = 0
  1640. ) -> Tuple[bool, List[float]]:
  1641. pass
  1642. # IMGUI_API inline std::pair<bool, ImVec2> InputFloat2(const char* label, ImVec2 v, const char* format = "%.3f", ImGuiInputTextFlags flags = 0) /* original C++ signature */
  1643. # { bool changed = InputFloat2(label, (float*)&v, format, flags); return { changed, v }; }
  1644. @overload
  1645. def input_float2(label: str, v: ImVec2Like, format: str = "%.3", flags: InputTextFlags = 0) -> Tuple[bool, ImVec2]:
  1646. pass
  1647. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1648. #
  1649. # #endif
  1650. #
  1651. # IMGUI_API bool InputFloat3(const char* label, float v[3], const char* format = "%.3f", ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1652. def input_float3(
  1653. label: str, v: List[float], format: str = "%.3", flags: InputTextFlags = 0
  1654. ) -> Tuple[bool, List[float]]:
  1655. pass
  1656. # IMGUI_API bool InputFloat4(const char* label, float v[4], const char* format = "%.3f", ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1657. @overload
  1658. def input_float4(
  1659. label: str, v: List[float], format: str = "%.3", flags: InputTextFlags = 0
  1660. ) -> Tuple[bool, List[float]]:
  1661. pass
  1662. # IMGUI_API inline std::pair<bool, ImVec4> InputFloat4(const char* label, ImVec4 v, const char* format = "%.3f", ImGuiInputTextFlags flags = 0) /* original C++ signature */
  1663. # { bool changed = InputFloat4(label, (float*)&v, format, flags); return { changed, v }; }
  1664. @overload
  1665. def input_float4(label: str, v: ImVec4Like, format: str = "%.3", flags: InputTextFlags = 0) -> Tuple[bool, ImVec4]:
  1666. pass
  1667. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1668. #
  1669. # #endif
  1670. #
  1671. # IMGUI_API bool InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1672. def input_int(label: str, v: int, step: int = 1, step_fast: int = 100, flags: InputTextFlags = 0) -> Tuple[bool, int]:
  1673. pass
  1674. # IMGUI_API bool InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1675. def input_int2(label: str, v: List[int], flags: InputTextFlags = 0) -> Tuple[bool, List[int]]:
  1676. pass
  1677. # IMGUI_API bool InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1678. def input_int3(label: str, v: List[int], flags: InputTextFlags = 0) -> Tuple[bool, List[int]]:
  1679. pass
  1680. # IMGUI_API bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1681. def input_int4(label: str, v: List[int], flags: InputTextFlags = 0) -> Tuple[bool, List[int]]:
  1682. pass
  1683. # IMGUI_API bool InputDouble(const char* label, double* v, double step = 0.0, double step_fast = 0.0, const char* format = "%.6f", ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1684. def input_double(
  1685. label: str, v: float, step: float = 0.0, step_fast: float = 0.0, format: str = "%.6", flags: InputTextFlags = 0
  1686. ) -> Tuple[bool, float]:
  1687. pass
  1688. # IMGUI_API bool InputScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1689. def input_scalar(
  1690. label: str,
  1691. data_type: DataType,
  1692. p_data: Any,
  1693. p_step: Optional[Any] = None,
  1694. p_step_fast: Optional[Any] = None,
  1695. format: Optional[str] = None,
  1696. flags: InputTextFlags = 0,
  1697. ) -> bool:
  1698. pass
  1699. # IMGUI_API bool InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0); /* original C++ signature */
  1700. def input_scalar_n(
  1701. label: str,
  1702. data_type: DataType,
  1703. p_data: Any,
  1704. components: int,
  1705. p_step: Optional[Any] = None,
  1706. p_step_fast: Optional[Any] = None,
  1707. format: Optional[str] = None,
  1708. flags: InputTextFlags = 0,
  1709. ) -> bool:
  1710. pass
  1711. # Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
  1712. # - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
  1713. # - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x
  1714. # IMGUI_API bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0); /* original C++ signature */
  1715. @overload
  1716. def color_edit3(label: str, col: List[float], flags: ColorEditFlags = 0) -> Tuple[bool, List[float]]:
  1717. pass
  1718. # IMGUI_API inline std::tuple<bool, ImVec4> ColorEdit3(const std::string& label, ImVec4 col, ImGuiColorEditFlags flags = 0) /* original C++ signature */
  1719. # { bool changed = ColorEdit3(label.c_str(), (float*)&col, flags); return { changed, col }; }
  1720. @overload
  1721. def color_edit3(label: str, col: ImVec4Like, flags: ColorEditFlags = 0) -> Tuple[bool, ImVec4]:
  1722. pass
  1723. # IMGUI_API bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0); /* original C++ signature */
  1724. @overload
  1725. def color_edit4(label: str, col: List[float], flags: ColorEditFlags = 0) -> Tuple[bool, List[float]]:
  1726. pass
  1727. # IMGUI_API inline std::tuple<bool, ImVec4> ColorEdit4(const std::string& label, ImVec4 col, ImGuiColorEditFlags flags = 0) /* original C++ signature */
  1728. # { bool changed = ColorEdit4(label.c_str(), (float*)&col, flags); return { changed, col }; }
  1729. @overload
  1730. def color_edit4(label: str, col: ImVec4Like, flags: ColorEditFlags = 0) -> Tuple[bool, ImVec4]:
  1731. pass
  1732. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1733. #
  1734. # #endif
  1735. #
  1736. # IMGUI_API bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0); /* original C++ signature */
  1737. @overload
  1738. def color_picker3(label: str, col: List[float], flags: ColorEditFlags = 0) -> Tuple[bool, List[float]]:
  1739. pass
  1740. # IMGUI_API inline std::tuple<bool, ImVec4> ColorPicker3(const char* label, ImVec4 col, ImGuiColorEditFlags flags = 0) /* original C++ signature */
  1741. # { bool changed = ColorPicker3(label, (float*)&col, flags); return { changed, col }; }
  1742. @overload
  1743. def color_picker3(label: str, col: ImVec4Like, flags: ColorEditFlags = 0) -> Tuple[bool, ImVec4]:
  1744. pass
  1745. # IMGUI_API bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL); /* original C++ signature */
  1746. @overload
  1747. def color_picker4(
  1748. label: str, col: List[float], flags: ColorEditFlags = 0, ref_col: Optional[float] = None
  1749. ) -> Tuple[bool, List[float]]:
  1750. pass
  1751. # IMGUI_API std::tuple<bool, ImVec4> ColorPicker4(const std::string& label, ImVec4 col, ImGuiColorEditFlags flags = 0, std::optional<ImVec4> ref_col = std::nullopt); /* original C++ signature */
  1752. @overload
  1753. def color_picker4(
  1754. label: str, col: ImVec4Like, flags: ColorEditFlags = 0, ref_col: Optional[ImVec4Like] = None
  1755. ) -> Tuple[bool, ImVec4]:
  1756. pass
  1757. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1758. #
  1759. # #endif
  1760. #
  1761. # IMGUI_API bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); /* original C++ signature */
  1762. def color_button(desc_id: str, col: ImVec4Like, flags: ColorEditFlags = 0, size: Optional[ImVec2Like] = None) -> bool:
  1763. """Python bindings defaults:
  1764. If size is None, then its default value will be: ImVec2(0, 0)
  1765. display a color square/button, hover for details, return True when pressed.
  1766. """
  1767. pass
  1768. # IMGUI_API void SetColorEditOptions(ImGuiColorEditFlags flags); /* original C++ signature */
  1769. def set_color_edit_options(flags: ColorEditFlags) -> None:
  1770. """initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls."""
  1771. pass
  1772. # Widgets: Trees
  1773. # - TreeNode functions return True when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
  1774. # IMGUI_API bool TreeNode(const char* label); /* original C++ signature */
  1775. @overload
  1776. def tree_node(label: str) -> bool:
  1777. pass
  1778. # IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) ; /* original C++ signature */
  1779. @overload
  1780. def tree_node(str_id: str, fmt: str) -> bool:
  1781. """helper variation to easily decorrelate the id from the displayed string. Read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet()."""
  1782. pass
  1783. # IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) ; /* original C++ signature */
  1784. @overload
  1785. def tree_node(ptr_id: Any, fmt: str) -> bool:
  1786. """ " """
  1787. pass
  1788. # IMGUI_API bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0); /* original C++ signature */
  1789. @overload
  1790. def tree_node_ex(label: str, flags: TreeNodeFlags = 0) -> bool:
  1791. pass
  1792. # IMGUI_API bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) ; /* original C++ signature */
  1793. @overload
  1794. def tree_node_ex(str_id: str, flags: TreeNodeFlags, fmt: str) -> bool:
  1795. pass
  1796. # IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) ; /* original C++ signature */
  1797. @overload
  1798. def tree_node_ex(ptr_id: Any, flags: TreeNodeFlags, fmt: str) -> bool:
  1799. pass
  1800. # IMGUI_API void TreePush(const char* str_id); /* original C++ signature */
  1801. @overload
  1802. def tree_push(str_id: str) -> None:
  1803. """~ Indent()+PushID(). Already called by TreeNode() when returning True, but you can call TreePush/TreePop yourself if desired."""
  1804. pass
  1805. # IMGUI_API void TreePush(const void* ptr_id); /* original C++ signature */
  1806. @overload
  1807. def tree_push(ptr_id: Any) -> None:
  1808. """ " """
  1809. pass
  1810. # IMGUI_API void TreePop(); /* original C++ signature */
  1811. def tree_pop() -> None:
  1812. """~ Unindent()+PopID()"""
  1813. pass
  1814. # IMGUI_API float GetTreeNodeToLabelSpacing(); /* original C++ signature */
  1815. def get_tree_node_to_label_spacing() -> float:
  1816. """horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode"""
  1817. pass
  1818. # IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); /* original C++ signature */
  1819. @overload
  1820. def collapsing_header(label: str, flags: TreeNodeFlags = 0) -> bool:
  1821. """if returning 'True' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop()."""
  1822. pass
  1823. # IMGUI_API bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0); /* original C++ signature */
  1824. @overload
  1825. def collapsing_header(label: str, p_visible: bool, flags: TreeNodeFlags = 0) -> Tuple[bool, bool]:
  1826. """when 'p_visible != None': if '*p_visible==True' display an additional small close button on upper right of the header which will set the bool to False when clicked, if '*p_visible==False' don't display the header."""
  1827. pass
  1828. # IMGUI_API void SetNextItemOpen(bool is_open, ImGuiCond cond = 0); /* original C++ signature */
  1829. def set_next_item_open(is_open: bool, cond: Cond = 0) -> None:
  1830. """set next TreeNode/CollapsingHeader open state."""
  1831. pass
  1832. # IMGUI_API void SetNextItemStorageID(ImGuiID storage_id); /* original C++ signature */
  1833. def set_next_item_storage_id(storage_id: ID) -> None:
  1834. """set id to use for open/close storage (default to same as item id)."""
  1835. pass
  1836. # IMGUI_API bool TreeNodeGetOpen(ImGuiID storage_id); /* original C++ signature */
  1837. def tree_node_get_open(storage_id: ID) -> bool:
  1838. """retrieve tree node open/close state."""
  1839. pass
  1840. # [ADAPT_IMGUI_BUNDLE]
  1841. # Widgets: Selectables
  1842. # - A selectable highlights when hovered, and can display another color when selected.
  1843. # - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous.
  1844. # IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); /* original C++ signature */
  1845. def selectable(
  1846. label: str, p_selected: bool, flags: SelectableFlags = 0, size: Optional[ImVec2Like] = None
  1847. ) -> Tuple[bool, bool]:
  1848. """Python bindings defaults:
  1849. If size is None, then its default value will be: ImVec2(0, 0)
  1850. "bool* p_selected" point to the selection state (read-write), as a convenient helper.
  1851. """
  1852. pass
  1853. # [/ADAPT_IMGUI_BUNDLE]
  1854. # Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
  1855. # - This enables standard multi-selection/range-selection idioms (Ctrl+Mouse/Keyboard, Shift+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
  1856. # - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
  1857. # - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
  1858. # - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
  1859. # which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
  1860. # - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
  1861. # IMGUI_API ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1); /* original C++ signature */
  1862. def begin_multi_select(flags: MultiSelectFlags, selection_size: int = -1, items_count: int = -1) -> MultiSelectIO:
  1863. pass
  1864. # IMGUI_API ImGuiMultiSelectIO* EndMultiSelect(); /* original C++ signature */
  1865. def end_multi_select() -> MultiSelectIO:
  1866. pass
  1867. # IMGUI_API void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data); /* original C++ signature */
  1868. def set_next_item_selection_user_data(selection_user_data: SelectionUserData) -> None:
  1869. pass
  1870. # IMGUI_API bool IsItemToggledSelection(); /* original C++ signature */
  1871. def is_item_toggled_selection() -> bool:
  1872. """Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly."""
  1873. pass
  1874. # Widgets: List Boxes
  1875. # - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
  1876. # - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result.
  1877. # - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
  1878. # - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created.
  1879. # - Choose frame width: size.x > 0.0: custom / size.x < 0.0 or -FLT_MIN: right-align / size.x = 0.0 (default): use current ItemWidth
  1880. # - Choose frame height: size.y > 0.0: custom / size.y < 0.0 or -FLT_MIN: bottom-align / size.y = 0.0 (default): arbitrary default height which can fit ~7 items
  1881. # IMGUI_API bool BeginListBox(const char* label, const ImVec2& size = ImVec2(0, 0)); /* original C++ signature */
  1882. def begin_list_box(label: str, size: Optional[ImVec2Like] = None) -> bool:
  1883. """Python bindings defaults:
  1884. If size is None, then its default value will be: ImVec2(0, 0)
  1885. open a framed scrolling region
  1886. """
  1887. pass
  1888. # IMGUI_API void EndListBox(); /* original C++ signature */
  1889. def end_list_box() -> None:
  1890. """only call EndListBox() if BeginListBox() returned True!"""
  1891. pass
  1892. # IMGUI_API bool ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items = -1); /* original C++ signature */
  1893. def list_box(label: str, current_item: int, items: List[str], height_in_items: int = -1) -> Tuple[bool, int]:
  1894. pass
  1895. # Widgets: Data Plotting
  1896. # - Consider using ImPlot (https://github.com/epezent/implot) which is much better!
  1897. # IMGUI_API void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)); /* original C++ signature */
  1898. def plot_lines(
  1899. label: str,
  1900. values: np.ndarray,
  1901. values_offset: int = 0,
  1902. overlay_text: Optional[str] = None,
  1903. scale_min: float = sys.float_info.max,
  1904. scale_max: float = sys.float_info.max,
  1905. graph_size: Optional[ImVec2Like] = None,
  1906. stride: int = -1,
  1907. ) -> None:
  1908. """Python bindings defaults:
  1909. If graph_size is None, then its default value will be: ImVec2(0, 0)
  1910. """
  1911. pass
  1912. # IMGUI_API void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)); /* original C++ signature */
  1913. def plot_histogram(
  1914. label: str,
  1915. values: np.ndarray,
  1916. values_offset: int = 0,
  1917. overlay_text: Optional[str] = None,
  1918. scale_min: float = sys.float_info.max,
  1919. scale_max: float = sys.float_info.max,
  1920. graph_size: Optional[ImVec2Like] = None,
  1921. stride: int = -1,
  1922. ) -> None:
  1923. """Python bindings defaults:
  1924. If graph_size is None, then its default value will be: ImVec2(0, 0)
  1925. """
  1926. pass
  1927. # Widgets: Value() Helpers.
  1928. # - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
  1929. # IMGUI_API void Value(const char* prefix, bool b); /* original C++ signature */
  1930. @overload
  1931. def value(prefix: str, b: bool) -> None:
  1932. pass
  1933. # IMGUI_API void Value(const char* prefix, int v); /* original C++ signature */
  1934. @overload
  1935. def value(prefix: str, v: int) -> None:
  1936. pass
  1937. # IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL); /* original C++ signature */
  1938. @overload
  1939. def value(prefix: str, v: float, float_format: Optional[str] = None) -> None:
  1940. pass
  1941. # Widgets: Menus
  1942. # - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
  1943. # - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
  1944. # - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
  1945. # - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
  1946. # IMGUI_API bool BeginMenuBar(); /* original C++ signature */
  1947. def begin_menu_bar() -> bool:
  1948. """append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window)."""
  1949. pass
  1950. # IMGUI_API void EndMenuBar(); /* original C++ signature */
  1951. def end_menu_bar() -> None:
  1952. """only call EndMenuBar() if BeginMenuBar() returns True!"""
  1953. pass
  1954. # IMGUI_API bool BeginMainMenuBar(); /* original C++ signature */
  1955. def begin_main_menu_bar() -> bool:
  1956. """create and append to a full screen menu-bar."""
  1957. pass
  1958. # IMGUI_API void EndMainMenuBar(); /* original C++ signature */
  1959. def end_main_menu_bar() -> None:
  1960. """only call EndMainMenuBar() if BeginMainMenuBar() returns True!"""
  1961. pass
  1962. # IMGUI_API bool BeginMenu(const char* label, bool enabled = true); /* original C++ signature */
  1963. def begin_menu(label: str, enabled: bool = True) -> bool:
  1964. """create a sub-menu entry. only call EndMenu() if this returns True!"""
  1965. pass
  1966. # [ADAPT_IMGUI_BUNDLE]
  1967. # IMGUI_API void EndMenu(); /* original C++ signature */
  1968. def end_menu() -> None:
  1969. """only call EndMenu() if BeginMenu() returns True!"""
  1970. pass
  1971. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1972. #
  1973. # inline bool MenuItemSimple(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true) { return MenuItem(label, shortcut, selected, enabled); } /* original C++ signature */
  1974. def menu_item_simple(label: str, shortcut: Optional[str] = None, selected: bool = False, enabled: bool = True) -> bool:
  1975. """(private API)"""
  1976. pass
  1977. # #endif
  1978. #
  1979. # IMGUI_API bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true); /* original C++ signature */
  1980. def menu_item(label: str, shortcut: str, p_selected: bool, enabled: bool = True) -> Tuple[bool, bool]:
  1981. """return True when activated + toggle (*p_selected) if p_selected != None"""
  1982. pass
  1983. # [/ADAPT_IMGUI_BUNDLE]
  1984. # Tooltips
  1985. # - Tooltips are windows following the mouse. They do not take focus away.
  1986. # - A tooltip window can contain items of any types.
  1987. # - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
  1988. # IMGUI_API bool BeginTooltip(); /* original C++ signature */
  1989. def begin_tooltip() -> bool:
  1990. """begin/append a tooltip window."""
  1991. pass
  1992. # IMGUI_API void EndTooltip(); /* original C++ signature */
  1993. def end_tooltip() -> None:
  1994. """only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns True!"""
  1995. pass
  1996. # IMGUI_API void SetTooltip(const char* fmt, ...) ; /* original C++ signature */
  1997. def set_tooltip(fmt: str) -> None:
  1998. """set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to SetTooltip()."""
  1999. pass
  2000. # Tooltips: helpers for showing a tooltip when hovering an item
  2001. # - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom.
  2002. # - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom.
  2003. # - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
  2004. # IMGUI_API bool BeginItemTooltip(); /* original C++ signature */
  2005. def begin_item_tooltip() -> bool:
  2006. """begin/append a tooltip window if preceding item was hovered."""
  2007. pass
  2008. # IMGUI_API void SetItemTooltip(const char* fmt, ...) ; /* original C++ signature */
  2009. def set_item_tooltip(fmt: str) -> None:
  2010. """set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip()."""
  2011. pass
  2012. # Popups, Modals
  2013. # - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
  2014. # - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
  2015. # - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls.
  2016. # - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time.
  2017. # - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
  2018. # - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
  2019. # This is sometimes leading to confusing mistakes. May rework this in the future.
  2020. # - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned True. ImGuiWindowFlags are forwarded to the window.
  2021. # - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
  2022. # IMGUI_API bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0); /* original C++ signature */
  2023. def begin_popup(str_id: str, flags: WindowFlags = 0) -> bool:
  2024. """return True if the popup is open, and you can start outputting to it."""
  2025. pass
  2026. # IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); /* original C++ signature */
  2027. def begin_popup_modal(name: str, p_open: Optional[bool] = None, flags: WindowFlags = 0) -> Tuple[bool, Optional[bool]]:
  2028. """return True if the modal is open, and you can start outputting to it."""
  2029. pass
  2030. # IMGUI_API void EndPopup(); /* original C++ signature */
  2031. def end_popup() -> None:
  2032. """only call EndPopup() if BeginPopupXXX() returns True!"""
  2033. pass
  2034. # Popups: open/close functions
  2035. # - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options.
  2036. # - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
  2037. # - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually.
  2038. # - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options).
  2039. # - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup().
  2040. # - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened.
  2041. # IMGUI_API void OpenPopup(const char* str_id, ImGuiPopupFlags popup_flags = 0); /* original C++ signature */
  2042. @overload
  2043. def open_popup(str_id: str, popup_flags: PopupFlags = 0) -> None:
  2044. """call to mark popup as open (don't call every frame!)."""
  2045. pass
  2046. # IMGUI_API void OpenPopup(ImGuiID id, ImGuiPopupFlags popup_flags = 0); /* original C++ signature */
  2047. @overload
  2048. def open_popup(id_: ID, popup_flags: PopupFlags = 0) -> None:
  2049. """id overload to facilitate calling from nested stacks"""
  2050. pass
  2051. # IMGUI_API void OpenPopupOnItemClick(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); /* original C++ signature */
  2052. def open_popup_on_item_click(str_id: Optional[str] = None, popup_flags: PopupFlags = 0) -> None:
  2053. """helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors)"""
  2054. pass
  2055. # IMGUI_API void CloseCurrentPopup(); /* original C++ signature */
  2056. def close_current_popup() -> None:
  2057. """manually close the popup we have begin-ed into."""
  2058. pass
  2059. # Popups: Open+Begin popup combined functions helpers to create context menus.
  2060. # - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking.
  2061. # - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future.
  2062. # - IMPORTANT: If you ever used the left mouse button with BeginPopupContextXXX() helpers before 1.92.6:
  2063. # - Before this version, OpenPopupOnItemClick(), BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid() had 'a ImGuiPopupFlags popup_flags = 1' default value in their function signature.
  2064. # - Before: Explicitly passing a literal 0 meant ImGuiPopupFlags_MouseButtonLeft. The default = 1 meant ImGuiPopupFlags_MouseButtonRight.
  2065. # - After: The default = 0 means ImGuiPopupFlags_MouseButtonRight. Explicitly passing a literal 1 also means ImGuiPopupFlags_MouseButtonRight (if legacy behavior are enabled) or will assert (if legacy behavior are disabled).
  2066. # - TL;DR: if you don't want to use right mouse button for popups, always specify it explicitly using a named ImGuiPopupFlags_MouseButtonXXXX value.
  2067. # - Read "API BREAKING CHANGES" 2026/01/07 (1.92.6) entry in imgui.cpp or GitHub topic #9157 for all details.
  2068. # IMGUI_API bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); /* original C++ signature */
  2069. def begin_popup_context_item(str_id: Optional[str] = None, popup_flags: PopupFlags = 0) -> bool:
  2070. """open+begin popup when clicked on last item. Use str_id==None to associate the popup to previous item. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!"""
  2071. pass
  2072. # IMGUI_API bool BeginPopupContextWindow(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); /* original C++ signature */
  2073. def begin_popup_context_window(str_id: Optional[str] = None, popup_flags: PopupFlags = 0) -> bool:
  2074. """open+begin popup when clicked on current window."""
  2075. pass
  2076. # IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); /* original C++ signature */
  2077. def begin_popup_context_void(str_id: Optional[str] = None, popup_flags: PopupFlags = 0) -> bool:
  2078. """open+begin popup when clicked in None (where there are no windows)."""
  2079. pass
  2080. # Popups: query functions
  2081. # - IsPopupOpen(): return True if the popup is open at the current BeginPopup() level of the popup stack.
  2082. # - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId: return True if any popup is open at the current BeginPopup() level of the popup stack.
  2083. # - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId + ImGuiPopupFlags_AnyPopupLevel: return True if any popup is open.
  2084. # IMGUI_API bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0); /* original C++ signature */
  2085. def is_popup_open(str_id: str, flags: PopupFlags = 0) -> bool:
  2086. """return True if the popup is open."""
  2087. pass
  2088. # Tables
  2089. # - Full-featured replacement for old Columns API.
  2090. # - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary.
  2091. # - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
  2092. # The typical call flow is:
  2093. # - 1. Call BeginTable(), early out if returning False.
  2094. # - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
  2095. # - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
  2096. # - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
  2097. # - 5. Populate contents:
  2098. # - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
  2099. # - If you are using tables as a sort of grid, where every column is holding the same type of contents,
  2100. # you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
  2101. # TableNextColumn() will automatically wrap-around into the next row if needed.
  2102. # - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
  2103. # - Summary of possible call flow:
  2104. # - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK
  2105. # - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK
  2106. # - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
  2107. # - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
  2108. # - 5. Call EndTable()
  2109. # IMGUI_API bool BeginTable(const char* str_id, int columns, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f); /* original C++ signature */
  2110. def begin_table(
  2111. str_id: str, columns: int, flags: TableFlags = 0, outer_size: Optional[ImVec2Like] = None, inner_width: float = 0.0
  2112. ) -> bool:
  2113. """Python bindings defaults:
  2114. If outer_size is None, then its default value will be: ImVec2(0.0, 0.0)
  2115. """
  2116. pass
  2117. # IMGUI_API void EndTable(); /* original C++ signature */
  2118. def end_table() -> None:
  2119. """only call EndTable() if BeginTable() returns True!"""
  2120. pass
  2121. # IMGUI_API void TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f); /* original C++ signature */
  2122. def table_next_row(row_flags: TableRowFlags = 0, min_row_height: float = 0.0) -> None:
  2123. """append into the first cell of a new row. 'min_row_height' include the minimum top and bottom padding aka CellPadding.y * 2.0."""
  2124. pass
  2125. # IMGUI_API bool TableNextColumn(); /* original C++ signature */
  2126. def table_next_column() -> bool:
  2127. """append into the next column (or first column of next row if currently in last column). Return True when column is visible."""
  2128. pass
  2129. # IMGUI_API bool TableSetColumnIndex(int column_n); /* original C++ signature */
  2130. def table_set_column_index(column_n: int) -> bool:
  2131. """append into the specified column. Return True when column is visible."""
  2132. pass
  2133. # Tables: Headers & Columns declaration
  2134. # - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
  2135. # - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column.
  2136. # Headers are required to perform: reordering, sorting, and opening the context menu.
  2137. # The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody.
  2138. # - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in
  2139. # some advanced use cases (e.g. adding custom widgets in header row).
  2140. # - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. When freezing columns you would usually also use ImGuiTableColumnFlags_NoHide on them.
  2141. # IMGUI_API void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0); /* original C++ signature */
  2142. def table_setup_column(
  2143. label: str, flags: TableColumnFlags = 0, init_width_or_weight: float = 0.0, user_id: ID = 0
  2144. ) -> None:
  2145. pass
  2146. # IMGUI_API void TableSetupScrollFreeze(int cols, int rows); /* original C++ signature */
  2147. def table_setup_scroll_freeze(cols: int, rows: int) -> None:
  2148. """lock columns/rows so they stay visible when scrolled."""
  2149. pass
  2150. # IMGUI_API void TableHeader(const char* label); /* original C++ signature */
  2151. def table_header(label: str) -> None:
  2152. """submit one header cell manually (rarely used)"""
  2153. pass
  2154. # IMGUI_API void TableHeadersRow(); /* original C++ signature */
  2155. def table_headers_row() -> None:
  2156. """submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu"""
  2157. pass
  2158. # IMGUI_API void TableAngledHeadersRow(); /* original C++ signature */
  2159. def table_angled_headers_row() -> None:
  2160. """submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW."""
  2161. pass
  2162. # Tables: Sorting & Miscellaneous functions
  2163. # - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. None when not sorting.
  2164. # When 'sort_specs->SpecsDirty == True' you should sort your data. It will be True when sorting specs have
  2165. # changed since last call, or the first time. Make sure to set 'SpecsDirty = False' after sorting,
  2166. # else you may wastefully sort your data every frame!
  2167. # - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
  2168. # IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs(); /* original C++ signature */
  2169. def table_get_sort_specs() -> TableSortSpecs:
  2170. """get latest sort specs for the table (None if not sorting). Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable()."""
  2171. pass
  2172. # IMGUI_API int TableGetColumnCount(); /* original C++ signature */
  2173. def table_get_column_count() -> int:
  2174. """return number of columns (value passed to BeginTable)"""
  2175. pass
  2176. # IMGUI_API int TableGetColumnIndex(); /* original C++ signature */
  2177. def table_get_column_index() -> int:
  2178. """return current column index."""
  2179. pass
  2180. # IMGUI_API int TableGetRowIndex(); /* original C++ signature */
  2181. def table_get_row_index() -> int:
  2182. """return current row index (header rows are accounted for)"""
  2183. pass
  2184. # IMGUI_API const char* TableGetColumnName(int column_n = -1); /* original C++ signature */
  2185. def table_get_column_name(column_n: int = -1) -> str:
  2186. """return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column."""
  2187. pass
  2188. # IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1); /* original C++ signature */
  2189. def table_get_column_flags(column_n: int = -1) -> TableColumnFlags:
  2190. """return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column."""
  2191. pass
  2192. # IMGUI_API void TableSetColumnEnabled(int column_n, bool v); /* original C++ signature */
  2193. def table_set_column_enabled(column_n: int, v: bool) -> None:
  2194. """change user accessible enabled/disabled state of a column. Set to False to hide the column. User can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody)"""
  2195. pass
  2196. # IMGUI_API int TableGetHoveredColumn(); /* original C++ signature */
  2197. def table_get_hovered_column() -> int:
  2198. """return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered. Can also use (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered) instead."""
  2199. pass
  2200. # IMGUI_API void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n = -1); /* original C++ signature */
  2201. def table_set_bg_color(target: TableBgTarget, color: ImU32, column_n: int = -1) -> None:
  2202. """change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details."""
  2203. pass
  2204. # Legacy Columns API (prefer using Tables!)
  2205. # - You can also use SameLine(pos_x) to mimic simplified columns.
  2206. # IMGUI_API void Columns(int count = 1, const char* id = NULL, bool borders = true); /* original C++ signature */
  2207. def columns(count: int = 1, id_: Optional[str] = None, borders: bool = True) -> None:
  2208. pass
  2209. # IMGUI_API void NextColumn(); /* original C++ signature */
  2210. def next_column() -> None:
  2211. """next column, defaults to current row or next row if the current row is finished"""
  2212. pass
  2213. # IMGUI_API int GetColumnIndex(); /* original C++ signature */
  2214. def get_column_index() -> int:
  2215. """get current column index"""
  2216. pass
  2217. # IMGUI_API float GetColumnWidth(int column_index = -1); /* original C++ signature */
  2218. def get_column_width(column_index: int = -1) -> float:
  2219. """get column width (in pixels). pass -1 to use current column"""
  2220. pass
  2221. # IMGUI_API void SetColumnWidth(int column_index, float width); /* original C++ signature */
  2222. def set_column_width(column_index: int, width: float) -> None:
  2223. """set column width (in pixels). pass -1 to use current column"""
  2224. pass
  2225. # IMGUI_API float GetColumnOffset(int column_index = -1); /* original C++ signature */
  2226. def get_column_offset(column_index: int = -1) -> float:
  2227. """get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0"""
  2228. pass
  2229. # IMGUI_API void SetColumnOffset(int column_index, float offset_x); /* original C++ signature */
  2230. def set_column_offset(column_index: int, offset_x: float) -> None:
  2231. """set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column"""
  2232. pass
  2233. # IMGUI_API int GetColumnsCount(); /* original C++ signature */
  2234. def get_columns_count() -> int:
  2235. pass
  2236. # Tab Bars, Tabs
  2237. # - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
  2238. # IMGUI_API bool BeginTabBar(const char* str_id, ImGuiTabBarFlags flags = 0); /* original C++ signature */
  2239. def begin_tab_bar(str_id: str, flags: TabBarFlags = 0) -> bool:
  2240. """create and append into a TabBar"""
  2241. pass
  2242. # IMGUI_API void EndTabBar(); /* original C++ signature */
  2243. def end_tab_bar() -> None:
  2244. """only call EndTabBar() if BeginTabBar() returns True!"""
  2245. pass
  2246. # IMGUI_API bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0); /* original C++ signature */
  2247. def begin_tab_item(label: str, p_open: Optional[bool] = None, flags: TabItemFlags = 0) -> Tuple[bool, Optional[bool]]:
  2248. """create a Tab. Returns True if the Tab is selected."""
  2249. pass
  2250. # #ifdef IMGUI_BUNDLE_PYTHON_API
  2251. #
  2252. # IMGUI_API bool BeginTabItemSimple(const char* label, ImGuiTabItemFlags flags = 0); /* original C++ signature */
  2253. def begin_tab_item_simple(label: str, flags: TabItemFlags = 0) -> bool:
  2254. """create a Tab (non-closable). Returns True if the Tab is selected."""
  2255. pass
  2256. # #endif
  2257. #
  2258. # IMGUI_API void EndTabItem(); /* original C++ signature */
  2259. def end_tab_item() -> None:
  2260. """only call EndTabItem() if BeginTabItem() returns True!"""
  2261. pass
  2262. # IMGUI_API bool TabItemButton(const char* label, ImGuiTabItemFlags flags = 0); /* original C++ signature */
  2263. def tab_item_button(label: str, flags: TabItemFlags = 0) -> bool:
  2264. """create a Tab behaving like a button. return True when clicked. cannot be selected in the tab bar."""
  2265. pass
  2266. # IMGUI_API void SetTabItemClosed(const char* tab_or_docked_window_label); /* original C++ signature */
  2267. def set_tab_item_closed(tab_or_docked_window_label: str) -> None:
  2268. """notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name."""
  2269. pass
  2270. # Docking
  2271. # - Read https://github.com/ocornut/imgui/wiki/Docking for details.
  2272. # - Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
  2273. # - You can use many Docking facilities without calling any API.
  2274. # - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
  2275. # - Drag from window menu button (upper-left button) to undock an entire node (all windows).
  2276. # - When io.ConfigDockingWithShift == True, you instead need to hold SHIFT to enable docking.
  2277. # - DockSpaceOverViewport:
  2278. # - This is a helper to create an invisible window covering a viewport, then submit a DockSpace() into it.
  2279. # - Most applications can simply call DockSpaceOverViewport() once to allow docking windows into e.g. the edge of your screen.
  2280. # e.g. ImGui::NewFrame(); ImGui::DockSpaceOverViewport(); // Create a dockspace in main viewport.
  2281. # or: ImGui::NewFrame(); ImGui::DockSpaceOverViewport(0, None, ImGuiDockNodeFlags_PassthruCentralNode); // Create a dockspace in main viewport, central node is transparent.
  2282. # - Dockspaces:
  2283. # - A dockspace is an explicit dock node within an existing window.
  2284. # - IMPORTANT: Dockspaces need to be submitted _before_ any window they can host. Submit them early in your frame!
  2285. # - IMPORTANT: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
  2286. # If you have e.g. multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
  2287. # - See 'Demo->Examples->Dockspace' or 'Demo->Examples->Documents' for more detailed demos.
  2288. # - Programmatic docking:
  2289. # - There is no public API yet other than the very limited SetNextWindowDockID() function. Sorry for that!
  2290. # - Read https://github.com/ocornut/imgui/wiki/Docking for examples of how to use current internal API.
  2291. # IMGUI_API ImGuiID DockSpace(ImGuiID dockspace_id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL); /* original C++ signature */
  2292. def dock_space(
  2293. dockspace_id: ID,
  2294. size: Optional[ImVec2Like] = None,
  2295. flags: DockNodeFlags = 0,
  2296. window_class: Optional[WindowClass] = None,
  2297. ) -> ID:
  2298. """Python bindings defaults:
  2299. If size is None, then its default value will be: ImVec2(0, 0)
  2300. """
  2301. pass
  2302. # IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0, const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL); /* original C++ signature */
  2303. def dock_space_over_viewport(
  2304. dockspace_id: ID = 0,
  2305. viewport: Optional[Viewport] = None,
  2306. flags: DockNodeFlags = 0,
  2307. window_class: Optional[WindowClass] = None,
  2308. ) -> ID:
  2309. pass
  2310. # IMGUI_API void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0); /* original C++ signature */
  2311. def set_next_window_dock_id(dock_id: ID, cond: Cond = 0) -> None:
  2312. """set next window dock id"""
  2313. pass
  2314. # IMGUI_API void SetNextWindowClass(const ImGuiWindowClass* window_class); /* original C++ signature */
  2315. def set_next_window_class(window_class: WindowClass) -> None:
  2316. """set next window class (control docking compatibility + provide hints to platform backend via custom viewport flags and platform parent/child relationship)"""
  2317. pass
  2318. # IMGUI_API ImGuiID GetWindowDockID(); /* original C++ signature */
  2319. def get_window_dock_id() -> ID:
  2320. """get dock id of current window, or 0 if not associated to any docking node."""
  2321. pass
  2322. # IMGUI_API bool IsWindowDocked(); /* original C++ signature */
  2323. def is_window_docked() -> bool:
  2324. """is current window docked into another window?"""
  2325. pass
  2326. # Logging/Capture
  2327. # - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
  2328. # IMGUI_API void LogToTTY(int auto_open_depth = -1); /* original C++ signature */
  2329. def log_to_tty(auto_open_depth: int = -1) -> None:
  2330. """start logging to tty (stdout)"""
  2331. pass
  2332. # IMGUI_API void LogToFile(int auto_open_depth = -1, const char* filename = NULL); /* original C++ signature */
  2333. def log_to_file(auto_open_depth: int = -1, filename: Optional[str] = None) -> None:
  2334. """start logging to file"""
  2335. pass
  2336. # IMGUI_API void LogToClipboard(int auto_open_depth = -1); /* original C++ signature */
  2337. def log_to_clipboard(auto_open_depth: int = -1) -> None:
  2338. """start logging to OS clipboard"""
  2339. pass
  2340. # IMGUI_API void LogFinish(); /* original C++ signature */
  2341. def log_finish() -> None:
  2342. """stop logging (close file, etc.)"""
  2343. pass
  2344. # IMGUI_API void LogButtons(); /* original C++ signature */
  2345. def log_buttons() -> None:
  2346. """helper to display buttons for logging to tty/file/clipboard"""
  2347. pass
  2348. # IMGUI_API void LogText(const char* fmt, ...) ; /* original C++ signature */
  2349. def log_text(fmt: str) -> None:
  2350. """pass text data straight to log (without being displayed)"""
  2351. pass
  2352. # Drag and Drop
  2353. # - On source items, call BeginDragDropSource(), if it returns True also call SetDragDropPayload() + EndDragDropSource().
  2354. # - On target candidates, call BeginDragDropTarget(), if it returns True also call AcceptDragDropPayload() + EndDragDropTarget().
  2355. # - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
  2356. # - An item can be both drag source and drop target.
  2357. # IMGUI_API bool BeginDragDropSource(ImGuiDragDropFlags flags = 0); /* original C++ signature */
  2358. def begin_drag_drop_source(flags: DragDropFlags = 0) -> bool:
  2359. """call after submitting an item which may be dragged. when this return True, you can call SetDragDropPayload() + EndDragDropSource()"""
  2360. pass
  2361. # IMGUI_API bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0); /* original C++ signature */
  2362. def set_drag_drop_payload(type: str, data: Any, sz: int, cond: Cond = 0) -> bool:
  2363. """type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. Return True when payload has been accepted."""
  2364. pass
  2365. # IMGUI_API void EndDragDropSource(); /* original C++ signature */
  2366. def end_drag_drop_source() -> None:
  2367. """only call EndDragDropSource() if BeginDragDropSource() returns True!"""
  2368. pass
  2369. # IMGUI_API bool BeginDragDropTarget(); /* original C++ signature */
  2370. def begin_drag_drop_target() -> bool:
  2371. """call after submitting an item that may receive a payload. If this returns True, you can call AcceptDragDropPayload() + EndDragDropTarget()"""
  2372. pass
  2373. # IMGUI_API void EndDragDropTarget(); /* original C++ signature */
  2374. def end_drag_drop_target() -> None:
  2375. """only call EndDragDropTarget() if BeginDragDropTarget() returns True!"""
  2376. pass
  2377. # Disabling [BETA API]
  2378. # - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
  2379. # - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(True) in the stack is enough to keep everything disabled)
  2380. # - Tooltips windows are automatically opted out of disabling. Note that IsItemHovered() by default returns False on disabled items, unless using ImGuiHoveredFlags_AllowWhenDisabled.
  2381. # - BeginDisabled(False)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(False)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
  2382. # IMGUI_API void BeginDisabled(bool disabled = true); /* original C++ signature */
  2383. def begin_disabled(disabled: bool = True) -> None:
  2384. pass
  2385. # IMGUI_API void EndDisabled(); /* original C++ signature */
  2386. def end_disabled() -> None:
  2387. pass
  2388. # Clipping
  2389. # - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only.
  2390. # IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect); /* original C++ signature */
  2391. def push_clip_rect(
  2392. clip_rect_min: ImVec2Like, clip_rect_max: ImVec2Like, intersect_with_current_clip_rect: bool
  2393. ) -> None:
  2394. pass
  2395. # IMGUI_API void PopClipRect(); /* original C++ signature */
  2396. def pop_clip_rect() -> None:
  2397. pass
  2398. # Focus, Activation
  2399. # IMGUI_API void SetItemDefaultFocus(); /* original C++ signature */
  2400. def set_item_default_focus() -> None:
  2401. """make last item the default focused item of a newly appearing window."""
  2402. pass
  2403. # IMGUI_API void SetKeyboardFocusHere(int offset = 0); /* original C++ signature */
  2404. def set_keyboard_focus_here(offset: int = 0) -> None:
  2405. """focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget."""
  2406. pass
  2407. # Keyboard/Gamepad Navigation
  2408. # IMGUI_API void SetNavCursorVisible(bool visible); /* original C++ signature */
  2409. def set_nav_cursor_visible(visible: bool) -> None:
  2410. """alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when clicking with mouse."""
  2411. pass
  2412. # Overlapping mode
  2413. # IMGUI_API void SetNextItemAllowOverlap(); /* original C++ signature */
  2414. def set_next_item_allow_overlap() -> None:
  2415. """allow next item to be overlapped by a subsequent item. Typically useful with InvisibleButton(), Selectable(), TreeNode() covering an area where subsequent items may need to be added. Note that both Selectable() and TreeNode() have dedicated flags doing this."""
  2416. pass
  2417. # Item/Widgets Utilities and Query Functions
  2418. # - Most of the functions are referring to the previous Item that has been submitted.
  2419. # - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions.
  2420. # IMGUI_API bool IsItemHovered(ImGuiHoveredFlags flags = 0); /* original C++ signature */
  2421. def is_item_hovered(flags: HoveredFlags = 0) -> bool:
  2422. """is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options."""
  2423. pass
  2424. # IMGUI_API bool IsItemActive(); /* original C++ signature */
  2425. def is_item_active() -> bool:
  2426. """is the last item active? (e.g. button being held, text field being edited. This will continuously return True while holding mouse button on an item. Items that don't interact will always return False)"""
  2427. pass
  2428. # IMGUI_API bool IsItemFocused(); /* original C++ signature */
  2429. def is_item_focused() -> bool:
  2430. """is the last item focused for keyboard/gamepad navigation?"""
  2431. pass
  2432. # IMGUI_API bool IsItemClicked(ImGuiMouseButton mouse_button = 0); /* original C++ signature */
  2433. def is_item_clicked(mouse_button: MouseButton = 0) -> bool:
  2434. """is the last item hovered and mouse clicked on? (**) == IsMouseClicked(mouse_button) && IsItemHovered()Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition."""
  2435. pass
  2436. # IMGUI_API bool IsItemVisible(); /* original C++ signature */
  2437. def is_item_visible() -> bool:
  2438. """is the last item visible? (items may be out of sight because of clipping/scrolling)"""
  2439. pass
  2440. # IMGUI_API bool IsItemEdited(); /* original C++ signature */
  2441. def is_item_edited() -> bool:
  2442. """did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets."""
  2443. pass
  2444. # IMGUI_API bool IsItemActivated(); /* original C++ signature */
  2445. def is_item_activated() -> bool:
  2446. """was the last item just made active (item was previously inactive)."""
  2447. pass
  2448. # IMGUI_API bool IsItemDeactivated(); /* original C++ signature */
  2449. def is_item_deactivated() -> bool:
  2450. """was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing."""
  2451. pass
  2452. # IMGUI_API bool IsItemDeactivatedAfterEdit(); /* original C++ signature */
  2453. def is_item_deactivated_after_edit() -> bool:
  2454. """was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved). Useful for Undo/Redo patterns with widgets that require continuous editing. Note that you may get False positives (some widgets such as Combo()/ListBox()/Selectable() will return True even when clicking an already selected item)."""
  2455. pass
  2456. # IMGUI_API bool IsItemToggledOpen(); /* original C++ signature */
  2457. def is_item_toggled_open() -> bool:
  2458. """was the last item open state toggled? set by TreeNode()."""
  2459. pass
  2460. # IMGUI_API bool IsAnyItemHovered(); /* original C++ signature */
  2461. def is_any_item_hovered() -> bool:
  2462. """is any item hovered?"""
  2463. pass
  2464. # IMGUI_API bool IsAnyItemActive(); /* original C++ signature */
  2465. def is_any_item_active() -> bool:
  2466. """is any item active?"""
  2467. pass
  2468. # IMGUI_API bool IsAnyItemFocused(); /* original C++ signature */
  2469. def is_any_item_focused() -> bool:
  2470. """is any item focused?"""
  2471. pass
  2472. # IMGUI_API ImGuiID GetItemID(); /* original C++ signature */
  2473. def get_item_id() -> ID:
  2474. """get ID of last item (~~ often same ImGui::GetID(label) beforehand)"""
  2475. pass
  2476. # IMGUI_API ImVec2 GetItemRectMin(); /* original C++ signature */
  2477. def get_item_rect_min() -> ImVec2:
  2478. """get upper-left bounding rectangle of the last item (screen space)"""
  2479. pass
  2480. # IMGUI_API ImVec2 GetItemRectMax(); /* original C++ signature */
  2481. def get_item_rect_max() -> ImVec2:
  2482. """get lower-right bounding rectangle of the last item (screen space)"""
  2483. pass
  2484. # IMGUI_API ImVec2 GetItemRectSize(); /* original C++ signature */
  2485. def get_item_rect_size() -> ImVec2:
  2486. """get size of last item"""
  2487. pass
  2488. # IMGUI_API ImGuiItemFlags GetItemFlags(); /* original C++ signature */
  2489. def get_item_flags() -> ItemFlags:
  2490. """get generic flags of last item"""
  2491. pass
  2492. # Viewports
  2493. # - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
  2494. # - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
  2495. # - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
  2496. # IMGUI_API ImGuiViewport* GetMainViewport(); /* original C++ signature */
  2497. def get_main_viewport() -> Viewport:
  2498. """return primary/default viewport. This can never be None."""
  2499. pass
  2500. # Background/Foreground Draw Lists
  2501. # IMGUI_API ImDrawList* GetBackgroundDrawList(ImGuiViewport* viewport = NULL); /* original C++ signature */
  2502. def get_background_draw_list(viewport: Optional[Viewport] = None) -> ImDrawList:
  2503. """get background draw list for the given viewport or viewport associated to the current window. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents."""
  2504. pass
  2505. # IMGUI_API ImDrawList* GetForegroundDrawList(ImGuiViewport* viewport = NULL); /* original C++ signature */
  2506. def get_foreground_draw_list(viewport: Optional[Viewport] = None) -> ImDrawList:
  2507. """get foreground draw list for the given viewport or viewport associated to the current window. this draw list will be the top-most rendered one. Useful to quickly draw shapes/text over dear imgui contents."""
  2508. pass
  2509. # Miscellaneous Utilities
  2510. # IMGUI_API bool IsRectVisible(const ImVec2& size); /* original C++ signature */
  2511. @overload
  2512. def is_rect_visible(size: ImVec2Like) -> bool:
  2513. """test if rectangle (of given size, starting from cursor position) is visible / not clipped."""
  2514. pass
  2515. # IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); /* original C++ signature */
  2516. @overload
  2517. def is_rect_visible(rect_min: ImVec2Like, rect_max: ImVec2Like) -> bool:
  2518. """test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side."""
  2519. pass
  2520. # IMGUI_API double GetTime(); /* original C++ signature */
  2521. def get_time() -> float:
  2522. """get global imgui time. incremented by io.DeltaTime every frame."""
  2523. pass
  2524. # IMGUI_API int GetFrameCount(); /* original C++ signature */
  2525. def get_frame_count() -> int:
  2526. """get global imgui frame count. incremented by 1 every frame."""
  2527. pass
  2528. # IMGUI_API ImDrawListSharedData* GetDrawListSharedData(); /* original C++ signature */
  2529. def get_draw_list_shared_data() -> ImDrawListSharedData:
  2530. """you may use this when creating your own ImDrawList instances."""
  2531. pass
  2532. # IMGUI_API const char* GetStyleColorName(ImGuiCol idx); /* original C++ signature */
  2533. def get_style_color_name(idx: Col) -> str:
  2534. """get a string corresponding to the enum value (for display, saving, etc.)."""
  2535. pass
  2536. # IMGUI_API void SetStateStorage(ImGuiStorage* storage); /* original C++ signature */
  2537. def set_state_storage(storage: Storage) -> None:
  2538. """replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)"""
  2539. pass
  2540. # IMGUI_API ImGuiStorage* GetStateStorage(); /* original C++ signature */
  2541. def get_state_storage() -> Storage:
  2542. pass
  2543. # IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); /* original C++ signature */
  2544. def calc_text_size(
  2545. text: str, text_end: Optional[str] = None, hide_text_after_double_hash: bool = False, wrap_width: float = -1.0
  2546. ) -> ImVec2:
  2547. """Text Utilities"""
  2548. pass
  2549. # Color Utilities
  2550. # IMGUI_API ImVec4 ColorConvertU32ToFloat4(ImU32 in); /* original C++ signature */
  2551. def color_convert_u32_to_float4(in_: ImU32) -> ImVec4:
  2552. pass
  2553. # IMGUI_API ImU32 ColorConvertFloat4ToU32(const ImVec4& in); /* original C++ signature */
  2554. def color_convert_float4_to_u32(in_: ImVec4Like) -> ImU32:
  2555. pass
  2556. # Inputs Utilities: Raw Keyboard/Mouse/Gamepad Access
  2557. # - Consider using the Shortcut() function instead of IsKeyPressed()/IsKeyChordPressed()! Shortcut() is easier to use and better featured (can do focus routing check).
  2558. # - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
  2559. # - (legacy: before v1.87 (2022-02), we used ImGuiKey < 512 values to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
  2560. # IMGUI_API bool IsKeyDown(ImGuiKey key); /* original C++ signature */
  2561. def is_key_down(key: Key) -> bool:
  2562. """is key being held."""
  2563. pass
  2564. # IMGUI_API bool IsKeyPressed(ImGuiKey key, bool repeat = true); /* original C++ signature */
  2565. def is_key_pressed(key: Key, repeat: bool = True) -> bool:
  2566. """was key pressed (went from !Down to Down)? Repeat rate uses io.KeyRepeatDelay / KeyRepeatRate."""
  2567. pass
  2568. # IMGUI_API bool IsKeyReleased(ImGuiKey key); /* original C++ signature */
  2569. def is_key_released(key: Key) -> bool:
  2570. """was key released (went from Down to !Down)?"""
  2571. pass
  2572. # IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord); /* original C++ signature */
  2573. def is_key_chord_pressed(key_chord: KeyChord) -> bool:
  2574. """was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead."""
  2575. pass
  2576. # IMGUI_API int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate); /* original C++ signature */
  2577. def get_key_pressed_amount(key: Key, repeat_delay: float, rate: float) -> int:
  2578. """uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate"""
  2579. pass
  2580. # IMGUI_API const char* GetKeyName(ImGuiKey key); /* original C++ signature */
  2581. def get_key_name(key: Key) -> str:
  2582. """[DEBUG] returns English name of the key. Those names are provided for debugging purpose and are not meant to be saved persistently nor compared."""
  2583. pass
  2584. # IMGUI_API void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard); /* original C++ signature */
  2585. def set_next_frame_want_capture_keyboard(want_capture_keyboard: bool) -> None:
  2586. """Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when True it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call."""
  2587. pass
  2588. # Inputs Utilities: Shortcut Testing & Routing
  2589. # - Typical use is e.g.: 'if (ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_S)) { ... }'.
  2590. # - Flags: Default route use ImGuiInputFlags_RouteFocused, but see ImGuiInputFlags_RouteGlobal and other options in ImGuiInputFlags_!
  2591. # - Flags: Use ImGuiInputFlags_Repeat to support repeat.
  2592. # - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
  2593. # ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments
  2594. # ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments
  2595. # only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
  2596. # - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
  2597. # Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
  2598. # Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
  2599. # Child2 -> no call // When Child2 is focused, Parent gets the shortcut.
  2600. # The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
  2601. # This is an important property as it facilitate working with foreign code or larger codebase.
  2602. # - To understand the difference:
  2603. # - IsKeyChordPressed() compares mods and call IsKeyPressed()
  2604. # -> the function has no side-effect.
  2605. # - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed()
  2606. # -> the function has (desirable) side-effects as it can prevents another call from getting the route.
  2607. # - Visualize registered routes in 'Metrics/Debugger->Inputs'.
  2608. # IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0); /* original C++ signature */
  2609. def shortcut(key_chord: KeyChord, flags: InputFlags = 0) -> bool:
  2610. pass
  2611. # IMGUI_API void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0); /* original C++ signature */
  2612. def set_next_item_shortcut(key_chord: KeyChord, flags: InputFlags = 0) -> None:
  2613. pass
  2614. # Inputs Utilities: Key/Input Ownership [BETA]
  2615. # - One common use case would be to allow your items to disable standard inputs behaviors such
  2616. # as Tab or Alt key handling, Mouse Wheel scrolling, etc.
  2617. # e.g. `Button(...); if (SetItemKeyOwner(ImGuiKey_MouseWheelY)) { ... }` to make hovering/activating a button disable wheel for scrolling.
  2618. # - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them.
  2619. # - The return value of SetItemKeyOwner() says if ownership has been requested for the item, which is a shortcut to calling yet non-public TestKeyOwner() function.
  2620. # - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version.
  2621. # IMGUI_API bool SetItemKeyOwner(ImGuiKey key); /* original C++ signature */
  2622. def set_item_key_owner(key: Key) -> bool:
  2623. """Set key owner to last item ID if it is hovered or active. Return True when ownership has been set. Roughly equivalent to 'if (TestKeyOwner(key, GetItemID()) && (IsItemHovered() || IsItemActive())) { SetKeyOwner(key, GetItemID());'."""
  2624. pass
  2625. # Inputs Utilities: Mouse
  2626. # - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
  2627. # - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
  2628. # - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
  2629. # IMGUI_API bool IsMouseDown(ImGuiMouseButton button); /* original C++ signature */
  2630. def is_mouse_down(button: MouseButton) -> bool:
  2631. """is mouse button held?"""
  2632. pass
  2633. # IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); /* original C++ signature */
  2634. def is_mouse_clicked(button: MouseButton, repeat: bool = False) -> bool:
  2635. """did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1."""
  2636. pass
  2637. # IMGUI_API bool IsMouseReleased(ImGuiMouseButton button); /* original C++ signature */
  2638. def is_mouse_released(button: MouseButton) -> bool:
  2639. """did mouse button released? (went from Down to !Down)"""
  2640. pass
  2641. # IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button); /* original C++ signature */
  2642. def is_mouse_double_clicked(button: MouseButton) -> bool:
  2643. """did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == True)"""
  2644. pass
  2645. # IMGUI_API bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay); /* original C++ signature */
  2646. def is_mouse_released_with_delay(button: MouseButton, delay: float) -> bool:
  2647. """delayed mouse release (use very sparingly!). Generally used with 'delay >= io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount==1' test. This is a very rarely used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename."""
  2648. pass
  2649. # IMGUI_API int GetMouseClickedCount(ImGuiMouseButton button); /* original C++ signature */
  2650. def get_mouse_clicked_count(button: MouseButton) -> int:
  2651. """return the number of successive mouse-clicks at the time where a click happen (otherwise 0)."""
  2652. pass
  2653. # IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true); /* original C++ signature */
  2654. def is_mouse_hovering_rect(r_min: ImVec2Like, r_max: ImVec2Like, clip: bool = True) -> bool:
  2655. """is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block."""
  2656. pass
  2657. # IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL); /* original C++ signature */
  2658. def is_mouse_pos_valid(mouse_pos: Optional[ImVec2Like] = None) -> bool:
  2659. """by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available"""
  2660. pass
  2661. # IMGUI_API bool IsAnyMouseDown(); /* original C++ signature */
  2662. def is_any_mouse_down() -> bool:
  2663. """[WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid."""
  2664. pass
  2665. # IMGUI_API ImVec2 GetMousePos(); /* original C++ signature */
  2666. def get_mouse_pos() -> ImVec2:
  2667. """shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls"""
  2668. pass
  2669. # IMGUI_API ImVec2 GetMousePosOnOpeningCurrentPopup(); /* original C++ signature */
  2670. def get_mouse_pos_on_opening_current_popup() -> ImVec2:
  2671. """retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)"""
  2672. pass
  2673. # IMGUI_API bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f); /* original C++ signature */
  2674. def is_mouse_dragging(button: MouseButton, lock_threshold: float = -1.0) -> bool:
  2675. """is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0)"""
  2676. pass
  2677. # IMGUI_API ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f); /* original C++ signature */
  2678. def get_mouse_drag_delta(button: MouseButton = 0, lock_threshold: float = -1.0) -> ImVec2:
  2679. """return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0 until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0)"""
  2680. pass
  2681. # IMGUI_API void ResetMouseDragDelta(ImGuiMouseButton button = 0); /* original C++ signature */
  2682. def reset_mouse_drag_delta(button: MouseButton = 0) -> None:
  2683. pass
  2684. # IMGUI_API ImGuiMouseCursor GetMouseCursor(); /* original C++ signature */
  2685. def get_mouse_cursor() -> MouseCursor:
  2686. """get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you"""
  2687. pass
  2688. # IMGUI_API void SetMouseCursor(ImGuiMouseCursor cursor_type); /* original C++ signature */
  2689. def set_mouse_cursor(cursor_type: MouseCursor) -> None:
  2690. """set desired mouse cursor shape"""
  2691. pass
  2692. # IMGUI_API void SetNextFrameWantCaptureMouse(bool want_capture_mouse); /* original C++ signature */
  2693. def set_next_frame_want_capture_mouse(want_capture_mouse: bool) -> None:
  2694. """Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical when True it instructs your app to ignore inputs). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call."""
  2695. pass
  2696. # Clipboard Utilities
  2697. # - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard.
  2698. # IMGUI_API const char* GetClipboardText(); /* original C++ signature */
  2699. def get_clipboard_text() -> str:
  2700. pass
  2701. # IMGUI_API void SetClipboardText(const char* text); /* original C++ signature */
  2702. def set_clipboard_text(text: str) -> None:
  2703. pass
  2704. # Settings/.Ini Utilities
  2705. # - The disk functions are automatically called if io.IniFilename != None (default is "imgui.ini").
  2706. # - Set io.IniFilename to None to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
  2707. # - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables).
  2708. # IMGUI_API void LoadIniSettingsFromDisk(const char* ini_filename); /* original C++ signature */
  2709. def load_ini_settings_from_disk(ini_filename: str) -> None:
  2710. """call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename)."""
  2711. pass
  2712. # IMGUI_API void LoadIniSettingsFromMemory(const char* ini_data, size_t ini_size=0); /* original C++ signature */
  2713. def load_ini_settings_from_memory(ini_data: str, ini_size: int = 0) -> None:
  2714. """call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source."""
  2715. pass
  2716. # IMGUI_API void SaveIniSettingsToDisk(const char* ini_filename); /* original C++ signature */
  2717. def save_ini_settings_to_disk(ini_filename: str) -> None:
  2718. """this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that should be reflected in the .ini file (and also by DestroyContext)."""
  2719. pass
  2720. # IMGUI_API const char* SaveIniSettingsToMemory(size_t* out_ini_size = NULL); /* original C++ signature */
  2721. def save_ini_settings_to_memory() -> str:
  2722. """return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings."""
  2723. pass
  2724. # Debug Utilities
  2725. # - Your main debugging friend is the ShowMetricsWindow() function.
  2726. # - Interactive tools are all accessible from the 'Dear ImGui Demo->Tools' menu.
  2727. # - Read https://github.com/ocornut/imgui/wiki/Debug-Tools for a description of all available debug tools.
  2728. # IMGUI_API void DebugTextEncoding(const char* text); /* original C++ signature */
  2729. def debug_text_encoding(text: str) -> None:
  2730. pass
  2731. # IMGUI_API void DebugFlashStyleColor(ImGuiCol idx); /* original C++ signature */
  2732. def debug_flash_style_color(idx: Col) -> None:
  2733. pass
  2734. # IMGUI_API void DebugStartItemPicker(); /* original C++ signature */
  2735. def debug_start_item_picker() -> None:
  2736. pass
  2737. # IMGUI_API bool DebugCheckVersionAndDataLayout(const char* version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx); /* original C++ signature */
  2738. def debug_check_version_and_data_layout(
  2739. version_str: str, sz_io: int, sz_style: int, sz_vec2: int, sz_vec4: int, sz_drawvert: int, sz_drawidx: int
  2740. ) -> bool:
  2741. """This is called by IMGUI_CHECKVERSION() macro."""
  2742. pass
  2743. # Memory Allocators
  2744. # - Those functions are not reliant on the current context.
  2745. # - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
  2746. # for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
  2747. # (Optional) Platform/OS interface for multi-viewport support
  2748. # Read comments around the ImGuiPlatformIO structure for more details.
  2749. # Note: You may use GetWindowViewport() to get the current viewport of the current window.
  2750. # IMGUI_API void UpdatePlatformWindows(); /* original C++ signature */
  2751. def update_platform_windows() -> None:
  2752. """call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary viewport, and DestroyWindow for each inactive viewport."""
  2753. pass
  2754. # IMGUI_API void RenderPlatformWindowsDefault(void* platform_render_arg = NULL, void* renderer_render_arg = NULL); /* original C++ signature */
  2755. def render_platform_windows_default(
  2756. platform_render_arg: Optional[Any] = None, renderer_render_arg: Optional[Any] = None
  2757. ) -> None:
  2758. """call in main loop. will call RenderWindow/SwapBuffers platform functions for each secondary viewport which doesn't have the ImGuiViewportFlags_Minimized flag set. May be reimplemented by user for custom rendering needs."""
  2759. pass
  2760. # IMGUI_API void DestroyPlatformWindows(); /* original C++ signature */
  2761. def destroy_platform_windows() -> None:
  2762. """call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to close platform windows before imgui shutdown. otherwise will be called by DestroyContext()."""
  2763. pass
  2764. # IMGUI_API ImGuiViewport* FindViewportByID(ImGuiID viewport_id); /* original C++ signature */
  2765. def find_viewport_by_id(viewport_id: ID) -> Viewport:
  2766. """this is a helper for backends."""
  2767. pass
  2768. # IMGUI_API ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle); /* original C++ signature */
  2769. def find_viewport_by_platform_handle(platform_handle: Any) -> Viewport:
  2770. """this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.)"""
  2771. pass
  2772. # -----------------------------------------------------------------------------
  2773. # [SECTION] Flags & Enumerations
  2774. # -----------------------------------------------------------------------------
  2775. class WindowFlags_(enum.IntFlag):
  2776. """Flags for ImGui::Begin()
  2777. (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly)
  2778. """
  2779. # ImGuiWindowFlags_None = 0, /* original C++ signature */
  2780. none = enum.auto() # (= 0)
  2781. # ImGuiWindowFlags_NoTitleBar = 1 << 0, /* original C++ signature */
  2782. no_title_bar = enum.auto() # (= 1 << 0) # Disable title-bar
  2783. # ImGuiWindowFlags_NoResize = 1 << 1, /* original C++ signature */
  2784. no_resize = enum.auto() # (= 1 << 1) # Disable user resizing with the lower-right grip
  2785. # ImGuiWindowFlags_NoMove = 1 << 2, /* original C++ signature */
  2786. no_move = enum.auto() # (= 1 << 2) # Disable user moving the window
  2787. # ImGuiWindowFlags_NoScrollbar = 1 << 3, /* original C++ signature */
  2788. no_scrollbar = (
  2789. enum.auto()
  2790. ) # (= 1 << 3) # Disable scrollbars (window can still scroll with mouse or programmatically)
  2791. # ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, /* original C++ signature */
  2792. no_scroll_with_mouse = (
  2793. enum.auto()
  2794. ) # (= 1 << 4) # Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.
  2795. # ImGuiWindowFlags_NoCollapse = 1 << 5, /* original C++ signature */
  2796. no_collapse = (
  2797. enum.auto()
  2798. ) # (= 1 << 5) # Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node).
  2799. # ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, /* original C++ signature */
  2800. always_auto_resize = enum.auto() # (= 1 << 6) # Resize every window to its content every frame
  2801. # ImGuiWindowFlags_NoBackground = 1 << 7, /* original C++ signature */
  2802. no_background = (
  2803. enum.auto()
  2804. ) # (= 1 << 7) # Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0).
  2805. # ImGuiWindowFlags_NoSavedSettings = 1 << 8, /* original C++ signature */
  2806. no_saved_settings = enum.auto() # (= 1 << 8) # Never load/save settings in .ini file
  2807. # ImGuiWindowFlags_NoMouseInputs = 1 << 9, /* original C++ signature */
  2808. no_mouse_inputs = enum.auto() # (= 1 << 9) # Disable catching mouse, hovering test with pass through.
  2809. # ImGuiWindowFlags_MenuBar = 1 << 10, /* original C++ signature */
  2810. menu_bar = enum.auto() # (= 1 << 10) # Has a menu-bar
  2811. # ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, /* original C++ signature */
  2812. horizontal_scrollbar = (
  2813. enum.auto()
  2814. ) # (= 1 << 11) # Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section.
  2815. # ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, /* original C++ signature */
  2816. no_focus_on_appearing = (
  2817. enum.auto()
  2818. ) # (= 1 << 12) # Disable taking focus when transitioning from hidden to visible state
  2819. # ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, /* original C++ signature */
  2820. no_bring_to_front_on_focus = (
  2821. enum.auto()
  2822. ) # (= 1 << 13) # Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
  2823. # ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, /* original C++ signature */
  2824. always_vertical_scrollbar = (
  2825. enum.auto()
  2826. ) # (= 1 << 14) # Always show vertical scrollbar (even if ContentSize.y < Size.y)
  2827. # ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, /* original C++ signature */
  2828. always_horizontal_scrollbar = (
  2829. enum.auto()
  2830. ) # (= 1<< 15) # Always show horizontal scrollbar (even if ContentSize.x < Size.x)
  2831. # ImGuiWindowFlags_NoNavInputs = 1 << 16, /* original C++ signature */
  2832. no_nav_inputs = enum.auto() # (= 1 << 16) # No keyboard/gamepad navigation within the window
  2833. # ImGuiWindowFlags_NoNavFocus = 1 << 17, /* original C++ signature */
  2834. no_nav_focus = (
  2835. enum.auto()
  2836. ) # (= 1 << 17) # No focusing toward this window with keyboard/gamepad navigation (e.g. skipped by Ctrl+Tab)
  2837. # ImGuiWindowFlags_UnsavedDocument = 1 << 18, /* original C++ signature */
  2838. unsaved_document = (
  2839. enum.auto()
  2840. ) # (= 1 << 18) # Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
  2841. # ImGuiWindowFlags_NoDocking = 1 << 19, /* original C++ signature */
  2842. no_docking = enum.auto() # (= 1 << 19) # Disable docking of this window
  2843. # ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, /* original C++ signature */
  2844. no_nav = enum.auto() # (= WindowFlags_NoNavInputs | WindowFlags_NoNavFocus)
  2845. # ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, /* original C++ signature */
  2846. no_decoration = (
  2847. enum.auto()
  2848. ) # (= WindowFlags_NoTitleBar | WindowFlags_NoResize | WindowFlags_NoScrollbar | WindowFlags_NoCollapse)
  2849. # ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, /* original C++ signature */
  2850. no_inputs = enum.auto() # (= WindowFlags_NoMouseInputs | WindowFlags_NoNavInputs | WindowFlags_NoNavFocus)
  2851. # [Internal]
  2852. # ImGuiWindowFlags_DockNodeHost = 1 << 23, /* original C++ signature */
  2853. dock_node_host = enum.auto() # (= 1 << 23) # Don't use! For internal use by Begin()/NewFrame()
  2854. # ImGuiWindowFlags_ChildWindow = 1 << 24, /* original C++ signature */
  2855. child_window = enum.auto() # (= 1 << 24) # Don't use! For internal use by BeginChild()
  2856. # ImGuiWindowFlags_Tooltip = 1 << 25, /* original C++ signature */
  2857. tooltip = enum.auto() # (= 1 << 25) # Don't use! For internal use by BeginTooltip()
  2858. # ImGuiWindowFlags_Popup = 1 << 26, /* original C++ signature */
  2859. popup = enum.auto() # (= 1 << 26) # Don't use! For internal use by BeginPopup()
  2860. # ImGuiWindowFlags_Modal = 1 << 27, /* original C++ signature */
  2861. modal = enum.auto() # (= 1 << 27) # Don't use! For internal use by BeginPopupModal()
  2862. # ImGuiWindowFlags_ChildMenu = 1 << 28, /* original C++ signature */
  2863. child_menu = enum.auto() # (= 1 << 28) # Don't use! For internal use by BeginMenu()
  2864. # Obsolete names
  2865. class ChildFlags_(enum.IntFlag):
  2866. """Flags for ImGui::BeginChild()
  2867. (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = False'.)
  2868. About using AutoResizeX/AutoResizeY flags:
  2869. - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints").
  2870. - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
  2871. - This allows BeginChild() to return False when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped.
  2872. While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch.
  2873. - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
  2874. HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.
  2875. """
  2876. # ImGuiChildFlags_None = 0, /* original C++ signature */
  2877. none = enum.auto() # (= 0)
  2878. # ImGuiChildFlags_Borders = 1 << 0, /* original C++ signature */
  2879. borders = (
  2880. enum.auto()
  2881. ) # (= 1 << 0) # Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == True for legacy reason)
  2882. # ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1, /* original C++ signature */
  2883. always_use_window_padding = (
  2884. enum.auto()
  2885. ) # (= 1 << 1) # Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)
  2886. # ImGuiChildFlags_ResizeX = 1 << 2, /* original C++ signature */
  2887. resize_x = (
  2888. enum.auto()
  2889. ) # (= 1 << 2) # Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
  2890. # ImGuiChildFlags_ResizeY = 1 << 3, /* original C++ signature */
  2891. resize_y = enum.auto() # (= 1 << 3) # Allow resize from bottom border (layout direction). "
  2892. # ImGuiChildFlags_AutoResizeX = 1 << 4, /* original C++ signature */
  2893. auto_resize_x = (
  2894. enum.auto()
  2895. ) # (= 1 << 4) # Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above.
  2896. # ImGuiChildFlags_AutoResizeY = 1 << 5, /* original C++ signature */
  2897. auto_resize_y = (
  2898. enum.auto()
  2899. ) # (= 1 << 5) # Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
  2900. # ImGuiChildFlags_AlwaysAutoResize = 1 << 6, /* original C++ signature */
  2901. always_auto_resize = (
  2902. enum.auto()
  2903. ) # (= 1 << 6) # Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return True, always disable clipping optimization! NOT RECOMMENDED.
  2904. # ImGuiChildFlags_FrameStyle = 1 << 7, /* original C++ signature */
  2905. frame_style = (
  2906. enum.auto()
  2907. ) # (= 1 << 7) # Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
  2908. # ImGuiChildFlags_NavFlattened = 1 << 8, /* original C++ signature */
  2909. nav_flattened = (
  2910. enum.auto()
  2911. ) # (= 1 << 8) # [BETA] Share focus scope, allow keyboard/gamepad navigation to cross over parent border to this child or between sibling child windows.
  2912. # Obsolete names
  2913. class ItemFlags_(enum.IntFlag):
  2914. """Flags for ImGui::PushItemFlag()
  2915. (Those are shared by all submitted items)
  2916. """
  2917. # ImGuiItemFlags_None = 0, /* original C++ signature */
  2918. none = enum.auto() # (= 0) # (Default)
  2919. # ImGuiItemFlags_NoTabStop = 1 << 0, /* original C++ signature */
  2920. no_tab_stop = (
  2921. enum.auto()
  2922. ) # (= 1 << 0) # False // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav.
  2923. # ImGuiItemFlags_NoNav = 1 << 1, /* original C++ signature */
  2924. no_nav = (
  2925. enum.auto()
  2926. ) # (= 1 << 1) # False // Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls).
  2927. # ImGuiItemFlags_NoNavDefaultFocus = 1 << 2, /* original C++ signature */
  2928. no_nav_default_focus = (
  2929. enum.auto()
  2930. ) # (= 1 << 2) # False // Disable item being a candidate for default focus (e.g. used by title bar items).
  2931. # ImGuiItemFlags_ButtonRepeat = 1 << 3, /* original C++ signature */
  2932. button_repeat = (
  2933. enum.auto()
  2934. ) # (= 1 << 3) # False // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held.
  2935. # ImGuiItemFlags_AutoClosePopups = 1 << 4, /* original C++ signature */
  2936. auto_close_popups = (
  2937. enum.auto()
  2938. ) # (= 1 << 4) # True // MenuItem()/Selectable() automatically close their parent popup window.
  2939. # ImGuiItemFlags_AllowDuplicateId = 1 << 5, /* original C++ signature */
  2940. allow_duplicate_id = (
  2941. enum.auto()
  2942. ) # (= 1 << 5) # False // Allow submitting an item with the same identifier as an item already submitted this frame without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set.
  2943. # ImGuiItemFlags_Disabled = 1 << 6, /* original C++ signature */
  2944. disabled = (
  2945. enum.auto()
  2946. ) # (= 1 << 6) # False // [Internal] Disable interactions. DOES NOT affect visuals. This is used by BeginDisabled()/EndDisabled() and only provided here so you can read back via GetItemFlags().
  2947. class InputTextFlags_(enum.IntFlag):
  2948. """Flags for ImGui::InputText()
  2949. (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive)
  2950. """
  2951. # Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter)
  2952. # ImGuiInputTextFlags_None = 0, /* original C++ signature */
  2953. none = enum.auto() # (= 0)
  2954. # ImGuiInputTextFlags_CharsDecimal = 1 << 0, /* original C++ signature */
  2955. chars_decimal = enum.auto() # (= 1 << 0) # Allow 0123456789.+-*/
  2956. # ImGuiInputTextFlags_CharsHexadecimal = 1 << 1, /* original C++ signature */
  2957. chars_hexadecimal = enum.auto() # (= 1 << 1) # Allow 0123456789ABCDEFabcdef
  2958. # ImGuiInputTextFlags_CharsScientific = 1 << 2, /* original C++ signature */
  2959. chars_scientific = enum.auto() # (= 1 << 2) # Allow 0123456789.+-*/eE (Scientific notation input)
  2960. # ImGuiInputTextFlags_CharsUppercase = 1 << 3, /* original C++ signature */
  2961. chars_uppercase = enum.auto() # (= 1 << 3) # Turn a..z into A..Z
  2962. # ImGuiInputTextFlags_CharsNoBlank = 1 << 4, /* original C++ signature */
  2963. chars_no_blank = enum.auto() # (= 1 << 4) # Filter out spaces, tabs
  2964. # Inputs
  2965. # ImGuiInputTextFlags_AllowTabInput = 1 << 5, /* original C++ signature */
  2966. allow_tab_input = enum.auto() # (= 1 << 5) # Pressing TAB input a '\t' character into the text field
  2967. # ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6, /* original C++ signature */
  2968. enter_returns_true = (
  2969. enum.auto()
  2970. ) # (= 1 << 6) # Return 'True' when Enter is pressed (as opposed to every time the value was modified). Consider using IsItemDeactivatedAfterEdit() instead!
  2971. # ImGuiInputTextFlags_EscapeClearsAll = 1 << 7, /* original C++ signature */
  2972. escape_clears_all = (
  2973. enum.auto()
  2974. ) # (= 1 << 7) # Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
  2975. # ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8, /* original C++ signature */
  2976. ctrl_enter_for_new_line = (
  2977. enum.auto()
  2978. ) # (= 1 << 8) # In multi-line mode: validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter). Note that Shift+Enter always enter a new line either way.
  2979. # Other options
  2980. # ImGuiInputTextFlags_ReadOnly = 1 << 9, /* original C++ signature */
  2981. read_only = enum.auto() # (= 1 << 9) # Read-only mode
  2982. # ImGuiInputTextFlags_Password = 1 << 10, /* original C++ signature */
  2983. password = enum.auto() # (= 1 << 10) # Password mode, display all characters as '*', disable copy
  2984. # ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11, /* original C++ signature */
  2985. always_overwrite = enum.auto() # (= 1 << 11) # Overwrite mode
  2986. # ImGuiInputTextFlags_AutoSelectAll = 1 << 12, /* original C++ signature */
  2987. auto_select_all = enum.auto() # (= 1 << 12) # Select entire text when first taking mouse focus
  2988. # ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13, /* original C++ signature */
  2989. parse_empty_ref_val = (
  2990. enum.auto()
  2991. ) # (= 1 << 13) # InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value.
  2992. # ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14, /* original C++ signature */
  2993. display_empty_ref_val = (
  2994. enum.auto()
  2995. ) # (= 1 << 14) # InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.
  2996. # ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15, /* original C++ signature */
  2997. no_horizontal_scroll = enum.auto() # (= 1 << 15) # Disable following the cursor horizontally
  2998. # ImGuiInputTextFlags_NoUndoRedo = 1 << 16, /* original C++ signature */
  2999. no_undo_redo = (
  3000. enum.auto()
  3001. ) # (= 1 << 16) # Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
  3002. # Elide display / Alignment
  3003. # ImGuiInputTextFlags_ElideLeft = 1 << 17, /* original C++ signature */
  3004. elide_left = (
  3005. enum.auto()
  3006. ) # (= 1 << 17) # When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only!
  3007. # Callback features
  3008. # ImGuiInputTextFlags_CallbackCompletion = 1 << 18, /* original C++ signature */
  3009. callback_completion = enum.auto() # (= 1 << 18) # Callback on pressing TAB (for completion handling)
  3010. # ImGuiInputTextFlags_CallbackHistory = 1 << 19, /* original C++ signature */
  3011. callback_history = enum.auto() # (= 1 << 19) # Callback on pressing Up/Down arrows (for history handling)
  3012. # ImGuiInputTextFlags_CallbackAlways = 1 << 20, /* original C++ signature */
  3013. callback_always = (
  3014. enum.auto()
  3015. ) # (= 1 << 20) # Callback on each iteration. User code may query cursor position, modify text buffer.
  3016. # ImGuiInputTextFlags_CallbackCharFilter = 1 << 21, /* original C++ signature */
  3017. callback_char_filter = (
  3018. enum.auto()
  3019. ) # (= 1 << 21) # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
  3020. # ImGuiInputTextFlags_CallbackResize = 1 << 22, /* original C++ signature */
  3021. callback_resize = (
  3022. enum.auto()
  3023. ) # (= 1 << 22) # Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this)
  3024. # ImGuiInputTextFlags_CallbackEdit = 1 << 23, /* original C++ signature */
  3025. callback_edit = (
  3026. enum.auto()
  3027. ) # (= 1 << 23) # Callback on any edit. Note that InputText() already returns True on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active.
  3028. # Multi-line Word-Wrapping [BETA]
  3029. # - Not well tested yet. Please report any incorrect cursor movement, selection behavior etc. bug to https://github.com/ocornut/imgui/issues/3237.
  3030. # - Wrapping style is not ideal. Wrapping of long words/sections (e.g. words larger than total available width) may be particularly unpleasing.
  3031. # - Wrapping width needs to always account for the possibility of a vertical scrollbar.
  3032. # - It is much slower than regular text fields.
  3033. # Ballpark estimate of cost on my 2019 desktop PC: for a 100 KB text buffer: +~0.3 ms (Optimized) / +~1.0 ms (Debug build).
  3034. # The CPU cost is very roughly proportional to text length, so a 10 KB buffer should cost about ten times less.
  3035. # ImGuiInputTextFlags_WordWrap = 1 << 24, /* original C++ signature */
  3036. word_wrap = enum.auto() # (= 1 << 24) # InputTextMultiline(): word-wrap lines that are too long.
  3037. # Obsolete names
  3038. # ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite // [renamed in 1.82] name was not matching behavior
  3039. class TreeNodeFlags_(enum.IntFlag):
  3040. """Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*()"""
  3041. # ImGuiTreeNodeFlags_None = 0, /* original C++ signature */
  3042. none = enum.auto() # (= 0)
  3043. # ImGuiTreeNodeFlags_Selected = 1 << 0, /* original C++ signature */
  3044. selected = enum.auto() # (= 1 << 0) # Draw as selected
  3045. # ImGuiTreeNodeFlags_Framed = 1 << 1, /* original C++ signature */
  3046. framed = enum.auto() # (= 1 << 1) # Draw frame with background (e.g. for CollapsingHeader)
  3047. # ImGuiTreeNodeFlags_AllowOverlap = 1 << 2, /* original C++ signature */
  3048. allow_overlap = (
  3049. enum.auto()
  3050. ) # (= 1 << 2) # Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
  3051. # ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3, /* original C++ signature */
  3052. no_tree_push_on_open = (
  3053. enum.auto()
  3054. ) # (= 1 << 3) # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
  3055. # ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4, /* original C++ signature */
  3056. no_auto_open_on_log = (
  3057. enum.auto()
  3058. ) # (= 1 << 4) # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
  3059. # ImGuiTreeNodeFlags_DefaultOpen = 1 << 5, /* original C++ signature */
  3060. default_open = enum.auto() # (= 1 << 5) # Default node to be open
  3061. # ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6, /* original C++ signature */
  3062. open_on_double_click = (
  3063. enum.auto()
  3064. ) # (= 1 << 6) # Open on double-click instead of simple click (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
  3065. # ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7, /* original C++ signature */
  3066. open_on_arrow = (
  3067. enum.auto()
  3068. ) # (= 1 << 7) # Open when clicking on the arrow part (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
  3069. # ImGuiTreeNodeFlags_Leaf = 1 << 8, /* original C++ signature */
  3070. leaf = (
  3071. enum.auto()
  3072. ) # (= 1 << 8) # No collapsing, no arrow (use as a convenience for leaf nodes). Note: will always open a tree/id scope and return True. If you never use that scope, add ImGuiTreeNodeFlags_NoTreePushOnOpen.
  3073. # ImGuiTreeNodeFlags_Bullet = 1 << 9, /* original C++ signature */
  3074. bullet = (
  3075. enum.auto()
  3076. ) # (= 1 << 9) # Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the _Leaf flag!
  3077. # ImGuiTreeNodeFlags_FramePadding = 1 << 10, /* original C++ signature */
  3078. frame_padding = (
  3079. enum.auto()
  3080. ) # (= 1 << 10) # Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding() before the node.
  3081. # ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, /* original C++ signature */
  3082. span_avail_width = (
  3083. enum.auto()
  3084. ) # (= 1 << 11) # Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line without using AllowOverlap mode.
  3085. # ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, /* original C++ signature */
  3086. span_full_width = (
  3087. enum.auto()
  3088. ) # (= 1 << 12) # Extend hit box to the left-most and right-most edges (cover the indent area).
  3089. # ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13, /* original C++ signature */
  3090. span_label_width = (
  3091. enum.auto()
  3092. ) # (= 1 << 13) # Narrow hit box + narrow hovering highlight, will only cover the label text.
  3093. # ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14, /* original C++ signature */
  3094. span_all_columns = (
  3095. enum.auto()
  3096. ) # (= 1 << 14) # Frame will span all columns of its container table (label will still fit in current column)
  3097. # ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15, /* original C++ signature */
  3098. label_span_all_columns = enum.auto() # (= 1 << 15) # Label will span all columns of its container table
  3099. # ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 16, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
  3100. # ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17, /* original C++ signature */
  3101. nav_left_jumps_to_parent = (
  3102. enum.auto()
  3103. ) # (= 1 << 17) # Nav: left arrow moves back to parent. This is processed in TreePop() when there's an unfulfilled Left nav request remaining.
  3104. # ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog, /* original C++ signature */
  3105. collapsing_header = (
  3106. enum.auto()
  3107. ) # (= TreeNodeFlags_Framed | TreeNodeFlags_NoTreePushOnOpen | TreeNodeFlags_NoAutoOpenOnLog)
  3108. # [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920.
  3109. # Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls.
  3110. # ImGuiTreeNodeFlags_DrawLinesNone = 1 << 18, /* original C++ signature */
  3111. draw_lines_none = enum.auto() # (= 1 << 18) # No lines drawn
  3112. # ImGuiTreeNodeFlags_DrawLinesFull = 1 << 19, /* original C++ signature */
  3113. draw_lines_full = (
  3114. enum.auto()
  3115. ) # (= 1 << 19) # Horizontal lines to child nodes. Vertical line drawn down to TreePop() position: cover full contents. Faster (for large trees).
  3116. # ImGuiTreeNodeFlags_DrawLinesToNodes = 1 << 20, /* original C++ signature */
  3117. draw_lines_to_nodes = (
  3118. enum.auto()
  3119. ) # (= 1 << 20) # Horizontal lines to child nodes. Vertical line drawn down to bottom-most child node. Slower (for large trees).
  3120. class PopupFlags_(enum.IntFlag):
  3121. """Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.
  3122. - IMPORTANT: If you ever used the left mouse button with BeginPopupContextXXX() helpers before 1.92.6: Read "API BREAKING CHANGES" 2026/01/07 (1.92.6) entry in imgui.cpp or GitHub topic #9157.
  3123. - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later).
  3124. """
  3125. # ImGuiPopupFlags_None = 0, /* original C++ signature */
  3126. none = enum.auto() # (= 0)
  3127. # ImGuiPopupFlags_MouseButtonLeft = 1 << 2, /* original C++ signature */
  3128. mouse_button_left = (
  3129. enum.auto()
  3130. ) # (= 1 << 2) # For BeginPopupContext*(): open on Left Mouse release. Only one button allowed!
  3131. # ImGuiPopupFlags_MouseButtonRight = 2 << 2, /* original C++ signature */
  3132. mouse_button_right = (
  3133. enum.auto()
  3134. ) # (= 2 << 2) # For BeginPopupContext*(): open on Right Mouse release. Only one button allowed! (default)
  3135. # ImGuiPopupFlags_MouseButtonMiddle = 3 << 2, /* original C++ signature */
  3136. mouse_button_middle = (
  3137. enum.auto()
  3138. ) # (= 3 << 2) # For BeginPopupContext*(): open on Middle Mouse release. Only one button allowed!
  3139. # ImGuiPopupFlags_NoReopen = 1 << 5, /* original C++ signature */
  3140. no_reopen = (
  3141. enum.auto()
  3142. ) # (= 1 << 5) # For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't reinitialize navigation)
  3143. # ImGuiPopupFlags_NoReopenAlwaysNavInit = 1 << 6, // For OpenPopup*(), BeginPopupContext*(): focus and initialize navigation even when not reopening.
  3144. # ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7, /* original C++ signature */
  3145. no_open_over_existing_popup = (
  3146. enum.auto()
  3147. ) # (= 1 << 7) # For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack
  3148. # ImGuiPopupFlags_NoOpenOverItems = 1 << 8, /* original C++ signature */
  3149. no_open_over_items = (
  3150. enum.auto()
  3151. ) # (= 1 << 8) # For BeginPopupContextWindow(): don't return True when hovering items, only when hovering empty space
  3152. # ImGuiPopupFlags_AnyPopupId = 1 << 10, /* original C++ signature */
  3153. any_popup_id = enum.auto() # (= 1 << 10) # For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup.
  3154. # ImGuiPopupFlags_AnyPopupLevel = 1 << 11, /* original C++ signature */
  3155. any_popup_level = (
  3156. enum.auto()
  3157. ) # (= 1 << 11) # For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level)
  3158. # ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel, /* original C++ signature */
  3159. any_popup = enum.auto() # (= PopupFlags_AnyPopupId | PopupFlags_AnyPopupLevel)
  3160. # ImGuiPopupFlags_MouseButtonShift_ = 2, /* original C++ signature */
  3161. mouse_button_shift_ = enum.auto() # (= 2) # [Internal]
  3162. # ImGuiPopupFlags_MouseButtonMask_ = 0x0C, /* original C++ signature */
  3163. mouse_button_mask_ = enum.auto() # (= 0x0C) # [Internal]
  3164. # ImGuiPopupFlags_InvalidMask_ = 0x03, /* original C++ signature */
  3165. invalid_mask_ = (
  3166. enum.auto()
  3167. ) # (= 0x03) # [Internal] Reserve legacy bits 0-1 to detect incorrectly passing 1 or 2 to the function.
  3168. class SelectableFlags_(enum.IntFlag):
  3169. """Flags for ImGui::Selectable()"""
  3170. # ImGuiSelectableFlags_None = 0, /* original C++ signature */
  3171. none = enum.auto() # (= 0)
  3172. # ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0, /* original C++ signature */
  3173. no_auto_close_popups = (
  3174. enum.auto()
  3175. ) # (= 1 << 0) # Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups)
  3176. # ImGuiSelectableFlags_SpanAllColumns = 1 << 1, /* original C++ signature */
  3177. span_all_columns = (
  3178. enum.auto()
  3179. ) # (= 1 << 1) # Frame will span all columns of its container table (text will still fit in current column)
  3180. # ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, /* original C++ signature */
  3181. allow_double_click = enum.auto() # (= 1 << 2) # Generate press events on double clicks too
  3182. # ImGuiSelectableFlags_Disabled = 1 << 3, /* original C++ signature */
  3183. disabled = enum.auto() # (= 1 << 3) # Cannot be selected, display grayed out text
  3184. # ImGuiSelectableFlags_AllowOverlap = 1 << 4, /* original C++ signature */
  3185. allow_overlap = (
  3186. enum.auto()
  3187. ) # (= 1 << 4) # Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
  3188. # ImGuiSelectableFlags_Highlight = 1 << 5, /* original C++ signature */
  3189. highlight = enum.auto() # (= 1 << 5) # Make the item be displayed as if it is hovered
  3190. # ImGuiSelectableFlags_SelectOnNav = 1 << 6, /* original C++ signature */
  3191. select_on_nav = (
  3192. enum.auto()
  3193. ) # (= 1 << 6) # Auto-select when moved into, unless Ctrl is held. Automatic when in a BeginMultiSelect() block.
  3194. class ComboFlags_(enum.IntFlag):
  3195. """Flags for ImGui::BeginCombo()"""
  3196. # ImGuiComboFlags_None = 0, /* original C++ signature */
  3197. none = enum.auto() # (= 0)
  3198. # ImGuiComboFlags_PopupAlignLeft = 1 << 0, /* original C++ signature */
  3199. popup_align_left = enum.auto() # (= 1 << 0) # Align the popup toward the left by default
  3200. # ImGuiComboFlags_HeightSmall = 1 << 1, /* original C++ signature */
  3201. height_small = (
  3202. enum.auto()
  3203. ) # (= 1 << 1) # Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()
  3204. # ImGuiComboFlags_HeightRegular = 1 << 2, /* original C++ signature */
  3205. height_regular = enum.auto() # (= 1 << 2) # Max ~8 items visible (default)
  3206. # ImGuiComboFlags_HeightLarge = 1 << 3, /* original C++ signature */
  3207. height_large = enum.auto() # (= 1 << 3) # Max ~20 items visible
  3208. # ImGuiComboFlags_HeightLargest = 1 << 4, /* original C++ signature */
  3209. height_largest = enum.auto() # (= 1 << 4) # As many fitting items as possible
  3210. # ImGuiComboFlags_NoArrowButton = 1 << 5, /* original C++ signature */
  3211. no_arrow_button = enum.auto() # (= 1 << 5) # Display on the preview box without the square arrow button
  3212. # ImGuiComboFlags_NoPreview = 1 << 6, /* original C++ signature */
  3213. no_preview = enum.auto() # (= 1 << 6) # Display only a square arrow button
  3214. # ImGuiComboFlags_WidthFitPreview = 1 << 7, /* original C++ signature */
  3215. width_fit_preview = enum.auto() # (= 1 << 7) # Width dynamically calculated from preview contents
  3216. # ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest, /* original C++ signature */
  3217. # }
  3218. height_mask_ = (
  3219. enum.auto()
  3220. ) # (= ComboFlags_HeightSmall | ComboFlags_HeightRegular | ComboFlags_HeightLarge | ComboFlags_HeightLargest)
  3221. class TabBarFlags_(enum.IntFlag):
  3222. """Flags for ImGui::BeginTabBar()"""
  3223. # ImGuiTabBarFlags_None = 0, /* original C++ signature */
  3224. none = enum.auto() # (= 0)
  3225. # ImGuiTabBarFlags_Reorderable = 1 << 0, /* original C++ signature */
  3226. reorderable = (
  3227. enum.auto()
  3228. ) # (= 1 << 0) # Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
  3229. # ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1, /* original C++ signature */
  3230. auto_select_new_tabs = enum.auto() # (= 1 << 1) # Automatically select new tabs when they appear
  3231. # ImGuiTabBarFlags_TabListPopupButton = 1 << 2, /* original C++ signature */
  3232. tab_list_popup_button = enum.auto() # (= 1 << 2) # Disable buttons to open the tab list popup
  3233. # ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, /* original C++ signature */
  3234. no_close_with_middle_mouse_button = (
  3235. enum.auto()
  3236. ) # (= 1 << 3) # Disable behavior of closing tabs (that are submitted with p_open != None) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = False.
  3237. # ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, /* original C++ signature */
  3238. no_tab_list_scrolling_buttons = (
  3239. enum.auto()
  3240. ) # (= 1 << 4) # Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
  3241. # ImGuiTabBarFlags_NoTooltip = 1 << 5, /* original C++ signature */
  3242. no_tooltip = enum.auto() # (= 1 << 5) # Disable tooltips when hovering a tab
  3243. # ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6, /* original C++ signature */
  3244. draw_selected_overline = enum.auto() # (= 1 << 6) # Draw selected overline markers over selected tab
  3245. # Fitting/Resize policy
  3246. # ImGuiTabBarFlags_FittingPolicyMixed = 1 << 7, /* original C++ signature */
  3247. fitting_policy_mixed = (
  3248. enum.auto()
  3249. ) # (= 1 << 7) # Shrink down tabs when they don't fit, until width is style.TabMinWidthShrink, then enable scrolling. Setting TabMinWidthShrink to FLT_MAX makes this behave like ImGuiTabBarFlags_FittingPolicyScroll.
  3250. # ImGuiTabBarFlags_FittingPolicyShrink = 1 << 8, /* original C++ signature */
  3251. fitting_policy_shrink = enum.auto() # (= 1 << 8) # Shrink down tabs when they don't fit
  3252. # ImGuiTabBarFlags_FittingPolicyScroll = 1 << 9, /* original C++ signature */
  3253. fitting_policy_scroll = enum.auto() # (= 1 << 9) # Enable scrolling buttons when tabs don't fit
  3254. # ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyMixed | ImGuiTabBarFlags_FittingPolicyShrink | ImGuiTabBarFlags_FittingPolicyScroll, /* original C++ signature */
  3255. fitting_policy_mask_ = (
  3256. enum.auto()
  3257. ) # (= TabBarFlags_FittingPolicyMixed | TabBarFlags_FittingPolicyShrink | TabBarFlags_FittingPolicyScroll)
  3258. # ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyMixed, /* original C++ signature */
  3259. fitting_policy_default_ = enum.auto() # (= TabBarFlags_FittingPolicyMixed)
  3260. class TabItemFlags_(enum.IntFlag):
  3261. """Flags for ImGui::BeginTabItem()"""
  3262. # ImGuiTabItemFlags_None = 0, /* original C++ signature */
  3263. none = enum.auto() # (= 0)
  3264. # ImGuiTabItemFlags_UnsavedDocument = 1 << 0, /* original C++ signature */
  3265. unsaved_document = (
  3266. enum.auto()
  3267. ) # (= 1 << 0) # Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure.
  3268. # ImGuiTabItemFlags_SetSelected = 1 << 1, /* original C++ signature */
  3269. set_selected = (
  3270. enum.auto()
  3271. ) # (= 1 << 1) # Trigger flag to programmatically make the tab selected when calling BeginTabItem()
  3272. # ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, /* original C++ signature */
  3273. no_close_with_middle_mouse_button = (
  3274. enum.auto()
  3275. ) # (= 1 << 2) # Disable behavior of closing tabs (that are submitted with p_open != None) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = False.
  3276. # ImGuiTabItemFlags_NoPushId = 1 << 3, /* original C++ signature */
  3277. no_push_id = enum.auto() # (= 1 << 3) # Don't call PushID()/PopID() on BeginTabItem()/EndTabItem()
  3278. # ImGuiTabItemFlags_NoTooltip = 1 << 4, /* original C++ signature */
  3279. no_tooltip = enum.auto() # (= 1 << 4) # Disable tooltip for the given tab
  3280. # ImGuiTabItemFlags_NoReorder = 1 << 5, /* original C++ signature */
  3281. no_reorder = enum.auto() # (= 1 << 5) # Disable reordering this tab or having another tab cross over this tab
  3282. # ImGuiTabItemFlags_Leading = 1 << 6, /* original C++ signature */
  3283. leading = (
  3284. enum.auto()
  3285. ) # (= 1 << 6) # Enforce the tab position to the left of the tab bar (after the tab list popup button)
  3286. # ImGuiTabItemFlags_Trailing = 1 << 7, /* original C++ signature */
  3287. trailing = (
  3288. enum.auto()
  3289. ) # (= 1 << 7) # Enforce the tab position to the right of the tab bar (before the scrolling buttons)
  3290. # ImGuiTabItemFlags_NoAssumedClosure = 1 << 8, /* original C++ signature */
  3291. no_assumed_closure = (
  3292. enum.auto()
  3293. ) # (= 1 << 8) # Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
  3294. class FocusedFlags_(enum.IntFlag):
  3295. """Flags for ImGui::IsWindowFocused()"""
  3296. # ImGuiFocusedFlags_None = 0, /* original C++ signature */
  3297. none = enum.auto() # (= 0)
  3298. # ImGuiFocusedFlags_ChildWindows = 1 << 0, /* original C++ signature */
  3299. child_windows = enum.auto() # (= 1 << 0) # Return True if any children of the window is focused
  3300. # ImGuiFocusedFlags_RootWindow = 1 << 1, /* original C++ signature */
  3301. root_window = enum.auto() # (= 1 << 1) # Test from root window (top most parent of the current hierarchy)
  3302. # ImGuiFocusedFlags_AnyWindow = 1 << 2, /* original C++ signature */
  3303. any_window = (
  3304. enum.auto()
  3305. ) # (= 1 << 2) # Return True if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
  3306. # ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3, /* original C++ signature */
  3307. no_popup_hierarchy = (
  3308. enum.auto()
  3309. ) # (= 1 << 3) # Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
  3310. # ImGuiFocusedFlags_DockHierarchy = 1 << 4, /* original C++ signature */
  3311. dock_hierarchy = (
  3312. enum.auto()
  3313. ) # (= 1 << 4) # Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
  3314. # ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows, /* original C++ signature */
  3315. # }
  3316. root_and_child_windows = enum.auto() # (= FocusedFlags_RootWindow | FocusedFlags_ChildWindows)
  3317. class HoveredFlags_(enum.IntFlag):
  3318. """Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered()
  3319. Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ!
  3320. Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls.
  3321. """
  3322. # ImGuiHoveredFlags_None = 0, /* original C++ signature */
  3323. none = (
  3324. enum.auto()
  3325. ) # (= 0) # Return True if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them.
  3326. # ImGuiHoveredFlags_ChildWindows = 1 << 0, /* original C++ signature */
  3327. child_windows = (
  3328. enum.auto()
  3329. ) # (= 1 << 0) # IsWindowHovered() only: Return True if any children of the window is hovered
  3330. # ImGuiHoveredFlags_RootWindow = 1 << 1, /* original C++ signature */
  3331. root_window = (
  3332. enum.auto()
  3333. ) # (= 1 << 1) # IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)
  3334. # ImGuiHoveredFlags_AnyWindow = 1 << 2, /* original C++ signature */
  3335. any_window = enum.auto() # (= 1 << 2) # IsWindowHovered() only: Return True if any window is hovered
  3336. # ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3, /* original C++ signature */
  3337. no_popup_hierarchy = (
  3338. enum.auto()
  3339. ) # (= 1 << 3) # IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
  3340. # ImGuiHoveredFlags_DockHierarchy = 1 << 4, /* original C++ signature */
  3341. dock_hierarchy = (
  3342. enum.auto()
  3343. ) # (= 1 << 4) # IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
  3344. # ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5, /* original C++ signature */
  3345. allow_when_blocked_by_popup = (
  3346. enum.auto()
  3347. ) # (= 1 << 5) # Return True even if a popup window is normally blocking access to this item/window
  3348. # ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 6, // Return True even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
  3349. # ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7, /* original C++ signature */
  3350. allow_when_blocked_by_active_item = (
  3351. enum.auto()
  3352. ) # (= 1 << 7) # Return True even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
  3353. # ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8, /* original C++ signature */
  3354. allow_when_overlapped_by_item = (
  3355. enum.auto()
  3356. ) # (= 1 << 8) # IsItemHovered() only: Return True even if the item uses AllowOverlap mode and is overlapped by another hoverable item.
  3357. # ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9, /* original C++ signature */
  3358. allow_when_overlapped_by_window = (
  3359. enum.auto()
  3360. ) # (= 1 << 9) # IsItemHovered() only: Return True even if the position is obstructed or overlapped by another window.
  3361. # ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10, /* original C++ signature */
  3362. allow_when_disabled = enum.auto() # (= 1 << 10) # IsItemHovered() only: Return True even if the item is disabled
  3363. # ImGuiHoveredFlags_NoNavOverride = 1 << 11, /* original C++ signature */
  3364. no_nav_override = (
  3365. enum.auto()
  3366. ) # (= 1 << 11) # IsItemHovered() only: Disable using keyboard/gamepad navigation state when active, always query mouse
  3367. # ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow, /* original C++ signature */
  3368. allow_when_overlapped = (
  3369. enum.auto()
  3370. ) # (= HoveredFlags_AllowWhenOverlappedByItem | HoveredFlags_AllowWhenOverlappedByWindow)
  3371. # ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped, /* original C++ signature */
  3372. rect_only = (
  3373. enum.auto()
  3374. ) # (= HoveredFlags_AllowWhenBlockedByPopup | HoveredFlags_AllowWhenBlockedByActiveItem | HoveredFlags_AllowWhenOverlapped)
  3375. # ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows, /* original C++ signature */
  3376. root_and_child_windows = enum.auto() # (= HoveredFlags_RootWindow | HoveredFlags_ChildWindows)
  3377. # Tooltips mode
  3378. # - typically used in IsItemHovered() + SetTooltip() sequence.
  3379. # - this is a shortcut to pull flags from 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' where you can reconfigure desired behavior.
  3380. # e.g. 'HoverFlagsForTooltipMouse' defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_AllowWhenDisabled'.
  3381. # - for frequently actioned or hovered items providing a tooltip, you want may to use ImGuiHoveredFlags_ForTooltip (stationary + delay) so the tooltip doesn't show too often.
  3382. # - for items which main purpose is to be hovered, or items with low affordance, or in less consistent apps, prefer no delay or shorter delay.
  3383. # ImGuiHoveredFlags_ForTooltip = 1 << 12, /* original C++ signature */
  3384. for_tooltip = (
  3385. enum.auto()
  3386. ) # (= 1 << 12) # Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence.
  3387. # (Advanced) Mouse Hovering delays.
  3388. # - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags.
  3389. # - use those if you need specific overrides.
  3390. # ImGuiHoveredFlags_Stationary = 1 << 13, /* original C++ signature */
  3391. stationary = (
  3392. enum.auto()
  3393. ) # (= 1 << 13) # Require mouse to be stationary for style.HoverStationaryDelay (~0.15 sec) _at least one time_. After this, can move on same item/window. Using the stationary test tends to reduces the need for a long delay.
  3394. # ImGuiHoveredFlags_DelayNone = 1 << 14, /* original C++ signature */
  3395. delay_none = (
  3396. enum.auto()
  3397. ) # (= 1 << 14) # IsItemHovered() only: Return True immediately (default). As this is the default you generally ignore this.
  3398. # ImGuiHoveredFlags_DelayShort = 1 << 15, /* original C++ signature */
  3399. delay_short = (
  3400. enum.auto()
  3401. ) # (= 1 << 15) # IsItemHovered() only: Return True after style.HoverDelayShort elapsed (~0.15 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
  3402. # ImGuiHoveredFlags_DelayNormal = 1 << 16, /* original C++ signature */
  3403. delay_normal = (
  3404. enum.auto()
  3405. ) # (= 1 << 16) # IsItemHovered() only: Return True after style.HoverDelayNormal elapsed (~0.40 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
  3406. # ImGuiHoveredFlags_NoSharedDelay = 1 << 17, /* original C++ signature */
  3407. no_shared_delay = (
  3408. enum.auto()
  3409. ) # (= 1 << 17) # IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the previous timer for a short time (standard for tooltips with long delays)
  3410. class DockNodeFlags_(enum.IntFlag):
  3411. """Flags for ImGui::DockSpace(), shared/inherited by child nodes.
  3412. (Some flags can be applied to individual nodes directly)
  3413. FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api.
  3414. """
  3415. # ImGuiDockNodeFlags_None = 0, /* original C++ signature */
  3416. none = enum.auto() # (= 0)
  3417. # ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0, /* original C++ signature */
  3418. keep_alive_only = (
  3419. enum.auto()
  3420. ) # (= 1 << 0) # // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
  3421. # ImGuiDockNodeFlags_NoCentralNode = 1 << 1, // // Disable Central Node (the node which can stay empty)
  3422. # ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2, /* original C++ signature */
  3423. no_docking_over_central_node = (
  3424. enum.auto()
  3425. ) # (= 1 << 2) # // Disable docking over the Central Node, which will be always kept empty.
  3426. # ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3, /* original C++ signature */
  3427. passthru_central_node = (
  3428. enum.auto()
  3429. ) # (= 1 << 3) # // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
  3430. # ImGuiDockNodeFlags_NoDockingSplit = 1 << 4, /* original C++ signature */
  3431. no_docking_split = enum.auto() # (= 1 << 4) # // Disable other windows/nodes from splitting this node.
  3432. # ImGuiDockNodeFlags_NoResize = 1 << 5, /* original C++ signature */
  3433. no_resize = (
  3434. enum.auto()
  3435. ) # (= 1 << 5) # Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
  3436. # ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6, /* original C++ signature */
  3437. auto_hide_tab_bar = (
  3438. enum.auto()
  3439. ) # (= 1 << 6) # // Tab bar will automatically hide when there is a single window in the dock node.
  3440. # ImGuiDockNodeFlags_NoUndocking = 1 << 7, /* original C++ signature */
  3441. no_undocking = enum.auto() # (= 1 << 7) # // Disable undocking this node.
  3442. class DragDropFlags_(enum.IntFlag):
  3443. """Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()"""
  3444. # ImGuiDragDropFlags_None = 0, /* original C++ signature */
  3445. none = enum.auto() # (= 0)
  3446. # BeginDragDropSource() flags
  3447. # ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0, /* original C++ signature */
  3448. source_no_preview_tooltip = (
  3449. enum.auto()
  3450. ) # (= 1 << 0) # Disable preview tooltip. By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disables this behavior.
  3451. # ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1, /* original C++ signature */
  3452. source_no_disable_hover = (
  3453. enum.auto()
  3454. ) # (= 1 << 1) # By default, when dragging we clear data so that IsItemHovered() will return False, to avoid subsequent user code submitting tooltips. This flag disables this behavior so you can still call IsItemHovered() on the source item.
  3455. # ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2, /* original C++ signature */
  3456. source_no_hold_to_open_others = (
  3457. enum.auto()
  3458. ) # (= 1 << 2) # Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item.
  3459. # ImGuiDragDropFlags_SourceAllowNullID = 1 << 3, /* original C++ signature */
  3460. source_allow_null_id = (
  3461. enum.auto()
  3462. ) # (= 1 << 3) # Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit.
  3463. # ImGuiDragDropFlags_SourceExtern = 1 << 4, /* original C++ signature */
  3464. source_extern = (
  3465. enum.auto()
  3466. ) # (= 1 << 4) # External source (from outside of dear imgui), won't attempt to read current item/window info. Will always return True. Only one Extern source can be active simultaneously.
  3467. # ImGuiDragDropFlags_PayloadAutoExpire = 1 << 5, /* original C++ signature */
  3468. payload_auto_expire = (
  3469. enum.auto()
  3470. ) # (= 1 << 5) # Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged)
  3471. # ImGuiDragDropFlags_PayloadNoCrossContext = 1 << 6, /* original C++ signature */
  3472. payload_no_cross_context = (
  3473. enum.auto()
  3474. ) # (= 1 << 6) # Hint to specify that the payload may not be copied outside current dear imgui context.
  3475. # ImGuiDragDropFlags_PayloadNoCrossProcess = 1 << 7, /* original C++ signature */
  3476. payload_no_cross_process = (
  3477. enum.auto()
  3478. ) # (= 1 << 7) # Hint to specify that the payload may not be copied outside current process.
  3479. # AcceptDragDropPayload() flags
  3480. # ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10, /* original C++ signature */
  3481. accept_before_delivery = (
  3482. enum.auto()
  3483. ) # (= 1 << 10) # AcceptDragDropPayload() will returns True even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered.
  3484. # ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11, /* original C++ signature */
  3485. accept_no_draw_default_rect = (
  3486. enum.auto()
  3487. ) # (= 1 << 11) # Do not draw the default highlight rectangle when hovering over target.
  3488. # ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12, /* original C++ signature */
  3489. accept_no_preview_tooltip = (
  3490. enum.auto()
  3491. ) # (= 1 << 12) # Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site.
  3492. # ImGuiDragDropFlags_AcceptDrawAsHovered = 1 << 13, /* original C++ signature */
  3493. accept_draw_as_hovered = (
  3494. enum.auto()
  3495. ) # (= 1 << 13) # Accepting item will render as if hovered. Useful for e.g. a Button() used as a drop target.
  3496. # ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect, /* original C++ signature */
  3497. accept_peek_only = (
  3498. enum.auto()
  3499. ) # (= DragDropFlags_AcceptBeforeDelivery | DragDropFlags_AcceptNoDrawDefaultRect) # For peeking ahead and inspecting the payload before delivery.
  3500. # Standard Drag and Drop payload types. You can define you own payload types using short strings. Types starting with '_' are defined by Dear ImGui.
  3501. class DataType_(enum.IntFlag):
  3502. """A primary data type"""
  3503. # ImGuiDataType_S8, /* original C++ signature */
  3504. s8 = enum.auto() # (= 0) # signed char / char (with sensible compilers)
  3505. # ImGuiDataType_U8, /* original C++ signature */
  3506. u8 = enum.auto() # (= 1) # uchar
  3507. # ImGuiDataType_S16, /* original C++ signature */
  3508. s16 = enum.auto() # (= 2) # short
  3509. # ImGuiDataType_U16, /* original C++ signature */
  3510. u16 = enum.auto() # (= 3) # unsigned short
  3511. # ImGuiDataType_S32, /* original C++ signature */
  3512. s32 = enum.auto() # (= 4) # int
  3513. # ImGuiDataType_U32, /* original C++ signature */
  3514. u32 = enum.auto() # (= 5) # unsigned int
  3515. # ImGuiDataType_S64, /* original C++ signature */
  3516. s64 = enum.auto() # (= 6) # long long / __int64
  3517. # ImGuiDataType_U64, /* original C++ signature */
  3518. u64 = enum.auto() # (= 7) # unsigned long long / unsigned __int64
  3519. # ImGuiDataType_Float, /* original C++ signature */
  3520. float = enum.auto() # (= 8) # float
  3521. # ImGuiDataType_Double, /* original C++ signature */
  3522. double = enum.auto() # (= 9) # double
  3523. # ImGuiDataType_Bool, /* original C++ signature */
  3524. bool = enum.auto() # (= 10) # bool (provided for user convenience, not supported by scalar widgets)
  3525. # ImGuiDataType_String, /* original C++ signature */
  3526. string = enum.auto() # (= 11) # char* (provided for user convenience, not supported by scalar widgets)
  3527. # ImGuiDataType_COUNT /* original C++ signature */
  3528. # }
  3529. count = enum.auto() # (= 12)
  3530. class Dir(enum.IntFlag):
  3531. """A cardinal direction"""
  3532. # ImGuiDir_None = -1, /* original C++ signature */
  3533. none = enum.auto() # (= -1)
  3534. # ImGuiDir_Left = 0, /* original C++ signature */
  3535. left = enum.auto() # (= 0)
  3536. # ImGuiDir_Right = 1, /* original C++ signature */
  3537. right = enum.auto() # (= 1)
  3538. # ImGuiDir_Up = 2, /* original C++ signature */
  3539. up = enum.auto() # (= 2)
  3540. # ImGuiDir_Down = 3, /* original C++ signature */
  3541. down = enum.auto() # (= 3)
  3542. # ImGuiDir_COUNT /* original C++ signature */
  3543. # }
  3544. count = enum.auto() # (= 4)
  3545. class SortDirection(enum.IntFlag):
  3546. """A sorting direction"""
  3547. # ImGuiSortDirection_None = 0, /* original C++ signature */
  3548. none = enum.auto() # (= 0)
  3549. # ImGuiSortDirection_Ascending = 1, /* original C++ signature */
  3550. ascending = enum.auto() # (= 1) # Ascending = 0->9, A->Z etc.
  3551. # ImGuiSortDirection_Descending = 2 /* original C++ signature */
  3552. descending = enum.auto() # (= 2) # Descending = 9->0, Z->A etc.
  3553. class Key(enum.IntFlag):
  3554. """A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
  3555. All our named keys are >= 512. Keys value 0 to 511 are left unused and were legacy native/opaque key values (< 1.87).
  3556. Support for legacy keys was completely removed in 1.91.5.
  3557. Read details about the 1.87+ transition : https://github.com/ocornut/imgui/issues/4921
  3558. Note that "Keys" related to physical keys and are not the same concept as input "Characters", the latter are submitted via io.AddInputCharacter().
  3559. The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps.
  3560. """
  3561. # Keyboard
  3562. # ImGuiKey_None = 0, /* original C++ signature */
  3563. none = enum.auto() # (= 0)
  3564. # ImGuiKey_NamedKey_BEGIN = 512, /* original C++ signature */
  3565. named_key_begin = enum.auto() # (= 512) # First valid key value (other than 0)
  3566. # ImGuiKey_Tab = 512, /* original C++ signature */
  3567. tab = enum.auto() # (= 512) # == ImGuiKey_NamedKey_BEGIN
  3568. # ImGuiKey_LeftArrow, /* original C++ signature */
  3569. left_arrow = enum.auto() # (= 513)
  3570. # ImGuiKey_RightArrow, /* original C++ signature */
  3571. right_arrow = enum.auto() # (= 514)
  3572. # ImGuiKey_UpArrow, /* original C++ signature */
  3573. up_arrow = enum.auto() # (= 515)
  3574. # ImGuiKey_DownArrow, /* original C++ signature */
  3575. down_arrow = enum.auto() # (= 516)
  3576. # ImGuiKey_PageUp, /* original C++ signature */
  3577. page_up = enum.auto() # (= 517)
  3578. # ImGuiKey_PageDown, /* original C++ signature */
  3579. page_down = enum.auto() # (= 518)
  3580. # ImGuiKey_Home, /* original C++ signature */
  3581. home = enum.auto() # (= 519)
  3582. # ImGuiKey_End, /* original C++ signature */
  3583. end = enum.auto() # (= 520)
  3584. # ImGuiKey_Insert, /* original C++ signature */
  3585. insert = enum.auto() # (= 521)
  3586. # ImGuiKey_Delete, /* original C++ signature */
  3587. delete = enum.auto() # (= 522)
  3588. # ImGuiKey_Backspace, /* original C++ signature */
  3589. backspace = enum.auto() # (= 523)
  3590. # ImGuiKey_Space, /* original C++ signature */
  3591. space = enum.auto() # (= 524)
  3592. # ImGuiKey_Enter, /* original C++ signature */
  3593. enter = enum.auto() # (= 525)
  3594. # ImGuiKey_Escape, /* original C++ signature */
  3595. escape = enum.auto() # (= 526)
  3596. # ImGuiKey_LeftCtrl, /* original C++ signature */
  3597. left_ctrl = enum.auto() # (= 527)
  3598. # ImGuiKey_LeftShift, /* original C++ signature */
  3599. left_shift = enum.auto() # (= 528)
  3600. # ImGuiKey_LeftAlt, /* original C++ signature */
  3601. left_alt = enum.auto() # (= 529)
  3602. # ImGuiKey_LeftSuper, /* original C++ signature */
  3603. left_super = enum.auto() # (= 530) # Also see ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiMod_Alt, ImGuiMod_Super below!
  3604. # ImGuiKey_RightCtrl, /* original C++ signature */
  3605. right_ctrl = enum.auto() # (= 531)
  3606. # ImGuiKey_RightShift, /* original C++ signature */
  3607. right_shift = enum.auto() # (= 532)
  3608. # ImGuiKey_RightAlt, /* original C++ signature */
  3609. right_alt = enum.auto() # (= 533)
  3610. # ImGuiKey_RightSuper, /* original C++ signature */
  3611. right_super = enum.auto() # (= 534)
  3612. # ImGuiKey_Menu, /* original C++ signature */
  3613. menu = enum.auto() # (= 535)
  3614. # ImGuiKey_0, /* original C++ signature */
  3615. _0 = enum.auto() # (= 536)
  3616. # ImGuiKey_1, /* original C++ signature */
  3617. _1 = enum.auto() # (= 537)
  3618. # ImGuiKey_2, /* original C++ signature */
  3619. _2 = enum.auto() # (= 538)
  3620. # ImGuiKey_3, /* original C++ signature */
  3621. _3 = enum.auto() # (= 539)
  3622. # ImGuiKey_4, /* original C++ signature */
  3623. _4 = enum.auto() # (= 540)
  3624. # ImGuiKey_5, /* original C++ signature */
  3625. _5 = enum.auto() # (= 541)
  3626. # ImGuiKey_6, /* original C++ signature */
  3627. _6 = enum.auto() # (= 542)
  3628. # ImGuiKey_7, /* original C++ signature */
  3629. _7 = enum.auto() # (= 543)
  3630. # ImGuiKey_8, /* original C++ signature */
  3631. _8 = enum.auto() # (= 544)
  3632. # ImGuiKey_9, /* original C++ signature */
  3633. _9 = enum.auto() # (= 545)
  3634. # ImGuiKey_A, /* original C++ signature */
  3635. a = enum.auto() # (= 546)
  3636. # ImGuiKey_B, /* original C++ signature */
  3637. b = enum.auto() # (= 547)
  3638. # ImGuiKey_C, /* original C++ signature */
  3639. c = enum.auto() # (= 548)
  3640. # ImGuiKey_D, /* original C++ signature */
  3641. d = enum.auto() # (= 549)
  3642. # ImGuiKey_E, /* original C++ signature */
  3643. e = enum.auto() # (= 550)
  3644. # ImGuiKey_F, /* original C++ signature */
  3645. f = enum.auto() # (= 551)
  3646. # ImGuiKey_G, /* original C++ signature */
  3647. g = enum.auto() # (= 552)
  3648. # ImGuiKey_H, /* original C++ signature */
  3649. h = enum.auto() # (= 553)
  3650. # ImGuiKey_I, /* original C++ signature */
  3651. i = enum.auto() # (= 554)
  3652. # ImGuiKey_J, /* original C++ signature */
  3653. j = enum.auto() # (= 555)
  3654. # ImGuiKey_K, /* original C++ signature */
  3655. k = enum.auto() # (= 556)
  3656. # ImGuiKey_L, /* original C++ signature */
  3657. l = enum.auto() # (= 557)
  3658. # ImGuiKey_M, /* original C++ signature */
  3659. m = enum.auto() # (= 558)
  3660. # ImGuiKey_N, /* original C++ signature */
  3661. n = enum.auto() # (= 559)
  3662. # ImGuiKey_O, /* original C++ signature */
  3663. o = enum.auto() # (= 560)
  3664. # ImGuiKey_P, /* original C++ signature */
  3665. p = enum.auto() # (= 561)
  3666. # ImGuiKey_Q, /* original C++ signature */
  3667. q = enum.auto() # (= 562)
  3668. # ImGuiKey_R, /* original C++ signature */
  3669. r = enum.auto() # (= 563)
  3670. # ImGuiKey_S, /* original C++ signature */
  3671. s = enum.auto() # (= 564)
  3672. # ImGuiKey_T, /* original C++ signature */
  3673. t = enum.auto() # (= 565)
  3674. # ImGuiKey_U, /* original C++ signature */
  3675. u = enum.auto() # (= 566)
  3676. # ImGuiKey_V, /* original C++ signature */
  3677. v = enum.auto() # (= 567)
  3678. # ImGuiKey_W, /* original C++ signature */
  3679. w = enum.auto() # (= 568)
  3680. # ImGuiKey_X, /* original C++ signature */
  3681. x = enum.auto() # (= 569)
  3682. # ImGuiKey_Y, /* original C++ signature */
  3683. y = enum.auto() # (= 570)
  3684. # ImGuiKey_Z, /* original C++ signature */
  3685. z = enum.auto() # (= 571)
  3686. # ImGuiKey_F1, /* original C++ signature */
  3687. f1 = enum.auto() # (= 572)
  3688. # ImGuiKey_F2, /* original C++ signature */
  3689. f2 = enum.auto() # (= 573)
  3690. # ImGuiKey_F3, /* original C++ signature */
  3691. f3 = enum.auto() # (= 574)
  3692. # ImGuiKey_F4, /* original C++ signature */
  3693. f4 = enum.auto() # (= 575)
  3694. # ImGuiKey_F5, /* original C++ signature */
  3695. f5 = enum.auto() # (= 576)
  3696. # ImGuiKey_F6, /* original C++ signature */
  3697. f6 = enum.auto() # (= 577)
  3698. # ImGuiKey_F7, /* original C++ signature */
  3699. f7 = enum.auto() # (= 578)
  3700. # ImGuiKey_F8, /* original C++ signature */
  3701. f8 = enum.auto() # (= 579)
  3702. # ImGuiKey_F9, /* original C++ signature */
  3703. f9 = enum.auto() # (= 580)
  3704. # ImGuiKey_F10, /* original C++ signature */
  3705. f10 = enum.auto() # (= 581)
  3706. # ImGuiKey_F11, /* original C++ signature */
  3707. f11 = enum.auto() # (= 582)
  3708. # ImGuiKey_F12, /* original C++ signature */
  3709. f12 = enum.auto() # (= 583)
  3710. # ImGuiKey_F13, /* original C++ signature */
  3711. f13 = enum.auto() # (= 584)
  3712. # ImGuiKey_F14, /* original C++ signature */
  3713. f14 = enum.auto() # (= 585)
  3714. # ImGuiKey_F15, /* original C++ signature */
  3715. f15 = enum.auto() # (= 586)
  3716. # ImGuiKey_F16, /* original C++ signature */
  3717. f16 = enum.auto() # (= 587)
  3718. # ImGuiKey_F17, /* original C++ signature */
  3719. f17 = enum.auto() # (= 588)
  3720. # ImGuiKey_F18, /* original C++ signature */
  3721. f18 = enum.auto() # (= 589)
  3722. # ImGuiKey_F19, /* original C++ signature */
  3723. f19 = enum.auto() # (= 590)
  3724. # ImGuiKey_F20, /* original C++ signature */
  3725. f20 = enum.auto() # (= 591)
  3726. # ImGuiKey_F21, /* original C++ signature */
  3727. f21 = enum.auto() # (= 592)
  3728. # ImGuiKey_F22, /* original C++ signature */
  3729. f22 = enum.auto() # (= 593)
  3730. # ImGuiKey_F23, /* original C++ signature */
  3731. f23 = enum.auto() # (= 594)
  3732. # ImGuiKey_F24, /* original C++ signature */
  3733. f24 = enum.auto() # (= 595)
  3734. # ImGuiKey_Apostrophe, /* original C++ signature */
  3735. apostrophe = enum.auto() # (= 596) # '
  3736. # ImGuiKey_Comma, /* original C++ signature */
  3737. comma = enum.auto() # (= 597) # ,
  3738. # ImGuiKey_Minus, /* original C++ signature */
  3739. minus = enum.auto() # (= 598) # -
  3740. # ImGuiKey_Period, /* original C++ signature */
  3741. period = enum.auto() # (= 599) # .
  3742. # ImGuiKey_Slash, /* original C++ signature */
  3743. slash = enum.auto() # (= 600) # /
  3744. # ImGuiKey_Semicolon, /* original C++ signature */
  3745. semicolon = enum.auto() # (= 601) # ;
  3746. # ImGuiKey_Equal, /* original C++ signature */
  3747. equal = enum.auto() # (= 602) # =
  3748. # ImGuiKey_LeftBracket, /* original C++ signature */
  3749. left_bracket = enum.auto() # (= 603) # [
  3750. # ImGuiKey_Backslash, /* original C++ signature */
  3751. backslash = enum.auto() # (= 604) # \ (this text inhibit multiline comment caused by backslash)
  3752. # ImGuiKey_RightBracket, /* original C++ signature */
  3753. right_bracket = enum.auto() # (= 605) # ]
  3754. # ImGuiKey_GraveAccent, /* original C++ signature */
  3755. grave_accent = enum.auto() # (= 606) # `
  3756. # ImGuiKey_CapsLock, /* original C++ signature */
  3757. caps_lock = enum.auto() # (= 607)
  3758. # ImGuiKey_ScrollLock, /* original C++ signature */
  3759. scroll_lock = enum.auto() # (= 608)
  3760. # ImGuiKey_NumLock, /* original C++ signature */
  3761. num_lock = enum.auto() # (= 609)
  3762. # ImGuiKey_PrintScreen, /* original C++ signature */
  3763. print_screen = enum.auto() # (= 610)
  3764. # ImGuiKey_Pause, /* original C++ signature */
  3765. pause = enum.auto() # (= 611)
  3766. # ImGuiKey_Keypad0, /* original C++ signature */
  3767. keypad0 = enum.auto() # (= 612)
  3768. # ImGuiKey_Keypad1, /* original C++ signature */
  3769. keypad1 = enum.auto() # (= 613)
  3770. # ImGuiKey_Keypad2, /* original C++ signature */
  3771. keypad2 = enum.auto() # (= 614)
  3772. # ImGuiKey_Keypad3, /* original C++ signature */
  3773. keypad3 = enum.auto() # (= 615)
  3774. # ImGuiKey_Keypad4, /* original C++ signature */
  3775. keypad4 = enum.auto() # (= 616)
  3776. # ImGuiKey_Keypad5, /* original C++ signature */
  3777. keypad5 = enum.auto() # (= 617)
  3778. # ImGuiKey_Keypad6, /* original C++ signature */
  3779. keypad6 = enum.auto() # (= 618)
  3780. # ImGuiKey_Keypad7, /* original C++ signature */
  3781. keypad7 = enum.auto() # (= 619)
  3782. # ImGuiKey_Keypad8, /* original C++ signature */
  3783. keypad8 = enum.auto() # (= 620)
  3784. # ImGuiKey_Keypad9, /* original C++ signature */
  3785. keypad9 = enum.auto() # (= 621)
  3786. # ImGuiKey_KeypadDecimal, /* original C++ signature */
  3787. keypad_decimal = enum.auto() # (= 622)
  3788. # ImGuiKey_KeypadDivide, /* original C++ signature */
  3789. keypad_divide = enum.auto() # (= 623)
  3790. # ImGuiKey_KeypadMultiply, /* original C++ signature */
  3791. keypad_multiply = enum.auto() # (= 624)
  3792. # ImGuiKey_KeypadSubtract, /* original C++ signature */
  3793. keypad_subtract = enum.auto() # (= 625)
  3794. # ImGuiKey_KeypadAdd, /* original C++ signature */
  3795. keypad_add = enum.auto() # (= 626)
  3796. # ImGuiKey_KeypadEnter, /* original C++ signature */
  3797. keypad_enter = enum.auto() # (= 627)
  3798. # ImGuiKey_KeypadEqual, /* original C++ signature */
  3799. keypad_equal = enum.auto() # (= 628)
  3800. # ImGuiKey_AppBack, /* original C++ signature */
  3801. app_back = enum.auto() # (= 629) # Available on some keyboard/mouses. Often referred as "Browser Back"
  3802. # ImGuiKey_AppForward, /* original C++ signature */
  3803. app_forward = enum.auto() # (= 630)
  3804. # ImGuiKey_Oem102, /* original C++ signature */
  3805. oem102 = enum.auto() # (= 631) # Non-US backslash.
  3806. # Gamepad
  3807. # (analog values are 0.0 to 1.0)
  3808. # (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets)
  3809. # // XBOX | SWITCH | PLAYSTA. | -> ACTION
  3810. # ImGuiKey_GamepadStart, /* original C++ signature */
  3811. gamepad_start = enum.auto() # (= 632) # Menu | + | Options |
  3812. # ImGuiKey_GamepadBack, /* original C++ signature */
  3813. gamepad_back = enum.auto() # (= 633) # View | - | Share |
  3814. # ImGuiKey_GamepadFaceLeft, /* original C++ signature */
  3815. gamepad_face_left = (
  3816. enum.auto()
  3817. ) # (= 634) # X | Y | Square | Toggle Menu. Hold for Windowing mode (Focus/Move/Resize windows)
  3818. # ImGuiKey_GamepadFaceRight, /* original C++ signature */
  3819. gamepad_face_right = enum.auto() # (= 635) # B | A | Circle | Cancel / Close / Exit
  3820. # ImGuiKey_GamepadFaceUp, /* original C++ signature */
  3821. gamepad_face_up = enum.auto() # (= 636) # Y | X | Triangle | Open Context Menu
  3822. # ImGuiKey_GamepadFaceDown, /* original C++ signature */
  3823. gamepad_face_down = (
  3824. enum.auto()
  3825. ) # (= 637) # A | B | Cross | Activate / Open / Toggle. Hold for 0.60 to Activate in Text Input mode (e.g. wired to an on-screen keyboard).
  3826. # ImGuiKey_GamepadDpadLeft, /* original C++ signature */
  3827. gamepad_dpad_left = (
  3828. enum.auto()
  3829. ) # (= 638) # D-pad Left | " | " | Move / Tweak / Resize Window (in Windowing mode)
  3830. # ImGuiKey_GamepadDpadRight, /* original C++ signature */
  3831. gamepad_dpad_right = (
  3832. enum.auto()
  3833. ) # (= 639) # D-pad Right | " | " | Move / Tweak / Resize Window (in Windowing mode)
  3834. # ImGuiKey_GamepadDpadUp, /* original C++ signature */
  3835. gamepad_dpad_up = (
  3836. enum.auto()
  3837. ) # (= 640) # D-pad Up | " | " | Move / Tweak / Resize Window (in Windowing mode)
  3838. # ImGuiKey_GamepadDpadDown, /* original C++ signature */
  3839. gamepad_dpad_down = (
  3840. enum.auto()
  3841. ) # (= 641) # D-pad Down | " | " | Move / Tweak / Resize Window (in Windowing mode)
  3842. # ImGuiKey_GamepadL1, /* original C++ signature */
  3843. gamepad_l1 = (
  3844. enum.auto()
  3845. ) # (= 642) # L Bumper | L | L1 | Tweak Slower / Focus Previous (in Windowing mode)
  3846. # ImGuiKey_GamepadR1, /* original C++ signature */
  3847. gamepad_r1 = (
  3848. enum.auto()
  3849. ) # (= 643) # R Bumper | R | R1 | Tweak Faster / Focus Next (in Windowing mode)
  3850. # ImGuiKey_GamepadL2, /* original C++ signature */
  3851. gamepad_l2 = enum.auto() # (= 644) # L Trigger | ZL | L2 | [Analog]
  3852. # ImGuiKey_GamepadR2, /* original C++ signature */
  3853. gamepad_r2 = enum.auto() # (= 645) # R Trigger | ZR | R2 | [Analog]
  3854. # ImGuiKey_GamepadL3, /* original C++ signature */
  3855. gamepad_l3 = enum.auto() # (= 646) # L Stick | L3 | L3 |
  3856. # ImGuiKey_GamepadR3, /* original C++ signature */
  3857. gamepad_r3 = enum.auto() # (= 647) # R Stick | R3 | R3 |
  3858. # ImGuiKey_GamepadLStickLeft, /* original C++ signature */
  3859. gamepad_l_stick_left = (
  3860. enum.auto()
  3861. ) # (= 648) # | | | [Analog] Move Window (in Windowing mode)
  3862. # ImGuiKey_GamepadLStickRight, /* original C++ signature */
  3863. gamepad_l_stick_right = (
  3864. enum.auto()
  3865. ) # (= 649) # | | | [Analog] Move Window (in Windowing mode)
  3866. # ImGuiKey_GamepadLStickUp, /* original C++ signature */
  3867. gamepad_l_stick_up = (
  3868. enum.auto()
  3869. ) # (= 650) # | | | [Analog] Move Window (in Windowing mode)
  3870. # ImGuiKey_GamepadLStickDown, /* original C++ signature */
  3871. gamepad_l_stick_down = (
  3872. enum.auto()
  3873. ) # (= 651) # | | | [Analog] Move Window (in Windowing mode)
  3874. # ImGuiKey_GamepadRStickLeft, /* original C++ signature */
  3875. gamepad_r_stick_left = enum.auto() # (= 652) # | | | [Analog]
  3876. # ImGuiKey_GamepadRStickRight, /* original C++ signature */
  3877. gamepad_r_stick_right = enum.auto() # (= 653) # | | | [Analog]
  3878. # ImGuiKey_GamepadRStickUp, /* original C++ signature */
  3879. gamepad_r_stick_up = enum.auto() # (= 654) # | | | [Analog]
  3880. # ImGuiKey_GamepadRStickDown, /* original C++ signature */
  3881. gamepad_r_stick_down = enum.auto() # (= 655) # | | | [Analog]
  3882. # ImGuiKey_MouseLeft, /* original C++ signature */
  3883. # Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls)
  3884. # - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API.
  3885. mouse_left = enum.auto() # (= 656)
  3886. # ImGuiKey_MouseRight, /* original C++ signature */
  3887. mouse_right = enum.auto() # (= 657)
  3888. # ImGuiKey_MouseMiddle, /* original C++ signature */
  3889. mouse_middle = enum.auto() # (= 658)
  3890. # ImGuiKey_MouseX1, /* original C++ signature */
  3891. mouse_x1 = enum.auto() # (= 659)
  3892. # ImGuiKey_MouseX2, /* original C++ signature */
  3893. mouse_x2 = enum.auto() # (= 660)
  3894. # ImGuiKey_MouseWheelX, /* original C++ signature */
  3895. mouse_wheel_x = enum.auto() # (= 661)
  3896. # ImGuiKey_MouseWheelY, /* original C++ signature */
  3897. mouse_wheel_y = enum.auto() # (= 662)
  3898. # ImGuiKey_ReservedForModCtrl, /* original C++ signature */
  3899. # [Internal] Reserved for mod storage
  3900. reserved_for_mod_ctrl = enum.auto() # (= 663)
  3901. # ImGuiKey_ReservedForModShift, /* original C++ signature */
  3902. reserved_for_mod_shift = enum.auto() # (= 664)
  3903. # ImGuiKey_ReservedForModAlt, /* original C++ signature */
  3904. reserved_for_mod_alt = enum.auto() # (= 665)
  3905. # ImGuiKey_ReservedForModSuper, /* original C++ signature */
  3906. reserved_for_mod_super = enum.auto() # (= 666)
  3907. # [Internal] If you need to iterate all keys (for e.g. an input mapper) you may use ImGuiKey_NamedKey_BEGIN..ImGuiKey_NamedKey_END.
  3908. # ImGuiKey_NamedKey_END, /* original C++ signature */
  3909. named_key_end = enum.auto() # (= 667)
  3910. # ImGuiKey_NamedKey_COUNT = ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN, /* original C++ signature */
  3911. named_key_count = enum.auto() # (= Key_NamedKey_END - Key_NamedKey_BEGIN)
  3912. # Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls)
  3913. # - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S).
  3914. # - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience,
  3915. # but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc.
  3916. # - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those
  3917. # and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl).
  3918. # - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys.
  3919. # In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and
  3920. # backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
  3921. # - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call.
  3922. # ImGuiMod_None = 0, /* original C++ signature */
  3923. mod_none = enum.auto() # (= 0)
  3924. # ImGuiMod_Ctrl = 1 << 12, /* original C++ signature */
  3925. mod_ctrl = enum.auto() # (= 1 << 12) # Ctrl (non-macOS), Cmd (macOS)
  3926. # ImGuiMod_Shift = 1 << 13, /* original C++ signature */
  3927. mod_shift = enum.auto() # (= 1 << 13) # Shift
  3928. # ImGuiMod_Alt = 1 << 14, /* original C++ signature */
  3929. mod_alt = enum.auto() # (= 1 << 14) # Option/Menu
  3930. # ImGuiMod_Super = 1 << 15, /* original C++ signature */
  3931. mod_super = enum.auto() # (= 1 << 15) # Windows/Super (non-macOS), Ctrl (macOS)
  3932. # ImGuiMod_Mask_ = 0xF000, /* original C++ signature */
  3933. mod_mask_ = enum.auto() # (= 0xF000) # 4-bits
  3934. class InputFlags_(enum.IntFlag):
  3935. """Flags for Shortcut(), SetNextItemShortcut(),
  3936. (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h)
  3937. Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function)
  3938. """
  3939. # ImGuiInputFlags_None = 0, /* original C++ signature */
  3940. none = enum.auto() # (= 0)
  3941. # ImGuiInputFlags_Repeat = 1 << 0, /* original C++ signature */
  3942. repeat = (
  3943. enum.auto()
  3944. ) # (= 1 << 0) # Enable repeat. Return True on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.
  3945. # Flags for Shortcut(), SetNextItemShortcut()
  3946. # - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal.
  3947. # - Default policy is RouteFocused. Can select only 1 policy among all available.
  3948. # ImGuiInputFlags_RouteActive = 1 << 10, /* original C++ signature */
  3949. route_active = enum.auto() # (= 1 << 10) # Route to active item only.
  3950. # ImGuiInputFlags_RouteFocused = 1 << 11, /* original C++ signature */
  3951. route_focused = (
  3952. enum.auto()
  3953. ) # (= 1 << 11) # Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes inputs over deep-most focused window.
  3954. # ImGuiInputFlags_RouteGlobal = 1 << 12, /* original C++ signature */
  3955. route_global = (
  3956. enum.auto()
  3957. ) # (= 1 << 12) # Global route (unless a focused window or active item registered the route).
  3958. # ImGuiInputFlags_RouteAlways = 1 << 13, /* original C++ signature */
  3959. route_always = enum.auto() # (= 1 << 13) # Do not register route, poll keys directly.
  3960. # - Routing options
  3961. # ImGuiInputFlags_RouteOverFocused = 1 << 14, /* original C++ signature */
  3962. route_over_focused = (
  3963. enum.auto()
  3964. ) # (= 1 << 14) # Option: global route: higher priority than focused route (unless active item in focused route).
  3965. # ImGuiInputFlags_RouteOverActive = 1 << 15, /* original C++ signature */
  3966. route_over_active = (
  3967. enum.auto()
  3968. ) # (= 1 << 15) # Option: global route: higher priority than active item. Unlikely you need to use that: will interfere with every active items, e.g. Ctrl+A registered by InputText will be overridden by this. May not be fully honored as user/internal code is likely to always assume they can access keys when active.
  3969. # ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16, /* original C++ signature */
  3970. route_unless_bg_focused = (
  3971. enum.auto()
  3972. ) # (= 1 << 16) # Option: global route: will not be applied if underlying background/None is focused (== no Dear ImGui windows are focused). Useful for overlay applications.
  3973. # ImGuiInputFlags_RouteFromRootWindow = 1 << 17, /* original C++ signature */
  3974. route_from_root_window = (
  3975. enum.auto()
  3976. ) # (= 1 << 17) # Option: route evaluated from the point of view of root window rather than current window.
  3977. # Flags for SetNextItemShortcut()
  3978. # ImGuiInputFlags_Tooltip = 1 << 18, /* original C++ signature */
  3979. tooltip = (
  3980. enum.auto()
  3981. ) # (= 1 << 18) # Automatically display a tooltip when hovering item [BETA] Unsure of right api (opt-in/opt-out)
  3982. class ConfigFlags_(enum.IntFlag):
  3983. """Configuration flags stored in io.ConfigFlags. Set by user/application.
  3984. Note that nowadays most of our configuration options are in other ImGuiIO fields, e.g. io.ConfigWindowsMoveFromTitleBarOnly.
  3985. """
  3986. # ImGuiConfigFlags_None = 0, /* original C++ signature */
  3987. none = enum.auto() # (= 0)
  3988. # ImGuiConfigFlags_NavEnableKeyboard = 1 << 0, /* original C++ signature */
  3989. nav_enable_keyboard = (
  3990. enum.auto()
  3991. ) # (= 1 << 0) # Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + Space/Enter to activate. Note: some features such as basic Tabbing and CtrL+Tab are enabled by regardless of this flag (and may be disabled via other means, see #4828, #9218).
  3992. # ImGuiConfigFlags_NavEnableGamepad = 1 << 1, /* original C++ signature */
  3993. nav_enable_gamepad = (
  3994. enum.auto()
  3995. ) # (= 1 << 1) # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
  3996. # ImGuiConfigFlags_NoMouse = 1 << 4, /* original C++ signature */
  3997. no_mouse = enum.auto() # (= 1 << 4) # Instruct dear imgui to disable mouse inputs and interactions.
  3998. # ImGuiConfigFlags_NoMouseCursorChange = 1 << 5, /* original C++ signature */
  3999. no_mouse_cursor_change = (
  4000. enum.auto()
  4001. ) # (= 1 << 5) # Instruct backend to not alter mouse cursor shape and visibility. Use if the backend cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want to honor requests from imgui by reading GetMouseCursor() yourself instead.
  4002. # ImGuiConfigFlags_NoKeyboard = 1 << 6, /* original C++ signature */
  4003. no_keyboard = (
  4004. enum.auto()
  4005. ) # (= 1 << 6) # Instruct dear imgui to disable keyboard inputs and interactions. This is done by ignoring keyboard events and clearing existing states.
  4006. # [BETA] Docking
  4007. # ImGuiConfigFlags_DockingEnable = 1 << 7, /* original C++ signature */
  4008. docking_enable = enum.auto() # (= 1 << 7) # Docking enable flags.
  4009. # [BETA] Viewports
  4010. # When using viewports it is recommended that your default value for ImGuiCol_WindowBg is opaque (Alpha=1.0) so transition to a viewport won't be noticeable.
  4011. # ImGuiConfigFlags_ViewportsEnable = 1 << 10, /* original C++ signature */
  4012. viewports_enable = (
  4013. enum.auto()
  4014. ) # (= 1 << 10) # Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective backends)
  4015. # [Unused] User storage (to allow your backend/engine to communicate to code that may be shared between multiple projects. Those flags are NOT used by core Dear ImGui)
  4016. # ImGuiConfigFlags_IsSRGB = 1 << 20, /* original C++ signature */
  4017. is_srgb = enum.auto() # (= 1 << 20) # Application is SRGB-aware.
  4018. # ImGuiConfigFlags_IsTouchScreen = 1 << 21, /* original C++ signature */
  4019. is_touch_screen = enum.auto() # (= 1 << 21) # Application is using a touch screen instead of a mouse.
  4020. class BackendFlags_(enum.IntFlag):
  4021. """Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend."""
  4022. # ImGuiBackendFlags_None = 0, /* original C++ signature */
  4023. none = enum.auto() # (= 0)
  4024. # ImGuiBackendFlags_HasGamepad = 1 << 0, /* original C++ signature */
  4025. has_gamepad = enum.auto() # (= 1 << 0) # Backend Platform supports gamepad and currently has one connected.
  4026. # ImGuiBackendFlags_HasMouseCursors = 1 << 1, /* original C++ signature */
  4027. has_mouse_cursors = (
  4028. enum.auto()
  4029. ) # (= 1 << 1) # Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
  4030. # ImGuiBackendFlags_HasSetMousePos = 1 << 2, /* original C++ signature */
  4031. has_set_mouse_pos = (
  4032. enum.auto()
  4033. ) # (= 1 << 2) # Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if io.ConfigNavMoveSetMousePos is set).
  4034. # ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3, /* original C++ signature */
  4035. renderer_has_vtx_offset = (
  4036. enum.auto()
  4037. ) # (= 1 << 3) # Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.
  4038. # ImGuiBackendFlags_RendererHasTextures = 1 << 4, /* original C++ signature */
  4039. renderer_has_textures = (
  4040. enum.auto()
  4041. ) # (= 1 << 4) # Backend Renderer supports ImTextureData requests to create/update/destroy textures. This enables incremental texture updates and texture reloads. See https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md for instructions on how to upgrade your custom backend.
  4042. # [BETA] Multi-Viewports
  4043. # ImGuiBackendFlags_RendererHasViewports = 1 << 10, /* original C++ signature */
  4044. renderer_has_viewports = enum.auto() # (= 1 << 10) # Backend Renderer supports multiple viewports.
  4045. # ImGuiBackendFlags_PlatformHasViewports = 1 << 11, /* original C++ signature */
  4046. platform_has_viewports = enum.auto() # (= 1 << 11) # Backend Platform supports multiple viewports.
  4047. # ImGuiBackendFlags_HasMouseHoveredViewport=1 << 12, /* original C++ signature */
  4048. has_mouse_hovered_viewport = (
  4049. enum.auto()
  4050. ) # (= 1 << 12) # Backend Platform supports calling io.AddMouseViewportEvent() with the viewport under the mouse. IF POSSIBLE, ignore viewports with the ImGuiViewportFlags_NoInputs flag (Win32 backend, GLFW 3.30+ backend can do this, SDL backend cannot). If this cannot be done, Dear ImGui needs to use a flawed heuristic to find the viewport under.
  4051. # ImGuiBackendFlags_HasParentViewport = 1 << 13, /* original C++ signature */
  4052. has_parent_viewport = (
  4053. enum.auto()
  4054. ) # (= 1 << 13) # Backend Platform supports honoring viewport->ParentViewport/ParentViewportId value, by applying the corresponding parent/child relationship at the Platform level. Child windows always appear in front of their parent window.
  4055. class Col_(enum.IntFlag):
  4056. """Enumeration for PushStyleColor() / PopStyleColor()"""
  4057. # ImGuiCol_Text, /* original C++ signature */
  4058. text = enum.auto() # (= 0)
  4059. # ImGuiCol_TextDisabled, /* original C++ signature */
  4060. text_disabled = enum.auto() # (= 1)
  4061. # ImGuiCol_WindowBg, /* original C++ signature */
  4062. window_bg = enum.auto() # (= 2) # Background of normal windows
  4063. # ImGuiCol_ChildBg, /* original C++ signature */
  4064. child_bg = enum.auto() # (= 3) # Background of child windows
  4065. # ImGuiCol_PopupBg, /* original C++ signature */
  4066. popup_bg = enum.auto() # (= 4) # Background of popups, menus, tooltips windows
  4067. # ImGuiCol_Border, /* original C++ signature */
  4068. border = enum.auto() # (= 5)
  4069. # ImGuiCol_BorderShadow, /* original C++ signature */
  4070. border_shadow = enum.auto() # (= 6)
  4071. # ImGuiCol_FrameBg, /* original C++ signature */
  4072. frame_bg = enum.auto() # (= 7) # Background of checkbox, radio button, plot, slider, text input
  4073. # ImGuiCol_FrameBgHovered, /* original C++ signature */
  4074. frame_bg_hovered = enum.auto() # (= 8)
  4075. # ImGuiCol_FrameBgActive, /* original C++ signature */
  4076. frame_bg_active = enum.auto() # (= 9)
  4077. # ImGuiCol_TitleBg, /* original C++ signature */
  4078. title_bg = enum.auto() # (= 10) # Title bar
  4079. # ImGuiCol_TitleBgActive, /* original C++ signature */
  4080. title_bg_active = enum.auto() # (= 11) # Title bar when focused
  4081. # ImGuiCol_TitleBgCollapsed, /* original C++ signature */
  4082. title_bg_collapsed = enum.auto() # (= 12) # Title bar when collapsed
  4083. # ImGuiCol_MenuBarBg, /* original C++ signature */
  4084. menu_bar_bg = enum.auto() # (= 13)
  4085. # ImGuiCol_ScrollbarBg, /* original C++ signature */
  4086. scrollbar_bg = enum.auto() # (= 14)
  4087. # ImGuiCol_ScrollbarGrab, /* original C++ signature */
  4088. scrollbar_grab = enum.auto() # (= 15)
  4089. # ImGuiCol_ScrollbarGrabHovered, /* original C++ signature */
  4090. scrollbar_grab_hovered = enum.auto() # (= 16)
  4091. # ImGuiCol_ScrollbarGrabActive, /* original C++ signature */
  4092. scrollbar_grab_active = enum.auto() # (= 17)
  4093. # ImGuiCol_CheckMark, /* original C++ signature */
  4094. check_mark = enum.auto() # (= 18) # Checkbox tick and RadioButton circle
  4095. # ImGuiCol_CheckboxSelectedBg, /* original C++ signature */
  4096. checkbox_selected_bg = enum.auto() # (= 19) # Checkbox background when Selected, otherwise use FrameBg
  4097. # ImGuiCol_SliderGrab, /* original C++ signature */
  4098. slider_grab = enum.auto() # (= 20)
  4099. # ImGuiCol_SliderGrabActive, /* original C++ signature */
  4100. slider_grab_active = enum.auto() # (= 21)
  4101. # ImGuiCol_Button, /* original C++ signature */
  4102. button = enum.auto() # (= 22)
  4103. # ImGuiCol_ButtonHovered, /* original C++ signature */
  4104. button_hovered = enum.auto() # (= 23)
  4105. # ImGuiCol_ButtonActive, /* original C++ signature */
  4106. button_active = enum.auto() # (= 24)
  4107. # ImGuiCol_Header, /* original C++ signature */
  4108. header = enum.auto() # (= 25) # Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem
  4109. # ImGuiCol_HeaderHovered, /* original C++ signature */
  4110. header_hovered = enum.auto() # (= 26)
  4111. # ImGuiCol_HeaderActive, /* original C++ signature */
  4112. header_active = enum.auto() # (= 27)
  4113. # ImGuiCol_Separator, /* original C++ signature */
  4114. separator = enum.auto() # (= 28)
  4115. # ImGuiCol_SeparatorHovered, /* original C++ signature */
  4116. separator_hovered = enum.auto() # (= 29)
  4117. # ImGuiCol_SeparatorActive, /* original C++ signature */
  4118. separator_active = enum.auto() # (= 30)
  4119. # ImGuiCol_ResizeGrip, /* original C++ signature */
  4120. resize_grip = enum.auto() # (= 31) # Resize grip in lower-right and lower-left corners of windows.
  4121. # ImGuiCol_ResizeGripHovered, /* original C++ signature */
  4122. resize_grip_hovered = enum.auto() # (= 32)
  4123. # ImGuiCol_ResizeGripActive, /* original C++ signature */
  4124. resize_grip_active = enum.auto() # (= 33)
  4125. # ImGuiCol_InputTextCursor, /* original C++ signature */
  4126. input_text_cursor = enum.auto() # (= 34) # InputText cursor/caret
  4127. # ImGuiCol_TabHovered, /* original C++ signature */
  4128. tab_hovered = enum.auto() # (= 35) # Tab background, when hovered
  4129. # ImGuiCol_Tab, /* original C++ signature */
  4130. tab = enum.auto() # (= 36) # Tab background, when tab-bar is focused & tab is unselected
  4131. # ImGuiCol_TabSelected, /* original C++ signature */
  4132. tab_selected = enum.auto() # (= 37) # Tab background, when tab-bar is focused & tab is selected
  4133. # ImGuiCol_TabSelectedOverline, /* original C++ signature */
  4134. tab_selected_overline = enum.auto() # (= 38) # Tab horizontal overline, when tab-bar is focused & tab is selected
  4135. # ImGuiCol_TabDimmed, /* original C++ signature */
  4136. tab_dimmed = enum.auto() # (= 39) # Tab background, when tab-bar is unfocused & tab is unselected
  4137. # ImGuiCol_TabDimmedSelected, /* original C++ signature */
  4138. tab_dimmed_selected = enum.auto() # (= 40) # Tab background, when tab-bar is unfocused & tab is selected
  4139. # ImGuiCol_TabDimmedSelectedOverline, /* original C++ signature */
  4140. tab_dimmed_selected_overline = (
  4141. enum.auto()
  4142. ) # (= 41) #..horizontal overline, when tab-bar is unfocused & tab is selected
  4143. # ImGuiCol_DockingPreview, /* original C++ signature */
  4144. docking_preview = enum.auto() # (= 42) # Preview overlay color when about to docking something
  4145. # ImGuiCol_DockingEmptyBg, /* original C++ signature */
  4146. docking_empty_bg = (
  4147. enum.auto()
  4148. ) # (= 43) # Background color for empty node (e.g. CentralNode with no window docked into it)
  4149. # ImGuiCol_PlotLines, /* original C++ signature */
  4150. plot_lines = enum.auto() # (= 44)
  4151. # ImGuiCol_PlotLinesHovered, /* original C++ signature */
  4152. plot_lines_hovered = enum.auto() # (= 45)
  4153. # ImGuiCol_PlotHistogram, /* original C++ signature */
  4154. plot_histogram = enum.auto() # (= 46)
  4155. # ImGuiCol_PlotHistogramHovered, /* original C++ signature */
  4156. plot_histogram_hovered = enum.auto() # (= 47)
  4157. # ImGuiCol_TableHeaderBg, /* original C++ signature */
  4158. table_header_bg = enum.auto() # (= 48) # Table header background
  4159. # ImGuiCol_TableBorderStrong, /* original C++ signature */
  4160. table_border_strong = enum.auto() # (= 49) # Table outer and header borders (prefer using Alpha=1.0 here)
  4161. # ImGuiCol_TableBorderLight, /* original C++ signature */
  4162. table_border_light = enum.auto() # (= 50) # Table inner borders (prefer using Alpha=1.0 here)
  4163. # ImGuiCol_TableRowBg, /* original C++ signature */
  4164. table_row_bg = enum.auto() # (= 51) # Table row background (even rows)
  4165. # ImGuiCol_TableRowBgAlt, /* original C++ signature */
  4166. table_row_bg_alt = enum.auto() # (= 52) # Table row background (odd rows)
  4167. # ImGuiCol_TextLink, /* original C++ signature */
  4168. text_link = enum.auto() # (= 53) # Hyperlink color
  4169. # ImGuiCol_TextSelectedBg, /* original C++ signature */
  4170. text_selected_bg = enum.auto() # (= 54) # Selected text inside an InputText
  4171. # ImGuiCol_TreeLines, /* original C++ signature */
  4172. tree_lines = enum.auto() # (= 55) # Tree node hierarchy outlines when using ImGuiTreeNodeFlags_DrawLines
  4173. # ImGuiCol_DragDropTarget, /* original C++ signature */
  4174. drag_drop_target = enum.auto() # (= 56) # Rectangle border highlighting a drop target
  4175. # ImGuiCol_DragDropTargetBg, /* original C++ signature */
  4176. drag_drop_target_bg = enum.auto() # (= 57) # Rectangle background highlighting a drop target
  4177. # ImGuiCol_UnsavedMarker, /* original C++ signature */
  4178. unsaved_marker = enum.auto() # (= 58) # Unsaved Document marker (in window title and tabs)
  4179. # ImGuiCol_NavCursor, /* original C++ signature */
  4180. nav_cursor = enum.auto() # (= 59) # Color of keyboard/gamepad navigation cursor/rectangle, when visible
  4181. # ImGuiCol_NavWindowingHighlight, /* original C++ signature */
  4182. nav_windowing_highlight = enum.auto() # (= 60) # Highlight window when using Ctrl+Tab
  4183. # ImGuiCol_NavWindowingDimBg, /* original C++ signature */
  4184. nav_windowing_dim_bg = (
  4185. enum.auto()
  4186. ) # (= 61) # Darken/colorize entire screen behind the Ctrl+Tab window list, when active
  4187. # ImGuiCol_ModalWindowDimBg, /* original C++ signature */
  4188. modal_window_dim_bg = (
  4189. enum.auto()
  4190. ) # (= 62) # Darken/colorize entire screen behind a modal window, when one is active
  4191. # ImGuiCol_COUNT, /* original C++ signature */
  4192. count = enum.auto() # (= 63)
  4193. class StyleVar_(enum.IntFlag):
  4194. """Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure.
  4195. - The enum only refers to fields of ImGuiStyle which makes sense to be pushed/popped inside UI code.
  4196. During initialization or between frames, feel free to just poke into ImGuiStyle directly.
  4197. - Tip: Use your programming IDE navigation facilities on the names in the _second column_ below to find the actual members and their description.
  4198. - In Visual Studio: Ctrl+Comma ("Edit.GoToAll") can follow symbols inside comments, whereas Ctrl+F12 ("Edit.GoToImplementation") cannot.
  4199. - In Visual Studio w/ Visual Assist installed: Alt+G ("VAssistX.GoToImplementation") can also follow symbols inside comments.
  4200. - In VS Code, CLion, etc.: Ctrl+Click can follow symbols inside comments.
  4201. - When changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type.
  4202. """
  4203. # Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions)
  4204. # ImGuiStyleVar_Alpha, /* original C++ signature */
  4205. alpha = enum.auto() # (= 0) # float Alpha
  4206. # ImGuiStyleVar_DisabledAlpha, /* original C++ signature */
  4207. disabled_alpha = enum.auto() # (= 1) # float DisabledAlpha
  4208. # ImGuiStyleVar_WindowPadding, /* original C++ signature */
  4209. window_padding = enum.auto() # (= 2) # ImVec2 WindowPadding
  4210. # ImGuiStyleVar_WindowRounding, /* original C++ signature */
  4211. window_rounding = enum.auto() # (= 3) # float WindowRounding
  4212. # ImGuiStyleVar_WindowBorderSize, /* original C++ signature */
  4213. window_border_size = enum.auto() # (= 4) # float WindowBorderSize
  4214. # ImGuiStyleVar_WindowMinSize, /* original C++ signature */
  4215. window_min_size = enum.auto() # (= 5) # ImVec2 WindowMinSize
  4216. # ImGuiStyleVar_WindowTitleAlign, /* original C++ signature */
  4217. window_title_align = enum.auto() # (= 6) # ImVec2 WindowTitleAlign
  4218. # ImGuiStyleVar_ChildRounding, /* original C++ signature */
  4219. child_rounding = enum.auto() # (= 7) # float ChildRounding
  4220. # ImGuiStyleVar_ChildBorderSize, /* original C++ signature */
  4221. child_border_size = enum.auto() # (= 8) # float ChildBorderSize
  4222. # ImGuiStyleVar_PopupRounding, /* original C++ signature */
  4223. popup_rounding = enum.auto() # (= 9) # float PopupRounding
  4224. # ImGuiStyleVar_PopupBorderSize, /* original C++ signature */
  4225. popup_border_size = enum.auto() # (= 10) # float PopupBorderSize
  4226. # ImGuiStyleVar_FramePadding, /* original C++ signature */
  4227. frame_padding = enum.auto() # (= 11) # ImVec2 FramePadding
  4228. # ImGuiStyleVar_FrameRounding, /* original C++ signature */
  4229. frame_rounding = enum.auto() # (= 12) # float FrameRounding
  4230. # ImGuiStyleVar_FrameBorderSize, /* original C++ signature */
  4231. frame_border_size = enum.auto() # (= 13) # float FrameBorderSize
  4232. # ImGuiStyleVar_ItemSpacing, /* original C++ signature */
  4233. item_spacing = enum.auto() # (= 14) # ImVec2 ItemSpacing
  4234. # ImGuiStyleVar_ItemInnerSpacing, /* original C++ signature */
  4235. item_inner_spacing = enum.auto() # (= 15) # ImVec2 ItemInnerSpacing
  4236. # ImGuiStyleVar_IndentSpacing, /* original C++ signature */
  4237. indent_spacing = enum.auto() # (= 16) # float IndentSpacing
  4238. # ImGuiStyleVar_CellPadding, /* original C++ signature */
  4239. cell_padding = enum.auto() # (= 17) # ImVec2 CellPadding
  4240. # ImGuiStyleVar_ScrollbarSize, /* original C++ signature */
  4241. scrollbar_size = enum.auto() # (= 18) # float ScrollbarSize
  4242. # ImGuiStyleVar_ScrollbarRounding, /* original C++ signature */
  4243. scrollbar_rounding = enum.auto() # (= 19) # float ScrollbarRounding
  4244. # ImGuiStyleVar_ScrollbarPadding, /* original C++ signature */
  4245. scrollbar_padding = enum.auto() # (= 20) # float ScrollbarPadding
  4246. # ImGuiStyleVar_GrabMinSize, /* original C++ signature */
  4247. grab_min_size = enum.auto() # (= 21) # float GrabMinSize
  4248. # ImGuiStyleVar_GrabRounding, /* original C++ signature */
  4249. grab_rounding = enum.auto() # (= 22) # float GrabRounding
  4250. # ImGuiStyleVar_ImageRounding, /* original C++ signature */
  4251. image_rounding = enum.auto() # (= 23) # float ImageRounding
  4252. # ImGuiStyleVar_ImageBorderSize, /* original C++ signature */
  4253. image_border_size = enum.auto() # (= 24) # float ImageBorderSize
  4254. # ImGuiStyleVar_LayoutAlign, /* original C++ signature */
  4255. layout_align = enum.auto() # (= 25) # float LayoutAlign
  4256. # ImGuiStyleVar_TabRounding, /* original C++ signature */
  4257. tab_rounding = enum.auto() # (= 26) # float TabRounding
  4258. # ImGuiStyleVar_TabBorderSize, /* original C++ signature */
  4259. tab_border_size = enum.auto() # (= 27) # float TabBorderSize
  4260. # ImGuiStyleVar_TabMinWidthBase, /* original C++ signature */
  4261. tab_min_width_base = enum.auto() # (= 28) # float TabMinWidthBase
  4262. # ImGuiStyleVar_TabMinWidthShrink, /* original C++ signature */
  4263. tab_min_width_shrink = enum.auto() # (= 29) # float TabMinWidthShrink
  4264. # ImGuiStyleVar_TabBarBorderSize, /* original C++ signature */
  4265. tab_bar_border_size = enum.auto() # (= 30) # float TabBarBorderSize
  4266. # ImGuiStyleVar_TabBarOverlineSize, /* original C++ signature */
  4267. tab_bar_overline_size = enum.auto() # (= 31) # float TabBarOverlineSize
  4268. # ImGuiStyleVar_TableAngledHeadersAngle, /* original C++ signature */
  4269. table_angled_headers_angle = enum.auto() # (= 32) # float TableAngledHeadersAngle
  4270. # ImGuiStyleVar_TableAngledHeadersTextAlign, /* original C++ signature */
  4271. table_angled_headers_text_align = enum.auto() # (= 33) # ImVec2 TableAngledHeadersTextAlign
  4272. # ImGuiStyleVar_TreeLinesSize, /* original C++ signature */
  4273. tree_lines_size = enum.auto() # (= 34) # float TreeLinesSize
  4274. # ImGuiStyleVar_TreeLinesRounding, /* original C++ signature */
  4275. tree_lines_rounding = enum.auto() # (= 35) # float TreeLinesRounding
  4276. # ImGuiStyleVar_DragDropTargetRounding, /* original C++ signature */
  4277. drag_drop_target_rounding = enum.auto() # (= 36) # float DragDropTargetRounding
  4278. # ImGuiStyleVar_ButtonTextAlign, /* original C++ signature */
  4279. button_text_align = enum.auto() # (= 37) # ImVec2 ButtonTextAlign
  4280. # ImGuiStyleVar_SelectableTextAlign, /* original C++ signature */
  4281. selectable_text_align = enum.auto() # (= 38) # ImVec2 SelectableTextAlign
  4282. # ImGuiStyleVar_SeparatorSize, /* original C++ signature */
  4283. separator_size = enum.auto() # (= 39) # float SeparatorSize
  4284. # ImGuiStyleVar_SeparatorTextBorderSize, /* original C++ signature */
  4285. separator_text_border_size = enum.auto() # (= 40) # float SeparatorTextBorderSize
  4286. # ImGuiStyleVar_SeparatorTextAlign, /* original C++ signature */
  4287. separator_text_align = enum.auto() # (= 41) # ImVec2 SeparatorTextAlign
  4288. # ImGuiStyleVar_SeparatorTextPadding, /* original C++ signature */
  4289. separator_text_padding = enum.auto() # (= 42) # ImVec2 SeparatorTextPadding
  4290. # ImGuiStyleVar_DockingSeparatorSize, /* original C++ signature */
  4291. docking_separator_size = enum.auto() # (= 43) # float DockingSeparatorSize
  4292. # ImGuiStyleVar_COUNT /* original C++ signature */
  4293. # }
  4294. count = enum.auto() # (= 44)
  4295. class ButtonFlags_(enum.IntFlag):
  4296. """Flags for InvisibleButton() [extended in imgui_internal.h]"""
  4297. # ImGuiButtonFlags_None = 0, /* original C++ signature */
  4298. none = enum.auto() # (= 0)
  4299. # ImGuiButtonFlags_MouseButtonLeft = 1 << 0, /* original C++ signature */
  4300. mouse_button_left = enum.auto() # (= 1 << 0) # React on left mouse button (default)
  4301. # ImGuiButtonFlags_MouseButtonRight = 1 << 1, /* original C++ signature */
  4302. mouse_button_right = enum.auto() # (= 1 << 1) # React on right mouse button
  4303. # ImGuiButtonFlags_MouseButtonMiddle = 1 << 2, /* original C++ signature */
  4304. mouse_button_middle = enum.auto() # (= 1 << 2) # React on center mouse button
  4305. # ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle, /* original C++ signature */
  4306. mouse_button_mask_ = (
  4307. enum.auto()
  4308. ) # (= ButtonFlags_MouseButtonLeft | ButtonFlags_MouseButtonRight | ButtonFlags_MouseButtonMiddle) # [Internal]
  4309. # ImGuiButtonFlags_EnableNav = 1 << 3, /* original C++ signature */
  4310. enable_nav = (
  4311. enum.auto()
  4312. ) # (= 1 << 3) # InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default.
  4313. # ImGuiButtonFlags_AllowOverlap = 1 << 12, /* original C++ signature */
  4314. allow_overlap = (
  4315. enum.auto()
  4316. ) # (= 1 << 12) # Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
  4317. class ColorEditFlags_(enum.IntFlag):
  4318. """Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton()"""
  4319. # ImGuiColorEditFlags_None = 0, /* original C++ signature */
  4320. none = enum.auto() # (= 0)
  4321. # ImGuiColorEditFlags_NoAlpha = 1 << 1, /* original C++ signature */
  4322. no_alpha = (
  4323. enum.auto()
  4324. ) # (= 1 << 1) # // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).
  4325. # ImGuiColorEditFlags_NoPicker = 1 << 2, /* original C++ signature */
  4326. no_picker = enum.auto() # (= 1 << 2) # // ColorEdit: disable picker when clicking on color square.
  4327. # ImGuiColorEditFlags_NoOptions = 1 << 3, /* original C++ signature */
  4328. no_options = (
  4329. enum.auto()
  4330. ) # (= 1 << 3) # // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.
  4331. # ImGuiColorEditFlags_NoSmallPreview = 1 << 4, /* original C++ signature */
  4332. no_small_preview = (
  4333. enum.auto()
  4334. ) # (= 1 << 4) # // ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the inputs)
  4335. # ImGuiColorEditFlags_NoInputs = 1 << 5, /* original C++ signature */
  4336. no_inputs = (
  4337. enum.auto()
  4338. ) # (= 1 << 5) # // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview color square).
  4339. # ImGuiColorEditFlags_NoTooltip = 1 << 6, /* original C++ signature */
  4340. no_tooltip = (
  4341. enum.auto()
  4342. ) # (= 1 << 6) # // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.
  4343. # ImGuiColorEditFlags_NoLabel = 1 << 7, /* original C++ signature */
  4344. no_label = (
  4345. enum.auto()
  4346. ) # (= 1 << 7) # // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).
  4347. # ImGuiColorEditFlags_NoSidePreview = 1 << 8, /* original C++ signature */
  4348. no_side_preview = (
  4349. enum.auto()
  4350. ) # (= 1 << 8) # // ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead.
  4351. # ImGuiColorEditFlags_NoDragDrop = 1 << 9, /* original C++ signature */
  4352. no_drag_drop = (
  4353. enum.auto()
  4354. ) # (= 1 << 9) # // ColorEdit: disable drag and drop target/source. ColorButton: disable drag and drop source.
  4355. # ImGuiColorEditFlags_NoBorder = 1 << 10, /* original C++ signature */
  4356. no_border = enum.auto() # (= 1 << 10) # // ColorButton: disable border (which is enforced by default)
  4357. # ImGuiColorEditFlags_NoColorMarkers = 1 << 11, /* original C++ signature */
  4358. no_color_markers = (
  4359. enum.auto()
  4360. ) # (= 1 << 11) # // ColorEdit: disable rendering R/G/B/A color marker. May also be disabled globally by setting style.ColorMarkerSize = 0.
  4361. # Alpha preview
  4362. # - Prior to 1.91.8 (2025/01/21): alpha was made opaque in the preview by default using old name ImGuiColorEditFlags_AlphaPreview.
  4363. # - We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior.
  4364. # - The new flags may be combined better and allow finer controls.
  4365. # ImGuiColorEditFlags_AlphaOpaque = 1 << 12, /* original C++ signature */
  4366. alpha_opaque = (
  4367. enum.auto()
  4368. ) # (= 1 << 12) # // ColorEdit, ColorPicker, ColorButton: disable alpha in the preview,. Contrary to _NoAlpha it may still be edited when calling ColorEdit4()/ColorPicker4(). For ColorButton() this does the same as _NoAlpha.
  4369. # ImGuiColorEditFlags_AlphaNoBg = 1 << 13, /* original C++ signature */
  4370. alpha_no_bg = (
  4371. enum.auto()
  4372. ) # (= 1 << 13) # // ColorEdit, ColorPicker, ColorButton: disable rendering a checkerboard background behind transparent color.
  4373. # ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 14, /* original C++ signature */
  4374. alpha_preview_half = (
  4375. enum.auto()
  4376. ) # (= 1 << 14) # // ColorEdit, ColorPicker, ColorButton: display half opaque / half transparent preview.
  4377. # User Options (right-click on widget to change some of them).
  4378. # ImGuiColorEditFlags_AlphaBar = 1 << 18, /* original C++ signature */
  4379. alpha_bar = (
  4380. enum.auto()
  4381. ) # (= 1 << 18) # // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
  4382. # ImGuiColorEditFlags_HDR = 1 << 19, /* original C++ signature */
  4383. hdr = (
  4384. enum.auto()
  4385. ) # (= 1 << 19) # // (WIP) ColorEdit: Currently only disable 0.0..1.0 limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).
  4386. # ImGuiColorEditFlags_DisplayRGB = 1 << 20, /* original C++ signature */
  4387. display_rgb = (
  4388. enum.auto()
  4389. ) # (= 1 << 20) # [Display] // ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.
  4390. # ImGuiColorEditFlags_DisplayHSV = 1 << 21, /* original C++ signature */
  4391. display_hsv = enum.auto() # (= 1 << 21) # [Display] // "
  4392. # ImGuiColorEditFlags_DisplayHex = 1 << 22, /* original C++ signature */
  4393. display_hex = enum.auto() # (= 1 << 22) # [Display] // "
  4394. # ImGuiColorEditFlags_Uint8 = 1 << 23, /* original C++ signature */
  4395. uint8 = (
  4396. enum.auto()
  4397. ) # (= 1 << 23) # [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255.
  4398. # ImGuiColorEditFlags_Float = 1 << 24, /* original C++ signature */
  4399. float = (
  4400. enum.auto()
  4401. ) # (= 1 << 24) # [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0..1.0 floats instead of 0..255 integers. No round-trip of value via integers.
  4402. # ImGuiColorEditFlags_PickerHueBar = 1 << 25, /* original C++ signature */
  4403. picker_hue_bar = enum.auto() # (= 1 << 25) # [Picker] // ColorPicker: bar for Hue, rectangle for Sat/Value.
  4404. # ImGuiColorEditFlags_PickerHueWheel = 1 << 26, /* original C++ signature */
  4405. picker_hue_wheel = enum.auto() # (= 1 << 26) # [Picker] // ColorPicker: wheel for Hue, triangle for Sat/Value.
  4406. # ImGuiColorEditFlags_InputRGB = 1 << 27, /* original C++ signature */
  4407. input_rgb = (
  4408. enum.auto()
  4409. ) # (= 1 << 27) # [Input] // ColorEdit, ColorPicker: input and output data in RGB format.
  4410. # ImGuiColorEditFlags_InputHSV = 1 << 28, /* original C++ signature */
  4411. input_hsv = (
  4412. enum.auto()
  4413. ) # (= 1 << 28) # [Input] // ColorEdit, ColorPicker: input and output data in HSV format.
  4414. # ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar, /* original C++ signature */
  4415. # Defaults Options. You can set application defaults using SetColorEditOptions(). The intent is that you probably don't want to
  4416. # override them in most of your calls. Let the user choose via the option menu and/or call SetColorEditOptions() once during startup.
  4417. default_options_ = (
  4418. enum.auto()
  4419. ) # (= ColorEditFlags_Uint8 | ColorEditFlags_DisplayRGB | ColorEditFlags_InputRGB | ColorEditFlags_PickerHueBar)
  4420. # [Internal] Masks
  4421. # ImGuiColorEditFlags_AlphaMask_ = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaOpaque | ImGuiColorEditFlags_AlphaNoBg | ImGuiColorEditFlags_AlphaPreviewHalf, /* original C++ signature */
  4422. alpha_mask_ = (
  4423. enum.auto()
  4424. ) # (= ColorEditFlags_NoAlpha | ColorEditFlags_AlphaOpaque | ColorEditFlags_AlphaNoBg | ColorEditFlags_AlphaPreviewHalf)
  4425. # ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex, /* original C++ signature */
  4426. display_mask_ = enum.auto() # (= ColorEditFlags_DisplayRGB | ColorEditFlags_DisplayHSV | ColorEditFlags_DisplayHex)
  4427. # ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float, /* original C++ signature */
  4428. data_type_mask_ = enum.auto() # (= ColorEditFlags_Uint8 | ColorEditFlags_Float)
  4429. # ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar, /* original C++ signature */
  4430. picker_mask_ = enum.auto() # (= ColorEditFlags_PickerHueWheel | ColorEditFlags_PickerHueBar)
  4431. # ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV, /* original C++ signature */
  4432. input_mask_ = enum.auto() # (= ColorEditFlags_InputRGB | ColorEditFlags_InputHSV)
  4433. # Obsolete names
  4434. # ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex // [renamed in 1.69]
  4435. class SliderFlags_(enum.IntFlag):
  4436. """Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
  4437. We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
  4438. (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText)
  4439. """
  4440. # ImGuiSliderFlags_None = 0, /* original C++ signature */
  4441. none = enum.auto() # (= 0)
  4442. # ImGuiSliderFlags_Logarithmic = 1 << 5, /* original C++ signature */
  4443. logarithmic = (
  4444. enum.auto()
  4445. ) # (= 1 << 5) # Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with this if using a format-string with small amount of digits.
  4446. # ImGuiSliderFlags_NoRoundToFormat = 1 << 6, /* original C++ signature */
  4447. no_round_to_format = (
  4448. enum.auto()
  4449. ) # (= 1 << 6) # Disable rounding underlying value to match precision of the display format string (e.g. %.3 values are rounded to those 3 digits).
  4450. # ImGuiSliderFlags_NoInput = 1 << 7, /* original C++ signature */
  4451. no_input = (
  4452. enum.auto()
  4453. ) # (= 1 << 7) # Disable Ctrl+Click or Enter key allowing to input text directly into the widget.
  4454. # ImGuiSliderFlags_WrapAround = 1 << 8, /* original C++ signature */
  4455. wrap_around = (
  4456. enum.auto()
  4457. ) # (= 1 << 8) # Enable wrapping around from max to min and from min to max. Only supported by DragXXX() functions for now.
  4458. # ImGuiSliderFlags_ClampOnInput = 1 << 9, /* original C++ signature */
  4459. clamp_on_input = (
  4460. enum.auto()
  4461. ) # (= 1 << 9) # Clamp value to min/max bounds when input manually with Ctrl+Click. By default Ctrl+Click allows going out of bounds.
  4462. # ImGuiSliderFlags_ClampZeroRange = 1 << 10, /* original C++ signature */
  4463. clamp_zero_range = (
  4464. enum.auto()
  4465. ) # (= 1 << 10) # Clamp even if min==max==0.0. Otherwise due to legacy reason DragXXX functions don't clamp with those values. When your clamping limits are dynamic you almost always want to use it.
  4466. # ImGuiSliderFlags_NoSpeedTweaks = 1 << 11, /* original C++ signature */
  4467. no_speed_tweaks = (
  4468. enum.auto()
  4469. ) # (= 1 << 11) # Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based on your own logic.
  4470. # ImGuiSliderFlags_ColorMarkers = 1 << 12, /* original C++ signature */
  4471. color_markers = (
  4472. enum.auto()
  4473. ) # (= 1 << 12) # DragScalarN(), SliderScalarN(): Draw R/G/B/A color markers on each component.
  4474. # ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange, /* original C++ signature */
  4475. always_clamp = enum.auto() # (= SliderFlags_ClampOnInput | SliderFlags_ClampZeroRange)
  4476. # ImGuiSliderFlags_InvalidMask_ = 0x7000000F, /* original C++ signature */
  4477. invalid_mask_ = (
  4478. enum.auto()
  4479. ) # (= 0x7000000F) # [Internal] We treat using those bits as being potentially a 'float power' argument from legacy API (obsoleted 2020-08) that has got miscast to this enum, and will trigger an assert if needed.
  4480. class MouseButton_(enum.IntFlag):
  4481. """Identify a mouse button.
  4482. Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience.
  4483. """
  4484. # ImGuiMouseButton_Left = 0, /* original C++ signature */
  4485. left = enum.auto() # (= 0)
  4486. # ImGuiMouseButton_Right = 1, /* original C++ signature */
  4487. right = enum.auto() # (= 1)
  4488. # ImGuiMouseButton_Middle = 2, /* original C++ signature */
  4489. middle = enum.auto() # (= 2)
  4490. # ImGuiMouseButton_COUNT = 5 /* original C++ signature */
  4491. # }
  4492. count = enum.auto() # (= 5)
  4493. class MouseCursor_(enum.IntFlag):
  4494. """Enumeration for GetMouseCursor()
  4495. User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here
  4496. """
  4497. # ImGuiMouseCursor_None = -1, /* original C++ signature */
  4498. none = enum.auto() # (= -1)
  4499. # ImGuiMouseCursor_Arrow = 0, /* original C++ signature */
  4500. arrow = enum.auto() # (= 0)
  4501. # ImGuiMouseCursor_TextInput, /* original C++ signature */
  4502. text_input = enum.auto() # (= 1) # When hovering over InputText, etc.
  4503. # ImGuiMouseCursor_ResizeAll, /* original C++ signature */
  4504. resize_all = enum.auto() # (= 2) # (Unused by Dear ImGui functions)
  4505. # ImGuiMouseCursor_ResizeNS, /* original C++ signature */
  4506. resize_ns = enum.auto() # (= 3) # When hovering over a horizontal border
  4507. # ImGuiMouseCursor_ResizeEW, /* original C++ signature */
  4508. resize_ew = enum.auto() # (= 4) # When hovering over a vertical border or a column
  4509. # ImGuiMouseCursor_ResizeNESW, /* original C++ signature */
  4510. resize_nesw = enum.auto() # (= 5) # When hovering over the bottom-left corner of a window
  4511. # ImGuiMouseCursor_ResizeNWSE, /* original C++ signature */
  4512. resize_nwse = enum.auto() # (= 6) # When hovering over the bottom-right corner of a window
  4513. # ImGuiMouseCursor_Hand, /* original C++ signature */
  4514. hand = enum.auto() # (= 7) # (Unused by Dear ImGui functions. Use for e.g. hyperlinks)
  4515. # ImGuiMouseCursor_Wait, /* original C++ signature */
  4516. wait = enum.auto() # (= 8) # When waiting for something to process/load.
  4517. # ImGuiMouseCursor_Progress, /* original C++ signature */
  4518. progress = enum.auto() # (= 9) # When waiting for something to process/load, but application is still interactive.
  4519. # ImGuiMouseCursor_NotAllowed, /* original C++ signature */
  4520. not_allowed = (
  4521. enum.auto()
  4522. ) # (= 10) # When hovering something with disallowed interaction. Usually a crossed circle.
  4523. # ImGuiMouseCursor_COUNT /* original C++ signature */
  4524. # }
  4525. count = enum.auto() # (= 11)
  4526. class MouseSource(enum.IntFlag):
  4527. """Enumeration for AddMouseSourceEvent() actual source of Mouse Input data.
  4528. Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent()
  4529. But that "Mouse" data can come from different source which occasionally may be useful for application to know about.
  4530. You can submit a change of pointer type using io.AddMouseSourceEvent().
  4531. """
  4532. # ImGuiMouseSource_Mouse = 0, /* original C++ signature */
  4533. mouse = enum.auto() # (= 0) # Input is coming from an actual mouse.
  4534. # ImGuiMouseSource_TouchScreen, /* original C++ signature */
  4535. touch_screen = (
  4536. enum.auto()
  4537. ) # (= 1) # Input is coming from a touch screen (no hovering prior to initial press, less precise initial press aiming, dual-axis wheeling possible).
  4538. # ImGuiMouseSource_Pen, /* original C++ signature */
  4539. pen = (
  4540. enum.auto()
  4541. ) # (= 2) # Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
  4542. # ImGuiMouseSource_COUNT /* original C++ signature */
  4543. # }
  4544. count = enum.auto() # (= 3)
  4545. class Cond_(enum.IntFlag):
  4546. """Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions
  4547. Represent a condition.
  4548. Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always.
  4549. """
  4550. # ImGuiCond_None = 0, /* original C++ signature */
  4551. none = enum.auto() # (= 0) # No condition (always set the variable), same as _Always
  4552. # ImGuiCond_Always = 1 << 0, /* original C++ signature */
  4553. always = enum.auto() # (= 1 << 0) # No condition (always set the variable), same as _None
  4554. # ImGuiCond_Once = 1 << 1, /* original C++ signature */
  4555. once = enum.auto() # (= 1 << 1) # Set the variable once per runtime session (only the first call will succeed)
  4556. # ImGuiCond_FirstUseEver = 1 << 2, /* original C++ signature */
  4557. first_use_ever = (
  4558. enum.auto()
  4559. ) # (= 1 << 2) # Set the variable if the object/window has no persistently saved data (no entry in .ini file)
  4560. # ImGuiCond_Appearing = 1 << 3, /* original C++ signature */
  4561. appearing = (
  4562. enum.auto()
  4563. ) # (= 1 << 3) # Set the variable if the object/window is appearing after being hidden/inactive (or the first time)
  4564. # -----------------------------------------------------------------------------
  4565. # [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
  4566. # -----------------------------------------------------------------------------
  4567. class TableFlags_(enum.IntFlag):
  4568. """Flags for ImGui::BeginTable()
  4569. - Important! Sizing policies have complex and subtle side effects, much more so than you would expect.
  4570. Read comments/demos carefully + experiment with live demos to get acquainted with them.
  4571. - The DEFAULT sizing policies are:
  4572. - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize.
  4573. - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off.
  4574. - When ScrollX is off:
  4575. - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
  4576. - Columns sizing policy allowed: Stretch (default), Fixed/Auto.
  4577. - Fixed Columns (if any) will generally obtain their requested width (unless the table cannot fit them all).
  4578. - Stretch Columns will share the remaining width according to their respective weight.
  4579. - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
  4580. The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
  4581. (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
  4582. - When ScrollX is on:
  4583. - Table defaults to ImGuiTableFlags_SizingFixedFit -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed
  4584. - Columns sizing policy allowed: Fixed/Auto mostly.
  4585. - Fixed Columns can be enlarged as needed. Table will show a horizontal scrollbar if needed.
  4586. - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop.
  4587. - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
  4588. If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again.
  4589. - Read on documentation at the top of imgui_tables.cpp for details.
  4590. """
  4591. # Features
  4592. # ImGuiTableFlags_None = 0, /* original C++ signature */
  4593. none = enum.auto() # (= 0)
  4594. # ImGuiTableFlags_Resizable = 1 << 0, /* original C++ signature */
  4595. resizable = enum.auto() # (= 1 << 0) # Enable resizing columns.
  4596. # ImGuiTableFlags_Reorderable = 1 << 1, /* original C++ signature */
  4597. reorderable = (
  4598. enum.auto()
  4599. ) # (= 1 << 1) # Enable reordering columns in header row. (Need calling TableSetupColumn() + TableHeadersRow() to display headers, or using ImGuiTableFlags_ContextMenuInBody to access context-menu without headers).
  4600. # ImGuiTableFlags_Hideable = 1 << 2, /* original C++ signature */
  4601. hideable = enum.auto() # (= 1 << 2) # Enable hiding/disabling columns in context menu.
  4602. # ImGuiTableFlags_Sortable = 1 << 3, /* original C++ signature */
  4603. sortable = (
  4604. enum.auto()
  4605. ) # (= 1 << 3) # Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.
  4606. # ImGuiTableFlags_NoSavedSettings = 1 << 4, /* original C++ signature */
  4607. no_saved_settings = (
  4608. enum.auto()
  4609. ) # (= 1 << 4) # Disable persisting columns order, width, visibility and sort settings in the .ini file.
  4610. # ImGuiTableFlags_ContextMenuInBody = 1 << 5, /* original C++ signature */
  4611. context_menu_in_body = (
  4612. enum.auto()
  4613. ) # (= 1 << 5) # Right-click on columns body/contents will also display table context menu. By default it is available in TableHeadersRow().
  4614. # Decorations
  4615. # ImGuiTableFlags_RowBg = 1 << 6, /* original C++ signature */
  4616. row_bg = (
  4617. enum.auto()
  4618. ) # (= 1 << 6) # Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
  4619. # ImGuiTableFlags_BordersInnerH = 1 << 7, /* original C++ signature */
  4620. borders_inner_h = enum.auto() # (= 1 << 7) # Draw horizontal borders between rows.
  4621. # ImGuiTableFlags_BordersOuterH = 1 << 8, /* original C++ signature */
  4622. borders_outer_h = enum.auto() # (= 1 << 8) # Draw horizontal borders at the top and bottom.
  4623. # ImGuiTableFlags_BordersInnerV = 1 << 9, /* original C++ signature */
  4624. borders_inner_v = enum.auto() # (= 1 << 9) # Draw vertical borders between columns.
  4625. # ImGuiTableFlags_BordersOuterV = 1 << 10, /* original C++ signature */
  4626. borders_outer_v = enum.auto() # (= 1 << 10) # Draw vertical borders on the left and right sides.
  4627. # ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, /* original C++ signature */
  4628. borders_h = enum.auto() # (= TableFlags_BordersInnerH | TableFlags_BordersOuterH) # Draw horizontal borders.
  4629. # ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, /* original C++ signature */
  4630. borders_v = enum.auto() # (= TableFlags_BordersInnerV | TableFlags_BordersOuterV) # Draw vertical borders.
  4631. # ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, /* original C++ signature */
  4632. borders_inner = enum.auto() # (= TableFlags_BordersInnerV | TableFlags_BordersInnerH) # Draw inner borders.
  4633. # ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, /* original C++ signature */
  4634. borders_outer = enum.auto() # (= TableFlags_BordersOuterV | TableFlags_BordersOuterH) # Draw outer borders.
  4635. # ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, /* original C++ signature */
  4636. borders = enum.auto() # (= TableFlags_BordersInner | TableFlags_BordersOuter) # Draw all borders.
  4637. # ImGuiTableFlags_NoBordersInBody = 1 << 11, /* original C++ signature */
  4638. no_borders_in_body = (
  4639. enum.auto()
  4640. ) # (= 1 << 11) # [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style
  4641. # ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, /* original C++ signature */
  4642. no_borders_in_body_until_resize = (
  4643. enum.auto()
  4644. ) # (= 1 << 12) # [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style
  4645. # Sizing Policy (read above for defaults)
  4646. # ImGuiTableFlags_SizingFixedFit = 1 << 13, /* original C++ signature */
  4647. sizing_fixed_fit = (
  4648. enum.auto()
  4649. ) # (= 1 << 13) # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
  4650. # ImGuiTableFlags_SizingFixedSame = 2 << 13, /* original C++ signature */
  4651. sizing_fixed_same = (
  4652. enum.auto()
  4653. ) # (= 2 << 13) # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.
  4654. # ImGuiTableFlags_SizingStretchProp = 3 << 13, /* original C++ signature */
  4655. sizing_stretch_prop = (
  4656. enum.auto()
  4657. ) # (= 3 << 13) # Columns default to _WidthStretch with default weights proportional to each columns contents widths.
  4658. # ImGuiTableFlags_SizingStretchSame = 4 << 13, /* original C++ signature */
  4659. sizing_stretch_same = (
  4660. enum.auto()
  4661. ) # (= 4 << 13) # Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
  4662. # Sizing Extra Options
  4663. # ImGuiTableFlags_NoHostExtendX = 1 << 16, /* original C++ signature */
  4664. no_host_extend_x = (
  4665. enum.auto()
  4666. ) # (= 1 << 16) # Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.
  4667. # ImGuiTableFlags_NoHostExtendY = 1 << 17, /* original C++ signature */
  4668. no_host_extend_y = (
  4669. enum.auto()
  4670. ) # (= 1 << 17) # Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.
  4671. # ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, /* original C++ signature */
  4672. no_keep_columns_visible = (
  4673. enum.auto()
  4674. ) # (= 1 << 18) # Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.
  4675. # ImGuiTableFlags_PreciseWidths = 1 << 19, /* original C++ signature */
  4676. precise_widths = (
  4677. enum.auto()
  4678. ) # (= 1 << 19) # Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
  4679. # Clipping
  4680. # ImGuiTableFlags_NoClip = 1 << 20, /* original C++ signature */
  4681. no_clip = (
  4682. enum.auto()
  4683. ) # (= 1 << 20) # Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
  4684. # Padding
  4685. # ImGuiTableFlags_PadOuterX = 1 << 21, /* original C++ signature */
  4686. pad_outer_x = (
  4687. enum.auto()
  4688. ) # (= 1 << 21) # Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.
  4689. # ImGuiTableFlags_NoPadOuterX = 1 << 22, /* original C++ signature */
  4690. no_pad_outer_x = enum.auto() # (= 1 << 22) # Default if BordersOuterV is off. Disable outermost padding.
  4691. # ImGuiTableFlags_NoPadInnerX = 1 << 23, /* original C++ signature */
  4692. no_pad_inner_x = (
  4693. enum.auto()
  4694. ) # (= 1 << 23) # Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
  4695. # Scrolling
  4696. # ImGuiTableFlags_ScrollX = 1 << 24, /* original C++ signature */
  4697. scroll_x = (
  4698. enum.auto()
  4699. ) # (= 1 << 24) # Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.
  4700. # ImGuiTableFlags_ScrollY = 1 << 25, /* original C++ signature */
  4701. scroll_y = (
  4702. enum.auto()
  4703. ) # (= 1 << 25) # Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
  4704. # Sorting
  4705. # ImGuiTableFlags_SortMulti = 1 << 26, /* original C++ signature */
  4706. sort_multi = (
  4707. enum.auto()
  4708. ) # (= 1 << 26) # Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1).
  4709. # ImGuiTableFlags_SortTristate = 1 << 27, /* original C++ signature */
  4710. sort_tristate = (
  4711. enum.auto()
  4712. ) # (= 1 << 27) # Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).
  4713. # Miscellaneous
  4714. # ImGuiTableFlags_HighlightHoveredColumn = 1 << 28, /* original C++ signature */
  4715. highlight_hovered_column = (
  4716. enum.auto()
  4717. ) # (= 1 << 28) # Highlight column headers when hovered (may evolve into a fuller highlight)
  4718. # ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame, /* original C++ signature */
  4719. # }
  4720. # [Internal] Combinations and masks
  4721. sizing_mask_ = (
  4722. enum.auto()
  4723. ) # (= TableFlags_SizingFixedFit | TableFlags_SizingFixedSame | TableFlags_SizingStretchProp | TableFlags_SizingStretchSame)
  4724. class TableColumnFlags_(enum.IntFlag):
  4725. """Flags for ImGui::TableSetupColumn()"""
  4726. # Input configuration flags
  4727. # ImGuiTableColumnFlags_None = 0, /* original C++ signature */
  4728. none = enum.auto() # (= 0)
  4729. # ImGuiTableColumnFlags_Disabled = 1 << 0, /* original C++ signature */
  4730. disabled = (
  4731. enum.auto()
  4732. ) # (= 1 << 0) # Overriding/master disable flag: hide column, won't show in context menu (unlike calling TableSetColumnEnabled() which manipulates the user accessible state)
  4733. # ImGuiTableColumnFlags_DefaultHide = 1 << 1, /* original C++ signature */
  4734. default_hide = enum.auto() # (= 1 << 1) # Default as a hidden/disabled column.
  4735. # ImGuiTableColumnFlags_DefaultSort = 1 << 2, /* original C++ signature */
  4736. default_sort = enum.auto() # (= 1 << 2) # Default as a sorting column.
  4737. # ImGuiTableColumnFlags_WidthStretch = 1 << 3, /* original C++ signature */
  4738. width_stretch = (
  4739. enum.auto()
  4740. ) # (= 1 << 3) # Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp).
  4741. # ImGuiTableColumnFlags_WidthFixed = 1 << 4, /* original C++ signature */
  4742. width_fixed = (
  4743. enum.auto()
  4744. ) # (= 1 << 4) # Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable).
  4745. # ImGuiTableColumnFlags_NoResize = 1 << 5, /* original C++ signature */
  4746. no_resize = enum.auto() # (= 1 << 5) # Disable manual resizing.
  4747. # ImGuiTableColumnFlags_NoReorder = 1 << 6, /* original C++ signature */
  4748. no_reorder = (
  4749. enum.auto()
  4750. ) # (= 1 << 6) # Disable manual reordering this column, this will also prevent other columns from crossing over this column.
  4751. # ImGuiTableColumnFlags_NoHide = 1 << 7, /* original C++ signature */
  4752. no_hide = enum.auto() # (= 1 << 7) # Disable ability to hide/disable this column.
  4753. # ImGuiTableColumnFlags_NoClip = 1 << 8, /* original C++ signature */
  4754. no_clip = (
  4755. enum.auto()
  4756. ) # (= 1 << 8) # Disable clipping for this column (all NoClip columns will render in a same draw command).
  4757. # ImGuiTableColumnFlags_NoSort = 1 << 9, /* original C++ signature */
  4758. no_sort = (
  4759. enum.auto()
  4760. ) # (= 1 << 9) # Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
  4761. # ImGuiTableColumnFlags_NoSortAscending = 1 << 10, /* original C++ signature */
  4762. no_sort_ascending = enum.auto() # (= 1 << 10) # Disable ability to sort in the ascending direction.
  4763. # ImGuiTableColumnFlags_NoSortDescending = 1 << 11, /* original C++ signature */
  4764. no_sort_descending = enum.auto() # (= 1 << 11) # Disable ability to sort in the descending direction.
  4765. # ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, /* original C++ signature */
  4766. no_header_label = (
  4767. enum.auto()
  4768. ) # (= 1 << 12) # TableHeadersRow() will submit an empty label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers. You may append into this cell by calling TableSetColumnIndex() right after the TableHeadersRow() call.
  4769. # ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, /* original C++ signature */
  4770. no_header_width = enum.auto() # (= 1 << 13) # Disable header text width contribution to automatic column width.
  4771. # ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, /* original C++ signature */
  4772. prefer_sort_ascending = (
  4773. enum.auto()
  4774. ) # (= 1 << 14) # Make the initial sort direction Ascending when first sorting on this column (default).
  4775. # ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, /* original C++ signature */
  4776. prefer_sort_descending = (
  4777. enum.auto()
  4778. ) # (= 1 << 15) # Make the initial sort direction Descending when first sorting on this column.
  4779. # ImGuiTableColumnFlags_IndentEnable = 1 << 16, /* original C++ signature */
  4780. indent_enable = enum.auto() # (= 1 << 16) # Use current Indent value when entering cell (default for column 0).
  4781. # ImGuiTableColumnFlags_IndentDisable = 1 << 17, /* original C++ signature */
  4782. indent_disable = (
  4783. enum.auto()
  4784. ) # (= 1 << 17) # Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored.
  4785. # ImGuiTableColumnFlags_AngledHeader = 1 << 18, /* original C++ signature */
  4786. angled_header = (
  4787. enum.auto()
  4788. ) # (= 1 << 18) # TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row.
  4789. # Output status flags, read-only via TableGetColumnFlags()
  4790. # ImGuiTableColumnFlags_IsEnabled = 1 << 24, /* original C++ signature */
  4791. is_enabled = (
  4792. enum.auto()
  4793. ) # (= 1 << 24) # Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
  4794. # ImGuiTableColumnFlags_IsVisible = 1 << 25, /* original C++ signature */
  4795. is_visible = enum.auto() # (= 1 << 25) # Status: is visible == is enabled AND not clipped by scrolling.
  4796. # ImGuiTableColumnFlags_IsSorted = 1 << 26, /* original C++ signature */
  4797. is_sorted = enum.auto() # (= 1 << 26) # Status: is currently part of the sort specs
  4798. # ImGuiTableColumnFlags_IsHovered = 1 << 27, /* original C++ signature */
  4799. is_hovered = enum.auto() # (= 1 << 27) # Status: is hovered by mouse
  4800. # [Internal] Combinations and masks
  4801. # ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed, /* original C++ signature */
  4802. width_mask_ = enum.auto() # (= TableColumnFlags_WidthStretch | TableColumnFlags_WidthFixed)
  4803. # ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable, /* original C++ signature */
  4804. indent_mask_ = enum.auto() # (= TableColumnFlags_IndentEnable | TableColumnFlags_IndentDisable)
  4805. # ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered, /* original C++ signature */
  4806. status_mask_ = (
  4807. enum.auto()
  4808. ) # (= TableColumnFlags_IsEnabled | TableColumnFlags_IsVisible | TableColumnFlags_IsSorted | TableColumnFlags_IsHovered)
  4809. # ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, /* original C++ signature */
  4810. no_direct_resize_ = (
  4811. enum.auto()
  4812. ) # (= 1 << 30) # [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)
  4813. class TableRowFlags_(enum.IntFlag):
  4814. """Flags for ImGui::TableNextRow()"""
  4815. # ImGuiTableRowFlags_None = 0, /* original C++ signature */
  4816. none = enum.auto() # (= 0)
  4817. # ImGuiTableRowFlags_Headers = 1 << 0, /* original C++ signature */
  4818. headers = (
  4819. enum.auto()
  4820. ) # (= 1 << 0) # Identify header row (set default background color + width of its contents accounted differently for auto column width)
  4821. class TableBgTarget_(enum.IntFlag):
  4822. """Enum for ImGui::TableSetBgColor()
  4823. Background colors are rendering in 3 layers:
  4824. - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set.
  4825. - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set.
  4826. - Layer 2: draw with CellBg color if set.
  4827. The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color.
  4828. When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows.
  4829. If you set the color of RowBg0 target, your color will override the existing RowBg0 color.
  4830. If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color.
  4831. """
  4832. # ImGuiTableBgTarget_None = 0, /* original C++ signature */
  4833. none = enum.auto() # (= 0)
  4834. # ImGuiTableBgTarget_RowBg0 = 1, /* original C++ signature */
  4835. row_bg0 = (
  4836. enum.auto()
  4837. ) # (= 1) # Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used)
  4838. # ImGuiTableBgTarget_RowBg1 = 2, /* original C++ signature */
  4839. row_bg1 = enum.auto() # (= 2) # Set row background color 1 (generally used for selection marking)
  4840. # ImGuiTableBgTarget_CellBg = 3, /* original C++ signature */
  4841. cell_bg = enum.auto() # (= 3) # Set cell background color (top-most color)
  4842. class TableSortSpecs:
  4843. """Sorting specifications for a table (often handling sort specs for a single column, occasionally more)
  4844. Obtained by calling TableGetSortSpecs().
  4845. When 'SpecsDirty == True' you can sort your data. It will be True with sorting specs have changed since last call, or the first time.
  4846. Make sure to set 'SpecsDirty = False' after sorting, else you may wastefully sort your data every frame!
  4847. """
  4848. # const ImGuiTableColumnSortSpecs* Specs; /* original C++ signature */
  4849. specs: TableColumnSortSpecs # Pointer to sort spec array. # (const)
  4850. # int SpecsCount; /* original C++ signature */
  4851. specs_count: int # Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled.
  4852. # bool SpecsDirty; /* original C++ signature */
  4853. specs_dirty: (
  4854. bool # Set to True when specs have changed since last time! Use this to sort again, then clear the flag.
  4855. )
  4856. # ImGuiTableSortSpecs() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  4857. def __init__(self) -> None:
  4858. pass
  4859. # [ADAPT_IMGUI_BUNDLE]
  4860. # #ifdef IMGUI_BUNDLE_PYTHON_API
  4861. #
  4862. # IMGUI_API const ImGuiTableColumnSortSpecs& GetSpecs(size_t idx) const; /* original C++ signature */
  4863. def get_specs(self, idx: int) -> TableColumnSortSpecs:
  4864. pass
  4865. # #endif
  4866. #
  4867. # [/ADAPT_IMGUI_BUNDLE]
  4868. class TableColumnSortSpecs:
  4869. """Sorting specification for one column of a table (sizeof == 12 bytes)"""
  4870. # ImGuiID ColumnUserID; /* original C++ signature */
  4871. column_user_id: ID # User id of the column (if specified by a TableSetupColumn() call)
  4872. # ImS16 ColumnIndex; /* original C++ signature */
  4873. column_index: ImS16 # Index of the column
  4874. # ImS16 SortOrder; /* original C++ signature */
  4875. sort_order: ImS16 # Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
  4876. # ImGuiSortDirection SortDirection; /* original C++ signature */
  4877. sort_direction: SortDirection # ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
  4878. # ImGuiTableColumnSortSpecs() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  4879. def __init__(self) -> None:
  4880. pass
  4881. # [ADAPT_IMGUI_BUNDLE]
  4882. # #ifdef IMGUI_BUNDLE_PYTHON_API
  4883. #
  4884. # inline IMGUI_API ImGuiSortDirection GetSortDirection() { return SortDirection; } /* original C++ signature */
  4885. def get_sort_direction(self) -> SortDirection:
  4886. pass
  4887. # inline IMGUI_API void SetSortDirection(ImGuiSortDirection direction) { SortDirection = direction; } /* original C++ signature */
  4888. def set_sort_direction(self, direction: SortDirection) -> None:
  4889. pass
  4890. # #endif
  4891. #
  4892. # [/ADAPT_IMGUI_BUNDLE]
  4893. # -----------------------------------------------------------------------------
  4894. # [SECTION] Helpers: Debug log, memory allocations macros, ImVector<>
  4895. # -----------------------------------------------------------------------------
  4896. # -----------------------------------------------------------------------------
  4897. # Debug Logging into ShowDebugLogWindow(), tty and more.
  4898. # -----------------------------------------------------------------------------
  4899. # -----------------------------------------------------------------------------
  4900. # IM_MALLOC(), IM_FREE(), IM_NEW(), IM_PLACEMENT_NEW(), IM_DELETE()
  4901. # We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax.
  4902. # Defining a custom placement new() with a custom parameter allows us to bypass including <new> which on some platforms complains when user has disabled exceptions.
  4903. # -----------------------------------------------------------------------------
  4904. class ImNewWrapper:
  4905. # ImNewWrapper(); /* original C++ signature */
  4906. def __init__(self) -> None:
  4907. """Auto-generated default constructor"""
  4908. pass
  4909. # -----------------------------------------------------------------------------
  4910. # ImVector<>
  4911. # Lightweight std::vector<>-like class to avoid dragging dependencies (also, some implementations of STL with debug enabled are absurdly slow, we bypass it so our code runs fast in debug).
  4912. # -----------------------------------------------------------------------------
  4913. # - You generally do NOT need to care or use this ever. But we need to make it available in imgui.h because some of our public structures are relying on it.
  4914. # - We use std-like naming convention here, which is a little unusual for this codebase.
  4915. # - Important: clear() frees memory, resize(0) keep the allocated buffer. We use resize(0) a lot to intentionally recycle allocated buffers across frames and amortize our costs.
  4916. # - Important: our implementation does NOT call C++ constructors/destructors, we treat everything as raw data! This is intentional but be extra mindful of that,
  4917. # Do NOT use this class as a std::vector replacement in your own code! Many of the structures used by dear imgui can be safely initialized by a zero-memset.
  4918. # -----------------------------------------------------------------------------
  4919. # ------------------------------------------------------------------------
  4920. # <template specializations for class ImVector>
  4921. class ImVector_int: # Python specialization for ImVector<int>
  4922. # #ifdef IMGUI_BUNDLE_PYTHON_API
  4923. #
  4924. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  4925. def data_address(self) -> int:
  4926. """(private API)"""
  4927. pass
  4928. # #endif
  4929. #
  4930. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  4931. @overload
  4932. def __init__(self) -> None:
  4933. pass
  4934. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  4935. @overload
  4936. def __init__(self, src: ImVector_int) -> None:
  4937. pass
  4938. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  4939. def clear(self) -> None:
  4940. """Important: does not destruct anything
  4941. (private API)
  4942. """
  4943. pass
  4944. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  4945. def clear_destruct(self) -> None:
  4946. """Important: never called automatically! always explicit.
  4947. (private API)
  4948. """
  4949. pass
  4950. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  4951. def empty(self) -> bool:
  4952. """(private API)"""
  4953. pass
  4954. # inline int size() const { return Size; } /* original C++ signature */
  4955. def size(self) -> int:
  4956. """(private API)"""
  4957. pass
  4958. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  4959. def __getitem__(self, i: int) -> int:
  4960. """(private API)"""
  4961. pass
  4962. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  4963. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  4964. def push_back(self, v: int) -> None:
  4965. """(private API)"""
  4966. pass
  4967. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  4968. def pop_back(self) -> None:
  4969. """(private API)"""
  4970. pass
  4971. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  4972. def push_front(self, v: int) -> None:
  4973. """(private API)"""
  4974. pass
  4975. def __iter__(self) -> Iterator[int]:
  4976. pass
  4977. def __len__(self) -> int:
  4978. pass
  4979. class ImVector_uint: # Python specialization for ImVector<uint>
  4980. # #ifdef IMGUI_BUNDLE_PYTHON_API
  4981. #
  4982. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  4983. def data_address(self) -> int:
  4984. """(private API)"""
  4985. pass
  4986. # #endif
  4987. #
  4988. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  4989. @overload
  4990. def __init__(self) -> None:
  4991. pass
  4992. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  4993. @overload
  4994. def __init__(self, src: ImVector_uint) -> None:
  4995. pass
  4996. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  4997. def clear(self) -> None:
  4998. """Important: does not destruct anything
  4999. (private API)
  5000. """
  5001. pass
  5002. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5003. def clear_destruct(self) -> None:
  5004. """Important: never called automatically! always explicit.
  5005. (private API)
  5006. """
  5007. pass
  5008. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5009. def empty(self) -> bool:
  5010. """(private API)"""
  5011. pass
  5012. # inline int size() const { return Size; } /* original C++ signature */
  5013. def size(self) -> int:
  5014. """(private API)"""
  5015. pass
  5016. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5017. def __getitem__(self, i: int) -> uint:
  5018. """(private API)"""
  5019. pass
  5020. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5021. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5022. def push_back(self, v: uint) -> None:
  5023. """(private API)"""
  5024. pass
  5025. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5026. def pop_back(self) -> None:
  5027. """(private API)"""
  5028. pass
  5029. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5030. def push_front(self, v: uint) -> None:
  5031. """(private API)"""
  5032. pass
  5033. def __iter__(self) -> Iterator[uint]:
  5034. pass
  5035. def __len__(self) -> int:
  5036. pass
  5037. class ImVector_float: # Python specialization for ImVector<float>
  5038. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5039. #
  5040. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5041. def data_address(self) -> int:
  5042. """(private API)"""
  5043. pass
  5044. # #endif
  5045. #
  5046. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5047. @overload
  5048. def __init__(self) -> None:
  5049. pass
  5050. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5051. @overload
  5052. def __init__(self, src: ImVector_float) -> None:
  5053. pass
  5054. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5055. def clear(self) -> None:
  5056. """Important: does not destruct anything
  5057. (private API)
  5058. """
  5059. pass
  5060. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5061. def clear_destruct(self) -> None:
  5062. """Important: never called automatically! always explicit.
  5063. (private API)
  5064. """
  5065. pass
  5066. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5067. def empty(self) -> bool:
  5068. """(private API)"""
  5069. pass
  5070. # inline int size() const { return Size; } /* original C++ signature */
  5071. def size(self) -> int:
  5072. """(private API)"""
  5073. pass
  5074. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5075. def __getitem__(self, i: int) -> float:
  5076. """(private API)"""
  5077. pass
  5078. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5079. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5080. def push_back(self, v: float) -> None:
  5081. """(private API)"""
  5082. pass
  5083. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5084. def pop_back(self) -> None:
  5085. """(private API)"""
  5086. pass
  5087. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5088. def push_front(self, v: float) -> None:
  5089. """(private API)"""
  5090. pass
  5091. def __iter__(self) -> Iterator[float]:
  5092. pass
  5093. def __len__(self) -> int:
  5094. pass
  5095. class ImVector_char: # Python specialization for ImVector<char>
  5096. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5097. #
  5098. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5099. def data_address(self) -> int:
  5100. """(private API)"""
  5101. pass
  5102. # #endif
  5103. #
  5104. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5105. @overload
  5106. def __init__(self) -> None:
  5107. pass
  5108. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5109. @overload
  5110. def __init__(self, src: ImVector_char) -> None:
  5111. pass
  5112. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5113. def clear(self) -> None:
  5114. """Important: does not destruct anything
  5115. (private API)
  5116. """
  5117. pass
  5118. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5119. def clear_destruct(self) -> None:
  5120. """Important: never called automatically! always explicit.
  5121. (private API)
  5122. """
  5123. pass
  5124. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5125. def empty(self) -> bool:
  5126. """(private API)"""
  5127. pass
  5128. # inline int size() const { return Size; } /* original C++ signature */
  5129. def size(self) -> int:
  5130. """(private API)"""
  5131. pass
  5132. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5133. def __getitem__(self, i: int) -> str:
  5134. """(private API)"""
  5135. pass
  5136. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5137. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5138. def push_back(self, v: str) -> None:
  5139. """(private API)"""
  5140. pass
  5141. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5142. def pop_back(self) -> None:
  5143. """(private API)"""
  5144. pass
  5145. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5146. def push_front(self, v: str) -> None:
  5147. """(private API)"""
  5148. pass
  5149. def __iter__(self) -> Iterator[char]:
  5150. pass
  5151. def __len__(self) -> int:
  5152. pass
  5153. class ImVector_uchar: # Python specialization for ImVector<uchar>
  5154. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5155. #
  5156. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5157. def data_address(self) -> int:
  5158. """(private API)"""
  5159. pass
  5160. # #endif
  5161. #
  5162. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5163. @overload
  5164. def __init__(self) -> None:
  5165. pass
  5166. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5167. @overload
  5168. def __init__(self, src: ImVector_uchar) -> None:
  5169. pass
  5170. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5171. def clear(self) -> None:
  5172. """Important: does not destruct anything
  5173. (private API)
  5174. """
  5175. pass
  5176. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5177. def clear_destruct(self) -> None:
  5178. """Important: never called automatically! always explicit.
  5179. (private API)
  5180. """
  5181. pass
  5182. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5183. def empty(self) -> bool:
  5184. """(private API)"""
  5185. pass
  5186. # inline int size() const { return Size; } /* original C++ signature */
  5187. def size(self) -> int:
  5188. """(private API)"""
  5189. pass
  5190. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5191. def __getitem__(self, i: int) -> uchar:
  5192. """(private API)"""
  5193. pass
  5194. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5195. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5196. def push_back(self, v: uchar) -> None:
  5197. """(private API)"""
  5198. pass
  5199. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5200. def pop_back(self) -> None:
  5201. """(private API)"""
  5202. pass
  5203. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5204. def push_front(self, v: uchar) -> None:
  5205. """(private API)"""
  5206. pass
  5207. def __iter__(self) -> Iterator[uchar]:
  5208. pass
  5209. def __len__(self) -> int:
  5210. pass
  5211. class ImVector_ImDrawCmd: # Python specialization for ImVector<ImDrawCmd>
  5212. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5213. #
  5214. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5215. def data_address(self) -> int:
  5216. """(private API)"""
  5217. pass
  5218. # #endif
  5219. #
  5220. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5221. @overload
  5222. def __init__(self) -> None:
  5223. pass
  5224. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5225. @overload
  5226. def __init__(self, src: ImVector_ImDrawCmd) -> None:
  5227. pass
  5228. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5229. def clear(self) -> None:
  5230. """Important: does not destruct anything
  5231. (private API)
  5232. """
  5233. pass
  5234. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5235. def clear_destruct(self) -> None:
  5236. """Important: never called automatically! always explicit.
  5237. (private API)
  5238. """
  5239. pass
  5240. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5241. def empty(self) -> bool:
  5242. """(private API)"""
  5243. pass
  5244. # inline int size() const { return Size; } /* original C++ signature */
  5245. def size(self) -> int:
  5246. """(private API)"""
  5247. pass
  5248. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5249. def __getitem__(self, i: int) -> ImDrawCmd:
  5250. """(private API)"""
  5251. pass
  5252. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5253. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5254. def push_back(self, v: ImDrawCmd) -> None:
  5255. """(private API)"""
  5256. pass
  5257. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5258. def pop_back(self) -> None:
  5259. """(private API)"""
  5260. pass
  5261. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5262. def push_front(self, v: ImDrawCmd) -> None:
  5263. """(private API)"""
  5264. pass
  5265. def __iter__(self) -> Iterator[ImDrawCmd]:
  5266. pass
  5267. def __len__(self) -> int:
  5268. pass
  5269. class ImVector_ImDrawChannel: # Python specialization for ImVector<ImDrawChannel>
  5270. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5271. #
  5272. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5273. def data_address(self) -> int:
  5274. """(private API)"""
  5275. pass
  5276. # #endif
  5277. #
  5278. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5279. @overload
  5280. def __init__(self) -> None:
  5281. pass
  5282. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5283. @overload
  5284. def __init__(self, src: ImVector_ImDrawChannel) -> None:
  5285. pass
  5286. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5287. def clear(self) -> None:
  5288. """Important: does not destruct anything
  5289. (private API)
  5290. """
  5291. pass
  5292. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5293. def clear_destruct(self) -> None:
  5294. """Important: never called automatically! always explicit.
  5295. (private API)
  5296. """
  5297. pass
  5298. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5299. def empty(self) -> bool:
  5300. """(private API)"""
  5301. pass
  5302. # inline int size() const { return Size; } /* original C++ signature */
  5303. def size(self) -> int:
  5304. """(private API)"""
  5305. pass
  5306. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5307. def __getitem__(self, i: int) -> ImDrawChannel:
  5308. """(private API)"""
  5309. pass
  5310. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5311. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5312. def push_back(self, v: ImDrawChannel) -> None:
  5313. """(private API)"""
  5314. pass
  5315. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5316. def pop_back(self) -> None:
  5317. """(private API)"""
  5318. pass
  5319. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5320. def push_front(self, v: ImDrawChannel) -> None:
  5321. """(private API)"""
  5322. pass
  5323. def __iter__(self) -> Iterator[ImDrawChannel]:
  5324. pass
  5325. def __len__(self) -> int:
  5326. pass
  5327. class ImVector_ImDrawVert: # Python specialization for ImVector<ImDrawVert>
  5328. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5329. #
  5330. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5331. def data_address(self) -> int:
  5332. """(private API)"""
  5333. pass
  5334. # #endif
  5335. #
  5336. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5337. @overload
  5338. def __init__(self) -> None:
  5339. pass
  5340. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5341. @overload
  5342. def __init__(self, src: ImVector_ImDrawVert) -> None:
  5343. pass
  5344. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5345. def clear(self) -> None:
  5346. """Important: does not destruct anything
  5347. (private API)
  5348. """
  5349. pass
  5350. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5351. def clear_destruct(self) -> None:
  5352. """Important: never called automatically! always explicit.
  5353. (private API)
  5354. """
  5355. pass
  5356. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5357. def empty(self) -> bool:
  5358. """(private API)"""
  5359. pass
  5360. # inline int size() const { return Size; } /* original C++ signature */
  5361. def size(self) -> int:
  5362. """(private API)"""
  5363. pass
  5364. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5365. def __getitem__(self, i: int) -> ImDrawVert:
  5366. """(private API)"""
  5367. pass
  5368. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5369. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5370. def push_back(self, v: ImDrawVert) -> None:
  5371. """(private API)"""
  5372. pass
  5373. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5374. def pop_back(self) -> None:
  5375. """(private API)"""
  5376. pass
  5377. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5378. def push_front(self, v: ImDrawVert) -> None:
  5379. """(private API)"""
  5380. pass
  5381. def __iter__(self) -> Iterator[ImDrawVert]:
  5382. pass
  5383. def __len__(self) -> int:
  5384. pass
  5385. class ImVector_ImVec4: # Python specialization for ImVector<ImVec4>
  5386. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5387. #
  5388. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5389. def data_address(self) -> int:
  5390. """(private API)"""
  5391. pass
  5392. # #endif
  5393. #
  5394. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5395. @overload
  5396. def __init__(self) -> None:
  5397. pass
  5398. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5399. @overload
  5400. def __init__(self, src: ImVector_ImVec4Like) -> None:
  5401. pass
  5402. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5403. def clear(self) -> None:
  5404. """Important: does not destruct anything
  5405. (private API)
  5406. """
  5407. pass
  5408. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5409. def clear_destruct(self) -> None:
  5410. """Important: never called automatically! always explicit.
  5411. (private API)
  5412. """
  5413. pass
  5414. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5415. def empty(self) -> bool:
  5416. """(private API)"""
  5417. pass
  5418. # inline int size() const { return Size; } /* original C++ signature */
  5419. def size(self) -> int:
  5420. """(private API)"""
  5421. pass
  5422. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5423. def __getitem__(self, i: int) -> ImVec4:
  5424. """(private API)"""
  5425. pass
  5426. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5427. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5428. def push_back(self, v: ImVec4Like) -> None:
  5429. """(private API)"""
  5430. pass
  5431. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5432. def pop_back(self) -> None:
  5433. """(private API)"""
  5434. pass
  5435. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5436. def push_front(self, v: ImVec4Like) -> None:
  5437. """(private API)"""
  5438. pass
  5439. def __iter__(self) -> Iterator[ImVec4]:
  5440. pass
  5441. def __len__(self) -> int:
  5442. pass
  5443. class ImVector_ImVec2: # Python specialization for ImVector<ImVec2>
  5444. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5445. #
  5446. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5447. def data_address(self) -> int:
  5448. """(private API)"""
  5449. pass
  5450. # #endif
  5451. #
  5452. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5453. @overload
  5454. def __init__(self) -> None:
  5455. pass
  5456. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5457. @overload
  5458. def __init__(self, src: ImVector_ImVec2Like) -> None:
  5459. pass
  5460. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5461. def clear(self) -> None:
  5462. """Important: does not destruct anything
  5463. (private API)
  5464. """
  5465. pass
  5466. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5467. def clear_destruct(self) -> None:
  5468. """Important: never called automatically! always explicit.
  5469. (private API)
  5470. """
  5471. pass
  5472. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5473. def empty(self) -> bool:
  5474. """(private API)"""
  5475. pass
  5476. # inline int size() const { return Size; } /* original C++ signature */
  5477. def size(self) -> int:
  5478. """(private API)"""
  5479. pass
  5480. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5481. def __getitem__(self, i: int) -> ImVec2:
  5482. """(private API)"""
  5483. pass
  5484. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5485. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5486. def push_back(self, v: ImVec2Like) -> None:
  5487. """(private API)"""
  5488. pass
  5489. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5490. def pop_back(self) -> None:
  5491. """(private API)"""
  5492. pass
  5493. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5494. def push_front(self, v: ImVec2Like) -> None:
  5495. """(private API)"""
  5496. pass
  5497. def __iter__(self) -> Iterator[ImVec2]:
  5498. pass
  5499. def __len__(self) -> int:
  5500. pass
  5501. class ImVector_ImDrawList_ptr: # Python specialization for ImVector<ImDrawList *>
  5502. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5503. #
  5504. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5505. def data_address(self) -> int:
  5506. """(private API)"""
  5507. pass
  5508. # #endif
  5509. #
  5510. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5511. @overload
  5512. def __init__(self) -> None:
  5513. pass
  5514. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5515. @overload
  5516. def __init__(self, src: ImVector_ImDrawList_ptr) -> None:
  5517. pass
  5518. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5519. def clear(self) -> None:
  5520. """Important: does not destruct anything
  5521. (private API)
  5522. """
  5523. pass
  5524. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5525. def clear_destruct(self) -> None:
  5526. """Important: never called automatically! always explicit.
  5527. (private API)
  5528. """
  5529. pass
  5530. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5531. def empty(self) -> bool:
  5532. """(private API)"""
  5533. pass
  5534. # inline int size() const { return Size; } /* original C++ signature */
  5535. def size(self) -> int:
  5536. """(private API)"""
  5537. pass
  5538. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5539. def __getitem__(self, i: int) -> ImDrawList:
  5540. """(private API)"""
  5541. pass
  5542. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5543. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5544. def push_back(self, v: ImDrawList) -> None:
  5545. """(private API)"""
  5546. pass
  5547. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5548. def pop_back(self) -> None:
  5549. """(private API)"""
  5550. pass
  5551. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5552. def push_front(self, v: ImDrawList) -> None:
  5553. """(private API)"""
  5554. pass
  5555. def __iter__(self) -> Iterator[ImDrawList]:
  5556. pass
  5557. def __len__(self) -> int:
  5558. pass
  5559. class ImVector_ImFont_ptr: # Python specialization for ImVector<ImFont *>
  5560. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5561. #
  5562. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5563. def data_address(self) -> int:
  5564. """(private API)"""
  5565. pass
  5566. # #endif
  5567. #
  5568. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5569. @overload
  5570. def __init__(self) -> None:
  5571. pass
  5572. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5573. @overload
  5574. def __init__(self, src: ImVector_ImFont_ptr) -> None:
  5575. pass
  5576. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5577. def clear(self) -> None:
  5578. """Important: does not destruct anything
  5579. (private API)
  5580. """
  5581. pass
  5582. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5583. def clear_destruct(self) -> None:
  5584. """Important: never called automatically! always explicit.
  5585. (private API)
  5586. """
  5587. pass
  5588. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5589. def empty(self) -> bool:
  5590. """(private API)"""
  5591. pass
  5592. # inline int size() const { return Size; } /* original C++ signature */
  5593. def size(self) -> int:
  5594. """(private API)"""
  5595. pass
  5596. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5597. def __getitem__(self, i: int) -> ImFont:
  5598. """(private API)"""
  5599. pass
  5600. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5601. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5602. def push_back(self, v: ImFont) -> None:
  5603. """(private API)"""
  5604. pass
  5605. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5606. def pop_back(self) -> None:
  5607. """(private API)"""
  5608. pass
  5609. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5610. def push_front(self, v: ImFont) -> None:
  5611. """(private API)"""
  5612. pass
  5613. def __iter__(self) -> Iterator[ImFont]:
  5614. pass
  5615. def __len__(self) -> int:
  5616. pass
  5617. class ImVector_ImFontGlyph: # Python specialization for ImVector<ImFontGlyph>
  5618. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5619. #
  5620. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5621. def data_address(self) -> int:
  5622. """(private API)"""
  5623. pass
  5624. # #endif
  5625. #
  5626. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5627. @overload
  5628. def __init__(self) -> None:
  5629. pass
  5630. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5631. @overload
  5632. def __init__(self, src: ImVector_ImFontGlyph) -> None:
  5633. pass
  5634. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5635. def clear(self) -> None:
  5636. """Important: does not destruct anything
  5637. (private API)
  5638. """
  5639. pass
  5640. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5641. def clear_destruct(self) -> None:
  5642. """Important: never called automatically! always explicit.
  5643. (private API)
  5644. """
  5645. pass
  5646. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5647. def empty(self) -> bool:
  5648. """(private API)"""
  5649. pass
  5650. # inline int size() const { return Size; } /* original C++ signature */
  5651. def size(self) -> int:
  5652. """(private API)"""
  5653. pass
  5654. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5655. def __getitem__(self, i: int) -> ImFontGlyph:
  5656. """(private API)"""
  5657. pass
  5658. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5659. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5660. def push_back(self, v: ImFontGlyph) -> None:
  5661. """(private API)"""
  5662. pass
  5663. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5664. def pop_back(self) -> None:
  5665. """(private API)"""
  5666. pass
  5667. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5668. def push_front(self, v: ImFontGlyph) -> None:
  5669. """(private API)"""
  5670. pass
  5671. def __iter__(self) -> Iterator[ImFontGlyph]:
  5672. pass
  5673. def __len__(self) -> int:
  5674. pass
  5675. class ImVector_PlatformMonitor: # Python specialization for ImVector<ImGuiPlatformMonitor>
  5676. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5677. #
  5678. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5679. def data_address(self) -> int:
  5680. """(private API)"""
  5681. pass
  5682. # #endif
  5683. #
  5684. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5685. @overload
  5686. def __init__(self) -> None:
  5687. pass
  5688. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5689. @overload
  5690. def __init__(self, src: ImVector_PlatformMonitor) -> None:
  5691. pass
  5692. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5693. def clear(self) -> None:
  5694. """Important: does not destruct anything
  5695. (private API)
  5696. """
  5697. pass
  5698. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5699. def clear_destruct(self) -> None:
  5700. """Important: never called automatically! always explicit.
  5701. (private API)
  5702. """
  5703. pass
  5704. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5705. def empty(self) -> bool:
  5706. """(private API)"""
  5707. pass
  5708. # inline int size() const { return Size; } /* original C++ signature */
  5709. def size(self) -> int:
  5710. """(private API)"""
  5711. pass
  5712. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5713. def __getitem__(self, i: int) -> PlatformMonitor:
  5714. """(private API)"""
  5715. pass
  5716. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5717. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5718. def push_back(self, v: PlatformMonitor) -> None:
  5719. """(private API)"""
  5720. pass
  5721. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5722. def pop_back(self) -> None:
  5723. """(private API)"""
  5724. pass
  5725. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5726. def push_front(self, v: PlatformMonitor) -> None:
  5727. """(private API)"""
  5728. pass
  5729. def __iter__(self) -> Iterator[PlatformMonitor]:
  5730. pass
  5731. def __len__(self) -> int:
  5732. pass
  5733. class ImVector_Viewport_ptr: # Python specialization for ImVector<ImGuiViewport *>
  5734. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5735. #
  5736. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5737. def data_address(self) -> int:
  5738. """(private API)"""
  5739. pass
  5740. # #endif
  5741. #
  5742. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5743. @overload
  5744. def __init__(self) -> None:
  5745. pass
  5746. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5747. @overload
  5748. def __init__(self, src: ImVector_Viewport_ptr) -> None:
  5749. pass
  5750. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5751. def clear(self) -> None:
  5752. """Important: does not destruct anything
  5753. (private API)
  5754. """
  5755. pass
  5756. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5757. def clear_destruct(self) -> None:
  5758. """Important: never called automatically! always explicit.
  5759. (private API)
  5760. """
  5761. pass
  5762. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5763. def empty(self) -> bool:
  5764. """(private API)"""
  5765. pass
  5766. # inline int size() const { return Size; } /* original C++ signature */
  5767. def size(self) -> int:
  5768. """(private API)"""
  5769. pass
  5770. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5771. def __getitem__(self, i: int) -> Viewport:
  5772. """(private API)"""
  5773. pass
  5774. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5775. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5776. def push_back(self, v: Viewport) -> None:
  5777. """(private API)"""
  5778. pass
  5779. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5780. def pop_back(self) -> None:
  5781. """(private API)"""
  5782. pass
  5783. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5784. def push_front(self, v: Viewport) -> None:
  5785. """(private API)"""
  5786. pass
  5787. def __iter__(self) -> Iterator[Viewport]:
  5788. pass
  5789. def __len__(self) -> int:
  5790. pass
  5791. class ImVector_Window_ptr: # Python specialization for ImVector<ImGuiWindow *>
  5792. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5793. #
  5794. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5795. def data_address(self) -> int:
  5796. """(private API)"""
  5797. pass
  5798. # #endif
  5799. #
  5800. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5801. @overload
  5802. def __init__(self) -> None:
  5803. pass
  5804. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5805. @overload
  5806. def __init__(self, src: ImVector_Window_ptr) -> None:
  5807. pass
  5808. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5809. def clear(self) -> None:
  5810. """Important: does not destruct anything
  5811. (private API)
  5812. """
  5813. pass
  5814. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5815. def clear_destruct(self) -> None:
  5816. """Important: never called automatically! always explicit.
  5817. (private API)
  5818. """
  5819. pass
  5820. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5821. def empty(self) -> bool:
  5822. """(private API)"""
  5823. pass
  5824. # inline int size() const { return Size; } /* original C++ signature */
  5825. def size(self) -> int:
  5826. """(private API)"""
  5827. pass
  5828. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5829. def __getitem__(self, i: int) -> Window:
  5830. """(private API)"""
  5831. pass
  5832. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5833. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5834. def push_back(self, v: Window) -> None:
  5835. """(private API)"""
  5836. pass
  5837. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5838. def pop_back(self) -> None:
  5839. """(private API)"""
  5840. pass
  5841. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5842. def push_front(self, v: Window) -> None:
  5843. """(private API)"""
  5844. pass
  5845. def __iter__(self) -> Iterator[Window]:
  5846. pass
  5847. def __len__(self) -> int:
  5848. pass
  5849. class ImVector_ImFontConfig: # Python specialization for ImVector<ImFontConfig>
  5850. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5851. #
  5852. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5853. def data_address(self) -> int:
  5854. """(private API)"""
  5855. pass
  5856. # #endif
  5857. #
  5858. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5859. @overload
  5860. def __init__(self) -> None:
  5861. pass
  5862. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5863. @overload
  5864. def __init__(self, src: ImVector_ImFontConfig) -> None:
  5865. pass
  5866. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5867. def clear(self) -> None:
  5868. """Important: does not destruct anything
  5869. (private API)
  5870. """
  5871. pass
  5872. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5873. def clear_destruct(self) -> None:
  5874. """Important: never called automatically! always explicit.
  5875. (private API)
  5876. """
  5877. pass
  5878. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5879. def empty(self) -> bool:
  5880. """(private API)"""
  5881. pass
  5882. # inline int size() const { return Size; } /* original C++ signature */
  5883. def size(self) -> int:
  5884. """(private API)"""
  5885. pass
  5886. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5887. def __getitem__(self, i: int) -> ImFontConfig:
  5888. """(private API)"""
  5889. pass
  5890. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5891. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5892. def push_back(self, v: ImFontConfig) -> None:
  5893. """(private API)"""
  5894. pass
  5895. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5896. def pop_back(self) -> None:
  5897. """(private API)"""
  5898. pass
  5899. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5900. def push_front(self, v: ImFontConfig) -> None:
  5901. """(private API)"""
  5902. pass
  5903. def __iter__(self) -> Iterator[ImFontConfig]:
  5904. pass
  5905. def __len__(self) -> int:
  5906. pass
  5907. class ImVector_ImFontConfig_ptr: # Python specialization for ImVector<ImFontConfig *>
  5908. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5909. #
  5910. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5911. def data_address(self) -> int:
  5912. """(private API)"""
  5913. pass
  5914. # #endif
  5915. #
  5916. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5917. @overload
  5918. def __init__(self) -> None:
  5919. pass
  5920. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5921. @overload
  5922. def __init__(self, src: ImVector_ImFontConfig_ptr) -> None:
  5923. pass
  5924. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5925. def clear(self) -> None:
  5926. """Important: does not destruct anything
  5927. (private API)
  5928. """
  5929. pass
  5930. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5931. def clear_destruct(self) -> None:
  5932. """Important: never called automatically! always explicit.
  5933. (private API)
  5934. """
  5935. pass
  5936. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5937. def empty(self) -> bool:
  5938. """(private API)"""
  5939. pass
  5940. # inline int size() const { return Size; } /* original C++ signature */
  5941. def size(self) -> int:
  5942. """(private API)"""
  5943. pass
  5944. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  5945. def __getitem__(self, i: int) -> ImFontConfig:
  5946. """(private API)"""
  5947. pass
  5948. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  5949. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  5950. def push_back(self, v: ImFontConfig) -> None:
  5951. """(private API)"""
  5952. pass
  5953. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  5954. def pop_back(self) -> None:
  5955. """(private API)"""
  5956. pass
  5957. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  5958. def push_front(self, v: ImFontConfig) -> None:
  5959. """(private API)"""
  5960. pass
  5961. def __iter__(self) -> Iterator[ImFontConfig]:
  5962. pass
  5963. def __len__(self) -> int:
  5964. pass
  5965. class ImVector_FocusScopeData: # Python specialization for ImVector<ImGuiFocusScopeData>
  5966. # #ifdef IMGUI_BUNDLE_PYTHON_API
  5967. #
  5968. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  5969. def data_address(self) -> int:
  5970. """(private API)"""
  5971. pass
  5972. # #endif
  5973. #
  5974. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  5975. @overload
  5976. def __init__(self) -> None:
  5977. pass
  5978. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  5979. @overload
  5980. def __init__(self, src: ImVector_FocusScopeData) -> None:
  5981. pass
  5982. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  5983. def clear(self) -> None:
  5984. """Important: does not destruct anything
  5985. (private API)
  5986. """
  5987. pass
  5988. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  5989. def clear_destruct(self) -> None:
  5990. """Important: never called automatically! always explicit.
  5991. (private API)
  5992. """
  5993. pass
  5994. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  5995. def empty(self) -> bool:
  5996. """(private API)"""
  5997. pass
  5998. # inline int size() const { return Size; } /* original C++ signature */
  5999. def size(self) -> int:
  6000. """(private API)"""
  6001. pass
  6002. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6003. def __getitem__(self, i: int) -> FocusScopeData:
  6004. """(private API)"""
  6005. pass
  6006. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6007. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6008. def push_back(self, v: FocusScopeData) -> None:
  6009. """(private API)"""
  6010. pass
  6011. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6012. def pop_back(self) -> None:
  6013. """(private API)"""
  6014. pass
  6015. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6016. def push_front(self, v: FocusScopeData) -> None:
  6017. """(private API)"""
  6018. pass
  6019. def __iter__(self) -> Iterator[FocusScopeData]:
  6020. pass
  6021. def __len__(self) -> int:
  6022. pass
  6023. class ImVector_SelectionRequest: # Python specialization for ImVector<ImGuiSelectionRequest>
  6024. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6025. #
  6026. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6027. def data_address(self) -> int:
  6028. """(private API)"""
  6029. pass
  6030. # #endif
  6031. #
  6032. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6033. @overload
  6034. def __init__(self) -> None:
  6035. pass
  6036. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6037. @overload
  6038. def __init__(self, src: ImVector_SelectionRequest) -> None:
  6039. pass
  6040. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6041. def clear(self) -> None:
  6042. """Important: does not destruct anything
  6043. (private API)
  6044. """
  6045. pass
  6046. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6047. def clear_destruct(self) -> None:
  6048. """Important: never called automatically! always explicit.
  6049. (private API)
  6050. """
  6051. pass
  6052. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6053. def empty(self) -> bool:
  6054. """(private API)"""
  6055. pass
  6056. # inline int size() const { return Size; } /* original C++ signature */
  6057. def size(self) -> int:
  6058. """(private API)"""
  6059. pass
  6060. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6061. def __getitem__(self, i: int) -> SelectionRequest:
  6062. """(private API)"""
  6063. pass
  6064. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6065. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6066. def push_back(self, v: SelectionRequest) -> None:
  6067. """(private API)"""
  6068. pass
  6069. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6070. def pop_back(self) -> None:
  6071. """(private API)"""
  6072. pass
  6073. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6074. def push_front(self, v: SelectionRequest) -> None:
  6075. """(private API)"""
  6076. pass
  6077. def __iter__(self) -> Iterator[SelectionRequest]:
  6078. pass
  6079. def __len__(self) -> int:
  6080. pass
  6081. class ImVector_ImRect: # Python specialization for ImVector<ImRect>
  6082. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6083. #
  6084. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6085. def data_address(self) -> int:
  6086. """(private API)"""
  6087. pass
  6088. # #endif
  6089. #
  6090. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6091. @overload
  6092. def __init__(self) -> None:
  6093. pass
  6094. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6095. @overload
  6096. def __init__(self, src: ImVector_ImRect) -> None:
  6097. pass
  6098. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6099. def clear(self) -> None:
  6100. """Important: does not destruct anything
  6101. (private API)
  6102. """
  6103. pass
  6104. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6105. def clear_destruct(self) -> None:
  6106. """Important: never called automatically! always explicit.
  6107. (private API)
  6108. """
  6109. pass
  6110. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6111. def empty(self) -> bool:
  6112. """(private API)"""
  6113. pass
  6114. # inline int size() const { return Size; } /* original C++ signature */
  6115. def size(self) -> int:
  6116. """(private API)"""
  6117. pass
  6118. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6119. def __getitem__(self, i: int) -> ImRect:
  6120. """(private API)"""
  6121. pass
  6122. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6123. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6124. def push_back(self, v: ImRect) -> None:
  6125. """(private API)"""
  6126. pass
  6127. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6128. def pop_back(self) -> None:
  6129. """(private API)"""
  6130. pass
  6131. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6132. def push_front(self, v: ImRect) -> None:
  6133. """(private API)"""
  6134. pass
  6135. def __iter__(self) -> Iterator[ImRect]:
  6136. pass
  6137. def __len__(self) -> int:
  6138. pass
  6139. class ImVector_ColorMod: # Python specialization for ImVector<ImGuiColorMod>
  6140. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6141. #
  6142. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6143. def data_address(self) -> int:
  6144. """(private API)"""
  6145. pass
  6146. # #endif
  6147. #
  6148. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6149. @overload
  6150. def __init__(self) -> None:
  6151. pass
  6152. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6153. @overload
  6154. def __init__(self, src: ImVector_ColorMod) -> None:
  6155. pass
  6156. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6157. def clear(self) -> None:
  6158. """Important: does not destruct anything
  6159. (private API)
  6160. """
  6161. pass
  6162. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6163. def clear_destruct(self) -> None:
  6164. """Important: never called automatically! always explicit.
  6165. (private API)
  6166. """
  6167. pass
  6168. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6169. def empty(self) -> bool:
  6170. """(private API)"""
  6171. pass
  6172. # inline int size() const { return Size; } /* original C++ signature */
  6173. def size(self) -> int:
  6174. """(private API)"""
  6175. pass
  6176. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6177. def __getitem__(self, i: int) -> ColorMod:
  6178. """(private API)"""
  6179. pass
  6180. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6181. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6182. def push_back(self, v: ColorMod) -> None:
  6183. """(private API)"""
  6184. pass
  6185. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6186. def pop_back(self) -> None:
  6187. """(private API)"""
  6188. pass
  6189. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6190. def push_front(self, v: ColorMod) -> None:
  6191. """(private API)"""
  6192. pass
  6193. def __iter__(self) -> Iterator[ColorMod]:
  6194. pass
  6195. def __len__(self) -> int:
  6196. pass
  6197. class ImVector_GroupData: # Python specialization for ImVector<ImGuiGroupData>
  6198. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6199. #
  6200. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6201. def data_address(self) -> int:
  6202. """(private API)"""
  6203. pass
  6204. # #endif
  6205. #
  6206. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6207. @overload
  6208. def __init__(self) -> None:
  6209. pass
  6210. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6211. @overload
  6212. def __init__(self, src: ImVector_GroupData) -> None:
  6213. pass
  6214. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6215. def clear(self) -> None:
  6216. """Important: does not destruct anything
  6217. (private API)
  6218. """
  6219. pass
  6220. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6221. def clear_destruct(self) -> None:
  6222. """Important: never called automatically! always explicit.
  6223. (private API)
  6224. """
  6225. pass
  6226. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6227. def empty(self) -> bool:
  6228. """(private API)"""
  6229. pass
  6230. # inline int size() const { return Size; } /* original C++ signature */
  6231. def size(self) -> int:
  6232. """(private API)"""
  6233. pass
  6234. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6235. def __getitem__(self, i: int) -> GroupData:
  6236. """(private API)"""
  6237. pass
  6238. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6239. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6240. def push_back(self, v: GroupData) -> None:
  6241. """(private API)"""
  6242. pass
  6243. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6244. def pop_back(self) -> None:
  6245. """(private API)"""
  6246. pass
  6247. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6248. def push_front(self, v: GroupData) -> None:
  6249. """(private API)"""
  6250. pass
  6251. def __iter__(self) -> Iterator[GroupData]:
  6252. pass
  6253. def __len__(self) -> int:
  6254. pass
  6255. class ImVector_PopupData: # Python specialization for ImVector<ImGuiPopupData>
  6256. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6257. #
  6258. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6259. def data_address(self) -> int:
  6260. """(private API)"""
  6261. pass
  6262. # #endif
  6263. #
  6264. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6265. @overload
  6266. def __init__(self) -> None:
  6267. pass
  6268. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6269. @overload
  6270. def __init__(self, src: ImVector_PopupData) -> None:
  6271. pass
  6272. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6273. def clear(self) -> None:
  6274. """Important: does not destruct anything
  6275. (private API)
  6276. """
  6277. pass
  6278. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6279. def clear_destruct(self) -> None:
  6280. """Important: never called automatically! always explicit.
  6281. (private API)
  6282. """
  6283. pass
  6284. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6285. def empty(self) -> bool:
  6286. """(private API)"""
  6287. pass
  6288. # inline int size() const { return Size; } /* original C++ signature */
  6289. def size(self) -> int:
  6290. """(private API)"""
  6291. pass
  6292. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6293. def __getitem__(self, i: int) -> PopupData:
  6294. """(private API)"""
  6295. pass
  6296. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6297. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6298. def push_back(self, v: PopupData) -> None:
  6299. """(private API)"""
  6300. pass
  6301. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6302. def pop_back(self) -> None:
  6303. """(private API)"""
  6304. pass
  6305. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6306. def push_front(self, v: PopupData) -> None:
  6307. """(private API)"""
  6308. pass
  6309. def __iter__(self) -> Iterator[PopupData]:
  6310. pass
  6311. def __len__(self) -> int:
  6312. pass
  6313. class ImVector_ViewportP_ptr: # Python specialization for ImVector<ImGuiViewportP *>
  6314. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6315. #
  6316. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6317. def data_address(self) -> int:
  6318. """(private API)"""
  6319. pass
  6320. # #endif
  6321. #
  6322. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6323. @overload
  6324. def __init__(self) -> None:
  6325. pass
  6326. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6327. @overload
  6328. def __init__(self, src: ImVector_ViewportP_ptr) -> None:
  6329. pass
  6330. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6331. def clear(self) -> None:
  6332. """Important: does not destruct anything
  6333. (private API)
  6334. """
  6335. pass
  6336. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6337. def clear_destruct(self) -> None:
  6338. """Important: never called automatically! always explicit.
  6339. (private API)
  6340. """
  6341. pass
  6342. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6343. def empty(self) -> bool:
  6344. """(private API)"""
  6345. pass
  6346. # inline int size() const { return Size; } /* original C++ signature */
  6347. def size(self) -> int:
  6348. """(private API)"""
  6349. pass
  6350. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6351. def __getitem__(self, i: int) -> ViewportP:
  6352. """(private API)"""
  6353. pass
  6354. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6355. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6356. def push_back(self, v: ViewportP) -> None:
  6357. """(private API)"""
  6358. pass
  6359. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6360. def pop_back(self) -> None:
  6361. """(private API)"""
  6362. pass
  6363. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6364. def push_front(self, v: ViewportP) -> None:
  6365. """(private API)"""
  6366. pass
  6367. def __iter__(self) -> Iterator[ViewportP]:
  6368. pass
  6369. def __len__(self) -> int:
  6370. pass
  6371. class ImVector_InputEvent: # Python specialization for ImVector<ImGuiInputEvent>
  6372. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6373. #
  6374. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6375. def data_address(self) -> int:
  6376. """(private API)"""
  6377. pass
  6378. # #endif
  6379. #
  6380. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6381. @overload
  6382. def __init__(self) -> None:
  6383. pass
  6384. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6385. @overload
  6386. def __init__(self, src: ImVector_InputEvent) -> None:
  6387. pass
  6388. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6389. def clear(self) -> None:
  6390. """Important: does not destruct anything
  6391. (private API)
  6392. """
  6393. pass
  6394. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6395. def clear_destruct(self) -> None:
  6396. """Important: never called automatically! always explicit.
  6397. (private API)
  6398. """
  6399. pass
  6400. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6401. def empty(self) -> bool:
  6402. """(private API)"""
  6403. pass
  6404. # inline int size() const { return Size; } /* original C++ signature */
  6405. def size(self) -> int:
  6406. """(private API)"""
  6407. pass
  6408. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6409. def __getitem__(self, i: int) -> InputEvent:
  6410. """(private API)"""
  6411. pass
  6412. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6413. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6414. def push_back(self, v: InputEvent) -> None:
  6415. """(private API)"""
  6416. pass
  6417. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6418. def pop_back(self) -> None:
  6419. """(private API)"""
  6420. pass
  6421. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6422. def push_front(self, v: InputEvent) -> None:
  6423. """(private API)"""
  6424. pass
  6425. def __iter__(self) -> Iterator[InputEvent]:
  6426. pass
  6427. def __len__(self) -> int:
  6428. pass
  6429. class ImVector_WindowStackData: # Python specialization for ImVector<ImGuiWindowStackData>
  6430. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6431. #
  6432. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6433. def data_address(self) -> int:
  6434. """(private API)"""
  6435. pass
  6436. # #endif
  6437. #
  6438. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6439. @overload
  6440. def __init__(self) -> None:
  6441. pass
  6442. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6443. @overload
  6444. def __init__(self, src: ImVector_WindowStackData) -> None:
  6445. pass
  6446. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6447. def clear(self) -> None:
  6448. """Important: does not destruct anything
  6449. (private API)
  6450. """
  6451. pass
  6452. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6453. def clear_destruct(self) -> None:
  6454. """Important: never called automatically! always explicit.
  6455. (private API)
  6456. """
  6457. pass
  6458. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6459. def empty(self) -> bool:
  6460. """(private API)"""
  6461. pass
  6462. # inline int size() const { return Size; } /* original C++ signature */
  6463. def size(self) -> int:
  6464. """(private API)"""
  6465. pass
  6466. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6467. def __getitem__(self, i: int) -> WindowStackData:
  6468. """(private API)"""
  6469. pass
  6470. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6471. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6472. def push_back(self, v: WindowStackData) -> None:
  6473. """(private API)"""
  6474. pass
  6475. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6476. def pop_back(self) -> None:
  6477. """(private API)"""
  6478. pass
  6479. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6480. def push_front(self, v: WindowStackData) -> None:
  6481. """(private API)"""
  6482. pass
  6483. def __iter__(self) -> Iterator[WindowStackData]:
  6484. pass
  6485. def __len__(self) -> int:
  6486. pass
  6487. class ImVector_TableColumnSortSpecs: # Python specialization for ImVector<ImGuiTableColumnSortSpecs>
  6488. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6489. #
  6490. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6491. def data_address(self) -> int:
  6492. """(private API)"""
  6493. pass
  6494. # #endif
  6495. #
  6496. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6497. @overload
  6498. def __init__(self) -> None:
  6499. pass
  6500. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6501. @overload
  6502. def __init__(self, src: ImVector_TableColumnSortSpecs) -> None:
  6503. pass
  6504. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6505. def clear(self) -> None:
  6506. """Important: does not destruct anything
  6507. (private API)
  6508. """
  6509. pass
  6510. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6511. def clear_destruct(self) -> None:
  6512. """Important: never called automatically! always explicit.
  6513. (private API)
  6514. """
  6515. pass
  6516. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6517. def empty(self) -> bool:
  6518. """(private API)"""
  6519. pass
  6520. # inline int size() const { return Size; } /* original C++ signature */
  6521. def size(self) -> int:
  6522. """(private API)"""
  6523. pass
  6524. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6525. def __getitem__(self, i: int) -> TableColumnSortSpecs:
  6526. """(private API)"""
  6527. pass
  6528. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6529. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6530. def push_back(self, v: TableColumnSortSpecs) -> None:
  6531. """(private API)"""
  6532. pass
  6533. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6534. def pop_back(self) -> None:
  6535. """(private API)"""
  6536. pass
  6537. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6538. def push_front(self, v: TableColumnSortSpecs) -> None:
  6539. """(private API)"""
  6540. pass
  6541. def __iter__(self) -> Iterator[TableColumnSortSpecs]:
  6542. pass
  6543. def __len__(self) -> int:
  6544. pass
  6545. class ImVector_TableInstanceData: # Python specialization for ImVector<ImGuiTableInstanceData>
  6546. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6547. #
  6548. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6549. def data_address(self) -> int:
  6550. """(private API)"""
  6551. pass
  6552. # #endif
  6553. #
  6554. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6555. @overload
  6556. def __init__(self) -> None:
  6557. pass
  6558. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6559. @overload
  6560. def __init__(self, src: ImVector_TableInstanceData) -> None:
  6561. pass
  6562. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6563. def clear(self) -> None:
  6564. """Important: does not destruct anything
  6565. (private API)
  6566. """
  6567. pass
  6568. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6569. def clear_destruct(self) -> None:
  6570. """Important: never called automatically! always explicit.
  6571. (private API)
  6572. """
  6573. pass
  6574. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6575. def empty(self) -> bool:
  6576. """(private API)"""
  6577. pass
  6578. # inline int size() const { return Size; } /* original C++ signature */
  6579. def size(self) -> int:
  6580. """(private API)"""
  6581. pass
  6582. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6583. def __getitem__(self, i: int) -> TableInstanceData:
  6584. """(private API)"""
  6585. pass
  6586. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6587. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6588. def push_back(self, v: TableInstanceData) -> None:
  6589. """(private API)"""
  6590. pass
  6591. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6592. def pop_back(self) -> None:
  6593. """(private API)"""
  6594. pass
  6595. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6596. def push_front(self, v: TableInstanceData) -> None:
  6597. """(private API)"""
  6598. pass
  6599. def __iter__(self) -> Iterator[TableInstanceData]:
  6600. pass
  6601. def __len__(self) -> int:
  6602. pass
  6603. class ImVector_TableTempData: # Python specialization for ImVector<ImGuiTableTempData>
  6604. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6605. #
  6606. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6607. def data_address(self) -> int:
  6608. """(private API)"""
  6609. pass
  6610. # #endif
  6611. #
  6612. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6613. @overload
  6614. def __init__(self) -> None:
  6615. pass
  6616. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6617. @overload
  6618. def __init__(self, src: ImVector_TableTempData) -> None:
  6619. pass
  6620. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6621. def clear(self) -> None:
  6622. """Important: does not destruct anything
  6623. (private API)
  6624. """
  6625. pass
  6626. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6627. def clear_destruct(self) -> None:
  6628. """Important: never called automatically! always explicit.
  6629. (private API)
  6630. """
  6631. pass
  6632. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6633. def empty(self) -> bool:
  6634. """(private API)"""
  6635. pass
  6636. # inline int size() const { return Size; } /* original C++ signature */
  6637. def size(self) -> int:
  6638. """(private API)"""
  6639. pass
  6640. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6641. def __getitem__(self, i: int) -> TableTempData:
  6642. """(private API)"""
  6643. pass
  6644. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6645. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6646. def push_back(self, v: TableTempData) -> None:
  6647. """(private API)"""
  6648. pass
  6649. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6650. def pop_back(self) -> None:
  6651. """(private API)"""
  6652. pass
  6653. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6654. def push_front(self, v: TableTempData) -> None:
  6655. """(private API)"""
  6656. pass
  6657. def __iter__(self) -> Iterator[TableTempData]:
  6658. pass
  6659. def __len__(self) -> int:
  6660. pass
  6661. class ImVector_PtrOrIndex: # Python specialization for ImVector<ImGuiPtrOrIndex>
  6662. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6663. #
  6664. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6665. def data_address(self) -> int:
  6666. """(private API)"""
  6667. pass
  6668. # #endif
  6669. #
  6670. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6671. @overload
  6672. def __init__(self) -> None:
  6673. pass
  6674. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6675. @overload
  6676. def __init__(self, src: ImVector_PtrOrIndex) -> None:
  6677. pass
  6678. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6679. def clear(self) -> None:
  6680. """Important: does not destruct anything
  6681. (private API)
  6682. """
  6683. pass
  6684. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6685. def clear_destruct(self) -> None:
  6686. """Important: never called automatically! always explicit.
  6687. (private API)
  6688. """
  6689. pass
  6690. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6691. def empty(self) -> bool:
  6692. """(private API)"""
  6693. pass
  6694. # inline int size() const { return Size; } /* original C++ signature */
  6695. def size(self) -> int:
  6696. """(private API)"""
  6697. pass
  6698. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6699. def __getitem__(self, i: int) -> PtrOrIndex:
  6700. """(private API)"""
  6701. pass
  6702. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6703. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6704. def push_back(self, v: PtrOrIndex) -> None:
  6705. """(private API)"""
  6706. pass
  6707. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6708. def pop_back(self) -> None:
  6709. """(private API)"""
  6710. pass
  6711. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6712. def push_front(self, v: PtrOrIndex) -> None:
  6713. """(private API)"""
  6714. pass
  6715. def __iter__(self) -> Iterator[PtrOrIndex]:
  6716. pass
  6717. def __len__(self) -> int:
  6718. pass
  6719. class ImVector_SettingsHandler: # Python specialization for ImVector<ImGuiSettingsHandler>
  6720. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6721. #
  6722. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6723. def data_address(self) -> int:
  6724. """(private API)"""
  6725. pass
  6726. # #endif
  6727. #
  6728. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6729. @overload
  6730. def __init__(self) -> None:
  6731. pass
  6732. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6733. @overload
  6734. def __init__(self, src: ImVector_SettingsHandler) -> None:
  6735. pass
  6736. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6737. def clear(self) -> None:
  6738. """Important: does not destruct anything
  6739. (private API)
  6740. """
  6741. pass
  6742. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6743. def clear_destruct(self) -> None:
  6744. """Important: never called automatically! always explicit.
  6745. (private API)
  6746. """
  6747. pass
  6748. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6749. def empty(self) -> bool:
  6750. """(private API)"""
  6751. pass
  6752. # inline int size() const { return Size; } /* original C++ signature */
  6753. def size(self) -> int:
  6754. """(private API)"""
  6755. pass
  6756. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6757. def __getitem__(self, i: int) -> SettingsHandler:
  6758. """(private API)"""
  6759. pass
  6760. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6761. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6762. def push_back(self, v: SettingsHandler) -> None:
  6763. """(private API)"""
  6764. pass
  6765. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6766. def pop_back(self) -> None:
  6767. """(private API)"""
  6768. pass
  6769. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6770. def push_front(self, v: SettingsHandler) -> None:
  6771. """(private API)"""
  6772. pass
  6773. def __iter__(self) -> Iterator[SettingsHandler]:
  6774. pass
  6775. def __len__(self) -> int:
  6776. pass
  6777. class ImVector_ShrinkWidthItem: # Python specialization for ImVector<ImGuiShrinkWidthItem>
  6778. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6779. #
  6780. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6781. def data_address(self) -> int:
  6782. """(private API)"""
  6783. pass
  6784. # #endif
  6785. #
  6786. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6787. @overload
  6788. def __init__(self) -> None:
  6789. pass
  6790. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6791. @overload
  6792. def __init__(self, src: ImVector_ShrinkWidthItem) -> None:
  6793. pass
  6794. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6795. def clear(self) -> None:
  6796. """Important: does not destruct anything
  6797. (private API)
  6798. """
  6799. pass
  6800. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6801. def clear_destruct(self) -> None:
  6802. """Important: never called automatically! always explicit.
  6803. (private API)
  6804. """
  6805. pass
  6806. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6807. def empty(self) -> bool:
  6808. """(private API)"""
  6809. pass
  6810. # inline int size() const { return Size; } /* original C++ signature */
  6811. def size(self) -> int:
  6812. """(private API)"""
  6813. pass
  6814. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6815. def __getitem__(self, i: int) -> ShrinkWidthItem:
  6816. """(private API)"""
  6817. pass
  6818. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6819. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6820. def push_back(self, v: ShrinkWidthItem) -> None:
  6821. """(private API)"""
  6822. pass
  6823. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6824. def pop_back(self) -> None:
  6825. """(private API)"""
  6826. pass
  6827. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6828. def push_front(self, v: ShrinkWidthItem) -> None:
  6829. """(private API)"""
  6830. pass
  6831. def __iter__(self) -> Iterator[ShrinkWidthItem]:
  6832. pass
  6833. def __len__(self) -> int:
  6834. pass
  6835. class ImVector_StackLevelInfo: # Python specialization for ImVector<ImGuiStackLevelInfo>
  6836. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6837. #
  6838. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6839. def data_address(self) -> int:
  6840. """(private API)"""
  6841. pass
  6842. # #endif
  6843. #
  6844. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6845. @overload
  6846. def __init__(self) -> None:
  6847. pass
  6848. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6849. @overload
  6850. def __init__(self, src: ImVector_StackLevelInfo) -> None:
  6851. pass
  6852. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6853. def clear(self) -> None:
  6854. """Important: does not destruct anything
  6855. (private API)
  6856. """
  6857. pass
  6858. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6859. def clear_destruct(self) -> None:
  6860. """Important: never called automatically! always explicit.
  6861. (private API)
  6862. """
  6863. pass
  6864. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6865. def empty(self) -> bool:
  6866. """(private API)"""
  6867. pass
  6868. # inline int size() const { return Size; } /* original C++ signature */
  6869. def size(self) -> int:
  6870. """(private API)"""
  6871. pass
  6872. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6873. def __getitem__(self, i: int) -> StackLevelInfo:
  6874. """(private API)"""
  6875. pass
  6876. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6877. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6878. def push_back(self, v: StackLevelInfo) -> None:
  6879. """(private API)"""
  6880. pass
  6881. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6882. def pop_back(self) -> None:
  6883. """(private API)"""
  6884. pass
  6885. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6886. def push_front(self, v: StackLevelInfo) -> None:
  6887. """(private API)"""
  6888. pass
  6889. def __iter__(self) -> Iterator[StackLevelInfo]:
  6890. pass
  6891. def __len__(self) -> int:
  6892. pass
  6893. class ImVector_TabItem: # Python specialization for ImVector<ImGuiTabItem>
  6894. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6895. #
  6896. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6897. def data_address(self) -> int:
  6898. """(private API)"""
  6899. pass
  6900. # #endif
  6901. #
  6902. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6903. @overload
  6904. def __init__(self) -> None:
  6905. pass
  6906. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6907. @overload
  6908. def __init__(self, src: ImVector_TabItem) -> None:
  6909. pass
  6910. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6911. def clear(self) -> None:
  6912. """Important: does not destruct anything
  6913. (private API)
  6914. """
  6915. pass
  6916. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6917. def clear_destruct(self) -> None:
  6918. """Important: never called automatically! always explicit.
  6919. (private API)
  6920. """
  6921. pass
  6922. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6923. def empty(self) -> bool:
  6924. """(private API)"""
  6925. pass
  6926. # inline int size() const { return Size; } /* original C++ signature */
  6927. def size(self) -> int:
  6928. """(private API)"""
  6929. pass
  6930. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6931. def __getitem__(self, i: int) -> TabItem:
  6932. """(private API)"""
  6933. pass
  6934. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6935. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6936. def push_back(self, v: TabItem) -> None:
  6937. """(private API)"""
  6938. pass
  6939. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6940. def pop_back(self) -> None:
  6941. """(private API)"""
  6942. pass
  6943. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  6944. def push_front(self, v: TabItem) -> None:
  6945. """(private API)"""
  6946. pass
  6947. def __iter__(self) -> Iterator[TabItem]:
  6948. pass
  6949. def __len__(self) -> int:
  6950. pass
  6951. class ImVector_KeyRoutingData: # Python specialization for ImVector<ImGuiKeyRoutingData>
  6952. # #ifdef IMGUI_BUNDLE_PYTHON_API
  6953. #
  6954. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  6955. def data_address(self) -> int:
  6956. """(private API)"""
  6957. pass
  6958. # #endif
  6959. #
  6960. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  6961. @overload
  6962. def __init__(self) -> None:
  6963. pass
  6964. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  6965. @overload
  6966. def __init__(self, src: ImVector_KeyRoutingData) -> None:
  6967. pass
  6968. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  6969. def clear(self) -> None:
  6970. """Important: does not destruct anything
  6971. (private API)
  6972. """
  6973. pass
  6974. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  6975. def clear_destruct(self) -> None:
  6976. """Important: never called automatically! always explicit.
  6977. (private API)
  6978. """
  6979. pass
  6980. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  6981. def empty(self) -> bool:
  6982. """(private API)"""
  6983. pass
  6984. # inline int size() const { return Size; } /* original C++ signature */
  6985. def size(self) -> int:
  6986. """(private API)"""
  6987. pass
  6988. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  6989. def __getitem__(self, i: int) -> KeyRoutingData:
  6990. """(private API)"""
  6991. pass
  6992. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  6993. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  6994. def push_back(self, v: KeyRoutingData) -> None:
  6995. """(private API)"""
  6996. pass
  6997. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  6998. def pop_back(self) -> None:
  6999. """(private API)"""
  7000. pass
  7001. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7002. def push_front(self, v: KeyRoutingData) -> None:
  7003. """(private API)"""
  7004. pass
  7005. def __iter__(self) -> Iterator[KeyRoutingData]:
  7006. pass
  7007. def __len__(self) -> int:
  7008. pass
  7009. class ImVector_ListClipperData: # Python specialization for ImVector<ImGuiListClipperData>
  7010. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7011. #
  7012. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7013. def data_address(self) -> int:
  7014. """(private API)"""
  7015. pass
  7016. # #endif
  7017. #
  7018. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7019. @overload
  7020. def __init__(self) -> None:
  7021. pass
  7022. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7023. @overload
  7024. def __init__(self, src: ImVector_ListClipperData) -> None:
  7025. pass
  7026. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7027. def clear(self) -> None:
  7028. """Important: does not destruct anything
  7029. (private API)
  7030. """
  7031. pass
  7032. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7033. def clear_destruct(self) -> None:
  7034. """Important: never called automatically! always explicit.
  7035. (private API)
  7036. """
  7037. pass
  7038. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7039. def empty(self) -> bool:
  7040. """(private API)"""
  7041. pass
  7042. # inline int size() const { return Size; } /* original C++ signature */
  7043. def size(self) -> int:
  7044. """(private API)"""
  7045. pass
  7046. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7047. def __getitem__(self, i: int) -> ListClipperData:
  7048. """(private API)"""
  7049. pass
  7050. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7051. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7052. def push_back(self, v: ListClipperData) -> None:
  7053. """(private API)"""
  7054. pass
  7055. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7056. def pop_back(self) -> None:
  7057. """(private API)"""
  7058. pass
  7059. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7060. def push_front(self, v: ListClipperData) -> None:
  7061. """(private API)"""
  7062. pass
  7063. def __iter__(self) -> Iterator[ListClipperData]:
  7064. pass
  7065. def __len__(self) -> int:
  7066. pass
  7067. class ImVector_ListClipperRange: # Python specialization for ImVector<ImGuiListClipperRange>
  7068. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7069. #
  7070. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7071. def data_address(self) -> int:
  7072. """(private API)"""
  7073. pass
  7074. # #endif
  7075. #
  7076. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7077. @overload
  7078. def __init__(self) -> None:
  7079. pass
  7080. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7081. @overload
  7082. def __init__(self, src: ImVector_ListClipperRange) -> None:
  7083. pass
  7084. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7085. def clear(self) -> None:
  7086. """Important: does not destruct anything
  7087. (private API)
  7088. """
  7089. pass
  7090. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7091. def clear_destruct(self) -> None:
  7092. """Important: never called automatically! always explicit.
  7093. (private API)
  7094. """
  7095. pass
  7096. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7097. def empty(self) -> bool:
  7098. """(private API)"""
  7099. pass
  7100. # inline int size() const { return Size; } /* original C++ signature */
  7101. def size(self) -> int:
  7102. """(private API)"""
  7103. pass
  7104. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7105. def __getitem__(self, i: int) -> ListClipperRange:
  7106. """(private API)"""
  7107. pass
  7108. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7109. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7110. def push_back(self, v: ListClipperRange) -> None:
  7111. """(private API)"""
  7112. pass
  7113. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7114. def pop_back(self) -> None:
  7115. """(private API)"""
  7116. pass
  7117. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7118. def push_front(self, v: ListClipperRange) -> None:
  7119. """(private API)"""
  7120. pass
  7121. def __iter__(self) -> Iterator[ListClipperRange]:
  7122. pass
  7123. def __len__(self) -> int:
  7124. pass
  7125. class ImVector_OldColumnData: # Python specialization for ImVector<ImGuiOldColumnData>
  7126. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7127. #
  7128. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7129. def data_address(self) -> int:
  7130. """(private API)"""
  7131. pass
  7132. # #endif
  7133. #
  7134. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7135. @overload
  7136. def __init__(self) -> None:
  7137. pass
  7138. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7139. @overload
  7140. def __init__(self, src: ImVector_OldColumnData) -> None:
  7141. pass
  7142. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7143. def clear(self) -> None:
  7144. """Important: does not destruct anything
  7145. (private API)
  7146. """
  7147. pass
  7148. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7149. def clear_destruct(self) -> None:
  7150. """Important: never called automatically! always explicit.
  7151. (private API)
  7152. """
  7153. pass
  7154. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7155. def empty(self) -> bool:
  7156. """(private API)"""
  7157. pass
  7158. # inline int size() const { return Size; } /* original C++ signature */
  7159. def size(self) -> int:
  7160. """(private API)"""
  7161. pass
  7162. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7163. def __getitem__(self, i: int) -> OldColumnData:
  7164. """(private API)"""
  7165. pass
  7166. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7167. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7168. def push_back(self, v: OldColumnData) -> None:
  7169. """(private API)"""
  7170. pass
  7171. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7172. def pop_back(self) -> None:
  7173. """(private API)"""
  7174. pass
  7175. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7176. def push_front(self, v: OldColumnData) -> None:
  7177. """(private API)"""
  7178. pass
  7179. def __iter__(self) -> Iterator[OldColumnData]:
  7180. pass
  7181. def __len__(self) -> int:
  7182. pass
  7183. class ImVector_OldColumns: # Python specialization for ImVector<ImGuiOldColumns>
  7184. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7185. #
  7186. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7187. def data_address(self) -> int:
  7188. """(private API)"""
  7189. pass
  7190. # #endif
  7191. #
  7192. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7193. @overload
  7194. def __init__(self) -> None:
  7195. pass
  7196. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7197. @overload
  7198. def __init__(self, src: ImVector_OldColumns) -> None:
  7199. pass
  7200. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7201. def clear(self) -> None:
  7202. """Important: does not destruct anything
  7203. (private API)
  7204. """
  7205. pass
  7206. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7207. def clear_destruct(self) -> None:
  7208. """Important: never called automatically! always explicit.
  7209. (private API)
  7210. """
  7211. pass
  7212. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7213. def empty(self) -> bool:
  7214. """(private API)"""
  7215. pass
  7216. # inline int size() const { return Size; } /* original C++ signature */
  7217. def size(self) -> int:
  7218. """(private API)"""
  7219. pass
  7220. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7221. def __getitem__(self, i: int) -> OldColumns:
  7222. """(private API)"""
  7223. pass
  7224. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7225. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7226. def push_back(self, v: OldColumns) -> None:
  7227. """(private API)"""
  7228. pass
  7229. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7230. def pop_back(self) -> None:
  7231. """(private API)"""
  7232. pass
  7233. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7234. def push_front(self, v: OldColumns) -> None:
  7235. """(private API)"""
  7236. pass
  7237. def __iter__(self) -> Iterator[OldColumns]:
  7238. pass
  7239. def __len__(self) -> int:
  7240. pass
  7241. class ImVector_StyleMod: # Python specialization for ImVector<ImGuiStyleMod>
  7242. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7243. #
  7244. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7245. def data_address(self) -> int:
  7246. """(private API)"""
  7247. pass
  7248. # #endif
  7249. #
  7250. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7251. @overload
  7252. def __init__(self) -> None:
  7253. pass
  7254. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7255. @overload
  7256. def __init__(self, src: ImVector_StyleMod) -> None:
  7257. pass
  7258. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7259. def clear(self) -> None:
  7260. """Important: does not destruct anything
  7261. (private API)
  7262. """
  7263. pass
  7264. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7265. def clear_destruct(self) -> None:
  7266. """Important: never called automatically! always explicit.
  7267. (private API)
  7268. """
  7269. pass
  7270. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7271. def empty(self) -> bool:
  7272. """(private API)"""
  7273. pass
  7274. # inline int size() const { return Size; } /* original C++ signature */
  7275. def size(self) -> int:
  7276. """(private API)"""
  7277. pass
  7278. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7279. def __getitem__(self, i: int) -> StyleMod:
  7280. """(private API)"""
  7281. pass
  7282. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7283. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7284. def push_back(self, v: StyleMod) -> None:
  7285. """(private API)"""
  7286. pass
  7287. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7288. def pop_back(self) -> None:
  7289. """(private API)"""
  7290. pass
  7291. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7292. def push_front(self, v: StyleMod) -> None:
  7293. """(private API)"""
  7294. pass
  7295. def __iter__(self) -> Iterator[StyleMod]:
  7296. pass
  7297. def __len__(self) -> int:
  7298. pass
  7299. class ImVector_TableHeaderData: # Python specialization for ImVector<ImGuiTableHeaderData>
  7300. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7301. #
  7302. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7303. def data_address(self) -> int:
  7304. """(private API)"""
  7305. pass
  7306. # #endif
  7307. #
  7308. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7309. @overload
  7310. def __init__(self) -> None:
  7311. pass
  7312. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7313. @overload
  7314. def __init__(self, src: ImVector_TableHeaderData) -> None:
  7315. pass
  7316. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7317. def clear(self) -> None:
  7318. """Important: does not destruct anything
  7319. (private API)
  7320. """
  7321. pass
  7322. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7323. def clear_destruct(self) -> None:
  7324. """Important: never called automatically! always explicit.
  7325. (private API)
  7326. """
  7327. pass
  7328. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7329. def empty(self) -> bool:
  7330. """(private API)"""
  7331. pass
  7332. # inline int size() const { return Size; } /* original C++ signature */
  7333. def size(self) -> int:
  7334. """(private API)"""
  7335. pass
  7336. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7337. def __getitem__(self, i: int) -> TableHeaderData:
  7338. """(private API)"""
  7339. pass
  7340. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7341. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7342. def push_back(self, v: TableHeaderData) -> None:
  7343. """(private API)"""
  7344. pass
  7345. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7346. def pop_back(self) -> None:
  7347. """(private API)"""
  7348. pass
  7349. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7350. def push_front(self, v: TableHeaderData) -> None:
  7351. """(private API)"""
  7352. pass
  7353. def __iter__(self) -> Iterator[TableHeaderData]:
  7354. pass
  7355. def __len__(self) -> int:
  7356. pass
  7357. class ImVector_TreeNodeStackData: # Python specialization for ImVector<ImGuiTreeNodeStackData>
  7358. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7359. #
  7360. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7361. def data_address(self) -> int:
  7362. """(private API)"""
  7363. pass
  7364. # #endif
  7365. #
  7366. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7367. @overload
  7368. def __init__(self) -> None:
  7369. pass
  7370. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7371. @overload
  7372. def __init__(self, src: ImVector_TreeNodeStackData) -> None:
  7373. pass
  7374. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7375. def clear(self) -> None:
  7376. """Important: does not destruct anything
  7377. (private API)
  7378. """
  7379. pass
  7380. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7381. def clear_destruct(self) -> None:
  7382. """Important: never called automatically! always explicit.
  7383. (private API)
  7384. """
  7385. pass
  7386. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7387. def empty(self) -> bool:
  7388. """(private API)"""
  7389. pass
  7390. # inline int size() const { return Size; } /* original C++ signature */
  7391. def size(self) -> int:
  7392. """(private API)"""
  7393. pass
  7394. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7395. def __getitem__(self, i: int) -> TreeNodeStackData:
  7396. """(private API)"""
  7397. pass
  7398. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7399. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7400. def push_back(self, v: TreeNodeStackData) -> None:
  7401. """(private API)"""
  7402. pass
  7403. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7404. def pop_back(self) -> None:
  7405. """(private API)"""
  7406. pass
  7407. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7408. def push_front(self, v: TreeNodeStackData) -> None:
  7409. """(private API)"""
  7410. pass
  7411. def __iter__(self) -> Iterator[TreeNodeStackData]:
  7412. pass
  7413. def __len__(self) -> int:
  7414. pass
  7415. class ImVector_MultiSelectTempData: # Python specialization for ImVector<ImGuiMultiSelectTempData>
  7416. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7417. #
  7418. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7419. def data_address(self) -> int:
  7420. """(private API)"""
  7421. pass
  7422. # #endif
  7423. #
  7424. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7425. @overload
  7426. def __init__(self) -> None:
  7427. pass
  7428. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7429. @overload
  7430. def __init__(self, src: ImVector_MultiSelectTempData) -> None:
  7431. pass
  7432. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7433. def clear(self) -> None:
  7434. """Important: does not destruct anything
  7435. (private API)
  7436. """
  7437. pass
  7438. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7439. def clear_destruct(self) -> None:
  7440. """Important: never called automatically! always explicit.
  7441. (private API)
  7442. """
  7443. pass
  7444. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7445. def empty(self) -> bool:
  7446. """(private API)"""
  7447. pass
  7448. # inline int size() const { return Size; } /* original C++ signature */
  7449. def size(self) -> int:
  7450. """(private API)"""
  7451. pass
  7452. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7453. def __getitem__(self, i: int) -> MultiSelectTempData:
  7454. """(private API)"""
  7455. pass
  7456. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7457. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7458. def push_back(self, v: MultiSelectTempData) -> None:
  7459. """(private API)"""
  7460. pass
  7461. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7462. def pop_back(self) -> None:
  7463. """(private API)"""
  7464. pass
  7465. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7466. def push_front(self, v: MultiSelectTempData) -> None:
  7467. """(private API)"""
  7468. pass
  7469. def __iter__(self) -> Iterator[MultiSelectTempData]:
  7470. pass
  7471. def __len__(self) -> int:
  7472. pass
  7473. class ImVector_ImTextureData_ptr: # Python specialization for ImVector<ImTextureData *>
  7474. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7475. #
  7476. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7477. def data_address(self) -> int:
  7478. """(private API)"""
  7479. pass
  7480. # #endif
  7481. #
  7482. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7483. @overload
  7484. def __init__(self) -> None:
  7485. pass
  7486. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7487. @overload
  7488. def __init__(self, src: ImVector_ImTextureData_ptr) -> None:
  7489. pass
  7490. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7491. def clear(self) -> None:
  7492. """Important: does not destruct anything
  7493. (private API)
  7494. """
  7495. pass
  7496. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7497. def clear_destruct(self) -> None:
  7498. """Important: never called automatically! always explicit.
  7499. (private API)
  7500. """
  7501. pass
  7502. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7503. def empty(self) -> bool:
  7504. """(private API)"""
  7505. pass
  7506. # inline int size() const { return Size; } /* original C++ signature */
  7507. def size(self) -> int:
  7508. """(private API)"""
  7509. pass
  7510. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7511. def __getitem__(self, i: int) -> ImTextureData:
  7512. """(private API)"""
  7513. pass
  7514. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7515. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7516. def push_back(self, v: ImTextureData) -> None:
  7517. """(private API)"""
  7518. pass
  7519. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7520. def pop_back(self) -> None:
  7521. """(private API)"""
  7522. pass
  7523. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7524. def push_front(self, v: ImTextureData) -> None:
  7525. """(private API)"""
  7526. pass
  7527. def __iter__(self) -> Iterator[ImTextureData]:
  7528. pass
  7529. def __len__(self) -> int:
  7530. pass
  7531. class ImVector_ImTextureRef: # Python specialization for ImVector<ImTextureRef>
  7532. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7533. #
  7534. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7535. def data_address(self) -> int:
  7536. """(private API)"""
  7537. pass
  7538. # #endif
  7539. #
  7540. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7541. @overload
  7542. def __init__(self) -> None:
  7543. pass
  7544. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7545. @overload
  7546. def __init__(self, src: ImVector_ImTextureRef) -> None:
  7547. pass
  7548. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7549. def clear(self) -> None:
  7550. """Important: does not destruct anything
  7551. (private API)
  7552. """
  7553. pass
  7554. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7555. def clear_destruct(self) -> None:
  7556. """Important: never called automatically! always explicit.
  7557. (private API)
  7558. """
  7559. pass
  7560. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7561. def empty(self) -> bool:
  7562. """(private API)"""
  7563. pass
  7564. # inline int size() const { return Size; } /* original C++ signature */
  7565. def size(self) -> int:
  7566. """(private API)"""
  7567. pass
  7568. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7569. def __getitem__(self, i: int) -> ImTextureRef:
  7570. """(private API)"""
  7571. pass
  7572. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7573. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7574. def push_back(self, v: ImTextureRef) -> None:
  7575. """(private API)"""
  7576. pass
  7577. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7578. def pop_back(self) -> None:
  7579. """(private API)"""
  7580. pass
  7581. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7582. def push_front(self, v: ImTextureRef) -> None:
  7583. """(private API)"""
  7584. pass
  7585. def __iter__(self) -> Iterator[ImTextureRef]:
  7586. pass
  7587. def __len__(self) -> int:
  7588. pass
  7589. class ImVector_ImTextureRect: # Python specialization for ImVector<ImTextureRect>
  7590. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7591. #
  7592. # size_t DataAddress() { return (size_t)(Data); } /* original C++ signature */
  7593. def data_address(self) -> int:
  7594. """(private API)"""
  7595. pass
  7596. # #endif
  7597. #
  7598. # inline ImVector() { Size = Capacity = 0; Data = NULL; } /* original C++ signature */
  7599. @overload
  7600. def __init__(self) -> None:
  7601. pass
  7602. # inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); } /* original C++ signature */
  7603. @overload
  7604. def __init__(self, src: ImVector_ImTextureRect) -> None:
  7605. pass
  7606. # inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } } /* original C++ signature */
  7607. def clear(self) -> None:
  7608. """Important: does not destruct anything
  7609. (private API)
  7610. """
  7611. pass
  7612. # inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); } /* original C++ signature */
  7613. def clear_destruct(self) -> None:
  7614. """Important: never called automatically! always explicit.
  7615. (private API)
  7616. """
  7617. pass
  7618. # inline bool empty() const { return Size == 0; } /* original C++ signature */
  7619. def empty(self) -> bool:
  7620. """(private API)"""
  7621. pass
  7622. # inline int size() const { return Size; } /* original C++ signature */
  7623. def size(self) -> int:
  7624. """(private API)"""
  7625. pass
  7626. # inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; } /* original C++ signature */
  7627. def __getitem__(self, i: int) -> ImTextureRect:
  7628. """(private API)"""
  7629. pass
  7630. # NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
  7631. # inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; } /* original C++ signature */
  7632. def push_back(self, v: ImTextureRect) -> None:
  7633. """(private API)"""
  7634. pass
  7635. # inline void pop_back() { IM_ASSERT(Size > 0); Size--; } /* original C++ signature */
  7636. def pop_back(self) -> None:
  7637. """(private API)"""
  7638. pass
  7639. # inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); } /* original C++ signature */
  7640. def push_front(self, v: ImTextureRect) -> None:
  7641. """(private API)"""
  7642. pass
  7643. def __iter__(self) -> Iterator[ImTextureRect]:
  7644. pass
  7645. def __len__(self) -> int:
  7646. pass
  7647. ImVector_ImTextureID = ImVector_int
  7648. ImVector_ImDrawIdx = ImVector_uint
  7649. ImVector_ID = ImVector_uint
  7650. ImVector_ImU32 = ImVector_uint
  7651. ImVector_ImU16 = ImVector_uint
  7652. ImVector_ImWchar32 = ImVector_uint
  7653. ImVector_ImWchar = ImVector_ImWchar32
  7654. ImVector_ItemFlags = ImVector_int
  7655. ImVector_ImU8 = ImVector_uchar
  7656. # </template specializations for class ImVector>
  7657. # ------------------------------------------------------------------------
  7658. # -----------------------------------------------------------------------------
  7659. # [SECTION] ImGuiStyle
  7660. # -----------------------------------------------------------------------------
  7661. # You may modify the ImGui::GetStyle() main instance during initialization and before NewFrame().
  7662. # During the frame, use ImGui::PushStyleVar(ImGuiStyleVar_XXXX)/PopStyleVar() to alter the main style values,
  7663. # and ImGui::PushStyleColor(ImGuiCol_XXX)/PopStyleColor() for colors.
  7664. # -----------------------------------------------------------------------------
  7665. class Style:
  7666. # Font scaling
  7667. # - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors)
  7668. # float FontSizeBase; /* original C++ signature */
  7669. font_size_base: float # Current base font size before external global factors are applied. Use PushFont(None, size) to modify. Use ImGui::GetFontSize() to obtain scaled value.
  7670. # float FontScaleMain; /* original C++ signature */
  7671. font_scale_main: float # Main global scale factor. May be set by application once, or exposed to end-user.
  7672. # float FontScaleDpi; /* original C++ signature */
  7673. font_scale_dpi: float # Additional global scale factor from viewport/monitor contents scale. In docking branch: when io.ConfigDpiScaleFonts is enabled, this is automatically overwritten when changing monitor DPI.
  7674. # float Alpha; /* original C++ signature */
  7675. alpha: float # Global alpha applies to everything in Dear ImGui.
  7676. # float DisabledAlpha; /* original C++ signature */
  7677. disabled_alpha: (
  7678. float # Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.
  7679. )
  7680. # ImVec2 WindowPadding; /* original C++ signature */
  7681. window_padding: ImVec2 # Padding within a window.
  7682. # float WindowRounding; /* original C++ signature */
  7683. window_rounding: float # Radius of window corners rounding. Set to 0.0 to have rectangular windows. Large values tend to lead to variety of artifacts and are not recommended.
  7684. # float WindowBorderSize; /* original C++ signature */
  7685. window_border_size: float # Thickness of border around windows. Generally set to 0.0 or 1.0. (Other values are not well tested and more CPU/GPU costly).
  7686. # float WindowBorderHoverPadding; /* original C++ signature */
  7687. window_border_hover_padding: float # Hit-testing extent outside/inside resizing border. Also extend determination of hovered window. Generally meaningfully larger than WindowBorderSize to make it easy to reach borders.
  7688. # ImVec2 WindowMinSize; /* original C++ signature */
  7689. window_min_size: ImVec2 # Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
  7690. # ImVec2 WindowTitleAlign; /* original C++ signature */
  7691. window_title_align: (
  7692. ImVec2 # Alignment for title bar text. Defaults to (0.0,0.5) for left-aligned,vertically centered.
  7693. )
  7694. # ImGuiDir WindowMenuButtonPosition; /* original C++ signature */
  7695. window_menu_button_position: (
  7696. Dir # Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left.
  7697. )
  7698. # float ChildRounding; /* original C++ signature */
  7699. child_rounding: float # Radius of child window corners rounding. Set to 0.0 to have rectangular windows.
  7700. # float ChildBorderSize; /* original C++ signature */
  7701. child_border_size: float # Thickness of border around child windows. Generally set to 0.0 or 1.0. (Other values are not well tested and more CPU/GPU costly).
  7702. # float PopupRounding; /* original C++ signature */
  7703. popup_rounding: float # Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding)
  7704. # float PopupBorderSize; /* original C++ signature */
  7705. popup_border_size: float # Thickness of border around popup/tooltip windows. Generally set to 0.0 or 1.0. (Other values are not well tested and more CPU/GPU costly).
  7706. # ImVec2 FramePadding; /* original C++ signature */
  7707. frame_padding: ImVec2 # Padding within a framed rectangle (used by most widgets).
  7708. # float FrameRounding; /* original C++ signature */
  7709. frame_rounding: (
  7710. float # Radius of frame corners rounding. Set to 0.0 to have rectangular frame (used by most widgets).
  7711. )
  7712. # float FrameBorderSize; /* original C++ signature */
  7713. frame_border_size: float # Thickness of border around frames. Generally set to 0.0 or 1.0. (Other values are not well tested and more CPU/GPU costly).
  7714. # ImVec2 ItemSpacing; /* original C++ signature */
  7715. item_spacing: ImVec2 # Horizontal and vertical spacing between widgets/lines.
  7716. # ImVec2 ItemInnerSpacing; /* original C++ signature */
  7717. item_inner_spacing: ImVec2 # Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
  7718. # ImVec2 CellPadding; /* original C++ signature */
  7719. cell_padding: ImVec2 # Padding within a table cell. Cellpadding.x is locked for entire table. CellPadding.y may be altered between different rows.
  7720. # ImVec2 TouchExtraPadding; /* original C++ signature */
  7721. touch_extra_padding: ImVec2 # Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
  7722. # float IndentSpacing; /* original C++ signature */
  7723. indent_spacing: (
  7724. float # Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2).
  7725. )
  7726. # float ColumnsMinSpacing; /* original C++ signature */
  7727. columns_min_spacing: float # Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1).
  7728. # float ScrollbarSize; /* original C++ signature */
  7729. scrollbar_size: float # Width of the vertical scrollbar, Height of the horizontal scrollbar.
  7730. # float ScrollbarRounding; /* original C++ signature */
  7731. scrollbar_rounding: float # Radius of grab corners for scrollbar.
  7732. # float ScrollbarPadding; /* original C++ signature */
  7733. scrollbar_padding: float # Padding of scrollbar grab within its frame (same for both axes).
  7734. # float GrabMinSize; /* original C++ signature */
  7735. grab_min_size: float # Minimum width/height of a grab box for slider/scrollbar.
  7736. # float GrabRounding; /* original C++ signature */
  7737. grab_rounding: float # Radius of grabs corners rounding. Set to 0.0 to have rectangular slider grabs.
  7738. # float LayoutAlign; /* original C++ signature */
  7739. layout_align: float # Element alignment inside horizontal and vertical layouts (0.0 - left/top, 1.0 - right/bottom, 0.5 - center).
  7740. # float LogSliderDeadzone; /* original C++ signature */
  7741. log_slider_deadzone: (
  7742. float # The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
  7743. )
  7744. # float ImageRounding; /* original C++ signature */
  7745. image_rounding: float # Rounding of Image() calls.
  7746. # float ImageBorderSize; /* original C++ signature */
  7747. image_border_size: float # Thickness of border around Image() calls.
  7748. # float TabRounding; /* original C++ signature */
  7749. tab_rounding: float # Radius of upper corners of a tab. Set to 0.0 to have rectangular tabs.
  7750. # float TabBorderSize; /* original C++ signature */
  7751. tab_border_size: float # Thickness of border around tabs.
  7752. # float TabMinWidthBase; /* original C++ signature */
  7753. tab_min_width_base: (
  7754. float # Minimum tab width, to make tabs larger than their contents. TabBar buttons are not affected.
  7755. )
  7756. # float TabMinWidthShrink; /* original C++ signature */
  7757. tab_min_width_shrink: (
  7758. float # Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy.
  7759. )
  7760. # float TabCloseButtonMinWidthSelected; /* original C++ signature */
  7761. tab_close_button_min_width_selected: float # -1: always visible. 0.0: visible when hovered. >0.0: visible when hovered if minimum width. FLT_MAX: never shrink, will behave like ImGuiTabBarFlags_FittingPolicyScroll.
  7762. # float TabCloseButtonMinWidthUnselected; /* original C++ signature */
  7763. tab_close_button_min_width_unselected: float # -1: always visible. 0.0: visible when hovered. >0.0: visible when hovered if minimum width. FLT_MAX: never show close button when unselected.
  7764. # float TabBarBorderSize; /* original C++ signature */
  7765. tab_bar_border_size: float # Thickness of tab-bar separator, which takes on the tab active color to denote focus.
  7766. # float TabBarOverlineSize; /* original C++ signature */
  7767. tab_bar_overline_size: float # Thickness of tab-bar overline, which highlights the selected tab-bar.
  7768. # float TableAngledHeadersAngle; /* original C++ signature */
  7769. table_angled_headers_angle: (
  7770. float # Angle of angled headers (supported values range from -50.0 degrees to +50.0 degrees).
  7771. )
  7772. # ImVec2 TableAngledHeadersTextAlign; /* original C++ signature */
  7773. table_angled_headers_text_align: ImVec2 # Alignment of angled headers within the cell
  7774. # ImGuiTreeNodeFlags TreeLinesFlags; /* original C++ signature */
  7775. tree_lines_flags: TreeNodeFlags # Default way to draw lines connecting TreeNode hierarchy. ImGuiTreeNodeFlags_DrawLinesNone or ImGuiTreeNodeFlags_DrawLinesFull or ImGuiTreeNodeFlags_DrawLinesToNodes.
  7776. # float TreeLinesSize; /* original C++ signature */
  7777. tree_lines_size: float # Thickness of outlines when using ImGuiTreeNodeFlags_DrawLines.
  7778. # float TreeLinesRounding; /* original C++ signature */
  7779. tree_lines_rounding: float # Radius of lines connecting child nodes to the vertical line.
  7780. # float DragDropTargetRounding; /* original C++ signature */
  7781. drag_drop_target_rounding: float # Radius of the drag and drop target frame. When <0.0: use FrameRounding.
  7782. # float DragDropTargetBorderSize; /* original C++ signature */
  7783. drag_drop_target_border_size: float # Thickness of the drag and drop target border.
  7784. # float DragDropTargetPadding; /* original C++ signature */
  7785. drag_drop_target_padding: float # Size to expand the drag and drop target from actual target item size.
  7786. # float ColorMarkerSize; /* original C++ signature */
  7787. color_marker_size: float # Size of R/G/B/A color markers for ColorEdit4() and for Drags/Sliders when using ImGuiSliderFlags_ColorMarkers.
  7788. # ImGuiDir ColorButtonPosition; /* original C++ signature */
  7789. color_button_position: (
  7790. Dir # Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
  7791. )
  7792. # ImVec2 ButtonTextAlign; /* original C++ signature */
  7793. button_text_align: (
  7794. ImVec2 # Alignment of button text when button is larger than text. Defaults to (0.5, 0.5) (centered).
  7795. )
  7796. # ImVec2 SelectableTextAlign; /* original C++ signature */
  7797. selectable_text_align: ImVec2 # Alignment of selectable text. Defaults to (0.0, 0.0) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
  7798. # float SeparatorSize; /* original C++ signature */
  7799. separator_size: float # Thickness of border in Separator(). Must be >= 1.0.
  7800. # float SeparatorTextBorderSize; /* original C++ signature */
  7801. separator_text_border_size: float # Thickness of border in SeparatorText()
  7802. # ImVec2 SeparatorTextAlign; /* original C++ signature */
  7803. separator_text_align: (
  7804. ImVec2 # Alignment of text within the separator. Defaults to (0.0, 0.5) (left aligned, center).
  7805. )
  7806. # ImVec2 SeparatorTextPadding; /* original C++ signature */
  7807. separator_text_padding: ImVec2 # Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
  7808. # ImVec2 DisplayWindowPadding; /* original C++ signature */
  7809. display_window_padding: ImVec2 # Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen.
  7810. # ImVec2 DisplaySafeAreaPadding; /* original C++ signature */
  7811. display_safe_area_padding: ImVec2 # Apply to every windows, menus, popups, tooltips: amount where we avoid displaying contents. Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured).
  7812. # bool DockingNodeHasCloseButton; /* original C++ signature */
  7813. docking_node_has_close_button: bool # Docking node has their own CloseButton() to close all docked windows.
  7814. # float DockingSeparatorSize; /* original C++ signature */
  7815. docking_separator_size: float # Thickness of resizing border between docked windows
  7816. # float MouseCursorScale; /* original C++ signature */
  7817. mouse_cursor_scale: float # Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI scaling over this scale. May be removed later.
  7818. # bool AntiAliasedLines; /* original C++ signature */
  7819. anti_aliased_lines: bool # Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
  7820. # bool AntiAliasedLinesUseTex; /* original C++ signature */
  7821. anti_aliased_lines_use_tex: bool # Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList).
  7822. # bool AntiAliasedFill; /* original C++ signature */
  7823. anti_aliased_fill: bool # Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
  7824. # float CurveTessellationTol; /* original C++ signature */
  7825. curve_tessellation_tol: float # Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
  7826. # float CircleTessellationMaxError; /* original C++ signature */
  7827. circle_tessellation_max_error: float # Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.
  7828. # Behaviors
  7829. # (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO)
  7830. # float HoverStationaryDelay; /* original C++ signature */
  7831. hover_stationary_delay: (
  7832. float # Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
  7833. )
  7834. # float HoverDelayShort; /* original C++ signature */
  7835. hover_delay_short: (
  7836. float # Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
  7837. )
  7838. # float HoverDelayNormal; /* original C++ signature */
  7839. hover_delay_normal: float # Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
  7840. # ImGuiHoveredFlags HoverFlagsForTooltipMouse; /* original C++ signature */
  7841. hover_flags_for_tooltip_mouse: HoveredFlags # Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
  7842. # ImGuiHoveredFlags HoverFlagsForTooltipNav; /* original C++ signature */
  7843. hover_flags_for_tooltip_nav: HoveredFlags # Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
  7844. # [Internal]
  7845. # float _MainScale; /* original C++ signature */
  7846. _main_scale: float # FIXME-WIP: Reference scale, as applied by ScaleAllSizes(). PLEASE DO NOT USE THIS FOR NOW.
  7847. # float _NextFrameFontSizeBase; /* original C++ signature */
  7848. _next_frame_font_size_base: float # FIXME: Temporary hack until we finish remaining work.
  7849. # [ADAPT_IMGUI_BUNDLE]
  7850. # #ifdef IMGUI_BUNDLE_PYTHON_API
  7851. #
  7852. # python adapter for ImGuiStyle::Colors[ImGuiCol_COUNT]
  7853. # You can query and modify those values (0 <= idxColor < Col_.count)
  7854. # inline IMGUI_API ImVec4& Color_(size_t idxColor) { IM_ASSERT( (idxColor >=0) && (idxColor < ImGuiCol_COUNT)); return Colors[idxColor]; } /* original C++ signature */
  7855. def color_(self, idx_color: int) -> ImVec4:
  7856. pass
  7857. # inline IMGUI_API void SetColor_(size_t idxColor, ImVec4 color) { IM_ASSERT( (idxColor >=0) && (idxColor < ImGuiCol_COUNT)); Colors[idxColor] = color; } /* original C++ signature */
  7858. def set_color_(self, idx_color: int, color: ImVec4Like) -> None:
  7859. pass
  7860. # #endif
  7861. #
  7862. # [/ADAPT_IMGUI_BUNDLE]
  7863. # IMGUI_API ImGuiStyle(); /* original C++ signature */
  7864. def __init__(self) -> None:
  7865. pass
  7866. # IMGUI_API void ScaleAllSizes(float scale_factor); /* original C++ signature */
  7867. def scale_all_sizes(self, scale_factor: float) -> None:
  7868. """Scale all spacing/padding/thickness values. Do not scale fonts. See comments in definition. Consider not calling this if your initial scale factor if <1.0."""
  7869. pass
  7870. # Obsolete names
  7871. # -----------------------------------------------------------------------------
  7872. # [SECTION] ImGuiIO
  7873. # -----------------------------------------------------------------------------
  7874. # Communicate most settings and inputs/outputs to Dear ImGui using this structure.
  7875. # Access via ImGui::GetIO(). Read 'Programmer guide' section in .cpp file for general usage.
  7876. # It is generally expected that:
  7877. # - initialization: backends and user code writes to ImGuiIO.
  7878. # - main loop: backends writes to ImGuiIO, user code and imgui code reads from ImGuiIO.
  7879. # -----------------------------------------------------------------------------
  7880. # Also see ImGui::GetPlatformIO() and ImGuiPlatformIO struct for OS/platform related functions: clipboard, IME etc.
  7881. # -----------------------------------------------------------------------------
  7882. class KeyData:
  7883. """[Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
  7884. If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
  7885. """
  7886. # bool Down; /* original C++ signature */
  7887. down: bool # True for if key is down
  7888. # float DownDuration; /* original C++ signature */
  7889. down_duration: float # Duration the key has been down (<0.0: not pressed, 0.0: just pressed, >0.0: time held)
  7890. # float DownDurationPrev; /* original C++ signature */
  7891. down_duration_prev: float # Last frame duration the key has been down
  7892. # float AnalogValue; /* original C++ signature */
  7893. analog_value: float # 0.0..1.0 for gamepad values
  7894. # ImGuiKeyData(bool Down = bool(), float DownDuration = float(), float DownDurationPrev = float(), float AnalogValue = float()); /* original C++ signature */
  7895. def __init__(
  7896. self,
  7897. down: bool = bool(),
  7898. down_duration: float = float(),
  7899. down_duration_prev: float = float(),
  7900. analog_value: float = float(),
  7901. ) -> None:
  7902. """Auto-generated default constructor with named params"""
  7903. pass
  7904. class IO:
  7905. # ------------------------------------------------------------------
  7906. # Configuration // Default value
  7907. # ------------------------------------------------------------------
  7908. # ImGuiConfigFlags ConfigFlags; /* original C++ signature */
  7909. config_flags: ConfigFlags # = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Keyboard/Gamepad navigation options, etc.
  7910. # ImGuiBackendFlags BackendFlags; /* original C++ signature */
  7911. backend_flags: BackendFlags # = 0 // See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend.
  7912. # ImVec2 DisplaySize; /* original C++ signature */
  7913. display_size: (
  7914. ImVec2 # <unset> // Main display size, in pixels (== GetMainViewport()->Size). May change every frame.
  7915. )
  7916. # ImVec2 DisplayFramebufferScale; /* original C++ signature */
  7917. display_framebuffer_scale: ImVec2 # = (1, 1) // Main display density. For retina display where window coordinates are different from framebuffer coordinates. This will affect font density + will end up in ImDrawData::FramebufferScale.
  7918. # float DeltaTime; /* original C++ signature */
  7919. delta_time: float # = 1.0/60.0 // Time elapsed since last frame, in seconds. May change every frame.
  7920. # float IniSavingRate; /* original C++ signature */
  7921. ini_saving_rate: float # = 5.0 // Minimum time between saving positions/sizes to .ini file, in seconds.
  7922. # void* UserData; /* original C++ signature */
  7923. user_data: Any # = None // Store your own data.
  7924. # Font system
  7925. # ImFontAtlas*Fonts; /* original C++ signature */
  7926. fonts: (
  7927. ImFontAtlas # <auto> // Font atlas: load, rasterize and pack one or more fonts into a single texture.
  7928. )
  7929. # ImFont* FontDefault; /* original C++ signature */
  7930. font_default: ImFont # = None // Font to use on NewFrame(). Use None to uses Fonts->Fonts[0].
  7931. # bool FontAllowUserScaling; /* original C++ signature */
  7932. font_allow_user_scaling: bool # = False // Allow user scaling text of individual window with Ctrl+Wheel.
  7933. # Keyboard/Gamepad Navigation options
  7934. # bool ConfigNavSwapGamepadButtons; /* original C++ signature */
  7935. config_nav_swap_gamepad_buttons: bool # = False // Swap Activate<>Cancel (A<>B) buttons, matching typical "Nintendo/Japanese style" gamepad layout.
  7936. # bool ConfigNavMoveSetMousePos; /* original C++ signature */
  7937. config_nav_move_set_mouse_pos: bool # = False // Directional/tabbing navigation teleports the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is difficult. Will update io.MousePos and set io.WantSetMousePos=True.
  7938. # bool ConfigNavCaptureKeyboard; /* original C++ signature */
  7939. config_nav_capture_keyboard: bool # = True // Sets io.WantCaptureKeyboard when io.NavActive is set.
  7940. # bool ConfigNavEscapeClearFocusItem; /* original C++ signature */
  7941. config_nav_escape_clear_focus_item: bool # = True // Pressing Escape can clear focused item + navigation id/highlight. Set to False if you want to always keep highlight on.
  7942. # bool ConfigNavEscapeClearFocusWindow; /* original C++ signature */
  7943. config_nav_escape_clear_focus_window: bool # = False // Pressing Escape can clear focused window as well (super set of io.ConfigNavEscapeClearFocusItem).
  7944. # bool ConfigNavCursorVisibleAuto; /* original C++ signature */
  7945. config_nav_cursor_visible_auto: bool # = True // Using directional navigation key makes the cursor visible. Mouse click hides the cursor.
  7946. # bool ConfigNavCursorVisibleAlways; /* original C++ signature */
  7947. config_nav_cursor_visible_always: bool # = False // Navigation cursor is always visible.
  7948. # Docking options (when ImGuiConfigFlags_DockingEnable is set)
  7949. # bool ConfigDockingNoSplit; /* original C++ signature */
  7950. config_docking_no_split: bool # = False // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
  7951. # bool ConfigDockingNoDockingOver; /* original C++ signature */
  7952. config_docking_no_docking_over: bool # = False // Simplified docking mode: disable window merging into a same tab-bar, so docking is limited to splitting windows.
  7953. # bool ConfigDockingWithShift; /* original C++ signature */
  7954. config_docking_with_shift: bool # = False // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
  7955. # bool ConfigDockingAlwaysTabBar; /* original C++ signature */
  7956. config_docking_always_tab_bar: bool # = False // [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead] Make every single floating window display within a docking node.
  7957. # bool ConfigDockingTransparentPayload; /* original C++ signature */
  7958. config_docking_transparent_payload: bool # = False // [BETA] Make window or viewport transparent when docking and only display docking boxes on the target viewport. Useful if rendering of multiple viewport cannot be synced. Best used with ConfigViewportsNoAutoMerge.
  7959. # Viewport options (when ImGuiConfigFlags_ViewportsEnable is set)
  7960. # (sorry for the amount of "NoXXXX" flags, which may be harder to reason about! may rework someday)
  7961. # bool ConfigViewportsNoAutoMerge; /* original C++ signature */
  7962. config_viewports_no_auto_merge: bool # = False; // Set to make all floating imgui windows always create their own viewport. Otherwise, they are merged into the main host viewports when overlapping it. May also set ImGuiViewportFlags_NoAutoMerge on individual viewport.
  7963. # bool ConfigViewportsNoTaskBarIcon; /* original C++ signature */
  7964. config_viewports_no_task_bar_icon: bool # = False // Disable default OS task bar icon flag for secondary viewports. When a viewport doesn't want a task bar icon, ImGuiViewportFlags_NoTaskBarIcon will be set on it.
  7965. # bool ConfigViewportsNoDecoration; /* original C++ signature */
  7966. config_viewports_no_decoration: bool # = True // Disable default OS window decoration flag for secondary viewports. When a viewport doesn't want window decorations, ImGuiViewportFlags_NoDecoration will be set on it. Enabling decoration can create subsequent issues at OS levels (e.g. minimum window size).
  7967. # bool ConfigViewportsNoDefaultParent; /* original C++ signature */
  7968. config_viewports_no_default_parent: bool # = True // Disable setting OS window parent to main viewport by default. The platform backend is expected to honor `viewport->ParentViewportID` to setup a parent/child relationship between the OS windows (supported if ImGuiBackendFlags_HasParentViewport is set). When parented: child windows always appear in front of their parent. Set to False if you want viewports to automatically be parent of main viewport, otherwise all viewports will be top-level OS windows. Parent/child relationship may be set on a per-window basis using ImGuiWindowClass.
  7969. # bool ConfigViewportsPlatformFocusSetsImGuiFocus; /* original C++ signature */
  7970. config_viewports_platform_focus_sets_focus: bool # = True // When a platform window is focused (e.g. using Alt+Tab, clicking Platform Title Bar), apply corresponding focus on imgui windows (may clear focus/active id from imgui windows location in other platform windows). In principle this is better enabled but we provide an opt-out, because some Linux window managers tend to eagerly focus windows (e.g. on mouse hover, or even a simple window pos/size change).
  7971. # DPI/Scaling options
  7972. # This may keep evolving during 1.92.x releases. Expect some turbulence.
  7973. # bool ConfigDpiScaleFonts; /* original C++ signature */
  7974. config_dpi_scale_fonts: bool # = False // [EXPERIMENTAL] Automatically overwrite style.FontScaleDpi when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now.
  7975. # bool ConfigDpiScaleViewports; /* original C++ signature */
  7976. config_dpi_scale_viewports: (
  7977. bool # = False // [EXPERIMENTAL] Scale Dear ImGui and Platform Windows when Monitor DPI changes.
  7978. )
  7979. # Miscellaneous options
  7980. # (you can visualize and interact with all options in 'Demo->Configuration')
  7981. # bool MouseDrawCursor; /* original C++ signature */
  7982. mouse_draw_cursor: bool # = False // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
  7983. # bool ConfigMacOSXBehaviors; /* original C++ signature */
  7984. config_mac_osx_behaviors: bool # = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
  7985. # bool ConfigInputTrickleEventQueue; /* original C++ signature */
  7986. config_input_trickle_event_queue: bool # = True // Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.
  7987. # bool ConfigInputTextCursorBlink; /* original C++ signature */
  7988. config_input_text_cursor_blink: (
  7989. bool # = True // Enable blinking cursor (optional as some users consider it to be distracting).
  7990. )
  7991. # bool ConfigInputTextEnterKeepActive; /* original C++ signature */
  7992. config_input_text_enter_keep_active: (
  7993. bool # = False // [BETA] Pressing Enter will reactivate item and select all text (single-line only).
  7994. )
  7995. # bool ConfigDragClickToInputText; /* original C++ signature */
  7996. config_drag_click_to_input_text: bool # = False // [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
  7997. # bool ConfigWindowsResizeFromEdges; /* original C++ signature */
  7998. config_windows_resize_from_edges: bool # = True // Enable resizing of windows from their edges and from the lower-left corner. This requires ImGuiBackendFlags_HasMouseCursors for better mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
  7999. # bool ConfigWindowsMoveFromTitleBarOnly; /* original C++ signature */
  8000. config_windows_move_from_title_bar_only: bool # = False // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
  8001. # bool ConfigWindowsCopyContentsWithCtrlC; /* original C++ signature */
  8002. config_windows_copy_contents_with_ctrl_c: bool # = False // [EXPERIMENTAL] Ctrl+C copy the contents of focused window into the clipboard. Experimental because: (1) has known issues with nested Begin/End pairs (2) text output quality varies (3) text output is in submission order rather than spatial order.
  8003. # bool ConfigScrollbarScrollByPage; /* original C++ signature */
  8004. config_scrollbar_scroll_by_page: bool # = True // Enable scrolling page by page when clicking outside the scrollbar grab. When disabled, always scroll to clicked location. When enabled, Shift+Click scrolls to clicked location.
  8005. # float ConfigMemoryCompactTimer; /* original C++ signature */
  8006. config_memory_compact_timer: float # = 60.0 // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0 to disable.
  8007. # Inputs Behaviors
  8008. # (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle)
  8009. # float MouseDoubleClickTime; /* original C++ signature */
  8010. mouse_double_click_time: float # = 0.30 // Time for a double-click, in seconds.
  8011. # float MouseDoubleClickMaxDist; /* original C++ signature */
  8012. mouse_double_click_max_dist: (
  8013. float # = 6.0 // Distance threshold to stay in to validate a double-click, in pixels.
  8014. )
  8015. # float MouseDragThreshold; /* original C++ signature */
  8016. mouse_drag_threshold: float # = 6.0 // Distance threshold before considering we are dragging.
  8017. # float KeyRepeatDelay; /* original C++ signature */
  8018. key_repeat_delay: float # = 0.275 // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
  8019. # float KeyRepeatRate; /* original C++ signature */
  8020. key_repeat_rate: float # = 0.050 // When holding a key/button, rate at which it repeats, in seconds.
  8021. # ------------------------------------------------------------------
  8022. # Debug options
  8023. # ------------------------------------------------------------------
  8024. # Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL]
  8025. # - Error recovery is provided as a way to facilitate:
  8026. # - Recovery after a programming error (native code or scripting language - the latter tends to facilitate iterating on code while running).
  8027. # - Recovery after running an exception handler or any error processing which may skip code after an error has been detected.
  8028. # - Error recovery is not perfect nor guaranteed! It is a feature to ease development.
  8029. # You not are not supposed to rely on it in the course of a normal application run.
  8030. # - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT().
  8031. # - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked!
  8032. # - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls!
  8033. # Otherwise it would severely hinder your ability to catch and correct mistakes!
  8034. # Read https://github.com/ocornut/imgui/wiki/Error-Handling for details.
  8035. # - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!)
  8036. # - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.)
  8037. # - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings.
  8038. # bool ConfigErrorRecovery; /* original C++ signature */
  8039. config_error_recovery: bool # = True // Enable error recovery support. Some errors won't be detected and lead to direct crashes if recovery is disabled.
  8040. # bool ConfigErrorRecoveryEnableAssert; /* original C++ signature */
  8041. config_error_recovery_enable_assert: bool # = True // Enable asserts on recoverable error. By default call IM_ASSERT() when returning from a failing IM_ASSERT_USER_ERROR()
  8042. # bool ConfigErrorRecoveryEnableDebugLog; /* original C++ signature */
  8043. config_error_recovery_enable_debug_log: bool # = True // Enable debug log output on recoverable errors.
  8044. # bool ConfigErrorRecoveryEnableTooltip; /* original C++ signature */
  8045. config_error_recovery_enable_tooltip: bool # = True // Enable tooltip on recoverable errors. The tooltip include a way to enable asserts if they were disabled.
  8046. # Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro.
  8047. # - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability.
  8048. # - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.
  8049. # e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version.
  8050. # bool ConfigDebugIsDebuggerPresent; /* original C++ signature */
  8051. config_debug_is_debugger_present: bool # = False // Enable various tools calling IM_DEBUG_BREAK().
  8052. # Tools to detect code submitting items with conflicting/duplicate IDs
  8053. # - Code should use PushID()/PopID() in loops, or append "##xx" to same-label identifiers.
  8054. # - Empty label e.g. Button("") == same ID as parent widget/node. Use Button("##xx") instead!
  8055. # - See FAQ https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-about-the-id-stack-system
  8056. # bool ConfigDebugHighlightIdConflicts; /* original C++ signature */
  8057. config_debug_highlight_id_conflicts: bool # = True // Highlight and show an error message popup when multiple items have conflicting identifiers.
  8058. # bool ConfigDebugHighlightIdConflictsShowItemPicker; /* original C++ signature */
  8059. config_debug_highlight_id_conflicts_show_item_picker: (
  8060. bool # =True // Show "Item Picker" button in aforementioned popup.
  8061. )
  8062. # Tools to test correct Begin/End and BeginChild/EndChild behaviors.
  8063. # - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
  8064. # - This is inconsistent with other BeginXXX functions and create confusion for many users.
  8065. # - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
  8066. # bool ConfigDebugBeginReturnValueOnce; /* original C++ signature */
  8067. config_debug_begin_return_value_once: bool # = False // First-time calls to Begin()/BeginChild() will return False. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
  8068. # bool ConfigDebugBeginReturnValueLoop; /* original C++ signature */
  8069. config_debug_begin_return_value_loop: bool # = False // Some calls to Begin()/BeginChild() will return False. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running.
  8070. # Option to deactivate io.AddFocusEvent(False) handling.
  8071. # - May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
  8072. # - Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
  8073. # bool ConfigDebugIgnoreFocusLoss; /* original C++ signature */
  8074. config_debug_ignore_focus_loss: bool # = False // Ignore io.AddFocusEvent(False), consequently not calling io.ClearInputKeys()/io.ClearInputMouse() in input processing.
  8075. # Option to audit .ini data
  8076. # bool ConfigDebugIniSettings; /* original C++ signature */
  8077. config_debug_ini_settings: bool # = False // Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
  8078. # ------------------------------------------------------------------
  8079. # Platform Identifiers
  8080. # (the imgui_impl_xxxx backend files are setting those up for you)
  8081. # ------------------------------------------------------------------
  8082. # Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons.
  8083. # Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff.
  8084. # const char* BackendPlatformName; /* original C++ signature */
  8085. backend_platform_name: str # = None # (const)
  8086. # const char* BackendRendererName; /* original C++ signature */
  8087. backend_renderer_name: str # = None # (const)
  8088. # void* BackendPlatformUserData; /* original C++ signature */
  8089. backend_platform_user_data: Any # = None // User data for platform backend
  8090. # void* BackendRendererUserData; /* original C++ signature */
  8091. backend_renderer_user_data: Any # = None // User data for renderer backend
  8092. # void* BackendLanguageUserData; /* original C++ signature */
  8093. backend_language_user_data: Any # = None // User data for non C++ programming language backend
  8094. # ------------------------------------------------------------------
  8095. # Input - Call before calling NewFrame()
  8096. # ------------------------------------------------------------------
  8097. # Input Functions
  8098. # IMGUI_API void AddKeyEvent(ImGuiKey key, bool down); /* original C++ signature */
  8099. def add_key_event(self, key: Key, down: bool) -> None:
  8100. """Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)"""
  8101. pass
  8102. # IMGUI_API void AddKeyAnalogEvent(ImGuiKey key, bool down, float v); /* original C++ signature */
  8103. def add_key_analog_event(self, key: Key, down: bool, v: float) -> None:
  8104. """Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be handled by the backend."""
  8105. pass
  8106. # IMGUI_API void AddMousePosEvent(float x, float y); /* original C++ signature */
  8107. def add_mouse_pos_event(self, x: float, y: float) -> None:
  8108. """Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered)"""
  8109. pass
  8110. # IMGUI_API void AddMouseButtonEvent(int button, bool down); /* original C++ signature */
  8111. def add_mouse_button_event(self, button: int, down: bool) -> None:
  8112. """Queue a mouse button change"""
  8113. pass
  8114. # IMGUI_API void AddMouseWheelEvent(float wheel_x, float wheel_y); /* original C++ signature */
  8115. def add_mouse_wheel_event(self, wheel_x: float, wheel_y: float) -> None:
  8116. """Queue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll right, wheel_x>0: scroll left."""
  8117. pass
  8118. # IMGUI_API void AddMouseSourceEvent(ImGuiMouseSource source); /* original C++ signature */
  8119. def add_mouse_source_event(self, source: MouseSource) -> None:
  8120. """Queue a mouse source change (Mouse/TouchScreen/Pen)"""
  8121. pass
  8122. # IMGUI_API void AddMouseViewportEvent(ImGuiID id); /* original C++ signature */
  8123. def add_mouse_viewport_event(self, id_: ID) -> None:
  8124. """Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support)."""
  8125. pass
  8126. # IMGUI_API void AddFocusEvent(bool focused); /* original C++ signature */
  8127. def add_focus_event(self, focused: bool) -> None:
  8128. """Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)"""
  8129. pass
  8130. # IMGUI_API void AddInputCharacter(unsigned int c); /* original C++ signature */
  8131. def add_input_character(self, c: int) -> None:
  8132. """Queue a new character input"""
  8133. pass
  8134. # IMGUI_API void AddInputCharacterUTF16(ImWchar16 c); /* original C++ signature */
  8135. def add_input_character_utf16(self, c: ImWchar16) -> None:
  8136. """Queue a new character input from a UTF-16 character, it can be a surrogate"""
  8137. pass
  8138. # IMGUI_API void AddInputCharactersUTF8(const char* str); /* original C++ signature */
  8139. def add_input_characters_utf8(self, str: str) -> None:
  8140. """Queue a new characters input from a UTF-8 string"""
  8141. pass
  8142. # IMGUI_API void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index = -1); /* original C++ signature */
  8143. def set_key_event_native_data(
  8144. self, key: Key, native_keycode: int, native_scancode: int, native_legacy_index: int = -1
  8145. ) -> None:
  8146. """[Optional] Specify index for legacy <1.87 IsKeyXXX() functions with native indices + specify native keycode, scancode."""
  8147. pass
  8148. # IMGUI_API void SetAppAcceptingEvents(bool accepting_events); /* original C++ signature */
  8149. def set_app_accepting_events(self, accepting_events: bool) -> None:
  8150. """Set master flag for accepting key/mouse/text events (default to True). Useful if you have native dialog boxes that are interrupting your application loop/refresh, and you want to disable events being queued while your app is frozen."""
  8151. pass
  8152. # IMGUI_API void ClearEventsQueue(); /* original C++ signature */
  8153. def clear_events_queue(self) -> None:
  8154. """Clear all incoming events."""
  8155. pass
  8156. # IMGUI_API void ClearInputKeys(); /* original C++ signature */
  8157. def clear_input_keys(self) -> None:
  8158. """Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons."""
  8159. pass
  8160. # IMGUI_API void ClearInputMouse(); /* original C++ signature */
  8161. def clear_input_mouse(self) -> None:
  8162. """Clear current mouse state."""
  8163. pass
  8164. # ------------------------------------------------------------------
  8165. # Output - Updated by NewFrame() or EndFrame()/Render()
  8166. # (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is
  8167. # generally easier and more correct to use their state BEFORE calling NewFrame(). See FAQ for details!)
  8168. # ------------------------------------------------------------------
  8169. # bool WantCaptureMouse; /* original C++ signature */
  8170. want_capture_mouse: bool # Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
  8171. # bool WantCaptureKeyboard; /* original C++ signature */
  8172. want_capture_keyboard: bool # Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
  8173. # bool WantTextInput; /* original C++ signature */
  8174. want_text_input: bool # Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
  8175. # bool WantSetMousePos; /* original C++ signature */
  8176. want_set_mouse_pos: bool # MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when io.ConfigNavMoveSetMousePos is enabled.
  8177. # bool WantSaveIniSettings; /* original C++ signature */
  8178. want_save_ini_settings: bool # When manual .ini load/save is active (io.IniFilename == None), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving!
  8179. # bool NavActive; /* original C++ signature */
  8180. nav_active: bool # Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
  8181. # bool NavVisible; /* original C++ signature */
  8182. nav_visible: (
  8183. bool # Keyboard/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events).
  8184. )
  8185. # float Framerate; /* original C++ signature */
  8186. framerate: float # Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
  8187. # int MetricsRenderVertices; /* original C++ signature */
  8188. metrics_render_vertices: int # Vertices output during last call to Render()
  8189. # int MetricsRenderIndices; /* original C++ signature */
  8190. metrics_render_indices: int # Indices output during last call to Render() = number of triangles * 3
  8191. # int MetricsRenderWindows; /* original C++ signature */
  8192. metrics_render_windows: int # Number of visible windows
  8193. # int MetricsActiveWindows; /* original C++ signature */
  8194. metrics_active_windows: int # Number of active windows
  8195. # ImVec2 MouseDelta; /* original C++ signature */
  8196. mouse_delta: ImVec2 # Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
  8197. # ------------------------------------------------------------------
  8198. # [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
  8199. # ------------------------------------------------------------------
  8200. # ImGuiContext* Ctx; /* original C++ signature */
  8201. ctx: Context # Parent UI context (needs to be set explicitly by parent).
  8202. # Main Input State
  8203. # (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead)
  8204. # (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere)
  8205. # ImVec2 MousePos; /* original C++ signature */
  8206. mouse_pos: ImVec2 # Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
  8207. # bool MouseDown[5]; /* original C++ signature */
  8208. mouse_down: (
  8209. np.ndarray
  8210. ) # ndarray[type=bool, size=5] # Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
  8211. # float MouseWheel; /* original C++ signature */
  8212. mouse_wheel: float # Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold Shift to turn vertical scroll into horizontal scroll.
  8213. # float MouseWheelH; /* original C++ signature */
  8214. mouse_wheel_h: float # Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends.
  8215. # ImGuiMouseSource MouseSource; /* original C++ signature */
  8216. mouse_source: MouseSource # Mouse actual input peripheral (Mouse/TouchScreen/Pen).
  8217. # ImGuiID MouseHoveredViewport; /* original C++ signature */
  8218. mouse_hovered_viewport: ID # (Optional) Modify using io.AddMouseViewportEvent(). With multi-viewports: viewport the OS mouse is hovering. If possible _IGNORING_ viewports with the ImGuiViewportFlags_NoInputs flag is much better (few backends can handle that). Set io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport if you can provide this info. If you don't imgui will infer the value using the rectangles and last focused time of the viewports it knows about (ignoring other OS windows).
  8219. # bool KeyCtrl; /* original C++ signature */
  8220. key_ctrl: bool # Keyboard modifier down: Ctrl (non-macOS), Cmd (macOS)
  8221. # bool KeyShift; /* original C++ signature */
  8222. key_shift: bool # Keyboard modifier down: Shift
  8223. # bool KeyAlt; /* original C++ signature */
  8224. key_alt: bool # Keyboard modifier down: Alt
  8225. # bool KeySuper; /* original C++ signature */
  8226. key_super: bool # Keyboard modifier down: Windows/Super (non-macOS), Ctrl (macOS)
  8227. # Other state maintained from data above + IO function calls
  8228. # ImGuiKeyChord KeyMods; /* original C++ signature */
  8229. key_mods: KeyChord # Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags). Read-only, updated by NewFrame()
  8230. # bool WantCaptureMouseUnlessPopupClose; /* original C++ signature */
  8231. want_capture_mouse_unless_popup_close: bool # Alternative to WantCaptureMouse: (WantCaptureMouse == True && WantCaptureMouseUnlessPopupClose == False) when a click over None is expected to close a popup.
  8232. # ImVec2 MousePosPrev; /* original C++ signature */
  8233. mouse_pos_prev: ImVec2 # Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
  8234. # double MouseClickedTime[5]; /* original C++ signature */
  8235. mouse_clicked_time: (
  8236. np.ndarray
  8237. ) # ndarray[type=double, size=5] # Time of last click (used to figure out double-click)
  8238. # bool MouseClicked[5]; /* original C++ signature */
  8239. mouse_clicked: (
  8240. np.ndarray
  8241. ) # ndarray[type=bool, size=5] # Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)
  8242. # bool MouseDoubleClicked[5]; /* original C++ signature */
  8243. mouse_double_clicked: (
  8244. np.ndarray
  8245. ) # ndarray[type=bool, size=5] # Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)
  8246. # ImU16 MouseClickedCount[5]; /* original C++ signature */
  8247. mouse_clicked_count: (
  8248. np.ndarray
  8249. ) # ndarray[type=ImU16, size=5] # == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
  8250. # ImU16 MouseClickedLastCount[5]; /* original C++ signature */
  8251. mouse_clicked_last_count: (
  8252. np.ndarray
  8253. ) # ndarray[type=ImU16, size=5] # Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
  8254. # bool MouseReleased[5]; /* original C++ signature */
  8255. mouse_released: np.ndarray # ndarray[type=bool, size=5] # Mouse button went from Down to !Down
  8256. # double MouseReleasedTime[5]; /* original C++ signature */
  8257. mouse_released_time: (
  8258. np.ndarray
  8259. ) # ndarray[type=double, size=5] # Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click).
  8260. # bool MouseDownOwned[5]; /* original C++ signature */
  8261. mouse_down_owned: (
  8262. np.ndarray
  8263. ) # ndarray[type=bool, size=5] # Track if button was clicked inside a dear imgui window or over None blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
  8264. # bool MouseDownOwnedUnlessPopupClose[5]; /* original C++ signature */
  8265. mouse_down_owned_unless_popup_close: (
  8266. np.ndarray
  8267. ) # ndarray[type=bool, size=5] # Track if button was clicked inside a dear imgui window.
  8268. # bool MouseWheelRequestAxisSwap; /* original C++ signature */
  8269. mouse_wheel_request_axis_swap: bool # On a non-Mac system, holding Shift requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system.
  8270. # bool MouseCtrlLeftAsRightClick; /* original C++ signature */
  8271. mouse_ctrl_left_as_right_click: (
  8272. bool # (OSX) Set to True when the current click was a Ctrl+Click that spawned a simulated right click
  8273. )
  8274. # float MouseDownDuration[5]; /* original C++ signature */
  8275. mouse_down_duration: (
  8276. np.ndarray
  8277. ) # ndarray[type=float, size=5] # Duration the mouse button has been down (0.0 == just clicked)
  8278. # float MouseDownDurationPrev[5]; /* original C++ signature */
  8279. mouse_down_duration_prev: np.ndarray # ndarray[type=float, size=5] # Previous time the mouse button has been down
  8280. # float MouseDragMaxDistanceSqr[5]; /* original C++ signature */
  8281. mouse_drag_max_distance_sqr: (
  8282. np.ndarray
  8283. ) # ndarray[type=float, size=5] # Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds)
  8284. # float PenPressure; /* original C++ signature */
  8285. pen_pressure: float # Touch/Pen pressure (0.0 to 1.0, should be >0.0 only when MouseDown[0] == True). Helper storage currently unused by Dear ImGui.
  8286. # bool AppFocusLost; /* original C++ signature */
  8287. app_focus_lost: bool # Only modify via AddFocusEvent()
  8288. # bool AppAcceptingEvents; /* original C++ signature */
  8289. app_accepting_events: bool # Only modify via SetAppAcceptingEvents()
  8290. # ImWchar16 InputQueueSurrogate; /* original C++ signature */
  8291. input_queue_surrogate: ImWchar16 # For AddInputCharacterUTF16()
  8292. # ImVector<ImWchar> InputQueueCharacters; /* original C++ signature */
  8293. input_queue_characters: ImVector_ImWchar # Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper.
  8294. # Legacy: before 1.87, we required backend to fill io.KeyMap[] (imgui->native map) during initialization and io.KeysDown[] (native indices) every frame.
  8295. # This is still temporarily supported as a legacy feature. However the new preferred scheme is for backend to call io.AddKeyEvent().
  8296. # Old (<1.87): ImGui::IsKeyPressed(ImGui::GetIO().KeyMap[ImGuiKey_Space]) --> New (1.87+) ImGui::IsKeyPressed(ImGuiKey_Space)
  8297. # Old (<1.87): ImGui::IsKeyPressed(MYPLATFORM_KEY_SPACE) --> New (1.87+) ImGui::IsKeyPressed(ImGuiKey_Space)
  8298. # Read https://github.com/ocornut/imgui/issues/4921 for details.
  8299. # int KeyMap[ImGuiKey_COUNT]; // [LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512.
  8300. # bool KeysDown[ImGuiKey_COUNT]; // [LEGACY] Input: Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
  8301. # float NavInputs[ImGuiNavInput_COUNT]; // [LEGACY] Since 1.88, NavInputs[] was removed. Backends from 1.60 to 1.86 won't build. Feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums.
  8302. # None* ImeWindowHandle; // [Obsoleted in 1.87] Set ImGuiViewport::PlatformHandleRaw instead. Set this to your HWND to get automatic IME cursor positioning.
  8303. # IMGUI_API ImGuiIO(); /* original C++ signature */
  8304. def __init__(self) -> None:
  8305. pass
  8306. # [ADAPT_IMGUI_BUNDLE]
  8307. # #ifdef IMGUI_BUNDLE_PYTHON_API
  8308. #
  8309. # IMGUI_API void SetIniFilename(std::optional<const char*> filename); /* original C++ signature */
  8310. def set_ini_filename(self, filename: Optional[str]) -> None:
  8311. """- The disk functions are automatically called if IniFilename != None
  8312. - Set IniFilename to None to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
  8313. - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables).
  8314. """
  8315. pass
  8316. # IMGUI_API std::string GetIniFilename() const; /* original C++ signature */
  8317. def get_ini_filename(self) -> str:
  8318. pass
  8319. # IMGUI_API void SetLogFilename(const char* filename); /* original C++ signature */
  8320. def set_log_filename(self, filename: str) -> None:
  8321. pass
  8322. # IMGUI_API std::string GetLogFilename() const; /* original C++ signature */
  8323. def get_log_filename(self) -> str:
  8324. pass
  8325. # #endif
  8326. #
  8327. # [/ADAPT_IMGUI_BUNDLE]
  8328. # -----------------------------------------------------------------------------
  8329. # [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiPayload)
  8330. # -----------------------------------------------------------------------------
  8331. class InputTextCallbackData:
  8332. """Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used.
  8333. The callback function should return 0 by default.
  8334. Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details)
  8335. - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns True on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active.
  8336. - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration
  8337. - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB
  8338. - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows
  8339. - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
  8340. - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow.
  8341. """
  8342. # ImGuiContext* Ctx; /* original C++ signature */
  8343. ctx: Context # Parent UI context
  8344. # ImGuiInputTextFlags EventFlag; /* original C++ signature */
  8345. event_flag: InputTextFlags # One ImGuiInputTextFlags_Callback* // Read-only
  8346. # ImGuiInputTextFlags Flags; /* original C++ signature */
  8347. flags: InputTextFlags # What user passed to InputText() // Read-only
  8348. # void* UserData; /* original C++ signature */
  8349. user_data: Any # What user passed to InputText() // Read-only
  8350. # ImGuiID ID; /* original C++ signature */
  8351. id_: ID # Widget ID // Read-only
  8352. # Arguments for the different callback events
  8353. # - During Resize callback, Buf will be same as your input buffer.
  8354. # - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback.
  8355. # - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary.
  8356. # - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to True so InputText can update its internal state.
  8357. # ImGuiKey EventKey; /* original C++ signature */
  8358. event_key: Key # Key pressed (Up/Down/TAB) // Read-only // [Completion,History]
  8359. # ImWchar EventChar; /* original C++ signature */
  8360. event_char: ImWchar # Character input // Read-write // [CharFilter] Replace character with another one, or set to zero to drop. return 1 is equivalent to setting EventChar=0;
  8361. # bool EventActivated; /* original C++ signature */
  8362. event_activated: bool # Input field just got activated // Read-only // [Always]
  8363. # bool BufDirty; /* original C++ signature */
  8364. buf_dirty: bool # Set if you modify Buf/BufTextLen! // Write // [Completion,History,Always]
  8365. # char* Buf; /* original C++ signature */
  8366. buf: char # Text buffer // Read-write // [Resize] Can replace pointer / [Completion,History,Always] Only write to pointed data, don't replace the actual pointer! # (read-only)
  8367. # int BufTextLen; /* original C++ signature */
  8368. buf_text_len: int # Text length (in bytes) // Read-write // [Resize,Completion,History,Always] Exclude zero-terminator storage. In C land: == strlen(some_text), in C++ land: string.length()
  8369. # int BufSize; /* original C++ signature */
  8370. buf_size: int # Buffer size (in bytes) = capacity+1 // Read-only // [Resize,Completion,History,Always] Include zero-terminator storage. In C land: == ARRAYSIZE(my_char_array), in C++ land: string.capacity()+1
  8371. # int CursorPos; /* original C++ signature */
  8372. cursor_pos: int # // Read-write // [Completion,History,Always,CharFilter]
  8373. # int SelectionStart; /* original C++ signature */
  8374. selection_start: int # // Read-write // [Completion,History,Always,CharFilter] == to SelectionEnd when no selection
  8375. # int SelectionEnd; /* original C++ signature */
  8376. selection_end: int # // Read-write // [Completion,History,Always,CharFilter]
  8377. # Helper functions for text manipulation.
  8378. # Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection.
  8379. # IMGUI_API ImGuiInputTextCallbackData(); /* original C++ signature */
  8380. def __init__(self) -> None:
  8381. pass
  8382. # IMGUI_API void DeleteChars(int pos, int bytes_count); /* original C++ signature */
  8383. def delete_chars(self, pos: int, bytes_count: int) -> None:
  8384. pass
  8385. # IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL); /* original C++ signature */
  8386. def insert_chars(self, pos: int, text: str, text_end: Optional[str] = None) -> None:
  8387. pass
  8388. # void SelectAll() { SelectionStart = 0; CursorPos = SelectionEnd = BufTextLen; } /* original C++ signature */
  8389. def select_all(self) -> None:
  8390. """(private API)"""
  8391. pass
  8392. # void SetSelection(int s, int e) { IM_ASSERT(s >= 0 && s <= BufTextLen); IM_ASSERT(e >= 0 && e <= BufTextLen); SelectionStart = s; CursorPos = SelectionEnd = e; } /* original C++ signature */
  8393. def set_selection(self, s: int, e: int) -> None:
  8394. """(private API)"""
  8395. pass
  8396. # void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; } /* original C++ signature */
  8397. def clear_selection(self) -> None:
  8398. """(private API)"""
  8399. pass
  8400. # bool HasSelection() const { return SelectionStart != SelectionEnd; } /* original C++ signature */
  8401. def has_selection(self) -> bool:
  8402. """(private API)"""
  8403. pass
  8404. class SizeCallbackData:
  8405. """Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().
  8406. NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
  8407. """
  8408. # void* UserData; /* original C++ signature */
  8409. user_data: Any # Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in here (need reinterpret_cast<>).
  8410. # ImVec2 Pos; /* original C++ signature */
  8411. pos: ImVec2 # Read-only. Window position, for reference.
  8412. # ImVec2 CurrentSize; /* original C++ signature */
  8413. current_size: ImVec2 # Read-only. Current window size.
  8414. # ImVec2 DesiredSize; /* original C++ signature */
  8415. desired_size: (
  8416. ImVec2 # Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing.
  8417. )
  8418. # ImGuiSizeCallbackData(ImVec2 Pos = ImVec2(), ImVec2 CurrentSize = ImVec2(), ImVec2 DesiredSize = ImVec2()); /* original C++ signature */
  8419. def __init__(
  8420. self,
  8421. pos: Optional[ImVec2Like] = None,
  8422. current_size: Optional[ImVec2Like] = None,
  8423. desired_size: Optional[ImVec2Like] = None,
  8424. ) -> None:
  8425. """Auto-generated default constructor with named params
  8426. Python bindings defaults:
  8427. If any of the params below is None, then its default value below will be used:
  8428. * Pos: ImVec2()
  8429. * CurrentSize: ImVec2()
  8430. * DesiredSize: ImVec2()
  8431. """
  8432. pass
  8433. class WindowClass:
  8434. """[ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions.
  8435. Important: the content of this class is still highly WIP and likely to change and be refactored
  8436. before we stabilize Docking features. Please be mindful if using this.
  8437. Provide hints:
  8438. - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.)
  8439. - To the platform backend for OS level parent/child relationships of viewport (otherwise: default is configured via io.ConfigViewportsNoDefaultParent)
  8440. - To the docking system for various options and filtering.
  8441. """
  8442. # ImGuiID ClassId; /* original C++ signature */
  8443. class_id: (
  8444. ID # User data. 0 = Default class (unclassed). Windows of different classes cannot be docked with each others.
  8445. )
  8446. # ImGuiID ParentViewportId; /* original C++ signature */
  8447. parent_viewport_id: ID # Hint for the platform backend. -1: use default. 0: request platform backend to not parent the platform. != 0: request platform backend to create a parent<>child relationship between the platform windows. Not conforming backends are free to e.g. parent every viewport to the main viewport or not.
  8448. # ImGuiID FocusRouteParentWindowId; /* original C++ signature */
  8449. focus_route_parent_window_id: ID # ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will succeed when this window is focused.
  8450. # ImGuiViewportFlags ViewportFlagsOverrideSet; /* original C++ signature */
  8451. viewport_flags_override_set: ViewportFlags # Viewport flags to set when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
  8452. # ImGuiViewportFlags ViewportFlagsOverrideClear; /* original C++ signature */
  8453. viewport_flags_override_clear: ViewportFlags # Viewport flags to clear when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
  8454. # ImGuiTabItemFlags TabItemFlagsOverrideSet; /* original C++ signature */
  8455. tab_item_flags_override_set: TabItemFlags # [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing.
  8456. # ImGuiDockNodeFlags DockNodeFlagsOverrideSet; /* original C++ signature */
  8457. dock_node_flags_override_set: DockNodeFlags # [EXPERIMENTAL] Dock node flags to set when a window of this class is hosted by a dock node (it doesn't have to be selected!)
  8458. # bool DockingAlwaysTabBar; /* original C++ signature */
  8459. docking_always_tab_bar: bool # Set to True to enforce single floating windows of this class always having their own docking node (equivalent of setting the global io.ConfigDockingAlwaysTabBar)
  8460. # bool DockingAllowUnclassed; /* original C++ signature */
  8461. docking_allow_unclassed: bool # Set to True to allow windows of this class to be docked/merged with an unclassed window. // FIXME-DOCK: Move to DockNodeFlags override?
  8462. # void* PlatformIconData; /* original C++ signature */
  8463. platform_icon_data: Any # [EXPERIMENTAL] Pass opaque data for Platform backend to handle.
  8464. # ImGuiWindowClass() { memset((void*)this, 0, sizeof(*this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed = true; } /* original C++ signature */
  8465. def __init__(self) -> None:
  8466. pass
  8467. class Payload:
  8468. """Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload()"""
  8469. # Members
  8470. # void* Data; /* original C++ signature */
  8471. data: Any # Data (copied and owned by dear imgui)
  8472. # int DataSize; /* original C++ signature */
  8473. data_size: int # Data size
  8474. # [Internal]
  8475. # ImGuiID SourceId; /* original C++ signature */
  8476. source_id: ID # Source item id
  8477. # ImGuiID SourceParentId; /* original C++ signature */
  8478. source_parent_id: ID # Source parent id (if available)
  8479. # int DataFrameCount; /* original C++ signature */
  8480. data_frame_count: int # Data timestamp
  8481. # bool Preview; /* original C++ signature */
  8482. preview: bool # Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle overlapping drag targets)
  8483. # bool Delivery; /* original C++ signature */
  8484. delivery: bool # Set when AcceptDragDropPayload() was called and mouse button is released over the target item.
  8485. # ImGuiPayload() { Clear(); } /* original C++ signature */
  8486. def __init__(self) -> None:
  8487. pass
  8488. # void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0, sizeof(DataType)); DataFrameCount = -1; Preview = Delivery = false; } /* original C++ signature */
  8489. def clear(self) -> None:
  8490. """(private API)"""
  8491. pass
  8492. # bool IsDataType(const char* type) const { return DataFrameCount != -1 && strcmp(type, DataType) == 0; } /* original C++ signature */
  8493. def is_data_type(self, type: str) -> bool:
  8494. """(private API)"""
  8495. pass
  8496. # bool IsPreview() const { return Preview; } /* original C++ signature */
  8497. def is_preview(self) -> bool:
  8498. """(private API)"""
  8499. pass
  8500. # bool IsDelivery() const { return Delivery; } /* original C++ signature */
  8501. def is_delivery(self) -> bool:
  8502. """(private API)"""
  8503. pass
  8504. # -----------------------------------------------------------------------------
  8505. # [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
  8506. # -----------------------------------------------------------------------------
  8507. # Helper: Unicode defines
  8508. class OnceUponAFrame:
  8509. """Helper: Execute a block of code at maximum once a frame. Convenient if you want to quickly create a UI within deep-nested code that runs multiple times every frame.
  8510. Usage: static ImGuiOnceUponAFrame oaf; if (oaf) ImGui::Text("This will be called only once per frame");
  8511. """
  8512. # ImGuiOnceUponAFrame() { RefFrame = -1; } /* original C++ signature */
  8513. def __init__(self) -> None:
  8514. pass
  8515. # mutable int RefFrame; /* original C++ signature */
  8516. ref_frame: int
  8517. # operator bool() const { int current_frame = ImGui::GetFrameCount(); if (RefFrame == current_frame) return false; RefFrame = current_frame; return true; } /* original C++ signature */
  8518. def __bool__(self) -> bool:
  8519. pass
  8520. class TextFilter:
  8521. """Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" """
  8522. # IMGUI_API ImGuiTextFilter(const char* default_filter = ""); /* original C++ signature */
  8523. def __init__(self, default_filter: str = "") -> None:
  8524. pass
  8525. # IMGUI_API bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); /* original C++ signature */
  8526. def draw(self, label: str = "Filter (inc,-exc)", width: float = 0.0) -> bool:
  8527. """Helper calling InputText+Build"""
  8528. pass
  8529. # IMGUI_API bool PassFilter(const char* text, const char* text_end = NULL) const; /* original C++ signature */
  8530. def pass_filter(self, text: str, text_end: Optional[str] = None) -> bool:
  8531. pass
  8532. # IMGUI_API void Build(); /* original C++ signature */
  8533. def build(self) -> None:
  8534. pass
  8535. # void Clear() { InputBuf[0] = 0; Build(); } /* original C++ signature */
  8536. def clear(self) -> None:
  8537. """(private API)"""
  8538. pass
  8539. # bool IsActive() const { return !Filters.empty(); } /* original C++ signature */
  8540. def is_active(self) -> bool:
  8541. """(private API)"""
  8542. pass
  8543. class TextRange:
  8544. """[Internal]"""
  8545. # const char* b; /* original C++ signature */
  8546. b: str # (const)
  8547. # const char* e; /* original C++ signature */
  8548. e: str # (const)
  8549. # ImGuiTextRange() { b = e = NULL; } /* original C++ signature */
  8550. @overload
  8551. def __init__(self) -> None:
  8552. pass
  8553. # ImGuiTextRange(const char* _b, const char* _e) { b = _b; e = _e; } /* original C++ signature */
  8554. @overload
  8555. def __init__(self, _b: str, _e: str) -> None:
  8556. pass
  8557. # bool empty() const { return b == e; } /* original C++ signature */
  8558. def empty(self) -> bool:
  8559. """(private API)"""
  8560. pass
  8561. # int CountGrep; /* original C++ signature */
  8562. count_grep: int
  8563. @property
  8564. def input_buf(self) -> str:
  8565. """The current filter text. Setting it also calls build()."""
  8566. ...
  8567. @input_buf.setter
  8568. def input_buf(self, value: str) -> None: ...
  8569. class TextBuffer:
  8570. """Helper: Growable text buffer for logging/accumulating text
  8571. (this could be called 'ImGuiTextBuilder' / 'ImGuiStringBuilder')
  8572. """
  8573. # ImVector<char> Buf; /* original C++ signature */
  8574. buf: ImVector_char
  8575. # ImGuiTextBuffer() { } /* original C++ signature */
  8576. def __init__(self) -> None:
  8577. pass
  8578. # inline char operator[](int i) const { IM_ASSERT(Buf.Data != NULL); return Buf.Data[i]; } /* original C++ signature */
  8579. def __getitem__(self, i: int) -> int:
  8580. """(private API)"""
  8581. pass
  8582. # const char* begin() const { return Buf.Data ? &Buf.front() : EmptyString; } /* original C++ signature */
  8583. def begin(self) -> str:
  8584. """(private API)"""
  8585. pass
  8586. # const char* end() const { return Buf.Data ? &Buf.back() : EmptyString; } /* original C++ signature */
  8587. def end(self) -> str:
  8588. """(private API)
  8589. Buf is zero-terminated, so end() will point on the zero-terminator
  8590. """
  8591. pass
  8592. # int size() const { return Buf.Size ? Buf.Size - 1 : 0; } /* original C++ signature */
  8593. def size(self) -> int:
  8594. """(private API)"""
  8595. pass
  8596. # bool empty() const { return Buf.Size <= 1; } /* original C++ signature */
  8597. def empty(self) -> bool:
  8598. """(private API)"""
  8599. pass
  8600. # void clear() { Buf.clear(); } /* original C++ signature */
  8601. def clear(self) -> None:
  8602. """(private API)"""
  8603. pass
  8604. # void resize(int size) { if (Buf.Size > size) Buf.Data[size] = 0; Buf.resize(size ? size + 1 : 0, 0); } /* original C++ signature */
  8605. def resize(self, size: int) -> None:
  8606. """(private API)
  8607. Similar to resize(0) on ImVector: empty string but don't free buffer.
  8608. """
  8609. pass
  8610. # void reserve(int capacity) { Buf.reserve(capacity); } /* original C++ signature */
  8611. def reserve(self, capacity: int) -> None:
  8612. """(private API)"""
  8613. pass
  8614. # const char* c_str() const { return Buf.Data ? Buf.Data : EmptyString; } /* original C++ signature */
  8615. def c_str(self) -> str:
  8616. """(private API)"""
  8617. pass
  8618. # IMGUI_API void append(const char* str, const char* str_end = NULL); /* original C++ signature */
  8619. def append(self, str: str, str_end: Optional[str] = None) -> None:
  8620. pass
  8621. # IMGUI_API void appendf(const char* fmt, ...) ; /* original C++ signature */
  8622. def appendf(self, fmt: str) -> None:
  8623. pass
  8624. class StoragePair:
  8625. """[Internal] Key+Value for ImGuiStorage"""
  8626. # ImGuiID key; /* original C++ signature */
  8627. key: ID
  8628. # ImGuiStoragePair(ImGuiID _key, int _val) { key = _key; val_i = _val; } /* original C++ signature */
  8629. @overload
  8630. def __init__(self, _key: ID, _val: int) -> None:
  8631. pass
  8632. # ImGuiStoragePair(ImGuiID _key, float _val) { key = _key; val_f = _val; } /* original C++ signature */
  8633. @overload
  8634. def __init__(self, _key: ID, _val: float) -> None:
  8635. pass
  8636. # ImGuiStoragePair(ImGuiID _key, void* _val) { key = _key; val_p = _val; } /* original C++ signature */
  8637. @overload
  8638. def __init__(self, _key: ID, _val: Any) -> None:
  8639. pass
  8640. class Storage:
  8641. """Helper: Key->Value storage
  8642. Typically you don't have to worry about this since a storage is held within each Window.
  8643. We use it to e.g. store collapse state for a tree (Int 0/1)
  8644. This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)
  8645. You can use it as custom user storage for temporary values. Declare your own storage if, for example:
  8646. - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state).
  8647. - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)
  8648. Types are NOT stored, so it is up to you to make sure your Key don't collide with different types.
  8649. """
  8650. # void Clear() { Data.clear(); } /* original C++ signature */
  8651. def clear(self) -> None:
  8652. """- Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
  8653. - Set***() functions find pair, insertion on demand if missing.
  8654. - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
  8655. (private API)
  8656. """
  8657. pass
  8658. # IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const; /* original C++ signature */
  8659. def get_int(self, key: ID, default_val: int = 0) -> int:
  8660. pass
  8661. # IMGUI_API void SetInt(ImGuiID key, int val); /* original C++ signature */
  8662. def set_int(self, key: ID, val: int) -> None:
  8663. pass
  8664. # IMGUI_API bool GetBool(ImGuiID key, bool default_val = false) const; /* original C++ signature */
  8665. def get_bool(self, key: ID, default_val: bool = False) -> bool:
  8666. pass
  8667. # IMGUI_API void SetBool(ImGuiID key, bool val); /* original C++ signature */
  8668. def set_bool(self, key: ID, val: bool) -> None:
  8669. pass
  8670. # IMGUI_API float GetFloat(ImGuiID key, float default_val = 0.0f) const; /* original C++ signature */
  8671. def get_float(self, key: ID, default_val: float = 0.0) -> float:
  8672. pass
  8673. # IMGUI_API void SetFloat(ImGuiID key, float val); /* original C++ signature */
  8674. def set_float(self, key: ID, val: float) -> None:
  8675. pass
  8676. # IMGUI_API void* GetVoidPtr(ImGuiID key) const; /* original C++ signature */
  8677. def get_void_ptr(self, key: ID) -> Any:
  8678. """default_val is None"""
  8679. pass
  8680. # IMGUI_API void SetVoidPtr(ImGuiID key, void* val); /* original C++ signature */
  8681. def set_void_ptr(self, key: ID, val: Any) -> None:
  8682. pass
  8683. # - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set.
  8684. # - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.
  8685. # - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct)
  8686. # float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0); some_var += *pvar;
  8687. # IMGUI_API int* GetIntRef(ImGuiID key, int default_val = 0); /* original C++ signature */
  8688. def get_int_ref(self, key: ID, default_val: int = 0) -> int:
  8689. pass
  8690. # IMGUI_API bool* GetBoolRef(ImGuiID key, bool default_val = false); /* original C++ signature */
  8691. def get_bool_ref(self, key: ID, default_val: bool = False) -> bool:
  8692. pass
  8693. # IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0.0f); /* original C++ signature */
  8694. def get_float_ref(self, key: ID, default_val: float = 0.0) -> float:
  8695. pass
  8696. # IMGUI_API void BuildSortByKey(); /* original C++ signature */
  8697. def build_sort_by_key(self) -> None:
  8698. """Advanced: for quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once."""
  8699. pass
  8700. # IMGUI_API void SetAllInt(int val); /* original C++ signature */
  8701. def set_all_int(self, val: int) -> None:
  8702. """Obsolete: use on your own storage if you know only integer are being stored (open/close all tree nodes)"""
  8703. pass
  8704. # ImGuiStorage(); /* original C++ signature */
  8705. def __init__(self) -> None:
  8706. """Auto-generated default constructor"""
  8707. pass
  8708. class ListClipperFlags_(enum.IntFlag):
  8709. """Flags for ImGuiListClipper (currently not fully exposed in function calls: a future refactor will likely add this to ImGuiListClipper::Begin function equivalent)"""
  8710. # ImGuiListClipperFlags_None = 0, /* original C++ signature */
  8711. none = enum.auto() # (= 0)
  8712. # ImGuiListClipperFlags_NoSetTableRowCounters = 1 << 0, /* original C++ signature */
  8713. no_set_table_row_counters = (
  8714. enum.auto()
  8715. ) # (= 1 << 0) # [Internal] Disabled modifying table row counters. Avoid assumption that 1 clipper item == 1 table row.
  8716. class ListClipper:
  8717. """Helper: Manually clip large list of items.
  8718. If you have lots evenly spaced items and you have random access to the list, you can perform coarse
  8719. clipping based on visibility to only submit items that are in view.
  8720. The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped.
  8721. (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally
  8722. fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily
  8723. scale using lists with tens of thousands of items without a problem)
  8724. Usage:
  8725. ImGuiListClipper clipper;
  8726. clipper.Begin(1000); // We have 1000 elements, evenly spaced.
  8727. while (clipper.Step())
  8728. for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
  8729. ImGui::Text("line number %d", i);
  8730. Generally what happens is:
  8731. - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not.
  8732. - User code submit that one element.
  8733. - Clipper can measure the height of the first element
  8734. - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
  8735. - User code submit visible elements.
  8736. - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
  8737. """
  8738. # int DisplayStart; /* original C++ signature */
  8739. display_start: int # First item to display, updated by each call to Step()
  8740. # int DisplayEnd; /* original C++ signature */
  8741. display_end: int # End of items to display (exclusive)
  8742. # int UserIndex; /* original C++ signature */
  8743. user_index: int # Helper storage for user convenience/code. Optional, and otherwise unused if you don't use it.
  8744. # int ItemsCount; /* original C++ signature */
  8745. items_count: int # [Internal] Number of items
  8746. # float ItemsHeight; /* original C++ signature */
  8747. items_height: float # [Internal] Height of item after a first step and item submission can calculate it
  8748. # ImGuiListClipperFlags Flags; /* original C++ signature */
  8749. flags: ListClipperFlags # [Internal] Flags, currently not yet well exposed.
  8750. # double StartPosY; /* original C++ signature */
  8751. start_pos_y: float # [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
  8752. # double StartSeekOffsetY; /* original C++ signature */
  8753. start_seek_offset_y: (
  8754. float # [Internal] Account for frozen rows in a table and initial loss of precision in very large windows.
  8755. )
  8756. # ImGuiContext* Ctx; /* original C++ signature */
  8757. ctx: Context # [Internal] Parent UI context
  8758. # void* TempData; /* original C++ signature */
  8759. temp_data: Any # [Internal] Internal data
  8760. # IMGUI_API ImGuiListClipper(); /* original C++ signature */
  8761. def __init__(self) -> None:
  8762. """items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need)
  8763. items_height: Use -1.0 to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
  8764. """
  8765. pass
  8766. # IMGUI_API void Begin(int items_count, float items_height = -1.0f); /* original C++ signature */
  8767. def begin(self, items_count: int, items_height: float = -1.0) -> None:
  8768. pass
  8769. # IMGUI_API void End(); /* original C++ signature */
  8770. def end(self) -> None:
  8771. """Automatically called on the last call of Step() that returns False."""
  8772. pass
  8773. # IMGUI_API bool Step(); /* original C++ signature */
  8774. def step(self) -> bool:
  8775. """Call until it returns False. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items."""
  8776. pass
  8777. # inline void IncludeItemByIndex(int item_index) { IncludeItemsByIndex(item_index, item_index + 1); } /* original C++ signature */
  8778. def include_item_by_index(self, item_index: int) -> None:
  8779. """Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
  8780. (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
  8781. (private API)
  8782. """
  8783. pass
  8784. # IMGUI_API void IncludeItemsByIndex(int item_begin, int item_end); /* original C++ signature */
  8785. def include_items_by_index(self, item_begin: int, item_end: int) -> None:
  8786. """item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped."""
  8787. pass
  8788. # IMGUI_API void SeekCursorForItem(int item_index); /* original C++ signature */
  8789. def seek_cursor_for_item(self, item_index: int) -> None:
  8790. """Seek cursor toward given item. This is automatically called while stepping.
  8791. - The only reason to call this is: you can use ImGuiListClipper::Begin(INT_MAX) if you don't know item count ahead of time.
  8792. - In this case, after all steps are done, you'll want to call SeekCursorForItem(item_count).
  8793. """
  8794. pass
  8795. # Helpers: ImVec2/ImVec4 operators
  8796. # - It is important that we are keeping those disabled by default so they don't leak in user space.
  8797. # - This is in order to allow user enabling implicit cast operators between ImVec2/ImVec4 and their own types (using IM_VEC2_CLASS_EXTRA in imconfig.h)
  8798. # - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including this file (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4.
  8799. # Helpers macros to generate 32-bit encoded colors
  8800. # - User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file.
  8801. # - Any setting other than the default will need custom backend support. The only standard backend that supports anything else than the default is DirectX9.
  8802. class ImColor:
  8803. """Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
  8804. Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API.
  8805. **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE.
  8806. **None of the ImGui API are using ImColor directly but you can use it as a convenience to pass colors in either ImU32 or ImVec4 formats. Explicitly cast to ImU32 or ImVec4 if needed.
  8807. """
  8808. # ImVec4 Value; /* original C++ signature */
  8809. value: ImVec4
  8810. # constexpr ImColor() { } /* original C++ signature */
  8811. @overload
  8812. def __init__(self) -> None:
  8813. pass
  8814. # constexpr ImColor(float r, float g, float b, float a = 1.0f) : Value(r, g, b, a) { } /* original C++ signature */
  8815. @overload
  8816. def __init__(self, r: float, g: float, b: float, a: float = 1.0) -> None:
  8817. pass
  8818. # constexpr ImColor(const ImVec4& col) : Value(col) {} /* original C++ signature */
  8819. @overload
  8820. def __init__(self, col: ImVec4Like) -> None:
  8821. pass
  8822. # constexpr ImColor(int r, int g, int b, int a = 255) : Value((float)r * (1.0f / 255.0f), (float)g * (1.0f / 255.0f), (float)b * (1.0f / 255.0f), (float)a* (1.0f / 255.0f)) {} /* original C++ signature */
  8823. @overload
  8824. def __init__(self, r: int, g: int, b: int, a: int = 255) -> None:
  8825. pass
  8826. # constexpr ImColor(ImU32 rgba) : Value((float)((rgba >> IM_COL32_R_SHIFT) & 0xFF) * (1.0f / 255.0f), (float)((rgba >> IM_COL32_G_SHIFT) & 0xFF) * (1.0f / 255.0f), (float)((rgba >> IM_COL32_B_SHIFT) & 0xFF) * (1.0f / 255.0f), (float)((rgba >> IM_COL32_A_SHIFT) & 0xFF) * (1.0f / 255.0f)) {} /* original C++ signature */
  8827. @overload
  8828. def __init__(self, rgba: ImU32) -> None:
  8829. pass
  8830. # FIXME-OBSOLETE: May need to obsolete/cleanup those helpers.
  8831. # inline void SetHSV(float h, float s, float v, float a = 1.0f){ ImGui::ColorConvertHSVtoRGB(h, s, v, Value.x, Value.y, Value.z); Value.w = a; } /* original C++ signature */
  8832. def set_hsv(self, h: float, s: float, v: float, a: float = 1.0) -> None:
  8833. """(private API)"""
  8834. pass
  8835. # static ImColor HSV(float h, float s, float v, float a = 1.0f) { float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b); return ImColor(r, g, b, a); } /* original C++ signature */
  8836. @staticmethod
  8837. def hsv(h: float, s: float, v: float, a: float = 1.0) -> ImColor:
  8838. """(private API)"""
  8839. pass
  8840. # #ifdef IMGUI_BUNDLE_PYTHON_API
  8841. #
  8842. # std::map<std::string, float> to_dict() const { return {{"x", Value.x}, {"y", Value.x}, {"z", Value.x}, {"w", Value.x}}; } /* original C++ signature */
  8843. def to_dict(self) -> Dict[str, float]:
  8844. """(private API)"""
  8845. pass
  8846. # static ImVec4 from_dict(const std::map<std::string, float>& d) { IM_ASSERT((d.find("x") != d.end()) && (d.find("y") != d.end()) && (d.find("z") != d.end()) && (d.find("w") != d.end()) && "ImVec4.from_dict() requires a dictionary with keys 'x', 'y', 'z', 'w'"); ImVec4 v = ImVec4(d.at("x"), d.at("y"), d.at("z"), d.at("w")); return ImColor(v); } /* original C++ signature */
  8847. @staticmethod
  8848. def from_dict(d: Dict[str, float]) -> ImVec4:
  8849. """(private API)"""
  8850. pass
  8851. # #endif
  8852. #
  8853. # -----------------------------------------------------------------------------
  8854. # [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiSelectionRequestType, ImGuiSelectionRequest, ImGuiMultiSelectIO, ImGuiSelectionBasicStorage)
  8855. # -----------------------------------------------------------------------------
  8856. # Multi-selection system
  8857. # Documentation at: https://github.com/ocornut/imgui/wiki/Multi-Select
  8858. # - Refer to 'Demo->Widgets->Selection State & Multi-Select' for demos using this.
  8859. # - This system implements standard multi-selection idioms (Ctrl+Mouse/Keyboard, Shift+Mouse/Keyboard, etc)
  8860. # with support for clipper (skipping non-visible items), box-select and many other details.
  8861. # - Selectable(), Checkbox() are supported but custom widgets may use it as well.
  8862. # - TreeNode() is technically supported but... using this correctly is more complicated: you need some sort of linear/random access to your tree,
  8863. # which is suited to advanced trees setups also implementing filters and clipper. We will work toward simplifying and demoing it.
  8864. # - In the spirit of Dear ImGui design, your code owns actual selection data.
  8865. # This is designed to allow all kinds of selection storage you may use in your application e.g. set/map/hash.
  8866. # About ImGuiSelectionBasicStorage:
  8867. # - This is an optional helper to store a selection state and apply selection requests.
  8868. # - It is used by our demos and provided as a convenience to quickly implement multi-selection.
  8869. # Usage:
  8870. # - Identify submitted items with SetNextItemSelectionUserData(), most likely using an index into your current data-set.
  8871. # - Store and maintain actual selection data using persistent object identifiers.
  8872. # - Usage flow:
  8873. # BEGIN - (1) Call BeginMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
  8874. # - (2) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 6.
  8875. # - (3) [If using clipper] You need to make sure RangeSrcItem is always submitted. Calculate its index and pass to clipper.IncludeItemByIndex(). If storing indices in ImGuiSelectionUserData, a simple clipper.IncludeItemByIndex(ms_io->RangeSrcItem) call will work.
  8876. # LOOP - (4) Submit your items with SetNextItemSelectionUserData() + Selectable()/TreeNode() calls.
  8877. # END - (5) Call EndMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
  8878. # - (6) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 2.
  8879. # If you submit all items (no clipper), Step 2 and 3 are optional and will be handled by each item themselves. It is fine to always honor those steps.
  8880. # About ImGuiSelectionUserData:
  8881. # - This can store an application-defined identifier (e.g. index or pointer) submitted via SetNextItemSelectionUserData().
  8882. # - In return we store them into RangeSrcItem/RangeFirstItem/RangeLastItem and other fields in ImGuiMultiSelectIO.
  8883. # - Most applications will store an object INDEX, hence the chosen name and type. Storing an index is natural, because
  8884. # SetRange requests will give you two end-points and you will need to iterate/interpolate between them to update your selection.
  8885. # - However it is perfectly possible to store a POINTER or another IDENTIFIER inside ImGuiSelectionUserData.
  8886. # Our system never assume that you identify items by indices, it never attempts to interpolate between two values.
  8887. # - If you enable ImGuiMultiSelectFlags_NoRangeSelect then it is guaranteed that you will never have to interpolate
  8888. # between two ImGuiSelectionUserData, which may be a convenient way to use part of the feature with less code work.
  8889. # - As most users will want to store an index, for convenience and to reduce confusion we use ImS64 instead of None*,
  8890. # being syntactically easier to downcast. Feel free to reinterpret_cast and store a pointer inside.
  8891. class MultiSelectFlags_(enum.IntFlag):
  8892. """Flags for BeginMultiSelect()"""
  8893. # ImGuiMultiSelectFlags_None = 0, /* original C++ signature */
  8894. none = enum.auto() # (= 0)
  8895. # ImGuiMultiSelectFlags_SingleSelect = 1 << 0, /* original C++ signature */
  8896. single_select = (
  8897. enum.auto()
  8898. ) # (= 1 << 0) # Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho!
  8899. # ImGuiMultiSelectFlags_NoSelectAll = 1 << 1, /* original C++ signature */
  8900. no_select_all = enum.auto() # (= 1 << 1) # Disable Ctrl+A shortcut to select all.
  8901. # ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2, /* original C++ signature */
  8902. no_range_select = (
  8903. enum.auto()
  8904. ) # (= 1 << 2) # Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is also ensure contiguous SetRange requests are not combined into one. This allows not handling interpolation in SetRange requests.
  8905. # ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3, /* original C++ signature */
  8906. no_auto_select = (
  8907. enum.auto()
  8908. ) # (= 1 << 3) # Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes).
  8909. # ImGuiMultiSelectFlags_NoAutoClear = 1 << 4, /* original C++ signature */
  8910. no_auto_clear = (
  8911. enum.auto()
  8912. ) # (= 1 << 4) # Disable clearing selection when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes).
  8913. # ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5, /* original C++ signature */
  8914. no_auto_clear_on_reselect = (
  8915. enum.auto()
  8916. ) # (= 1 << 5) # Disable clearing selection when clicking/selecting an already selected item.
  8917. # ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6, /* original C++ signature */
  8918. box_select1d = (
  8919. enum.auto()
  8920. ) # (= 1 << 6) # Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
  8921. # ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7, /* original C++ signature */
  8922. box_select2d = (
  8923. enum.auto()
  8924. ) # (= 1 << 7) # Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items.
  8925. # ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8, /* original C++ signature */
  8926. box_select_no_scroll = (
  8927. enum.auto()
  8928. ) # (= 1 << 8) # Disable scrolling when box-selecting and moving mouse near edges of scope.
  8929. # ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9, /* original C++ signature */
  8930. clear_on_escape = enum.auto() # (= 1 << 9) # Clear selection when pressing Escape while scope is focused.
  8931. # ImGuiMultiSelectFlags_ClearOnClickVoid = 1 << 10, /* original C++ signature */
  8932. clear_on_click_void = enum.auto() # (= 1 << 10) # Clear selection when clicking on empty location within scope.
  8933. # ImGuiMultiSelectFlags_ScopeWindow = 1 << 11, /* original C++ signature */
  8934. scope_window = (
  8935. enum.auto()
  8936. ) # (= 1 << 11) # Scope for _BoxSelect and _ClearOnClickVoid is whole window (Default). Use if BeginMultiSelect() covers a whole window or used a single time in same window.
  8937. # ImGuiMultiSelectFlags_ScopeRect = 1 << 12, /* original C++ signature */
  8938. scope_rect = (
  8939. enum.auto()
  8940. ) # (= 1 << 12) # Scope for _BoxSelect and _ClearOnClickVoid is rectangle encompassing BeginMultiSelect()/EndMultiSelect(). Use if BeginMultiSelect() is called multiple times in same window.
  8941. # ImGuiMultiSelectFlags_SelectOnAuto = 1 << 13, /* original C++ signature */
  8942. select_on_auto = (
  8943. enum.auto()
  8944. ) # (= 1 << 13) # Apply selection on mouse down when clicking on unselected item, on mouse up when clicking on selected item. (Default)
  8945. # ImGuiMultiSelectFlags_SelectOnClickAlways = 1 << 14, /* original C++ signature */
  8946. select_on_click_always = (
  8947. enum.auto()
  8948. ) # (= 1 << 14) # Apply selection on mouse down when clicking on any items. Prevents Drag and Drop from being used on multiple-selection, but allows e.g. BoxSelect to always reselect even when clicking inside an existing selection. (Excel style behavior)
  8949. # ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 15, /* original C++ signature */
  8950. select_on_click_release = (
  8951. enum.auto()
  8952. ) # (= 1 << 15) # Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
  8953. # ImGuiMultiSelectFlags_RangeSelect2 = 1 << 15, // Shift+Selection uses 2 geometry instead of linear sequence, so possible to use Shift+up/down to select vertically in grid. Analogous to what BoxSelect does.
  8954. # ImGuiMultiSelectFlags_NavWrapX = 1 << 16, /* original C++ signature */
  8955. nav_wrap_x = (
  8956. enum.auto()
  8957. ) # (= 1 << 16) # [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
  8958. # ImGuiMultiSelectFlags_NoSelectOnRightClick = 1 << 17, /* original C++ signature */
  8959. no_select_on_right_click = (
  8960. enum.auto()
  8961. ) # (= 1 << 17) # Disable default right-click processing, which selects item on mouse down, and is designed for context-menus.
  8962. # ImGuiMultiSelectFlags_SelectOnMask_ = ImGuiMultiSelectFlags_SelectOnAuto | ImGuiMultiSelectFlags_SelectOnClickAlways | ImGuiMultiSelectFlags_SelectOnClickRelease, /* original C++ signature */
  8963. select_on_mask_ = (
  8964. enum.auto()
  8965. ) # (= MultiSelectFlags_SelectOnAuto | MultiSelectFlags_SelectOnClickAlways | MultiSelectFlags_SelectOnClickRelease)
  8966. # Obsolete names
  8967. class MultiSelectIO:
  8968. """Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
  8969. This mainly contains a list of selection requests.
  8970. - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen.
  8971. - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo)
  8972. - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code.
  8973. """
  8974. # ------------------------------------------// BeginMultiSelect / EndMultiSelect
  8975. # ImVector<ImGuiSelectionRequest> Requests; /* original C++ signature */
  8976. requests: (
  8977. ImVector_SelectionRequest # ms:w, app:r / ms:w app:r // Requests to apply to your selection data.
  8978. )
  8979. # ImGuiSelectionUserData RangeSrcItem; /* original C++ signature */
  8980. range_src_item: SelectionUserData # ms:w app:r / // (If using clipper) Begin: Source item (often the first selected item) must never be clipped: use clipper.IncludeItemByIndex() to ensure it is submitted.
  8981. # ImGuiSelectionUserData NavIdItem; /* original C++ signature */
  8982. nav_id_item: SelectionUserData # ms:w, app:r / // (If using deletion) Last known SetNextItemSelectionUserData() value for NavId (if part of submitted items).
  8983. # bool NavIdSelected; /* original C++ signature */
  8984. nav_id_selected: bool # ms:w, app:r / app:r // (If using deletion) Last known selection state for NavId (if part of submitted items).
  8985. # bool RangeSrcReset; /* original C++ signature */
  8986. range_src_reset: bool # app:w / ms:r // (If using deletion) Set before EndMultiSelect() to reset ResetSrcItem (e.g. if deleted selection).
  8987. # int ItemsCount; /* original C++ signature */
  8988. items_count: int # ms:w, app:r / app:r // 'int items_count' parameter to BeginMultiSelect() is copied here for convenience, allowing simpler calls to your ApplyRequests handler. Not used internally.
  8989. # ImGuiMultiSelectIO(ImVector<ImGuiSelectionRequest> Requests = ImVector<ImGuiSelectionRequest>(), ImGuiSelectionUserData RangeSrcItem = ImGuiSelectionUserData(), ImGuiSelectionUserData NavIdItem = ImGuiSelectionUserData(), bool NavIdSelected = bool(), bool RangeSrcReset = bool(), int ItemsCount = int()); /* original C++ signature */
  8990. def __init__(
  8991. self,
  8992. requests: Optional[ImVector_SelectionRequest] = None,
  8993. range_src_item: Optional[SelectionUserData] = None,
  8994. nav_id_item: Optional[SelectionUserData] = None,
  8995. nav_id_selected: bool = bool(),
  8996. range_src_reset: bool = bool(),
  8997. items_count: int = int(),
  8998. ) -> None:
  8999. """Auto-generated default constructor with named params
  9000. Python bindings defaults:
  9001. If any of the params below is None, then its default value below will be used:
  9002. * Requests: ImVector_SelectionRequest()
  9003. * RangeSrcItem: SelectionUserData()
  9004. * NavIdItem: SelectionUserData()
  9005. """
  9006. pass
  9007. class SelectionRequestType(enum.IntFlag):
  9008. """Selection request type"""
  9009. # ImGuiSelectionRequestType_None = 0, /* original C++ signature */
  9010. none = enum.auto() # (= 0)
  9011. # ImGuiSelectionRequestType_SetAll, /* original C++ signature */
  9012. set_all = (
  9013. enum.auto()
  9014. ) # (= 1) # Request app to clear selection (if Selected==False) or select all items (if Selected==True). We cannot set RangeFirstItem/RangeLastItem as its contents is entirely up to user (not necessarily an index)
  9015. # ImGuiSelectionRequestType_SetRange, /* original C++ signature */
  9016. set_range = (
  9017. enum.auto()
  9018. ) # (= 2) # Request app to select/unselect [RangeFirstItem..RangeLastItem] items (inclusive) based on value of Selected. Only EndMultiSelect() request this, app code can read after BeginMultiSelect() and it will always be False.
  9019. class SelectionRequest:
  9020. """Selection request item"""
  9021. # ------------------------------------------// BeginMultiSelect / EndMultiSelect
  9022. # ImGuiSelectionRequestType Type; /* original C++ signature */
  9023. type: SelectionRequestType # ms:w, app:r / ms:w, app:r // Request type. You'll most often receive 1 Clear + 1 SetRange with a single-item range.
  9024. # bool Selected; /* original C++ signature */
  9025. selected: bool # ms:w, app:r / ms:w, app:r // Parameter for SetAll/SetRange requests (True = select, False = unselect)
  9026. # ImS8 RangeDirection; /* original C++ signature */
  9027. range_direction: ImS8 # / ms:w app:r // Parameter for SetRange request: +1 when RangeFirstItem comes before RangeLastItem, -1 otherwise. Useful if you want to preserve selection order on a backward Shift+Click.
  9028. # ImGuiSelectionUserData RangeFirstItem; /* original C++ signature */
  9029. range_first_item: SelectionUserData # / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from top to bottom).
  9030. # ImGuiSelectionUserData RangeLastItem; /* original C++ signature */
  9031. range_last_item: SelectionUserData # / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from bottom to top). Inclusive!
  9032. # ImGuiSelectionRequest(ImGuiSelectionRequestType Type = ImGuiSelectionRequestType(), bool Selected = bool(), ImS8 RangeDirection = ImS8(), ImGuiSelectionUserData RangeFirstItem = ImGuiSelectionUserData(), ImGuiSelectionUserData RangeLastItem = ImGuiSelectionUserData()); /* original C++ signature */
  9033. def __init__(
  9034. self,
  9035. type: SelectionRequestType = SelectionRequestType.none,
  9036. selected: bool = bool(),
  9037. range_direction: ImS8 = ImS8(),
  9038. range_first_item: Optional[SelectionUserData] = None,
  9039. range_last_item: Optional[SelectionUserData] = None,
  9040. ) -> None:
  9041. """Auto-generated default constructor with named params
  9042. Python bindings defaults:
  9043. If any of the params below is None, then its default value below will be used:
  9044. * RangeFirstItem: SelectionUserData()
  9045. * RangeLastItem: SelectionUserData()
  9046. """
  9047. pass
  9048. class SelectionBasicStorage:
  9049. """Optional helper to store multi-selection state + apply multi-selection requests.
  9050. - Used by our demos and provided as a convenience to easily implement basic multi-selection.
  9051. - Iterate selection with 'None* it = None; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
  9052. Or you can check 'if (Contains(id)) { ... }' for each possible object if their number is not too high to iterate.
  9053. - USING THIS IS NOT MANDATORY. This is only a helper and not a required API.
  9054. To store a multi-selection, in your application you could:
  9055. - Use this helper as a convenience. We use our simple key->value ImGuiStorage as a std::set<ImGuiID> replacement.
  9056. - Use your own external storage: e.g. std::set<MyObjectId>, std::vector<MyObjectId>, interval trees, intrusively stored selection etc.
  9057. In ImGuiSelectionBasicStorage we:
  9058. - always use indices in the multi-selection API (passed to SetNextItemSelectionUserData(), retrieved in ImGuiMultiSelectIO)
  9059. - use the AdapterIndexToStorageId() indirection layer to abstract how persistent selection data is derived from an index.
  9060. - use decently optimized logic to allow queries and insertion of very large selection sets.
  9061. - do not preserve selection order.
  9062. Many combinations are possible depending on how you prefer to store your items and how you prefer to store your selection.
  9063. Large applications are likely to eventually want to get rid of this indirection layer and do their own thing.
  9064. See https://github.com/ocornut/imgui/wiki/Multi-Select for details and pseudo-code using this helper.
  9065. """
  9066. # Members
  9067. # int Size; /* original C++ signature */
  9068. size: int # // Number of selected items, maintained by this helper.
  9069. # bool PreserveOrder; /* original C++ signature */
  9070. preserve_order: bool # = False // GetNextSelectedItem() will return ordered selection (currently implemented by two additional sorts of selection. Could be improved)
  9071. # void* UserData; /* original C++ signature */
  9072. user_data: (
  9073. Any # = None // User data for use by adapter function // e.g. selection.UserData = (None*)my_items;
  9074. )
  9075. # int _SelectionOrder; /* original C++ signature */
  9076. _selection_order: int # [Internal] Increasing counter to store selection order
  9077. # ImGuiStorage _Storage; /* original C++ signature */
  9078. _storage: Storage # [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing directly: iterate with GetNextSelectedItem().
  9079. # Methods
  9080. # IMGUI_API ImGuiSelectionBasicStorage(); /* original C++ signature */
  9081. def __init__(self) -> None:
  9082. pass
  9083. # IMGUI_API void ApplyRequests(ImGuiMultiSelectIO* ms_io); /* original C++ signature */
  9084. def apply_requests(self, ms_io: MultiSelectIO) -> None:
  9085. """Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses 'items_count' passed to BeginMultiSelect()"""
  9086. pass
  9087. # IMGUI_API bool Contains(ImGuiID id) const; /* original C++ signature */
  9088. def contains(self, id_: ID) -> bool:
  9089. """Query if an item id is in selection."""
  9090. pass
  9091. # IMGUI_API void Clear(); /* original C++ signature */
  9092. def clear(self) -> None:
  9093. """Clear selection"""
  9094. pass
  9095. # IMGUI_API void Swap(ImGuiSelectionBasicStorage& r); /* original C++ signature */
  9096. def swap(self, r: SelectionBasicStorage) -> None:
  9097. """Swap two selections"""
  9098. pass
  9099. # IMGUI_API void SetItemSelected(ImGuiID id, bool selected); /* original C++ signature */
  9100. def set_item_selected(self, id_: ID, selected: bool) -> None:
  9101. """Add/remove an item from selection (generally done by ApplyRequests() function)"""
  9102. pass
  9103. # inline ImGuiID GetStorageIdFromIndex(int idx) { return AdapterIndexToStorageId(this, idx); } /* original C++ signature */
  9104. def get_storage_id_from_index(self, idx: int) -> ID:
  9105. """(private API)
  9106. Convert index to item id based on provided adapter.
  9107. """
  9108. pass
  9109. class SelectionExternalStorage:
  9110. """Optional helper to apply multi-selection requests to existing randomly accessible storage.
  9111. Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
  9112. """
  9113. # Members
  9114. # void* UserData; /* original C++ signature */
  9115. user_data: Any # User data for use by adapter function // e.g. selection.UserData = (None*)my_items;
  9116. # Methods
  9117. # IMGUI_API ImGuiSelectionExternalStorage(); /* original C++ signature */
  9118. def __init__(self) -> None:
  9119. pass
  9120. # IMGUI_API void ApplyRequests(ImGuiMultiSelectIO* ms_io); /* original C++ signature */
  9121. def apply_requests(self, ms_io: MultiSelectIO) -> None:
  9122. """Apply selection requests by using AdapterSetItemSelected() calls"""
  9123. pass
  9124. # -----------------------------------------------------------------------------
  9125. # [SECTION] Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawListFlags, ImDrawList, ImDrawData)
  9126. # Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.
  9127. # -----------------------------------------------------------------------------
  9128. # The maximum line width to bake anti-aliased textures for. Build atlas with ImFontAtlasFlags_NoBakedLines to disable baking.
  9129. # ImDrawIdx: vertex index. [Compile-time configurable type]
  9130. # - To use 16-bit indices + allow large meshes: backend need to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' and handle ImDrawCmd::VtxOffset (recommended).
  9131. # - To use 32-bit indices: override with '#define ImDrawIdx unsigned int' in your imconfig.h file.
  9132. # ImDrawCallback: Draw callbacks for advanced uses [configurable type: override in imconfig.h]
  9133. # NB: You most likely do NOT need to use draw callbacks just to create your own widget or customized UI rendering,
  9134. # you can poke into the draw list for that! Draw callback may be useful for example to:
  9135. # A) Change your GPU render state,
  9136. # B) render a complex 3D scene inside a UI element without an intermediate texture/render target, etc.
  9137. # The expected behavior from your rendering function is 'if (cmd.UserCallback != None) { cmd.UserCallback(parent_list, cmd); } else { RenderTriangles() }'
  9138. # If you want to override the signature of ImDrawCallback, you can simply use e.g. '#define ImDrawCallback MyDrawCallback' (in imconfig.h) + update rendering backend accordingly.
  9139. class ImDrawCmd:
  9140. """Typically, 1 command = 1 GPU draw call (unless command is a callback)
  9141. - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
  9142. this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
  9143. Backends made for <1.71. will typically ignore the VtxOffset fields.
  9144. - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
  9145. """
  9146. # ImVec4 ClipRect; /* original C++ signature */
  9147. clip_rect: ImVec4 # 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
  9148. # ImTextureRef TexRef; /* original C++ signature */
  9149. tex_ref: ImTextureRef # 16 // Reference to a font/texture atlas (where backend called ImTextureData::SetTexID()) or to a user-provided texture ID (via e.g. ImGui::Image() calls). Both will lead to a ImTextureID value.
  9150. # unsigned int VtxOffset; /* original C++ signature */
  9151. vtx_offset: int # 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may be >0 to support meshes larger than 64K vertices with 16-bit indices.
  9152. # unsigned int IdxOffset; /* original C++ signature */
  9153. idx_offset: int # 4 // Start offset in index buffer.
  9154. # unsigned int ElemCount; /* original C++ signature */
  9155. elem_count: int # 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
  9156. # void* UserCallbackData; /* original C++ signature */
  9157. user_callback_data: Any # 4-8 // Callback user data (when UserCallback != None). If called AddCallback() with size == 0, this is a copy of the AddCallback() argument. If called AddCallback() with size > 0, this is pointing to a buffer where data is stored.
  9158. # int UserCallbackDataSize; /* original C++ signature */
  9159. user_callback_data_size: int # 4 // Size of callback user data when using storage, otherwise 0.
  9160. # int UserCallbackDataOffset; /* original C++ signature */
  9161. user_callback_data_offset: int # 4 // [Internal] Offset of callback user data when using storage, otherwise -1.
  9162. # ImDrawCmd() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  9163. def __init__(self) -> None:
  9164. """Also ensure our padding fields are zeroed"""
  9165. pass
  9166. # Since 1.83: returns ImTextureID associated with this draw call. Warning: DO NOT assume this is always same as 'TextureId' (we will change this function for an upcoming feature)
  9167. # Since 1.92: removed ImDrawCmd::TextureId field, the getter function must be used!
  9168. # inline ImTextureID GetTexID() const; /* original C++ signature */
  9169. def get_tex_id(self) -> ImTextureID:
  9170. """(private API)
  9171. == (TexRef._TexData ? TexRef._TexData->TexID : TexRef._TexID)
  9172. """
  9173. pass
  9174. # Vertex layout
  9175. # #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT
  9176. #
  9177. class ImDrawVert:
  9178. # ImVec2 pos; /* original C++ signature */
  9179. pos: ImVec2
  9180. # ImVec2 uv; /* original C++ signature */
  9181. uv: ImVec2
  9182. # ImU32 col; /* original C++ signature */
  9183. col: ImU32
  9184. # ImDrawVert(ImVec2 pos = ImVec2(), ImVec2 uv = ImVec2(), ImU32 col = ImU32()); /* original C++ signature */
  9185. def __init__(self, pos: Optional[ImVec2Like] = None, uv: Optional[ImVec2Like] = None, col: ImU32 = ImU32()) -> None:
  9186. """Auto-generated default constructor with named params
  9187. Python bindings defaults:
  9188. If any of the params below is None, then its default value below will be used:
  9189. * pos: ImVec2()
  9190. * uv: ImVec2()
  9191. """
  9192. pass
  9193. # #else
  9194. #
  9195. # #endif
  9196. #
  9197. class ImDrawCmdHeader:
  9198. """[Internal] For use by ImDrawList"""
  9199. # ImVec4 ClipRect; /* original C++ signature */
  9200. clip_rect: ImVec4
  9201. # ImTextureRef TexRef; /* original C++ signature */
  9202. tex_ref: ImTextureRef
  9203. # unsigned int VtxOffset; /* original C++ signature */
  9204. vtx_offset: int
  9205. # ImDrawCmdHeader(ImVec4 ClipRect = ImVec4(), ImTextureRef TexRef = ImTextureRef()); /* original C++ signature */
  9206. def __init__(self, clip_rect: Optional[ImVec4Like] = None, tex_ref: Optional[ImTextureRef] = None) -> None:
  9207. """Auto-generated default constructor with named params
  9208. Python bindings defaults:
  9209. If any of the params below is None, then its default value below will be used:
  9210. * ClipRect: ImVec4()
  9211. * TexRef: ImTextureRef()
  9212. """
  9213. pass
  9214. class ImDrawChannel:
  9215. """[Internal] For use by ImDrawListSplitter"""
  9216. # ImVector<ImDrawCmd> _CmdBuffer; /* original C++ signature */
  9217. _cmd_buffer: ImVector_ImDrawCmd
  9218. # ImVector<ImDrawIdx> _IdxBuffer; /* original C++ signature */
  9219. _idx_buffer: ImVector_ImDrawIdx
  9220. # ImDrawChannel(ImVector<ImDrawCmd> _CmdBuffer = ImVector<ImDrawCmd>(), ImVector<ImDrawIdx> _IdxBuffer = ImVector<ImDrawIdx>()); /* original C++ signature */
  9221. def __init__(
  9222. self, _cmd_buffer: Optional[ImVector_ImDrawCmd] = None, _idx_buffer: Optional[ImVector_ImDrawIdx] = None
  9223. ) -> None:
  9224. """Auto-generated default constructor with named params
  9225. Python bindings defaults:
  9226. If any of the params below is None, then its default value below will be used:
  9227. * _CmdBuffer: ImVector_ImDrawCmd()
  9228. * _IdxBuffer: ImVector_ImDrawIdx()
  9229. """
  9230. pass
  9231. class ImDrawListSplitter:
  9232. """Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order.
  9233. This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call.
  9234. """
  9235. # int _Current; /* original C++ signature */
  9236. _current: int # Current channel number (0)
  9237. # int _Count; /* original C++ signature */
  9238. _count: int # Number of active channels (1+)
  9239. # ImVector<ImDrawChannel> _Channels; /* original C++ signature */
  9240. _channels: ImVector_ImDrawChannel # Draw channels (not resized down so _Count might be < Channels.Size)
  9241. # inline ImDrawListSplitter() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  9242. def __init__(self) -> None:
  9243. pass
  9244. # inline void Clear() { _Current = 0; _Count = 1; } /* original C++ signature */
  9245. def clear(self) -> None:
  9246. """(private API)
  9247. Do not clear Channels[] so our allocations are reused next frame
  9248. """
  9249. pass
  9250. # IMGUI_API void ClearFreeMemory(); /* original C++ signature */
  9251. def clear_free_memory(self) -> None:
  9252. pass
  9253. # IMGUI_API void Split(ImDrawList* draw_list, int count); /* original C++ signature */
  9254. def split(self, draw_list: ImDrawList, count: int) -> None:
  9255. pass
  9256. # IMGUI_API void Merge(ImDrawList* draw_list); /* original C++ signature */
  9257. def merge(self, draw_list: ImDrawList) -> None:
  9258. pass
  9259. # IMGUI_API void SetCurrentChannel(ImDrawList* draw_list, int channel_idx); /* original C++ signature */
  9260. def set_current_channel(self, draw_list: ImDrawList, channel_idx: int) -> None:
  9261. pass
  9262. class ImDrawFlags_(enum.IntFlag):
  9263. """Flags for ImDrawList functions"""
  9264. # ImDrawFlags_None = 0, /* original C++ signature */
  9265. none = enum.auto() # (= 0)
  9266. # ImDrawFlags_RoundCornersTopLeft = 1 << 4, /* original C++ signature */
  9267. round_corners_top_left = (
  9268. enum.auto()
  9269. ) # (= 1 << 4) # AddRect(), AddRectFilled(), PathRect(): enable rounding top-left corner only (when rounding > 0.0, we default to all corners). Was 0x01.
  9270. # ImDrawFlags_RoundCornersTopRight = 1 << 5, /* original C++ signature */
  9271. round_corners_top_right = (
  9272. enum.auto()
  9273. ) # (= 1 << 5) # AddRect(), AddRectFilled(), PathRect(): enable rounding top-right corner only (when rounding > 0.0, we default to all corners). Was 0x02.
  9274. # ImDrawFlags_RoundCornersBottomLeft = 1 << 6, /* original C++ signature */
  9275. round_corners_bottom_left = (
  9276. enum.auto()
  9277. ) # (= 1 << 6) # AddRect(), AddRectFilled(), PathRect(): enable rounding bottom-left corner only (when rounding > 0.0, we default to all corners). Was 0x04.
  9278. # ImDrawFlags_RoundCornersBottomRight = 1 << 7, /* original C++ signature */
  9279. round_corners_bottom_right = (
  9280. enum.auto()
  9281. ) # (= 1 << 7) # AddRect(), AddRectFilled(), PathRect(): enable rounding bottom-right corner only (when rounding > 0.0, we default to all corners). Wax 0x08.
  9282. # ImDrawFlags_RoundCornersNone = 1 << 8, /* original C++ signature */
  9283. round_corners_none = (
  9284. enum.auto()
  9285. ) # (= 1 << 8) # AddRect(), AddRectFilled(), PathRect(): disable rounding on all corners (when rounding > 0.0). This is NOT zero, NOT an implicit flag!
  9286. # ImDrawFlags_Closed = 1 << 9, /* original C++ signature */
  9287. closed = (
  9288. enum.auto()
  9289. ) # (= 1 << 9) # PathStroke(), AddPolyline(): specify that shape should be closed (Important: this is always == 1 for legacy reason)
  9290. # ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight, /* original C++ signature */
  9291. round_corners_top = enum.auto() # (= ImDrawFlags_.round_corners_top_left | ImDrawFlags_.round_corners_top_right)
  9292. # ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight, /* original C++ signature */
  9293. round_corners_bottom = (
  9294. enum.auto()
  9295. ) # (= ImDrawFlags_.round_corners_bottom_left | ImDrawFlags_.round_corners_bottom_right)
  9296. # ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft, /* original C++ signature */
  9297. round_corners_left = enum.auto() # (= ImDrawFlags_.round_corners_bottom_left | ImDrawFlags_.round_corners_top_left)
  9298. # ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight, /* original C++ signature */
  9299. round_corners_right = (
  9300. enum.auto()
  9301. ) # (= ImDrawFlags_.round_corners_bottom_right | ImDrawFlags_.round_corners_top_right)
  9302. # ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight, /* original C++ signature */
  9303. round_corners_all = (
  9304. enum.auto()
  9305. ) # (= ImDrawFlags_.round_corners_top_left | ImDrawFlags_.round_corners_top_right | ImDrawFlags_.round_corners_bottom_left | ImDrawFlags_.round_corners_bottom_right)
  9306. # ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll, /* original C++ signature */
  9307. round_corners_default_ = (
  9308. enum.auto()
  9309. ) # (= ImDrawFlags_.round_corners_all) # Default to ALL corners if none of the _RoundCornersXX flags are specified.
  9310. # ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone, /* original C++ signature */
  9311. round_corners_mask_ = enum.auto() # (= ImDrawFlags_.round_corners_all | ImDrawFlags_.round_corners_none)
  9312. # ImDrawFlags_InvalidMask_ = (ImDrawFlags)0x8000000F, /* original C++ signature */
  9313. # }
  9314. invalid_mask_ = enum.auto() # (= (ImDrawFlags)0x8000000F)
  9315. class ImDrawListFlags_(enum.IntFlag):
  9316. """Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly.
  9317. It is however possible to temporarily alter flags between calls to ImDrawList:: functions.
  9318. """
  9319. # ImDrawListFlags_None = 0, /* original C++ signature */
  9320. none = enum.auto() # (= 0)
  9321. # ImDrawListFlags_AntiAliasedLines = 1 << 0, /* original C++ signature */
  9322. anti_aliased_lines = (
  9323. enum.auto()
  9324. ) # (= 1 << 0) # Enable anti-aliased lines/borders (*2 the number of triangles for 1.0 wide line or lines thin enough to be drawn using textures, otherwise *3 the number of triangles)
  9325. # ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1, /* original C++ signature */
  9326. anti_aliased_lines_use_tex = (
  9327. enum.auto()
  9328. ) # (= 1 << 1) # Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering (NOT point/nearest filtering).
  9329. # ImDrawListFlags_AntiAliasedFill = 1 << 2, /* original C++ signature */
  9330. anti_aliased_fill = (
  9331. enum.auto()
  9332. ) # (= 1 << 2) # Enable anti-aliased edge around filled shapes (rounded rectangles, circles).
  9333. # ImDrawListFlags_AllowVtxOffset = 1 << 3, /* original C++ signature */
  9334. allow_vtx_offset = (
  9335. enum.auto()
  9336. ) # (= 1 << 3) # Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled.
  9337. class ImDrawList:
  9338. """Draw command list
  9339. This is the low-level list of polygons that ImGui:: functions are filling. At the end of the frame,
  9340. all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering.
  9341. Each dear imgui window contains its own ImDrawList. You can use ImGui::GetWindowDrawList() to
  9342. access the current window draw list and draw custom primitives.
  9343. You can interleave normal ImGui:: calls and adding primitives to the current draw list.
  9344. In single viewport mode, top-left is == GetMainViewport()->Pos (generally 0,0), bottom-right is == GetMainViewport()->Pos+Size (generally io.DisplaySize).
  9345. You are totally free to apply whatever transformation matrix you want to the data (depending on the use of the transformation you may want to apply it to ClipRect as well!)
  9346. Important: Primitives are always added to the list and not culled (culling is done at higher-level by ImGui:: functions), if you use this API a lot consider coarse culling your drawn objects.
  9347. """
  9348. # This is what you have to render
  9349. # ImVector<ImDrawCmd> CmdBuffer; /* original C++ signature */
  9350. cmd_buffer: (
  9351. ImVector_ImDrawCmd # Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback.
  9352. )
  9353. # ImVector<ImDrawIdx> IdxBuffer; /* original C++ signature */
  9354. idx_buffer: ImVector_ImDrawIdx # Index buffer. Each command consume ImDrawCmd::ElemCount of those
  9355. # ImVector<ImDrawVert> VtxBuffer; /* original C++ signature */
  9356. vtx_buffer: ImVector_ImDrawVert # Vertex buffer.
  9357. # ImDrawListFlags Flags; /* original C++ signature */
  9358. flags: ImDrawListFlags # Flags, you may poke into these to adjust anti-aliasing settings per-primitive.
  9359. # [Internal, used while building lists]
  9360. # unsigned int _VtxCurrentIdx; /* original C++ signature */
  9361. _vtx_current_idx: int # [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to 0.
  9362. # ImDrawListSharedData* _Data; /* original C++ signature */
  9363. _data: ImDrawListSharedData # Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current ImGui context)
  9364. # ImDrawVert* _VtxWritePtr; /* original C++ signature */
  9365. _vtx_write_ptr: ImDrawVert # [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
  9366. # ImDrawIdx* _IdxWritePtr; /* original C++ signature */
  9367. _idx_write_ptr: ImDrawIdx # [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
  9368. # ImVector<ImVec2> _Path; /* original C++ signature */
  9369. _path: ImVector_ImVec2 # [Internal] current path building
  9370. # ImDrawCmdHeader _CmdHeader; /* original C++ signature */
  9371. _cmd_header: (
  9372. ImDrawCmdHeader # [Internal] template of active commands. Fields should match those of CmdBuffer.back().
  9373. )
  9374. # ImDrawListSplitter _Splitter; /* original C++ signature */
  9375. _splitter: ImDrawListSplitter # [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!)
  9376. # ImVector<ImVec4> _ClipRectStack; /* original C++ signature */
  9377. _clip_rect_stack: ImVector_ImVec4 # [Internal]
  9378. # ImVector<ImTextureRef> _TextureStack; /* original C++ signature */
  9379. _texture_stack: ImVector_ImTextureRef # [Internal]
  9380. # ImVector<ImU8> _CallbacksDataBuf; /* original C++ signature */
  9381. _callbacks_data_buf: ImVector_ImU8 # [Internal]
  9382. # float _FringeScale; /* original C++ signature */
  9383. _fringe_scale: float # [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at vertex buffer content
  9384. # const char* _OwnerName; /* original C++ signature */
  9385. _owner_name: str # Pointer to owner window's name for debugging # (const)
  9386. # IMGUI_API ImDrawList(ImDrawListSharedData* shared_data); /* original C++ signature */
  9387. def __init__(self, shared_data: ImDrawListSharedData) -> None:
  9388. """If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData().
  9389. (advanced: you may create and use your own ImDrawListSharedData so you can use ImDrawList without ImGui, but that's more involved)
  9390. """
  9391. pass
  9392. # IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false); /* original C++ signature */
  9393. def push_clip_rect(
  9394. self, clip_rect_min: ImVec2Like, clip_rect_max: ImVec2Like, intersect_with_current_clip_rect: bool = False
  9395. ) -> None:
  9396. """Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)"""
  9397. pass
  9398. # IMGUI_API void PushClipRectFullScreen(); /* original C++ signature */
  9399. def push_clip_rect_full_screen(self) -> None:
  9400. pass
  9401. # IMGUI_API void PopClipRect(); /* original C++ signature */
  9402. def pop_clip_rect(self) -> None:
  9403. pass
  9404. # IMGUI_API void PushTexture(ImTextureRef tex_ref); /* original C++ signature */
  9405. def push_texture(self, tex_ref: ImTextureRef) -> None:
  9406. pass
  9407. # IMGUI_API void PopTexture(); /* original C++ signature */
  9408. def pop_texture(self) -> None:
  9409. pass
  9410. # inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.x, cr.y); } /* original C++ signature */
  9411. def get_clip_rect_min(self) -> ImVec2:
  9412. """(private API)"""
  9413. pass
  9414. # inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.z, cr.w); } /* original C++ signature */
  9415. def get_clip_rect_max(self) -> ImVec2:
  9416. """(private API)"""
  9417. pass
  9418. # Primitives
  9419. # - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
  9420. # - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners.
  9421. # - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred).
  9422. # In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12.
  9423. # In future versions we will use textures to provide cheaper and higher-quality circles.
  9424. # Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides.
  9425. # IMGUI_API void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f); /* original C++ signature */
  9426. def add_line(self, p1: ImVec2Like, p2: ImVec2Like, col: ImU32, thickness: float = 1.0) -> None:
  9427. pass
  9428. # IMGUI_API void AddLineH(float min_x, float max_x, float y, ImU32 col, float thickness = 1.0f); /* original C++ signature */
  9429. def add_line_h(self, min_x: float, max_x: float, y: float, col: ImU32, thickness: float = 1.0) -> None:
  9430. pass
  9431. # IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, float thickness = 1.0f, ImDrawFlags flags = 0); /* original C++ signature */
  9432. def add_rect(
  9433. self,
  9434. p_min: ImVec2Like,
  9435. p_max: ImVec2Like,
  9436. col: ImU32,
  9437. rounding: float = 0.0,
  9438. thickness: float = 1.0,
  9439. flags: ImDrawFlags = 0,
  9440. ) -> None:
  9441. """a: upper-left, b: lower-right (== upper-left + size)"""
  9442. pass
  9443. # IMGUI_API void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0); /* original C++ signature */
  9444. def add_rect_filled(
  9445. self, p_min: ImVec2Like, p_max: ImVec2Like, col: ImU32, rounding: float = 0.0, flags: ImDrawFlags = 0
  9446. ) -> None:
  9447. """a: upper-left, b: lower-right (== upper-left + size)"""
  9448. pass
  9449. # IMGUI_API void AddRectFilledMultiColor(const ImVec2& p_min, const ImVec2& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left); /* original C++ signature */
  9450. def add_rect_filled_multi_color(
  9451. self,
  9452. p_min: ImVec2Like,
  9453. p_max: ImVec2Like,
  9454. col_upr_left: ImU32,
  9455. col_upr_right: ImU32,
  9456. col_bot_right: ImU32,
  9457. col_bot_left: ImU32,
  9458. ) -> None:
  9459. pass
  9460. # IMGUI_API void AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness = 1.0f); /* original C++ signature */
  9461. def add_quad(
  9462. self, p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, p4: ImVec2Like, col: ImU32, thickness: float = 1.0
  9463. ) -> None:
  9464. pass
  9465. # IMGUI_API void AddQuadFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col); /* original C++ signature */
  9466. def add_quad_filled(self, p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, p4: ImVec2Like, col: ImU32) -> None:
  9467. pass
  9468. # IMGUI_API void AddTriangle(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness = 1.0f); /* original C++ signature */
  9469. def add_triangle(self, p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, col: ImU32, thickness: float = 1.0) -> None:
  9470. pass
  9471. # IMGUI_API void AddTriangleFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col); /* original C++ signature */
  9472. def add_triangle_filled(self, p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, col: ImU32) -> None:
  9473. pass
  9474. # IMGUI_API void AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments = 0, float thickness = 1.0f); /* original C++ signature */
  9475. def add_circle(
  9476. self, center: ImVec2Like, radius: float, col: ImU32, num_segments: int = 0, thickness: float = 1.0
  9477. ) -> None:
  9478. pass
  9479. # IMGUI_API void AddCircleFilled(const ImVec2& center, float radius, ImU32 col, int num_segments = 0); /* original C++ signature */
  9480. def add_circle_filled(self, center: ImVec2Like, radius: float, col: ImU32, num_segments: int = 0) -> None:
  9481. pass
  9482. # IMGUI_API void AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness = 1.0f); /* original C++ signature */
  9483. def add_ngon(
  9484. self, center: ImVec2Like, radius: float, col: ImU32, num_segments: int, thickness: float = 1.0
  9485. ) -> None:
  9486. pass
  9487. # IMGUI_API void AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments); /* original C++ signature */
  9488. def add_ngon_filled(self, center: ImVec2Like, radius: float, col: ImU32, num_segments: int) -> None:
  9489. pass
  9490. # IMGUI_API void AddEllipse(const ImVec2& center, const ImVec2& radius, ImU32 col, float rot = 0.0f, int num_segments = 0, float thickness = 1.0f); /* original C++ signature */
  9491. def add_ellipse(
  9492. self,
  9493. center: ImVec2Like,
  9494. radius: ImVec2Like,
  9495. col: ImU32,
  9496. rot: float = 0.0,
  9497. num_segments: int = 0,
  9498. thickness: float = 1.0,
  9499. ) -> None:
  9500. pass
  9501. # IMGUI_API void AddEllipseFilled(const ImVec2& center, const ImVec2& radius, ImU32 col, float rot = 0.0f, int num_segments = 0); /* original C++ signature */
  9502. def add_ellipse_filled(
  9503. self, center: ImVec2Like, radius: ImVec2Like, col: ImU32, rot: float = 0.0, num_segments: int = 0
  9504. ) -> None:
  9505. pass
  9506. # IMGUI_API void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL); /* original C++ signature */
  9507. @overload
  9508. def add_text(self, pos: ImVec2Like, col: ImU32, text_begin: str, text_end: Optional[str] = None) -> None:
  9509. pass
  9510. # IMGUI_API void AddText(ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL); /* original C++ signature */
  9511. @overload
  9512. def add_text(
  9513. self,
  9514. font: ImFont,
  9515. font_size: float,
  9516. pos: ImVec2Like,
  9517. col: ImU32,
  9518. text_begin: str,
  9519. text_end: Optional[str] = None,
  9520. wrap_width: float = 0.0,
  9521. cpu_fine_clip_rect: Optional[ImVec4Like] = None,
  9522. ) -> None:
  9523. pass
  9524. # IMGUI_API void AddBezierCubic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0); /* original C++ signature */
  9525. def add_bezier_cubic(
  9526. self,
  9527. p1: ImVec2Like,
  9528. p2: ImVec2Like,
  9529. p3: ImVec2Like,
  9530. p4: ImVec2Like,
  9531. col: ImU32,
  9532. thickness: float,
  9533. num_segments: int = 0,
  9534. ) -> None:
  9535. """Cubic Bezier (4 control points)"""
  9536. pass
  9537. # IMGUI_API void AddBezierQuadratic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness, int num_segments = 0); /* original C++ signature */
  9538. def add_bezier_quadratic(
  9539. self, p1: ImVec2Like, p2: ImVec2Like, p3: ImVec2Like, col: ImU32, thickness: float, num_segments: int = 0
  9540. ) -> None:
  9541. """Quadratic Bezier (3 control points)"""
  9542. pass
  9543. # #ifdef IMGUI_BUNDLE_PYTHON_API
  9544. #
  9545. # - Only simple polygons are supported by filling functions (no self-intersections, no holes).
  9546. # - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience fo user but not used by main library.
  9547. # IMGUI_API void AddPolyline(const std::vector<ImVec2>& points, ImU32 col, float thickness, ImDrawFlags flags); /* original C++ signature */
  9548. def add_polyline(self, points: List[ImVec2Like], col: ImU32, thickness: float, flags: ImDrawFlags) -> None:
  9549. pass
  9550. # IMGUI_API void AddConvexPolyFilled(const std::vector<ImVec2>& points, ImU32 col); /* original C++ signature */
  9551. def add_convex_poly_filled(self, points: List[ImVec2Like], col: ImU32) -> None:
  9552. pass
  9553. # IMGUI_API void AddConcavePolyFilled(const std::vector<ImVec2>& points, ImU32 col); /* original C++ signature */
  9554. def add_concave_poly_filled(self, points: List[ImVec2Like], col: ImU32) -> None:
  9555. pass
  9556. # #endif
  9557. #
  9558. # Image primitives
  9559. # - Read FAQ to understand what ImTextureID/ImTextureRef are.
  9560. # - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle.
  9561. # - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture.
  9562. # IMGUI_API void AddImage(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min = ImVec2(0, 0), const ImVec2& uv_max = ImVec2(1, 1), ImU32 col = IM_COL32_WHITE); /* original C++ signature */
  9563. def add_image(
  9564. self,
  9565. tex_ref: ImTextureRef,
  9566. p_min: ImVec2Like,
  9567. p_max: ImVec2Like,
  9568. uv_min: Optional[ImVec2Like] = None,
  9569. uv_max: Optional[ImVec2Like] = None,
  9570. col: ImU32 = IM_COL32_WHITE,
  9571. ) -> None:
  9572. """Python bindings defaults:
  9573. If any of the params below is None, then its default value below will be used:
  9574. * uv_min: ImVec2(0, 0)
  9575. * uv_max: ImVec2(1, 1)
  9576. """
  9577. pass
  9578. # IMGUI_API void AddImageQuad(ImTextureRef tex_ref, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1 = ImVec2(0, 0), const ImVec2& uv2 = ImVec2(1, 0), const ImVec2& uv3 = ImVec2(1, 1), const ImVec2& uv4 = ImVec2(0, 1), ImU32 col = IM_COL32_WHITE); /* original C++ signature */
  9579. def add_image_quad(
  9580. self,
  9581. tex_ref: ImTextureRef,
  9582. p1: ImVec2Like,
  9583. p2: ImVec2Like,
  9584. p3: ImVec2Like,
  9585. p4: ImVec2Like,
  9586. uv1: Optional[ImVec2Like] = None,
  9587. uv2: Optional[ImVec2Like] = None,
  9588. uv3: Optional[ImVec2Like] = None,
  9589. uv4: Optional[ImVec2Like] = None,
  9590. col: ImU32 = IM_COL32_WHITE,
  9591. ) -> None:
  9592. """Python bindings defaults:
  9593. If any of the params below is None, then its default value below will be used:
  9594. * uv1: ImVec2(0, 0)
  9595. * uv2: ImVec2(1, 0)
  9596. * uv3: ImVec2(1, 1)
  9597. * uv4: ImVec2(0, 1)
  9598. """
  9599. pass
  9600. # IMGUI_API void AddImageRounded(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags = 0); /* original C++ signature */
  9601. def add_image_rounded(
  9602. self,
  9603. tex_ref: ImTextureRef,
  9604. p_min: ImVec2Like,
  9605. p_max: ImVec2Like,
  9606. uv_min: ImVec2Like,
  9607. uv_max: ImVec2Like,
  9608. col: ImU32,
  9609. rounding: float,
  9610. flags: ImDrawFlags = 0,
  9611. ) -> None:
  9612. pass
  9613. # Stateful path API, add points then finish with PathFillConvex() or PathStroke()
  9614. # - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
  9615. # so e.g. 'PathArcTo(center, radius, PI * -0.5, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5)' won't have correct anti-aliasing when followed by PathFillConvex().
  9616. # inline void PathClear() { _Path.Size = 0; } /* original C++ signature */
  9617. def path_clear(self) -> None:
  9618. """(private API)"""
  9619. pass
  9620. # inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); } /* original C++ signature */
  9621. def path_line_to(self, pos: ImVec2Like) -> None:
  9622. """(private API)"""
  9623. pass
  9624. # inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); } /* original C++ signature */
  9625. def path_line_to_merge_duplicate(self, pos: ImVec2Like) -> None:
  9626. """(private API)"""
  9627. pass
  9628. # inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; } /* original C++ signature */
  9629. def path_fill_convex(self, col: ImU32) -> None:
  9630. """(private API)"""
  9631. pass
  9632. # inline void PathFillConcave(ImU32 col) { AddConcavePolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; } /* original C++ signature */
  9633. def path_fill_concave(self, col: ImU32) -> None:
  9634. """(private API)"""
  9635. pass
  9636. # inline void PathStroke(ImU32 col, float thickness = 1.0f, ImDrawFlags flags = 0) { AddPolyline(_Path.Data, _Path.Size, col, thickness, flags); _Path.Size = 0; } /* original C++ signature */
  9637. def path_stroke(self, col: ImU32, thickness: float = 1.0, flags: ImDrawFlags = 0) -> None:
  9638. """(private API)"""
  9639. pass
  9640. # IMGUI_API void PathArcTo(const ImVec2& center, float radius, float a_min, float a_max, int num_segments = 0); /* original C++ signature */
  9641. def path_arc_to(self, center: ImVec2Like, radius: float, a_min: float, a_max: float, num_segments: int = 0) -> None:
  9642. pass
  9643. # IMGUI_API void PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12); /* original C++ signature */
  9644. def path_arc_to_fast(self, center: ImVec2Like, radius: float, a_min_of_12: int, a_max_of_12: int) -> None:
  9645. """Use precomputed angles for a 12 steps circle"""
  9646. pass
  9647. # IMGUI_API void PathEllipticalArcTo(const ImVec2& center, const ImVec2& radius, float rot, float a_min, float a_max, int num_segments = 0); /* original C++ signature */
  9648. def path_elliptical_arc_to(
  9649. self, center: ImVec2Like, radius: ImVec2Like, rot: float, a_min: float, a_max: float, num_segments: int = 0
  9650. ) -> None:
  9651. """Ellipse"""
  9652. pass
  9653. # IMGUI_API void PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0); /* original C++ signature */
  9654. def path_bezier_cubic_curve_to(self, p2: ImVec2Like, p3: ImVec2Like, p4: ImVec2Like, num_segments: int = 0) -> None:
  9655. """Cubic Bezier (4 control points)"""
  9656. pass
  9657. # IMGUI_API void PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments = 0); /* original C++ signature */
  9658. def path_bezier_quadratic_curve_to(self, p2: ImVec2Like, p3: ImVec2Like, num_segments: int = 0) -> None:
  9659. """Quadratic Bezier (3 control points)"""
  9660. pass
  9661. # IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawFlags flags = 0); /* original C++ signature */
  9662. def path_rect(
  9663. self, rect_min: ImVec2Like, rect_max: ImVec2Like, rounding: float = 0.0, flags: ImDrawFlags = 0
  9664. ) -> None:
  9665. pass
  9666. # Advanced: Miscellaneous
  9667. # IMGUI_API void AddDrawCmd(); /* original C++ signature */
  9668. def add_draw_cmd(self) -> None:
  9669. """This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible"""
  9670. pass
  9671. # IMGUI_API ImDrawList* CloneOutput() const; /* original C++ signature */
  9672. def clone_output(self) -> ImDrawList:
  9673. """Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer. For multi-threaded rendering, consider using `imgui_threaded_rendering` from https://github.com/ocornut/imgui_club instead."""
  9674. pass
  9675. # Advanced: Channels
  9676. # - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives)
  9677. # - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end)
  9678. # - This API shouldn't have been in ImDrawList in the first place!
  9679. # Prefer using your own persistent instance of ImDrawListSplitter as you can stack them.
  9680. # Using the ImDrawList::ChannelsXXXX you cannot stack a split over another.
  9681. # inline void ChannelsSplit(int count) { _Splitter.Split(this, count); } /* original C++ signature */
  9682. def channels_split(self, count: int) -> None:
  9683. """(private API)"""
  9684. pass
  9685. # inline void ChannelsMerge() { _Splitter.Merge(this); } /* original C++ signature */
  9686. def channels_merge(self) -> None:
  9687. """(private API)"""
  9688. pass
  9689. # inline void ChannelsSetCurrent(int n) { _Splitter.SetCurrentChannel(this, n); } /* original C++ signature */
  9690. def channels_set_current(self, n: int) -> None:
  9691. """(private API)"""
  9692. pass
  9693. # Advanced: Primitives allocations
  9694. # - We render triangles (three vertices)
  9695. # - All primitives needs to be reserved via PrimReserve() beforehand.
  9696. # IMGUI_API void PrimReserve(int idx_count, int vtx_count); /* original C++ signature */
  9697. def prim_reserve(self, idx_count: int, vtx_count: int) -> None:
  9698. pass
  9699. # IMGUI_API void PrimUnreserve(int idx_count, int vtx_count); /* original C++ signature */
  9700. def prim_unreserve(self, idx_count: int, vtx_count: int) -> None:
  9701. pass
  9702. # IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col); /* original C++ signature */
  9703. def prim_rect(self, a: ImVec2Like, b: ImVec2Like, col: ImU32) -> None:
  9704. """Axis aligned rectangle (composed of two triangles)"""
  9705. pass
  9706. # IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col); /* original C++ signature */
  9707. def prim_rect_uv(self, a: ImVec2Like, b: ImVec2Like, uv_a: ImVec2Like, uv_b: ImVec2Like, col: ImU32) -> None:
  9708. pass
  9709. # IMGUI_API void PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col); /* original C++ signature */
  9710. def prim_quad_uv(
  9711. self,
  9712. a: ImVec2Like,
  9713. b: ImVec2Like,
  9714. c: ImVec2Like,
  9715. d: ImVec2Like,
  9716. uv_a: ImVec2Like,
  9717. uv_b: ImVec2Like,
  9718. uv_c: ImVec2Like,
  9719. uv_d: ImVec2Like,
  9720. col: ImU32,
  9721. ) -> None:
  9722. pass
  9723. # inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; } /* original C++ signature */
  9724. def prim_write_vtx(self, pos: ImVec2Like, uv: ImVec2Like, col: ImU32) -> None:
  9725. """(private API)"""
  9726. pass
  9727. # inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; } /* original C++ signature */
  9728. def prim_write_idx(self, idx: ImDrawIdx) -> None:
  9729. """(private API)"""
  9730. pass
  9731. # inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); } /* original C++ signature */
  9732. def prim_vtx(self, pos: ImVec2Like, uv: ImVec2Like, col: ImU32) -> None:
  9733. """(private API)
  9734. Write vertex with unique index
  9735. """
  9736. pass
  9737. # Obsolete names
  9738. # inline None AddEllipse(const ImVec2& center, float radius_x, float radius_y, ImU32 col, float rot = 0.0, int num_segments = 0, float thickness = 1.0) { AddEllipse(center, ImVec2(radius_x, radius_y), col, rot, num_segments, thickness); } // OBSOLETED in 1.90.5 (Mar 2024)
  9739. # inline None AddEllipseFilled(const ImVec2& center, float radius_x, float radius_y, ImU32 col, float rot = 0.0, int num_segments = 0) { AddEllipseFilled(center, ImVec2(radius_x, radius_y), col, rot, num_segments); } // OBSOLETED in 1.90.5 (Mar 2024)
  9740. # inline None PathEllipticalArcTo(const ImVec2& center, float radius_x, float radius_y, float rot, float a_min, float a_max, int num_segments = 0) { PathEllipticalArcTo(center, ImVec2(radius_x, radius_y), rot, a_min, a_max, num_segments); } // OBSOLETED in 1.90.5 (Mar 2024)
  9741. # inline None AddBezierCurve(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) { AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
  9742. # inline None PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
  9743. # [Internal helpers]
  9744. # IMGUI_API void _SetDrawListSharedData(ImDrawListSharedData* data); /* original C++ signature */
  9745. def _set_draw_list_shared_data(self, data: ImDrawListSharedData) -> None:
  9746. pass
  9747. # IMGUI_API void _ResetForNewFrame(); /* original C++ signature */
  9748. def _reset_for_new_frame(self) -> None:
  9749. pass
  9750. # IMGUI_API void _ClearFreeMemory(); /* original C++ signature */
  9751. def _clear_free_memory(self) -> None:
  9752. pass
  9753. # IMGUI_API void _PopUnusedDrawCmd(); /* original C++ signature */
  9754. def _pop_unused_draw_cmd(self) -> None:
  9755. pass
  9756. # IMGUI_API void _TryMergeDrawCmds(); /* original C++ signature */
  9757. def _try_merge_draw_cmds(self) -> None:
  9758. pass
  9759. # IMGUI_API void _OnChangedClipRect(); /* original C++ signature */
  9760. def _on_changed_clip_rect(self) -> None:
  9761. pass
  9762. # IMGUI_API void _OnChangedTexture(); /* original C++ signature */
  9763. def _on_changed_texture(self) -> None:
  9764. pass
  9765. # IMGUI_API void _OnChangedVtxOffset(); /* original C++ signature */
  9766. def _on_changed_vtx_offset(self) -> None:
  9767. pass
  9768. # IMGUI_API void _SetTexture(ImTextureRef tex_ref); /* original C++ signature */
  9769. def _set_texture(self, tex_ref: ImTextureRef) -> None:
  9770. pass
  9771. # IMGUI_API int _CalcCircleAutoSegmentCount(float radius) const; /* original C++ signature */
  9772. def _calc_circle_auto_segment_count(self, radius: float) -> int:
  9773. pass
  9774. # IMGUI_API void _PathArcToFastEx(const ImVec2& center, float radius, int a_min_sample, int a_max_sample, int a_step); /* original C++ signature */
  9775. def _path_arc_to_fast_ex(
  9776. self, center: ImVec2Like, radius: float, a_min_sample: int, a_max_sample: int, a_step: int
  9777. ) -> None:
  9778. pass
  9779. # IMGUI_API void _PathArcToN(const ImVec2& center, float radius, float a_min, float a_max, int num_segments); /* original C++ signature */
  9780. def _path_arc_to_n(self, center: ImVec2Like, radius: float, a_min: float, a_max: float, num_segments: int) -> None:
  9781. pass
  9782. class ImDrawData:
  9783. """All draw data to render a Dear ImGui frame
  9784. (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose,
  9785. as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList)
  9786. """
  9787. # bool Valid; /* original C++ signature */
  9788. valid: bool # Only valid after Render() is called and before the next NewFrame() is called.
  9789. # int CmdListsCount; /* original C++ signature */
  9790. cmd_lists_count: int # == CmdLists.Size. (OBSOLETE: exists for legacy reasons). Number of ImDrawList* to render.
  9791. # int TotalIdxCount; /* original C++ signature */
  9792. total_idx_count: int # For convenience, sum of all ImDrawList's IdxBuffer.Size
  9793. # int TotalVtxCount; /* original C++ signature */
  9794. total_vtx_count: int # For convenience, sum of all ImDrawList's VtxBuffer.Size
  9795. # ImVector<ImDrawList*> CmdLists; /* original C++ signature */
  9796. cmd_lists: ImVector_ImDrawList_ptr # Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here.
  9797. # ImVec2 DisplayPos; /* original C++ signature */
  9798. display_pos: ImVec2 # Top-left position of the viewport to render (== top-left of the orthogonal projection matrix to use) (== GetMainViewport()->Pos for the main viewport, == (0.0) in most single-viewport applications)
  9799. # ImVec2 DisplaySize; /* original C++ signature */
  9800. display_size: ImVec2 # Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize in most single-viewport applications)
  9801. # ImVec2 FramebufferScale; /* original C++ signature */
  9802. framebuffer_scale: ImVec2 # Amount of pixels for each unit of DisplaySize. Copied from viewport->FramebufferScale (== io.DisplayFramebufferScale for main viewport). Generally (1,1) on normal display, (2,2) on OSX with Retina display.
  9803. # ImGuiViewport* OwnerViewport; /* original C++ signature */
  9804. owner_viewport: (
  9805. Viewport # Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not).
  9806. )
  9807. # ImVector<ImTextureData*>* Textures; /* original C++ signature */
  9808. textures: ImVector_ImTextureData_ptr # List of textures to update. Most of the times the list is shared by all ImDrawData, has only 1 texture and it doesn't need any update. This almost always points to ImGui::GetPlatformIO().Textures[]. May be overridden or set to None if you want to manually update textures.
  9809. # ImDrawData() { Clear(); } /* original C++ signature */
  9810. def __init__(self) -> None:
  9811. """Functions"""
  9812. pass
  9813. # IMGUI_API void Clear(); /* original C++ signature */
  9814. def clear(self) -> None:
  9815. pass
  9816. # IMGUI_API void AddDrawList(ImDrawList* draw_list); /* original C++ signature */
  9817. def add_draw_list(self, draw_list: ImDrawList) -> None:
  9818. """Helper to add an external draw list into an existing ImDrawData."""
  9819. pass
  9820. # IMGUI_API void DeIndexAllBuffers(); /* original C++ signature */
  9821. def de_index_all_buffers(self) -> None:
  9822. """Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!"""
  9823. pass
  9824. # IMGUI_API void ScaleClipRects(const ImVec2& fb_scale); /* original C++ signature */
  9825. def scale_clip_rects(self, fb_scale: ImVec2Like) -> None:
  9826. """Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than Dear ImGui expects, or if there is a difference between your window resolution and framebuffer resolution."""
  9827. pass
  9828. # -----------------------------------------------------------------------------
  9829. # [SECTION] Texture API (ImTextureFormat, ImTextureStatus, ImTextureRect, ImTextureData)
  9830. # -----------------------------------------------------------------------------
  9831. # In principle, the only data types that user/application code should care about are 'ImTextureRef' and 'ImTextureID'.
  9832. # They are defined above in this header file. Read their description to the difference between ImTextureRef and ImTextureID.
  9833. # FOR ALL OTHER ImTextureXXXX TYPES: ONLY CORE LIBRARY AND RENDERER BACKENDS NEED TO KNOW AND CARE ABOUT THEM.
  9834. # -----------------------------------------------------------------------------
  9835. class ImTextureFormat(enum.IntFlag):
  9836. """We intentionally support a limited amount of texture formats to limit burden on CPU-side code and extension.
  9837. Most standard backends only support RGBA32 but we provide a single channel option for low-resource/embedded systems.
  9838. """
  9839. # ImTextureFormat_RGBA32, /* original C++ signature */
  9840. rgba32 = (
  9841. enum.auto()
  9842. ) # (= 0) # 4 components per pixel, each is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
  9843. # ImTextureFormat_Alpha8, /* original C++ signature */
  9844. alpha8 = enum.auto() # (= 1) # 1 component per pixel, each is unsigned 8-bit. Total size = TexWidth * TexHeight
  9845. class ImTextureStatus(enum.IntFlag):
  9846. """Status of a texture to communicate with Renderer Backend."""
  9847. # ImTextureStatus_OK, /* original C++ signature */
  9848. ok = enum.auto() # (= 0)
  9849. # ImTextureStatus_Destroyed, /* original C++ signature */
  9850. destroyed = enum.auto() # (= 1) # Backend destroyed the texture.
  9851. # ImTextureStatus_WantCreate, /* original C++ signature */
  9852. want_create = enum.auto() # (= 2) # Requesting backend to create the texture. Set status OK when done.
  9853. # ImTextureStatus_WantUpdates, /* original C++ signature */
  9854. want_updates = (
  9855. enum.auto()
  9856. ) # (= 3) # Requesting backend to update specific blocks of pixels (write to texture portions which have never been used before). Set status OK when done.
  9857. # ImTextureStatus_WantDestroy, /* original C++ signature */
  9858. want_destroy = enum.auto() # (= 4) # Requesting backend to destroy the texture. Set status to Destroyed when done.
  9859. class ImTextureRect:
  9860. """Coordinates of a rectangle within a texture.
  9861. When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system.
  9862. You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box.
  9863. """
  9864. # unsigned short x, /* original C++ signature */
  9865. x: int # Upper-left coordinates of rectangle to update
  9866. # y; /* original C++ signature */
  9867. y: int # Upper-left coordinates of rectangle to update
  9868. # unsigned short w, /* original C++ signature */
  9869. w: int # Size of rectangle to update (in pixels)
  9870. # h; /* original C++ signature */
  9871. h: int # Size of rectangle to update (in pixels)
  9872. # ImTextureRect(); /* original C++ signature */
  9873. def __init__(self) -> None:
  9874. """Auto-generated default constructor"""
  9875. pass
  9876. class ImTextureData:
  9877. """Specs and pixel storage for a texture used by Dear ImGui.
  9878. This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this.
  9879. Renderer Backends will create a GPU-side version of this.
  9880. Why does we store two identifiers: TexID and BackendUserData?
  9881. - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData.
  9882. - None* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both.
  9883. In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend
  9884. """
  9885. # ------------------------------------------ core / backend ---------------------------------------
  9886. # int UniqueID; /* original C++ signature */
  9887. unique_id: int # w - // [DEBUG] Sequential index to facilitate identifying a texture when debugging/printing. Unique per atlas.
  9888. # ImTextureStatus Status; /* original C++ signature */
  9889. status: ImTextureStatus # rw rw // ImTextureStatus_OK/_WantCreate/_WantUpdates/_WantDestroy. Always use SetStatus() to modify!
  9890. # void* BackendUserData; /* original C++ signature */
  9891. backend_user_data: Any # - rw // Convenience storage for backend. Some backends may have enough with TexID.
  9892. # ImTextureID TexID; /* original C++ signature */
  9893. tex_id: ImTextureID # r w // Backend-specific texture identifier. Always use SetTexID() to modify! The identifier will stored in ImDrawCmd::GetTexID() and passed to backend's RenderDrawData function.
  9894. # ImTextureFormat Format; /* original C++ signature */
  9895. format: ImTextureFormat # w r // ImTextureFormat_RGBA32 (default) or ImTextureFormat_Alpha8
  9896. # int Width; /* original C++ signature */
  9897. width: int # w r // Texture width
  9898. # int Height; /* original C++ signature */
  9899. height: int # w r // Texture height
  9900. # int BytesPerPixel; /* original C++ signature */
  9901. bytes_per_pixel: int # w r // 4 or 1
  9902. # uchar* Pixels; /* original C++ signature */
  9903. pixels: (
  9904. uchar # w r // Pointer to buffer holding 'Width*Height' pixels and 'Width*Height*BytesPerPixels' bytes.
  9905. )
  9906. # ImTextureRect UsedRect; /* original C++ signature */
  9907. used_rect: ImTextureRect # w r // Bounding box encompassing all past and queued Updates[].
  9908. # ImTextureRect UpdateRect; /* original C++ signature */
  9909. update_rect: ImTextureRect # w r // Bounding box encompassing all queued Updates[].
  9910. # ImVector<ImTextureRect> Updates; /* original C++ signature */
  9911. updates: ImVector_ImTextureRect # w r // Array of individual updates.
  9912. # int UnusedFrames; /* original C++ signature */
  9913. unused_frames: int # w r // In order to facilitate handling Status==WantDestroy in some backend: this is a count successive frames where the texture was not used. Always >0 when Status==WantDestroy.
  9914. # unsigned short RefCount; /* original C++ signature */
  9915. ref_count: int # w r // Number of contexts using this texture. Used during backend shutdown.
  9916. # bool UseColors; /* original C++ signature */
  9917. use_colors: (
  9918. bool # w r // Tell whether our texture data is known to use colors (rather than just white + alpha).
  9919. )
  9920. # bool WantDestroyNextFrame; /* original C++ signature */
  9921. want_destroy_next_frame: bool # rw - // [Internal] Queued to set ImTextureStatus_WantDestroy next frame. May still be used in the current frame.
  9922. # ImTextureData() { memset((void*)this, 0, sizeof(*this)); Status = ImTextureStatus_Destroyed; TexID = ImTextureID_Invalid; } /* original C++ signature */
  9923. def __init__(self) -> None:
  9924. """Functions
  9925. - If GetPixels() functions asserts while being called by your render loop, it could be caused by calling ImFontAtlas::Clear() instead of ClearFonts()?
  9926. """
  9927. pass
  9928. # IMGUI_API void Create(ImTextureFormat format, int w, int h); /* original C++ signature */
  9929. def create(self, format: ImTextureFormat, w: int, h: int) -> None:
  9930. pass
  9931. # IMGUI_API void DestroyPixels(); /* original C++ signature */
  9932. def destroy_pixels(self) -> None:
  9933. pass
  9934. # #ifdef IMGUI_BUNDLE_PYTHON_API
  9935. #
  9936. # ImGuiNpBuffer GetPixelsArray() { return ImGuiNpBuffer{Pixels, Width * Height * BytesPerPixel}; } /* original C++ signature */
  9937. def get_pixels_array(self) -> NpBuffer:
  9938. """GetPixelsArray(): returns the pixel data as a NumPy array.
  9939. Note: GetPixelsAt(x, y) is not implemented for Python, but you can use the offset below:
  9940. offset = (y * tex.width + x) * tex.bytes_per_pixel
  9941. (private API)
  9942. """
  9943. pass
  9944. # #endif
  9945. #
  9946. # int GetSizeInBytes() const { return Width * Height * BytesPerPixel; } /* original C++ signature */
  9947. def get_size_in_bytes(self) -> int:
  9948. """(private API)"""
  9949. pass
  9950. # int GetPitch() const { return Width * BytesPerPixel; } /* original C++ signature */
  9951. def get_pitch(self) -> int:
  9952. """(private API)"""
  9953. pass
  9954. # ImTextureRef GetTexRef() { ImTextureRef tex_ref; tex_ref._TexData = this; tex_ref._TexID = ImTextureID_Invalid; return tex_ref; } /* original C++ signature */
  9955. def get_tex_ref(self) -> ImTextureRef:
  9956. """(private API)"""
  9957. pass
  9958. # ImTextureID GetTexID() const { return TexID; } /* original C++ signature */
  9959. def get_tex_id(self) -> ImTextureID:
  9960. """(private API)"""
  9961. pass
  9962. # Called by Renderer backend
  9963. # - Call SetTexID() and SetStatus() after honoring texture requests. Never modify TexID and Status directly!
  9964. # - A backend may decide to destroy a texture that we did not request to destroy, which is fine (e.g. freeing resources), but we immediately set the texture back in _WantCreate mode.
  9965. # void SetTexID(ImTextureID tex_id) { TexID = tex_id; } /* original C++ signature */
  9966. def set_tex_id(self, tex_id: ImTextureID) -> None:
  9967. """(private API)"""
  9968. pass
  9969. # void SetStatus(ImTextureStatus status) { Status = status; if (status == ImTextureStatus_Destroyed && !WantDestroyNextFrame && Pixels != nullptr) Status = ImTextureStatus_WantCreate; } /* original C++ signature */
  9970. def set_status(self, status: ImTextureStatus) -> None:
  9971. """(private API)"""
  9972. pass
  9973. # -----------------------------------------------------------------------------
  9974. # [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontAtlasFlags, ImFontAtlas, ImFontGlyphRangesBuilder, ImFont)
  9975. # -----------------------------------------------------------------------------
  9976. class ImFontConfig:
  9977. """A font input/source (we may rename this to ImFontSource in the future)"""
  9978. # Data Source
  9979. # void* FontData; /* original C++ signature */
  9980. font_data: Any # // TTF/OTF data
  9981. # int FontDataSize; /* original C++ signature */
  9982. font_data_size: int # // TTF/OTF data size
  9983. # bool FontDataOwnedByAtlas; /* original C++ signature */
  9984. font_data_owned_by_atlas: bool # True // TTF/OTF data ownership taken by the owner ImFontAtlas (will delete memory itself). SINCE 1.92, THE DATA NEEDS TO PERSIST FOR WHOLE DURATION OF ATLAS.
  9985. # Options
  9986. # bool MergeMode; /* original C++ signature */
  9987. merge_mode: bool # False // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
  9988. # bool PixelSnapH; /* original C++ signature */
  9989. pixel_snap_h: bool # False // Align every glyph AdvanceX to pixel boundaries. Prevents fractional font size from working correctly! Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, OversampleH/V will default to 1.
  9990. # ImS8 OversampleH; /* original C++ signature */
  9991. oversample_h: ImS8 # 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
  9992. # ImS8 OversampleV; /* original C++ signature */
  9993. oversample_v: ImS8 # 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really useful as we don't use sub-pixel positions on the Y axis.
  9994. # ImWchar EllipsisChar; /* original C++ signature */
  9995. ellipsis_char: ImWchar # 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
  9996. # float SizePixels; /* original C++ signature */
  9997. size_pixels: (
  9998. float # // Output size in pixels for rasterizer (more or less maps to the resulting font height).
  9999. )
  10000. # ImVec2 GlyphExtraSpacing; // 0, 0 // (REMOVED AT IT SEEMS LARGELY OBSOLETE. PLEASE REPORT IF YOU WERE USING THIS). Extra spacing (in pixels) between glyphs when rendered: essentially add to glyph->AdvanceX. Only X axis is supported for now.
  10001. # ImVec2 GlyphOffset; /* original C++ signature */
  10002. glyph_offset: ImVec2 # 0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other sizes will scale this value.
  10003. # float GlyphMinAdvanceX; /* original C++ signature */
  10004. glyph_min_advance_x: float # 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font. Absolute value for default size, other sizes will scale this value.
  10005. # float GlyphMaxAdvanceX; /* original C++ signature */
  10006. glyph_max_advance_x: float # FLT_MAX // Maximum AdvanceX for glyphs
  10007. # float GlyphExtraAdvanceX; /* original C++ signature */
  10008. glyph_extra_advance_x: float # 0 // Extra spacing (in pixels) between glyphs. Please contact us if you are using this. // FIXME-NEWATLAS: Intentionally unscaled
  10009. # ImU32 FontNo; /* original C++ signature */
  10010. font_no: ImU32 # 0 // Index of font within TTF/OTF file
  10011. # unsigned int FontLoaderFlags; /* original C++ signature */
  10012. font_loader_flags: int # 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.
  10013. # unsigned int FontBuilderFlags; // -- // [Renamed in 1.92] Use FontLoaderFlags.
  10014. # float RasterizerMultiply; /* original C++ signature */
  10015. rasterizer_multiply: float # 1.0 // Linearly brighten (>1.0) or darken (<1.0) font output. Brightening small fonts may be a good workaround to make them more readable. This is a silly thing we may remove in the future.
  10016. # float RasterizerDensity; /* original C++ signature */
  10017. rasterizer_density: float # 1.0 // [LEGACY: this only makes sense when ImGuiBackendFlags_RendererHasTextures is not supported] DPI scale multiplier for rasterization. Not altering other font metrics: makes it easy to swap between e.g. a 100% and a 400% fonts for a zooming display, or handle Retina screen. IMPORTANT: If you change this it is expected that you increase/decrease font scale roughly to the inverse of this, otherwise quality may look lowered.
  10018. # float ExtraSizeScale; /* original C++ signature */
  10019. extra_size_scale: float # 1.0 // Extra rasterizer scale over SizePixels.
  10020. # [Internal]
  10021. # ImFontFlags Flags; /* original C++ signature */
  10022. flags: ImFontFlags # Font flags (don't use just yet, will be exposed in upcoming 1.92.X updates)
  10023. # ImFont* DstFont; /* original C++ signature */
  10024. dst_font: ImFont # Target font (as we merging fonts, multiple ImFontConfig may target the same font)
  10025. # void* FontLoaderData; /* original C++ signature */
  10026. font_loader_data: Any # Font loader opaque storage (per font config)
  10027. # IMGUI_API ImFontConfig(); /* original C++ signature */
  10028. def __init__(self) -> None:
  10029. pass
  10030. class ImFontGlyph:
  10031. """Hold rendering data for one glyph.
  10032. (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this)
  10033. """
  10034. # float AdvanceX; /* original C++ signature */
  10035. advance_x: float # Horizontal distance to advance cursor/layout position.
  10036. # float X0, /* original C++ signature */
  10037. x0: float # Glyph corners. Offsets from current cursor/layout position.
  10038. # Y0, /* original C++ signature */
  10039. y0: float # Glyph corners. Offsets from current cursor/layout position.
  10040. # X1, /* original C++ signature */
  10041. x1: float # Glyph corners. Offsets from current cursor/layout position.
  10042. # Y1; /* original C++ signature */
  10043. y1: float # Glyph corners. Offsets from current cursor/layout position.
  10044. # float U0, /* original C++ signature */
  10045. u0: float # Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling GetCustomRect() with PackId.
  10046. # V0, /* original C++ signature */
  10047. v0: float # Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling GetCustomRect() with PackId.
  10048. # U1, /* original C++ signature */
  10049. u1: float # Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling GetCustomRect() with PackId.
  10050. # V1; /* original C++ signature */
  10051. v1: float # Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling GetCustomRect() with PackId.
  10052. # int PackId; /* original C++ signature */
  10053. pack_id: int # [Internal] ImFontAtlasRectId value (FIXME: Cold data, could be moved elsewhere?)
  10054. # ImFontGlyph() { memset((void*)this, 0, sizeof(*this)); PackId = -1; } /* original C++ signature */
  10055. def __init__(self) -> None:
  10056. pass
  10057. # #ifdef IMGUI_BUNDLE_PYTHON_API
  10058. #
  10059. # [ADAPT_IMGUI_BUNDLE]
  10060. # bool isColored() const { return Colored != 0; } /* original C++ signature */
  10061. def is_colored(self) -> bool:
  10062. """(private API)"""
  10063. pass
  10064. # bool isVisible() const { return Visible != 0; } /* original C++ signature */
  10065. def is_visible(self) -> bool:
  10066. """(private API)"""
  10067. pass
  10068. # unsigned int getCodepoint() const { return Codepoint; } /* original C++ signature */
  10069. def get_codepoint(self) -> int:
  10070. """(private API)"""
  10071. pass
  10072. # [/ADAPT_IMGUI_BUNDLE]
  10073. # #endif
  10074. class ImFontGlyphRangesBuilder:
  10075. """Helper to build glyph ranges from text/string data. Feed your application strings/characters to it then call BuildRanges().
  10076. This is essentially a tightly packed of vector of 64k booleans = 8KB storage.
  10077. """
  10078. # ImVector<ImU32> UsedChars; /* original C++ signature */
  10079. used_chars: ImVector_ImU32 # Store 1-bit per Unicode code point (0=unused, 1=used)
  10080. # ImFontGlyphRangesBuilder() { Clear(); } /* original C++ signature */
  10081. def __init__(self) -> None:
  10082. pass
  10083. # inline void Clear() { int size_in_bytes = (IM_UNICODE_CODEPOINT_MAX + 1) / 8; UsedChars.resize(size_in_bytes / (int)sizeof(ImU32)); memset(UsedChars.Data, 0, (size_t)size_in_bytes); } /* original C++ signature */
  10084. def clear(self) -> None:
  10085. """(private API)"""
  10086. pass
  10087. # inline bool GetBit(size_t n) const { int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); return (UsedChars[off] & mask) != 0; } /* original C++ signature */
  10088. def get_bit(self, n: int) -> bool:
  10089. """(private API)
  10090. Get bit n in the array
  10091. """
  10092. pass
  10093. # inline void SetBit(size_t n) { int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; } /* original C++ signature */
  10094. def set_bit(self, n: int) -> None:
  10095. """(private API)
  10096. Set bit n in the array
  10097. """
  10098. pass
  10099. # inline void AddChar(ImWchar c) { SetBit(c); } /* original C++ signature */
  10100. def add_char(self, c: ImWchar) -> None:
  10101. """(private API)
  10102. Add character
  10103. """
  10104. pass
  10105. # IMGUI_API void AddText(const char* text, const char* text_end = NULL); /* original C++ signature */
  10106. def add_text(self, text: str, text_end: Optional[str] = None) -> None:
  10107. """Add string (each character of the UTF-8 string are added)"""
  10108. pass
  10109. # IMGUI_API void BuildRanges(ImVector<ImWchar>* out_ranges); /* original C++ signature */
  10110. def build_ranges(self, out_ranges: ImVector_ImWchar) -> None:
  10111. """Output new ranges"""
  10112. pass
  10113. class ImFontAtlasRect:
  10114. """Output of ImFontAtlas::GetCustomRect() when using custom rectangles.
  10115. Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef
  10116. (this is in theory derived from ImTextureRect but we use separate structures for reasons)
  10117. """
  10118. # unsigned short x, /* original C++ signature */
  10119. x: int # Position (in current texture)
  10120. # y; /* original C++ signature */
  10121. y: int # Position (in current texture)
  10122. # unsigned short w, /* original C++ signature */
  10123. w: int # Size
  10124. # h; /* original C++ signature */
  10125. h: int # Size
  10126. # ImVec2 uv0, /* original C++ signature */
  10127. uv0: ImVec2 # UV coordinates (in current texture)
  10128. # uv1; /* original C++ signature */
  10129. uv1: ImVec2 # UV coordinates (in current texture)
  10130. # ImFontAtlasRect() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  10131. def __init__(self) -> None:
  10132. pass
  10133. class ImFontAtlasFlags_(enum.IntFlag):
  10134. """Flags for ImFontAtlas build"""
  10135. # ImFontAtlasFlags_None = 0, /* original C++ signature */
  10136. none = enum.auto() # (= 0)
  10137. # ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0, /* original C++ signature */
  10138. no_power_of_two_height = enum.auto() # (= 1 << 0) # Don't round the height to next power of two
  10139. # ImFontAtlasFlags_NoMouseCursors = 1 << 1, /* original C++ signature */
  10140. no_mouse_cursors = (
  10141. enum.auto()
  10142. ) # (= 1 << 1) # Don't build software mouse cursors into the atlas (save a little texture memory)
  10143. # ImFontAtlasFlags_NoBakedLines = 1 << 2, /* original C++ signature */
  10144. no_baked_lines = (
  10145. enum.auto()
  10146. ) # (= 1 << 2) # Don't build thick line textures into the atlas (save a little texture memory, allow support for point/nearest filtering). The AntiAliasedLinesUseTex features uses them, otherwise they will be rendered using polygons (more expensive for CPU/GPU).
  10147. class ImFontAtlas:
  10148. """Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding:
  10149. - One or more fonts.
  10150. - Custom graphics data needed to render the shapes needed by Dear ImGui.
  10151. - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas).
  10152. - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you.
  10153. It is the rendering backend responsibility to upload texture into your graphics API:
  10154. - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance.
  10155. - Backend then set ImTextureData's TexID and BackendUserData.
  10156. - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details.
  10157. Legacy path:
  10158. - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data.
  10159. - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API.
  10160. Common pitfalls:
  10161. - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persists up until the
  10162. atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data.
  10163. - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction.
  10164. You can set font_cfg->FontDataOwnedByAtlas=False to keep ownership of your data and it won't be freed,
  10165. - Even though many functions are suffixed with "TTF", OTF data is supported just as well.
  10166. - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future!
  10167. """
  10168. # IMGUI_API ImFontAtlas(); /* original C++ signature */
  10169. def __init__(self) -> None:
  10170. pass
  10171. # IMGUI_API ImFont* AddFont(const ImFontConfig* font_cfg); /* original C++ signature */
  10172. def add_font(self, font_cfg: ImFontConfig) -> ImFont:
  10173. pass
  10174. # IMGUI_API ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL); /* original C++ signature */
  10175. def add_font_default(self, font_cfg: Optional[ImFontConfig] = None) -> ImFont:
  10176. """Selects between AddFontDefaultVector() and AddFontDefaultBitmap()."""
  10177. pass
  10178. # IMGUI_API ImFont* AddFontDefaultVector(const ImFontConfig* font_cfg = NULL); /* original C++ signature */
  10179. def add_font_default_vector(self, font_cfg: Optional[ImFontConfig] = None) -> ImFont:
  10180. """Embedded scalable font. Recommended at any higher size."""
  10181. pass
  10182. # IMGUI_API ImFont* AddFontDefaultBitmap(const ImFontConfig* font_cfg = NULL); /* original C++ signature */
  10183. def add_font_default_bitmap(self, font_cfg: Optional[ImFontConfig] = None) -> ImFont:
  10184. """Embedded classic pixel-clean font. Recommended at Size 13px with no scaling."""
  10185. pass
  10186. # IMGUI_API void RemoveFont(ImFont* font); /* original C++ signature */
  10187. def remove_font(self, font: ImFont) -> None:
  10188. pass
  10189. # IMGUI_API void Clear(); /* original C++ signature */
  10190. def clear(self) -> None:
  10191. """Clear everything (fonts + textures). Don't call mid-frame!"""
  10192. pass
  10193. # IMGUI_API void ClearFonts(); /* original C++ signature */
  10194. def clear_fonts(self) -> None:
  10195. """Clear input+output font data/glyphs. You can call this mid-frame if you load new fonts afterwards!"""
  10196. pass
  10197. # IMGUI_API void CompactCache(); /* original C++ signature */
  10198. def compact_cache(self) -> None:
  10199. """Compact cached glyphs and texture."""
  10200. pass
  10201. # IMGUI_API void SetFontLoader(const ImFontLoader* font_loader); /* original C++ signature */
  10202. def set_font_loader(self, font_loader: ImFontLoader) -> None:
  10203. """Change font loader at runtime."""
  10204. pass
  10205. # As we are transitioning toward a new font system, we expect to obsolete those soon:
  10206. # IMGUI_API void ClearInputData(); /* original C++ signature */
  10207. def clear_input_data(self) -> None:
  10208. """[OBSOLETE] Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts."""
  10209. pass
  10210. # IMGUI_API void ClearTexData(); /* original C++ signature */
  10211. def clear_tex_data(self) -> None:
  10212. """[OBSOLETE] Clear CPU-side copy of the texture data. Saves RAM once the texture has been copied to graphics memory."""
  10213. pass
  10214. # -------------------------------------------
  10215. # Glyph Ranges
  10216. # -------------------------------------------
  10217. # Since 1.92: specifying glyph ranges is only useful/necessary if your backend doesn't support ImGuiBackendFlags_RendererHasTextures!
  10218. # -------------------------------------------
  10219. # [ADAPT_IMGUI_BUNDLE]
  10220. # -------------------------------------------
  10221. # #ifdef IMGUI_BUNDLE_PYTHON_API
  10222. #
  10223. # IMGUI_API ImFont* _AddFontFromFileTTF( /* original C++ signature */
  10224. # const char* filename,
  10225. # float size_pixels,
  10226. # const ImFontConfig* font_cfg = NULL);
  10227. def add_font_from_file_ttf(
  10228. self, filename: str, size_pixels: float, font_cfg: Optional[ImFontConfig] = None
  10229. ) -> ImFont:
  10230. pass
  10231. # #endif
  10232. #
  10233. # [/ADAPT_IMGUI_BUNDLE]
  10234. # -------------------------------------------
  10235. # [ALPHA] Custom Rectangles/Glyphs API
  10236. # -------------------------------------------
  10237. # Register and retrieve custom rectangles
  10238. # - You can request arbitrary rectangles to be packed into the atlas, for your own purpose.
  10239. # - Since 1.92.0, packing is done immediately in the function call (previously packing was done during the Build call)
  10240. # - You can render your pixels into the texture right after calling the AddCustomRect() functions.
  10241. # - VERY IMPORTANT:
  10242. # - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions.
  10243. # - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect().
  10244. # - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time.
  10245. # - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = True' as this may help some backends decide of preferred texture format.
  10246. # - Read docs/FONTS.md for more details about using colorful icons.
  10247. # - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings.
  10248. # - (Pre-1.92 names) ------------> (1.92 names)
  10249. # - GetCustomRectByIndex() --> Use GetCustomRect()
  10250. # - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields.
  10251. # - AddCustomRectRegular() --> Renamed to AddCustomRect()
  10252. # - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig
  10253. # - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect
  10254. # IMGUI_API ImFontAtlasRectId AddCustomRect(int width, int height, ImFontAtlasRect* out_r = NULL); /* original C++ signature */
  10255. def add_custom_rect(self, width: int, height: int, out_r: Optional[ImFontAtlasRect] = None) -> ImFontAtlasRectId:
  10256. """Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error."""
  10257. pass
  10258. # IMGUI_API void RemoveCustomRect(ImFontAtlasRectId id); /* original C++ signature */
  10259. def remove_custom_rect(self, id_: ImFontAtlasRectId) -> None:
  10260. """Unregister a rectangle. Existing pixels will stay in texture until resized / garbage collected."""
  10261. pass
  10262. # IMGUI_API bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const; /* original C++ signature */
  10263. def get_custom_rect(self, id_: ImFontAtlasRectId, out_r: ImFontAtlasRect) -> bool:
  10264. """Get rectangle coordinates for current texture. Valid immediately, never store this (read above)!"""
  10265. pass
  10266. # -------------------------------------------
  10267. # Members
  10268. # -------------------------------------------
  10269. # Input
  10270. # ImFontAtlasFlags Flags; /* original C++ signature */
  10271. flags: ImFontAtlasFlags # Build flags (see ImFontAtlasFlags_)
  10272. # ImTextureFormat TexDesiredFormat; /* original C++ signature */
  10273. tex_desired_format: ImTextureFormat # Desired texture format (default to ImTextureFormat_RGBA32 but may be changed to ImTextureFormat_Alpha8).
  10274. # int TexGlyphPadding; /* original C++ signature */
  10275. tex_glyph_padding: int # FIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = False).
  10276. # int TexMinWidth; /* original C++ signature */
  10277. tex_min_width: int # Minimum desired texture width. Must be a power of two. Default to 512.
  10278. # int TexMinHeight; /* original C++ signature */
  10279. tex_min_height: int # Minimum desired texture height. Must be a power of two. Default to 128.
  10280. # int TexMaxWidth; /* original C++ signature */
  10281. tex_max_width: int # Maximum desired texture width. Must be a power of two. Default to 8192.
  10282. # int TexMaxHeight; /* original C++ signature */
  10283. tex_max_height: int # Maximum desired texture height. Must be a power of two. Default to 8192.
  10284. # void* UserData; /* original C++ signature */
  10285. user_data: Any # Store your own atlas related user-data (if e.g. you have multiple font atlas).
  10286. # Output
  10287. # - Because textures are dynamically created/resized, the current texture identifier may changed at *ANY TIME* during the frame.
  10288. # - This should not affect you as you can always use the latest value. But note that any precomputed UV coordinates are only valid for the current TexRef.
  10289. # ImTextureData* TexData; /* original C++ signature */
  10290. tex_data: ImTextureData # Latest texture.
  10291. # #ifdef IMGUI_BUNDLE_PYTHON_API
  10292. #
  10293. # Convenience methods for python in order to get/set the font texture Id
  10294. # (because currently TexID is in a union and we can't access it directly)
  10295. # Note: this uses the old way of setting the fonts texture.
  10296. # Newer backends should implement ImGuiBackendFlags_RendererHasTextures
  10297. # and be able to handle Texture updates
  10298. # See https://github.com/ocornut/imgui/issues/8465
  10299. # For inspiration, look at
  10300. # def _update_texture(self, tex: imgui.ImTextureData):
  10301. # inside ImGui Bundle (bindings/imgui_bundle/python_backends/opengl_xxx_backend.py)
  10302. # void Python_SetTextureID(ImTextureID id) { TexRef = ImTextureRef(id); } /* original C++ signature */
  10303. def python_set_texture_id(self, id_: ImTextureID) -> None:
  10304. """(private API)"""
  10305. pass
  10306. # ImTextureID Python_GetTextureID() { return TexRef.GetTexID(); } /* original C++ signature */
  10307. def python_get_texture_id(self) -> ImTextureID:
  10308. """(private API)"""
  10309. pass
  10310. # #endif
  10311. #
  10312. # [Internal]
  10313. # ImVector<ImTextureData*> TexList; /* original C++ signature */
  10314. tex_list: ImVector_ImTextureData_ptr # Texture list (most often TexList.Size == 1). TexData is always == TexList.back(). DO NOT USE DIRECTLY, USE GetDrawData().Textures[]/GetPlatformIO().Textures[] instead!
  10315. # bool Locked; /* original C++ signature */
  10316. locked: bool # Marked as locked during ImGui::NewFrame()..EndFrame() scope if TexUpdates are not supported. Any attempt to modify the atlas will assert.
  10317. # bool RendererHasTextures; /* original C++ signature */
  10318. renderer_has_textures: (
  10319. bool # Copy of (BackendFlags & ImGuiBackendFlags_RendererHasTextures) from supporting context.
  10320. )
  10321. # bool TexIsBuilt; /* original C++ signature */
  10322. tex_is_built: (
  10323. bool # Set when texture was built matching current font input. Mostly useful for legacy IsBuilt() call.
  10324. )
  10325. # bool TexPixelsUseColors; /* original C++ signature */
  10326. tex_pixels_use_colors: bool # Tell whether our texture data is known to use colors (rather than just alpha channel), in order to help backend select a format or conversion process.
  10327. # ImVec2 TexUvScale; /* original C++ signature */
  10328. tex_uv_scale: ImVec2 # = (1.0/TexData->TexWidth, 1.0/TexData->TexHeight). May change as new texture gets created.
  10329. # ImVec2 TexUvWhitePixel; /* original C++ signature */
  10330. tex_uv_white_pixel: ImVec2 # Texture coordinates to a white pixel. May change as new texture gets created.
  10331. # ImVector<ImFont*> Fonts; /* original C++ signature */
  10332. fonts: ImVector_ImFont_ptr # Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
  10333. # ImVector<ImFontConfig> Sources; /* original C++ signature */
  10334. sources: ImVector_ImFontConfig # Source/configuration data
  10335. # int TexNextUniqueID; /* original C++ signature */
  10336. tex_next_unique_id: int # Next value to be stored in TexData->UniqueID
  10337. # int FontNextUniqueID; /* original C++ signature */
  10338. font_next_unique_id: int # Next value to be stored in ImFont->FontID
  10339. # const char* FontLoaderName; /* original C++ signature */
  10340. font_loader_name: str # Font loader name (for display e.g. in About box) == FontLoader->Name # (const)
  10341. # void* FontLoaderData; /* original C++ signature */
  10342. font_loader_data: Any # Font backend opaque storage
  10343. # unsigned int FontLoaderFlags; /* original C++ signature */
  10344. font_loader_flags: int # Shared flags (for all fonts) for font loader. THIS IS BUILD IMPLEMENTATION DEPENDENT (e.g. Per-font override is also available in ImFontConfig).
  10345. # int RefCount; /* original C++ signature */
  10346. ref_count: int # Number of contexts using this atlas
  10347. # ImGuiContext* OwnerContext; /* original C++ signature */
  10348. owner_context: Context # Context which own the atlas will be in charge of updating and destroying it.
  10349. # [Obsolete]
  10350. # unsigned int FontBuilderFlags; // OBSOLETED in 1.92.0: Renamed to FontLoaderFlags.
  10351. # int TexDesiredWidth; // OBSOLETED in 1.92.0: Force texture width before calling Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
  10352. # typedef ImFontAtlasRect ImFontAtlasCustomRect; // OBSOLETED in 1.92.0
  10353. # typedef ImFontAtlasCustomRect CustomRect; // OBSOLETED in 1.72+
  10354. # typedef ImFontGlyphRangesBuilder GlyphRangesBuilder; // OBSOLETED in 1.67+
  10355. class ImFontBaked:
  10356. """Font runtime data for a given size
  10357. Important: pointers to ImFontBaked are only valid for the current frame.
  10358. """
  10359. # [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
  10360. # ImVector<float> IndexAdvanceX; /* original C++ signature */
  10361. index_advance_x: ImVector_float # 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI).
  10362. # float FallbackAdvanceX; /* original C++ signature */
  10363. fallback_advance_x: float # 4 // out // FindGlyph(FallbackChar)->AdvanceX
  10364. # float Size; /* original C++ signature */
  10365. size: float # 4 // in // Height of characters/line, set during loading (doesn't change after loading)
  10366. # float RasterizerDensity; /* original C++ signature */
  10367. rasterizer_density: float # 4 // in // Density this is baked at
  10368. # [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
  10369. # ImVector<ImU16> IndexLookup; /* original C++ signature */
  10370. index_lookup: ImVector_ImU16 # 12-16 // out // Sparse. Index glyphs by Unicode code-point.
  10371. # ImVector<ImFontGlyph> Glyphs; /* original C++ signature */
  10372. glyphs: ImVector_ImFontGlyph # 12-16 // out // All glyphs.
  10373. # int FallbackGlyphIndex; /* original C++ signature */
  10374. fallback_glyph_index: int # 4 // out // Index of FontFallbackChar
  10375. # [Internal] Members: Cold
  10376. # float Ascent, /* original C++ signature */
  10377. ascent: float # 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
  10378. # Descent; /* original C++ signature */
  10379. descent: float # 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
  10380. # int LastUsedFrame; /* original C++ signature */
  10381. last_used_frame: int # 4 // // Record of that time this was bounds
  10382. # ImGuiID BakedId; /* original C++ signature */
  10383. baked_id: ID # 4 // // Unique ID for this baked storage
  10384. # ImFont* OwnerFont; /* original C++ signature */
  10385. owner_font: ImFont # 4-8 // in // Parent font
  10386. # void* FontLoaderDatas; /* original C++ signature */
  10387. font_loader_datas: Any # 4-8 // // Font loader opaque storage (per baked font * sources): single contiguous buffer allocated by imgui, passed to loader.
  10388. # Functions
  10389. # IMGUI_API ImFontBaked(); /* original C++ signature */
  10390. def __init__(self) -> None:
  10391. pass
  10392. # IMGUI_API void ClearOutputData(); /* original C++ signature */
  10393. def clear_output_data(self) -> None:
  10394. pass
  10395. # IMGUI_API ImFontGlyph* FindGlyph(ImWchar c); /* original C++ signature */
  10396. def find_glyph(self, c: ImWchar) -> ImFontGlyph:
  10397. """Return U+FFFD glyph if requested glyph doesn't exists."""
  10398. pass
  10399. # IMGUI_API ImFontGlyph* FindGlyphNoFallback(ImWchar c); /* original C++ signature */
  10400. def find_glyph_no_fallback(self, c: ImWchar) -> ImFontGlyph:
  10401. """Return None if glyph doesn't exist"""
  10402. pass
  10403. # IMGUI_API float GetCharAdvance(ImWchar c); /* original C++ signature */
  10404. def get_char_advance(self, c: ImWchar) -> float:
  10405. pass
  10406. # IMGUI_API bool IsGlyphLoaded(ImWchar c); /* original C++ signature */
  10407. def is_glyph_loaded(self, c: ImWchar) -> bool:
  10408. pass
  10409. class ImFontFlags_(enum.IntFlag):
  10410. """Font flags
  10411. (in future versions as we redesign font loading API, this will become more important and better documented. for now please consider this as internal/advanced use)
  10412. """
  10413. # ImFontFlags_None = 0, /* original C++ signature */
  10414. none = enum.auto() # (= 0)
  10415. # ImFontFlags_NoLoadError = 1 << 1, /* original C++ signature */
  10416. no_load_error = (
  10417. enum.auto()
  10418. ) # (= 1 << 1) # Disable throwing an error/assert when calling AddFontXXX() with missing file/data. Calling code is expected to check AddFontXXX() return value.
  10419. # ImFontFlags_NoLoadGlyphs = 1 << 2, /* original C++ signature */
  10420. no_load_glyphs = enum.auto() # (= 1 << 2) # [Internal] Disable loading new glyphs.
  10421. # ImFontFlags_LockBakedSizes = 1 << 3, /* original C++ signature */
  10422. lock_baked_sizes = (
  10423. enum.auto()
  10424. ) # (= 1 << 3) # [Internal] Disable loading new baked sizes, disable garbage collecting current ones. e.g. if you want to lock a font to a single size. Important: if you use this to preload given sizes, consider the possibility of multiple font density used on Retina display.
  10425. # ImFontFlags_ImplicitRefSize = 1 << 4, /* original C++ signature */
  10426. implicit_ref_size = enum.auto() # (= 1 << 4) # [Internal] Reference size was not set explicitly.
  10427. class ImFont:
  10428. """Font runtime data and rendering
  10429. - ImFontAtlas automatically loads a default embedded font for you if you didn't load one manually.
  10430. - Since 1.92.0 a font may be rendered as any size! Therefore a font doesn't have one specific size.
  10431. - Use 'font->GetFontBaked(size)' to retrieve the ImFontBaked* corresponding to a given size.
  10432. - If you used g.Font + g.FontSize (which is frequent from the ImGui layer), you can use g.FontBaked as a shortcut, as g.FontBaked == g.Font->GetFontBaked(g.FontSize).
  10433. """
  10434. # [Internal] Members: Hot ~12-20 bytes
  10435. # ImFontBaked* LastBaked; /* original C++ signature */
  10436. last_baked: ImFontBaked # 4-8 // Cache last bound baked. NEVER USE DIRECTLY. Use GetFontBaked().
  10437. # ImFontAtlas* OwnerAtlas; /* original C++ signature */
  10438. owner_atlas: ImFontAtlas # 4-8 // What we have been loaded into.
  10439. # ImFontFlags Flags; /* original C++ signature */
  10440. flags: ImFontFlags # 4 // Font flags.
  10441. # float CurrentRasterizerDensity; /* original C++ signature */
  10442. current_rasterizer_density: float # Current rasterizer density. This is a varying state of the font.
  10443. # [Internal] Members: Cold ~24-52 bytes
  10444. # Conceptually Sources[] is the list of font sources merged to create this font.
  10445. # ImGuiID FontId; /* original C++ signature */
  10446. font_id: ID # Unique identifier for the font
  10447. # float LegacySize; /* original C++ signature */
  10448. legacy_size: float # 4 // in // Font size passed to AddFont(). Use for old code calling PushFont() expecting to use that size. (use ImGui::GetFontBaked() to get font baked at current bound size).
  10449. # ImVector<ImFontConfig*> Sources; /* original C++ signature */
  10450. sources: ImVector_ImFontConfig_ptr # 16 // in // List of sources. Pointers within OwnerAtlas->Sources[]
  10451. # ImWchar EllipsisChar; /* original C++ signature */
  10452. ellipsis_char: ImWchar # 2-4 // out // Character used for ellipsis rendering ('...'). If you ever want to temporarily swap this for an alternative/dummy char, make sure to clear EllipsisAutoBake.
  10453. # ImWchar FallbackChar; /* original C++ signature */
  10454. fallback_char: ImWchar # 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?')
  10455. # bool EllipsisAutoBake; /* original C++ signature */
  10456. ellipsis_auto_bake: bool # 1 // // Mark when the "..." glyph (== EllipsisChar) needs to be generated by combining multiple '.'.
  10457. # ImGuiStorage RemapPairs; /* original C++ signature */
  10458. remap_pairs: Storage # 16 // // Remapping pairs when using AddRemapChar(), otherwise empty.
  10459. # IMGUI_API ImFont(); /* original C++ signature */
  10460. def __init__(self) -> None:
  10461. """Methods"""
  10462. pass
  10463. # IMGUI_API bool IsGlyphInFont(ImWchar c); /* original C++ signature */
  10464. def is_glyph_in_font(self, c: ImWchar) -> bool:
  10465. pass
  10466. # bool IsLoaded() const { return OwnerAtlas != NULL; } /* original C++ signature */
  10467. def is_loaded(self) -> bool:
  10468. """(private API)"""
  10469. pass
  10470. # const char* GetDebugName() const { return Sources.Size ? Sources[0]->Name : "<unknown>"; } /* original C++ signature */
  10471. def get_debug_name(self) -> str:
  10472. """(private API)
  10473. Fill ImFontConfig::Name.
  10474. """
  10475. pass
  10476. # [Internal] Don't use!
  10477. # 'max_width' stops rendering after a certain width (could be turned into a 2 size). FLT_MAX to disable.
  10478. # 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0 to disable.
  10479. # IMGUI_API ImFontBaked* GetFontBaked(float font_size, float density = -1.0f); /* original C++ signature */
  10480. def get_font_baked(self, font_size: float, density: float = -1.0) -> ImFontBaked:
  10481. """Get or create baked data for given size"""
  10482. pass
  10483. # #ifdef IMGUI_BUNDLE_PYTHON_API
  10484. #
  10485. # IMGUI_API int CalcWordWrapPositionPython(float size, const char* text, float wrap_width); /* original C++ signature */
  10486. def calc_word_wrap_position_python(self, size: float, text: str, wrap_width: float) -> int:
  10487. """Python API for CalcWordWrapPosition (will return an index in the text, not a pointer)"""
  10488. pass
  10489. # #endif
  10490. #
  10491. # IMGUI_API void RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, ImWchar c, const ImVec4* cpu_fine_clip = NULL); /* original C++ signature */
  10492. def render_char(
  10493. self,
  10494. draw_list: ImDrawList,
  10495. size: float,
  10496. pos: ImVec2Like,
  10497. col: ImU32,
  10498. c: ImWchar,
  10499. cpu_fine_clip: Optional[ImVec4Like] = None,
  10500. ) -> None:
  10501. pass
  10502. # IMGUI_API void RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, ImDrawTextFlags flags = 0); /* original C++ signature */
  10503. def render_text(
  10504. self,
  10505. draw_list: ImDrawList,
  10506. size: float,
  10507. pos: ImVec2Like,
  10508. col: ImU32,
  10509. clip_rect: ImVec4Like,
  10510. text_begin: str,
  10511. text_end: str,
  10512. wrap_width: float = 0.0,
  10513. flags: ImDrawTextFlags = 0,
  10514. ) -> None:
  10515. pass
  10516. # [Internal] Don't use!
  10517. # IMGUI_API void ClearOutputData(); /* original C++ signature */
  10518. def clear_output_data(self) -> None:
  10519. pass
  10520. # IMGUI_API void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint); /* original C++ signature */
  10521. def add_remap_char(self, from_codepoint: ImWchar, to_codepoint: ImWchar) -> None:
  10522. """Makes 'from_codepoint' character points to 'to_codepoint' glyph."""
  10523. pass
  10524. # IMGUI_API bool IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last); /* original C++ signature */
  10525. def is_glyph_range_unused(self, c_begin: int, c_last: int) -> bool:
  10526. pass
  10527. # -----------------------------------------------------------------------------
  10528. # [SECTION] Viewports
  10529. # -----------------------------------------------------------------------------
  10530. class ViewportFlags_(enum.IntFlag):
  10531. """Flags stored in ImGuiViewport::Flags, giving indications to the platform backends."""
  10532. # ImGuiViewportFlags_None = 0, /* original C++ signature */
  10533. none = enum.auto() # (= 0)
  10534. # ImGuiViewportFlags_IsPlatformWindow = 1 << 0, /* original C++ signature */
  10535. is_platform_window = enum.auto() # (= 1 << 0) # Represent a Platform Window
  10536. # ImGuiViewportFlags_IsPlatformMonitor = 1 << 1, /* original C++ signature */
  10537. is_platform_monitor = enum.auto() # (= 1 << 1) # Represent a Platform Monitor (unused yet)
  10538. # ImGuiViewportFlags_OwnedByApp = 1 << 2, /* original C++ signature */
  10539. owned_by_app = (
  10540. enum.auto()
  10541. ) # (= 1 << 2) # Platform Window: Is created/managed by the user application? (rather than our backend)
  10542. # ImGuiViewportFlags_NoDecoration = 1 << 3, /* original C++ signature */
  10543. no_decoration = (
  10544. enum.auto()
  10545. ) # (= 1 << 3) # Platform Window: Disable platform decorations: title bar, borders, etc. (generally set all windows, but if ImGuiConfigFlags_ViewportsDecoration is set we only set this on popups/tooltips)
  10546. # ImGuiViewportFlags_NoTaskBarIcon = 1 << 4, /* original C++ signature */
  10547. no_task_bar_icon = (
  10548. enum.auto()
  10549. ) # (= 1 << 4) # Platform Window: Disable platform task bar icon (generally set on popups/tooltips, or all windows if ImGuiConfigFlags_ViewportsNoTaskBarIcon is set)
  10550. # ImGuiViewportFlags_NoFocusOnAppearing = 1 << 5, /* original C++ signature */
  10551. no_focus_on_appearing = enum.auto() # (= 1 << 5) # Platform Window: Don't take focus when created.
  10552. # ImGuiViewportFlags_NoFocusOnClick = 1 << 6, /* original C++ signature */
  10553. no_focus_on_click = enum.auto() # (= 1 << 6) # Platform Window: Don't take focus when clicked on.
  10554. # ImGuiViewportFlags_NoInputs = 1 << 7, /* original C++ signature */
  10555. no_inputs = (
  10556. enum.auto()
  10557. ) # (= 1 << 7) # Platform Window: Make mouse pass through so we can drag this window while peaking behind it.
  10558. # ImGuiViewportFlags_NoRendererClear = 1 << 8, /* original C++ signature */
  10559. no_renderer_clear = (
  10560. enum.auto()
  10561. ) # (= 1 << 8) # Platform Window: Renderer doesn't need to clear the framebuffer ahead (because we will fill it entirely).
  10562. # ImGuiViewportFlags_NoAutoMerge = 1 << 9, /* original C++ signature */
  10563. no_auto_merge = (
  10564. enum.auto()
  10565. ) # (= 1 << 9) # Platform Window: Avoid merging this window into another host window. This can only be set via ImGuiWindowClass viewport flags override (because we need to now ahead if we are going to create a viewport in the first place!).
  10566. # ImGuiViewportFlags_TopMost = 1 << 10, /* original C++ signature */
  10567. top_most = enum.auto() # (= 1 << 10) # Platform Window: Display on top (for tooltips only).
  10568. # ImGuiViewportFlags_CanHostOtherWindows = 1 << 11, /* original C++ signature */
  10569. can_host_other_windows = (
  10570. enum.auto()
  10571. ) # (= 1 << 11) # Viewport can host multiple imgui windows (secondary viewports are associated to a single window). // FIXME: In practice there's still probably code making the assumption that this is always and only on the MainViewport. Will fix once we add support for "no main viewport".
  10572. # Output status flags (from Platform)
  10573. # ImGuiViewportFlags_IsMinimized = 1 << 12, /* original C++ signature */
  10574. is_minimized = (
  10575. enum.auto()
  10576. ) # (= 1 << 12) # Platform Window: Window is minimized, can skip render. When minimized we tend to avoid using the viewport pos/size for clipping window or testing if they are contained in the viewport.
  10577. # ImGuiViewportFlags_IsFocused = 1 << 13, /* original C++ signature */
  10578. is_focused = (
  10579. enum.auto()
  10580. ) # (= 1 << 13) # Platform Window: Window is focused (last call to Platform_GetWindowFocus() returned True)
  10581. class Viewport:
  10582. """- Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
  10583. - With multi-viewport enabled, we extend this concept to have multiple active viewports.
  10584. - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
  10585. - About Main Area vs Work Area:
  10586. - Main Area = entire viewport.
  10587. - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor).
  10588. - Windows are generally trying to stay within the Work Area of their host viewport.
  10589. """
  10590. # ImGuiID ID; /* original C++ signature */
  10591. id_: ID # Unique identifier for the viewport
  10592. # ImGuiViewportFlags Flags; /* original C++ signature */
  10593. flags: ViewportFlags # See ImGuiViewportFlags_
  10594. # ImVec2 Pos; /* original C++ signature */
  10595. pos: ImVec2 # Main Area: Position of the viewport (Dear ImGui coordinates are the same as OS desktop/native coordinates)
  10596. # ImVec2 Size; /* original C++ signature */
  10597. size: ImVec2 # Main Area: Size of the viewport.
  10598. # ImVec2 FramebufferScale; /* original C++ signature */
  10599. framebuffer_scale: ImVec2 # Density of the viewport for Retina display (always 1,1 on Windows, may be 2,2 etc on macOS/iOS). This will affect font rasterizer density.
  10600. # ImVec2 WorkPos; /* original C++ signature */
  10601. work_pos: ImVec2 # Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos)
  10602. # ImVec2 WorkSize; /* original C++ signature */
  10603. work_size: ImVec2 # Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)
  10604. # float DpiScale; /* original C++ signature */
  10605. dpi_scale: float # 1.0 = 96 DPI = No extra scale.
  10606. # ImGuiID ParentViewportId; /* original C++ signature */
  10607. parent_viewport_id: ID # (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between platform windows.
  10608. # ImGuiViewport* ParentViewport; /* original C++ signature */
  10609. parent_viewport: (
  10610. Viewport # (Advanced) Direct shortcut to ImGui::FindViewportByID(ParentViewportId). None: no parent.
  10611. )
  10612. # ImDrawData* DrawData; /* original C++ signature */
  10613. draw_data: ImDrawData # The ImDrawData corresponding to this viewport. Valid after Render() and until the next call to NewFrame().
  10614. # Platform/Backend Dependent Data
  10615. # Our design separate the Renderer and Platform backends to facilitate combining default backends with each others.
  10616. # When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled
  10617. # by the same system and you may not need to use all the UserData/Handle fields.
  10618. # The library never uses those fields, they are merely storage to facilitate backend implementation.
  10619. # void* RendererUserData; /* original C++ signature */
  10620. renderer_user_data: Any # None* to hold custom data structure for the renderer (e.g. swap chain, framebuffers etc.). generally set by your Renderer_CreateWindow function.
  10621. # void* PlatformUserData; /* original C++ signature */
  10622. platform_user_data: Any # None* to hold custom data structure for the OS / platform (e.g. windowing info, render context). generally set by your Platform_CreateWindow function.
  10623. # void* PlatformIconData; /* original C++ signature */
  10624. platform_icon_data: Any # None* to hold custom data structure for the OS / platform to specify an icon. Currently unused for exposed to allow experiments.
  10625. # void* PlatformHandle; /* original C++ signature */
  10626. platform_handle: Any # None* to hold higher-level, platform window handle (e.g. HWND for Win32 backend, Uint32 WindowID for SDL, GLFWWindow* for GLFW), for FindViewportByPlatformHandle().
  10627. # void* PlatformHandleRaw; /* original C++ signature */
  10628. platform_handle_raw: Any # None* to hold lower-level, platform-native window handle (always HWND on Win32 platform, unused for other platforms).
  10629. # bool PlatformWindowCreated; /* original C++ signature */
  10630. platform_window_created: bool # Platform window has been created (Platform_CreateWindow() has been called). This is False during the first frame where a viewport is being created.
  10631. # bool PlatformRequestMove; /* original C++ signature */
  10632. platform_request_move: bool # Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position)
  10633. # bool PlatformRequestResize; /* original C++ signature */
  10634. platform_request_resize: bool # Platform window requested resize (e.g. window was resized by the OS / host window manager, authoritative size will be OS window size)
  10635. # bool PlatformRequestClose; /* original C++ signature */
  10636. platform_request_close: bool # Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing ALT-F4)
  10637. # ImGuiViewport() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  10638. def __init__(self) -> None:
  10639. pass
  10640. # [/ADAPT_IMGUI_BUNDLE]
  10641. # Helpers
  10642. # ImVec2 GetCenter() const { return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); } /* original C++ signature */
  10643. def get_center(self) -> ImVec2:
  10644. """(private API)"""
  10645. pass
  10646. # ImVec2 GetWorkCenter() const { return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); } /* original C++ signature */
  10647. def get_work_center(self) -> ImVec2:
  10648. """(private API)"""
  10649. pass
  10650. # IMGUI_API const char* GetDebugName() const; /* original C++ signature */
  10651. def get_debug_name(self) -> str:
  10652. pass
  10653. # -----------------------------------------------------------------------------
  10654. # [SECTION] ImGuiPlatformIO + other Platform Dependent Interfaces (ImGuiPlatformMonitor, ImGuiPlatformImeData)
  10655. # -----------------------------------------------------------------------------
  10656. # [BETA] (Optional) Multi-Viewport Support!
  10657. # If you are new to Dear ImGui and trying to integrate it into your engine, you can probably ignore this for now.
  10658. #
  10659. # This feature allows you to seamlessly drag Dear ImGui windows outside of your application viewport.
  10660. # This is achieved by creating new Platform/OS windows on the fly, and rendering into them.
  10661. # Dear ImGui manages the viewport structures, and the backend create and maintain one Platform/OS window for each of those viewports.
  10662. #
  10663. # See Recap: https://github.com/ocornut/imgui/wiki/Multi-Viewports
  10664. # See Glossary https://github.com/ocornut/imgui/wiki/Glossary for details about some of the terminology.
  10665. #
  10666. # About the coordinates system:
  10667. # - When multi-viewports are enabled, all Dear ImGui coordinates become absolute coordinates (same as OS coordinates!)
  10668. # - So e.g. ImGui::SetNextWindowPos(ImVec2(0,0)) will position a window relative to your primary monitor!
  10669. # - If you want to position windows relative to your main application viewport, use ImGui::GetMainViewport()->Pos as a base position.
  10670. #
  10671. # Steps to use multi-viewports in your application, when using a default backend from the examples/ folder:
  10672. # - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
  10673. # - Backend: The backend initialization will setup all necessary ImGuiPlatformIO's functions and update monitors info every frame.
  10674. # - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render().
  10675. # - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls.
  10676. #
  10677. # Steps to use multi-viewports in your application, when using a custom backend:
  10678. # - Important: THIS IS NOT EASY TO DO and comes with many subtleties not described here!
  10679. # It's also an experimental feature, so some of the requirements may evolve.
  10680. # Consider using default backends if you can. Either way, carefully follow and refer to examples/ backends for details.
  10681. # - Application: Enable feature with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
  10682. # - Backend: Hook ImGuiPlatformIO's Platform_* and Renderer_* callbacks (see below).
  10683. # Set 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports' and 'io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports'.
  10684. # Update ImGuiPlatformIO's Monitors list every frame.
  10685. # Update MousePos every frame, in absolute coordinates.
  10686. # - Application: In your main loop, call ImGui::UpdatePlatformWindows(), ImGui::RenderPlatformWindowsDefault() after EndFrame() or Render().
  10687. # You may skip calling RenderPlatformWindowsDefault() if its API is not convenient for your needs. Read comments below.
  10688. # - Application: Fix absolute coordinates used in ImGui::SetWindowPos() or ImGui::SetNextWindowPos() calls.
  10689. #
  10690. # About ImGui::RenderPlatformWindowsDefault():
  10691. # - This function is a mostly a _helper_ for the common-most cases, and to facilitate using default backends.
  10692. # - You can check its simple source code to understand what it does.
  10693. # It basically iterates secondary viewports and call 4 functions that are setup in ImGuiPlatformIO, if available:
  10694. # Platform_RenderWindow(), Renderer_RenderWindow(), Platform_SwapBuffers(), Renderer_SwapBuffers()
  10695. # Those functions pointers exists only for the benefit of RenderPlatformWindowsDefault().
  10696. # - If you have very specific rendering needs (e.g. flipping multiple swap-chain simultaneously, unusual sync/threading issues, etc.),
  10697. # you may be tempted to ignore RenderPlatformWindowsDefault() and write customized code to perform your renderingg.
  10698. # You may decide to setup the platform_io's *RenderWindow and *SwapBuffers pointers and call your functions through those pointers,
  10699. # or you may decide to never setup those pointers and call your code directly. They are a convenience, not an obligatory interface.
  10700. # -----------------------------------------------------------------------------
  10701. class PlatformIO:
  10702. """Access via ImGui::GetPlatformIO()"""
  10703. # IMGUI_API ImGuiPlatformIO(); /* original C++ signature */
  10704. def __init__(self) -> None:
  10705. pass
  10706. # ------------------------------------------------------------------
  10707. # Input - Interface with OS and Platform backend (most common stuff)
  10708. # ------------------------------------------------------------------
  10709. # Optional: Access OS clipboard
  10710. # (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures)
  10711. # [ADAPT_IMGUI_BUNDLE]
  10712. # const char* (*Platform_GetClipboardTextFn)(ImGuiContext* ctx); // Should return None on failure (e.g. clipboard data is not text).
  10713. # None (*Platform_SetClipboardTextFn)(ImGuiContext* ctx, const char* text);
  10714. # std::function<std::string(ImGuiContext*)> Platform_GetClipboardTextFn; /* original C++ signature */
  10715. platform_get_clipboard_text_fn: Callable[[Context], str]
  10716. # std::function<void(ImGuiContext*, const char*)> Platform_SetClipboardTextFn; /* original C++ signature */
  10717. platform_set_clipboard_text_fn: Callable[[Context, str], None]
  10718. # void* Platform_ClipboardUserData; /* original C++ signature */
  10719. # [/ADAPT_IMGUI_BUNDLE]
  10720. platform_clipboard_user_data: Any
  10721. # std::function<bool(ImGuiContext*, const char*)> Platform_OpenInShellFn; /* original C++ signature */
  10722. # Optional: Open link/folder/file in OS Shell
  10723. # (default to use ShellExecuteW() on Windows, system() on Linux/Mac. expected to return False on failure, but some platforms may always return True)
  10724. # [ADAPT_IMGUI_BUNDLE]
  10725. # bool (*Platform_OpenInShellFn)(ImGuiContext* ctx, const char* path);
  10726. platform_open_in_shell_fn: Callable[[Context, str], bool]
  10727. # void* Platform_OpenInShellUserData; /* original C++ signature */
  10728. # [/ADAPT_IMGUI_BUNDLE]
  10729. platform_open_in_shell_user_data: Any
  10730. # void* Platform_ImeUserData; /* original C++ signature */
  10731. platform_ime_user_data: Any
  10732. # None (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data); // [Renamed to platform_io.PlatformSetImeDataFn in 1.91.1]
  10733. # Optional: Platform locale
  10734. # [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point
  10735. # ImWchar Platform_LocaleDecimalPoint; /* original C++ signature */
  10736. platform_locale_decimal_point: ImWchar # '.'
  10737. # ------------------------------------------------------------------
  10738. # Input - Interface with Renderer Backend
  10739. # ------------------------------------------------------------------
  10740. # Optional: Maximum texture size supported by renderer (used to adjust how we size textures). 0 if not known.
  10741. # int Renderer_TextureMaxWidth; /* original C++ signature */
  10742. renderer_texture_max_width: int
  10743. # int Renderer_TextureMaxHeight; /* original C++ signature */
  10744. renderer_texture_max_height: int
  10745. # void* Renderer_RenderState; /* original C++ signature */
  10746. # Written by some backends during ImGui_ImplXXXX_RenderDrawData() call to point backend_specific ImGui_ImplXXXX_RenderState* structure.
  10747. renderer_render_state: Any
  10748. # Standard draw callbacks provided by renderer backend.
  10749. # ImDrawCallback DrawCallback_SetSamplerCustom; // Request backend to set texture sampling using Backend Specific data.
  10750. # ------------------------------------------------------------------
  10751. # Input - Interface with Platform & Renderer backends for Multi-Viewport support
  10752. # ------------------------------------------------------------------
  10753. # For reference, the second column shows which function are generally calling the Platform Functions:
  10754. # N = ImGui::NewFrame() ~ beginning of the dear imgui frame: read info from platform/OS windows (latest size/position)
  10755. # F = ImGui::Begin(), ImGui::EndFrame() ~ during the dear imgui frame
  10756. # U = ImGui::UpdatePlatformWindows() ~ after the dear imgui frame: create and update all platform/OS windows
  10757. # R = ImGui::RenderPlatformWindowsDefault() ~ render
  10758. # D = ImGui::DestroyPlatformWindows() ~ shutdown
  10759. # The general idea is that NewFrame() we will read the current Platform/OS state, and UpdatePlatformWindows() will write to it.
  10760. # The handlers are designed so we can mix and match two imgui_impl_xxxx files, one Platform backend and one Renderer backend.
  10761. # Custom engine backends will often provide both Platform and Renderer interfaces together and so may not need to use all functions.
  10762. # Platform functions are typically called _before_ their Renderer counterpart, apart from Destroy which are called the other way.
  10763. # Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by -----
  10764. # Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by -----
  10765. # ImVector<ImGuiPlatformMonitor> Monitors; /* original C++ signature */
  10766. # (Optional) Monitor list
  10767. # - Updated by: app/backend. Update every frame to dynamically support changing monitor or DPI configuration.
  10768. # - Used by: dear imgui to query DPI info, clamp popups/tooltips within same monitor and not have them straddle monitors.
  10769. monitors: ImVector_PlatformMonitor
  10770. # ------------------------------------------------------------------
  10771. # Output
  10772. # ------------------------------------------------------------------
  10773. # Textures list (the list is updated by calling ImGui::EndFrame or ImGui::Render)
  10774. # The ImGui_ImplXXXX_RenderDrawData() function of each backend generally access this via ImDrawData::Textures which points to this. The array is available here mostly because backends will want to destroy textures on shutdown.
  10775. # ImVector<ImTextureData*> Textures; /* original C++ signature */
  10776. textures: ImVector_ImTextureData_ptr # List of textures used by Dear ImGui (most often 1) + contents of external texture list is automatically appended into this.
  10777. # Viewports list (the list is updated by calling ImGui::EndFrame or ImGui::Render)
  10778. # (in the future we will attempt to organize this feature to remove the need for a "main viewport")
  10779. # ImVector<ImGuiViewport*> Viewports; /* original C++ signature */
  10780. viewports: ImVector_Viewport_ptr # Main viewports, followed by all secondary viewports.
  10781. # ------------------------------------------------------------------
  10782. # Functions
  10783. # ------------------------------------------------------------------
  10784. # IMGUI_API void ClearPlatformHandlers(); /* original C++ signature */
  10785. def clear_platform_handlers(self) -> None:
  10786. """Clear all Platform_XXX fields. Typically called on Platform Backend shutdown."""
  10787. pass
  10788. # IMGUI_API void ClearRendererHandlers(); /* original C++ signature */
  10789. def clear_renderer_handlers(self) -> None:
  10790. """Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown."""
  10791. pass
  10792. class PlatformMonitor:
  10793. """(Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI.
  10794. We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors.
  10795. """
  10796. # ImVec2 MainPos, /* original C++ signature */
  10797. main_pos: ImVec2 # Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right)
  10798. # MainSize; /* original C++ signature */
  10799. main_size: ImVec2 # Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right)
  10800. # ImVec2 WorkPos, /* original C++ signature */
  10801. work_pos: ImVec2 # Coordinates without task bars / side bars / menu bars. Used to avoid positioning popups/tooltips inside this region. If you don't have this info, please copy the value for MainPos/MainSize.
  10802. # WorkSize; /* original C++ signature */
  10803. work_size: ImVec2 # Coordinates without task bars / side bars / menu bars. Used to avoid positioning popups/tooltips inside this region. If you don't have this info, please copy the value for MainPos/MainSize.
  10804. # float DpiScale; /* original C++ signature */
  10805. dpi_scale: float # 1.0 = 96 DPI
  10806. # void* PlatformHandle; /* original C++ signature */
  10807. platform_handle: Any # Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
  10808. # ImGuiPlatformMonitor() { MainPos = MainSize = WorkPos = WorkSize = ImVec2(0, 0); DpiScale = 1.0f; PlatformHandle = NULL; } /* original C++ signature */
  10809. def __init__(self) -> None:
  10810. pass
  10811. class PlatformImeData:
  10812. """(Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. Handler is called during EndFrame()."""
  10813. # bool WantVisible; /* original C++ signature */
  10814. want_visible: bool # A widget wants the IME to be visible.
  10815. # bool WantTextInput; /* original C++ signature */
  10816. want_text_input: bool # A widget wants text input, not necessarily IME to be visible. This is automatically set to the upcoming value of io.WantTextInput.
  10817. # ImVec2 InputPos; /* original C++ signature */
  10818. input_pos: ImVec2 # Position of input cursor (for IME).
  10819. # float InputLineHeight; /* original C++ signature */
  10820. input_line_height: float # Line height (for IME).
  10821. # ImGuiID ViewportId; /* original C++ signature */
  10822. viewport_id: ID # ID of platform window/viewport.
  10823. # ImGuiPlatformImeData() { memset((void*)this, 0, sizeof(*this)); } /* original C++ signature */
  10824. def __init__(self) -> None:
  10825. pass
  10826. # -----------------------------------------------------------------------------
  10827. # [SECTION] Obsolete functions and types
  10828. # (Will be removed! Read 'API BREAKING CHANGES' section in imgui.cpp for details)
  10829. # Please keep your copy of dear imgui up to date! Occasionally set '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' in imconfig.h to stay ahead.
  10830. # -----------------------------------------------------------------------------
  10831. # RENAMED IMGUI_DISABLE_METRICS_WINDOW > IMGUI_DISABLE_DEBUG_TOOLS in 1.88 (from June 2022)
  10832. # -----------------------------------------------------------------------------
  10833. # Include imgui_user.h at the end of imgui.h
  10834. # May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included.
  10835. # #ifdef IMGUI_INCLUDE_IMGUI_USER_H
  10836. #
  10837. # #endif
  10838. #
  10839. # #endif
  10840. def get_style_color_vec4(idx: Col) -> ImVec4:
  10841. """retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
  10842. (Note: returns a copy, not a reference to the internal style color.)"""
  10843. ...
  10844. def color_convert_rgb_to_hsv(r: float, g: float, b: float) -> Tuple[float, float, float]:
  10845. """Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1])"""
  10846. ...
  10847. def color_convert_hsv_to_rgb(h: float, s: float, v: float) -> Tuple[float, float, float]:
  10848. """Convert hsv floats ([0-1],[0-1],[0-1]) to rgb floats ([0-1],[0-1],[0-1])"""
  10849. ...
  10850. #################### </generated_from:imgui.h> ####################
  10851. #################### <generated_from:imgui_stacklayout.h> ####################
  10852. # dear imgui, v1.86 WIP
  10853. # (stack layout headers)
  10854. #
  10855. #
  10856. # Index of this file:
  10857. # // [SECTION] Stack Layout API
  10858. #
  10859. #
  10860. # #ifndef IMGUI_DISABLE
  10861. #
  10862. # -----------------------------------------------------------------------------
  10863. # [SECTION] Stack Layout API
  10864. # -----------------------------------------------------------------------------
  10865. # IMGUI_API void BeginHorizontal(const char* str_id, const ImVec2& size = ImVec2(0, 0), float align = -1.0f); /* original C++ signature */
  10866. @overload
  10867. def begin_horizontal(str_id: str, size: Optional[ImVec2Like] = None, align: float = -1.0) -> None:
  10868. """Python bindings defaults:
  10869. If size is None, then its default value will be: ImVec2(0, 0)
  10870. """
  10871. pass
  10872. # IMGUI_API void BeginHorizontal(const void* ptr_id, const ImVec2& size = ImVec2(0, 0), float align = -1.0f); /* original C++ signature */
  10873. @overload
  10874. def begin_horizontal(ptr_id: Any, size: Optional[ImVec2Like] = None, align: float = -1.0) -> None:
  10875. """Python bindings defaults:
  10876. If size is None, then its default value will be: ImVec2(0, 0)
  10877. """
  10878. pass
  10879. # IMGUI_API void BeginHorizontal(int id, const ImVec2& size = ImVec2(0, 0), float align = -1); /* original C++ signature */
  10880. @overload
  10881. def begin_horizontal(id_: int, size: Optional[ImVec2Like] = None, align: float = -1) -> None:
  10882. """Python bindings defaults:
  10883. If size is None, then its default value will be: ImVec2(0, 0)
  10884. """
  10885. pass
  10886. # IMGUI_API void EndHorizontal(); /* original C++ signature */
  10887. def end_horizontal() -> None:
  10888. pass
  10889. # IMGUI_API void BeginVertical(const char* str_id, const ImVec2& size = ImVec2(0, 0), float align = -1.0f); /* original C++ signature */
  10890. @overload
  10891. def begin_vertical(str_id: str, size: Optional[ImVec2Like] = None, align: float = -1.0) -> None:
  10892. """Python bindings defaults:
  10893. If size is None, then its default value will be: ImVec2(0, 0)
  10894. """
  10895. pass
  10896. # IMGUI_API void BeginVertical(const void* ptr_id, const ImVec2& size = ImVec2(0, 0), float align = -1.0f); /* original C++ signature */
  10897. @overload
  10898. def begin_vertical(ptr_id: Any, size: Optional[ImVec2Like] = None, align: float = -1.0) -> None:
  10899. """Python bindings defaults:
  10900. If size is None, then its default value will be: ImVec2(0, 0)
  10901. """
  10902. pass
  10903. # IMGUI_API void BeginVertical(int id, const ImVec2& size = ImVec2(0, 0), float align = -1); /* original C++ signature */
  10904. @overload
  10905. def begin_vertical(id_: int, size: Optional[ImVec2Like] = None, align: float = -1) -> None:
  10906. """Python bindings defaults:
  10907. If size is None, then its default value will be: ImVec2(0, 0)
  10908. """
  10909. pass
  10910. # IMGUI_API void EndVertical(); /* original C++ signature */
  10911. def end_vertical() -> None:
  10912. pass
  10913. # IMGUI_API void Spring(float weight = 1.0f, float spacing = -1.0f); /* original C++ signature */
  10914. def spring(weight: float = 1.0, spacing: float = -1.0) -> None:
  10915. pass
  10916. # IMGUI_API void SuspendLayout(); /* original C++ signature */
  10917. def suspend_layout() -> None:
  10918. pass
  10919. # IMGUI_API void ResumeLayout(); /* original C++ signature */
  10920. def resume_layout() -> None:
  10921. pass
  10922. # #endif
  10923. #################### </generated_from:imgui_stacklayout.h> ####################
  10924. #################### <generated_from:imgui_stacklayout_internal.h> ####################
  10925. # dear imgui, v1.86 WIP
  10926. # (stack layout headers)
  10927. #
  10928. #
  10929. # Index of this file:
  10930. # // [SECTION] Stack Layout Internal API
  10931. #
  10932. #
  10933. # #ifndef IMGUI_DISABLE
  10934. #
  10935. # -----------------------------------------------------------------------------
  10936. # [SECTION] Stack Layout Internal API
  10937. # -----------------------------------------------------------------------------
  10938. # #endif
  10939. #################### </generated_from:imgui_stacklayout_internal.h> ####################
  10940. #################### <generated_from:imgui_stdlib.h> ####################
  10941. # dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.)
  10942. # This is also an example of how you may wrap your own similar types.
  10943. # TL;DR; this is using the ImGuiInputTextFlags_CallbackResize facility,
  10944. # which also demonstrated in 'Dear ImGui Demo->Widgets->Text Input->Resize Callback'.
  10945. # Changelog:
  10946. # - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string
  10947. # Usage:
  10948. # {
  10949. # #include "misc/cpp/imgui_stdlib.h"
  10950. # #include "misc/cpp/imgui_stdlib.cpp" // <-- If you want to include implementation without messing with your project/build.
  10951. # [...]
  10952. # std::string my_string;
  10953. # ImGui::InputText("my string", &my_string);
  10954. # }
  10955. # See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki:
  10956. # https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness
  10957. # #ifndef IMGUI_DISABLE
  10958. #
  10959. # ImGui::InputText() with std::string
  10960. # Because text input needs dynamic resizing, we need to setup a callback to grow the capacity
  10961. # IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); /* original C++ signature */
  10962. def input_text(
  10963. label: str, str: str, flags: InputTextFlags = 0, callback: InputTextCallback = None, user_data: Optional[Any] = None
  10964. ) -> Tuple[bool, str]:
  10965. pass
  10966. # IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); /* original C++ signature */
  10967. def input_text_multiline(
  10968. label: str,
  10969. str: str,
  10970. size: Optional[ImVec2Like] = None,
  10971. flags: InputTextFlags = 0,
  10972. callback: InputTextCallback = None,
  10973. user_data: Optional[Any] = None,
  10974. ) -> Tuple[bool, str]:
  10975. """Python bindings defaults:
  10976. If size is None, then its default value will be: ImVec2(0, 0)
  10977. """
  10978. pass
  10979. # IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); /* original C++ signature */
  10980. # }
  10981. def input_text_with_hint(
  10982. label: str,
  10983. hint: str,
  10984. str: str,
  10985. flags: InputTextFlags = 0,
  10986. callback: InputTextCallback = None,
  10987. user_data: Optional[Any] = None,
  10988. ) -> Tuple[bool, str]:
  10989. pass
  10990. # #endif
  10991. #################### </generated_from:imgui_stdlib.h> ####################
  10992. #################### <generated_from:imgui_pywrappers.h> ####################
  10993. # Part of ImGui Bundle - MIT License - Copyright (c) 2022-2026 Pascal Thomet - https://github.com/pthom/imgui_bundle
  10994. # Handwritten wrappers around parts of the imgui API, when needed for the python bindings
  10995. class Payload_PyId:
  10996. # ImGuiPayloadId DataId; /* original C++ signature */
  10997. # Stores an id that represents the payload. For example, this could be given by python `id(object)`
  10998. data_id: PayloadId
  10999. # std::string Type; /* original C++ signature */
  11000. # A string representing the type of payload. It cannot exceed 32 characters.
  11001. type: str
  11002. # ImGuiPayload_PyId(ImGuiPayloadId DataId = ImGuiPayloadId(), std::string Type = std::string()); /* original C++ signature */
  11003. def __init__(self, data_id: Optional[PayloadId] = None, type: str = "") -> None:
  11004. """Auto-generated default constructor with named params
  11005. Python bindings defaults:
  11006. If DataId is None, then its default value will be: PayloadId()
  11007. """
  11008. pass
  11009. # Note: the drag and drop API differs a bit between C++ and Python.
  11010. # * In C++, ImGui::SetDragDropPayload and AcceptDragDropPayload are able to accept any kind of object
  11011. # (by storing a buffer whose size is the object size).
  11012. #
  11013. # Unfortunately, this behaviour cannot be reproduced in python.
  11014. #
  11015. # * In Python, you can use imgui.set_drag_drop_payload_py_id and imgui.accept_drag_drop_payload_py_id.
  11016. # These versions can only store an integer id for the payload
  11017. # (so that you may have to store the corresponding payload somewhere else)
  11018. # IMGUI_API bool SetDragDropPayload_PyId(const char* type, ImGuiPayloadId dataId, ImGuiCond cond = 0); /* original C++ signature */
  11019. def set_drag_drop_payload_py_id(type: str, data_id: PayloadId, cond: Cond = 0) -> bool:
  11020. pass
  11021. # IMGUI_API std::optional<ImGuiPayload_PyId> AcceptDragDropPayload_PyId(const char* type, ImGuiDragDropFlags flags = 0); /* original C++ signature */
  11022. def accept_drag_drop_payload_py_id(type: str, flags: DragDropFlags = 0) -> Optional[Payload_PyId]:
  11023. pass
  11024. # IMGUI_API std::optional<ImGuiPayload_PyId> GetDragDropPayload_PyId(); /* original C++ signature */
  11025. # }
  11026. def get_drag_drop_payload_py_id() -> Optional[Payload_PyId]:
  11027. pass
  11028. #################### </generated_from:imgui_pywrappers.h> ####################
  11029. # </litgen_stub>
  11030. ##################################################
  11031. # Manually inserted code (additional methods, etc.)
  11032. ##################################################
  11033. ImVector_ImVec4Like = ImVector_ImVec4
  11034. ImVector_ImVec2Like = ImVector_ImVec2