|
15 | 15 | #pragma once |
16 | 16 |
|
17 | 17 | //---- Define assertion handler. Defaults to calling assert(). |
18 | | -// 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. |
| 18 | +// - 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. |
| 19 | +// - Compiling with NDEBUG will usually strip out assert() to nothing, which is NOT recommended because we use asserts to notify of programmer mistakes. |
19 | 20 | //#define IM_ASSERT(_EXPR) MyAssert(_EXPR) |
20 | 21 | //#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts |
21 | 22 |
|
22 | 23 | //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows |
23 | 24 | // 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. |
24 | | -// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() |
25 | | -// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. |
26 | | -//#define IMGUI_API __declspec( dllexport ) |
27 | | -//#define IMGUI_API __declspec( dllimport ) |
| 25 | +// - Windows DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() |
| 26 | +// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. |
| 27 | +//#define IMGUI_API __declspec(dllexport) // MSVC Windows: DLL export |
| 28 | +//#define IMGUI_API __declspec(dllimport) // MSVC Windows: DLL import |
| 29 | +//#define IMGUI_API __attribute__((visibility("default"))) // GCC/Clang: override visibility when set is hidden |
28 | 30 |
|
29 | 31 | //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names. |
30 | 32 | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS |
31 | | -//#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. |
32 | 33 |
|
33 | 34 | //---- Disable all of Dear ImGui or don't implement standard windows/tools. |
34 | 35 | // 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. |
|
42 | 43 | //#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) |
43 | 44 | //#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME). |
44 | 45 | //#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). |
| 46 | +//#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS // Don't implement default platform_io.Platform_OpenInShellFn() handler (Win32: ShellExecute(), require shell32.lib/.a, Mac/Linux: use system("")). |
45 | 47 | //#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) |
46 | 48 | //#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself. |
47 | 49 | //#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies) |
48 | 50 | //#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. |
49 | 51 | //#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(). |
| 52 | +//#define IMGUI_DISABLE_DEFAULT_FONT // Disable default embedded fonts (ProggyClean/ProggyForever), remove ~9 KB + ~14 KB from output binary. AddFontDefaultXXX() functions will assert. |
50 | 53 | //#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available |
51 | 54 |
|
| 55 | +//---- Enable Test Engine / Automation features. |
| 56 | +//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_config.h", see Test Engine for details. |
| 57 | + |
52 | 58 | //---- Include imgui_user.h at the end of imgui.h as a convenience |
| 59 | +// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included. |
53 | 60 | //#define IMGUI_INCLUDE_IMGUI_USER_H |
| 61 | +//#define IMGUI_USER_H_FILENAME "my_folder/my_imgui_user.h" |
54 | 62 |
|
55 | | -//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another) |
| 63 | +//---- Pack vertex colors as BGRA8 instead of RGBA8 (to avoid converting from one to another). Need dedicated backend support. |
56 | 64 | //#define IMGUI_USE_BGRA_PACKED_COLOR |
57 | 65 |
|
58 | | -//---- 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...) |
| 66 | +//---- Use legacy CRC32-adler tables (used before 1.91.6), in order to preserve old .ini data that you cannot afford to invalidate. |
| 67 | +//#define IMGUI_USE_LEGACY_CRC32_ADLER |
| 68 | + |
| 69 | +//---- 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...) |
59 | 70 | //#define IMGUI_USE_WCHAR32 |
60 | 71 |
|
61 | 72 | //---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version |
|
73 | 84 |
|
74 | 85 | //---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui) |
75 | 86 | // 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). |
| 87 | +// Note that imgui_freetype.cpp may be used _without_ this define, if you manually call ImFontAtlas::SetFontLoader(). The define is simply a convenience. |
76 | 88 | // On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'. |
77 | 89 | //#define IMGUI_ENABLE_FREETYPE |
78 | 90 |
|
79 | | -//---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT) |
80 | | -// Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided). |
| 91 | +//---- Use FreeType + plutosvg or lunasvg to render OpenType SVG fonts (SVGinOT) |
81 | 92 | // Only works in combination with IMGUI_ENABLE_FREETYPE. |
82 | | -// (implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement) |
| 93 | +// - plutosvg is currently easier to install, as e.g. it is part of vcpkg. It will support more fonts and may load them faster. See misc/freetype/README for instructions. |
| 94 | +// - Both require headers to be available in the include path + program to be linked with the library code (not provided). |
| 95 | +// - (note: lunasvg implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement) |
| 96 | +//#define IMGUI_ENABLE_FREETYPE_PLUTOSVG |
83 | 97 | //#define IMGUI_ENABLE_FREETYPE_LUNASVG |
84 | 98 |
|
85 | 99 | //---- Use stb_truetype to build and rasterize the font atlas (default) |
|
117 | 131 | //#define IM_DEBUG_BREAK IM_ASSERT(0) |
118 | 132 | //#define IM_DEBUG_BREAK __debugbreak() |
119 | 133 |
|
| 134 | +//---- Debug Tools: Enable highlight ID conflicts _before_ hovering items. When io.ConfigDebugHighlightIdConflicts is set. |
| 135 | +// (THIS WILL SLOW DOWN DEAR IMGUI. Only use occasionally and disable after use) |
| 136 | +//#define IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS |
| 137 | + |
120 | 138 | //---- Debug Tools: Enable slower asserts |
121 | 139 | //#define IMGUI_DEBUG_PARANOID |
122 | 140 |
|
|
0 commit comments