63 #if (defined __SSE__ || defined __x86_64__ || defined _M_X64 || (defined(_M_IX86_FP) && (_M_IX86_FP >= 1))) && !defined(IMGUI_DISABLE_SSE) 64 #define IMGUI_ENABLE_SSE 65 #include <immintrin.h> 66 #if (defined __AVX__ || defined __SSE4_2__) 67 #define IMGUI_ENABLE_SSE4_2 68 #include <nmmintrin.h> 72 #if defined(IMGUI_ENABLE_SSE4_2) && !defined(IMGUI_USE_LEGACY_CRC32_ADLER) && !defined(__EMSCRIPTEN__) 73 #define IMGUI_ENABLE_SSE4_2_CRC 78 #pragma warning (push) 79 #pragma warning (disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of struct 'xxx' // when IMGUI_API is set to__declspec(dllexport) 80 #pragma warning (disable: 26812) // The enum type 'xxx' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). [MSVC Static Analyzer) 81 #pragma warning (disable: 26495) // [Static Analyzer] Variable 'XXX' is uninitialized. Always initialize a member variable (type.6). 82 #if defined(_MSC_VER) && _MSC_VER >= 1922 // MSVC 2019 16.2 or later 83 #pragma warning (disable: 5054) // operator '|': deprecated between enumerations of different types 88 #if defined(__clang__) 89 #pragma clang diagnostic push 90 #if __has_warning("-Wunknown-warning-option") 91 #pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx' 93 #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' 94 #pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe // storing and comparing against same constants ok, for ImFloor() 95 #pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast 96 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" // warning: zero as null pointer constant 97 #pragma clang diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function 98 #pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision 99 #pragma clang diagnostic ignored "-Wmissing-noreturn" // warning: function 'xxx' could be declared with attribute 'noreturn' 100 #pragma clang diagnostic ignored "-Wdeprecated-enum-enum-conversion"// warning: bitwise operation between different enumeration types ('XXXFlags_' and 'XXXFlagsPrivate_') is deprecated 101 #pragma clang diagnostic ignored "-Wunsafe-buffer-usage" // warning: 'xxx' is an unsafe pointer used for buffer access 102 #pragma clang diagnostic ignored "-Wnontrivial-memaccess" // warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 103 #elif defined(__GNUC__) 104 #pragma GCC diagnostic push 105 #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind 106 #pragma GCC diagnostic ignored "-Wfloat-equal" // warning: comparing floating-point with '==' or '!=' is unsafe 107 #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 108 #pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion" // warning: bitwise operation between different enumeration types ('XXXFlags_' and 'XXXFlagsPrivate_') is deprecated 113 #if defined(IMGUI_DEFINE_MATH_OPERATORS) && !defined(IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED) 114 #error Please '#define IMGUI_DEFINE_MATH_OPERATORS' _BEFORE_ including imgui.h! 118 #ifdef IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS // Renamed in 1.74 119 #error Use IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS 121 #ifdef IMGUI_DISABLE_MATH_FUNCTIONS // Renamed in 1.74 122 #error Use IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS 127 #ifndef IMGUI_ENABLE_FREETYPE 128 #define IMGUI_ENABLE_STB_TRUETYPE 156 struct ImGuiDockRequest;
158 struct ImGuiDockNodeSettings;
162 struct ImGuiInputTextDeactivateData;
186 struct ImGuiTableColumnsSettings;
197 enum ImGuiLocKey : int;
198 typedef int ImGuiDataAuthority;
199 typedef int ImGuiLayoutType;
202 typedef int ImGuiActivateFlags;
203 typedef int ImGuiDebugLogFlags;
204 typedef int ImGuiFocusRequestFlags;
205 typedef int ImGuiItemStatusFlags;
206 typedef int ImGuiOldColumnFlags;
207 typedef int ImGuiLogFlags;
208 typedef int ImGuiNavRenderCursorFlags;
209 typedef int ImGuiNavMoveFlags;
210 typedef int ImGuiNextItemDataFlags;
211 typedef int ImGuiNextWindowDataFlags;
212 typedef int ImGuiScrollFlags;
213 typedef int ImGuiSeparatorFlags;
214 typedef int ImGuiTextFlags;
215 typedef int ImGuiTooltipFlags;
216 typedef int ImGuiTypingSelectFlags;
217 typedef int ImGuiWindowRefreshFlags;
220 typedef ImS16 ImGuiTableColumnIdx;
221 typedef ImU16 ImGuiTableDrawChannelIdx;
237 #define IMGUI_PAYLOAD_TYPE_WINDOW "_IMWINDOW" // Payload == ImGuiWindow* 241 #ifndef IMGUI_DEBUG_PRINTF 242 #ifndef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS 243 #define IMGUI_DEBUG_PRINTF(_FMT,...) printf(_FMT, __VA_ARGS__) 245 #define IMGUI_DEBUG_PRINTF(_FMT,...) ((void)0) 250 #define IMGUI_DEBUG_LOG_ERROR(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventError) IMGUI_DEBUG_LOG(__VA_ARGS__); else g.DebugLogSkippedErrors++; } while (0) 251 #define IMGUI_DEBUG_LOG_ACTIVEID(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventActiveId) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 252 #define IMGUI_DEBUG_LOG_FOCUS(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventFocus) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 253 #define IMGUI_DEBUG_LOG_POPUP(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventPopup) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 254 #define IMGUI_DEBUG_LOG_NAV(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventNav) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 255 #define IMGUI_DEBUG_LOG_SELECTION(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventSelection) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 256 #define IMGUI_DEBUG_LOG_CLIPPER(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventClipper) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 257 #define IMGUI_DEBUG_LOG_IO(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventIO) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 258 #define IMGUI_DEBUG_LOG_FONT(...) do { ImGuiContext* g2 = GImGui; if (g2 && g2->DebugLogFlags & ImGuiDebugLogFlags_EventFont) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) // Called from ImFontAtlas function which may operate without a context. 259 #define IMGUI_DEBUG_LOG_INPUTROUTING(...) do{if (g.DebugLogFlags & ImGuiDebugLogFlags_EventInputRouting)IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 260 #define IMGUI_DEBUG_LOG_DOCKING(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventDocking) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 261 #define IMGUI_DEBUG_LOG_VIEWPORT(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventViewport) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) 264 #define IM_STATIC_ASSERT(_COND) static_assert(_COND, "") 269 #ifdef IMGUI_DEBUG_PARANOID 270 #define IM_ASSERT_PARANOID(_EXPR) IM_ASSERT(_EXPR) 272 #define IM_ASSERT_PARANOID(_EXPR) 276 #define IM_PI 3.14159265358979323846f 278 #define IM_NEWLINE "\r\n" // Play it nice with Windows users (Update: since 2018-05, Notepad finally appears to support Unix-style carriage returns!) 280 #define IM_NEWLINE "\n" 282 #ifndef IM_TABSIZE // Until we move this to runtime and/or add proper tab support, at least allow users to compile-time override 283 #define IM_TABSIZE (4) 285 #define IM_MEMALIGN(_OFF,_ALIGN) (((_OFF) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1)) // Memory align e.g. IM_ALIGN(0,4)=0, IM_ALIGN(1,4)=4, IM_ALIGN(4,4)=4, IM_ALIGN(5,4)=8 286 #define IM_F32_TO_INT8_UNBOUND(_VAL) ((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f))) // Unsaturated, for display purpose 287 #define IM_F32_TO_INT8_SAT(_VAL) ((int)(ImSaturate(_VAL) * 255.0f + 0.5f)) // Saturated, always output 0..255 288 #define IM_TRUNC(_VAL) ((float)(int)(_VAL)) // ImTrunc() is not inlined in MSVC debug builds 289 #define IM_ROUND(_VAL) ((float)(int)((_VAL) + 0.5f)) // 290 #define IM_STRINGIFY_HELPER(_X) #_X 291 #define IM_STRINGIFY(_X) IM_STRINGIFY_HELPER(_X) // Preprocessor idiom to stringify e.g. an integer. 292 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 293 #define IM_FLOOR IM_TRUNC 297 #if (defined(__cplusplus) && (__cplusplus >= 202002L)) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 202002L)) 298 #define IM_LIKELY [[likely]] 299 #define IM_UNLIKELY [[unlikely]] 307 #define IMGUI_CDECL __cdecl 313 #if defined(_MSC_VER) && !defined(__clang__) 314 #define IM_MSVC_WARNING_SUPPRESS(XXXX) __pragma(warning(suppress: XXXX)) 316 #define IM_MSVC_WARNING_SUPPRESS(XXXX) 322 #ifndef IM_DEBUG_BREAK 323 #if defined (_MSC_VER) 324 #define IM_DEBUG_BREAK() __debugbreak() 325 #elif defined(__clang__) 326 #define IM_DEBUG_BREAK() __builtin_debugtrap() 327 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 328 #define IM_DEBUG_BREAK() __asm__ volatile("int3;nop") 329 #elif defined(__GNUC__) && defined(__thumb__) 330 #define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xde01") 331 #elif defined(__GNUC__) && defined(__arm__) && !defined(__thumb__) 332 #define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0") 334 #define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger! 336 #endif // #ifndef IM_DEBUG_BREAK 340 #if defined(_MSC_VER) && !defined(__clang__) 341 #define IM_PRId64 "I64d" 342 #define IM_PRIu64 "I64u" 343 #define IM_PRIX64 "I64X" 345 #define IM_PRId64 "lld" 346 #define IM_PRIu64 "llu" 347 #define IM_PRIX64 "llX" 378 IMGUI_API ImGuiID ImHashData(
const void* data,
size_t data_size, ImGuiID seed = 0);
379 IMGUI_API ImGuiID ImHashStr(
const char* data,
size_t data_size = 0, ImGuiID seed = 0);
383 static inline void ImQsort(
void* base,
size_t count,
size_t size_of_element,
int(IMGUI_CDECL *compare_func)(
void const*,
void const*)) {
if (count > 1) qsort(base, count, size_of_element, compare_func); }
387 IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b);
390 static inline bool ImIsPowerOfTwo(
int v) {
return v != 0 && (v & (v - 1)) == 0; }
391 static inline bool ImIsPowerOfTwo(ImU64 v) {
return v != 0 && (v & (v - 1)) == 0; }
392 static inline int ImUpperPowerOfTwo(
int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++;
return v; }
393 static inline unsigned int ImCountSetBits(
unsigned int v) {
unsigned int count = 0;
while (v > 0) { v = v & (v - 1); count++; }
return count; }
396 #define ImStrlen strlen 397 #define ImMemchr memchr 398 IMGUI_API
int ImStricmp(
const char* str1,
const char* str2);
399 IMGUI_API
int ImStrnicmp(
const char* str1,
const char* str2,
size_t count);
400 IMGUI_API
void ImStrncpy(
char* dst,
const char* src,
size_t count);
401 IMGUI_API
char* ImStrdup(
const char* str);
402 IMGUI_API
void* ImMemdup(
const void* src,
size_t size);
403 IMGUI_API
char* ImStrdupcpy(
char* dst,
size_t* p_dst_size,
const char* str);
404 IMGUI_API
const char* ImStrchrRange(
const char* str_begin,
const char* str_end,
char c);
405 IMGUI_API
const char* ImStreolRange(
const char* str,
const char* str_end);
406 IMGUI_API
const char* ImStristr(
const char* haystack,
const char* haystack_end,
const char* needle,
const char* needle_end);
407 IMGUI_API
void ImStrTrimBlanks(
char* str);
408 IMGUI_API
const char* ImStrSkipBlank(
const char* str);
409 IMGUI_API
int ImStrlenW(
const ImWchar* str);
410 IMGUI_API
const char* ImStrbol(
const char* buf_mid_line,
const char* buf_begin);
411 IM_MSVC_RUNTIME_CHECKS_OFF
412 static inline char ImToUpper(
char c) {
return (c >=
'a' && c <=
'z') ? c &= ~32 : c; }
413 static inline bool ImCharIsBlankA(
char c) {
return c ==
' ' || c ==
'\t'; }
414 static inline bool ImCharIsBlankW(
unsigned int c) {
return c ==
' ' || c ==
'\t' || c == 0x3000; }
415 static inline bool ImCharIsXdigitA(
char c) {
return (c >=
'0' && c <=
'9') || (c >=
'A' && c <= 'F') || (c >=
'a' && c <=
'f'); }
416 IM_MSVC_RUNTIME_CHECKS_RESTORE
419 IMGUI_API
int ImFormatString(
char* buf,
size_t buf_size,
const char* fmt, ...) IM_FMTARGS(3);
420 IMGUI_API
int ImFormatStringV(
char* buf,
size_t buf_size, const
char* fmt, va_list args) IM_FMTLIST(3);
421 IMGUI_API
void ImFormatStringToTempBuffer(const
char** out_buf, const
char** out_buf_end, const
char* fmt, ...) IM_FMTARGS(3);
422 IMGUI_API
void ImFormatStringToTempBufferV(const
char** out_buf, const
char** out_buf_end, const
char* fmt, va_list args) IM_FMTLIST(3);
423 IMGUI_API const
char* ImParseFormatFindStart(const
char* format);
424 IMGUI_API const
char* ImParseFormatFindEnd(const
char* format);
425 IMGUI_API const
char* ImParseFormatTrimDecorations(const
char* format,
char* buf,
size_t buf_size);
426 IMGUI_API
void ImParseFormatSanitizeForPrinting(const
char* fmt_in,
char* fmt_out,
size_t fmt_out_size);
427 IMGUI_API const
char* ImParseFormatSanitizeForScanning(const
char* fmt_in,
char* fmt_out,
size_t fmt_out_size);
428 IMGUI_API
int ImParseFormatPrecision(const
char* format,
int default_value);
431 IMGUI_API const
char* ImTextCharToUtf8(
char out_buf[5],
unsigned int c);
432 IMGUI_API
int ImTextStrToUtf8(
char* out_buf,
int out_buf_size, const ImWchar* in_text, const ImWchar* in_text_end);
433 IMGUI_API
int ImTextCharFromUtf8(
unsigned int* out_char, const
char* in_text, const
char* in_text_end);
434 IMGUI_API
int ImTextStrFromUtf8(ImWchar* out_buf,
int out_buf_size, const
char* in_text, const
char* in_text_end, const
char** in_remaining = NULL);
435 IMGUI_API
int ImTextCountCharsFromUtf8(const
char* in_text, const
char* in_text_end);
436 IMGUI_API
int ImTextCountUtf8BytesFromChar(const
char* in_text, const
char* in_text_end);
437 IMGUI_API
int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end);
438 IMGUI_API const
char* ImTextFindPreviousUtf8Codepoint(const
char* in_text_start, const
char* in_text_curr);
439 IMGUI_API
int ImTextCountLines(const
char* in_text, const
char* in_text_end);
442 #ifdef IMGUI_DISABLE_FILE_FUNCTIONS 443 #define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS 444 typedef void* ImFileHandle;
445 static inline ImFileHandle ImFileOpen(
const char*,
const char*) {
return NULL; }
446 static inline bool ImFileClose(ImFileHandle) {
return false; }
447 static inline ImU64 ImFileGetSize(ImFileHandle) {
return (ImU64)-1; }
448 static inline ImU64 ImFileRead(
void*, ImU64, ImU64, ImFileHandle) {
return 0; }
449 static inline ImU64 ImFileWrite(
const void*, ImU64, ImU64, ImFileHandle) {
return 0; }
451 #ifndef IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS 452 typedef FILE* ImFileHandle;
453 IMGUI_API ImFileHandle ImFileOpen(
const char* filename,
const char* mode);
454 IMGUI_API
bool ImFileClose(ImFileHandle file);
455 IMGUI_API ImU64 ImFileGetSize(ImFileHandle file);
456 IMGUI_API ImU64 ImFileRead(
void* data, ImU64 size, ImU64 count, ImFileHandle file);
457 IMGUI_API ImU64 ImFileWrite(
const void* data, ImU64 size, ImU64 count, ImFileHandle file);
459 #define IMGUI_DISABLE_TTY_FUNCTIONS // Can't use stdout, fflush if we are not using default file functions 461 IMGUI_API
void* ImFileLoadToMemory(
const char* filename,
const char* mode,
size_t* out_file_size = NULL,
int padding_bytes = 0);
464 IM_MSVC_RUNTIME_CHECKS_OFF
466 #ifndef IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS 467 #define ImFabs(X) fabsf(X) 468 #define ImSqrt(X) sqrtf(X) 469 #define ImFmod(X, Y) fmodf((X), (Y)) 470 #define ImCos(X) cosf(X) 471 #define ImSin(X) sinf(X) 472 #define ImAcos(X) acosf(X) 473 #define ImAtan2(Y, X) atan2f((Y), (X)) 474 #define ImAtof(STR) atof(STR) 475 #define ImCeil(X) ceilf(X) 476 static inline float ImPow(
float x,
float y) {
return powf(x, y); }
477 static inline double ImPow(
double x,
double y) {
return pow(x, y); }
478 static inline float ImLog(
float x) {
return logf(x); }
479 static inline double ImLog(
double x) {
return log(x); }
480 static inline int ImAbs(
int x) {
return x < 0 ? -x : x; }
481 static inline float ImAbs(
float x) {
return fabsf(x); }
482 static inline double ImAbs(
double x) {
return fabs(x); }
483 static inline float ImSign(
float x) {
return (x < 0.0f) ? -1.0f : (x > 0.0f) ? 1.0f : 0.0f; }
484 static inline double ImSign(
double x) {
return (x < 0.0) ? -1.0 : (x > 0.0) ? 1.0 : 0.0; }
485 #ifdef IMGUI_ENABLE_SSE 486 static inline float ImRsqrt(
float x) {
return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
488 static inline float ImRsqrt(
float x) {
return 1.0f / sqrtf(x); }
490 static inline double ImRsqrt(
double x) {
return 1.0 / sqrt(x); }
494 template<
typename T>
static inline T ImMin(T lhs, T rhs) {
return lhs < rhs ? lhs : rhs; }
495 template<
typename T>
static inline T ImMax(T lhs, T rhs) {
return lhs >= rhs ? lhs : rhs; }
496 template<
typename T>
static inline T ImClamp(T v, T mn, T mx) {
return (v < mn) ? mn : (v > mx) ? mx : v; }
497 template<
typename T>
static inline T ImLerp(T a, T b,
float t) {
return (T)(a + (b - a) * t); }
498 template<
typename T>
static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
499 template<
typename T>
static inline T ImAddClampOverflow(T a, T b, T mn, T mx) {
if (b < 0 && (a < mn - b))
return mn;
if (b > 0 && (a > mx - b))
return mx;
return a + b; }
500 template<
typename T>
static inline T ImSubClampOverflow(T a, T b, T mn, T mx) {
if (b > 0 && (a < mn + b))
return mn;
if (b < 0 && (a > mx + b))
return mx;
return a - b; }
502 static inline ImVec2 ImMin(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); }
503 static inline ImVec2 ImMax(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x >= rhs.x ? lhs.x : rhs.x, lhs.y >= rhs.y ? lhs.y : rhs.y); }
504 static inline ImVec2 ImClamp(
const ImVec2& v,
const ImVec2&mn,
const ImVec2&mx) {
return ImVec2((v.x < mn.x) ? mn.x : (v.x > mx.x) ? mx.x : v.x, (v.y < mn.y) ? mn.y : (v.y > mx.y) ? mx.y : v.y); }
505 static inline ImVec2 ImLerp(
const ImVec2& a,
const ImVec2& b,
float t) {
return ImVec2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); }
506 static inline ImVec2 ImLerp(
const ImVec2& a,
const ImVec2& b,
const ImVec2& t) {
return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); }
507 static inline ImVec4 ImLerp(
const ImVec4& a,
const ImVec4& b,
float t) {
return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); }
508 static inline float ImSaturate(
float f) {
return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
509 static inline float ImLengthSqr(
const ImVec2& lhs) {
return (lhs.x * lhs.x) + (lhs.y * lhs.y); }
510 static inline float ImLengthSqr(
const ImVec4& lhs) {
return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); }
511 static inline float ImInvLength(
const ImVec2& lhs,
float fail_value) {
float d = (lhs.x * lhs.x) + (lhs.y * lhs.y);
if (d > 0.0f)
return ImRsqrt(d);
return fail_value; }
512 static inline float ImTrunc(
float f) {
return (
float)(int)(f); }
513 static inline ImVec2 ImTrunc(
const ImVec2& v) {
return ImVec2((
float)(
int)(v.x), (
float)(
int)(v.y)); }
514 static inline float ImFloor(
float f) {
return (
float)((f >= 0 || (float)(
int)f == f) ? (
int)f : (int)f - 1); }
515 static inline ImVec2 ImFloor(
const ImVec2& v) {
return ImVec2(ImFloor(v.x), ImFloor(v.y)); }
516 static inline float ImTrunc64(
float f) {
return (
float)(ImS64)(f); }
517 static inline float ImRound64(
float f) {
return (
float)(ImS64)(f + 0.5f); }
518 static inline int ImModPositive(
int a,
int b) {
return (a + b) % b; }
519 static inline float ImDot(
const ImVec2& a,
const ImVec2& b) {
return a.x * b.x + a.y * b.y; }
520 static inline ImVec2 ImRotate(
const ImVec2& v,
float cos_a,
float sin_a) {
return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
521 static inline float ImLinearSweep(
float current,
float target,
float speed) {
if (current < target)
return ImMin(current + speed, target);
if (current > target)
return ImMax(current - speed, target);
return current; }
522 static inline float ImLinearRemapClamp(
float s0,
float s1,
float d0,
float d1,
float x) {
return ImSaturate((x - s0) / (s1 - s0)) * (d1 - d0) + d0; }
524 static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(
float f) {
return f <= -16777216 || f >= 16777216; }
525 static inline float ImExponentialMovingAverage(
float avg,
float sample,
int n) { avg -= avg / n; avg += sample / n;
return avg; }
526 IM_MSVC_RUNTIME_CHECKS_RESTORE
536 IMGUI_API
void ImTriangleBarycentricCoords(
const ImVec2& a,
const ImVec2& b,
const ImVec2& c,
const ImVec2& p,
float& out_u,
float& out_v,
float& out_w);
537 inline float ImTriangleArea(
const ImVec2& a,
const ImVec2& b,
const ImVec2& c) {
return ImFabs((a.x * (b.y - c.y)) + (b.x * (c.y - a.y)) + (c.x * (a.y - b.y))) * 0.5f; }
538 inline bool ImTriangleIsClockwise(
const ImVec2& a,
const ImVec2& b,
const ImVec2& c) {
return ((b.x - a.x) * (c.y - b.y)) - ((c.x - b.x) * (b.y - a.y)) > 0.0f; }
542 IM_MSVC_RUNTIME_CHECKS_OFF
546 constexpr
ImVec1() : x(0.0f) { }
547 constexpr ImVec1(
float _x) : x(_x) { }
554 constexpr
ImVec2i() : x(0), y(0) {}
555 constexpr ImVec2i(
int _x,
int _y) : x(_x), y(_y) {}
562 constexpr
ImVec2ih() : x(0), y(0) {}
563 constexpr ImVec2ih(
short _x,
short _y) : x(_x), y(_y) {}
564 constexpr
explicit ImVec2ih(
const ImVec2& rhs) : x((
short)rhs.x), y((
short)rhs.y) {}
574 constexpr
ImRect() : Min(0.0f, 0.0f), Max(0.0f, 0.0f) {}
575 constexpr ImRect(
const ImVec2& min,
const ImVec2& max) : Min(min), Max(max) {}
576 constexpr ImRect(
const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {}
577 constexpr ImRect(
float x1,
float y1,
float x2,
float y2) : Min(x1, y1), Max(x2, y2) {}
579 ImVec2 GetCenter()
const {
return ImVec2((Min.x + Max.x) * 0.5f, (Min.y + Max.y) * 0.5f); }
580 ImVec2 GetSize()
const {
return ImVec2(Max.x - Min.x, Max.y - Min.y); }
581 float GetWidth()
const {
return Max.x - Min.x; }
582 float GetHeight()
const {
return Max.y - Min.y; }
583 float GetArea()
const {
return (Max.x - Min.x) * (Max.y - Min.y); }
584 ImVec2 GetTL()
const {
return Min; }
587 ImVec2 GetBR()
const {
return Max; }
588 bool Contains(
const ImVec2& p)
const {
return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; }
589 bool Contains(
const ImRect& r)
const {
return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x <= Max.x && r.Max.y <= Max.y; }
590 bool ContainsWithPad(
const ImVec2& p,
const ImVec2& pad)
const {
return p.x >= Min.x - pad.x && p.y >= Min.y - pad.y && p.x < Max.x + pad.x && p.y < Max.y + pad.y; }
591 bool Overlaps(
const ImRect& r)
const {
return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; }
592 void Add(
const ImVec2& p) {
if (Min.x > p.x) Min.x = p.x;
if (Min.y > p.y) Min.y = p.y;
if (Max.x < p.x) Max.x = p.x;
if (Max.y < p.y) Max.y = p.y; }
593 void Add(
const ImRect& r) {
if (Min.x > r.Min.x) Min.x = r.Min.x;
if (Min.y > r.Min.y) Min.y = r.Min.y;
if (Max.x < r.Max.x) Max.x = r.Max.x;
if (Max.y < r.Max.y) Max.y = r.Max.y; }
594 void Expand(
const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; }
595 void Expand(
const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; }
596 void Translate(
const ImVec2& d) { Min.x += d.x; Min.y += d.y; Max.x += d.x; Max.y += d.y; }
597 void TranslateX(
float dx) { Min.x += dx; Max.x += dx; }
598 void TranslateY(
float dy) { Min.y += dy; Max.y += dy; }
599 void ClipWith(
const ImRect& r) { Min = ImMax(Min, r.Min); Max = ImMin(Max, r.Max); }
600 void ClipWithFull(
const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); }
601 void Floor() { Min.x = IM_TRUNC(Min.x); Min.y = IM_TRUNC(Min.y); Max.x = IM_TRUNC(Max.x); Max.y = IM_TRUNC(Max.y); }
602 bool IsInverted()
const {
return Min.x > Max.x || Min.y > Max.y; }
603 ImVec4 ToVec4()
const {
return ImVec4(Min.x, Min.y, Max.x, Max.y); }
607 #define IM_BITARRAY_TESTBIT(_ARRAY, _N) ((_ARRAY[(_N) >> 5] & ((ImU32)1 << ((_N) & 31))) != 0) // Macro version of ImBitArrayTestBit(): ensure args have side-effect or are costly! 608 #define IM_BITARRAY_CLEARBIT(_ARRAY, _N) ((_ARRAY[(_N) >> 5] &= ~((ImU32)1 << ((_N) & 31)))) // Macro version of ImBitArrayClearBit(): ensure args have side-effect or are costly! 609 inline size_t ImBitArrayGetStorageSizeInBytes(
int bitcount) {
return (
size_t)((bitcount + 31) >> 5) << 2; }
610 inline void ImBitArrayClearAllBits(ImU32* arr,
int bitcount){ memset(arr, 0, ImBitArrayGetStorageSizeInBytes(bitcount)); }
611 inline bool ImBitArrayTestBit(
const ImU32* arr,
int n) { ImU32 mask = (ImU32)1 << (n & 31);
return (arr[n >> 5] & mask) != 0; }
612 inline void ImBitArrayClearBit(ImU32* arr,
int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] &= ~mask; }
613 inline void ImBitArraySetBit(ImU32* arr,
int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] |= mask; }
614 inline void ImBitArraySetBitRange(ImU32* arr,
int n,
int n2)
619 int a_mod = (n & 31);
620 int b_mod = (n2 > (n | 31) ? 31 : (n2 & 31)) + 1;
621 ImU32 mask = (ImU32)(((ImU64)1 << b_mod) - 1) & ~(ImU32)(((ImU64)1 << a_mod) - 1);
627 typedef ImU32* ImBitArrayPtr;
631 template<
int BITCOUNT,
int OFFSET = 0>
634 ImU32 Storage[(BITCOUNT + 31) >> 5];
636 void ClearAllBits() { memset(Storage, 0,
sizeof(Storage)); }
637 void SetAllBits() { memset(Storage, 255,
sizeof(Storage)); }
638 bool TestBit(
int n)
const { n += OFFSET; IM_ASSERT(n >= 0 && n < BITCOUNT);
return IM_BITARRAY_TESTBIT(Storage, n); }
639 void SetBit(
int n) { n += OFFSET; IM_ASSERT(n >= 0 && n < BITCOUNT); ImBitArraySetBit(Storage, n); }
640 void ClearBit(
int n) { n += OFFSET; IM_ASSERT(n >= 0 && n < BITCOUNT); ImBitArrayClearBit(Storage, n); }
641 void SetBitRange(
int n,
int n2) { n += OFFSET; n2 += OFFSET; IM_ASSERT(n >= 0 && n < BITCOUNT && n2 > n && n2 <= BITCOUNT); ImBitArraySetBitRange(Storage, n, n2); }
642 bool operator[](
int n)
const { n += OFFSET; IM_ASSERT(n >= 0 && n < BITCOUNT);
return IM_BITARRAY_TESTBIT(Storage, n); }
650 void Create(
int sz) { Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (
size_t)Storage.Size *
sizeof(Storage.Data[0])); }
651 void Clear() { Storage.clear(); }
652 bool TestBit(
int n)
const { IM_ASSERT(n < (Storage.Size << 5));
return IM_BITARRAY_TESTBIT(Storage.Data, n); }
653 void SetBit(
int n) { IM_ASSERT(n < (Storage.Size << 5)); ImBitArraySetBit(Storage.Data, n); }
654 void ClearBit(
int n) { IM_ASSERT(n < (Storage.Size << 5)); ImBitArrayClearBit(Storage.Data, n); }
656 IM_MSVC_RUNTIME_CHECKS_RESTORE
667 inline ImSpan() { Data = DataEnd = NULL; }
668 inline ImSpan(T* data,
int size) { Data = data; DataEnd = data + size; }
669 inline ImSpan(T* data, T* data_end) { Data = data; DataEnd = data_end; }
671 inline void set(T* data,
int size) { Data = data; DataEnd = data + size; }
672 inline void set(T* data, T* data_end) { Data = data; DataEnd = data_end; }
673 inline int size()
const {
return (
int)(ptrdiff_t)(DataEnd - Data); }
674 inline int size_in_bytes()
const {
return (
int)(ptrdiff_t)(DataEnd - Data) * (int)
sizeof(T); }
675 inline T& operator[](
int i) { T* p = Data + i; IM_ASSERT(p >= Data && p < DataEnd);
return *p; }
676 inline const T& operator[](
int i)
const {
const T* p = Data + i; IM_ASSERT(p >= Data && p < DataEnd);
return *p; }
678 inline T* begin() {
return Data; }
679 inline const T* begin()
const {
return Data; }
680 inline T* end() {
return DataEnd; }
681 inline const T* end()
const {
return DataEnd; }
684 inline int index_from_ptr(
const T* it)
const { IM_ASSERT(it >= Data && it < DataEnd);
const ptrdiff_t off = it - Data;
return (
int)off; }
700 inline void Reserve(
int n,
size_t sz,
int a=4) { IM_ASSERT(n == CurrIdx && n < CHUNKS); CurrOff = IM_MEMALIGN(CurrOff, a); Offsets[n] = CurrOff; Sizes[n] = (int)sz; CurrIdx++; CurrOff += (int)sz; }
701 inline int GetArenaSizeInBytes() {
return CurrOff; }
702 inline void SetArenaBasePtr(
void* base_ptr) { BasePtr = (
char*)base_ptr; }
703 inline void* GetSpanPtrBegin(
int n) { IM_ASSERT(n >= 0 && n < CHUNKS && CurrIdx == CHUNKS);
return (
void*)(BasePtr + Offsets[n]); }
704 inline void* GetSpanPtrEnd(
int n) { IM_ASSERT(n >= 0 && n < CHUNKS && CurrIdx == CHUNKS);
return (
void*)(BasePtr + Offsets[n] + Sizes[n]); }
706 inline void GetSpan(
int n,
ImSpan<T>* span) { span->set((T*)GetSpanPtrBegin(n), (T*)GetSpanPtrEnd(n)); }
713 template<
typename T,
int BLOCK_SIZE>
721 inline ~
ImStableVector() {
for (T* block : Blocks) IM_FREE(block); }
723 inline void clear() { Size = Capacity = 0; Blocks.clear_delete(); }
724 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(new_size); Size = new_size; }
725 inline void reserve(
int new_cap)
727 new_cap = IM_MEMALIGN(new_cap, BLOCK_SIZE);
728 int old_count = Capacity / BLOCK_SIZE;
729 int new_count = new_cap / BLOCK_SIZE;
730 if (new_count <= old_count)
732 Blocks.resize(new_count);
733 for (
int n = old_count; n < new_count; n++)
734 Blocks[n] = (T*)IM_ALLOC(
sizeof(T) * BLOCK_SIZE);
737 inline T& operator[](
int i) { IM_ASSERT(i >= 0 && i < Size);
return Blocks[i / BLOCK_SIZE][i % BLOCK_SIZE]; }
738 inline const T& operator[](
int i)
const { IM_ASSERT(i >= 0 && i < Size);
return Blocks[i / BLOCK_SIZE][i % BLOCK_SIZE]; }
739 inline T* push_back(
const T& v) {
int i = Size; IM_ASSERT(i >= 0);
if (Size == Capacity) reserve(Capacity + BLOCK_SIZE);
void* ptr = &Blocks[i / BLOCK_SIZE][i % BLOCK_SIZE]; memcpy(ptr, &v,
sizeof(v)); Size++;
return (T*)ptr; }
745 typedef int ImPoolIdx;
752 ImPoolIdx AliveCount;
754 ImPool() { FreeIdx = AliveCount = 0; }
756 T* GetByKey(ImGuiID key) {
int idx = Map.GetInt(key, -1);
return (idx != -1) ? &Buf[idx] : NULL; }
757 T* GetByIndex(ImPoolIdx n) {
return &Buf[n]; }
758 ImPoolIdx GetIndex(
const T* p)
const { IM_ASSERT(p >= Buf.Data && p < Buf.Data + Buf.Size);
return (ImPoolIdx)(p - Buf.Data); }
759 T* GetOrAddByKey(ImGuiID key) {
int* p_idx = Map.GetIntRef(key, -1);
if (*p_idx != -1)
return &Buf[*p_idx]; *p_idx = FreeIdx;
return Add(); }
760 bool Contains(
const T* p)
const {
return (p >= Buf.Data && p < Buf.Data + Buf.Size); }
761 void Clear() {
for (
int n = 0; n < Map.Data.Size; n++) {
int idx = Map.Data[n].val_i;
if (idx != -1) Buf[idx].~T(); } Map.Clear(); Buf.clear(); FreeIdx = AliveCount = 0; }
762 T* Add() {
int idx = FreeIdx;
if (idx == Buf.Size) { Buf.resize(Buf.Size + 1); FreeIdx++; }
else { FreeIdx = *(
int*)&Buf[idx]; } IM_PLACEMENT_NEW(&Buf[idx]) T(); AliveCount++;
return &Buf[idx]; }
763 void Remove(ImGuiID key,
const T* p) { Remove(key, GetIndex(p)); }
764 void Remove(ImGuiID key, ImPoolIdx idx) { Buf[idx].~T(); *(
int*)&Buf[idx] = FreeIdx; FreeIdx = idx; Map.SetInt(key, -1); AliveCount--; }
765 void Reserve(
int capacity) { Buf.reserve(capacity); Map.Data.reserve(capacity); }
769 int GetAliveCount()
const {
return AliveCount; }
770 int GetBufSize()
const {
return Buf.Size; }
771 int GetMapSize()
const {
return Map.Data.Size; }
772 T* TryGetMapData(ImPoolIdx n) {
int idx = Map.Data[n].val_i;
if (idx == -1)
return NULL;
return GetByIndex(idx); }
785 void clear() { Buf.clear(); }
786 bool empty()
const {
return Buf.Size == 0; }
787 int size()
const {
return Buf.Size; }
788 T* alloc_chunk(
size_t sz) {
size_t HDR_SZ = 4; sz = IM_MEMALIGN(HDR_SZ + sz, 4u);
int off = Buf.Size; Buf.resize(off + (
int)sz); ((
int*)(
void*)(Buf.Data + off))[0] = (int)sz;
return (T*)(
void*)(Buf.Data + off + (
int)HDR_SZ); }
789 T* begin() {
size_t HDR_SZ = 4;
if (!Buf.Data)
return NULL;
return (T*)(
void*)(Buf.Data + HDR_SZ); }
790 T* next_chunk(T* p) {
size_t HDR_SZ = 4; IM_ASSERT(p >= begin() && p < end()); p = (T*)(
void*)((
char*)(
void*)p + chunk_size(p));
if (p == (T*)(
void*)((
char*)end() + HDR_SZ))
return (T*)0; IM_ASSERT(p < end());
return p; }
791 int chunk_size(
const T* p) {
return ((
const int*)p)[-1]; }
792 T* end() {
return (T*)(
void*)(Buf.Data + Buf.Size); }
793 int offset_from_ptr(
const T* p) { IM_ASSERT(p >= begin() && p < end());
const ptrdiff_t off = (
const char*)p - Buf.Data; return (
int)off; }
794 T* ptr_from_offset(
int off) { IM_ASSERT(off >= 4 && off < Buf.Size);
return (T*)(
void*)(Buf.Data + off); }
805 void clear() { LineOffsets.clear(); EndOffset = 0; }
806 int size() {
return LineOffsets.Size; }
807 const char* get_line_begin(
const char* base,
int n) {
return base + LineOffsets[n]; }
808 const char* get_line_end(
const char* base,
int n) {
return base + (n + 1 < LineOffsets.Size ? (LineOffsets[n + 1] - 1) : EndOffset); }
809 void append(
const char* base,
int old_size,
int new_size);
829 #define IM_ROUNDUP_TO_EVEN(_V) ((((_V) + 1) / 2) * 2) 830 #define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN 4 831 #define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX 512 832 #define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(_RAD,_MAXERROR) ImClamp(IM_ROUNDUP_TO_EVEN((int)ImCeil(IM_PI / ImAcos(1 - ImMin((_MAXERROR), (_RAD)) / (_RAD)))), IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX) 835 #define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_R(_N,_MAXERROR) ((_MAXERROR) / (1 - ImCos(IM_PI / ImMax((float)(_N), IM_PI)))) 836 #define IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_ERROR(_N,_RAD) ((1 - ImCos(IM_PI / ImMax((float)(_N), IM_PI))) / (_RAD)) 839 #ifndef IM_DRAWLIST_ARCFAST_TABLE_SIZE 840 #define IM_DRAWLIST_ARCFAST_TABLE_SIZE 48 // Number of samples in lookup table. 842 #define IM_DRAWLIST_ARCFAST_SAMPLE_MAX IM_DRAWLIST_ARCFAST_TABLE_SIZE // Sample index _PathArcToFastEx() for 360 angle. 856 float CurveTessellationTol;
857 float CircleSegmentMaxError;
858 float InitialFringeScale;
859 ImDrawListFlags InitialFlags;
860 ImVec4 ClipRectFullscreen;
866 ImVec2 ArcFastVtx[IM_DRAWLIST_ARCFAST_TABLE_SIZE];
867 float ArcFastRadiusCutoff;
868 ImU8 CircleSegmentCounts[64];
872 void SetCircleTessellationMaxError(
float max_error);
886 float FontSizeBeforeScaling;
887 float FontSizeAfterScaling;
897 ImGuiDataType DataType : 8;
899 void* GetVarPtr(
void* parent)
const {
return (
void*)((
unsigned char*)parent + Offset); }
912 ImGuiStyleVar VarIdx;
913 union {
int BackupInt[2];
float BackupFloat[2]; };
914 ImGuiStyleMod(ImGuiStyleVar idx,
int v) { VarIdx = idx; BackupInt[0] = v; }
915 ImGuiStyleMod(ImGuiStyleVar idx,
float v) { VarIdx = idx; BackupFloat[0] = v; }
916 ImGuiStyleMod(ImGuiStyleVar idx,
ImVec2 v) { VarIdx = idx; BackupFloat[0] = v.x; BackupFloat[1] = v.y; }
933 const char* PrintFmt;
938 enum ImGuiDataTypePrivate_
940 ImGuiDataType_Pointer = ImGuiDataType_COUNT,
951 enum ImGuiItemFlagsPrivate_
954 ImGuiItemFlags_Disabled = 1 << 10,
955 ImGuiItemFlags_ReadOnly = 1 << 11,
956 ImGuiItemFlags_MixedValue = 1 << 12,
957 ImGuiItemFlags_NoWindowHoverableCheck = 1 << 13,
958 ImGuiItemFlags_AllowOverlap = 1 << 14,
959 ImGuiItemFlags_NoNavDisableMouseHover = 1 << 15,
960 ImGuiItemFlags_NoMarkEdited = 1 << 16,
961 ImGuiItemFlags_NoFocus = 1 << 17,
964 ImGuiItemFlags_Inputable = 1 << 20,
965 ImGuiItemFlags_HasSelectionUserData = 1 << 21,
966 ImGuiItemFlags_IsMultiSelect = 1 << 22,
968 ImGuiItemFlags_Default_ = ImGuiItemFlags_AutoClosePopups,
976 enum ImGuiItemStatusFlags_
978 ImGuiItemStatusFlags_None = 0,
979 ImGuiItemStatusFlags_HoveredRect = 1 << 0,
980 ImGuiItemStatusFlags_HasDisplayRect = 1 << 1,
981 ImGuiItemStatusFlags_Edited = 1 << 2,
982 ImGuiItemStatusFlags_ToggledSelection = 1 << 3,
983 ImGuiItemStatusFlags_ToggledOpen = 1 << 4,
984 ImGuiItemStatusFlags_HasDeactivated = 1 << 5,
985 ImGuiItemStatusFlags_Deactivated = 1 << 6,
986 ImGuiItemStatusFlags_HoveredWindow = 1 << 7,
987 ImGuiItemStatusFlags_Visible = 1 << 8,
988 ImGuiItemStatusFlags_HasClipRect = 1 << 9,
989 ImGuiItemStatusFlags_HasShortcut = 1 << 10,
992 #ifdef IMGUI_ENABLE_TEST_ENGINE 993 ImGuiItemStatusFlags_Openable = 1 << 20,
994 ImGuiItemStatusFlags_Opened = 1 << 21,
995 ImGuiItemStatusFlags_Checkable = 1 << 22,
996 ImGuiItemStatusFlags_Checked = 1 << 23,
997 ImGuiItemStatusFlags_Inputable = 1 << 24,
1002 enum ImGuiHoveredFlagsPrivate_
1004 ImGuiHoveredFlags_DelayMask_ = ImGuiHoveredFlags_DelayNone | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_DelayNormal | ImGuiHoveredFlags_NoSharedDelay,
1005 ImGuiHoveredFlags_AllowedMaskForIsWindowHovered = ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_AnyWindow | ImGuiHoveredFlags_NoPopupHierarchy | ImGuiHoveredFlags_DockHierarchy | ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary,
1006 ImGuiHoveredFlags_AllowedMaskForIsItemHovered = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped | ImGuiHoveredFlags_AllowWhenDisabled | ImGuiHoveredFlags_NoNavOverride | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayMask_,
1010 enum ImGuiInputTextFlagsPrivate_
1013 ImGuiInputTextFlags_Multiline = 1 << 26,
1014 ImGuiInputTextFlags_MergedItem = 1 << 27,
1015 ImGuiInputTextFlags_LocalizeDecimalPoint= 1 << 28,
1019 enum ImGuiButtonFlagsPrivate_
1021 ImGuiButtonFlags_PressedOnClick = 1 << 4,
1022 ImGuiButtonFlags_PressedOnClickRelease = 1 << 5,
1023 ImGuiButtonFlags_PressedOnClickReleaseAnywhere = 1 << 6,
1024 ImGuiButtonFlags_PressedOnRelease = 1 << 7,
1025 ImGuiButtonFlags_PressedOnDoubleClick = 1 << 8,
1026 ImGuiButtonFlags_PressedOnDragDropHold = 1 << 9,
1028 ImGuiButtonFlags_FlattenChildren = 1 << 11,
1029 ImGuiButtonFlags_AllowOverlap = 1 << 12,
1032 ImGuiButtonFlags_AlignTextBaseLine = 1 << 15,
1033 ImGuiButtonFlags_NoKeyModsAllowed = 1 << 16,
1034 ImGuiButtonFlags_NoHoldingActiveId = 1 << 17,
1035 ImGuiButtonFlags_NoNavFocus = 1 << 18,
1036 ImGuiButtonFlags_NoHoveredOnFocus = 1 << 19,
1037 ImGuiButtonFlags_NoSetKeyOwner = 1 << 20,
1038 ImGuiButtonFlags_NoTestKeyOwner = 1 << 21,
1039 ImGuiButtonFlags_NoFocus = 1 << 22,
1040 ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold,
1041 ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease,
1045 enum ImGuiComboFlagsPrivate_
1047 ImGuiComboFlags_CustomPreview = 1 << 20,
1051 enum ImGuiSliderFlagsPrivate_
1053 ImGuiSliderFlags_Vertical = 1 << 20,
1054 ImGuiSliderFlags_ReadOnly = 1 << 21,
1058 enum ImGuiSelectableFlagsPrivate_
1061 ImGuiSelectableFlags_NoHoldingActiveID = 1 << 20,
1062 ImGuiSelectableFlags_SelectOnNav = 1 << 21,
1063 ImGuiSelectableFlags_SelectOnClick = 1 << 22,
1064 ImGuiSelectableFlags_SelectOnRelease = 1 << 23,
1065 ImGuiSelectableFlags_SpanAvailWidth = 1 << 24,
1066 ImGuiSelectableFlags_SetNavIdOnHover = 1 << 25,
1067 ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 26,
1068 ImGuiSelectableFlags_NoSetKeyOwner = 1 << 27,
1072 enum ImGuiTreeNodeFlagsPrivate_
1074 ImGuiTreeNodeFlags_NoNavFocus = 1 << 27,
1075 ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 28,
1076 ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 29,
1077 ImGuiTreeNodeFlags_OpenOnMask_ = ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow,
1078 ImGuiTreeNodeFlags_DrawLinesMask_ = ImGuiTreeNodeFlags_DrawLinesNone | ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes,
1081 enum ImGuiSeparatorFlags_
1083 ImGuiSeparatorFlags_None = 0,
1084 ImGuiSeparatorFlags_Horizontal = 1 << 0,
1085 ImGuiSeparatorFlags_Vertical = 1 << 1,
1086 ImGuiSeparatorFlags_SpanAllColumns = 1 << 2,
1092 enum ImGuiFocusRequestFlags_
1094 ImGuiFocusRequestFlags_None = 0,
1095 ImGuiFocusRequestFlags_RestoreFocusedChild = 1 << 0,
1096 ImGuiFocusRequestFlags_UnlessBelowModal = 1 << 1,
1099 enum ImGuiTextFlags_
1101 ImGuiTextFlags_None = 0,
1102 ImGuiTextFlags_NoWidthForLargeClippedText = 1 << 0,
1105 enum ImGuiTooltipFlags_
1107 ImGuiTooltipFlags_None = 0,
1108 ImGuiTooltipFlags_OverridePrevious = 1 << 1,
1113 enum ImGuiLayoutType_
1115 ImGuiLayoutType_Horizontal = 0,
1116 ImGuiLayoutType_Vertical = 1
1122 ImGuiLogFlags_None = 0,
1124 ImGuiLogFlags_OutputTTY = 1 << 0,
1125 ImGuiLogFlags_OutputFile = 1 << 1,
1126 ImGuiLogFlags_OutputBuffer = 1 << 2,
1127 ImGuiLogFlags_OutputClipboard = 1 << 3,
1128 ImGuiLogFlags_OutputMask_ = ImGuiLogFlags_OutputTTY | ImGuiLogFlags_OutputFile | ImGuiLogFlags_OutputBuffer | ImGuiLogFlags_OutputClipboard,
1134 ImGuiAxis_None = -1,
1141 ImGuiPlotType_Lines,
1142 ImGuiPlotType_Histogram,
1150 ImVec2 BackupCursorMaxPos;
1151 ImVec2 BackupCursorPosPrevLine;
1152 float BackupPrevLineTextBaseOffset;
1153 ImGuiLayoutType BackupLayout;
1163 ImVec2 BackupCursorMaxPos;
1164 ImVec2 BackupCursorPosPrevLine;
1166 ImVec1 BackupGroupOffset;
1167 ImVec2 BackupCurrLineSize;
1168 float BackupCurrLineTextBaseOffset;
1169 ImGuiID BackupActiveIdIsAlive;
1170 bool BackupDeactivatedIdIsAlive;
1171 bool BackupHoveredIdIsAlive;
1172 bool BackupIsSameLine;
1180 ImU32 NextTotalWidth;
1184 ImU16 OffsetShortcut;
1189 void Update(
float spacing,
bool window_reappearing);
1190 float DeclColumns(
float w_icon,
float w_label,
float w_shortcut,
float w_mark);
1191 void CalcNextTotalWidth(
bool update_offsets);
1201 void ClearFreeMemory() { ID = 0; TextA.clear(); }
1205 #undef IMSTB_TEXTEDIT_STRING 1206 #undef IMSTB_TEXTEDIT_CHARTYPE 1207 #define IMSTB_TEXTEDIT_STRING ImGuiInputTextState 1208 #define IMSTB_TEXTEDIT_CHARTYPE char 1209 #define IMSTB_TEXTEDIT_GETWIDTH_NEWLINE (-1.0f) 1210 #define IMSTB_TEXTEDIT_UNDOSTATECOUNT 99 1211 #define IMSTB_TEXTEDIT_UNDOCHARCOUNT 999 1213 typedef ImStb::STB_TexteditState ImStbTexteditState;
1220 ImStbTexteditState* Stb;
1221 ImGuiInputTextFlags Flags;
1224 const char* TextSrc;
1232 bool SelectedAllMouseLock;
1234 bool WantReloadUserBuf;
1235 int ReloadSelectionStart;
1236 int ReloadSelectionEnd;
1240 void ClearText() { TextLen = 0; TextA[0] = 0; CursorClamp(); }
1241 void ClearFreeMemory() { TextA.clear(); TextToRevertTo.clear(); }
1242 void OnKeyPressed(
int key);
1243 void OnCharPressed(
unsigned int c);
1246 void CursorAnimReset();
1248 bool HasSelection()
const;
1249 void ClearSelection();
1250 int GetCursorPos()
const;
1251 int GetSelectionStart()
const;
1252 int GetSelectionEnd()
const;
1260 void ReloadUserBufAndSelectAll();
1261 void ReloadUserBufAndKeepSelection();
1262 void ReloadUserBufAndMoveToEnd();
1265 enum ImGuiWindowRefreshFlags_
1267 ImGuiWindowRefreshFlags_None = 0,
1268 ImGuiWindowRefreshFlags_TryToAvoidRefresh = 1 << 0,
1269 ImGuiWindowRefreshFlags_RefreshOnHover = 1 << 1,
1270 ImGuiWindowRefreshFlags_RefreshOnFocus = 1 << 2,
1274 enum ImGuiNextWindowDataFlags_
1276 ImGuiNextWindowDataFlags_None = 0,
1277 ImGuiNextWindowDataFlags_HasPos = 1 << 0,
1278 ImGuiNextWindowDataFlags_HasSize = 1 << 1,
1279 ImGuiNextWindowDataFlags_HasContentSize = 1 << 2,
1280 ImGuiNextWindowDataFlags_HasCollapsed = 1 << 3,
1281 ImGuiNextWindowDataFlags_HasSizeConstraint = 1 << 4,
1282 ImGuiNextWindowDataFlags_HasFocus = 1 << 5,
1283 ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 6,
1284 ImGuiNextWindowDataFlags_HasScroll = 1 << 7,
1285 ImGuiNextWindowDataFlags_HasWindowFlags = 1 << 8,
1286 ImGuiNextWindowDataFlags_HasChildFlags = 1 << 9,
1287 ImGuiNextWindowDataFlags_HasRefreshPolicy = 1 << 10,
1288 ImGuiNextWindowDataFlags_HasViewport = 1 << 11,
1289 ImGuiNextWindowDataFlags_HasDock = 1 << 12,
1290 ImGuiNextWindowDataFlags_HasWindowClass = 1 << 13,
1296 ImGuiNextWindowDataFlags HasFlags;
1301 ImGuiCond CollapsedCond;
1308 ImGuiWindowFlags WindowFlags;
1309 ImGuiChildFlags ChildFlags;
1312 ImRect SizeConstraintRect;
1313 ImGuiSizeCallback SizeCallback;
1314 void* SizeCallbackUserData;
1319 ImVec2 MenuBarOffsetMinVal;
1320 ImGuiWindowRefreshFlags RefreshFlagsVal;
1323 inline void ClearFlags() { HasFlags = ImGuiNextWindowDataFlags_None; }
1326 enum ImGuiNextItemDataFlags_
1328 ImGuiNextItemDataFlags_None = 0,
1329 ImGuiNextItemDataFlags_HasWidth = 1 << 0,
1330 ImGuiNextItemDataFlags_HasOpen = 1 << 1,
1331 ImGuiNextItemDataFlags_HasShortcut = 1 << 2,
1332 ImGuiNextItemDataFlags_HasRefVal = 1 << 3,
1333 ImGuiNextItemDataFlags_HasStorageID = 1 << 4,
1338 ImGuiNextItemDataFlags HasFlags;
1339 ImGuiItemFlags ItemFlags;
1342 ImGuiID FocusScopeId;
1343 ImGuiSelectionUserData SelectionUserData;
1345 ImGuiKeyChord Shortcut;
1346 ImGuiInputFlags ShortcutFlags;
1353 inline void ClearFlags() { HasFlags = ImGuiNextItemDataFlags_None; ItemFlags = ImGuiItemFlags_None; }
1360 ImGuiItemFlags ItemFlags;
1361 ImGuiItemStatusFlags StatusFlags;
1367 ImGuiKeyChord Shortcut;
1379 ImGuiTreeNodeFlags TreeFlags;
1380 ImGuiItemFlags ItemFlags;
1383 float DrawLinesToNodesY2;
1384 ImGuiTableColumnIdx DrawLinesTableColumn;
1390 short SizeOfWindowStack;
1391 short SizeOfIDStack;
1392 short SizeOfTreeStack;
1393 short SizeOfColorStack;
1394 short SizeOfStyleVarStack;
1395 short SizeOfFontStack;
1396 short SizeOfFocusScopeStack;
1397 short SizeOfGroupStack;
1398 short SizeOfItemFlagsStack;
1399 short SizeOfBeginPopupStack;
1400 short SizeOfDisabledStack;
1411 bool DisabledOverrideReenable;
1412 float DisabledOverrideReenableAlphaBackup;
1436 bool HasBeenEditedBefore;
1444 enum ImGuiPopupPositionPolicy
1446 ImGuiPopupPositionPolicy_Default,
1447 ImGuiPopupPositionPolicy_ComboBox,
1448 ImGuiPopupPositionPolicy_Tooltip,
1459 ImGuiID OpenParentId;
1463 ImGuiPopupData() { memset(
this, 0,
sizeof(*
this)); ParentNavLayer = OpenFrameCount = -1; }
1474 #define ImGuiKey_LegacyNativeKey_BEGIN 0 1475 #define ImGuiKey_LegacyNativeKey_END 512 1476 #define ImGuiKey_Keyboard_BEGIN (ImGuiKey_NamedKey_BEGIN) 1477 #define ImGuiKey_Keyboard_END (ImGuiKey_GamepadStart) 1478 #define ImGuiKey_Gamepad_BEGIN (ImGuiKey_GamepadStart) 1479 #define ImGuiKey_Gamepad_END (ImGuiKey_GamepadRStickDown + 1) 1480 #define ImGuiKey_Mouse_BEGIN (ImGuiKey_MouseLeft) 1481 #define ImGuiKey_Mouse_END (ImGuiKey_MouseWheelY + 1) 1482 #define ImGuiKey_Aliases_BEGIN (ImGuiKey_Mouse_BEGIN) 1483 #define ImGuiKey_Aliases_END (ImGuiKey_Mouse_END) 1486 #define ImGuiKey_NavKeyboardTweakSlow ImGuiMod_Ctrl 1487 #define ImGuiKey_NavKeyboardTweakFast ImGuiMod_Shift 1488 #define ImGuiKey_NavGamepadTweakSlow ImGuiKey_GamepadL1 1489 #define ImGuiKey_NavGamepadTweakFast ImGuiKey_GamepadR1 1490 #define ImGuiKey_NavGamepadActivate (g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceRight : ImGuiKey_GamepadFaceDown) 1491 #define ImGuiKey_NavGamepadCancel (g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceDown : ImGuiKey_GamepadFaceRight) 1492 #define ImGuiKey_NavGamepadMenu ImGuiKey_GamepadFaceLeft 1493 #define ImGuiKey_NavGamepadInput ImGuiKey_GamepadFaceUp 1495 enum ImGuiInputEventType
1497 ImGuiInputEventType_None = 0,
1498 ImGuiInputEventType_MousePos,
1499 ImGuiInputEventType_MouseWheel,
1500 ImGuiInputEventType_MouseButton,
1501 ImGuiInputEventType_MouseViewport,
1502 ImGuiInputEventType_Key,
1503 ImGuiInputEventType_Text,
1504 ImGuiInputEventType_Focus,
1505 ImGuiInputEventType_COUNT
1508 enum ImGuiInputSource
1510 ImGuiInputSource_None = 0,
1511 ImGuiInputSource_Mouse,
1512 ImGuiInputSource_Keyboard,
1513 ImGuiInputSource_Gamepad,
1514 ImGuiInputSource_COUNT
1529 ImGuiInputEventType
Type;
1530 ImGuiInputSource Source;
1542 bool AddedByTestEngine;
1548 #define ImGuiKeyOwner_Any ((ImGuiID)0) // Accept key that have an owner, UNLESS a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. 1549 #define ImGuiKeyOwner_NoOwner ((ImGuiID)-1) // Require key to have no owner. 1552 typedef ImS16 ImGuiKeyRoutingIndex;
1557 ImGuiKeyRoutingIndex NextEntryIndex;
1559 ImU8 RoutingCurrScore;
1560 ImU8 RoutingNextScore;
1561 ImGuiID RoutingCurr;
1562 ImGuiID RoutingNext;
1564 ImGuiKeyRoutingData() { NextEntryIndex = -1; Mods = 0; RoutingCurrScore = RoutingNextScore = 255; RoutingCurr = RoutingNext = ImGuiKeyOwner_NoOwner; }
1571 ImGuiKeyRoutingIndex Index[ImGuiKey_NamedKey_COUNT];
1576 void Clear() {
for (
int n = 0; n < IM_ARRAYSIZE(Index); n++) Index[n] = -1; Entries.clear(); EntriesNext.clear(); }
1586 bool LockUntilRelease;
1588 ImGuiKeyOwnerData() { OwnerCurr = OwnerNext = ImGuiKeyOwner_NoOwner; LockThisFrame = LockUntilRelease =
false; }
1594 enum ImGuiInputFlagsPrivate_
1598 ImGuiInputFlags_RepeatRateDefault = 1 << 1,
1599 ImGuiInputFlags_RepeatRateNavMove = 1 << 2,
1600 ImGuiInputFlags_RepeatRateNavTweak = 1 << 3,
1603 ImGuiInputFlags_RepeatUntilRelease = 1 << 4,
1604 ImGuiInputFlags_RepeatUntilKeyModsChange = 1 << 5,
1605 ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone = 1 << 6,
1606 ImGuiInputFlags_RepeatUntilOtherKeyPress = 1 << 7,
1610 ImGuiInputFlags_LockThisFrame = 1 << 20,
1611 ImGuiInputFlags_LockUntilRelease = 1 << 21,
1614 ImGuiInputFlags_CondHovered = 1 << 22,
1615 ImGuiInputFlags_CondActive = 1 << 23,
1616 ImGuiInputFlags_CondDefault_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive,
1619 ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak,
1620 ImGuiInputFlags_RepeatUntilMask_ = ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPress,
1621 ImGuiInputFlags_RepeatMask_ = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_,
1622 ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive,
1623 ImGuiInputFlags_RouteTypeMask_ = ImGuiInputFlags_RouteActive | ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteAlways,
1624 ImGuiInputFlags_RouteOptionsMask_ = ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive | ImGuiInputFlags_RouteUnlessBgFocused | ImGuiInputFlags_RouteFromRootWindow,
1625 ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_RepeatMask_,
1626 ImGuiInputFlags_SupportedByIsMouseClicked = ImGuiInputFlags_Repeat,
1627 ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_,
1628 ImGuiInputFlags_SupportedBySetNextItemShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_ | ImGuiInputFlags_Tooltip,
1629 ImGuiInputFlags_SupportedBySetKeyOwner = ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease,
1630 ImGuiInputFlags_SupportedBySetItemKeyOwner = ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_,
1642 bool PosToIndexConvert;
1643 ImS8 PosToIndexOffsetMin;
1644 ImS8 PosToIndexOffsetMax;
1654 float LossynessOffset;
1660 void Reset(
ImGuiListClipper* clipper) { ListClipper = clipper; StepNo = ItemsFrozen = 0; Ranges.resize(0); }
1667 enum ImGuiActivateFlags_
1669 ImGuiActivateFlags_None = 0,
1670 ImGuiActivateFlags_PreferInput = 1 << 0,
1671 ImGuiActivateFlags_PreferTweak = 1 << 1,
1672 ImGuiActivateFlags_TryToPreserveState = 1 << 2,
1673 ImGuiActivateFlags_FromTabbing = 1 << 3,
1674 ImGuiActivateFlags_FromShortcut = 1 << 4,
1678 enum ImGuiScrollFlags_
1680 ImGuiScrollFlags_None = 0,
1681 ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0,
1682 ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1,
1683 ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2,
1684 ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3,
1685 ImGuiScrollFlags_AlwaysCenterX = 1 << 4,
1686 ImGuiScrollFlags_AlwaysCenterY = 1 << 5,
1687 ImGuiScrollFlags_NoScrollParent = 1 << 6,
1688 ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterX,
1689 ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY,
1692 enum ImGuiNavRenderCursorFlags_
1694 ImGuiNavRenderCursorFlags_None = 0,
1695 ImGuiNavRenderCursorFlags_Compact = 1 << 1,
1696 ImGuiNavRenderCursorFlags_AlwaysDraw = 1 << 2,
1697 ImGuiNavRenderCursorFlags_NoRounding = 1 << 3,
1698 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1699 ImGuiNavHighlightFlags_None = ImGuiNavRenderCursorFlags_None,
1700 ImGuiNavHighlightFlags_Compact = ImGuiNavRenderCursorFlags_Compact,
1701 ImGuiNavHighlightFlags_AlwaysDraw = ImGuiNavRenderCursorFlags_AlwaysDraw,
1702 ImGuiNavHighlightFlags_NoRounding = ImGuiNavRenderCursorFlags_NoRounding,
1706 enum ImGuiNavMoveFlags_
1708 ImGuiNavMoveFlags_None = 0,
1709 ImGuiNavMoveFlags_LoopX = 1 << 0,
1710 ImGuiNavMoveFlags_LoopY = 1 << 1,
1711 ImGuiNavMoveFlags_WrapX = 1 << 2,
1712 ImGuiNavMoveFlags_WrapY = 1 << 3,
1713 ImGuiNavMoveFlags_WrapMask_ = ImGuiNavMoveFlags_LoopX | ImGuiNavMoveFlags_LoopY | ImGuiNavMoveFlags_WrapX | ImGuiNavMoveFlags_WrapY,
1714 ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4,
1715 ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5,
1716 ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6,
1717 ImGuiNavMoveFlags_Forwarded = 1 << 7,
1718 ImGuiNavMoveFlags_DebugNoResult = 1 << 8,
1719 ImGuiNavMoveFlags_FocusApi = 1 << 9,
1720 ImGuiNavMoveFlags_IsTabbing = 1 << 10,
1721 ImGuiNavMoveFlags_IsPageMove = 1 << 11,
1722 ImGuiNavMoveFlags_Activate = 1 << 12,
1723 ImGuiNavMoveFlags_NoSelect = 1 << 13,
1724 ImGuiNavMoveFlags_NoSetNavCursorVisible = 1 << 14,
1725 ImGuiNavMoveFlags_NoClearActiveId = 1 << 15,
1730 ImGuiNavLayer_Main = 0,
1731 ImGuiNavLayer_Menu = 1,
1740 ImGuiID FocusScopeId;
1742 ImGuiItemFlags ItemFlags;
1746 ImGuiSelectionUserData SelectionUserData;
1749 void Clear() { Window = NULL; ID = FocusScopeId = 0; ItemFlags = 0; SelectionUserData = -1; DistBox = DistCenter = DistAxial = FLT_MAX; }
1764 enum ImGuiTypingSelectFlags_
1766 ImGuiTypingSelectFlags_None = 0,
1767 ImGuiTypingSelectFlags_AllowBackspace = 1 << 0,
1768 ImGuiTypingSelectFlags_AllowSingleCharMode = 1 << 1,
1774 ImGuiTypingSelectFlags Flags;
1775 int SearchBufferLen;
1776 const char* SearchBuffer;
1778 bool SingleCharMode;
1779 ImS8 SingleCharSize;
1786 char SearchBuffer[64];
1788 int LastRequestFrame = 0;
1789 float LastRequestTime = 0.0f;
1790 bool SingleCharModeLock =
false;
1793 void Clear() { SearchBuffer[0] = 0; SingleCharModeLock =
false; }
1801 enum ImGuiOldColumnFlags_
1803 ImGuiOldColumnFlags_None = 0,
1804 ImGuiOldColumnFlags_NoBorder = 1 << 0,
1805 ImGuiOldColumnFlags_NoResize = 1 << 1,
1806 ImGuiOldColumnFlags_NoPreserveWidths = 1 << 2,
1807 ImGuiOldColumnFlags_NoForceWithinWindow = 1 << 3,
1808 ImGuiOldColumnFlags_GrowParentContentsSize = 1 << 4,
1811 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1824 float OffsetNormBeforeResize;
1825 ImGuiOldColumnFlags Flags;
1834 ImGuiOldColumnFlags Flags;
1836 bool IsBeingResized;
1839 float OffMinX, OffMaxX;
1840 float LineMinY, LineMaxY;
1841 float HostCursorPosY;
1842 float HostCursorMaxPosX;
1843 ImRect HostInitialClipRect;
1844 ImRect HostBackupClipRect;
1845 ImRect HostBackupParentWorkRect;
1862 bool IsStartedFromVoid;
1863 bool IsStartedSetNavIdOnce;
1865 ImGuiKeyChord KeyMods : 16;
1874 ImRect BoxSelectRectPrev;
1875 ImRect BoxSelectRectCurr;
1885 #define ImGuiSelectionUserData_Invalid ((ImGuiSelectionUserData)-1) 1892 ImGuiID FocusScopeId;
1893 ImGuiMultiSelectFlags Flags;
1895 ImVec2 BackupCursorMaxPos;
1896 ImGuiSelectionUserData LastSubmittedItem;
1897 ImGuiID BoxSelectId;
1898 ImGuiKeyChord KeyMods;
1899 ImS8 LoopRequestSetAll;
1902 bool IsKeyboardSetRange;
1904 bool RangeSrcPassedBy;
1905 bool RangeDstPassedBy;
1908 void Clear() {
size_t io_sz =
sizeof(IO); ClearIO(); memset((
void*)(&IO + 1), 0,
sizeof(*
this) - io_sz); }
1909 void ClearIO() { IO.Requests.resize(0); IO.RangeSrcItem = IO.NavIdItem = ImGuiSelectionUserData_Invalid; IO.NavIdSelected = IO.RangeSrcReset =
false; }
1917 int LastFrameActive;
1918 int LastSelectionSize;
1921 ImGuiSelectionUserData RangeSrcItem;
1922 ImGuiSelectionUserData NavIdItem;
1924 ImGuiMultiSelectState() { Window = NULL; ID = 0; LastFrameActive = LastSelectionSize = 0; RangeSelected = NavIdSelected = -1; RangeSrcItem = NavIdItem = ImGuiSelectionUserData_Invalid; }
1931 #define DOCKING_HOST_DRAW_CHANNEL_BG 0 // Dock host: background fill 1932 #define DOCKING_HOST_DRAW_CHANNEL_FG 1 // Dock host: decorations and contents 1934 #ifdef IMGUI_HAS_DOCK 1937 enum ImGuiDockNodeFlagsPrivate_
1940 ImGuiDockNodeFlags_DockSpace = 1 << 10,
1941 ImGuiDockNodeFlags_CentralNode = 1 << 11,
1942 ImGuiDockNodeFlags_NoTabBar = 1 << 12,
1943 ImGuiDockNodeFlags_HiddenTabBar = 1 << 13,
1944 ImGuiDockNodeFlags_NoWindowMenuButton = 1 << 14,
1945 ImGuiDockNodeFlags_NoCloseButton = 1 << 15,
1946 ImGuiDockNodeFlags_NoResizeX = 1 << 16,
1947 ImGuiDockNodeFlags_NoResizeY = 1 << 17,
1948 ImGuiDockNodeFlags_DockedWindowsInFocusRoute= 1 << 18,
1953 ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 19,
1954 ImGuiDockNodeFlags_NoDockingOverMe = 1 << 20,
1955 ImGuiDockNodeFlags_NoDockingOverOther = 1 << 21,
1956 ImGuiDockNodeFlags_NoDockingOverEmpty = 1 << 22,
1957 ImGuiDockNodeFlags_NoDocking = ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoDockingSplitOther,
1960 ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0,
1961 ImGuiDockNodeFlags_NoResizeFlagsMask_ = (int)ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY,
1964 ImGuiDockNodeFlags_LocalFlagsTransferMask_ = (
int)ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | (int)ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton,
1965 ImGuiDockNodeFlags_SavedFlagsMask_ = ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton,
1969 enum ImGuiDataAuthority_
1971 ImGuiDataAuthority_Auto,
1972 ImGuiDataAuthority_DockNode,
1973 ImGuiDataAuthority_Window,
1976 enum ImGuiDockNodeState
1978 ImGuiDockNodeState_Unknown,
1979 ImGuiDockNodeState_HostWindowHiddenBecauseSingleWindow,
1980 ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing,
1981 ImGuiDockNodeState_HostWindowVisible,
1988 ImGuiDockNodeFlags SharedFlags;
1989 ImGuiDockNodeFlags LocalFlags;
1990 ImGuiDockNodeFlags LocalFlagsInWindows;
1991 ImGuiDockNodeFlags MergedFlags;
1992 ImGuiDockNodeState State;
2000 ImGuiAxis SplitAxis;
2008 int CountNodeWithWindows;
2010 int LastFrameActive;
2011 int LastFrameFocused;
2012 ImGuiID LastFocusedNodeId;
2013 ImGuiID SelectedTabId;
2014 ImGuiID WantCloseTabId;
2015 ImGuiID RefViewportId;
2016 ImGuiDataAuthority AuthorityForPos :3;
2017 ImGuiDataAuthority AuthorityForSize :3;
2018 ImGuiDataAuthority AuthorityForViewport :3;
2021 bool IsBgDrawnThisFrame :1;
2022 bool HasCloseButton :1;
2023 bool HasWindowMenuButton :1;
2024 bool HasCentralNodeChild :1;
2025 bool WantCloseAll :1;
2026 bool WantLockSizeOnce :1;
2027 bool WantMouseMove :1;
2028 bool WantHiddenTabBarUpdate :1;
2029 bool WantHiddenTabBarToggle :1;
2033 bool IsRootNode()
const {
return ParentNode == NULL; }
2034 bool IsDockSpace()
const {
return (MergedFlags & ImGuiDockNodeFlags_DockSpace) != 0; }
2035 bool IsFloatingNode()
const {
return ParentNode == NULL && (MergedFlags & ImGuiDockNodeFlags_DockSpace) == 0; }
2036 bool IsCentralNode()
const {
return (MergedFlags & ImGuiDockNodeFlags_CentralNode) != 0; }
2037 bool IsHiddenTabBar()
const {
return (MergedFlags & ImGuiDockNodeFlags_HiddenTabBar) != 0; }
2038 bool IsNoTabBar()
const {
return (MergedFlags & ImGuiDockNodeFlags_NoTabBar) != 0; }
2039 bool IsSplitNode()
const {
return ChildNodes[0] != NULL; }
2040 bool IsLeafNode()
const {
return ChildNodes[0] == NULL; }
2041 bool IsEmpty()
const {
return ChildNodes[0] == NULL && Windows.Size == 0; }
2042 ImRect Rect()
const {
return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); }
2044 void SetLocalFlags(ImGuiDockNodeFlags flags) { LocalFlags = flags; UpdateMergedFlags(); }
2045 void UpdateMergedFlags() { MergedFlags = SharedFlags | LocalFlags | LocalFlagsInWindows; }
2052 enum ImGuiWindowDockStyleCol
2054 ImGuiWindowDockStyleCol_Text,
2055 ImGuiWindowDockStyleCol_TabHovered,
2056 ImGuiWindowDockStyleCol_TabFocused,
2057 ImGuiWindowDockStyleCol_TabSelected,
2058 ImGuiWindowDockStyleCol_TabSelectedOverline,
2059 ImGuiWindowDockStyleCol_TabDimmed,
2060 ImGuiWindowDockStyleCol_TabDimmedSelected,
2061 ImGuiWindowDockStyleCol_TabDimmedSelectedOverline,
2062 ImGuiWindowDockStyleCol_COUNT
2068 ImU32 Colors[ImGuiWindowDockStyleCol_COUNT];
2076 bool WantFullRebuild;
2080 #endif // #ifdef IMGUI_HAS_DOCK 2092 int LastFrameActive;
2093 int LastFocusedStampCount;
2094 ImGuiID LastNameHash;
2099 bool LastFocusedHadNavWindow;
2100 short PlatformMonitor;
2101 int BgFgDrawListsLastFrame[2];
2115 ImVec2 BuildWorkInsetMin;
2116 ImVec2 BuildWorkInsetMax;
2118 ImGuiViewportP() { Window = NULL; Idx = -1; LastFrameActive = BgFgDrawListsLastFrame[0] = BgFgDrawListsLastFrame[1] = LastFocusedStampCount = -1; LastNameHash = 0; Alpha = LastAlpha = 1.0f; LastFocusedHadNavWindow =
false; PlatformMonitor = -1; BgFgDrawLists[0] = BgFgDrawLists[1] = NULL; LastPlatformPos = LastPlatformSize = LastRendererSize =
ImVec2(FLT_MAX, FLT_MAX); }
2119 ~
ImGuiViewportP() {
if (BgFgDrawLists[0]) IM_DELETE(BgFgDrawLists[0]);
if (BgFgDrawLists[1]) IM_DELETE(BgFgDrawLists[1]); }
2120 void ClearRequestFlags() { PlatformRequestClose = PlatformRequestMove = PlatformRequestResize =
false; }
2123 ImVec2 CalcWorkRectPos(
const ImVec2& inset_min)
const {
return ImVec2(Pos.x + inset_min.x, Pos.y + inset_min.y); }
2124 ImVec2 CalcWorkRectSize(
const ImVec2& inset_min,
const ImVec2& inset_max)
const {
return ImVec2(ImMax(0.0f, Size.x - inset_min.x - inset_max.x), ImMax(0.0f, Size.y - inset_min.y - inset_max.y)); }
2125 void UpdateWorkRect() { WorkPos = CalcWorkRectPos(WorkInsetMin); WorkSize = CalcWorkRectSize(WorkInsetMin, WorkInsetMax); }
2128 ImRect GetMainRect()
const {
return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); }
2129 ImRect GetWorkRect()
const {
return ImRect(WorkPos.x, WorkPos.y, WorkPos.x + WorkSize.x, WorkPos.y + WorkSize.y); }
2130 ImRect GetBuildWorkRect()
const {
ImVec2 pos = CalcWorkRectPos(BuildWorkInsetMin);
ImVec2 size = CalcWorkRectSize(BuildWorkInsetMin, BuildWorkInsetMax);
return ImRect(pos.x, pos.y, pos.x + size.x, pos.y + size.y); }
2156 char* GetName() {
return (
char*)(
this + 1); }
2161 const char* TypeName;
2179 enum ImGuiLocKey :
int 2181 ImGuiLocKey_VersionStr,
2182 ImGuiLocKey_TableSizeOne,
2183 ImGuiLocKey_TableSizeAllFit,
2184 ImGuiLocKey_TableSizeAllDefault,
2185 ImGuiLocKey_TableResetOrder,
2186 ImGuiLocKey_WindowingMainMenuBar,
2187 ImGuiLocKey_WindowingPopup,
2188 ImGuiLocKey_WindowingUntitled,
2189 ImGuiLocKey_OpenLink_s,
2190 ImGuiLocKey_CopyLink,
2191 ImGuiLocKey_DockingHideTabBar,
2192 ImGuiLocKey_DockingHoldShiftToDock,
2193 ImGuiLocKey_DockingDragToUndockOrMoveNode,
2212 #ifndef IM_ASSERT_USER_ERROR 2213 #define IM_ASSERT_USER_ERROR(_EXPR,_MSG) do { if (!(_EXPR) && ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } } while (0) // Recoverable User Error 2217 typedef void (*ImGuiErrorCallback)(
ImGuiContext* ctx,
void* user_data,
const char* msg);
2224 enum ImGuiDebugLogFlags_
2227 ImGuiDebugLogFlags_None = 0,
2228 ImGuiDebugLogFlags_EventError = 1 << 0,
2229 ImGuiDebugLogFlags_EventActiveId = 1 << 1,
2230 ImGuiDebugLogFlags_EventFocus = 1 << 2,
2231 ImGuiDebugLogFlags_EventPopup = 1 << 3,
2232 ImGuiDebugLogFlags_EventNav = 1 << 4,
2233 ImGuiDebugLogFlags_EventClipper = 1 << 5,
2234 ImGuiDebugLogFlags_EventSelection = 1 << 6,
2235 ImGuiDebugLogFlags_EventIO = 1 << 7,
2236 ImGuiDebugLogFlags_EventFont = 1 << 8,
2237 ImGuiDebugLogFlags_EventInputRouting = 1 << 9,
2238 ImGuiDebugLogFlags_EventDocking = 1 << 10,
2239 ImGuiDebugLogFlags_EventViewport = 1 << 11,
2241 ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventError | ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventFont | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport,
2242 ImGuiDebugLogFlags_OutputToTTY = 1 << 20,
2243 ImGuiDebugLogFlags_OutputToTestEngine = 1 << 21,
2255 int TotalAllocCount;
2257 ImS16 LastEntriesIdx;
2265 bool ShowDebugLog =
false;
2266 bool ShowIDStackTool =
false;
2267 bool ShowWindowsRects =
false;
2268 bool ShowWindowsBeginOrder =
false;
2269 bool ShowTablesRects =
false;
2270 bool ShowDrawCmdMesh =
true;
2271 bool ShowDrawCmdBoundingBoxes =
true;
2272 bool ShowTextEncodingViewer =
false;
2273 bool ShowTextureUsedRect =
false;
2274 bool ShowDockingNodes =
false;
2275 int ShowWindowsRectsType = -1;
2276 int ShowTablesRectsType = -1;
2277 int HighlightMonitorIdx = -1;
2278 ImGuiID HighlightViewportID = 0;
2279 bool ShowFontPreview =
true;
2285 ImS8 QueryFrameCount;
2287 ImGuiDataType DataType : 8;
2296 int LastActiveFrame;
2300 bool CopyToClipboardOnCtrlC;
2301 float CopyToClipboardLastTime;
2304 ImGuiIDStackTool() { memset(
this, 0,
sizeof(*
this)); CopyToClipboardLastTime = -FLT_MAX; }
2312 enum ImGuiContextHookType { ImGuiContextHookType_NewFramePre, ImGuiContextHookType_NewFramePost, ImGuiContextHookType_EndFramePre, ImGuiContextHookType_EndFramePost, ImGuiContextHookType_RenderPre, ImGuiContextHookType_RenderPost, ImGuiContextHookType_Shutdown, ImGuiContextHookType_PendingRemoval_ };
2317 ImGuiContextHookType
Type;
2319 ImGuiContextHookCallback Callback;
2335 ImGuiConfigFlags ConfigFlagsCurrFrame;
2336 ImGuiConfigFlags ConfigFlagsLastFrame;
2342 float FontBakedScale;
2343 float FontRasterizerDensity;
2344 float CurrentDpiScale;
2348 int FrameCountEnded;
2349 int FrameCountPlatformEnded;
2350 int FrameCountRendered;
2351 ImGuiID WithinEndChildID;
2352 bool WithinFrameScope;
2353 bool WithinFrameScopeWithImplicitWindow;
2355 bool TestEngineHookItems;
2357 char ContextName[16];
2362 ImGuiMouseSource InputEventsNextMouseSource;
2363 ImU32 InputEventsNextEventId;
2371 int WindowsActiveCount;
2372 float WindowsBorderHoverPadding;
2373 ImGuiID DebugBreakInWindow;
2380 ImVec2 WheelingWindowRefMousePos;
2381 int WheelingWindowStartFrame;
2382 int WheelingWindowScrolledFrame;
2383 float WheelingWindowReleaseTimer;
2384 ImVec2 WheelingWindowWheelRemainder;
2388 ImGuiID DebugDrawIdConflicts;
2389 ImGuiID DebugHookIdInfo;
2391 ImGuiID HoveredIdPreviousFrame;
2392 int HoveredIdPreviousFrameItemCount;
2393 float HoveredIdTimer;
2394 float HoveredIdNotActiveTimer;
2395 bool HoveredIdAllowOverlap;
2396 bool HoveredIdIsDisabled;
2397 bool ItemUnclipByLog;
2399 ImGuiID ActiveIdIsAlive;
2400 float ActiveIdTimer;
2401 bool ActiveIdIsJustActivated;
2402 bool ActiveIdAllowOverlap;
2403 bool ActiveIdNoClearOnFocusLoss;
2404 bool ActiveIdHasBeenPressedBefore;
2405 bool ActiveIdHasBeenEditedBefore;
2406 bool ActiveIdHasBeenEditedThisFrame;
2407 bool ActiveIdFromShortcut;
2408 int ActiveIdMouseButton : 8;
2409 ImVec2 ActiveIdClickOffset;
2411 ImGuiInputSource ActiveIdSource;
2412 ImGuiID ActiveIdPreviousFrame;
2415 ImGuiID LastActiveId;
2416 float LastActiveIdTimer;
2422 double LastKeyModsChangeTime;
2423 double LastKeyModsChangeFromNoneTime;
2424 double LastKeyboardKeyPressTime;
2425 ImBitArrayForNamedKeys KeysMayBeCharInput;
2428 ImU32 ActiveIdUsingNavDirMask;
2429 bool ActiveIdUsingAllKeyboardKeys;
2430 ImGuiKeyChord DebugBreakInShortcutRouting;
2434 ImGuiID CurrentFocusScopeId;
2435 ImGuiItemFlags CurrentItemFlags;
2436 ImGuiID DebugLocateId;
2440 bool DebugShowGroupRects;
2443 ImGuiCol DebugFlashStyleColorIdx;
2459 ImGuiID PlatformLastFocusedViewportId;
2461 ImRect PlatformMonitorsFullWorkRect;
2462 int ViewportCreatedCount;
2463 int PlatformWindowsCreatedCount;
2464 int ViewportFocusedStampCount;
2467 bool NavCursorVisible;
2468 bool NavHighlightItemUnderNav;
2471 bool NavMousePosDirty;
2475 ImGuiID NavFocusScopeId;
2476 ImGuiNavLayer NavLayer;
2477 ImGuiID NavActivateId;
2478 ImGuiID NavActivateDownId;
2479 ImGuiID NavActivatePressedId;
2480 ImGuiActivateFlags NavActivateFlags;
2482 ImGuiID NavHighlightActivatedId;
2483 float NavHighlightActivatedTimer;
2484 ImGuiID NavNextActivateId;
2485 ImGuiActivateFlags NavNextActivateFlags;
2486 ImGuiInputSource NavInputSource;
2487 ImGuiSelectionUserData NavLastValidSelectionUserData;
2488 ImS8 NavCursorHideFrames;
2492 bool NavInitRequest;
2493 bool NavInitRequestFromMove;
2495 bool NavMoveSubmitted;
2496 bool NavMoveScoringItems;
2497 bool NavMoveForwardToNextFrame;
2498 ImGuiNavMoveFlags NavMoveFlags;
2499 ImGuiScrollFlags NavMoveScrollFlags;
2500 ImGuiKeyChord NavMoveKeyMods;
2501 ImGuiDir NavMoveDir;
2502 ImGuiDir NavMoveDirForDebug;
2503 ImGuiDir NavMoveClipDir;
2505 ImRect NavScoringNoClipRect;
2506 int NavScoringDebugCount;
2508 int NavTabbingCounter;
2515 ImGuiID NavJustMovedFromFocusScopeId;
2516 ImGuiID NavJustMovedToId;
2517 ImGuiID NavJustMovedToFocusScopeId;
2518 ImGuiKeyChord NavJustMovedToKeyMods;
2519 bool NavJustMovedToIsTabbing;
2520 bool NavJustMovedToHasSelectionData;
2523 bool ConfigNavWindowingWithGamepad;
2524 ImGuiKeyChord ConfigNavWindowingKeyNext;
2525 ImGuiKeyChord ConfigNavWindowingKeyPrev;
2529 float NavWindowingTimer;
2530 float NavWindowingHighlightAlpha;
2531 ImGuiInputSource NavWindowingInputSource;
2532 bool NavWindowingToggleLayer;
2533 ImGuiKey NavWindowingToggleKey;
2534 ImVec2 NavWindowingAccumDeltaPos;
2535 ImVec2 NavWindowingAccumDeltaSize;
2541 bool DragDropActive;
2542 bool DragDropWithinSource;
2543 bool DragDropWithinTarget;
2544 ImGuiDragDropFlags DragDropSourceFlags;
2545 int DragDropSourceFrameCount;
2546 int DragDropMouseButton;
2548 ImRect DragDropTargetRect;
2549 ImRect DragDropTargetClipRect;
2550 ImGuiID DragDropTargetId;
2551 ImGuiDragDropFlags DragDropAcceptFlags;
2552 float DragDropAcceptIdCurrRectSurface;
2553 ImGuiID DragDropAcceptIdCurr;
2554 ImGuiID DragDropAcceptIdPrev;
2555 int DragDropAcceptFrameCount;
2556 ImGuiID DragDropHoldJustPressedId;
2558 unsigned char DragDropPayloadBufLocal[16];
2561 int ClipperTempDataStacked;
2566 ImGuiID DebugBreakInTable;
2567 int TablesTempDataStacked;
2582 int MultiSelectTempDataStacked;
2587 ImGuiID HoverItemDelayId;
2588 ImGuiID HoverItemDelayIdPreviousFrame;
2589 float HoverItemDelayTimer;
2590 float HoverItemDelayClearTimer;
2591 ImGuiID HoverItemUnlockedStationaryId;
2592 ImGuiID HoverWindowUnlockedStationaryId;
2595 ImGuiMouseCursor MouseCursor;
2596 float MouseStationaryTimer;
2597 ImVec2 MouseLastValidPos;
2603 ImFontFlags InputTextPasswordFontBackupFlags;
2604 ImGuiID TempInputId;
2607 int BeginComboDepth;
2608 ImGuiColorEditFlags ColorEditOptions;
2609 ImGuiID ColorEditCurrentID;
2610 ImGuiID ColorEditSavedID;
2611 float ColorEditSavedHue;
2612 float ColorEditSavedSat;
2613 ImU32 ColorEditSavedColor;
2616 ImRect WindowResizeBorderExpectedRect;
2617 bool WindowResizeRelativeMode;
2618 short ScrollbarSeekMode;
2619 float ScrollbarClickDeltaToGrabCenter;
2620 float SliderGrabClickOffset;
2621 float SliderCurrentAccum;
2622 bool SliderCurrentAccumDirty;
2623 bool DragCurrentAccumDirty;
2624 float DragCurrentAccum;
2625 float DragSpeedDefaultRatio;
2626 float DisabledAlphaBackup;
2627 short DisabledStackSize;
2628 short TooltipOverrideCount;
2645 bool SettingsLoaded;
2646 float SettingsDirtyTimer;
2655 const char* LocalizationTable[ImGuiLocKey_COUNT];
2659 ImGuiLogFlags LogFlags;
2661 ImFileHandle LogFile;
2663 const char* LogNextPrefix;
2664 const char* LogNextSuffix;
2666 bool LogLineFirstItem;
2668 int LogDepthToExpand;
2669 int LogDepthToExpandDefault;
2672 ImGuiErrorCallback ErrorCallback;
2673 void* ErrorCallbackUserData;
2674 ImVec2 ErrorTooltipLockedPos;
2676 int ErrorCountCurrentFrame;
2682 int DebugDrawIdConflictsCount;
2683 ImGuiDebugLogFlags DebugLogFlags;
2686 int DebugLogSkippedErrors;
2687 ImGuiDebugLogFlags DebugLogAutoDisableFlags;
2688 ImU8 DebugLogAutoDisableFrames;
2689 ImU8 DebugLocateFrames;
2690 bool DebugBreakInLocateId;
2691 ImGuiKeyChord DebugBreakKeyChord;
2692 ImS8 DebugBeginReturnValueCullDepth;
2693 bool DebugItemPickerActive;
2694 ImU8 DebugItemPickerMouseButton;
2695 ImGuiID DebugItemPickerBreakId;
2696 float DebugFlashStyleColorTime;
2697 ImVec4 DebugFlashStyleColorBackup;
2704 float FramerateSecPerFrame[60];
2705 int FramerateSecPerFrameIdx;
2706 int FramerateSecPerFrameCount;
2707 float FramerateSecPerFrameAccum;
2708 int WantCaptureMouseNextFrame;
2709 int WantCaptureKeyboardNextFrame;
2710 int WantTextInputNextFrame;
2712 char TempKeychordName[64];
2728 ImVec2 CursorPosPrevLine;
2734 float CurrLineTextBaseOffset;
2735 float PrevLineTextBaseOffset;
2741 ImVec2 CursorStartPosLossyness;
2744 ImGuiNavLayer NavLayerCurrent;
2745 short NavLayersActiveMask;
2746 short NavLayersActiveMaskNext;
2747 bool NavIsScrollPushableX;
2748 bool NavHideHighlightOneFrame;
2749 bool NavWindowHasScrollY;
2752 bool MenuBarAppending;
2756 ImU32 TreeHasStackDataDepthMask;
2757 ImU32 TreeRecordsClippedNodesY2Mask;
2761 int CurrentTableIdx;
2762 ImGuiLayoutType LayoutType;
2763 ImGuiLayoutType ParentLayoutType;
2764 ImU32 ModalDimBgColor;
2767 ImGuiItemStatusFlags WindowItemStatusFlags;
2768 ImGuiItemStatusFlags ChildItemStatusFlags;
2769 ImGuiItemStatusFlags DockTabItemStatusFlags;
2786 ImGuiWindowFlags Flags, FlagsPreviousFrame;
2787 ImGuiChildFlags ChildFlags;
2792 int ViewportAllowPlatformMonitorExtend;
2798 ImVec2 ContentSizeExplicit;
2800 float WindowRounding;
2801 float WindowBorderSize;
2802 float TitleBarHeight, MenuBarHeight;
2803 float DecoOuterSizeX1, DecoOuterSizeY1;
2804 float DecoOuterSizeX2, DecoOuterSizeY2;
2805 float DecoInnerSizeX1, DecoInnerSizeY1;
2814 ImVec2 ScrollTargetCenterRatio;
2815 ImVec2 ScrollTargetEdgeSnapDist;
2817 bool ScrollbarX, ScrollbarY;
2818 bool ScrollbarXStabilizeEnabled;
2819 ImU8 ScrollbarXStabilizeToggledHistory;
2825 bool WantCollapseToggle;
2830 bool IsFallbackWindow;
2831 bool IsExplicitChild;
2832 bool HasCloseButton;
2833 signed char ResizeBorderHovered;
2834 signed char ResizeBorderHeld;
2836 short BeginCountPreviousFrame;
2837 short BeginOrderWithinParent;
2838 short BeginOrderWithinContext;
2840 ImS8 AutoFitFramesX, AutoFitFramesY;
2841 bool AutoFitOnlyGrows;
2842 ImGuiDir AutoPosLastDirection;
2843 ImS8 HiddenFramesCanSkipItems;
2844 ImS8 HiddenFramesCannotSkipItems;
2845 ImS8 HiddenFramesForRenderOnly;
2846 ImS8 DisableInputsFrames;
2847 ImGuiCond SetWindowPosAllowFlags : 8;
2848 ImGuiCond SetWindowSizeAllowFlags : 8;
2849 ImGuiCond SetWindowCollapsedAllowFlags : 8;
2850 ImGuiCond SetWindowDockAllowFlags : 8;
2852 ImVec2 SetWindowPosPivot;
2865 ImRect ContentRegionRect;
2869 int LastFrameActive;
2870 int LastFrameJustFocused;
2871 float LastTimeActive;
2872 float ItemWidthDefault;
2875 float FontWindowScale;
2876 float FontWindowScaleParents;
2892 ImGuiID NavLastIds[ImGuiNavLayer_COUNT];
2893 ImRect NavRectRel[ImGuiNavLayer_COUNT];
2894 ImVec2 NavPreferredScoringPosRel[ImGuiNavLayer_COUNT];
2895 ImGuiID NavRootFocusScopeId;
2897 int MemoryDrawListIdxCapacity;
2898 int MemoryDrawListVtxCapacity;
2899 bool MemoryCompacted;
2902 bool DockIsActive :1;
2903 bool DockNodeIsVisible :1;
2904 bool DockTabIsVisible :1;
2905 bool DockTabWantClose :1;
2916 ImGuiID GetID(
const char* str,
const char* str_end = NULL);
2917 ImGuiID GetID(
const void* ptr);
2918 ImGuiID GetID(
int n);
2919 ImGuiID GetIDFromPos(
const ImVec2& p_abs);
2920 ImGuiID GetIDFromRectangle(
const ImRect& r_abs);
2923 ImRect Rect()
const {
return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); }
2924 ImRect TitleBarRect()
const {
return ImRect(Pos,
ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight)); }
2925 ImRect MenuBarRect()
const {
float y1 = Pos.y + TitleBarHeight;
return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight); }
2936 enum ImGuiTabBarFlagsPrivate_
2938 ImGuiTabBarFlags_DockNode = 1 << 20,
2939 ImGuiTabBarFlags_IsFocused = 1 << 21,
2940 ImGuiTabBarFlags_SaveSettings = 1 << 22,
2944 enum ImGuiTabItemFlagsPrivate_
2946 ImGuiTabItemFlags_SectionMask_ = ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_Trailing,
2947 ImGuiTabItemFlags_NoCloseButton = 1 << 20,
2948 ImGuiTabItemFlags_Button = 1 << 21,
2949 ImGuiTabItemFlags_Invisible = 1 << 22,
2950 ImGuiTabItemFlags_Unsorted = 1 << 23,
2957 ImGuiTabItemFlags Flags;
2959 int LastFrameVisible;
2960 int LastFrameSelected;
2964 float RequestedWidth;
2967 ImS16 IndexDuringLayout;
2970 ImGuiTabItem() { memset(
this, 0,
sizeof(*
this)); LastFrameVisible = LastFrameSelected = -1; RequestedWidth = -1.0f; NameOffset = -1; BeginOrder = IndexDuringLayout = -1; }
2978 ImGuiTabBarFlags Flags;
2980 ImGuiID SelectedTabId;
2981 ImGuiID NextSelectedTabId;
2982 ImGuiID VisibleTabId;
2983 int CurrFrameVisible;
2984 int PrevFrameVisible;
2986 float CurrTabsContentsHeight;
2987 float PrevTabsContentsHeight;
2989 float WidthAllTabsIdeal;
2990 float ScrollingAnim;
2991 float ScrollingTarget;
2992 float ScrollingTargetDistToVisibility;
2993 float ScrollingSpeed;
2994 float ScrollingRectMinX;
2995 float ScrollingRectMaxX;
2996 float SeparatorMinX;
2997 float SeparatorMaxX;
2998 ImGuiID ReorderRequestTabId;
2999 ImS16 ReorderRequestOffset;
3002 bool VisibleTabWasSubmitted;
3004 ImS16 TabsActiveCount;
3005 ImS16 LastTabItemIdx;
3018 #define IM_COL32_DISABLE IM_COL32(0,0,0,1) // Special sentinel code which cannot be used as a regular color. 3019 #define IMGUI_TABLE_MAX_COLUMNS 512 // Arbitrary "safety" maximum, may be lifted in the future if needed. Must fit in ImGuiTableColumnIdx/ImGuiTableDrawChannelIdx. 3027 ImGuiTableColumnFlags Flags;
3034 float StretchWeight;
3035 float InitStretchWeightOrWidth;
3041 float ContentMaxXFrozen;
3042 float ContentMaxXUnfrozen;
3043 float ContentMaxXHeadersUsed;
3044 float ContentMaxXHeadersIdeal;
3046 ImGuiTableColumnIdx DisplayOrder;
3047 ImGuiTableColumnIdx IndexWithinEnabledSet;
3048 ImGuiTableColumnIdx PrevEnabledColumn;
3049 ImGuiTableColumnIdx NextEnabledColumn;
3050 ImGuiTableColumnIdx SortOrder;
3051 ImGuiTableDrawChannelIdx DrawChannelCurrent;
3052 ImGuiTableDrawChannelIdx DrawChannelFrozen;
3053 ImGuiTableDrawChannelIdx DrawChannelUnfrozen;
3056 bool IsUserEnabledNextFrame;
3059 bool IsRequestOutput;
3061 bool IsPreserveWidthAuto;
3062 ImS8 NavLayerCurrent;
3064 ImU8 CannotSkipItemsQueue;
3065 ImU8 SortDirection : 2;
3066 ImU8 SortDirectionsAvailCount : 2;
3067 ImU8 SortDirectionsAvailMask : 4;
3068 ImU8 SortDirectionsAvailList;
3072 memset(
this, 0,
sizeof(*
this));
3073 StretchWeight = WidthRequest = -1.0f;
3075 DisplayOrder = IndexWithinEnabledSet = -1;
3076 PrevEnabledColumn = NextEnabledColumn = -1;
3078 SortDirection = ImGuiSortDirection_None;
3079 DrawChannelCurrent = DrawChannelFrozen = DrawChannelUnfrozen = (ImU8)-1;
3088 ImGuiTableColumnIdx Column;
3096 ImGuiTableColumnIdx Index;
3106 ImGuiID TableInstanceID;
3107 float LastOuterHeight;
3108 float LastTopHeadersRowHeight;
3109 float LastFrozenHeight;
3113 ImGuiTableInstanceData() { TableInstanceID = 0; LastOuterHeight = LastTopHeadersRowHeight = LastFrozenHeight = 0.0f; HoveredRowLast = HoveredRowNext = -1; }
3120 ImGuiTableFlags Flags;
3126 ImBitArrayPtr EnabledMaskByDisplayOrder;
3127 ImBitArrayPtr EnabledMaskByIndex;
3128 ImBitArrayPtr VisibleMaskByIndex;
3129 ImGuiTableFlags SettingsLoadedFlags;
3131 int LastFrameActive;
3135 ImS16 InstanceCurrent;
3136 ImS16 InstanceInteracted;
3140 float RowCellPaddingY;
3141 float RowTextBaseline;
3142 float RowIndentOffsetX;
3143 ImGuiTableRowFlags RowFlags : 16;
3144 ImGuiTableRowFlags LastRowFlags : 16;
3145 int RowBgColorCounter;
3146 ImU32 RowBgColor[2];
3147 ImU32 BorderColorStrong;
3148 ImU32 BorderColorLight;
3152 float MinColumnWidth;
3153 float OuterPaddingX;
3155 float CellSpacingX1;
3156 float CellSpacingX2;
3158 float ColumnsGivenWidth;
3159 float ColumnsAutoFitWidth;
3160 float ColumnsStretchSumWeights;
3161 float ResizedColumnNextWidth;
3162 float ResizeLockMinContentsX2;
3164 float AngledHeadersHeight;
3165 float AngledHeadersSlope;
3171 ImRect Bg0ClipRectForDrawCmd;
3172 ImRect Bg2ClipRectForDrawCmd;
3174 ImRect HostBackupInnerClipRect;
3184 ImGuiTableColumnIdx SortSpecsCount;
3185 ImGuiTableColumnIdx ColumnsEnabledCount;
3186 ImGuiTableColumnIdx ColumnsEnabledFixedCount;
3187 ImGuiTableColumnIdx DeclColumnsCount;
3188 ImGuiTableColumnIdx AngledHeadersCount;
3189 ImGuiTableColumnIdx HoveredColumnBody;
3190 ImGuiTableColumnIdx HoveredColumnBorder;
3191 ImGuiTableColumnIdx HighlightColumnHeader;
3192 ImGuiTableColumnIdx AutoFitSingleColumn;
3193 ImGuiTableColumnIdx ResizedColumn;
3194 ImGuiTableColumnIdx LastResizedColumn;
3195 ImGuiTableColumnIdx HeldHeaderColumn;
3196 ImGuiTableColumnIdx ReorderColumn;
3197 ImGuiTableColumnIdx ReorderColumnDir;
3198 ImGuiTableColumnIdx LeftMostEnabledColumn;
3199 ImGuiTableColumnIdx RightMostEnabledColumn;
3200 ImGuiTableColumnIdx LeftMostStretchedColumn;
3201 ImGuiTableColumnIdx RightMostStretchedColumn;
3202 ImGuiTableColumnIdx ContextPopupColumn;
3203 ImGuiTableColumnIdx FreezeRowsRequest;
3204 ImGuiTableColumnIdx FreezeRowsCount;
3205 ImGuiTableColumnIdx FreezeColumnsRequest;
3206 ImGuiTableColumnIdx FreezeColumnsCount;
3207 ImGuiTableColumnIdx RowCellDataCurrent;
3208 ImGuiTableDrawChannelIdx DummyDrawChannel;
3209 ImGuiTableDrawChannelIdx Bg2DrawChannelCurrent;
3210 ImGuiTableDrawChannelIdx Bg2DrawChannelUnfrozen;
3212 bool IsLayoutLocked;
3214 bool IsInitializing;
3215 bool IsSortSpecsDirty;
3216 bool IsUsingHeaders;
3217 bool IsContextPopupOpen;
3218 bool DisableDefaultContextMenu;
3219 bool IsSettingsRequestLoad;
3220 bool IsSettingsDirty;
3221 bool IsDefaultDisplayOrder;
3222 bool IsResetAllRequest;
3223 bool IsResetDisplayOrderRequest;
3224 bool IsUnfrozenRows;
3225 bool IsDefaultSizingPolicy;
3226 bool IsActiveIdAliveBeforeTable;
3227 bool IsActiveIdInTable;
3228 bool HasScrollbarYCurr;
3229 bool HasScrollbarYPrev;
3230 bool MemoryCompacted;
3233 ImGuiTable() { memset(
this, 0,
sizeof(*
this)); LastFrameActive = -1; }
3245 float LastTimeActive;
3246 float AngledHeadersExtraWidth;
3252 ImRect HostBackupWorkRect;
3253 ImRect HostBackupParentWorkRect;
3254 ImVec2 HostBackupPrevLineSize;
3255 ImVec2 HostBackupCurrLineSize;
3256 ImVec2 HostBackupCursorMaxPos;
3257 ImVec1 HostBackupColumnsOffset;
3258 float HostBackupItemWidth;
3259 int HostBackupItemWidthStackSize;
3267 float WidthOrWeight;
3269 ImGuiTableColumnIdx Index;
3270 ImGuiTableColumnIdx DisplayOrder;
3271 ImGuiTableColumnIdx SortOrder;
3272 ImU8 SortDirection : 2;
3278 WidthOrWeight = 0.0f;
3281 DisplayOrder = SortOrder = -1;
3282 SortDirection = ImGuiSortDirection_None;
3292 ImGuiTableFlags SaveFlags;
3294 ImGuiTableColumnIdx ColumnsCount;
3295 ImGuiTableColumnIdx ColumnsCountMax;
3317 inline ImGuiWindow* GetCurrentWindow() {
ImGuiContext& g = *GImGui; g.CurrentWindow->WriteAccessed =
true;
return g.CurrentWindow; }
3318 IMGUI_API
ImGuiWindow* FindWindowByID(ImGuiID
id);
3319 IMGUI_API
ImGuiWindow* FindWindowByName(
const char* name);
3320 IMGUI_API
void UpdateWindowParentAndRootLinks(
ImGuiWindow* window, ImGuiWindowFlags flags,
ImGuiWindow* parent_window);
3321 IMGUI_API
void UpdateWindowSkipRefresh(
ImGuiWindow* window);
3323 IMGUI_API
bool IsWindowChildOf(
ImGuiWindow* window,
ImGuiWindow* potential_parent,
bool popup_hierarchy,
bool dock_hierarchy);
3326 IMGUI_API
bool IsWindowNavFocusable(
ImGuiWindow* window);
3327 IMGUI_API
void SetWindowPos(
ImGuiWindow* window,
const ImVec2& pos, ImGuiCond cond = 0);
3328 IMGUI_API
void SetWindowSize(
ImGuiWindow* window,
const ImVec2& size, ImGuiCond cond = 0);
3329 IMGUI_API
void SetWindowCollapsed(
ImGuiWindow* window,
bool collapsed, ImGuiCond cond = 0);
3331 IMGUI_API
void SetWindowHiddenAndSkipItemsForCurrentFrame(
ImGuiWindow* window);
3332 inline void SetWindowParentWindowForFocusRoute(
ImGuiWindow* window,
ImGuiWindow* parent_window) { window->ParentWindowForFocusRoute = parent_window; }
3333 inline ImRect WindowRectAbsToRel(
ImGuiWindow* window,
const ImRect& r) {
ImVec2 off = window->DC.CursorStartPos;
return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); }
3334 inline ImRect WindowRectRelToAbs(
ImGuiWindow* window,
const ImRect& r) {
ImVec2 off = window->DC.CursorStartPos;
return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); }
3339 IMGUI_API
void FocusWindow(
ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0);
3341 IMGUI_API
void BringWindowToFocusFront(
ImGuiWindow* window);
3342 IMGUI_API
void BringWindowToDisplayFront(
ImGuiWindow* window);
3343 IMGUI_API
void BringWindowToDisplayBack(
ImGuiWindow* window);
3345 IMGUI_API
int FindWindowDisplayIndex(
ImGuiWindow* window);
3349 IMGUI_API
void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags);
3354 IMGUI_API
void RegisterFontAtlas(
ImFontAtlas* atlas);
3355 IMGUI_API
void UnregisterFontAtlas(
ImFontAtlas* atlas);
3356 IMGUI_API
void SetCurrentFont(
ImFont* font,
float font_size_before_scaling,
float font_size_after_scaling);
3357 IMGUI_API
void UpdateCurrentFontSize(
float restore_font_size_after_scaling);
3358 IMGUI_API
void SetFontRasterizerDensity(
float rasterizer_density);
3359 inline float GetFontRasterizerDensity() {
return GImGui->FontRasterizerDensity; }
3360 inline float GetRoundedFontSize(
float size) {
return IM_ROUND(size); }
3361 IMGUI_API
ImFont* GetDefaultFont();
3362 IMGUI_API
void PushPasswordFont();
3363 IMGUI_API
void PopPasswordFont();
3364 inline ImDrawList* GetForegroundDrawList(
ImGuiWindow* window) {
return GetForegroundDrawList(window->Viewport); }
3368 IMGUI_API
void Initialize();
3369 IMGUI_API
void Shutdown();
3372 IMGUI_API
void UpdateInputEvents(
bool trickle_fast_inputs);
3373 IMGUI_API
void UpdateHoveredWindowAndCaptureFlags(
const ImVec2& mouse_pos);
3374 IMGUI_API
void FindHoveredWindowEx(
const ImVec2& pos,
bool find_first_and_in_any_viewport,
ImGuiWindow** out_hovered_window,
ImGuiWindow** out_hovered_window_under_moving_window);
3375 IMGUI_API
void StartMouseMovingWindow(
ImGuiWindow* window);
3377 IMGUI_API
void UpdateMouseMovingWindowNewFrame();
3378 IMGUI_API
void UpdateMouseMovingWindowEndFrame();
3382 IMGUI_API
void RemoveContextHook(
ImGuiContext* context, ImGuiID hook_to_remove);
3383 IMGUI_API
void CallContextHooks(
ImGuiContext* context, ImGuiContextHookType type);
3392 IMGUI_API
ImGuiViewportP* FindHoveredViewportFromPlatformWindowStack(
const ImVec2& mouse_platform_pos);
3395 IMGUI_API
void MarkIniSettingsDirty();
3396 IMGUI_API
void MarkIniSettingsDirty(
ImGuiWindow* window);
3397 IMGUI_API
void ClearIniSettings();
3399 IMGUI_API
void RemoveSettingsHandler(
const char* type_name);
3406 IMGUI_API
void ClearWindowSettings(
const char* name);
3409 IMGUI_API
void LocalizeRegisterEntries(
const ImGuiLocEntry* entries,
int count);
3410 inline const char* LocalizeGetMsg(ImGuiLocKey key) {
ImGuiContext& g = *GImGui;
const char* msg = g.LocalizationTable[key];
return msg ? msg :
"*Missing Text*"; }
3413 IMGUI_API
void SetScrollX(
ImGuiWindow* window,
float scroll_x);
3414 IMGUI_API
void SetScrollY(
ImGuiWindow* window,
float scroll_y);
3415 IMGUI_API
void SetScrollFromPosX(
ImGuiWindow* window,
float local_x,
float center_x_ratio);
3416 IMGUI_API
void SetScrollFromPosY(
ImGuiWindow* window,
float local_y,
float center_y_ratio);
3419 IMGUI_API
void ScrollToItem(ImGuiScrollFlags flags = 0);
3420 IMGUI_API
void ScrollToRect(
ImGuiWindow* window,
const ImRect& rect, ImGuiScrollFlags flags = 0);
3423 inline void ScrollToBringRectIntoView(
ImGuiWindow* window,
const ImRect& rect) { ScrollToRect(window, rect, ImGuiScrollFlags_KeepVisibleEdgeY); }
3427 inline ImGuiItemStatusFlags GetItemStatusFlags() {
ImGuiContext& g = *GImGui;
return g.LastItemData.StatusFlags; }
3428 inline ImGuiItemFlags GetItemFlags() {
ImGuiContext& g = *GImGui;
return g.LastItemData.ItemFlags; }
3429 inline ImGuiID GetActiveID() {
ImGuiContext& g = *GImGui;
return g.ActiveId; }
3430 inline ImGuiID GetFocusID() {
ImGuiContext& g = *GImGui;
return g.NavId; }
3431 IMGUI_API
void SetActiveID(ImGuiID
id,
ImGuiWindow* window);
3432 IMGUI_API
void SetFocusID(ImGuiID
id,
ImGuiWindow* window);
3433 IMGUI_API
void ClearActiveID();
3434 IMGUI_API ImGuiID GetHoveredID();
3435 IMGUI_API
void SetHoveredID(ImGuiID
id);
3436 IMGUI_API
void KeepAliveID(ImGuiID
id);
3437 IMGUI_API
void MarkItemEdited(ImGuiID
id);
3438 IMGUI_API
void PushOverrideID(ImGuiID
id);
3439 IMGUI_API ImGuiID GetIDWithSeed(
const char* str_id_begin,
const char* str_id_end, ImGuiID seed);
3440 IMGUI_API ImGuiID GetIDWithSeed(
int n, ImGuiID seed);
3443 IMGUI_API
void ItemSize(
const ImVec2& size,
float text_baseline_y = -1.0f);
3444 inline void ItemSize(
const ImRect& bb,
float text_baseline_y = -1.0f) { ItemSize(bb.GetSize(), text_baseline_y); }
3445 IMGUI_API
bool ItemAdd(
const ImRect& bb, ImGuiID
id,
const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0);
3446 IMGUI_API
bool ItemHoverable(
const ImRect& bb, ImGuiID
id, ImGuiItemFlags item_flags);
3447 IMGUI_API
bool IsWindowContentHoverable(
ImGuiWindow* window, ImGuiHoveredFlags flags = 0);
3448 IMGUI_API
bool IsClippedEx(
const ImRect& bb, ImGuiID
id);
3449 IMGUI_API
void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags,
const ImRect& item_rect);
3450 IMGUI_API
ImVec2 CalcItemSize(
ImVec2 size,
float default_w,
float default_h);
3451 IMGUI_API
float CalcWrapWidthForPos(
const ImVec2& pos,
float wrap_pos_x);
3452 IMGUI_API
void PushMultiItemsWidths(
int components,
float width_full);
3457 IMGUI_API
void BeginDisabledOverrideReenable();
3458 IMGUI_API
void EndDisabledOverrideReenable();
3461 IMGUI_API
void LogBegin(ImGuiLogFlags flags,
int auto_open_depth);
3462 IMGUI_API
void LogToBuffer(
int auto_open_depth = -1);
3463 IMGUI_API
void LogRenderedText(
const ImVec2* ref_pos,
const char* text,
const char* text_end = NULL);
3464 IMGUI_API
void LogSetNextTextDecoration(
const char* prefix,
const char* suffix);
3467 IMGUI_API
bool BeginChildEx(
const char* name, ImGuiID
id,
const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags);
3470 IMGUI_API
bool BeginPopupEx(ImGuiID
id, ImGuiWindowFlags extra_window_flags);
3471 IMGUI_API
bool BeginPopupMenuEx(ImGuiID
id,
const char* label, ImGuiWindowFlags extra_window_flags);
3472 IMGUI_API
void OpenPopupEx(ImGuiID
id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None);
3473 IMGUI_API
void ClosePopupToLevel(
int remaining,
bool restore_focus_to_window_under_popup);
3474 IMGUI_API
void ClosePopupsOverWindow(
ImGuiWindow* ref_window,
bool restore_focus_to_window_under_popup);
3475 IMGUI_API
void ClosePopupsExceptModals();
3476 IMGUI_API
bool IsPopupOpen(ImGuiID
id, ImGuiPopupFlags popup_flags);
3479 IMGUI_API
ImGuiWindow* GetTopMostAndVisiblePopupModal();
3482 IMGUI_API
ImVec2 FindBestWindowPosForPopupEx(
const ImVec2& ref_pos,
const ImVec2& size, ImGuiDir* last_dir,
const ImRect& r_outer,
const ImRect& r_avoid, ImGuiPopupPositionPolicy policy);
3485 IMGUI_API
bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags);
3486 IMGUI_API
bool BeginTooltipHidden();
3489 IMGUI_API
bool BeginViewportSideBar(
const char* name,
ImGuiViewport* viewport, ImGuiDir dir,
float size, ImGuiWindowFlags window_flags);
3490 IMGUI_API
bool BeginMenuEx(
const char* label,
const char* icon,
bool enabled =
true);
3491 IMGUI_API
bool MenuItemEx(
const char* label,
const char* icon,
const char* shortcut = NULL,
bool selected =
false,
bool enabled =
true);
3494 IMGUI_API
bool BeginComboPopup(ImGuiID popup_id,
const ImRect& bb, ImGuiComboFlags flags);
3495 IMGUI_API
bool BeginComboPreview();
3496 IMGUI_API
void EndComboPreview();
3499 IMGUI_API
void NavInitWindow(
ImGuiWindow* window,
bool force_reinit);
3500 IMGUI_API
void NavInitRequestApplyResult();
3501 IMGUI_API
bool NavMoveRequestButNoResultYet();
3502 IMGUI_API
void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
3503 IMGUI_API
void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
3504 IMGUI_API
void NavMoveRequestResolveWithLastItem(
ImGuiNavItemData* result);
3506 IMGUI_API
void NavMoveRequestCancel();
3507 IMGUI_API
void NavMoveRequestApplyResult();
3508 IMGUI_API
void NavMoveRequestTryWrapping(
ImGuiWindow* window, ImGuiNavMoveFlags move_flags);
3509 IMGUI_API
void NavHighlightActivated(ImGuiID
id);
3510 IMGUI_API
void NavClearPreferredPosForAxis(ImGuiAxis axis);
3511 IMGUI_API
void SetNavCursorVisibleAfterMove();
3512 IMGUI_API
void NavUpdateCurrentWindowIsScrollPushableX();
3514 IMGUI_API
void SetNavID(ImGuiID
id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id,
const ImRect& rect_rel);
3515 IMGUI_API
void SetNavFocusScope(ImGuiID focus_scope_id);
3520 IMGUI_API
void FocusItem();
3521 IMGUI_API
void ActivateItemByID(ImGuiID
id);
3525 inline bool IsNamedKey(ImGuiKey key) {
return key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END; }
3526 inline bool IsNamedKeyOrMod(ImGuiKey key) {
return (key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END) || key == ImGuiMod_Ctrl || key == ImGuiMod_Shift || key == ImGuiMod_Alt || key == ImGuiMod_Super; }
3527 inline bool IsLegacyKey(ImGuiKey key) {
return key >= ImGuiKey_LegacyNativeKey_BEGIN && key < ImGuiKey_LegacyNativeKey_END; }
3528 inline bool IsKeyboardKey(ImGuiKey key) {
return key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END; }
3529 inline bool IsGamepadKey(ImGuiKey key) {
return key >= ImGuiKey_Gamepad_BEGIN && key < ImGuiKey_Gamepad_END; }
3530 inline bool IsMouseKey(ImGuiKey key) {
return key >= ImGuiKey_Mouse_BEGIN && key < ImGuiKey_Mouse_END; }
3531 inline bool IsAliasKey(ImGuiKey key) {
return key >= ImGuiKey_Aliases_BEGIN && key < ImGuiKey_Aliases_END; }
3532 inline bool IsLRModKey(ImGuiKey key) {
return key >= ImGuiKey_LeftCtrl && key <= ImGuiKey_RightSuper; }
3533 ImGuiKeyChord FixupKeyChord(ImGuiKeyChord key_chord);
3534 inline ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key)
3536 if (key == ImGuiMod_Ctrl)
return ImGuiKey_ReservedForModCtrl;
3537 if (key == ImGuiMod_Shift)
return ImGuiKey_ReservedForModShift;
3538 if (key == ImGuiMod_Alt)
return ImGuiKey_ReservedForModAlt;
3539 if (key == ImGuiMod_Super)
return ImGuiKey_ReservedForModSuper;
3545 IMGUI_API
const char* GetKeyChordName(ImGuiKeyChord key_chord);
3546 inline ImGuiKey MouseButtonToKey(ImGuiMouseButton button) { IM_ASSERT(button >= 0 && button < ImGuiMouseButton_COUNT);
return (ImGuiKey)(ImGuiKey_MouseLeft + button); }
3547 IMGUI_API
bool IsMouseDragPastThreshold(ImGuiMouseButton button,
float lock_threshold = -1.0f);
3548 IMGUI_API
ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down);
3549 IMGUI_API
float GetNavTweakPressedAmount(ImGuiAxis axis);
3550 IMGUI_API
int CalcTypematicRepeatAmount(
float t0,
float t1,
float repeat_delay,
float repeat_rate);
3551 IMGUI_API
void GetTypematicRepeatRate(ImGuiInputFlags flags,
float* repeat_delay,
float* repeat_rate);
3552 IMGUI_API
void TeleportMousePos(
const ImVec2& pos);
3553 IMGUI_API
void SetActiveIdUsingAllKeyboardKeys();
3554 inline bool IsActiveIdUsingNavDir(ImGuiDir dir) {
ImGuiContext& g = *GImGui;
return (g.ActiveIdUsingNavDirMask & (1 << dir)) != 0; }
3567 IMGUI_API ImGuiID GetKeyOwner(ImGuiKey key);
3568 IMGUI_API
void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
3569 IMGUI_API
void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
3570 IMGUI_API
void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags);
3571 IMGUI_API
bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id);
3572 inline ImGuiKeyOwnerData* GetKeyOwnerData(
ImGuiContext* ctx, ImGuiKey key) {
if (key & ImGuiMod_Mask_) key = ConvertSingleModFlagToKey(key); IM_ASSERT(IsNamedKey(key));
return &ctx->KeysOwnerData[key - ImGuiKey_NamedKey_BEGIN]; }
3580 IMGUI_API
bool IsKeyDown(ImGuiKey key, ImGuiID owner_id);
3581 IMGUI_API
bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0);
3582 IMGUI_API
bool IsKeyReleased(ImGuiKey key, ImGuiID owner_id);
3583 IMGUI_API
bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id = 0);
3584 IMGUI_API
bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id);
3585 IMGUI_API
bool IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0);
3586 IMGUI_API
bool IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id);
3587 IMGUI_API
bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id);
3603 IMGUI_API
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id);
3604 IMGUI_API
bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id);
3605 IMGUI_API
bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id);
3610 IMGUI_API
void DockContextInitialize(
ImGuiContext* ctx);
3612 IMGUI_API
void DockContextClearNodes(
ImGuiContext* ctx, ImGuiID root_id,
bool clear_settings_refs);
3613 IMGUI_API
void DockContextRebuildNodes(
ImGuiContext* ctx);
3614 IMGUI_API
void DockContextNewFrameUpdateUndocking(
ImGuiContext* ctx);
3615 IMGUI_API
void DockContextNewFrameUpdateDocking(
ImGuiContext* ctx);
3617 IMGUI_API ImGuiID DockContextGenNodeID(
ImGuiContext* ctx);
3621 IMGUI_API
void DockContextProcessUndockWindow(
ImGuiContext* ctx,
ImGuiWindow* window,
bool clear_persistent_docking_ref =
true);
3626 IMGUI_API
bool DockNodeBeginAmendTabBar(
ImGuiDockNode* node);
3627 IMGUI_API
void DockNodeEndAmendTabBar();
3628 inline ImGuiDockNode* DockNodeGetRootNode(
ImGuiDockNode* node) {
while (node->ParentNode) node = node->ParentNode;
return node; }
3629 inline bool DockNodeIsInHierarchyOf(
ImGuiDockNode* node,
ImGuiDockNode* parent) {
while (node) {
if (node == parent)
return true; node = node->ParentNode; }
return false; }
3630 inline int DockNodeGetDepth(
const ImGuiDockNode* node) {
int depth = 0;
while (node->ParentNode) { node = node->ParentNode; depth++; }
return depth; }
3631 inline ImGuiID DockNodeGetWindowMenuButtonId(
const ImGuiDockNode* node) {
return ImHashStr(
"#COLLAPSE", 0, node->ID); }
3633 IMGUI_API
bool GetWindowAlwaysWantOwnTabBar(
ImGuiWindow* window);
3634 IMGUI_API
void BeginDocked(
ImGuiWindow* window,
bool* p_open);
3635 IMGUI_API
void BeginDockableDragDropSource(
ImGuiWindow* window);
3636 IMGUI_API
void BeginDockableDragDropTarget(
ImGuiWindow* window);
3637 IMGUI_API
void SetWindowDock(
ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond);
3648 IMGUI_API
void DockBuilderDockWindow(
const char* window_name, ImGuiID node_id);
3649 IMGUI_API
ImGuiDockNode*DockBuilderGetNode(ImGuiID node_id);
3650 inline ImGuiDockNode* DockBuilderGetCentralNode(ImGuiID node_id) {
ImGuiDockNode* node = DockBuilderGetNode(node_id);
if (!node)
return NULL;
return DockNodeGetRootNode(node)->CentralNode; }
3651 IMGUI_API ImGuiID DockBuilderAddNode(ImGuiID node_id = 0, ImGuiDockNodeFlags flags = 0);
3652 IMGUI_API
void DockBuilderRemoveNode(ImGuiID node_id);
3653 IMGUI_API
void DockBuilderRemoveNodeDockedWindows(ImGuiID node_id,
bool clear_settings_refs =
true);
3654 IMGUI_API
void DockBuilderRemoveNodeChildNodes(ImGuiID node_id);
3655 IMGUI_API
void DockBuilderSetNodePos(ImGuiID node_id,
ImVec2 pos);
3656 IMGUI_API
void DockBuilderSetNodeSize(ImGuiID node_id,
ImVec2 size);
3657 IMGUI_API ImGuiID DockBuilderSplitNode(ImGuiID node_id, ImGuiDir split_dir,
float size_ratio_for_node_at_dir, ImGuiID* out_id_at_dir, ImGuiID* out_id_at_opposite_dir);
3658 IMGUI_API
void DockBuilderCopyDockSpace(ImGuiID src_dockspace_id, ImGuiID dst_dockspace_id,
ImVector<const char*>* in_window_remap_pairs);
3659 IMGUI_API
void DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id,
ImVector<ImGuiID>* out_node_remap_pairs);
3660 IMGUI_API
void DockBuilderCopyWindowSettings(
const char* src_name,
const char* dst_name);
3661 IMGUI_API
void DockBuilderFinish(ImGuiID node_id);
3671 IMGUI_API
void PushFocusScope(ImGuiID
id);
3672 IMGUI_API
void PopFocusScope();
3673 inline ImGuiID GetCurrentFocusScope() {
ImGuiContext& g = *GImGui;
return g.CurrentFocusScopeId; }
3676 IMGUI_API
bool IsDragDropActive();
3677 IMGUI_API
bool BeginDragDropTargetCustom(
const ImRect& bb, ImGuiID
id);
3678 IMGUI_API
void ClearDragDrop();
3679 IMGUI_API
bool IsDragDropPayloadBeingAccepted();
3680 IMGUI_API
void RenderDragDropTargetRect(
const ImRect& bb,
const ImRect& item_clip_rect);
3685 IMGUI_API
ImGuiTypingSelectRequest* GetTypingSelectRequest(ImGuiTypingSelectFlags flags = ImGuiTypingSelectFlags_None);
3686 IMGUI_API
int TypingSelectFindMatch(
ImGuiTypingSelectRequest* req,
int items_count,
const char* (*get_item_name_func)(
void*,
int),
void* user_data,
int nav_item_idx);
3687 IMGUI_API
int TypingSelectFindNextSingleCharMatch(
ImGuiTypingSelectRequest* req,
int items_count,
const char* (*get_item_name_func)(
void*,
int),
void* user_data,
int nav_item_idx);
3688 IMGUI_API
int TypingSelectFindBestLeadingMatch(
ImGuiTypingSelectRequest* req,
int items_count,
const char* (*get_item_name_func)(
void*,
int),
void* user_data);
3691 IMGUI_API
bool BeginBoxSelect(
const ImRect& scope_rect,
ImGuiWindow* window, ImGuiID box_select_id, ImGuiMultiSelectFlags ms_flags);
3692 IMGUI_API
void EndBoxSelect(
const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flags);
3695 IMGUI_API
void MultiSelectItemHeader(ImGuiID
id,
bool* p_selected, ImGuiButtonFlags* p_button_flags);
3696 IMGUI_API
void MultiSelectItemFooter(ImGuiID
id,
bool* p_selected,
bool* p_pressed);
3698 IMGUI_API
void MultiSelectAddSetRange(
ImGuiMultiSelectTempData* ms,
bool selected,
int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item);
3699 inline ImGuiBoxSelectState* GetBoxSelectState(ImGuiID
id) {
ImGuiContext& g = *GImGui;
return (
id != 0 && g.BoxSelectState.ID ==
id && g.BoxSelectState.IsActive) ? &g.BoxSelectState : NULL; }
3703 IMGUI_API
void SetWindowClipRectBeforeSetChannel(
ImGuiWindow* window,
const ImRect& clip_rect);
3704 IMGUI_API
void BeginColumns(
const char* str_id,
int count, ImGuiOldColumnFlags flags = 0);
3705 IMGUI_API
void EndColumns();
3706 IMGUI_API
void PushColumnClipRect(
int column_index);
3707 IMGUI_API
void PushColumnsBackground();
3708 IMGUI_API
void PopColumnsBackground();
3709 IMGUI_API ImGuiID GetColumnsID(
const char* str_id,
int count);
3711 IMGUI_API
float GetColumnOffsetFromNorm(
const ImGuiOldColumns* columns,
float offset_norm);
3712 IMGUI_API
float GetColumnNormFromOffset(
const ImGuiOldColumns* columns,
float offset);
3715 IMGUI_API
void TableOpenContextMenu(
int column_n = -1);
3716 IMGUI_API
void TableSetColumnWidth(
int column_n,
float width);
3717 IMGUI_API
void TableSetColumnSortDirection(
int column_n, ImGuiSortDirection sort_direction,
bool append_to_sort_specs);
3718 IMGUI_API
int TableGetHoveredRow();
3719 IMGUI_API
float TableGetHeaderRowHeight();
3720 IMGUI_API
float TableGetHeaderAngledMaxLabelWidth();
3721 IMGUI_API
void TablePushBackgroundChannel();
3722 IMGUI_API
void TablePopBackgroundChannel();
3723 IMGUI_API
void TablePushColumnChannel(
int column_n);
3724 IMGUI_API
void TablePopColumnChannel();
3725 IMGUI_API
void TableAngledHeadersRowEx(ImGuiID row_id,
float angle,
float max_label_width,
const ImGuiTableHeaderData* data,
int data_count);
3729 IMGUI_API
ImGuiTable* TableFindByID(ImGuiID
id);
3730 IMGUI_API
bool BeginTableEx(
const char* name, ImGuiID
id,
int columns_count, ImGuiTableFlags flags = 0,
const ImVec2& outer_size =
ImVec2(0, 0),
float inner_width = 0.0f);
3731 IMGUI_API
void TableBeginInitMemory(
ImGuiTable* table,
int columns_count);
3732 IMGUI_API
void TableBeginApplyRequests(
ImGuiTable* table);
3733 IMGUI_API
void TableSetupDrawChannels(
ImGuiTable* table);
3734 IMGUI_API
void TableUpdateLayout(
ImGuiTable* table);
3735 IMGUI_API
void TableUpdateBorders(
ImGuiTable* table);
3736 IMGUI_API
void TableUpdateColumnsWeightFromWidth(
ImGuiTable* table);
3737 IMGUI_API
void TableDrawBorders(
ImGuiTable* table);
3738 IMGUI_API
void TableDrawDefaultContextMenu(
ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display);
3739 IMGUI_API
bool TableBeginContextMenuPopup(
ImGuiTable* table);
3740 IMGUI_API
void TableMergeDrawChannels(
ImGuiTable* table);
3741 inline ImGuiTableInstanceData* TableGetInstanceData(
ImGuiTable* table,
int instance_no) {
if (instance_no == 0)
return &table->InstanceDataFirst;
return &table->InstanceDataExtra[instance_no - 1]; }
3742 inline ImGuiID TableGetInstanceID(
ImGuiTable* table,
int instance_no) {
return TableGetInstanceData(table, instance_no)->TableInstanceID; }
3743 IMGUI_API
void TableSortSpecsSanitize(
ImGuiTable* table);
3744 IMGUI_API
void TableSortSpecsBuild(
ImGuiTable* table);
3745 IMGUI_API ImGuiSortDirection TableGetColumnNextSortDirection(
ImGuiTableColumn* column);
3748 IMGUI_API
void TableBeginRow(
ImGuiTable* table);
3749 IMGUI_API
void TableEndRow(
ImGuiTable* table);
3750 IMGUI_API
void TableBeginCell(
ImGuiTable* table,
int column_n);
3751 IMGUI_API
void TableEndCell(
ImGuiTable* table);
3752 IMGUI_API
ImRect TableGetCellBgRect(
const ImGuiTable* table,
int column_n);
3753 IMGUI_API
const char* TableGetColumnName(
const ImGuiTable* table,
int column_n);
3754 IMGUI_API ImGuiID TableGetColumnResizeID(
ImGuiTable* table,
int column_n,
int instance_no = 0);
3755 IMGUI_API
float TableCalcMaxColumnWidth(
const ImGuiTable* table,
int column_n);
3756 IMGUI_API
void TableSetColumnWidthAutoSingle(
ImGuiTable* table,
int column_n);
3757 IMGUI_API
void TableSetColumnWidthAutoAll(
ImGuiTable* table);
3758 IMGUI_API
void TableRemove(
ImGuiTable* table);
3759 IMGUI_API
void TableGcCompactTransientBuffers(
ImGuiTable* table);
3761 IMGUI_API
void TableGcCompactSettings();
3764 IMGUI_API
void TableLoadSettings(
ImGuiTable* table);
3765 IMGUI_API
void TableSaveSettings(
ImGuiTable* table);
3766 IMGUI_API
void TableResetSettings(
ImGuiTable* table);
3768 IMGUI_API
void TableSettingsAddSettingsHandler();
3774 IMGUI_API
bool BeginTabBarEx(
ImGuiTabBar* tab_bar,
const ImRect& bb, ImGuiTabBarFlags flags);
3779 inline int TabBarGetTabOrder(
ImGuiTabBar* tab_bar,
ImGuiTabItem* tab) {
return tab_bar->Tabs.index_from_ptr(tab); }
3782 IMGUI_API
void TabBarRemoveTab(
ImGuiTabBar* tab_bar, ImGuiID tab_id);
3785 IMGUI_API
void TabBarQueueFocus(
ImGuiTabBar* tab_bar,
const char* tab_name);
3788 IMGUI_API
bool TabBarProcessReorder(
ImGuiTabBar* tab_bar);
3789 IMGUI_API
bool TabItemEx(
ImGuiTabBar* tab_bar,
const char* label,
bool* p_open, ImGuiTabItemFlags flags,
ImGuiWindow* docked_window);
3790 IMGUI_API
void TabItemSpacing(
const char* str_id, ImGuiTabItemFlags flags,
float width);
3791 IMGUI_API
ImVec2 TabItemCalcSize(
const char* label,
bool has_close_button_or_unsaved_marker);
3793 IMGUI_API
void TabItemBackground(
ImDrawList* draw_list,
const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col);
3794 IMGUI_API
void TabItemLabelAndCloseButton(
ImDrawList* draw_list,
const ImRect& bb, ImGuiTabItemFlags flags,
ImVec2 frame_padding,
const char* label, ImGuiID tab_id, ImGuiID close_button_id,
bool is_contents_visible,
bool* out_just_closed,
bool* out_text_clipped);
3799 IMGUI_API
void RenderText(
ImVec2 pos,
const char* text,
const char* text_end = NULL,
bool hide_text_after_hash =
true);
3800 IMGUI_API
void RenderTextWrapped(
ImVec2 pos,
const char* text,
const char* text_end,
float wrap_width);
3801 IMGUI_API
void RenderTextClipped(
const ImVec2& pos_min,
const ImVec2& pos_max,
const char* text,
const char* text_end,
const ImVec2* text_size_if_known,
const ImVec2& align =
ImVec2(0, 0),
const ImRect* clip_rect = NULL);
3802 IMGUI_API
void RenderTextClippedEx(
ImDrawList* draw_list,
const ImVec2& pos_min,
const ImVec2& pos_max,
const char* text,
const char* text_end,
const ImVec2* text_size_if_known,
const ImVec2& align =
ImVec2(0, 0),
const ImRect* clip_rect = NULL);
3803 IMGUI_API
void RenderTextEllipsis(
ImDrawList* draw_list,
const ImVec2& pos_min,
const ImVec2& pos_max,
float ellipsis_max_x,
const char* text,
const char* text_end,
const ImVec2* text_size_if_known);
3804 IMGUI_API
void RenderFrame(
ImVec2 p_min,
ImVec2 p_max, ImU32 fill_col,
bool borders =
true,
float rounding = 0.0f);
3805 IMGUI_API
void RenderFrameBorder(
ImVec2 p_min,
ImVec2 p_max,
float rounding = 0.0f);
3806 IMGUI_API
void RenderColorRectWithAlphaCheckerboard(
ImDrawList* draw_list,
ImVec2 p_min,
ImVec2 p_max, ImU32 fill_col,
float grid_step,
ImVec2 grid_off,
float rounding = 0.0f, ImDrawFlags flags = 0);
3807 IMGUI_API
void RenderNavCursor(
const ImRect& bb, ImGuiID
id, ImGuiNavRenderCursorFlags flags = ImGuiNavRenderCursorFlags_None);
3808 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3809 inline void RenderNavHighlight(
const ImRect& bb, ImGuiID
id, ImGuiNavRenderCursorFlags flags = ImGuiNavRenderCursorFlags_None) { RenderNavCursor(bb,
id, flags); }
3811 IMGUI_API
const char* FindRenderedTextEnd(
const char* text,
const char* text_end = NULL);
3812 IMGUI_API
void RenderMouseCursor(
ImVec2 pos,
float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow);
3815 IMGUI_API
void RenderArrow(
ImDrawList* draw_list,
ImVec2 pos, ImU32 col, ImGuiDir dir,
float scale = 1.0f);
3817 IMGUI_API
void RenderCheckMark(
ImDrawList* draw_list,
ImVec2 pos, ImU32 col,
float sz);
3818 IMGUI_API
void RenderArrowPointingAt(
ImDrawList* draw_list,
ImVec2 pos,
ImVec2 half_sz, ImGuiDir direction, ImU32 col);
3819 IMGUI_API
void RenderArrowDockMenu(
ImDrawList* draw_list,
ImVec2 p_min,
float sz, ImU32 col);
3820 IMGUI_API
void RenderRectFilledRangeH(
ImDrawList* draw_list,
const ImRect& rect, ImU32 col,
float x_start_norm,
float x_end_norm,
float rounding);
3821 IMGUI_API
void RenderRectFilledWithHole(
ImDrawList* draw_list,
const ImRect& outer,
const ImRect& inner, ImU32 col,
float rounding);
3822 IMGUI_API ImDrawFlags CalcRoundingFlagsForRectInRect(
const ImRect& r_in,
const ImRect& r_outer,
float threshold);
3825 IMGUI_API
void TextEx(
const char* text,
const char* text_end = NULL, ImGuiTextFlags flags = 0);
3826 IMGUI_API
void TextAligned(
float align_x,
float size_x,
const char* fmt, ...);
3827 IMGUI_API
void TextAlignedV(
float align_x,
float size_x,
const char* fmt, va_list args);
3830 IMGUI_API
bool ButtonEx(
const char* label,
const ImVec2& size_arg =
ImVec2(0, 0), ImGuiButtonFlags flags = 0);
3831 IMGUI_API
bool ArrowButtonEx(
const char* str_id, ImGuiDir dir,
ImVec2 size_arg, ImGuiButtonFlags flags = 0);
3833 IMGUI_API
void SeparatorEx(ImGuiSeparatorFlags flags,
float thickness = 1.0f);
3834 IMGUI_API
void SeparatorTextEx(ImGuiID
id,
const char* label,
const char* label_end,
float extra_width);
3835 IMGUI_API
bool CheckboxFlags(
const char* label, ImS64* flags, ImS64 flags_value);
3836 IMGUI_API
bool CheckboxFlags(
const char* label, ImU64* flags, ImU64 flags_value);
3839 IMGUI_API
bool CloseButton(ImGuiID
id,
const ImVec2& pos);
3841 IMGUI_API
void Scrollbar(ImGuiAxis axis);
3842 IMGUI_API
bool ScrollbarEx(
const ImRect& bb, ImGuiID
id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags draw_rounding_flags = 0);
3844 IMGUI_API ImGuiID GetWindowScrollbarID(
ImGuiWindow* window, ImGuiAxis axis);
3845 IMGUI_API ImGuiID GetWindowResizeCornerID(
ImGuiWindow* window,
int n);
3846 IMGUI_API ImGuiID GetWindowResizeBorderID(
ImGuiWindow* window, ImGuiDir dir);
3849 IMGUI_API
bool ButtonBehavior(
const ImRect& bb, ImGuiID
id,
bool* out_hovered,
bool* out_held, ImGuiButtonFlags flags = 0);
3850 IMGUI_API
bool DragBehavior(ImGuiID
id, ImGuiDataType data_type,
void* p_v,
float v_speed,
const void* p_min,
const void* p_max,
const char* format, ImGuiSliderFlags flags);
3851 IMGUI_API
bool SliderBehavior(
const ImRect& bb, ImGuiID
id, ImGuiDataType data_type,
void* p_v,
const void* p_min,
const void* p_max,
const char* format, ImGuiSliderFlags flags,
ImRect* out_grab_bb);
3852 IMGUI_API
bool SplitterBehavior(
const ImRect& bb, ImGuiID
id, ImGuiAxis axis,
float* size1,
float* size2,
float min_size1,
float min_size2,
float hover_extend = 0.0f,
float hover_visibility_delay = 0.0f, ImU32 bg_col = 0);
3855 IMGUI_API
bool TreeNodeBehavior(ImGuiID
id, ImGuiTreeNodeFlags flags,
const char* label,
const char* label_end = NULL);
3856 IMGUI_API
void TreeNodeDrawLineToChildNode(
const ImVec2& target_pos);
3858 IMGUI_API
void TreePushOverrideID(ImGuiID
id);
3859 IMGUI_API
bool TreeNodeGetOpen(ImGuiID storage_id);
3860 IMGUI_API
void TreeNodeSetOpen(ImGuiID storage_id,
bool open);
3861 IMGUI_API
bool TreeNodeUpdateNextOpen(ImGuiID storage_id, ImGuiTreeNodeFlags flags);
3866 template<
typename T,
typename SIGNED_T,
typename FLOAT_T> IMGUI_API
float ScaleRatioFromValueT(ImGuiDataType data_type, T v, T v_min, T v_max,
bool is_logarithmic,
float logarithmic_zero_epsilon,
float zero_deadzone_size);
3867 template<
typename T,
typename SIGNED_T,
typename FLOAT_T> IMGUI_API T ScaleValueFromRatioT(ImGuiDataType data_type,
float t, T v_min, T v_max,
bool is_logarithmic,
float logarithmic_zero_epsilon,
float zero_deadzone_size);
3868 template<
typename T,
typename SIGNED_T,
typename FLOAT_T> IMGUI_API
bool DragBehaviorT(ImGuiDataType data_type, T* v,
float v_speed, T v_min, T v_max,
const char* format, ImGuiSliderFlags flags);
3869 template<
typename T,
typename SIGNED_T,
typename FLOAT_T> IMGUI_API
bool SliderBehaviorT(
const ImRect& bb, ImGuiID
id, ImGuiDataType data_type, T* v, T v_min, T v_max,
const char* format, ImGuiSliderFlags flags,
ImRect* out_grab_bb);
3870 template<
typename T> IMGUI_API T RoundScalarWithFormatT(
const char* format, ImGuiDataType data_type, T v);
3871 template<
typename T> IMGUI_API
bool CheckboxFlagsT(
const char* label, T* flags, T flags_value);
3875 IMGUI_API
int DataTypeFormatString(
char* buf,
int buf_size, ImGuiDataType data_type,
const void* p_data,
const char* format);
3876 IMGUI_API
void DataTypeApplyOp(ImGuiDataType data_type,
int op,
void* output,
const void* arg_1,
const void* arg_2);
3877 IMGUI_API
bool DataTypeApplyFromText(
const char* buf, ImGuiDataType data_type,
void* p_data,
const char* format,
void* p_data_when_empty = NULL);
3878 IMGUI_API
int DataTypeCompare(ImGuiDataType data_type,
const void* arg_1,
const void* arg_2);
3879 IMGUI_API
bool DataTypeClamp(ImGuiDataType data_type,
void* p_data,
const void* p_min,
const void* p_max);
3880 IMGUI_API
bool DataTypeIsZero(ImGuiDataType data_type,
const void* p_data);
3883 IMGUI_API
bool InputTextEx(
const char* label,
const char* hint,
char* buf,
int buf_size,
const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
3884 IMGUI_API
void InputTextDeactivateHook(ImGuiID
id);
3885 IMGUI_API
bool TempInputText(
const ImRect& bb, ImGuiID
id,
const char* label,
char* buf,
int buf_size, ImGuiInputTextFlags flags);
3886 IMGUI_API
bool TempInputScalar(
const ImRect& bb, ImGuiID
id,
const char* label, ImGuiDataType data_type,
void* p_data,
const char* format,
const void* p_clamp_min = NULL,
const void* p_clamp_max = NULL);
3887 inline bool TempInputIsActive(ImGuiID
id) {
ImGuiContext& g = *GImGui;
return (g.ActiveId ==
id && g.TempInputId ==
id); }
3888 inline ImGuiInputTextState* GetInputTextState(ImGuiID
id) {
ImGuiContext& g = *GImGui;
return (
id != 0 && g.InputTextState.ID ==
id) ? &g.InputTextState : NULL; }
3889 IMGUI_API
void SetNextItemRefVal(ImGuiDataType data_type,
void* p_data);
3890 inline bool IsItemActiveAsInputText() {
ImGuiContext& g = *GImGui;
return g.ActiveId != 0 && g.ActiveId == g.LastItemData.ID && g.InputTextState.ID == g.LastItemData.ID; }
3893 IMGUI_API
void ColorTooltip(
const char* text,
const float* col, ImGuiColorEditFlags flags);
3894 IMGUI_API
void ColorEditOptionsPopup(
const float* col, ImGuiColorEditFlags flags);
3895 IMGUI_API
void ColorPickerOptionsPopup(
const float* ref_col, ImGuiColorEditFlags flags);
3898 IMGUI_API
int PlotEx(ImGuiPlotType plot_type,
const char* label,
float (*values_getter)(
void* data,
int idx),
void* data,
int values_count,
int values_offset,
const char* overlay_text,
float scale_min,
float scale_max,
const ImVec2& size_arg);
3901 IMGUI_API
void ShadeVertsLinearColorGradientKeepAlpha(
ImDrawList* draw_list,
int vert_start_idx,
int vert_end_idx,
ImVec2 gradient_p0,
ImVec2 gradient_p1, ImU32 col0, ImU32 col1);
3902 IMGUI_API
void ShadeVertsLinearUV(
ImDrawList* draw_list,
int vert_start_idx,
int vert_end_idx,
const ImVec2& a,
const ImVec2& b,
const ImVec2& uv_a,
const ImVec2& uv_b,
bool clamp);
3903 IMGUI_API
void ShadeVertsTransformPos(
ImDrawList* draw_list,
int vert_start_idx,
int vert_end_idx,
const ImVec2& pivot_in,
float cos_a,
float sin_a,
const ImVec2& pivot_out);
3906 IMGUI_API
void GcCompactTransientMiscBuffers();
3907 IMGUI_API
void GcCompactTransientWindowBuffers(
ImGuiWindow* window);
3908 IMGUI_API
void GcAwakeTransientWindowBuffers(
ImGuiWindow* window);
3911 IMGUI_API
bool ErrorLog(
const char* msg);
3915 IMGUI_API
void ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
3916 IMGUI_API
void ErrorCheckEndFrameFinalizeErrorTooltip();
3917 IMGUI_API
bool BeginErrorTooltip();
3918 IMGUI_API
void EndErrorTooltip();
3921 IMGUI_API
void DebugAllocHook(
ImGuiDebugAllocInfo* info,
int frame_count,
void* ptr,
size_t size);
3922 IMGUI_API
void DebugDrawCursorPos(ImU32 col = IM_COL32(255, 0, 0, 255));
3923 IMGUI_API
void DebugDrawLineExtents(ImU32 col = IM_COL32(255, 0, 0, 255));
3924 IMGUI_API
void DebugDrawItemRect(ImU32 col = IM_COL32(255, 0, 0, 255));
3925 IMGUI_API
void DebugTextUnformattedWithLocateItem(
const char* line_begin,
const char* line_end);
3926 IMGUI_API
void DebugLocateItem(ImGuiID target_id);
3927 IMGUI_API
void DebugLocateItemOnHover(ImGuiID target_id);
3928 IMGUI_API
void DebugLocateItemResolveWithLastItem();
3929 IMGUI_API
void DebugBreakClearData();
3930 IMGUI_API
bool DebugBreakButton(
const char* label,
const char* description_of_location);
3931 IMGUI_API
void DebugBreakButtonTooltip(
bool keyboard_only,
const char* description_of_location);
3933 IMGUI_API
void DebugHookIdInfo(ImGuiID
id, ImGuiDataType data_type,
const void* data_id,
const void* data_id_end);
3935 IMGUI_API
void DebugNodeDockNode(
ImGuiDockNode* node,
const char* label);
3937 IMGUI_API
void DebugNodeDrawCmdShowMeshAndBoundingBox(
ImDrawList* out_draw_list,
const ImDrawList* draw_list,
const ImDrawCmd* draw_cmd,
bool show_mesh,
bool show_aabb);
3938 IMGUI_API
void DebugNodeFont(
ImFont* font);
3939 IMGUI_API
void DebugNodeFontGlyphesForSrcMask(
ImFont* font,
ImFontBaked* baked,
int src_mask);
3942 IMGUI_API
void DebugNodeStorage(
ImGuiStorage* storage,
const char* label);
3943 IMGUI_API
void DebugNodeTabBar(
ImGuiTabBar* tab_bar,
const char* label);
3944 IMGUI_API
void DebugNodeTable(
ImGuiTable* table);
3949 IMGUI_API
void DebugNodeWindow(
ImGuiWindow* window,
const char* label);
3952 IMGUI_API
void DebugNodeWindowsListByBeginStackParent(
ImGuiWindow** windows,
int windows_size,
ImGuiWindow* parent_in_begin_stack);
3954 IMGUI_API
void DebugNodePlatformMonitor(
ImGuiPlatformMonitor* monitor,
const char* label,
int idx);
3955 IMGUI_API
void DebugRenderKeyboardPreview(
ImDrawList* draw_list);
3959 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3996 size_t FontBakedSrcLoaderDataSize;
4001 #ifdef IMGUI_ENABLE_STB_TRUETYPE 4002 IMGUI_API
const ImFontLoader* ImFontAtlasGetFontLoaderForStbTruetype();
4004 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4014 inline bool operator==(
const ImTextureRef& lhs,
const ImTextureRef& rhs) {
return lhs._TexID == rhs._TexID && lhs._TexData == rhs._TexData; }
4015 inline bool operator!=(
const ImTextureRef& lhs,
const ImTextureRef& rhs) {
return lhs._TexID != rhs._TexID || lhs._TexData != rhs._TexData; }
4018 #define ImFontAtlasRectId_IndexMask_ (0x000FFFFF) // 20-bits: index to access builder->RectsIndex[]. 4019 #define ImFontAtlasRectId_GenerationMask_ (0x3FF00000) // 10-bits: entry generation, so each ID is unique and get can safely detected old identifiers. 4020 #define ImFontAtlasRectId_GenerationShift_ (20) 4021 inline int ImFontAtlasRectId_GetIndex(ImFontAtlasRectId
id) {
return id & ImFontAtlasRectId_IndexMask_; }
4022 inline int ImFontAtlasRectId_GetGeneration(ImFontAtlasRectId
id) {
return (
id & ImFontAtlasRectId_GenerationMask_) >> ImFontAtlasRectId_GenerationShift_; }
4023 inline ImFontAtlasRectId ImFontAtlasRectId_Make(
int index_idx,
int gen_idx) { IM_ASSERT(index_idx < ImFontAtlasRectId_IndexMask_ && gen_idx < (ImFontAtlasRectId_GenerationMask_ >> ImFontAtlasRectId_GenerationShift_));
return (ImFontAtlasRectId)(index_idx | (gen_idx << ImFontAtlasRectId_GenerationShift_)); }
4032 int TargetIndex : 20;
4033 int Generation : 10;
4034 unsigned int IsUsed : 1;
4048 ImTextureFormat Format;
4055 #ifdef IMGUI_STB_NAMESPACE 4056 namespace IMGUI_STB_NAMESPACE {
struct stbrp_node; }
4072 int RectsIndexFreeListStart;
4073 int RectsPackedCount;
4074 int RectsPackedSurface;
4075 int RectsDiscardedCount;
4076 int RectsDiscardedSurface;
4080 bool LockDisableResize;
4081 bool PreloadedAllGlyphsRanges;
4086 int BakedDiscardedCount;
4089 ImFontAtlasRectId PackIdMouseCursors;
4090 ImFontAtlasRectId PackIdLinesTexData;
4092 ImFontAtlasBuilder() { memset(
this, 0,
sizeof(*
this)); FrameCount = -1; RectsIndexFreeListStart = -1; PackIdMouseCursors = PackIdLinesTexData = -1; }
4095 IMGUI_API
void ImFontAtlasBuildInit(
ImFontAtlas* atlas);
4096 IMGUI_API
void ImFontAtlasBuildDestroy(
ImFontAtlas* atlas);
4097 IMGUI_API
void ImFontAtlasBuildMain(
ImFontAtlas* atlas);
4099 IMGUI_API
void ImFontAtlasBuildUpdatePointers(
ImFontAtlas* atlas);
4100 IMGUI_API
void ImFontAtlasBuildRenderBitmapFromString(
ImFontAtlas* atlas,
int x,
int y,
int w,
int h,
const char* in_str,
char in_marker_char);
4101 IMGUI_API
void ImFontAtlasBuildClear(
ImFontAtlas* atlas);
4104 IMGUI_API
void ImFontAtlasTextureMakeSpace(
ImFontAtlas* atlas);
4105 IMGUI_API
void ImFontAtlasTextureRepack(
ImFontAtlas* atlas,
int w,
int h);
4106 IMGUI_API
void ImFontAtlasTextureGrow(
ImFontAtlas* atlas,
int old_w = -1,
int old_h = -1);
4107 IMGUI_API
void ImFontAtlasTextureCompact(
ImFontAtlas* atlas);
4111 IMGUI_API
void ImFontAtlasBuildLegacyPreloadAllGlyphRanges(
ImFontAtlas* atlas);
4112 IMGUI_API
void ImFontAtlasBuildGetOversampleFactors(
ImFontConfig* src,
ImFontBaked* baked,
int* out_oversample_h,
int* out_oversample_v);
4113 IMGUI_API
void ImFontAtlasBuildDiscardBakes(
ImFontAtlas* atlas,
int unused_frames);
4120 IMGUI_API
void ImFontAtlasFontDiscardBakes(
ImFontAtlas* atlas,
ImFont* font,
int unused_frames);
4122 IMGUI_API ImGuiID ImFontAtlasBakedGetId(ImGuiID font_id,
float baked_size,
float rasterizer_density);
4124 IMGUI_API
ImFontBaked* ImFontAtlasBakedGetClosestMatch(
ImFontAtlas* atlas,
ImFont* font,
float font_size,
float font_rasterizer_density);
4125 IMGUI_API
ImFontBaked* ImFontAtlasBakedAdd(
ImFontAtlas* atlas,
ImFont* font,
float font_size,
float font_rasterizer_density, ImGuiID baked_id);
4131 IMGUI_API
void ImFontAtlasPackInit(
ImFontAtlas* atlas);
4135 IMGUI_API
void ImFontAtlasPackDiscardRect(
ImFontAtlas* atlas, ImFontAtlasRectId
id);
4137 IMGUI_API
void ImFontAtlasUpdateNewFrame(
ImFontAtlas* atlas,
int frame_count,
bool renderer_has_textures);
4141 IMGUI_API
void ImFontAtlasUpdateDrawListsSharedData(
ImFontAtlas* atlas);
4143 IMGUI_API
void ImFontAtlasTextureBlockConvert(
const unsigned char* src_pixels, ImTextureFormat src_fmt,
int src_pitch,
unsigned char* dst_pixels, ImTextureFormat dst_fmt,
int dst_pitch,
int w,
int h);
4146 IMGUI_API
void ImFontAtlasTextureBlockFill(
ImTextureData* dst_tex,
int dst_x,
int dst_y,
int w,
int h, ImU32 col);
4147 IMGUI_API
void ImFontAtlasTextureBlockCopy(
ImTextureData* src_tex,
int src_x,
int src_y,
ImTextureData* dst_tex,
int dst_x,
int dst_y,
int w,
int h);
4148 IMGUI_API
void ImFontAtlasTextureBlockQueueUpload(
ImFontAtlas* atlas,
ImTextureData* tex,
int x,
int y,
int w,
int h);
4150 IMGUI_API
int ImTextureDataGetFormatBytesPerPixel(ImTextureFormat format);
4151 IMGUI_API
const char* ImTextureDataGetStatusName(ImTextureStatus status);
4152 IMGUI_API
const char* ImTextureDataGetFormatName(ImTextureFormat format);
4154 #ifndef IMGUI_DISABLE_DEBUG_TOOLS 4155 IMGUI_API
void ImFontAtlasDebugLogTextureRequests(
ImFontAtlas* atlas);
4158 IMGUI_API
bool ImFontAtlasGetMouseCursorTexData(
ImFontAtlas* atlas, ImGuiMouseCursor cursor_type,
ImVec2* out_offset,
ImVec2* out_size,
ImVec2 out_uv_border[2],
ImVec2 out_uv_fill[2]);
4164 #ifdef IMGUI_ENABLE_TEST_ENGINE 4166 extern void ImGuiTestEngineHook_ItemInfo(
ImGuiContext* ctx, ImGuiID
id,
const char* label, ImGuiItemStatusFlags flags);
4167 extern void ImGuiTestEngineHook_Log(
ImGuiContext* ctx,
const char* fmt, ...);
4168 extern const char* ImGuiTestEngine_FindItemDebugLabel(
ImGuiContext* ctx, ImGuiID
id);
4171 #define IMGUI_TEST_ENGINE_ITEM_ADD(_ID,_BB,_ITEM_DATA) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemAdd(&g, _ID, _BB, _ITEM_DATA) // Register item bounding box 4172 #define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemInfo(&g, _ID, _LABEL, _FLAGS) // Register item label and status flags (optional) 4173 #define IMGUI_TEST_ENGINE_LOG(_FMT,...) ImGuiTestEngineHook_Log(&g, _FMT, __VA_ARGS__) // Custom log entry from user land into test log 4175 #define IMGUI_TEST_ENGINE_ITEM_ADD(_BB,_ID) ((void)0) 4176 #define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) ((void)g) 4181 #if defined(__clang__) 4182 #pragma clang diagnostic pop 4183 #elif defined(__GNUC__) 4184 #pragma GCC diagnostic pop 4188 #pragma warning (pop) 4191 #endif // #ifndef IMGUI_DISABLE Definition: imgui_internal.h:1357
Definition: imgui_internal.h:2974
Definition: imgui_internal.h:848
Definition: imgui_internal.h:1524
Definition: imgui_internal.h:1821
Definition: imgui_internal.h:2140
Definition: imgui_internal.h:1783
Definition: imgui_internal.h:781
Definition: imgui_internal.h:1772
Definition: imgui_internal.h:2246
Definition: imgui_internal.h:714
Definition: imgui_internal.h:800
Definition: imgui_internal.h:1195
Definition: imgui_internal.h:1753
Definition: imgui_internal.h:543
Definition: imstb_rectpack.h:179
Definition: imgui_internal.h:910
Definition: imgui_internal.h:2954
Definition: imgui_internal.h:1217
Definition: imgui_internal.h:4038
Definition: imgui_internal.h:2066
Definition: imgui_internal.h:4062
Definition: imgui_internal.h:1406
Definition: imgui_internal.h:1856
Definition: imgui_internal.h:4030
Definition: imgui_internal.h:632
Definition: imgui_internal.h:2253
Definition: imgui_internal.h:1212
Definition: imgui_internal.h:2282
Definition: imgui_internal.h:1415
Definition: imgui_internal.h:1146
Definition: imgui_internal.h:1422
Definition: imgui_internal.h:647
Definition: imgui_internal.h:1376
Definition: imgui_internal.h:3242
Definition: imgui_internal.h:3982
Definition: imgui_internal.h:2088
Definition: imgui_internal.h:1294
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: imgui_internal.h:3117
MouseButton
Definition: events.h:194
Definition: imgui_internal.h:1159
Definition: imgui_internal.h:661
Definition: imgui_internal.h:2263
Definition: imgui_internal.h:1581
Definition: imgui_internal.h:1177
Definition: imgui_internal.h:1555
Definition: imgui_internal.h:1569
Definition: imgui_internal.h:2781
Definition: imgui_internal.h:903
Definition: imgui_internal.h:1888
Definition: imgui_internal.h:1651
Definition: imgui_internal.h:1913
Definition: imgui_internal.h:923
Definition: imgui_internal.h:2071
Definition: imgui_internal.h:4065
Definition: imgui_internal.h:1432
Definition: imgui_internal.h:3025
Definition: imgui_internal.h:1831
Definition: imgui_internal.h:1336
Definition: imgui_internal.h:559
Definition: imgui_internal.h:3085
Definition: imstb_textedit.h:339
Definition: imgui_internal.h:1736
Definition: imgui_internal.h:1985
Definition: imgui_internal.h:3289
Definition: imgui_internal.h:2724
Definition: imgui_internal.h:691
Definition: imgui_internal.h:883
Definition: imgui_internal.h:2329
Definition: imgui_internal.h:929
Definition: imgui_internal.h:3104
Definition: imgui_internal.h:875
Definition: imgui_internal.h:1388
Definition: imgui_internal.h:2197
Definition: imgui_internal.h:3265
Definition: imgui_internal.h:894
Definition: imgui_internal.h:2314
Definition: imgui_internal.h:747
Definition: imgui_internal.h:569
Definition: imgui_internal.h:551
Definition: imgui_internal.h:2159
Definition: imgui_internal.h:1638