forked from Green-Sky/tomato
Green Sky
1dccce8097
070c046cd1f Internals: rename recently added TreeNodeIsOpen() -> TreeNodeGetOpen(). (#7553, #1131, #2958, #2079, #722) 7c6d4ff28de TreeNode: Internals: facilitate dissociating item ID from storage ID (useful for 1861) 8bab3eab6a8 Clipper: added SeekCursorForItem() function, for use when using ImGuiListClipper::Begin(INT_MAX). (#1311) 74a1854db9a Nav, Demo: comments. 669021be4cd Style: close button and collapse/window-menu button hover highlight made rectangular instead of round. 67e9aa4d3df Demo: Property Editor: add basic filter. 4247f190c23 Demo: Property Editor: rearrange code + replace use of bool to proper ImGuiChildFlags. 9c1f922b02b Fixed pvs-studio warning. 0e4dcfa5529 Obsoleted PushTabStop()/PopTabStop() in favor of using new PushItemFlag()/PopItemFlag() with ImGuiItemFlags_NoTabStop. 3de75138d1c (Breaking) Renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelectableFlags_NoAutoClosePopups. (#1379, #1468, #2200, #4936, #5216, #7302, #7573) 0de88a928d7 Added ImGuiItemFlags_AutoClosePopups as a replacement for internal's ImGuiItemFlags_SelectableDontClosePopup. (#1379, #1468, #2200, #4936, #5216, #7302, #7573) b4ca869c407 (Breaking) Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag()/PopItemFlag() with ImGuiItemFlags_ButtonRepeat. 7e0800e7186 Added PushItemFlag(), PopItemFlag(), ImGuiItemFlags. 46691d172ec Demo: Reworked "Property Editor" demo in a manner that more ressemble the tree data and struct description data that a real application would want to use. bc9e5b62b6b Added ImGuiDataType_Bool for convenience. ac7d6fb5ca0 Internals: Added TreeNodeIsOpen() to facilitate discoverability. (#7553, #1131, #2958, #2079, #722) 9c2f6003e4f Backends: SDL3: fixed typo leading to PlatformHandleRaw not being set leading to SHOWNA path not working for multi-viewports. df3a74389e8 Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) 126569ad5b3 Fix definition check (#7793) c3c90b49e03 Examples: SDL3+OpenGL: Update for API changes: SDL_GL_DeleteContext() renamed to SDL_GL_DestroyContext(). a8e96ae21a4 Backends: GLFW+Emscripten: Fixed build (#7647) 2937339c175 Backends: GLFW+Emscripten: Added support for GLFW3 contrib port. (#7647) 6816789a6b0 Backends: GLFW+Emscripten: (Breaking) Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to ImGui_ImplGlfw_InstallEmscriptenCallbacks(), added GLFWwindow* parameter. (#7647, #7600) 9504068f66c Backends: Win32: fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN (#7768, #4858, #2622) 6b6026b1332 DemosFix typo in help text in demo Tables/Borders (#7780) 1ec1f7a3de2 Fixed Unix version of PlatformOpenInShellFn_DefaultImpl. (#7772, #7660) 2d0baaabe62 TreeNode: rename/rework ImGuiNavTreeNodeData system to be usable by more features. (#2920, #1131, #7553) 0a73c6ec3f6 Misc tweaks, comments. 0ebf49b4c1f IO: amend PlatformOpenInShellFn specs to return a bool. (#7660) 380b3559c6d Backends: GLFW,SDL2: Added ioPlatformOpenInShellFn handler for web/Emscripten versions. (#7660) 05a4f280596 Internals: added FontScale storage (amend 0f63d3e). 5496050f5f2 Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660) 0f63d3e9164 Internals: added FontScale storage. dadf9cd039b IO: disable default io.PlatformOpenInShellFn() implementation on iPhone, as compiler errors that system() is not available on iOS. 43925b9fa4c Build fix for non Windows platforms. ddd4c9d6b95 Commented out obsolete ImGuiModFlags and ImGuiModFlags_XXX values (renamed to ImGuiKeyChord and ImGuiMod_XXX in 1.89). (#4921, #456) fb799bba7fd (Breaking) IO, IME: renamed platform IME hook io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() and added explicit context. 8f367980357 IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell, added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS. (#7660) 0250dc903ef Demo: changed style editor inline block to its own window. ae708e3bcd7 Backends: SDL3: add default case to fix warnings. (#7763) 7e0b3b9caf8 Debug Log: Added "Configure Outputs.." button. (#5855) a62794359aa Debug Tools: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855) a489585f843 Backends: SDL3: Updated comments (IME seems fixed in SDL3). Added SDL3 examples to Visual Studio solution. 12f92518bc5 Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762) 84cc72f3720 Version 1.91.0 WIP cb16be3a3fc Version 1.90.9 c554c402d30 IO: do not claim io.WantCaptureMouse=true on the mouse release frame of a button which was pressed over void. (#1392) 50a0f18e6ae imgui_freetype: fixed divide by zero while handling FT_PIXEL_MODE_BGRA glyphs. (#7267, #3369) dd5c30d2d75 Disabled: Reworked 1.90.8 behavior of Begin() not inheriting current BeginDisabled() state. Only tooltip are clearing that state. (#211, #7640) 67216910fb0 Examples: SDL3: Remove use of SDL_HINT_IME_NATIVE_UI. ccf3ee674a0 Backends: SDL3: update for SDL_SetTextInputRect() -> SDL_SetTextInputArea() api change. (#7760, #7754) 751bbf38ba5 Backends: SDLRenderer3: Update for SDL_RenderGeometryRaw() API changes. f2c07ed7175 Backends: Allegro5: Correctly handle unstable bit in version checks (#7755) c47928ffc0f Checkbox: minor tidying up to simplify work on multi-select branch. 372eebbeb29 Fix typo, rename ImGuisliderFlags_WrapAround flag to ImGuiSliderFlags_WrapAround. (#7752, #7749) 0403096a9d3 Drags: added ImGuisliderFlags_WrapAround flag for DragInt(), DragFloat() etc. (#7749) c7df9c71214 Backends: Win32: Fixed warning with old MinGW/GCC versions. 404af570049 Backends: OpenGL2, OpenGL3: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). (#7748) 0582f7678a4 Nav: store NavJustMovedToIsTabbing + shuffle a few nav related fields. 77d582fa37b Windows: BeginChild(): fixed a glitch when during a resize of a child window which is tightly close to the boundaries of its parent. (#7706) 953d40c929f Tables: moved TableGetHoveredColumn() to public API. (#7715, #3740) fbb903e1580 Inputs: fixed using Shortcut() or SetNextItemShortcut() within a disabled block bypassing the disabled state. (#7726) dbffb702f83 ImGuiStorage: tweak impl for BuildSortByKey(). 0c2650e8339 Backends: OSX: build fix. Amend 32f9dfc 22b36bef9e6 Examples: undo adding SDL3 example to Visual Studio sln. 7c2476986b5 Backends: SDL3: Update for SDL_StartTextInput()/SDL_StopTextInput() API changes. (#7735) 32f9dfc1261 Viewports: Backported 'void* ImGuiViewport::PlatformHandle' from docking branch for use by backends. eb1cc4b8b4e Metrics/Debugger: Browsing a Storage perform hover lookup on identifier. a18fb406ace Backends: Vulkan: Remove Volk/ from volk.h #include directives (#7722, #6582, #4854) aab27130a61 Demo: Style Editor: clarify how _CalcCircleAutoSegmentCount() doesn't always get exact final segment count. (#7731) 48e7e7bfe85 Backends: SDL3: Follow SDL3 removal of keysym field in SDL_KeyboardEvent (#7729) 755bf2b8c2e (Breaking) Move ImGuiWindowFlags_NavFlattened to ImGuiChildFlags_NavFlattened. (#7687) 2c8cc58fd16 Internals: storing HoveredWindowBeforeClear for use by multi-context compositor drag and drop propagation. 7f20a4b0415 Nav: CTRL+Tab overlay display context name if any. e3971079cf5 IO: added ImGuiConfigFlags_NoKeyboard for consistency and convenience. (#4921) 8067d05f744 IO: added ClearInputMouse(). made ClearInputKeys() not clear mouse data. (#4921) 21581cf70ce Fixed build warning. 7e7c97ac5f9 Ignore .ini file with other suffixes. 77d9f80754e Drag and Drop: Added ImGuiDragDropFlags_PayloadNoCrossContext and ImGuiDragDropFlags_PayloadNoCrossProcess flags. 8c318dc7702 Drag and Drop: (Breaking) renamed ImGuiDragDropFlags_SourceAutoExpirePayload to ImGuiDragDropFlags_PayloadAutoExpire. (#1725, #143) 50709454b3f Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern assume a mouse button being pressed. (#143) 413c056359b Drag and Drop: comments, debug log entries. 37c243bb35a Internals: added ImGuiContext::ContextName optionally used by debug log and to facilitate debugging. 8c517fee357 Drag and Drop: Fixes an issue when elapsing payload would be based on last payload frame instead of last drag source frame. 32a037c030f Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern. (#143) 21bda2ed994 TabBar, Style: added ImGuiTabBarFlags_DrawSelectedOverline and ImGuiCol_TabSelectedOverline, ImGuiCol_TabDimmedSelectedOverline. 1b9593e8894 Style: (Breaking) renamed ImGuiCol_TabActive -> ImGuiCol_TabSelected, ImGuiCol_TabUnfocused -> ImGuiCol_TabDimmed, ImGuiCol_TabUnfocusedActive -> ImGuiCol_TabDimmedSelected. b902fa4c449 IO: do not disable io.ConfigWindowsResizeFromEdges when ImGuiBackendFlags_HasMouseCursors is not set by backend. 8caf7afbad6 Internals: made ImLowerBound() accessible in internals + take a span. + rearrange child/popup/tooltips section. 22d65c7949d Removed old nested structure: renaming ImGuiStorage::ImGuiStoragePair type to ImGuiStoragePair (simpler for many languages). 7538ca6f405 Examples: SDL+Vulkan: handle swap chain resize even without Vulkan returning VK_SUBOPTIMAL_KHR (#7671) a47bfb1b5b1 Examples: GLFW+Vulkan: handle swap chain resize even without Vulkan returning VK_SUBOPTIMAL_KHR (#7671) d46a0aa0693 Internals: renamed HoveredIdDisabled to HoveredIdIsDisabled for consistency. 7260bb51cfc Version 1.90.9 WIP git-subtree-dir: external/imgui/imgui git-subtree-split: 070c046cd1fcbe694e3f19e2f5eaff9df0cb6357
136 lines
11 KiB
C++
136 lines
11 KiB
C++
//-----------------------------------------------------------------------------
|
|
// DEAR IMGUI COMPILE-TIME OPTIONS
|
|
// Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure.
|
|
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
|
|
//-----------------------------------------------------------------------------
|
|
// A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it)
|
|
// B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template.
|
|
//-----------------------------------------------------------------------------
|
|
// You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp
|
|
// files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures.
|
|
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
|
|
// Call IMGUI_CHECKVERSION() from your .cpp file to verify that the data structures your files are using are matching the ones imgui.cpp is using.
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
//---- Define assertion handler. Defaults to calling assert().
|
|
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
|
|
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
|
|
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
|
|
|
|
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
|
|
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
|
|
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
|
|
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
|
|
//#define IMGUI_API __declspec( dllexport )
|
|
//#define IMGUI_API __declspec( dllimport )
|
|
|
|
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
|
|
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS.
|
|
|
|
//---- Disable all of Dear ImGui or don't implement standard windows/tools.
|
|
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
|
|
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
|
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
|
|
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIDStackToolWindow() will be empty.
|
|
|
|
//---- Don't implement some functions to reduce linkage requirements.
|
|
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
|
//#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW)
|
|
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
|
|
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME).
|
|
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
|
|
//#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS // Don't implement default io.PlatformOpenInShellFn() handler (Win32: ShellExecute(), require shell32.lib/.a, Mac/Linux: use system("")).
|
|
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
|
|
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
|
|
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
|
|
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
|
|
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
|
|
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available
|
|
|
|
//---- Enable Test Engine / Automation features.
|
|
//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_config.h", see Test Engine for details.
|
|
|
|
//---- Include imgui_user.h at the end of imgui.h as a convenience
|
|
// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included.
|
|
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
|
//#define IMGUI_USER_H_FILENAME "my_folder/my_imgui_user.h"
|
|
|
|
//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
|
|
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
|
|
|
//---- Use 32-bit for ImWchar (default is 16-bit) to support Unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
|
|
//#define IMGUI_USE_WCHAR32
|
|
|
|
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
|
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
|
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
|
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
|
//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if IMGUI_USE_STB_SPRINTF is defined.
|
|
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
|
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
|
//#define IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION // only disabled if IMGUI_USE_STB_SPRINTF is defined.
|
|
|
|
//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
|
|
// Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h.
|
|
//#define IMGUI_USE_STB_SPRINTF
|
|
|
|
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
|
|
// Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
|
|
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
|
|
//#define IMGUI_ENABLE_FREETYPE
|
|
|
|
//---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT)
|
|
// Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided).
|
|
// Only works in combination with IMGUI_ENABLE_FREETYPE.
|
|
// (implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement)
|
|
//#define IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
|
|
//---- Use stb_truetype to build and rasterize the font atlas (default)
|
|
// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend.
|
|
//#define IMGUI_ENABLE_STB_TRUETYPE
|
|
|
|
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
|
|
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
|
/*
|
|
#define IM_VEC2_CLASS_EXTRA \
|
|
constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \
|
|
operator MyVec2() const { return MyVec2(x,y); }
|
|
|
|
#define IM_VEC4_CLASS_EXTRA \
|
|
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
|
|
operator MyVec4() const { return MyVec4(x,y,z,w); }
|
|
*/
|
|
//---- ...Or use Dear ImGui's own very basic math operators.
|
|
//#define IMGUI_DEFINE_MATH_OPERATORS
|
|
|
|
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
|
|
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
|
// Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
|
|
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
|
|
//#define ImDrawIdx unsigned int
|
|
|
|
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
|
|
//struct ImDrawList;
|
|
//struct ImDrawCmd;
|
|
//typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data);
|
|
//#define ImDrawCallback MyImDrawCallback
|
|
|
|
//---- Debug Tools: Macro to break in Debugger (we provide a default implementation of this in the codebase)
|
|
// (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.)
|
|
//#define IM_DEBUG_BREAK IM_ASSERT(0)
|
|
//#define IM_DEBUG_BREAK __debugbreak()
|
|
|
|
//---- Debug Tools: Enable slower asserts
|
|
//#define IMGUI_DEBUG_PARANOID
|
|
|
|
//---- Tip: You can add extra functions within the ImGui:: namespace from anywhere (e.g. your own sources/header files)
|
|
/*
|
|
namespace ImGui
|
|
{
|
|
void MyFunction(const char* name, MyMatrix44* mtx);
|
|
}
|
|
*/
|