12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912 |
- #pragma once
- #ifdef IMGUI_USER_CONFIG
- #include IMGUI_USER_CONFIG
- #endif
- #if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H)
- #include "imconfig.h"
- #endif
- #ifndef IMGUI_DISABLE
- #include <float.h> // FLT_MIN, FLT_MAX
- #include <stdarg.h> // va_list, va_start, va_end
- #include <stddef.h> // ptrdiff_t, NULL
- #include <string.h> // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp
- #define IMGUI_VERSION "1.86 WIP"
- #define IMGUI_VERSION_NUM 18502
- #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
- #define IMGUI_HAS_TABLE
- #ifndef IMGUI_API
- #define IMGUI_API
- #endif
- #ifndef IMGUI_IMPL_API
- #define IMGUI_IMPL_API IMGUI_API
- #endif
- #ifndef IM_ASSERT
- #include <assert.h>
- #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h
- #endif
- #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) // Size of a static C-style array. Don't use on pointers!
- #define IM_UNUSED(_VAR) ((void)(_VAR)) // Used to silence "unused variable warnings". Often useful as asserts may be stripped out from final builds.
- #if (__cplusplus >= 201100) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201100)
- #define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER) // Offset of _MEMBER within _TYPE. Standardized as offsetof() in C++11
- #else
- #define IM_OFFSETOF(_TYPE,_MEMBER) ((size_t)&(((_TYPE*)0)->_MEMBER)) // Offset of _MEMBER within _TYPE. Old style macro.
- #endif
- #if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__)
- #define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1)))
- #define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0)))
- #elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__))
- #define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
- #define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0)))
- #else
- #define IM_FMTARGS(FMT)
- #define IM_FMTLIST(FMT)
- #endif
- #if defined(_MSC_VER) && !defined(__clang__) && !defined(IMGUI_DEBUG_PARANOID)
- #define IM_MSVC_RUNTIME_CHECKS_OFF __pragma(runtime_checks("",off)) __pragma(check_stack(off)) __pragma(strict_gs_check(push,off))
- #define IM_MSVC_RUNTIME_CHECKS_RESTORE __pragma(runtime_checks("",restore)) __pragma(check_stack()) __pragma(strict_gs_check(pop))
- #else
- #define IM_MSVC_RUNTIME_CHECKS_OFF
- #define IM_MSVC_RUNTIME_CHECKS_RESTORE
- #endif
- #ifdef _MSC_VER
- #pragma warning (push)
- #pragma warning (disable: 26495) // [Static Analyzer] Variable 'XXX' is uninitialized. Always initialize a member variable (type.6).
- #endif
- #if defined(__clang__)
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wold-style-cast"
- #if __has_warning("-Wzero-as-null-pointer-constant")
- #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
- #endif
- #elif defined(__GNUC__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
- #pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
- #endif
- struct ImDrawChannel;
- struct ImDrawCmd;
- struct ImDrawData;
- struct ImDrawList;
- struct ImDrawListSharedData;
- struct ImDrawListSplitter;
- struct ImDrawVert;
- struct ImFont;
- struct ImFontAtlas;
- struct ImFontBuilderIO;
- struct ImFontConfig;
- struct ImFontGlyph;
- struct ImFontGlyphRangesBuilder;
- struct ImColor;
- struct ImGuiContext;
- struct ImGuiIO;
- struct ImGuiInputTextCallbackData;
- struct ImGuiListClipper;
- struct ImGuiOnceUponAFrame;
- struct ImGuiPayload;
- struct ImGuiSizeCallbackData;
- struct ImGuiStorage;
- struct ImGuiStyle;
- struct ImGuiTableSortSpecs;
- struct ImGuiTableColumnSortSpecs;
- struct ImGuiTextBuffer;
- struct ImGuiTextFilter;
- struct ImGuiViewport;
- typedef int ImGuiCol;
- typedef int ImGuiCond;
- typedef int ImGuiDataType;
- typedef int ImGuiDir;
- typedef int ImGuiKey;
- typedef int ImGuiNavInput;
- typedef int ImGuiMouseButton;
- typedef int ImGuiMouseCursor;
- typedef int ImGuiSortDirection;
- typedef int ImGuiStyleVar;
- typedef int ImGuiTableBgTarget;
- typedef int ImDrawFlags;
- typedef int ImDrawListFlags;
- typedef int ImFontAtlasFlags;
- typedef int ImGuiBackendFlags;
- typedef int ImGuiButtonFlags;
- typedef int ImGuiColorEditFlags;
- typedef int ImGuiConfigFlags;
- typedef int ImGuiComboFlags;
- typedef int ImGuiDragDropFlags;
- typedef int ImGuiFocusedFlags;
- typedef int ImGuiHoveredFlags;
- typedef int ImGuiInputTextFlags;
- typedef int ImGuiKeyModFlags;
- typedef int ImGuiPopupFlags;
- typedef int ImGuiSelectableFlags;
- typedef int ImGuiSliderFlags;
- typedef int ImGuiTabBarFlags;
- typedef int ImGuiTabItemFlags;
- typedef int ImGuiTableFlags;
- typedef int ImGuiTableColumnFlags;
- typedef int ImGuiTableRowFlags;
- typedef int ImGuiTreeNodeFlags;
- typedef int ImGuiViewportFlags;
- typedef int ImGuiWindowFlags;
- #ifndef ImTextureID
- typedef void* ImTextureID;
- #endif
- #ifndef ImDrawIdx
- typedef unsigned short ImDrawIdx;
- #endif
- typedef unsigned int ImGuiID;
- typedef signed char ImS8;
- typedef unsigned char ImU8;
- typedef signed short ImS16;
- typedef unsigned short ImU16;
- typedef signed int ImS32;
- typedef unsigned int ImU32;
- #if defined(_MSC_VER) && !defined(__clang__)
- typedef signed __int64 ImS64;
- typedef unsigned __int64 ImU64;
- #elif (defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100)
- #include <stdint.h>
- typedef int64_t ImS64;
- typedef uint64_t ImU64;
- #else
- typedef signed long long ImS64;
- typedef unsigned long long ImU64;
- #endif
- typedef unsigned short ImWchar16;
- typedef unsigned int ImWchar32;
- #ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16]
- typedef ImWchar32 ImWchar;
- #else
- typedef ImWchar16 ImWchar;
- #endif
- typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data);
- typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data);
- typedef void* (*ImGuiMemAllocFunc)(size_t sz, void* user_data);
- typedef void (*ImGuiMemFreeFunc)(void* ptr, void* user_data);
- IM_MSVC_RUNTIME_CHECKS_OFF
- struct ImVec2
- {
- float x, y;
- ImVec2() { x = y = 0.0f; }
- ImVec2(float _x, float _y) { x = _x; y = _y; }
- float operator[] (size_t idx) const { IM_ASSERT(idx <= 1); return (&x)[idx]; }
- float& operator[] (size_t idx) { IM_ASSERT(idx <= 1); return (&x)[idx]; }
- #ifdef IM_VEC2_CLASS_EXTRA
- IM_VEC2_CLASS_EXTRA
- #endif
- };
- struct ImVec4
- {
- float x, y, z, w;
- ImVec4() { x = y = z = w = 0.0f; }
- ImVec4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }
- #ifdef IM_VEC4_CLASS_EXTRA
- IM_VEC4_CLASS_EXTRA
- #endif
- };
- IM_MSVC_RUNTIME_CHECKS_RESTORE
- namespace ImGui
- {
-
-
-
-
- IMGUI_API ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL);
- IMGUI_API void DestroyContext(ImGuiContext* ctx = NULL);
- IMGUI_API ImGuiContext* GetCurrentContext();
- IMGUI_API void SetCurrentContext(ImGuiContext* ctx);
-
- IMGUI_API ImGuiIO& GetIO();
- IMGUI_API ImGuiStyle& GetStyle();
- IMGUI_API void NewFrame();
- IMGUI_API void EndFrame();
- IMGUI_API void Render();
- IMGUI_API ImDrawData* GetDrawData();
-
- IMGUI_API void ShowDemoWindow(bool* p_open = NULL);
- IMGUI_API void ShowMetricsWindow(bool* p_open = NULL);
- IMGUI_API void ShowStackToolWindow(bool* p_open = NULL);
- IMGUI_API void ShowAboutWindow(bool* p_open = NULL);
- IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL);
- IMGUI_API bool ShowStyleSelector(const char* label);
- IMGUI_API void ShowFontSelector(const char* label);
- IMGUI_API void ShowUserGuide();
- IMGUI_API const char* GetVersion();
-
- IMGUI_API void StyleColorsDark(ImGuiStyle* dst = NULL);
- IMGUI_API void StyleColorsLight(ImGuiStyle* dst = NULL);
- IMGUI_API void StyleColorsClassic(ImGuiStyle* dst = NULL);
-
-
-
-
-
-
-
-
-
-
-
-
- IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0);
- IMGUI_API void End();
-
-
-
-
-
-
-
-
- IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags flags = 0);
- IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags flags = 0);
- IMGUI_API void EndChild();
-
-
- IMGUI_API bool IsWindowAppearing();
- IMGUI_API bool IsWindowCollapsed();
- IMGUI_API bool IsWindowFocused(ImGuiFocusedFlags flags=0);
- IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags=0);
- IMGUI_API ImDrawList* GetWindowDrawList();
- IMGUI_API ImVec2 GetWindowPos();
- IMGUI_API ImVec2 GetWindowSize();
- IMGUI_API float GetWindowWidth();
- IMGUI_API float GetWindowHeight();
-
-
- IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0, 0));
- IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0);
- IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL);
- IMGUI_API void SetNextWindowContentSize(const ImVec2& size);
- IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0);
- IMGUI_API void SetNextWindowFocus();
- IMGUI_API void SetNextWindowBgAlpha(float alpha);
- IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0);
- IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiCond cond = 0);
- IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0);
- IMGUI_API void SetWindowFocus();
- IMGUI_API void SetWindowFontScale(float scale);
- IMGUI_API void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0);
- IMGUI_API void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0);
- IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0);
- IMGUI_API void SetWindowFocus(const char* name);
-
-
-
- IMGUI_API ImVec2 GetContentRegionAvail();
- IMGUI_API ImVec2 GetContentRegionMax();
- IMGUI_API ImVec2 GetWindowContentRegionMin();
- IMGUI_API ImVec2 GetWindowContentRegionMax();
-
- IMGUI_API float GetScrollX();
- IMGUI_API float GetScrollY();
- IMGUI_API void SetScrollX(float scroll_x);
- IMGUI_API void SetScrollY(float scroll_y);
- IMGUI_API float GetScrollMaxX();
- IMGUI_API float GetScrollMaxY();
- IMGUI_API void SetScrollHereX(float center_x_ratio = 0.5f);
- IMGUI_API void SetScrollHereY(float center_y_ratio = 0.5f);
- IMGUI_API void SetScrollFromPosX(float local_x, float center_x_ratio = 0.5f);
- IMGUI_API void SetScrollFromPosY(float local_y, float center_y_ratio = 0.5f);
-
- IMGUI_API void PushFont(ImFont* font);
- IMGUI_API void PopFont();
- IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col);
- IMGUI_API void PushStyleColor(ImGuiCol idx, const ImVec4& col);
- IMGUI_API void PopStyleColor(int count = 1);
- IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val);
- IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val);
- IMGUI_API void PopStyleVar(int count = 1);
- IMGUI_API void PushAllowKeyboardFocus(bool allow_keyboard_focus);
- IMGUI_API void PopAllowKeyboardFocus();
- IMGUI_API void PushButtonRepeat(bool repeat);
- IMGUI_API void PopButtonRepeat();
-
- IMGUI_API void PushItemWidth(float item_width);
- IMGUI_API void PopItemWidth();
- IMGUI_API void SetNextItemWidth(float item_width);
- IMGUI_API float CalcItemWidth();
- IMGUI_API void PushTextWrapPos(float wrap_local_pos_x = 0.0f);
- IMGUI_API void PopTextWrapPos();
-
-
- IMGUI_API ImFont* GetFont();
- IMGUI_API float GetFontSize();
- IMGUI_API ImVec2 GetFontTexUvWhitePixel();
- IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f);
- IMGUI_API ImU32 GetColorU32(const ImVec4& col);
- IMGUI_API ImU32 GetColorU32(ImU32 col);
- IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx);
-
-
-
-
-
-
-
- IMGUI_API void Separator();
- IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f);
- IMGUI_API void NewLine();
- IMGUI_API void Spacing();
- IMGUI_API void Dummy(const ImVec2& size);
- IMGUI_API void Indent(float indent_w = 0.0f);
- IMGUI_API void Unindent(float indent_w = 0.0f);
- IMGUI_API void BeginGroup();
- IMGUI_API void EndGroup();
- IMGUI_API ImVec2 GetCursorPos();
- IMGUI_API float GetCursorPosX();
- IMGUI_API float GetCursorPosY();
- IMGUI_API void SetCursorPos(const ImVec2& local_pos);
- IMGUI_API void SetCursorPosX(float local_x);
- IMGUI_API void SetCursorPosY(float local_y);
- IMGUI_API ImVec2 GetCursorStartPos();
- IMGUI_API ImVec2 GetCursorScreenPos();
- IMGUI_API void SetCursorScreenPos(const ImVec2& pos);
- IMGUI_API void AlignTextToFramePadding();
- IMGUI_API float GetTextLineHeight();
- IMGUI_API float GetTextLineHeightWithSpacing();
- IMGUI_API float GetFrameHeight();
- IMGUI_API float GetFrameHeightWithSpacing();
-
-
-
-
-
-
-
-
-
-
-
- IMGUI_API void PushID(const char* str_id);
- IMGUI_API void PushID(const char* str_id_begin, const char* str_id_end);
- IMGUI_API void PushID(const void* ptr_id);
- IMGUI_API void PushID(int int_id);
- IMGUI_API void PopID();
- IMGUI_API ImGuiID GetID(const char* str_id);
- IMGUI_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end);
- IMGUI_API ImGuiID GetID(const void* ptr_id);
-
- IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL);
- IMGUI_API void Text(const char* fmt, ...) IM_FMTARGS(1);
- IMGUI_API void TextV(const char* fmt, va_list args) IM_FMTLIST(1);
- IMGUI_API void TextColored(const ImVec4& col, const char* fmt, ...) IM_FMTARGS(2);
- IMGUI_API void TextColoredV(const ImVec4& col, const char* fmt, va_list args) IM_FMTLIST(2);
- IMGUI_API void TextDisabled(const char* fmt, ...) IM_FMTARGS(1);
- IMGUI_API void TextDisabledV(const char* fmt, va_list args) IM_FMTLIST(1);
- IMGUI_API void TextWrapped(const char* fmt, ...) IM_FMTARGS(1);
- IMGUI_API void TextWrappedV(const char* fmt, va_list args) IM_FMTLIST(1);
- IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2);
- IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args) IM_FMTLIST(2);
- IMGUI_API void BulletText(const char* fmt, ...) IM_FMTARGS(1);
- IMGUI_API void BulletTextV(const char* fmt, va_list args) IM_FMTLIST(1);
-
-
-
- IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0, 0));
- IMGUI_API bool SmallButton(const char* label);
- IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size, ImGuiButtonFlags flags = 0);
- IMGUI_API bool ArrowButton(const char* str_id, ImGuiDir dir);
- IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1,1), const ImVec4& tint_col = ImVec4(1,1,1,1), const ImVec4& border_col = ImVec4(0,0,0,0));
- IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1,1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0,0,0,0), const ImVec4& tint_col = ImVec4(1,1,1,1));
- IMGUI_API bool Checkbox(const char* label, bool* v);
- IMGUI_API bool CheckboxFlags(const char* label, int* flags, int flags_value);
- IMGUI_API bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value);
- IMGUI_API bool RadioButton(const char* label, bool active);
- IMGUI_API bool RadioButton(const char* label, int* v, int v_button);
- IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL);
- IMGUI_API void Bullet();
-
-
-
- IMGUI_API bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0);
- IMGUI_API void EndCombo();
- IMGUI_API bool Combo(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items = -1);
- IMGUI_API bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1);
- IMGUI_API bool Combo(const char* label, int* current_item, bool(*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int popup_max_height_in_items = -1);
-
-
-
-
-
-
-
-
-
-
-
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
-
-
-
-
-
-
- IMGUI_API bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0);
- IMGUI_API bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0);
- IMGUI_API bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0);
- IMGUI_API bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0);
- 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);
- IMGUI_API bool SliderInt(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0);
- IMGUI_API bool SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0);
- IMGUI_API bool SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0);
- IMGUI_API bool SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0);
- 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);
- 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);
- 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);
- 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);
- 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);
-
-
-
- IMGUI_API bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
- IMGUI_API bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
- IMGUI_API bool InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
- 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);
- IMGUI_API bool InputFloat2(const char* label, float v[2], const char* format = "%.3f", ImGuiInputTextFlags flags = 0);
- IMGUI_API bool InputFloat3(const char* label, float v[3], const char* format = "%.3f", ImGuiInputTextFlags flags = 0);
- IMGUI_API bool InputFloat4(const char* label, float v[4], const char* format = "%.3f", ImGuiInputTextFlags flags = 0);
- IMGUI_API bool InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0);
- IMGUI_API bool InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags = 0);
- IMGUI_API bool InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags = 0);
- IMGUI_API bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags = 0);
- 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);
- 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);
- 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);
-
-
-
- IMGUI_API bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0);
- IMGUI_API bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0);
- IMGUI_API bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0);
- IMGUI_API bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL);
- IMGUI_API bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0, 0));
- IMGUI_API void SetColorEditOptions(ImGuiColorEditFlags flags);
-
-
- IMGUI_API bool TreeNode(const char* label);
- IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2);
- IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2);
- IMGUI_API bool TreeNodeV(const char* str_id, const char* fmt, va_list args) IM_FMTLIST(2);
- IMGUI_API bool TreeNodeV(const void* ptr_id, const char* fmt, va_list args) IM_FMTLIST(2);
- IMGUI_API bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0);
- IMGUI_API bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3);
- IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3);
- IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3);
- IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3);
- IMGUI_API void TreePush(const char* str_id);
- IMGUI_API void TreePush(const void* ptr_id = NULL);
- IMGUI_API void TreePop();
- IMGUI_API float GetTreeNodeToLabelSpacing();
- IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0);
- IMGUI_API bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0);
- IMGUI_API void SetNextItemOpen(bool is_open, ImGuiCond cond = 0);
-
-
-
- IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0));
- IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0));
-
-
-
-
-
-
- IMGUI_API bool BeginListBox(const char* label, const ImVec2& size = ImVec2(0, 0));
- IMGUI_API void EndListBox();
- IMGUI_API bool ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items = -1);
- IMGUI_API bool ListBox(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1);
-
-
- 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));
- IMGUI_API void PlotLines(const char* label, float(*values_getter)(void* data, int idx), void* data, 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));
- 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));
- IMGUI_API void PlotHistogram(const char* label, float(*values_getter)(void* data, int idx), void* data, 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));
-
-
- IMGUI_API void Value(const char* prefix, bool b);
- IMGUI_API void Value(const char* prefix, int v);
- IMGUI_API void Value(const char* prefix, unsigned int v);
- IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL);
-
-
-
-
-
- IMGUI_API bool BeginMenuBar();
- IMGUI_API void EndMenuBar();
- IMGUI_API bool BeginMainMenuBar();
- IMGUI_API void EndMainMenuBar();
- IMGUI_API bool BeginMenu(const char* label, bool enabled = true);
- IMGUI_API void EndMenu();
- IMGUI_API bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true);
- IMGUI_API bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true);
-
-
- IMGUI_API void BeginTooltip();
- IMGUI_API void EndTooltip();
- IMGUI_API void SetTooltip(const char* fmt, ...) IM_FMTARGS(1);
- IMGUI_API void SetTooltipV(const char* fmt, va_list args) IM_FMTLIST(1);
-
-
-
-
-
-
-
-
-
-
-
- IMGUI_API bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0);
- IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0);
- IMGUI_API void EndPopup();
-
-
-
-
-
-
-
- IMGUI_API void OpenPopup(const char* str_id, ImGuiPopupFlags popup_flags = 0);
- IMGUI_API void OpenPopup(ImGuiID id, ImGuiPopupFlags popup_flags = 0);
- IMGUI_API void OpenPopupOnItemClick(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
- IMGUI_API void CloseCurrentPopup();
-
-
-
-
-
- IMGUI_API bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
- IMGUI_API bool BeginPopupContextWindow(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
- IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
-
-
-
-
- IMGUI_API bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- IMGUI_API bool BeginTable(const char* str_id, int column, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f);
- IMGUI_API void EndTable();
- IMGUI_API void TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f);
- IMGUI_API bool TableNextColumn();
- IMGUI_API bool TableSetColumnIndex(int column_n);
-
-
-
-
-
-
-
-
- IMGUI_API void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
- IMGUI_API void TableSetupScrollFreeze(int cols, int rows);
- IMGUI_API void TableHeadersRow();
- IMGUI_API void TableHeader(const char* label);
-
-
-
-
-
-
- IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs();
-
-
- IMGUI_API int TableGetColumnCount();
- IMGUI_API int TableGetColumnIndex();
- IMGUI_API int TableGetRowIndex();
- IMGUI_API const char* TableGetColumnName(int column_n = -1);
- IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1);
- IMGUI_API void TableSetColumnEnabled(int column_n, bool v);
- IMGUI_API void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n = -1);
-
-
- IMGUI_API void Columns(int count = 1, const char* id = NULL, bool border = true);
- IMGUI_API void NextColumn();
- IMGUI_API int GetColumnIndex();
- IMGUI_API float GetColumnWidth(int column_index = -1);
- IMGUI_API void SetColumnWidth(int column_index, float width);
- IMGUI_API float GetColumnOffset(int column_index = -1);
- IMGUI_API void SetColumnOffset(int column_index, float offset_x);
- IMGUI_API int GetColumnsCount();
-
- IMGUI_API bool BeginTabBar(const char* str_id, ImGuiTabBarFlags flags = 0);
- IMGUI_API void EndTabBar();
- IMGUI_API bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0);
- IMGUI_API void EndTabItem();
- IMGUI_API bool TabItemButton(const char* label, ImGuiTabItemFlags flags = 0);
- IMGUI_API void SetTabItemClosed(const char* tab_or_docked_window_label);
-
-
- IMGUI_API void LogToTTY(int auto_open_depth = -1);
- IMGUI_API void LogToFile(int auto_open_depth = -1, const char* filename = NULL);
- IMGUI_API void LogToClipboard(int auto_open_depth = -1);
- IMGUI_API void LogFinish();
- IMGUI_API void LogButtons();
- IMGUI_API void LogText(const char* fmt, ...) IM_FMTARGS(1);
- IMGUI_API void LogTextV(const char* fmt, va_list args) IM_FMTLIST(1);
-
-
-
-
-
- IMGUI_API bool BeginDragDropSource(ImGuiDragDropFlags flags = 0);
- IMGUI_API bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0);
- IMGUI_API void EndDragDropSource();
- IMGUI_API bool BeginDragDropTarget();
- IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0);
- IMGUI_API void EndDragDropTarget();
- IMGUI_API const ImGuiPayload* GetDragDropPayload();
-
-
-
-
- IMGUI_API void BeginDisabled(bool disabled = true);
- IMGUI_API void EndDisabled();
-
-
- IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect);
- IMGUI_API void PopClipRect();
-
-
- IMGUI_API void SetItemDefaultFocus();
- IMGUI_API void SetKeyboardFocusHere(int offset = 0);
-
-
-
- IMGUI_API bool IsItemHovered(ImGuiHoveredFlags flags = 0);
- IMGUI_API bool IsItemActive();
- IMGUI_API bool IsItemFocused();
- IMGUI_API bool IsItemClicked(ImGuiMouseButton mouse_button = 0);
- IMGUI_API bool IsItemVisible();
- IMGUI_API bool IsItemEdited();
- IMGUI_API bool IsItemActivated();
- IMGUI_API bool IsItemDeactivated();
- IMGUI_API bool IsItemDeactivatedAfterEdit();
- IMGUI_API bool IsItemToggledOpen();
- IMGUI_API bool IsAnyItemHovered();
- IMGUI_API bool IsAnyItemActive();
- IMGUI_API bool IsAnyItemFocused();
- IMGUI_API ImVec2 GetItemRectMin();
- IMGUI_API ImVec2 GetItemRectMax();
- IMGUI_API ImVec2 GetItemRectSize();
- IMGUI_API void SetItemAllowOverlap();
-
-
-
-
- IMGUI_API ImGuiViewport* GetMainViewport();
-
- IMGUI_API bool IsRectVisible(const ImVec2& size);
- IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max);
- IMGUI_API double GetTime();
- IMGUI_API int GetFrameCount();
- IMGUI_API ImDrawList* GetBackgroundDrawList();
- IMGUI_API ImDrawList* GetForegroundDrawList();
- IMGUI_API ImDrawListSharedData* GetDrawListSharedData();
- IMGUI_API const char* GetStyleColorName(ImGuiCol idx);
- IMGUI_API void SetStateStorage(ImGuiStorage* storage);
- IMGUI_API ImGuiStorage* GetStateStorage();
- IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
- IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags flags = 0);
- IMGUI_API void EndChildFrame();
-
- IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f);
-
- IMGUI_API ImVec4 ColorConvertU32ToFloat4(ImU32 in);
- IMGUI_API ImU32 ColorConvertFloat4ToU32(const ImVec4& in);
- IMGUI_API void ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v);
- IMGUI_API void ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b);
-
-
-
- IMGUI_API int GetKeyIndex(ImGuiKey imgui_key);
- IMGUI_API bool IsKeyDown(int user_key_index);
- IMGUI_API bool IsKeyPressed(int user_key_index, bool repeat = true);
- IMGUI_API bool IsKeyReleased(int user_key_index);
- IMGUI_API int GetKeyPressedAmount(int key_index, float repeat_delay, float rate);
- IMGUI_API void CaptureKeyboardFromApp(bool want_capture_keyboard_value = true);
-
-
-
-
- IMGUI_API bool IsMouseDown(ImGuiMouseButton button);
- IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false);
- IMGUI_API bool IsMouseReleased(ImGuiMouseButton button);
- IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button);
- IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true);
- IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL);
- IMGUI_API bool IsAnyMouseDown();
- IMGUI_API ImVec2 GetMousePos();
- IMGUI_API ImVec2 GetMousePosOnOpeningCurrentPopup();
- IMGUI_API bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f);
- IMGUI_API ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f);
- IMGUI_API void ResetMouseDragDelta(ImGuiMouseButton button = 0);
- IMGUI_API ImGuiMouseCursor GetMouseCursor();
- IMGUI_API void SetMouseCursor(ImGuiMouseCursor cursor_type);
- IMGUI_API void CaptureMouseFromApp(bool want_capture_mouse_value = true);
-
-
- IMGUI_API const char* GetClipboardText();
- IMGUI_API void SetClipboardText(const char* text);
-
-
-
-
- IMGUI_API void LoadIniSettingsFromDisk(const char* ini_filename);
- IMGUI_API void LoadIniSettingsFromMemory(const char* ini_data, size_t ini_size=0);
- IMGUI_API void SaveIniSettingsToDisk(const char* ini_filename);
- IMGUI_API const char* SaveIniSettingsToMemory(size_t* out_ini_size = NULL);
-
-
- 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);
-
-
-
-
- IMGUI_API void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void* user_data = NULL);
- IMGUI_API void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func, void** p_user_data);
- IMGUI_API void* MemAlloc(size_t size);
- IMGUI_API void MemFree(void* ptr);
- }
- enum ImGuiWindowFlags_
- {
- ImGuiWindowFlags_None = 0,
- ImGuiWindowFlags_NoTitleBar = 1 << 0,
- ImGuiWindowFlags_NoResize = 1 << 1,
- ImGuiWindowFlags_NoMove = 1 << 2,
- ImGuiWindowFlags_NoScrollbar = 1 << 3,
- ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
- ImGuiWindowFlags_NoCollapse = 1 << 5,
- ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
- ImGuiWindowFlags_NoBackground = 1 << 7,
- ImGuiWindowFlags_NoSavedSettings = 1 << 8,
- ImGuiWindowFlags_NoMouseInputs = 1 << 9,
- ImGuiWindowFlags_MenuBar = 1 << 10,
- ImGuiWindowFlags_HorizontalScrollbar = 1 << 11,
- ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12,
- ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
- ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,
- ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,
- ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16,
- ImGuiWindowFlags_NoNavInputs = 1 << 18,
- ImGuiWindowFlags_NoNavFocus = 1 << 19,
- ImGuiWindowFlags_UnsavedDocument = 1 << 20,
- ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
- ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse,
- ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
-
- ImGuiWindowFlags_NavFlattened = 1 << 23,
- ImGuiWindowFlags_ChildWindow = 1 << 24,
- ImGuiWindowFlags_Tooltip = 1 << 25,
- ImGuiWindowFlags_Popup = 1 << 26,
- ImGuiWindowFlags_Modal = 1 << 27,
- ImGuiWindowFlags_ChildMenu = 1 << 28
-
-
- };
- enum ImGuiInputTextFlags_
- {
- ImGuiInputTextFlags_None = 0,
- ImGuiInputTextFlags_CharsDecimal = 1 << 0,
- ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
- ImGuiInputTextFlags_CharsUppercase = 1 << 2,
- ImGuiInputTextFlags_CharsNoBlank = 1 << 3,
- ImGuiInputTextFlags_AutoSelectAll = 1 << 4,
- ImGuiInputTextFlags_EnterReturnsTrue = 1 << 5,
- ImGuiInputTextFlags_CallbackCompletion = 1 << 6,
- ImGuiInputTextFlags_CallbackHistory = 1 << 7,
- ImGuiInputTextFlags_CallbackAlways = 1 << 8,
- ImGuiInputTextFlags_CallbackCharFilter = 1 << 9,
- ImGuiInputTextFlags_AllowTabInput = 1 << 10,
- ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11,
- ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12,
- ImGuiInputTextFlags_AlwaysOverwrite = 1 << 13,
- ImGuiInputTextFlags_ReadOnly = 1 << 14,
- ImGuiInputTextFlags_Password = 1 << 15,
- ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
- ImGuiInputTextFlags_CharsScientific = 1 << 17,
- ImGuiInputTextFlags_CallbackResize = 1 << 18,
- ImGuiInputTextFlags_CallbackEdit = 1 << 19
-
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- , ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite
- #endif
- };
- enum ImGuiTreeNodeFlags_
- {
- ImGuiTreeNodeFlags_None = 0,
- ImGuiTreeNodeFlags_Selected = 1 << 0,
- ImGuiTreeNodeFlags_Framed = 1 << 1,
- ImGuiTreeNodeFlags_AllowItemOverlap = 1 << 2,
- ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
- ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
- ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
- ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6,
- ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
- ImGuiTreeNodeFlags_Leaf = 1 << 8,
- ImGuiTreeNodeFlags_Bullet = 1 << 9,
- ImGuiTreeNodeFlags_FramePadding = 1 << 10,
- ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
- ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
- ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,
-
- ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
- };
- enum ImGuiPopupFlags_
- {
- ImGuiPopupFlags_None = 0,
- ImGuiPopupFlags_MouseButtonLeft = 0,
- ImGuiPopupFlags_MouseButtonRight = 1,
- ImGuiPopupFlags_MouseButtonMiddle = 2,
- ImGuiPopupFlags_MouseButtonMask_ = 0x1F,
- ImGuiPopupFlags_MouseButtonDefault_ = 1,
- ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 5,
- ImGuiPopupFlags_NoOpenOverItems = 1 << 6,
- ImGuiPopupFlags_AnyPopupId = 1 << 7,
- ImGuiPopupFlags_AnyPopupLevel = 1 << 8,
- ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel
- };
- enum ImGuiSelectableFlags_
- {
- ImGuiSelectableFlags_None = 0,
- ImGuiSelectableFlags_DontClosePopups = 1 << 0,
- ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
- ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
- ImGuiSelectableFlags_Disabled = 1 << 3,
- ImGuiSelectableFlags_AllowItemOverlap = 1 << 4
- };
- enum ImGuiComboFlags_
- {
- ImGuiComboFlags_None = 0,
- ImGuiComboFlags_PopupAlignLeft = 1 << 0,
- ImGuiComboFlags_HeightSmall = 1 << 1,
- ImGuiComboFlags_HeightRegular = 1 << 2,
- ImGuiComboFlags_HeightLarge = 1 << 3,
- ImGuiComboFlags_HeightLargest = 1 << 4,
- ImGuiComboFlags_NoArrowButton = 1 << 5,
- ImGuiComboFlags_NoPreview = 1 << 6,
- ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
- };
- enum ImGuiTabBarFlags_
- {
- ImGuiTabBarFlags_None = 0,
- ImGuiTabBarFlags_Reorderable = 1 << 0,
- ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
- ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
- ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3,
- ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
- ImGuiTabBarFlags_NoTooltip = 1 << 5,
- ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6,
- ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
- ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
- ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown
- };
- enum ImGuiTabItemFlags_
- {
- ImGuiTabItemFlags_None = 0,
- ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
- ImGuiTabItemFlags_SetSelected = 1 << 1,
- ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
- ImGuiTabItemFlags_NoPushId = 1 << 3,
- ImGuiTabItemFlags_NoTooltip = 1 << 4,
- ImGuiTabItemFlags_NoReorder = 1 << 5,
- ImGuiTabItemFlags_Leading = 1 << 6,
- ImGuiTabItemFlags_Trailing = 1 << 7
- };
- enum ImGuiTableFlags_
- {
-
- ImGuiTableFlags_None = 0,
- ImGuiTableFlags_Resizable = 1 << 0,
- ImGuiTableFlags_Reorderable = 1 << 1,
- ImGuiTableFlags_Hideable = 1 << 2,
- ImGuiTableFlags_Sortable = 1 << 3,
- ImGuiTableFlags_NoSavedSettings = 1 << 4,
- ImGuiTableFlags_ContextMenuInBody = 1 << 5,
-
- ImGuiTableFlags_RowBg = 1 << 6,
- ImGuiTableFlags_BordersInnerH = 1 << 7,
- ImGuiTableFlags_BordersOuterH = 1 << 8,
- ImGuiTableFlags_BordersInnerV = 1 << 9,
- ImGuiTableFlags_BordersOuterV = 1 << 10,
- ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
- ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
- ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
- ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
- ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
- ImGuiTableFlags_NoBordersInBody = 1 << 11,
- ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
-
- ImGuiTableFlags_SizingFixedFit = 1 << 13,
- ImGuiTableFlags_SizingFixedSame = 2 << 13,
- ImGuiTableFlags_SizingStretchProp = 3 << 13,
- ImGuiTableFlags_SizingStretchSame = 4 << 13,
-
- ImGuiTableFlags_NoHostExtendX = 1 << 16,
- ImGuiTableFlags_NoHostExtendY = 1 << 17,
- ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
- ImGuiTableFlags_PreciseWidths = 1 << 19,
-
- ImGuiTableFlags_NoClip = 1 << 20,
-
- ImGuiTableFlags_PadOuterX = 1 << 21,
- ImGuiTableFlags_NoPadOuterX = 1 << 22,
- ImGuiTableFlags_NoPadInnerX = 1 << 23,
-
- ImGuiTableFlags_ScrollX = 1 << 24,
- ImGuiTableFlags_ScrollY = 1 << 25,
-
- ImGuiTableFlags_SortMulti = 1 << 26,
- ImGuiTableFlags_SortTristate = 1 << 27,
-
- ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame
-
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-
-
- #endif
- };
- enum ImGuiTableColumnFlags_
- {
-
- ImGuiTableColumnFlags_None = 0,
- ImGuiTableColumnFlags_Disabled = 1 << 0,
- ImGuiTableColumnFlags_DefaultHide = 1 << 1,
- ImGuiTableColumnFlags_DefaultSort = 1 << 2,
- ImGuiTableColumnFlags_WidthStretch = 1 << 3,
- ImGuiTableColumnFlags_WidthFixed = 1 << 4,
- ImGuiTableColumnFlags_NoResize = 1 << 5,
- ImGuiTableColumnFlags_NoReorder = 1 << 6,
- ImGuiTableColumnFlags_NoHide = 1 << 7,
- ImGuiTableColumnFlags_NoClip = 1 << 8,
- ImGuiTableColumnFlags_NoSort = 1 << 9,
- ImGuiTableColumnFlags_NoSortAscending = 1 << 10,
- ImGuiTableColumnFlags_NoSortDescending = 1 << 11,
- ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12,
- ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13,
- ImGuiTableColumnFlags_PreferSortAscending = 1 << 14,
- ImGuiTableColumnFlags_PreferSortDescending = 1 << 15,
- ImGuiTableColumnFlags_IndentEnable = 1 << 16,
- ImGuiTableColumnFlags_IndentDisable = 1 << 17,
-
- ImGuiTableColumnFlags_IsEnabled = 1 << 24,
- ImGuiTableColumnFlags_IsVisible = 1 << 25,
- ImGuiTableColumnFlags_IsSorted = 1 << 26,
- ImGuiTableColumnFlags_IsHovered = 1 << 27,
-
- ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
- ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
- ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
- ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30
-
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-
- #endif
- };
- enum ImGuiTableRowFlags_
- {
- ImGuiTableRowFlags_None = 0,
- ImGuiTableRowFlags_Headers = 1 << 0
- };
- enum ImGuiTableBgTarget_
- {
- ImGuiTableBgTarget_None = 0,
- ImGuiTableBgTarget_RowBg0 = 1,
- ImGuiTableBgTarget_RowBg1 = 2,
- ImGuiTableBgTarget_CellBg = 3
- };
- enum ImGuiFocusedFlags_
- {
- ImGuiFocusedFlags_None = 0,
- ImGuiFocusedFlags_ChildWindows = 1 << 0,
- ImGuiFocusedFlags_RootWindow = 1 << 1,
- ImGuiFocusedFlags_AnyWindow = 1 << 2,
- ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
-
- ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
- };
- enum ImGuiHoveredFlags_
- {
- ImGuiHoveredFlags_None = 0,
- ImGuiHoveredFlags_ChildWindows = 1 << 0,
- ImGuiHoveredFlags_RootWindow = 1 << 1,
- ImGuiHoveredFlags_AnyWindow = 1 << 2,
- ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
-
- ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
-
- ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
- ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 8,
- ImGuiHoveredFlags_AllowWhenDisabled = 1 << 9,
- ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
- ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
- };
- enum ImGuiDragDropFlags_
- {
- ImGuiDragDropFlags_None = 0,
-
- ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
- ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
- ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
- ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
- ImGuiDragDropFlags_SourceExtern = 1 << 4,
- ImGuiDragDropFlags_SourceAutoExpirePayload = 1 << 5,
-
- ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
- ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
- ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
- ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
- };
- #define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F" // float[3]: Standard type for colors, without alpha. User code may use this type.
- #define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F" // float[4]: Standard type for colors. User code may use this type.
- enum ImGuiDataType_
- {
- ImGuiDataType_S8,
- ImGuiDataType_U8,
- ImGuiDataType_S16,
- ImGuiDataType_U16,
- ImGuiDataType_S32,
- ImGuiDataType_U32,
- ImGuiDataType_S64,
- ImGuiDataType_U64,
- ImGuiDataType_Float,
- ImGuiDataType_Double,
- ImGuiDataType_COUNT
- };
- enum ImGuiDir_
- {
- ImGuiDir_None = -1,
- ImGuiDir_Left = 0,
- ImGuiDir_Right = 1,
- ImGuiDir_Up = 2,
- ImGuiDir_Down = 3,
- ImGuiDir_COUNT
- };
- enum ImGuiSortDirection_
- {
- ImGuiSortDirection_None = 0,
- ImGuiSortDirection_Ascending = 1,
- ImGuiSortDirection_Descending = 2
- };
- enum ImGuiKey_
- {
- ImGuiKey_Tab,
- ImGuiKey_LeftArrow,
- ImGuiKey_RightArrow,
- ImGuiKey_UpArrow,
- ImGuiKey_DownArrow,
- ImGuiKey_PageUp,
- ImGuiKey_PageDown,
- ImGuiKey_Home,
- ImGuiKey_End,
- ImGuiKey_Insert,
- ImGuiKey_Delete,
- ImGuiKey_Backspace,
- ImGuiKey_Space,
- ImGuiKey_Enter,
- ImGuiKey_Escape,
- ImGuiKey_KeyPadEnter,
- ImGuiKey_A,
- ImGuiKey_C,
- ImGuiKey_V,
- ImGuiKey_X,
- ImGuiKey_Y,
- ImGuiKey_Z,
- ImGuiKey_COUNT
- };
- enum ImGuiKeyModFlags_
- {
- ImGuiKeyModFlags_None = 0,
- ImGuiKeyModFlags_Ctrl = 1 << 0,
- ImGuiKeyModFlags_Shift = 1 << 1,
- ImGuiKeyModFlags_Alt = 1 << 2,
- ImGuiKeyModFlags_Super = 1 << 3
- };
- enum ImGuiNavInput_
- {
-
- ImGuiNavInput_Activate,
- ImGuiNavInput_Cancel,
- ImGuiNavInput_Input,
- ImGuiNavInput_Menu,
- ImGuiNavInput_DpadLeft,
- ImGuiNavInput_DpadRight,
- ImGuiNavInput_DpadUp,
- ImGuiNavInput_DpadDown,
- ImGuiNavInput_LStickLeft,
- ImGuiNavInput_LStickRight,
- ImGuiNavInput_LStickUp,
- ImGuiNavInput_LStickDown,
- ImGuiNavInput_FocusPrev,
- ImGuiNavInput_FocusNext,
- ImGuiNavInput_TweakSlow,
- ImGuiNavInput_TweakFast,
-
-
- ImGuiNavInput_KeyLeft_,
- ImGuiNavInput_KeyRight_,
- ImGuiNavInput_KeyUp_,
- ImGuiNavInput_KeyDown_,
- ImGuiNavInput_COUNT,
- ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyLeft_
- };
- enum ImGuiConfigFlags_
- {
- ImGuiConfigFlags_None = 0,
- ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
- ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
- ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
- ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3,
- ImGuiConfigFlags_NoMouse = 1 << 4,
- ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
-
- ImGuiConfigFlags_IsSRGB = 1 << 20,
- ImGuiConfigFlags_IsTouchScreen = 1 << 21
- };
- enum ImGuiBackendFlags_
- {
- ImGuiBackendFlags_None = 0,
- ImGuiBackendFlags_HasGamepad = 1 << 0,
- ImGuiBackendFlags_HasMouseCursors = 1 << 1,
- ImGuiBackendFlags_HasSetMousePos = 1 << 2,
- ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3
- };
- enum ImGuiCol_
- {
- ImGuiCol_Text,
- ImGuiCol_TextDisabled,
- ImGuiCol_WindowBg,
- ImGuiCol_ChildBg,
- ImGuiCol_PopupBg,
- ImGuiCol_Border,
- ImGuiCol_BorderShadow,
- ImGuiCol_FrameBg,
- ImGuiCol_FrameBgHovered,
- ImGuiCol_FrameBgActive,
- ImGuiCol_TitleBg,
- ImGuiCol_TitleBgActive,
- ImGuiCol_TitleBgCollapsed,
- ImGuiCol_MenuBarBg,
- ImGuiCol_ScrollbarBg,
- ImGuiCol_ScrollbarGrab,
- ImGuiCol_ScrollbarGrabHovered,
- ImGuiCol_ScrollbarGrabActive,
- ImGuiCol_CheckMark,
- ImGuiCol_SliderGrab,
- ImGuiCol_SliderGrabActive,
- ImGuiCol_Button,
- ImGuiCol_ButtonHovered,
- ImGuiCol_ButtonActive,
- ImGuiCol_Header,
- ImGuiCol_HeaderHovered,
- ImGuiCol_HeaderActive,
- ImGuiCol_Separator,
- ImGuiCol_SeparatorHovered,
- ImGuiCol_SeparatorActive,
- ImGuiCol_ResizeGrip,
- ImGuiCol_ResizeGripHovered,
- ImGuiCol_ResizeGripActive,
- ImGuiCol_Tab,
- ImGuiCol_TabHovered,
- ImGuiCol_TabActive,
- ImGuiCol_TabUnfocused,
- ImGuiCol_TabUnfocusedActive,
- ImGuiCol_PlotLines,
- ImGuiCol_PlotLinesHovered,
- ImGuiCol_PlotHistogram,
- ImGuiCol_PlotHistogramHovered,
- ImGuiCol_TableHeaderBg,
- ImGuiCol_TableBorderStrong,
- ImGuiCol_TableBorderLight,
- ImGuiCol_TableRowBg,
- ImGuiCol_TableRowBgAlt,
- ImGuiCol_TextSelectedBg,
- ImGuiCol_DragDropTarget,
- ImGuiCol_NavHighlight,
- ImGuiCol_NavWindowingHighlight,
- ImGuiCol_NavWindowingDimBg,
- ImGuiCol_ModalWindowDimBg,
- ImGuiCol_COUNT
- };
- enum ImGuiStyleVar_
- {
-
- ImGuiStyleVar_Alpha,
- ImGuiStyleVar_DisabledAlpha,
- ImGuiStyleVar_WindowPadding,
- ImGuiStyleVar_WindowRounding,
- ImGuiStyleVar_WindowBorderSize,
- ImGuiStyleVar_WindowMinSize,
- ImGuiStyleVar_WindowTitleAlign,
- ImGuiStyleVar_ChildRounding,
- ImGuiStyleVar_ChildBorderSize,
- ImGuiStyleVar_PopupRounding,
- ImGuiStyleVar_PopupBorderSize,
- ImGuiStyleVar_FramePadding,
- ImGuiStyleVar_FrameRounding,
- ImGuiStyleVar_FrameBorderSize,
- ImGuiStyleVar_ItemSpacing,
- ImGuiStyleVar_ItemInnerSpacing,
- ImGuiStyleVar_IndentSpacing,
- ImGuiStyleVar_CellPadding,
- ImGuiStyleVar_ScrollbarSize,
- ImGuiStyleVar_ScrollbarRounding,
- ImGuiStyleVar_GrabMinSize,
- ImGuiStyleVar_GrabRounding,
- ImGuiStyleVar_TabRounding,
- ImGuiStyleVar_ButtonTextAlign,
- ImGuiStyleVar_SelectableTextAlign,
- ImGuiStyleVar_COUNT
- };
- enum ImGuiButtonFlags_
- {
- ImGuiButtonFlags_None = 0,
- ImGuiButtonFlags_MouseButtonLeft = 1 << 0,
- ImGuiButtonFlags_MouseButtonRight = 1 << 1,
- ImGuiButtonFlags_MouseButtonMiddle = 1 << 2,
-
- ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
- ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft
- };
- enum ImGuiColorEditFlags_
- {
- ImGuiColorEditFlags_None = 0,
- ImGuiColorEditFlags_NoAlpha = 1 << 1,
- ImGuiColorEditFlags_NoPicker = 1 << 2,
- ImGuiColorEditFlags_NoOptions = 1 << 3,
- ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
- ImGuiColorEditFlags_NoInputs = 1 << 5,
- ImGuiColorEditFlags_NoTooltip = 1 << 6,
- ImGuiColorEditFlags_NoLabel = 1 << 7,
- ImGuiColorEditFlags_NoSidePreview = 1 << 8,
- ImGuiColorEditFlags_NoDragDrop = 1 << 9,
- ImGuiColorEditFlags_NoBorder = 1 << 10,
-
- ImGuiColorEditFlags_AlphaBar = 1 << 16,
- ImGuiColorEditFlags_AlphaPreview = 1 << 17,
- ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 18,
- ImGuiColorEditFlags_HDR = 1 << 19,
- ImGuiColorEditFlags_DisplayRGB = 1 << 20,
- ImGuiColorEditFlags_DisplayHSV = 1 << 21,
- ImGuiColorEditFlags_DisplayHex = 1 << 22,
- ImGuiColorEditFlags_Uint8 = 1 << 23,
- ImGuiColorEditFlags_Float = 1 << 24,
- ImGuiColorEditFlags_PickerHueBar = 1 << 25,
- ImGuiColorEditFlags_PickerHueWheel = 1 << 26,
- ImGuiColorEditFlags_InputRGB = 1 << 27,
- ImGuiColorEditFlags_InputHSV = 1 << 28,
-
-
- ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
-
- ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
- ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
- ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
- ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV
-
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- , ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex
- #endif
- };
- enum ImGuiSliderFlags_
- {
- ImGuiSliderFlags_None = 0,
- ImGuiSliderFlags_AlwaysClamp = 1 << 4,
- ImGuiSliderFlags_Logarithmic = 1 << 5,
- ImGuiSliderFlags_NoRoundToFormat = 1 << 6,
- ImGuiSliderFlags_NoInput = 1 << 7,
- ImGuiSliderFlags_InvalidMask_ = 0x7000000F
-
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- , ImGuiSliderFlags_ClampOnInput = ImGuiSliderFlags_AlwaysClamp
- #endif
- };
- enum ImGuiMouseButton_
- {
- ImGuiMouseButton_Left = 0,
- ImGuiMouseButton_Right = 1,
- ImGuiMouseButton_Middle = 2,
- ImGuiMouseButton_COUNT = 5
- };
- enum ImGuiMouseCursor_
- {
- ImGuiMouseCursor_None = -1,
- ImGuiMouseCursor_Arrow = 0,
- ImGuiMouseCursor_TextInput,
- ImGuiMouseCursor_ResizeAll,
- ImGuiMouseCursor_ResizeNS,
- ImGuiMouseCursor_ResizeEW,
- ImGuiMouseCursor_ResizeNESW,
- ImGuiMouseCursor_ResizeNWSE,
- ImGuiMouseCursor_Hand,
- ImGuiMouseCursor_NotAllowed,
- ImGuiMouseCursor_COUNT
- };
- enum ImGuiCond_
- {
- ImGuiCond_None = 0,
- ImGuiCond_Always = 1 << 0,
- ImGuiCond_Once = 1 << 1,
- ImGuiCond_FirstUseEver = 1 << 2,
- ImGuiCond_Appearing = 1 << 3
- };
- struct ImNewWrapper {};
- inline void* operator new(size_t, ImNewWrapper, void* ptr) { return ptr; }
- inline void operator delete(void*, ImNewWrapper, void*) {}
- #define IM_ALLOC(_SIZE) ImGui::MemAlloc(_SIZE)
- #define IM_FREE(_PTR) ImGui::MemFree(_PTR)
- #define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR)
- #define IM_NEW(_TYPE) new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE
- template<typename T> void IM_DELETE(T* p) { if (p) { p->~T(); ImGui::MemFree(p); } }
- IM_MSVC_RUNTIME_CHECKS_OFF
- template<typename T>
- struct ImVector
- {
- int Size;
- int Capacity;
- T* Data;
-
- typedef T value_type;
- typedef value_type* iterator;
- typedef const value_type* const_iterator;
-
- inline ImVector() { Size = Capacity = 0; Data = NULL; }
- inline ImVector(const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
- inline ImVector<T>& operator=(const ImVector<T>& src) { clear(); resize(src.Size); memcpy(Data, src.Data, (size_t)Size * sizeof(T)); return *this; }
- inline ~ImVector() { if (Data) IM_FREE(Data); }
- inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
- inline void clear_delete() { for (int n = 0; n < Size; n++) IM_DELETE(Data[n]); clear(); }
- inline void clear_destruct() { for (int n = 0; n < Size; n++) Data[n].~T(); clear(); }
- inline bool empty() const { return Size == 0; }
- inline int size() const { return Size; }
- inline int size_in_bytes() const { return Size * (int)sizeof(T); }
- inline int max_size() const { return 0x7FFFFFFF / (int)sizeof(T); }
- inline int capacity() const { return Capacity; }
- inline T& operator[](int i) { IM_ASSERT(i >= 0 && i < Size); return Data[i]; }
- inline const T& operator[](int i) const { IM_ASSERT(i >= 0 && i < Size); return Data[i]; }
- inline T* begin() { return Data; }
- inline const T* begin() const { return Data; }
- inline T* end() { return Data + Size; }
- inline const T* end() const { return Data + Size; }
- inline T& front() { IM_ASSERT(Size > 0); return Data[0]; }
- inline const T& front() const { IM_ASSERT(Size > 0); return Data[0]; }
- inline T& back() { IM_ASSERT(Size > 0); return Data[Size - 1]; }
- inline const T& back() const { IM_ASSERT(Size > 0); return Data[Size - 1]; }
- inline void swap(ImVector<T>& rhs) { int rhs_size = rhs.Size; rhs.Size = Size; Size = rhs_size; int rhs_cap = rhs.Capacity; rhs.Capacity = Capacity; Capacity = rhs_cap; T* rhs_data = rhs.Data; rhs.Data = Data; Data = rhs_data; }
- inline int _grow_capacity(int sz) const { int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8; return new_capacity > sz ? new_capacity : sz; }
- inline void resize(int new_size) { if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
- inline void resize(int new_size, const T& v) { if (new_size > Capacity) reserve(_grow_capacity(new_size)); if (new_size > Size) for (int n = Size; n < new_size; n++) memcpy(&Data[n], &v, sizeof(v)); Size = new_size; }
- inline void shrink(int new_size) { IM_ASSERT(new_size <= Size); Size = new_size; }
- inline void reserve(int new_capacity) { if (new_capacity <= Capacity) return; T* new_data = (T*)IM_ALLOC((size_t)new_capacity * sizeof(T)); if (Data) { memcpy(new_data, Data, (size_t)Size * sizeof(T)); IM_FREE(Data); } Data = new_data; Capacity = new_capacity; }
-
- inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; }
- inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
- inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); }
- inline T* erase(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((size_t)Size - (size_t)off - 1) * sizeof(T)); Size--; return Data + off; }
- inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last > it && it_last <= Data + Size); const ptrdiff_t count = it_last - it; const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((size_t)Size - (size_t)off - (size_t)count) * sizeof(T)); Size -= (int)count; return Data + off; }
- inline T* erase_unsorted(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; if (it < Data + Size - 1) memcpy(Data + off, Data + Size - 1, sizeof(T)); Size--; return Data + off; }
- inline T* insert(const T* it, const T& v) { IM_ASSERT(it >= Data && it <= Data + Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(T)); memcpy(&Data[off], &v, sizeof(v)); Size++; return Data + off; }
- inline bool contains(const T& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data++ == v) return true; return false; }
- inline T* find(const T& v) { T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data == v) break; else ++data; return data; }
- inline const T* find(const T& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data == v) break; else ++data; return data; }
- inline bool find_erase(const T& v) { const T* it = find(v); if (it < Data + Size) { erase(it); return true; } return false; }
- inline bool find_erase_unsorted(const T& v) { const T* it = find(v); if (it < Data + Size) { erase_unsorted(it); return true; } return false; }
- inline int index_from_ptr(const T* it) const { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; return (int)off; }
- };
- IM_MSVC_RUNTIME_CHECKS_RESTORE
- struct ImGuiStyle
- {
- float Alpha;
- float DisabledAlpha;
- ImVec2 WindowPadding;
- float WindowRounding;
- float WindowBorderSize;
- ImVec2 WindowMinSize;
- ImVec2 WindowTitleAlign;
- ImGuiDir WindowMenuButtonPosition;
- float ChildRounding;
- float ChildBorderSize;
- float PopupRounding;
- float PopupBorderSize;
- ImVec2 FramePadding;
- float FrameRounding;
- float FrameBorderSize;
- ImVec2 ItemSpacing;
- ImVec2 ItemInnerSpacing;
- ImVec2 CellPadding;
- ImVec2 TouchExtraPadding;
- float IndentSpacing;
- float ColumnsMinSpacing;
- float ScrollbarSize;
- float ScrollbarRounding;
- float GrabMinSize;
- float GrabRounding;
- float LogSliderDeadzone;
- float TabRounding;
- float TabBorderSize;
- float TabMinWidthForCloseButton;
- ImGuiDir ColorButtonPosition;
- ImVec2 ButtonTextAlign;
- ImVec2 SelectableTextAlign;
- ImVec2 DisplayWindowPadding;
- ImVec2 DisplaySafeAreaPadding;
- float MouseCursorScale;
- bool AntiAliasedLines;
- bool AntiAliasedLinesUseTex;
- bool AntiAliasedFill;
- float CurveTessellationTol;
- float CircleTessellationMaxError;
- ImVec4 Colors[ImGuiCol_COUNT];
- IMGUI_API ImGuiStyle();
- IMGUI_API void ScaleAllSizes(float scale_factor);
- };
- struct ImGuiIO
- {
-
-
-
- ImGuiConfigFlags ConfigFlags;
- ImGuiBackendFlags BackendFlags;
- ImVec2 DisplaySize;
- float DeltaTime;
- float IniSavingRate;
- const char* IniFilename;
- const char* LogFilename;
- float MouseDoubleClickTime;
- float MouseDoubleClickMaxDist;
- float MouseDragThreshold;
- int KeyMap[ImGuiKey_COUNT];
- float KeyRepeatDelay;
- float KeyRepeatRate;
- void* UserData;
- ImFontAtlas*Fonts;
- float FontGlobalScale;
- bool FontAllowUserScaling;
- ImFont* FontDefault;
- ImVec2 DisplayFramebufferScale;
-
- bool MouseDrawCursor;
- bool ConfigMacOSXBehaviors;
- bool ConfigInputTextCursorBlink;
- bool ConfigDragClickToInputText;
- bool ConfigWindowsResizeFromEdges;
- bool ConfigWindowsMoveFromTitleBarOnly;
- float ConfigMemoryCompactTimer;
-
-
-
-
-
- const char* BackendPlatformName;
- const char* BackendRendererName;
- void* BackendPlatformUserData;
- void* BackendRendererUserData;
- void* BackendLanguageUserData;
-
-
- const char* (*GetClipboardTextFn)(void* user_data);
- void (*SetClipboardTextFn)(void* user_data, const char* text);
- void* ClipboardUserData;
-
-
- void (*ImeSetInputScreenPosFn)(int x, int y);
- void* ImeWindowHandle;
-
-
-
- ImVec2 MousePos;
- bool MouseDown[5];
- float MouseWheel;
- float MouseWheelH;
- bool KeyCtrl;
- bool KeyShift;
- bool KeyAlt;
- bool KeySuper;
- bool KeysDown[512];
- float NavInputs[ImGuiNavInput_COUNT];
-
- IMGUI_API void AddInputCharacter(unsigned int c);
- IMGUI_API void AddInputCharacterUTF16(ImWchar16 c);
- IMGUI_API void AddInputCharactersUTF8(const char* str);
- IMGUI_API void AddFocusEvent(bool focused);
- IMGUI_API void ClearInputCharacters();
- IMGUI_API void ClearInputKeys();
-
-
-
-
-
- bool WantCaptureMouse;
- bool WantCaptureKeyboard;
- bool WantTextInput;
- bool WantSetMousePos;
- bool WantSaveIniSettings;
- bool NavActive;
- bool NavVisible;
- float Framerate;
- int MetricsRenderVertices;
- int MetricsRenderIndices;
- int MetricsRenderWindows;
- int MetricsActiveWindows;
- int MetricsActiveAllocations;
- ImVec2 MouseDelta;
-
-
-
- bool WantCaptureMouseUnlessPopupClose;
- ImGuiKeyModFlags KeyMods;
- ImGuiKeyModFlags KeyModsPrev;
- ImVec2 MousePosPrev;
- ImVec2 MouseClickedPos[5];
- double MouseClickedTime[5];
- bool MouseClicked[5];
- bool MouseDoubleClicked[5];
- bool MouseReleased[5];
- bool MouseDownOwned[5];
- bool MouseDownOwnedUnlessPopupClose[5];
- bool MouseDownWasDoubleClick[5];
- float MouseDownDuration[5];
- float MouseDownDurationPrev[5];
- ImVec2 MouseDragMaxDistanceAbs[5];
- float MouseDragMaxDistanceSqr[5];
- float KeysDownDuration[512];
- float KeysDownDurationPrev[512];
- float NavInputsDownDuration[ImGuiNavInput_COUNT];
- float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
- float PenPressure;
- bool AppFocusLost;
- ImWchar16 InputQueueSurrogate;
- ImVector<ImWchar> InputQueueCharacters;
- IMGUI_API ImGuiIO();
- };
- struct ImGuiInputTextCallbackData
- {
- ImGuiInputTextFlags EventFlag;
- ImGuiInputTextFlags Flags;
- void* UserData;
-
-
-
- ImWchar EventChar;
- ImGuiKey EventKey;
- char* Buf;
- int BufTextLen;
- int BufSize;
- bool BufDirty;
- int CursorPos;
- int SelectionStart;
- int SelectionEnd;
-
-
- IMGUI_API ImGuiInputTextCallbackData();
- IMGUI_API void DeleteChars(int pos, int bytes_count);
- IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL);
- void SelectAll() { SelectionStart = 0; SelectionEnd = BufTextLen; }
- void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; }
- bool HasSelection() const { return SelectionStart != SelectionEnd; }
- };
- struct ImGuiSizeCallbackData
- {
- void* UserData;
- ImVec2 Pos;
- ImVec2 CurrentSize;
- ImVec2 DesiredSize;
- };
- struct ImGuiPayload
- {
-
- void* Data;
- int DataSize;
-
- ImGuiID SourceId;
- ImGuiID SourceParentId;
- int DataFrameCount;
- char DataType[32 + 1];
- bool Preview;
- bool Delivery;
- ImGuiPayload() { Clear(); }
- void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0, sizeof(DataType)); DataFrameCount = -1; Preview = Delivery = false; }
- bool IsDataType(const char* type) const { return DataFrameCount != -1 && strcmp(type, DataType) == 0; }
- bool IsPreview() const { return Preview; }
- bool IsDelivery() const { return Delivery; }
- };
- struct ImGuiTableColumnSortSpecs
- {
- ImGuiID ColumnUserID;
- ImS16 ColumnIndex;
- ImS16 SortOrder;
- ImGuiSortDirection SortDirection : 8;
- ImGuiTableColumnSortSpecs() { memset(this, 0, sizeof(*this)); }
- };
- struct ImGuiTableSortSpecs
- {
- const ImGuiTableColumnSortSpecs* Specs;
- int SpecsCount;
- bool SpecsDirty;
- ImGuiTableSortSpecs() { memset(this, 0, sizeof(*this)); }
- };
- #define IM_UNICODE_CODEPOINT_INVALID 0xFFFD // Invalid Unicode code point (standard value).
- #ifdef IMGUI_USE_WCHAR32
- #define IM_UNICODE_CODEPOINT_MAX 0x10FFFF // Maximum Unicode code point supported by this build.
- #else
- #define IM_UNICODE_CODEPOINT_MAX 0xFFFF // Maximum Unicode code point supported by this build.
- #endif
- struct ImGuiOnceUponAFrame
- {
- ImGuiOnceUponAFrame() { RefFrame = -1; }
- mutable int RefFrame;
- operator bool() const { int current_frame = ImGui::GetFrameCount(); if (RefFrame == current_frame) return false; RefFrame = current_frame; return true; }
- };
- struct ImGuiTextFilter
- {
- IMGUI_API ImGuiTextFilter(const char* default_filter = "");
- IMGUI_API bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f);
- IMGUI_API bool PassFilter(const char* text, const char* text_end = NULL) const;
- IMGUI_API void Build();
- void Clear() { InputBuf[0] = 0; Build(); }
- bool IsActive() const { return !Filters.empty(); }
-
- struct ImGuiTextRange
- {
- const char* b;
- const char* e;
- ImGuiTextRange() { b = e = NULL; }
- ImGuiTextRange(const char* _b, const char* _e) { b = _b; e = _e; }
- bool empty() const { return b == e; }
- IMGUI_API void split(char separator, ImVector<ImGuiTextRange>* out) const;
- };
- char InputBuf[256];
- ImVector<ImGuiTextRange>Filters;
- int CountGrep;
- };
- struct ImGuiTextBuffer
- {
- ImVector<char> Buf;
- IMGUI_API static char EmptyString[1];
- ImGuiTextBuffer() { }
- inline char operator[](int i) const { IM_ASSERT(Buf.Data != NULL); return Buf.Data[i]; }
- const char* begin() const { return Buf.Data ? &Buf.front() : EmptyString; }
- const char* end() const { return Buf.Data ? &Buf.back() : EmptyString; }
- int size() const { return Buf.Size ? Buf.Size - 1 : 0; }
- bool empty() const { return Buf.Size <= 1; }
- void clear() { Buf.clear(); }
- void reserve(int capacity) { Buf.reserve(capacity); }
- const char* c_str() const { return Buf.Data ? Buf.Data : EmptyString; }
- IMGUI_API void append(const char* str, const char* str_end = NULL);
- IMGUI_API void appendf(const char* fmt, ...) IM_FMTARGS(2);
- IMGUI_API void appendfv(const char* fmt, va_list args) IM_FMTLIST(2);
- };
- struct ImGuiStorage
- {
-
- struct ImGuiStoragePair
- {
- ImGuiID key;
- union { int val_i; float val_f; void* val_p; };
- ImGuiStoragePair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; }
- ImGuiStoragePair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; }
- ImGuiStoragePair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; }
- };
- ImVector<ImGuiStoragePair> Data;
-
-
-
- void Clear() { Data.clear(); }
- IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const;
- IMGUI_API void SetInt(ImGuiID key, int val);
- IMGUI_API bool GetBool(ImGuiID key, bool default_val = false) const;
- IMGUI_API void SetBool(ImGuiID key, bool val);
- IMGUI_API float GetFloat(ImGuiID key, float default_val = 0.0f) const;
- IMGUI_API void SetFloat(ImGuiID key, float val);
- IMGUI_API void* GetVoidPtr(ImGuiID key) const;
- IMGUI_API void SetVoidPtr(ImGuiID key, void* val);
-
-
-
-
- IMGUI_API int* GetIntRef(ImGuiID key, int default_val = 0);
- IMGUI_API bool* GetBoolRef(ImGuiID key, bool default_val = false);
- IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0.0f);
- IMGUI_API void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL);
-
- IMGUI_API void SetAllInt(int val);
-
- IMGUI_API void BuildSortByKey();
- };
- struct ImGuiListClipper
- {
- int DisplayStart;
- int DisplayEnd;
-
- int ItemsCount;
- int StepNo;
- int ItemsFrozen;
- float ItemsHeight;
- float StartPosY;
- IMGUI_API ImGuiListClipper();
- IMGUI_API ~ImGuiListClipper();
-
-
- IMGUI_API void Begin(int items_count, float items_height = -1.0f);
- IMGUI_API void End();
- IMGUI_API bool Step();
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- inline ImGuiListClipper(int items_count, float items_height = -1.0f) { memset(this, 0, sizeof(*this)); ItemsCount = -1; Begin(items_count, items_height); }
- #endif
- };
- #ifdef IMGUI_USE_BGRA_PACKED_COLOR
- #define IM_COL32_R_SHIFT 16
- #define IM_COL32_G_SHIFT 8
- #define IM_COL32_B_SHIFT 0
- #define IM_COL32_A_SHIFT 24
- #define IM_COL32_A_MASK 0xFF000000
- #else
- #define IM_COL32_R_SHIFT 0
- #define IM_COL32_G_SHIFT 8
- #define IM_COL32_B_SHIFT 16
- #define IM_COL32_A_SHIFT 24
- #define IM_COL32_A_MASK 0xFF000000
- #endif
- #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))
- #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF
- #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black
- #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000
- // Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
- // Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API.
- // **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE.
- // **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.
- struct ImColor
- {
- ImVec4 Value;
- ImColor() { Value.x = Value.y = Value.z = Value.w = 0.0f; }
- ImColor(int r, int g, int b, int a = 255) { float sc = 1.0f / 255.0f; Value.x = (float)r * sc; Value.y = (float)g * sc; Value.z = (float)b * sc; Value.w = (float)a * sc; }
- ImColor(ImU32 rgba) { float sc = 1.0f / 255.0f; Value.x = (float)((rgba >> IM_COL32_R_SHIFT) & 0xFF) * sc; Value.y = (float)((rgba >> IM_COL32_G_SHIFT) & 0xFF) * sc; Value.z = (float)((rgba >> IM_COL32_B_SHIFT) & 0xFF) * sc; Value.w = (float)((rgba >> IM_COL32_A_SHIFT) & 0xFF) * sc; }
- ImColor(float r, float g, float b, float a = 1.0f) { Value.x = r; Value.y = g; Value.z = b; Value.w = a; }
- ImColor(const ImVec4& col) { Value = col; }
- inline operator ImU32() const { return ImGui::ColorConvertFloat4ToU32(Value); }
- inline operator ImVec4() const { return Value; }
-
- 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; }
- 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); }
- };
- #ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX
- #define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (63)
- #endif
- #ifndef ImDrawCallback
- typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd);
- #endif
- #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-1)
- struct ImDrawCmd
- {
- ImVec4 ClipRect;
- ImTextureID TextureId;
- unsigned int VtxOffset;
- unsigned int IdxOffset;
- unsigned int ElemCount;
- ImDrawCallback UserCallback;
- void* UserCallbackData;
- ImDrawCmd() { memset(this, 0, sizeof(*this)); }
-
- inline ImTextureID GetTexID() const { return TextureId; }
- };
- #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT
- struct ImDrawVert
- {
- ImVec2 pos;
- ImVec2 uv;
- ImU32 col;
- };
- #else
- IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
- #endif
- struct ImDrawCmdHeader
- {
- ImVec4 ClipRect;
- ImTextureID TextureId;
- unsigned int VtxOffset;
- };
- struct ImDrawChannel
- {
- ImVector<ImDrawCmd> _CmdBuffer;
- ImVector<ImDrawIdx> _IdxBuffer;
- };
- struct ImDrawListSplitter
- {
- int _Current;
- int _Count;
- ImVector<ImDrawChannel> _Channels;
- inline ImDrawListSplitter() { memset(this, 0, sizeof(*this)); }
- inline ~ImDrawListSplitter() { ClearFreeMemory(); }
- inline void Clear() { _Current = 0; _Count = 1; }
- IMGUI_API void ClearFreeMemory();
- IMGUI_API void Split(ImDrawList* draw_list, int count);
- IMGUI_API void Merge(ImDrawList* draw_list);
- IMGUI_API void SetCurrentChannel(ImDrawList* draw_list, int channel_idx);
- };
- enum ImDrawFlags_
- {
- ImDrawFlags_None = 0,
- ImDrawFlags_Closed = 1 << 0,
- ImDrawFlags_RoundCornersTopLeft = 1 << 4,
- ImDrawFlags_RoundCornersTopRight = 1 << 5,
- ImDrawFlags_RoundCornersBottomLeft = 1 << 6,
- ImDrawFlags_RoundCornersBottomRight = 1 << 7,
- ImDrawFlags_RoundCornersNone = 1 << 8,
- ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight,
- ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
- ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft,
- ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight,
- ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
- ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll,
- ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone
- };
- enum ImDrawListFlags_
- {
- ImDrawListFlags_None = 0,
- ImDrawListFlags_AntiAliasedLines = 1 << 0,
- ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1,
- ImDrawListFlags_AntiAliasedFill = 1 << 2,
- ImDrawListFlags_AllowVtxOffset = 1 << 3
- };
- struct ImDrawList
- {
-
- ImVector<ImDrawCmd> CmdBuffer;
- ImVector<ImDrawIdx> IdxBuffer;
- ImVector<ImDrawVert> VtxBuffer;
- ImDrawListFlags Flags;
-
- unsigned int _VtxCurrentIdx;
- const ImDrawListSharedData* _Data;
- const char* _OwnerName;
- ImDrawVert* _VtxWritePtr;
- ImDrawIdx* _IdxWritePtr;
- ImVector<ImVec4> _ClipRectStack;
- ImVector<ImTextureID> _TextureIdStack;
- ImVector<ImVec2> _Path;
- ImDrawCmdHeader _CmdHeader;
- ImDrawListSplitter _Splitter;
- float _FringeScale;
-
- ImDrawList(const ImDrawListSharedData* shared_data) { memset(this, 0, sizeof(*this)); _Data = shared_data; }
- ~ImDrawList() { _ClearFreeMemory(); }
- IMGUI_API void PushClipRect(ImVec2 clip_rect_min, ImVec2 clip_rect_max, bool intersect_with_current_clip_rect = false);
- IMGUI_API void PushClipRectFullScreen();
- IMGUI_API void PopClipRect();
- IMGUI_API void PushTextureID(ImTextureID texture_id);
- IMGUI_API void PopTextureID();
- inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.x, cr.y); }
- inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.z, cr.w); }
-
-
-
-
-
-
- IMGUI_API void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f);
- IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0, float thickness = 1.0f);
- IMGUI_API void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0);
- 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);
- IMGUI_API void AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness = 1.0f);
- IMGUI_API void AddQuadFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col);
- IMGUI_API void AddTriangle(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness = 1.0f);
- IMGUI_API void AddTriangleFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col);
- IMGUI_API void AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments = 0, float thickness = 1.0f);
- IMGUI_API void AddCircleFilled(const ImVec2& center, float radius, ImU32 col, int num_segments = 0);
- IMGUI_API void AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness = 1.0f);
- IMGUI_API void AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments);
- IMGUI_API void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL);
- IMGUI_API void AddText(const 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);
- IMGUI_API void AddPolyline(const ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness);
- IMGUI_API void AddConvexPolyFilled(const ImVec2* points, int num_points, ImU32 col);
- IMGUI_API void AddBezierCubic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0);
- IMGUI_API void AddBezierQuadratic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness, int num_segments = 0);
-
-
-
-
- IMGUI_API void AddImage(ImTextureID user_texture_id, 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);
- IMGUI_API void AddImageQuad(ImTextureID user_texture_id, 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);
- IMGUI_API void AddImageRounded(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags = 0);
-
- inline void PathClear() { _Path.Size = 0; }
- inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); }
- inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); }
- inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
- inline void PathStroke(ImU32 col, ImDrawFlags flags = 0, float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, flags, thickness); _Path.Size = 0; }
- IMGUI_API void PathArcTo(const ImVec2& center, float radius, float a_min, float a_max, int num_segments = 0);
- IMGUI_API void PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12);
- IMGUI_API void PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0);
- IMGUI_API void PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments = 0);
- IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawFlags flags = 0);
-
- IMGUI_API void AddCallback(ImDrawCallback callback, void* callback_data);
- IMGUI_API void AddDrawCmd();
- IMGUI_API ImDrawList* CloneOutput() const;
-
-
-
-
-
-
- inline void ChannelsSplit(int count) { _Splitter.Split(this, count); }
- inline void ChannelsMerge() { _Splitter.Merge(this); }
- inline void ChannelsSetCurrent(int n) { _Splitter.SetCurrentChannel(this, n); }
-
-
-
- IMGUI_API void PrimReserve(int idx_count, int vtx_count);
- IMGUI_API void PrimUnreserve(int idx_count, int vtx_count);
- IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col);
- IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col);
- 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);
- inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
- inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
- inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- inline void 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); }
- inline void PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); }
- #endif
-
- IMGUI_API void _ResetForNewFrame();
- IMGUI_API void _ClearFreeMemory();
- IMGUI_API void _PopUnusedDrawCmd();
- IMGUI_API void _TryMergeDrawCmds();
- IMGUI_API void _OnChangedClipRect();
- IMGUI_API void _OnChangedTextureID();
- IMGUI_API void _OnChangedVtxOffset();
- IMGUI_API int _CalcCircleAutoSegmentCount(float radius) const;
- IMGUI_API void _PathArcToFastEx(const ImVec2& center, float radius, int a_min_sample, int a_max_sample, int a_step);
- IMGUI_API void _PathArcToN(const ImVec2& center, float radius, float a_min, float a_max, int num_segments);
- };
- struct ImDrawData
- {
- bool Valid;
- int CmdListsCount;
- int TotalIdxCount;
- int TotalVtxCount;
- ImDrawList** CmdLists;
- ImVec2 DisplayPos;
- ImVec2 DisplaySize;
- ImVec2 FramebufferScale;
-
- ImDrawData() { Clear(); }
- void Clear() { memset(this, 0, sizeof(*this)); }
- IMGUI_API void DeIndexAllBuffers();
- IMGUI_API void ScaleClipRects(const ImVec2& fb_scale);
- };
- struct ImFontConfig
- {
- void* FontData;
- int FontDataSize;
- bool FontDataOwnedByAtlas;
- int FontNo;
- float SizePixels;
- int OversampleH;
- int OversampleV;
- bool PixelSnapH;
- ImVec2 GlyphExtraSpacing;
- ImVec2 GlyphOffset;
- const ImWchar* GlyphRanges;
- float GlyphMinAdvanceX;
- float GlyphMaxAdvanceX;
- bool MergeMode;
- unsigned int FontBuilderFlags;
- float RasterizerMultiply;
- ImWchar EllipsisChar;
-
- char Name[40];
- ImFont* DstFont;
- IMGUI_API ImFontConfig();
- };
- struct ImFontGlyph
- {
- unsigned int Colored : 1;
- unsigned int Visible : 1;
- unsigned int Codepoint : 30;
- float AdvanceX;
- float X0, Y0, X1, Y1;
- float U0, V0, U1, V1;
- };
- struct ImFontGlyphRangesBuilder
- {
- ImVector<ImU32> UsedChars;
- ImFontGlyphRangesBuilder() { Clear(); }
- 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); }
- inline bool GetBit(size_t n) const { int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); return (UsedChars[off] & mask) != 0; }
- inline void SetBit(size_t n) { int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; }
- inline void AddChar(ImWchar c) { SetBit(c); }
- IMGUI_API void AddText(const char* text, const char* text_end = NULL);
- IMGUI_API void AddRanges(const ImWchar* ranges);
- IMGUI_API void BuildRanges(ImVector<ImWchar>* out_ranges);
- };
- struct ImFontAtlasCustomRect
- {
- unsigned short Width, Height;
- unsigned short X, Y;
- unsigned int GlyphID;
- float GlyphAdvanceX;
- ImVec2 GlyphOffset;
- ImFont* Font;
- ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; }
- bool IsPacked() const { return X != 0xFFFF; }
- };
- enum ImFontAtlasFlags_
- {
- ImFontAtlasFlags_None = 0,
- ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
- ImFontAtlasFlags_NoMouseCursors = 1 << 1,
- ImFontAtlasFlags_NoBakedLines = 1 << 2
- };
- struct ImFontAtlas
- {
- IMGUI_API ImFontAtlas();
- IMGUI_API ~ImFontAtlas();
- IMGUI_API ImFont* AddFont(const ImFontConfig* font_cfg);
- IMGUI_API ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL);
- IMGUI_API ImFont* AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL);
- IMGUI_API ImFont* AddFontFromMemoryTTF(void* font_data, int font_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL);
- IMGUI_API ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL);
- IMGUI_API ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL);
- IMGUI_API void ClearInputData();
- IMGUI_API void ClearTexData();
- IMGUI_API void ClearFonts();
- IMGUI_API void Clear();
-
-
-
-
-
- IMGUI_API bool Build();
- IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL);
- IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL);
- bool IsBuilt() const { return Fonts.Size > 0 && TexReady; }
- void SetTexID(ImTextureID id) { TexID = id; }
-
-
-
-
-
-
- IMGUI_API const ImWchar* GetGlyphRangesDefault();
- IMGUI_API const ImWchar* GetGlyphRangesKorean();
- IMGUI_API const ImWchar* GetGlyphRangesJapanese();
- IMGUI_API const ImWchar* GetGlyphRangesChineseFull();
- IMGUI_API const ImWchar* GetGlyphRangesChineseSimplifiedCommon();
- IMGUI_API const ImWchar* GetGlyphRangesCyrillic();
- IMGUI_API const ImWchar* GetGlyphRangesThai();
- IMGUI_API const ImWchar* GetGlyphRangesVietnamese();
-
-
-
-
-
-
-
-
-
-
- IMGUI_API int AddCustomRectRegular(int width, int height);
- IMGUI_API int AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset = ImVec2(0, 0));
- ImFontAtlasCustomRect* GetCustomRectByIndex(int index) { IM_ASSERT(index >= 0); return &CustomRects[index]; }
-
- IMGUI_API void CalcCustomRectUV(const ImFontAtlasCustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max) const;
- IMGUI_API bool GetMouseCursorTexData(ImGuiMouseCursor cursor, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]);
-
-
-
- ImFontAtlasFlags Flags;
- ImTextureID TexID;
- int TexDesiredWidth;
- int TexGlyphPadding;
- bool Locked;
-
-
- bool TexReady;
- bool TexPixelsUseColors;
- unsigned char* TexPixelsAlpha8;
- unsigned int* TexPixelsRGBA32;
- int TexWidth;
- int TexHeight;
- ImVec2 TexUvScale;
- ImVec2 TexUvWhitePixel;
- ImVector<ImFont*> Fonts;
- ImVector<ImFontAtlasCustomRect> CustomRects;
- ImVector<ImFontConfig> ConfigData;
- ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1];
-
- const ImFontBuilderIO* FontBuilderIO;
- unsigned int FontBuilderFlags;
-
- int PackIdMouseCursors;
- int PackIdLines;
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- typedef ImFontAtlasCustomRect CustomRect;
-
- #endif
- };
- struct ImFont
- {
-
- ImVector<float> IndexAdvanceX;
- float FallbackAdvanceX;
- float FontSize;
-
- ImVector<ImWchar> IndexLookup;
- ImVector<ImFontGlyph> Glyphs;
- const ImFontGlyph* FallbackGlyph;
-
- ImFontAtlas* ContainerAtlas;
- const ImFontConfig* ConfigData;
- short ConfigDataCount;
- ImWchar FallbackChar;
- ImWchar EllipsisChar;
- ImWchar DotChar;
- bool DirtyLookupTables;
- float Scale;
- float Ascent, Descent;
- int MetricsTotalSurface;
- ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8];
-
- IMGUI_API ImFont();
- IMGUI_API ~ImFont();
- IMGUI_API const ImFontGlyph*FindGlyph(ImWchar c) const;
- IMGUI_API const ImFontGlyph*FindGlyphNoFallback(ImWchar c) const;
- float GetCharAdvance(ImWchar c) const { return ((int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; }
- bool IsLoaded() const { return ContainerAtlas != NULL; }
- const char* GetDebugName() const { return ConfigData ? ConfigData->Name : "<unknown>"; }
-
-
- IMGUI_API ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end = NULL, const char** remaining = NULL) const;
- IMGUI_API const char* CalcWordWrapPositionA(float scale, const char* text, const char* text_end, float wrap_width) const;
- IMGUI_API void RenderChar(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, ImWchar c) const;
- IMGUI_API void RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, bool cpu_fine_clip = false) const;
-
- IMGUI_API void BuildLookupTable();
- IMGUI_API void ClearOutputData();
- IMGUI_API void GrowIndex(int new_size);
- IMGUI_API void AddGlyph(const ImFontConfig* src_cfg, ImWchar c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x);
- IMGUI_API void AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst = true);
- IMGUI_API void SetGlyphVisible(ImWchar c, bool visible);
- IMGUI_API bool IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last);
- };
- enum ImGuiViewportFlags_
- {
- ImGuiViewportFlags_None = 0,
- ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
- ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
- ImGuiViewportFlags_OwnedByApp = 1 << 2
- };
- struct ImGuiViewport
- {
- ImGuiViewportFlags Flags;
- ImVec2 Pos;
- ImVec2 Size;
- ImVec2 WorkPos;
- ImVec2 WorkSize;
- ImGuiViewport() { memset(this, 0, sizeof(*this)); }
-
- ImVec2 GetCenter() const { return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
- ImVec2 GetWorkCenter() const { return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
- };
- #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- namespace ImGui
- {
-
- static inline float GetWindowContentRegionWidth() { return GetWindowContentRegionMax().x - GetWindowContentRegionMin().x; }
-
- IMGUI_API bool ListBoxHeader(const char* label, int items_count, int height_in_items = -1);
- static inline bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0, 0)) { return BeginListBox(label, size); }
- static inline void ListBoxFooter() { EndListBox(); }
-
- static inline void OpenPopupContextItem(const char* str_id = NULL, ImGuiMouseButton mb = 1) { OpenPopupOnItemClick(str_id, mb); }
-
-
-
- IMGUI_API bool DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed, const void* p_min, const void* p_max, const char* format, float power);
- IMGUI_API bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, const void* p_min, const void* p_max, const char* format, float power);
- static inline bool DragFloat(const char* label, float* v, float v_speed, float v_min, float v_max, const char* format, float power) { return DragScalar(label, ImGuiDataType_Float, v, v_speed, &v_min, &v_max, format, power); }
- static inline bool DragFloat2(const char* label, float v[2], float v_speed, float v_min, float v_max, const char* format, float power) { return DragScalarN(label, ImGuiDataType_Float, v, 2, v_speed, &v_min, &v_max, format, power); }
- static inline bool DragFloat3(const char* label, float v[3], float v_speed, float v_min, float v_max, const char* format, float power) { return DragScalarN(label, ImGuiDataType_Float, v, 3, v_speed, &v_min, &v_max, format, power); }
- static inline bool DragFloat4(const char* label, float v[4], float v_speed, float v_min, float v_max, const char* format, float power) { return DragScalarN(label, ImGuiDataType_Float, v, 4, v_speed, &v_min, &v_max, format, power); }
- IMGUI_API bool SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, float power);
- 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, float power);
- static inline bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format, float power) { return SliderScalar(label, ImGuiDataType_Float, v, &v_min, &v_max, format, power); }
- static inline bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format, float power) { return SliderScalarN(label, ImGuiDataType_Float, v, 2, &v_min, &v_max, format, power); }
- static inline bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format, float power) { return SliderScalarN(label, ImGuiDataType_Float, v, 3, &v_min, &v_max, format, power); }
- static inline bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format, float power) { return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, power); }
-
- static inline bool BeginPopupContextWindow(const char* str_id, ImGuiMouseButton mb, bool over_items) { return BeginPopupContextWindow(str_id, mb | (over_items ? 0 : ImGuiPopupFlags_NoOpenOverItems)); }
-
- static inline void TreeAdvanceToLabelPos() { SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()); }
-
- static inline void SetNextTreeNodeOpen(bool open, ImGuiCond cond = 0) { SetNextItemOpen(open, cond); }
-
- static inline float GetContentRegionAvailWidth() { return GetContentRegionAvail().x; }
-
-
-
-
-
-
-
-
-
-
-
- }
- typedef ImDrawFlags ImDrawCornerFlags;
- enum ImDrawCornerFlags_
- {
- ImDrawCornerFlags_None = ImDrawFlags_RoundCornersNone,
- ImDrawCornerFlags_TopLeft = ImDrawFlags_RoundCornersTopLeft,
- ImDrawCornerFlags_TopRight = ImDrawFlags_RoundCornersTopRight,
- ImDrawCornerFlags_BotLeft = ImDrawFlags_RoundCornersBottomLeft,
- ImDrawCornerFlags_BotRight = ImDrawFlags_RoundCornersBottomRight,
- ImDrawCornerFlags_All = ImDrawFlags_RoundCornersAll,
- ImDrawCornerFlags_Top = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight,
- ImDrawCornerFlags_Bot = ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight,
- ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
- ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight
- };
- #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
- #if defined(__clang__)
- #pragma clang diagnostic pop
- #elif defined(__GNUC__)
- #pragma GCC diagnostic pop
- #endif
- #ifdef _MSC_VER
- #pragma warning (pop)
- #endif
- #ifdef IMGUI_INCLUDE_IMGUI_USER_H
- #include "imgui_user.h"
- #endif
- #endif // #ifndef IMGUI_DISABLE
|