32 #define IMGUI_VERSION "1.92.6" 33 #define IMGUI_VERSION_NUM 19261 34 #define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000 35 #define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198 36 #define IMGUI_HAS_VIEWPORT // In 'docking' WIP branch. 37 #define IMGUI_HAS_DOCK // In 'docking' WIP branch. 67 #ifdef IMGUI_USER_CONFIG 68 #include IMGUI_USER_CONFIG 90 #ifndef IMGUI_IMPL_API 91 #define IMGUI_IMPL_API IMGUI_API 98 #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h 100 #define IM_COUNTOF(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) // Size of a static C-style array. Don't use on pointers! 101 #define IM_UNUSED(_VAR) ((void)(_VAR)) // Used to silence "unused variable warnings". Often useful as asserts may be stripped out from final builds. 102 #define IM_STRINGIFY_HELPER(_EXPR) #_EXPR 103 #define IM_STRINGIFY(_EXPR) IM_STRINGIFY_HELPER(_EXPR) // Preprocessor idiom to stringify e.g. an integer or a macro. 106 #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) 113 #if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__) 114 #define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1))) 115 #define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0))) 116 #elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__)) 119 #define IM_FMTARGS(FMT) 120 #define IM_FMTLIST(FMT) 122 #define IM_FMTARGS(FMT) 123 #define IM_FMTLIST(FMT) 127 #if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(IMGUI_DEBUG_PARANOID) 128 #define IM_MSVC_RUNTIME_CHECKS_OFF __pragma(runtime_checks("",off)) __pragma(check_stack(off)) __pragma(strict_gs_check(push,off)) 129 #define IM_MSVC_RUNTIME_CHECKS_RESTORE __pragma(runtime_checks("",restore)) __pragma(check_stack()) __pragma(strict_gs_check(pop)) 131 #define IM_MSVC_RUNTIME_CHECKS_OFF 132 #define IM_MSVC_RUNTIME_CHECKS_RESTORE 137 #pragma warning (push) 138 #pragma warning (disable: 26495) // [Static Analyzer] Variable 'XXX' is uninitialized. Always initialize a member variable (type.6). 140 #if defined(__clang__) 141 #pragma clang diagnostic push 142 #if __has_warning("-Wunknown-warning-option") 143 #pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx' 145 #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' 146 #pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast 147 #pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe 148 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" // warning: zero as null pointer constant 149 #pragma clang diagnostic ignored "-Wreserved-identifier" // warning: identifier '_Xxx' is reserved because it starts with '_' followed by a capital letter 150 #pragma clang diagnostic ignored "-Wunsafe-buffer-usage" // warning: 'xxx' is an unsafe pointer used for buffer access 151 #pragma clang diagnostic ignored "-Wnontrivial-memaccess" // warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 152 #elif defined(__GNUC__) 153 #pragma GCC diagnostic push 154 #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind 155 #pragma GCC diagnostic ignored "-Wfloat-equal" // warning: comparing floating-point with '==' or '!=' is unsafe 156 #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 164 typedef unsigned int ImGuiID;
165 typedef signed char ImS8;
166 typedef unsigned char ImU8;
167 typedef signed short ImS16;
168 typedef unsigned short ImU16;
169 typedef signed int ImS32;
170 typedef unsigned int ImU32;
171 typedef signed long long ImS64;
172 typedef unsigned long long ImU64;
229 enum ImGuiMouseSource : int;
230 enum ImGuiSortDirection : ImU8;
231 typedef int ImGuiCol;
232 typedef int ImGuiCond;
233 typedef int ImGuiDataType;
234 typedef int ImGuiMouseButton;
235 typedef int ImGuiMouseCursor;
236 typedef int ImGuiStyleVar;
237 typedef int ImGuiTableBgTarget;
244 typedef int ImDrawFlags;
245 typedef int ImDrawListFlags;
246 typedef int ImDrawTextFlags;
247 typedef int ImFontFlags;
248 typedef int ImFontAtlasFlags;
249 typedef int ImGuiBackendFlags;
250 typedef int ImGuiButtonFlags;
251 typedef int ImGuiChildFlags;
252 typedef int ImGuiColorEditFlags;
253 typedef int ImGuiConfigFlags;
254 typedef int ImGuiComboFlags;
255 typedef int ImGuiDockNodeFlags;
256 typedef int ImGuiDragDropFlags;
257 typedef int ImGuiFocusedFlags;
258 typedef int ImGuiHoveredFlags;
259 typedef int ImGuiInputFlags;
260 typedef int ImGuiInputTextFlags;
261 typedef int ImGuiItemFlags;
262 typedef int ImGuiKeyChord;
263 typedef int ImGuiListClipperFlags;
264 typedef int ImGuiPopupFlags;
265 typedef int ImGuiMultiSelectFlags;
266 typedef int ImGuiSelectableFlags;
267 typedef int ImGuiSliderFlags;
268 typedef int ImGuiTabBarFlags;
269 typedef int ImGuiTabItemFlags;
270 typedef int ImGuiTableFlags;
271 typedef int ImGuiTableColumnFlags;
272 typedef int ImGuiTableRowFlags;
273 typedef int ImGuiTreeNodeFlags;
274 typedef int ImGuiViewportFlags;
275 typedef int ImGuiWindowFlags;
279 typedef unsigned int ImWchar32;
280 typedef unsigned short ImWchar16;
281 #ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16] 282 typedef ImWchar32 ImWchar;
284 typedef ImWchar16 ImWchar;
290 typedef ImS64 ImGuiSelectionUserData;
295 typedef void* (*ImGuiMemAllocFunc)(
size_t sz,
void* user_data);
296 typedef void (*ImGuiMemFreeFunc)(
void* ptr,
void* user_data);
301 IM_MSVC_RUNTIME_CHECKS_OFF
305 constexpr
ImVec2() : x(0.0f), y(0.0f) { }
306 constexpr ImVec2(
float _x,
float _y) : x(_x), y(_y) { }
307 float& operator[] (
size_t idx) { IM_ASSERT(idx == 0 || idx == 1);
return ((
float*)(
void*)(
char*)
this)[idx]; }
308 float operator[] (
size_t idx)
const { IM_ASSERT(idx == 0 || idx == 1);
return ((
const float*)(
const void*)(
const char*)
this)[idx]; }
309 #ifdef IM_VEC2_CLASS_EXTRA 318 constexpr
ImVec4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) { }
319 constexpr ImVec4(
float _x,
float _y,
float _z,
float _w) : x(_x), y(_y), z(_z), w(_w) { }
320 #ifdef IM_VEC4_CLASS_EXTRA 324 IM_MSVC_RUNTIME_CHECKS_RESTORE
347 typedef ImU64 ImTextureID;
351 #ifndef ImTextureID_Invalid 352 #define ImTextureID_Invalid ((ImTextureID)0) 371 IM_MSVC_RUNTIME_CHECKS_OFF
374 ImTextureRef() { _TexData = NULL; _TexID = ImTextureID_Invalid; }
375 ImTextureRef(ImTextureID tex_id) { _TexData = NULL; _TexID = tex_id; }
376 #if !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && !defined(ImTextureID) 377 ImTextureRef(
void* tex_id) { _TexData = NULL; _TexID = (ImTextureID)(
size_t)tex_id; }
380 inline ImTextureID GetTexID()
const;
386 IM_MSVC_RUNTIME_CHECKS_RESTORE
400 IMGUI_API
void DestroyContext(
ImGuiContext* ctx = NULL);
408 IMGUI_API
void NewFrame();
409 IMGUI_API
void EndFrame();
410 IMGUI_API
void Render();
414 IMGUI_API
void ShowDemoWindow(
bool* p_open = NULL);
415 IMGUI_API
void ShowMetricsWindow(
bool* p_open = NULL);
416 IMGUI_API
void ShowDebugLogWindow(
bool* p_open = NULL);
417 IMGUI_API
void ShowIDStackToolWindow(
bool* p_open = NULL);
418 IMGUI_API
void ShowAboutWindow(
bool* p_open = NULL);
419 IMGUI_API
void ShowStyleEditor(
ImGuiStyle* ref = NULL);
420 IMGUI_API
bool ShowStyleSelector(
const char* label);
421 IMGUI_API
void ShowFontSelector(
const char* label);
422 IMGUI_API
void ShowUserGuide();
423 IMGUI_API
const char* GetVersion();
426 IMGUI_API
void StyleColorsDark(
ImGuiStyle* dst = NULL);
427 IMGUI_API
void StyleColorsLight(
ImGuiStyle* dst = NULL);
428 IMGUI_API
void StyleColorsClassic(
ImGuiStyle* dst = NULL);
442 IMGUI_API
bool Begin(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
443 IMGUI_API
void End();
463 IMGUI_API
bool BeginChild(
const char* str_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
464 IMGUI_API
bool BeginChild(ImGuiID
id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
465 IMGUI_API
void EndChild();
469 IMGUI_API
bool IsWindowAppearing();
470 IMGUI_API
bool IsWindowCollapsed();
471 IMGUI_API
bool IsWindowFocused(ImGuiFocusedFlags flags=0);
472 IMGUI_API
bool IsWindowHovered(ImGuiHoveredFlags flags=0);
474 IMGUI_API
float GetWindowDpiScale();
475 IMGUI_API
ImVec2 GetWindowPos();
476 IMGUI_API
ImVec2 GetWindowSize();
477 IMGUI_API
float GetWindowWidth();
478 IMGUI_API
float GetWindowHeight();
483 IMGUI_API
void SetNextWindowPos(
const ImVec2& pos, ImGuiCond cond = 0,
const ImVec2& pivot =
ImVec2(0, 0));
484 IMGUI_API
void SetNextWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
485 IMGUI_API
void SetNextWindowSizeConstraints(
const ImVec2& size_min,
const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL,
void* custom_callback_data = NULL);
486 IMGUI_API
void SetNextWindowContentSize(
const ImVec2& size);
487 IMGUI_API
void SetNextWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
488 IMGUI_API
void SetNextWindowFocus();
489 IMGUI_API
void SetNextWindowScroll(
const ImVec2& scroll);
490 IMGUI_API
void SetNextWindowBgAlpha(
float alpha);
491 IMGUI_API
void SetNextWindowViewport(ImGuiID viewport_id);
492 IMGUI_API
void SetWindowPos(
const ImVec2& pos, ImGuiCond cond = 0);
493 IMGUI_API
void SetWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
494 IMGUI_API
void SetWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
495 IMGUI_API
void SetWindowFocus();
496 IMGUI_API
void SetWindowPos(
const char* name,
const ImVec2& pos, ImGuiCond cond = 0);
497 IMGUI_API
void SetWindowSize(
const char* name,
const ImVec2& size, ImGuiCond cond = 0);
498 IMGUI_API
void SetWindowCollapsed(
const char* name,
bool collapsed, ImGuiCond cond = 0);
499 IMGUI_API
void SetWindowFocus(
const char* name);
504 IMGUI_API
float GetScrollX();
505 IMGUI_API
float GetScrollY();
506 IMGUI_API
void SetScrollX(
float scroll_x);
507 IMGUI_API
void SetScrollY(
float scroll_y);
508 IMGUI_API
float GetScrollMaxX();
509 IMGUI_API
float GetScrollMaxY();
510 IMGUI_API
void SetScrollHereX(
float center_x_ratio = 0.5f);
511 IMGUI_API
void SetScrollHereY(
float center_y_ratio = 0.5f);
512 IMGUI_API
void SetScrollFromPosX(
float local_x,
float center_x_ratio = 0.5f);
513 IMGUI_API
void SetScrollFromPosY(
float local_y,
float center_y_ratio = 0.5f);
531 IMGUI_API
void PushFont(
ImFont* font,
float font_size_base_unscaled);
532 IMGUI_API
void PopFont();
533 IMGUI_API
ImFont* GetFont();
534 IMGUI_API
float GetFontSize();
538 IMGUI_API
void PushStyleColor(ImGuiCol idx, ImU32 col);
539 IMGUI_API
void PushStyleColor(ImGuiCol idx,
const ImVec4& col);
540 IMGUI_API
void PopStyleColor(
int count = 1);
541 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
float val);
542 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
const ImVec2& val);
543 IMGUI_API
void PushStyleVarX(ImGuiStyleVar idx,
float val_x);
544 IMGUI_API
void PushStyleVarY(ImGuiStyleVar idx,
float val_y);
545 IMGUI_API
void PopStyleVar(
int count = 1);
546 IMGUI_API
void PushItemFlag(ImGuiItemFlags option,
bool enabled);
547 IMGUI_API
void PopItemFlag();
550 IMGUI_API
void PushItemWidth(
float item_width);
551 IMGUI_API
void PopItemWidth();
552 IMGUI_API
void SetNextItemWidth(
float item_width);
553 IMGUI_API
float CalcItemWidth();
554 IMGUI_API
void PushTextWrapPos(
float wrap_local_pos_x = 0.0f);
555 IMGUI_API
void PopTextWrapPos();
559 IMGUI_API
ImVec2 GetFontTexUvWhitePixel();
560 IMGUI_API ImU32 GetColorU32(ImGuiCol idx,
float alpha_mul = 1.0f);
561 IMGUI_API ImU32 GetColorU32(
const ImVec4& col);
562 IMGUI_API ImU32 GetColorU32(ImU32 col,
float alpha_mul = 1.0f);
563 IMGUI_API
const ImVec4& GetStyleColorVec4(ImGuiCol idx);
575 IMGUI_API
ImVec2 GetCursorScreenPos();
576 IMGUI_API
void SetCursorScreenPos(
const ImVec2& pos);
577 IMGUI_API
ImVec2 GetContentRegionAvail();
578 IMGUI_API
ImVec2 GetCursorPos();
579 IMGUI_API
float GetCursorPosX();
580 IMGUI_API
float GetCursorPosY();
581 IMGUI_API
void SetCursorPos(
const ImVec2& local_pos);
582 IMGUI_API
void SetCursorPosX(
float local_x);
583 IMGUI_API
void SetCursorPosY(
float local_y);
584 IMGUI_API
ImVec2 GetCursorStartPos();
587 IMGUI_API
void Separator();
588 IMGUI_API
void SameLine(
float offset_from_start_x=0.0f,
float spacing=-1.0f);
589 IMGUI_API
void NewLine();
590 IMGUI_API
void Spacing();
591 IMGUI_API
void Dummy(
const ImVec2& size);
592 IMGUI_API
void Indent(
float indent_w = 0.0f);
593 IMGUI_API
void Unindent(
float indent_w = 0.0f);
594 IMGUI_API
void BeginGroup();
595 IMGUI_API
void EndGroup();
596 IMGUI_API
void AlignTextToFramePadding();
597 IMGUI_API
float GetTextLineHeight();
598 IMGUI_API
float GetTextLineHeightWithSpacing();
599 IMGUI_API
float GetFrameHeight();
600 IMGUI_API
float GetFrameHeightWithSpacing();
613 IMGUI_API
void PushID(
const char* str_id);
614 IMGUI_API
void PushID(
const char* str_id_begin,
const char* str_id_end);
615 IMGUI_API
void PushID(
const void* ptr_id);
616 IMGUI_API
void PushID(
int int_id);
617 IMGUI_API
void PopID();
618 IMGUI_API ImGuiID GetID(
const char* str_id);
619 IMGUI_API ImGuiID GetID(
const char* str_id_begin,
const char* str_id_end);
620 IMGUI_API ImGuiID GetID(
const void* ptr_id);
621 IMGUI_API ImGuiID GetID(
int int_id);
624 IMGUI_API
void TextUnformatted(
const char* text,
const char* text_end = NULL);
625 IMGUI_API
void Text(
const char* fmt, ...) IM_FMTARGS(1);
626 IMGUI_API
void TextV(
const char* fmt, va_list args) IM_FMTLIST(1);
627 IMGUI_API
void TextColored(
const ImVec4& col,
const char* fmt, ...) IM_FMTARGS(2);
628 IMGUI_API
void TextColoredV(
const ImVec4& col,
const char* fmt, va_list args) IM_FMTLIST(2);
629 IMGUI_API
void TextDisabled(
const char* fmt, ...) IM_FMTARGS(1);
630 IMGUI_API
void TextDisabledV(
const char* fmt, va_list args) IM_FMTLIST(1);
631 IMGUI_API
void TextWrapped(
const char* fmt, ...) IM_FMTARGS(1);
632 IMGUI_API
void TextWrappedV(
const char* fmt, va_list args) IM_FMTLIST(1);
633 IMGUI_API
void LabelText(
const char* label,
const char* fmt, ...) IM_FMTARGS(2);
634 IMGUI_API
void LabelTextV(
const char* label,
const char* fmt, va_list args) IM_FMTLIST(2);
635 IMGUI_API
void BulletText(
const char* fmt, ...) IM_FMTARGS(1);
636 IMGUI_API
void BulletTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
637 IMGUI_API
void SeparatorText(
const char* label);
643 IMGUI_API
bool SmallButton(
const char* label);
644 IMGUI_API
bool InvisibleButton(
const char* str_id,
const ImVec2& size, ImGuiButtonFlags flags = 0);
645 IMGUI_API
bool ArrowButton(
const char* str_id, ImGuiDir dir);
646 IMGUI_API
bool Checkbox(
const char* label,
bool* v);
647 IMGUI_API
bool CheckboxFlags(
const char* label,
int* flags,
int flags_value);
648 IMGUI_API
bool CheckboxFlags(
const char* label,
unsigned int* flags,
unsigned int flags_value);
649 IMGUI_API
bool RadioButton(
const char* label,
bool active);
650 IMGUI_API
bool RadioButton(
const char* label,
int* v,
int v_button);
651 IMGUI_API
void ProgressBar(
float fraction,
const ImVec2& size_arg =
ImVec2(-FLT_MIN, 0),
const char* overlay = NULL);
652 IMGUI_API
void Bullet();
653 IMGUI_API
bool TextLink(
const char* label);
654 IMGUI_API
bool TextLinkOpenURL(
const char* label,
const char* url = NULL);
663 IMGUI_API
void ImageWithBg(
ImTextureRef tex_ref,
const ImVec2& image_size,
const ImVec2& uv0 =
ImVec2(0, 0),
const ImVec2& uv1 =
ImVec2(1, 1),
const ImVec4& bg_col =
ImVec4(0, 0, 0, 0),
const ImVec4& tint_col =
ImVec4(1, 1, 1, 1));
664 IMGUI_API
bool ImageButton(
const char* str_id,
ImTextureRef tex_ref,
const ImVec2& image_size,
const ImVec2& uv0 =
ImVec2(0, 0),
const ImVec2& uv1 =
ImVec2(1, 1),
const ImVec4& bg_col =
ImVec4(0, 0, 0, 0),
const ImVec4& tint_col =
ImVec4(1, 1, 1, 1));
669 IMGUI_API
bool BeginCombo(
const char* label,
const char* preview_value, ImGuiComboFlags flags = 0);
670 IMGUI_API
void EndCombo();
671 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int popup_max_height_in_items = -1);
672 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char* items_separated_by_zeros,
int popup_max_height_in_items = -1);
673 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char* (*getter)(
void* user_data,
int idx),
void* user_data,
int items_count,
int popup_max_height_in_items = -1);
687 IMGUI_API
bool DragFloat(
const char* label,
float* v,
float v_speed = 1.0f,
float v_min = 0.0f,
float v_max = 0.0f,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
688 IMGUI_API
bool DragFloat2(
const char* label,
float v[2],
float v_speed = 1.0f,
float v_min = 0.0f,
float v_max = 0.0f,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
689 IMGUI_API
bool DragFloat3(
const char* label,
float v[3],
float v_speed = 1.0f,
float v_min = 0.0f,
float v_max = 0.0f,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
690 IMGUI_API
bool DragFloat4(
const char* label,
float v[4],
float v_speed = 1.0f,
float v_min = 0.0f,
float v_max = 0.0f,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
691 IMGUI_API
bool DragFloatRange2(
const char* label,
float* v_current_min,
float* v_current_max,
float v_speed = 1.0f,
float v_min = 0.0f,
float v_max = 0.0f,
const char* format =
"%.3f",
const char* format_max = NULL, ImGuiSliderFlags flags = 0);
692 IMGUI_API
bool DragInt(
const char* label,
int* v,
float v_speed = 1.0f,
int v_min = 0,
int v_max = 0,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
693 IMGUI_API
bool DragInt2(
const char* label,
int v[2],
float v_speed = 1.0f,
int v_min = 0,
int v_max = 0,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
694 IMGUI_API
bool DragInt3(
const char* label,
int v[3],
float v_speed = 1.0f,
int v_min = 0,
int v_max = 0,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
695 IMGUI_API
bool DragInt4(
const char* label,
int v[4],
float v_speed = 1.0f,
int v_min = 0,
int v_max = 0,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
696 IMGUI_API
bool DragIntRange2(
const char* label,
int* v_current_min,
int* v_current_max,
float v_speed = 1.0f,
int v_min = 0,
int v_max = 0,
const char* format =
"%d",
const char* format_max = NULL, ImGuiSliderFlags flags = 0);
697 IMGUI_API
bool DragScalar(
const char* label, ImGuiDataType data_type,
void* p_data,
float v_speed = 1.0f,
const void* p_min = NULL,
const void* p_max = NULL,
const char* format = NULL, ImGuiSliderFlags flags = 0);
698 IMGUI_API
bool DragScalarN(
const char* label, ImGuiDataType data_type,
void* p_data,
int components,
float v_speed = 1.0f,
const void* p_min = NULL,
const void* p_max = NULL,
const char* format = NULL, ImGuiSliderFlags flags = 0);
706 IMGUI_API
bool SliderFloat(
const char* label,
float* v,
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
707 IMGUI_API
bool SliderFloat2(
const char* label,
float v[2],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
708 IMGUI_API
bool SliderFloat3(
const char* label,
float v[3],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
709 IMGUI_API
bool SliderFloat4(
const char* label,
float v[4],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
710 IMGUI_API
bool SliderAngle(
const char* label,
float* v_rad,
float v_degrees_min = -360.0f,
float v_degrees_max = +360.0f,
const char* format =
"%.0f deg", ImGuiSliderFlags flags = 0);
711 IMGUI_API
bool SliderInt(
const char* label,
int* v,
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
712 IMGUI_API
bool SliderInt2(
const char* label,
int v[2],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
713 IMGUI_API
bool SliderInt3(
const char* label,
int v[3],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
714 IMGUI_API
bool SliderInt4(
const char* label,
int v[4],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
715 IMGUI_API
bool SliderScalar(
const char* label, ImGuiDataType data_type,
void* p_data,
const void* p_min,
const void* p_max,
const char* format = NULL, ImGuiSliderFlags flags = 0);
716 IMGUI_API
bool SliderScalarN(
const char* label, ImGuiDataType data_type,
void* p_data,
int components,
const void* p_min,
const void* p_max,
const char* format = NULL, ImGuiSliderFlags flags = 0);
717 IMGUI_API
bool VSliderFloat(
const char* label,
const ImVec2& size,
float* v,
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
718 IMGUI_API
bool VSliderInt(
const char* label,
const ImVec2& size,
int* v,
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
719 IMGUI_API
bool VSliderScalar(
const char* label,
const ImVec2& size, ImGuiDataType data_type,
void* p_data,
const void* p_min,
const void* p_max,
const char* format = NULL, ImGuiSliderFlags flags = 0);
724 IMGUI_API
bool InputText(
const char* label,
char* buf,
size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
725 IMGUI_API
bool InputTextMultiline(
const char* label,
char* buf,
size_t buf_size,
const ImVec2& size =
ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
726 IMGUI_API
bool InputTextWithHint(
const char* label,
const char* hint,
char* buf,
size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
727 IMGUI_API
bool InputFloat(
const char* label,
float* v,
float step = 0.0f,
float step_fast = 0.0f,
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
728 IMGUI_API
bool InputFloat2(
const char* label,
float v[2],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
729 IMGUI_API
bool InputFloat3(
const char* label,
float v[3],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
730 IMGUI_API
bool InputFloat4(
const char* label,
float v[4],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
731 IMGUI_API
bool InputInt(
const char* label,
int* v,
int step = 1,
int step_fast = 100, ImGuiInputTextFlags flags = 0);
732 IMGUI_API
bool InputInt2(
const char* label,
int v[2], ImGuiInputTextFlags flags = 0);
733 IMGUI_API
bool InputInt3(
const char* label,
int v[3], ImGuiInputTextFlags flags = 0);
734 IMGUI_API
bool InputInt4(
const char* label,
int v[4], ImGuiInputTextFlags flags = 0);
735 IMGUI_API
bool InputDouble(
const char* label,
double* v,
double step = 0.0,
double step_fast = 0.0,
const char* format =
"%.6f", ImGuiInputTextFlags flags = 0);
736 IMGUI_API
bool InputScalar(
const char* label, ImGuiDataType data_type,
void* p_data,
const void* p_step = NULL,
const void* p_step_fast = NULL,
const char* format = NULL, ImGuiInputTextFlags flags = 0);
737 IMGUI_API
bool InputScalarN(
const char* label, ImGuiDataType data_type,
void* p_data,
int components,
const void* p_step = NULL,
const void* p_step_fast = NULL,
const char* format = NULL, ImGuiInputTextFlags flags = 0);
742 IMGUI_API
bool ColorEdit3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
743 IMGUI_API
bool ColorEdit4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0);
744 IMGUI_API
bool ColorPicker3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
745 IMGUI_API
bool ColorPicker4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0,
const float* ref_col = NULL);
746 IMGUI_API
bool ColorButton(
const char* desc_id,
const ImVec4& col, ImGuiColorEditFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
747 IMGUI_API
void SetColorEditOptions(ImGuiColorEditFlags flags);
751 IMGUI_API
bool TreeNode(
const char* label);
752 IMGUI_API
bool TreeNode(
const char* str_id,
const char* fmt, ...) IM_FMTARGS(2);
753 IMGUI_API
bool TreeNode(
const void* ptr_id,
const char* fmt, ...) IM_FMTARGS(2);
754 IMGUI_API
bool TreeNodeV(
const char* str_id,
const char* fmt, va_list args) IM_FMTLIST(2);
755 IMGUI_API
bool TreeNodeV(
const void* ptr_id,
const char* fmt, va_list args) IM_FMTLIST(2);
756 IMGUI_API
bool TreeNodeEx(
const char* label, ImGuiTreeNodeFlags flags = 0);
757 IMGUI_API
bool TreeNodeEx(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
758 IMGUI_API
bool TreeNodeEx(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
759 IMGUI_API
bool TreeNodeExV(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
760 IMGUI_API
bool TreeNodeExV(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
761 IMGUI_API
void TreePush(
const char* str_id);
762 IMGUI_API
void TreePush(
const void* ptr_id);
763 IMGUI_API
void TreePop();
764 IMGUI_API
float GetTreeNodeToLabelSpacing();
765 IMGUI_API
bool CollapsingHeader(
const char* label, ImGuiTreeNodeFlags flags = 0);
766 IMGUI_API
bool CollapsingHeader(
const char* label,
bool* p_visible, ImGuiTreeNodeFlags flags = 0);
767 IMGUI_API
void SetNextItemOpen(
bool is_open, ImGuiCond cond = 0);
768 IMGUI_API
void SetNextItemStorageID(ImGuiID storage_id);
773 IMGUI_API
bool Selectable(
const char* label,
bool selected =
false, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
774 IMGUI_API
bool Selectable(
const char* label,
bool* p_selected, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
783 IMGUI_API
ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags,
int selection_size = -1,
int items_count = -1);
785 IMGUI_API
void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data);
786 IMGUI_API
bool IsItemToggledSelection();
795 IMGUI_API
bool BeginListBox(
const char* label,
const ImVec2& size =
ImVec2(0, 0));
796 IMGUI_API
void EndListBox();
797 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int height_in_items = -1);
798 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
const char* (*getter)(
void* user_data,
int idx),
void* user_data,
int items_count,
int height_in_items = -1);
802 IMGUI_API
void PlotLines(
const char* label,
const float* values,
int values_count,
int values_offset = 0,
const char* overlay_text = NULL,
float scale_min = FLT_MAX,
float scale_max = FLT_MAX,
ImVec2 graph_size =
ImVec2(0, 0),
int stride =
sizeof(
float));
803 IMGUI_API
void PlotLines(
const char* label,
float(*values_getter)(
void* data,
int idx),
void* data,
int values_count,
int values_offset = 0,
const char* overlay_text = NULL,
float scale_min = FLT_MAX,
float scale_max = FLT_MAX,
ImVec2 graph_size =
ImVec2(0, 0));
804 IMGUI_API
void PlotHistogram(
const char* label,
const float* values,
int values_count,
int values_offset = 0,
const char* overlay_text = NULL,
float scale_min = FLT_MAX,
float scale_max = FLT_MAX,
ImVec2 graph_size =
ImVec2(0, 0),
int stride =
sizeof(
float));
805 IMGUI_API
void PlotHistogram(
const char* label,
float (*values_getter)(
void* data,
int idx),
void* data,
int values_count,
int values_offset = 0,
const char* overlay_text = NULL,
float scale_min = FLT_MAX,
float scale_max = FLT_MAX,
ImVec2 graph_size =
ImVec2(0, 0));
809 IMGUI_API
void Value(
const char* prefix,
bool b);
810 IMGUI_API
void Value(
const char* prefix,
int v);
811 IMGUI_API
void Value(
const char* prefix,
unsigned int v);
812 IMGUI_API
void Value(
const char* prefix,
float v,
const char* float_format = NULL);
819 IMGUI_API
bool BeginMenuBar();
820 IMGUI_API
void EndMenuBar();
821 IMGUI_API
bool BeginMainMenuBar();
822 IMGUI_API
void EndMainMenuBar();
823 IMGUI_API
bool BeginMenu(
const char* label,
bool enabled =
true);
824 IMGUI_API
void EndMenu();
825 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut = NULL,
bool selected =
false,
bool enabled =
true);
826 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut,
bool* p_selected,
bool enabled =
true);
832 IMGUI_API
bool BeginTooltip();
833 IMGUI_API
void EndTooltip();
834 IMGUI_API
void SetTooltip(
const char* fmt, ...) IM_FMTARGS(1);
835 IMGUI_API
void SetTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
841 IMGUI_API
bool BeginItemTooltip();
842 IMGUI_API
void SetItemTooltip(
const char* fmt, ...) IM_FMTARGS(1);
843 IMGUI_API
void SetItemTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
855 IMGUI_API
bool BeginPopup(
const char* str_id, ImGuiWindowFlags flags = 0);
856 IMGUI_API
bool BeginPopupModal(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
857 IMGUI_API
void EndPopup();
866 IMGUI_API
void OpenPopup(
const char* str_id, ImGuiPopupFlags popup_flags = 0);
867 IMGUI_API
void OpenPopup(ImGuiID
id, ImGuiPopupFlags popup_flags = 0);
868 IMGUI_API
void OpenPopupOnItemClick(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0);
869 IMGUI_API
void CloseCurrentPopup();
880 IMGUI_API
bool BeginPopupContextItem(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0);
881 IMGUI_API
bool BeginPopupContextWindow(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0);
882 IMGUI_API
bool BeginPopupContextVoid(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0);
888 IMGUI_API
bool IsPopupOpen(
const char* str_id, ImGuiPopupFlags flags = 0);
911 IMGUI_API
bool BeginTable(
const char* str_id,
int columns, ImGuiTableFlags flags = 0,
const ImVec2& outer_size =
ImVec2(0.0f, 0.0f),
float inner_width = 0.0f);
912 IMGUI_API
void EndTable();
913 IMGUI_API
void TableNextRow(ImGuiTableRowFlags row_flags = 0,
float min_row_height = 0.0f);
914 IMGUI_API
bool TableNextColumn();
915 IMGUI_API
bool TableSetColumnIndex(
int column_n);
925 IMGUI_API
void TableSetupColumn(
const char* label, ImGuiTableColumnFlags flags = 0,
float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
926 IMGUI_API
void TableSetupScrollFreeze(
int cols,
int rows);
927 IMGUI_API
void TableHeader(
const char* label);
928 IMGUI_API
void TableHeadersRow();
929 IMGUI_API
void TableAngledHeadersRow();
938 IMGUI_API
int TableGetColumnCount();
939 IMGUI_API
int TableGetColumnIndex();
940 IMGUI_API
int TableGetRowIndex();
941 IMGUI_API
const char* TableGetColumnName(
int column_n = -1);
942 IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(
int column_n = -1);
943 IMGUI_API
void TableSetColumnEnabled(
int column_n,
bool v);
944 IMGUI_API
int TableGetHoveredColumn();
945 IMGUI_API
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color,
int column_n = -1);
949 IMGUI_API
void Columns(
int count = 1,
const char*
id = NULL,
bool borders =
true);
950 IMGUI_API
void NextColumn();
951 IMGUI_API
int GetColumnIndex();
952 IMGUI_API
float GetColumnWidth(
int column_index = -1);
953 IMGUI_API
void SetColumnWidth(
int column_index,
float width);
954 IMGUI_API
float GetColumnOffset(
int column_index = -1);
955 IMGUI_API
void SetColumnOffset(
int column_index,
float offset_x);
956 IMGUI_API
int GetColumnsCount();
960 IMGUI_API
bool BeginTabBar(
const char* str_id, ImGuiTabBarFlags flags = 0);
961 IMGUI_API
void EndTabBar();
962 IMGUI_API
bool BeginTabItem(
const char* label,
bool* p_open = NULL, ImGuiTabItemFlags flags = 0);
963 IMGUI_API
void EndTabItem();
964 IMGUI_API
bool TabItemButton(
const char* label, ImGuiTabItemFlags flags = 0);
965 IMGUI_API
void SetTabItemClosed(
const char* tab_or_docked_window_label);
988 IMGUI_API ImGuiID DockSpace(ImGuiID dockspace_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiDockNodeFlags flags = 0,
const ImGuiWindowClass* window_class = NULL);
989 IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0,
const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0,
const ImGuiWindowClass* window_class = NULL);
990 IMGUI_API
void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0);
992 IMGUI_API ImGuiID GetWindowDockID();
993 IMGUI_API
bool IsWindowDocked();
997 IMGUI_API
void LogToTTY(
int auto_open_depth = -1);
998 IMGUI_API
void LogToFile(
int auto_open_depth = -1,
const char* filename = NULL);
999 IMGUI_API
void LogToClipboard(
int auto_open_depth = -1);
1000 IMGUI_API
void LogFinish();
1001 IMGUI_API
void LogButtons();
1002 IMGUI_API
void LogText(
const char* fmt, ...) IM_FMTARGS(1);
1003 IMGUI_API
void LogTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
1010 IMGUI_API
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0);
1011 IMGUI_API
bool SetDragDropPayload(
const char* type,
const void* data,
size_t sz, ImGuiCond cond = 0);
1012 IMGUI_API
void EndDragDropSource();
1013 IMGUI_API
bool BeginDragDropTarget();
1014 IMGUI_API
const ImGuiPayload* AcceptDragDropPayload(
const char* type, ImGuiDragDropFlags flags = 0);
1015 IMGUI_API
void EndDragDropTarget();
1023 IMGUI_API
void BeginDisabled(
bool disabled =
true);
1024 IMGUI_API
void EndDisabled();
1028 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect);
1029 IMGUI_API
void PopClipRect();
1032 IMGUI_API
void SetItemDefaultFocus();
1033 IMGUI_API
void SetKeyboardFocusHere(
int offset = 0);
1036 IMGUI_API
void SetNavCursorVisible(
bool visible);
1039 IMGUI_API
void SetNextItemAllowOverlap();
1044 IMGUI_API
bool IsItemHovered(ImGuiHoveredFlags flags = 0);
1045 IMGUI_API
bool IsItemActive();
1046 IMGUI_API
bool IsItemFocused();
1047 IMGUI_API
bool IsItemClicked(ImGuiMouseButton mouse_button = 0);
1048 IMGUI_API
bool IsItemVisible();
1049 IMGUI_API
bool IsItemEdited();
1050 IMGUI_API
bool IsItemActivated();
1051 IMGUI_API
bool IsItemDeactivated();
1052 IMGUI_API
bool IsItemDeactivatedAfterEdit();
1053 IMGUI_API
bool IsItemToggledOpen();
1054 IMGUI_API
bool IsAnyItemHovered();
1055 IMGUI_API
bool IsAnyItemActive();
1056 IMGUI_API
bool IsAnyItemFocused();
1057 IMGUI_API ImGuiID GetItemID();
1058 IMGUI_API
ImVec2 GetItemRectMin();
1059 IMGUI_API
ImVec2 GetItemRectMax();
1060 IMGUI_API
ImVec2 GetItemRectSize();
1061 IMGUI_API ImGuiItemFlags GetItemFlags();
1074 IMGUI_API
bool IsRectVisible(
const ImVec2& size);
1075 IMGUI_API
bool IsRectVisible(
const ImVec2& rect_min,
const ImVec2& rect_max);
1076 IMGUI_API
double GetTime();
1077 IMGUI_API
int GetFrameCount();
1079 IMGUI_API
const char* GetStyleColorName(ImGuiCol idx);
1084 IMGUI_API
ImVec2 CalcTextSize(
const char* text,
const char* text_end = NULL,
bool hide_text_after_double_hash =
false,
float wrap_width = -1.0f);
1087 IMGUI_API
ImVec4 ColorConvertU32ToFloat4(ImU32 in);
1088 IMGUI_API ImU32 ColorConvertFloat4ToU32(
const ImVec4& in);
1089 IMGUI_API
void ColorConvertRGBtoHSV(
float r,
float g,
float b,
float& out_h,
float& out_s,
float& out_v);
1090 IMGUI_API
void ColorConvertHSVtoRGB(
float h,
float s,
float v,
float& out_r,
float& out_g,
float& out_b);
1096 IMGUI_API
bool IsKeyDown(ImGuiKey key);
1097 IMGUI_API
bool IsKeyPressed(ImGuiKey key,
bool repeat =
true);
1098 IMGUI_API
bool IsKeyReleased(ImGuiKey key);
1099 IMGUI_API
bool IsKeyChordPressed(ImGuiKeyChord key_chord);
1100 IMGUI_API
int GetKeyPressedAmount(ImGuiKey key,
float repeat_delay,
float rate);
1101 IMGUI_API
const char* GetKeyName(ImGuiKey key);
1102 IMGUI_API
void SetNextFrameWantCaptureKeyboard(
bool want_capture_keyboard);
1124 IMGUI_API
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
1125 IMGUI_API
void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
1133 IMGUI_API
void SetItemKeyOwner(ImGuiKey key);
1139 IMGUI_API
bool IsMouseDown(ImGuiMouseButton button);
1140 IMGUI_API
bool IsMouseClicked(ImGuiMouseButton button,
bool repeat =
false);
1141 IMGUI_API
bool IsMouseReleased(ImGuiMouseButton button);
1142 IMGUI_API
bool IsMouseDoubleClicked(ImGuiMouseButton button);
1143 IMGUI_API
bool IsMouseReleasedWithDelay(ImGuiMouseButton button,
float delay);
1144 IMGUI_API
int GetMouseClickedCount(ImGuiMouseButton button);
1145 IMGUI_API
bool IsMouseHoveringRect(
const ImVec2& r_min,
const ImVec2& r_max,
bool clip =
true);
1146 IMGUI_API
bool IsMousePosValid(
const ImVec2* mouse_pos = NULL);
1147 IMGUI_API
bool IsAnyMouseDown();
1148 IMGUI_API
ImVec2 GetMousePos();
1149 IMGUI_API
ImVec2 GetMousePosOnOpeningCurrentPopup();
1150 IMGUI_API
bool IsMouseDragging(ImGuiMouseButton button,
float lock_threshold = -1.0f);
1151 IMGUI_API
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0,
float lock_threshold = -1.0f);
1152 IMGUI_API
void ResetMouseDragDelta(ImGuiMouseButton button = 0);
1153 IMGUI_API ImGuiMouseCursor GetMouseCursor();
1154 IMGUI_API
void SetMouseCursor(ImGuiMouseCursor cursor_type);
1155 IMGUI_API
void SetNextFrameWantCaptureMouse(
bool want_capture_mouse);
1159 IMGUI_API
const char* GetClipboardText();
1160 IMGUI_API
void SetClipboardText(
const char* text);
1166 IMGUI_API
void LoadIniSettingsFromDisk(
const char* ini_filename);
1167 IMGUI_API
void LoadIniSettingsFromMemory(
const char* ini_data,
size_t ini_size=0);
1168 IMGUI_API
void SaveIniSettingsToDisk(
const char* ini_filename);
1169 IMGUI_API
const char* SaveIniSettingsToMemory(
size_t* out_ini_size = NULL);
1175 IMGUI_API
void DebugTextEncoding(
const char* text);
1176 IMGUI_API
void DebugFlashStyleColor(ImGuiCol idx);
1177 IMGUI_API
void DebugStartItemPicker();
1178 IMGUI_API
bool DebugCheckVersionAndDataLayout(
const char* version_str,
size_t sz_io,
size_t sz_style,
size_t sz_vec2,
size_t sz_vec4,
size_t sz_drawvert,
size_t sz_drawidx);
1179 #ifndef IMGUI_DISABLE_DEBUG_TOOLS 1180 IMGUI_API
void DebugLog(
const char* fmt, ...) IM_FMTARGS(1);
1181 IMGUI_API
void DebugLogV(
const char* fmt, va_list args) IM_FMTLIST(1);
1188 IMGUI_API
void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func,
void* user_data = NULL);
1189 IMGUI_API
void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func,
void** p_user_data);
1190 IMGUI_API
void* MemAlloc(
size_t size);
1191 IMGUI_API
void MemFree(
void* ptr);
1196 IMGUI_API
void UpdatePlatformWindows();
1197 IMGUI_API
void RenderPlatformWindowsDefault(
void* platform_render_arg = NULL,
void* renderer_render_arg = NULL);
1198 IMGUI_API
void DestroyPlatformWindows();
1199 IMGUI_API
ImGuiViewport* FindViewportByID(ImGuiID viewport_id);
1200 IMGUI_API
ImGuiViewport* FindViewportByPlatformHandle(
void* platform_handle);
1210 enum ImGuiWindowFlags_
1212 ImGuiWindowFlags_None = 0,
1213 ImGuiWindowFlags_NoTitleBar = 1 << 0,
1214 ImGuiWindowFlags_NoResize = 1 << 1,
1215 ImGuiWindowFlags_NoMove = 1 << 2,
1216 ImGuiWindowFlags_NoScrollbar = 1 << 3,
1217 ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
1218 ImGuiWindowFlags_NoCollapse = 1 << 5,
1219 ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
1220 ImGuiWindowFlags_NoBackground = 1 << 7,
1221 ImGuiWindowFlags_NoSavedSettings = 1 << 8,
1222 ImGuiWindowFlags_NoMouseInputs = 1 << 9,
1223 ImGuiWindowFlags_MenuBar = 1 << 10,
1224 ImGuiWindowFlags_HorizontalScrollbar = 1 << 11,
1225 ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12,
1226 ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
1227 ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,
1228 ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,
1229 ImGuiWindowFlags_NoNavInputs = 1 << 16,
1230 ImGuiWindowFlags_NoNavFocus = 1 << 17,
1231 ImGuiWindowFlags_UnsavedDocument = 1 << 18,
1232 ImGuiWindowFlags_NoDocking = 1 << 19,
1233 ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1234 ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse,
1235 ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1238 ImGuiWindowFlags_DockNodeHost = 1 << 23,
1239 ImGuiWindowFlags_ChildWindow = 1 << 24,
1240 ImGuiWindowFlags_Tooltip = 1 << 25,
1241 ImGuiWindowFlags_Popup = 1 << 26,
1242 ImGuiWindowFlags_Modal = 1 << 27,
1243 ImGuiWindowFlags_ChildMenu = 1 << 28,
1246 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1261 enum ImGuiChildFlags_
1263 ImGuiChildFlags_None = 0,
1264 ImGuiChildFlags_Borders = 1 << 0,
1265 ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1,
1266 ImGuiChildFlags_ResizeX = 1 << 2,
1267 ImGuiChildFlags_ResizeY = 1 << 3,
1268 ImGuiChildFlags_AutoResizeX = 1 << 4,
1269 ImGuiChildFlags_AutoResizeY = 1 << 5,
1270 ImGuiChildFlags_AlwaysAutoResize = 1 << 6,
1271 ImGuiChildFlags_FrameStyle = 1 << 7,
1272 ImGuiChildFlags_NavFlattened = 1 << 8,
1275 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1282 enum ImGuiItemFlags_
1284 ImGuiItemFlags_None = 0,
1285 ImGuiItemFlags_NoTabStop = 1 << 0,
1286 ImGuiItemFlags_NoNav = 1 << 1,
1287 ImGuiItemFlags_NoNavDefaultFocus = 1 << 2,
1288 ImGuiItemFlags_ButtonRepeat = 1 << 3,
1289 ImGuiItemFlags_AutoClosePopups = 1 << 4,
1290 ImGuiItemFlags_AllowDuplicateId = 1 << 5,
1291 ImGuiItemFlags_Disabled = 1 << 6,
1296 enum ImGuiInputTextFlags_
1299 ImGuiInputTextFlags_None = 0,
1300 ImGuiInputTextFlags_CharsDecimal = 1 << 0,
1301 ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
1302 ImGuiInputTextFlags_CharsScientific = 1 << 2,
1303 ImGuiInputTextFlags_CharsUppercase = 1 << 3,
1304 ImGuiInputTextFlags_CharsNoBlank = 1 << 4,
1307 ImGuiInputTextFlags_AllowTabInput = 1 << 5,
1308 ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6,
1309 ImGuiInputTextFlags_EscapeClearsAll = 1 << 7,
1310 ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8,
1313 ImGuiInputTextFlags_ReadOnly = 1 << 9,
1314 ImGuiInputTextFlags_Password = 1 << 10,
1315 ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11,
1316 ImGuiInputTextFlags_AutoSelectAll = 1 << 12,
1317 ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13,
1318 ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14,
1319 ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15,
1320 ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
1323 ImGuiInputTextFlags_ElideLeft = 1 << 17,
1326 ImGuiInputTextFlags_CallbackCompletion = 1 << 18,
1327 ImGuiInputTextFlags_CallbackHistory = 1 << 19,
1328 ImGuiInputTextFlags_CallbackAlways = 1 << 20,
1329 ImGuiInputTextFlags_CallbackCharFilter = 1 << 21,
1330 ImGuiInputTextFlags_CallbackResize = 1 << 22,
1331 ImGuiInputTextFlags_CallbackEdit = 1 << 23,
1340 ImGuiInputTextFlags_WordWrap = 1 << 24,
1347 enum ImGuiTreeNodeFlags_
1349 ImGuiTreeNodeFlags_None = 0,
1350 ImGuiTreeNodeFlags_Selected = 1 << 0,
1351 ImGuiTreeNodeFlags_Framed = 1 << 1,
1352 ImGuiTreeNodeFlags_AllowOverlap = 1 << 2,
1353 ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
1354 ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
1355 ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
1356 ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6,
1357 ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
1358 ImGuiTreeNodeFlags_Leaf = 1 << 8,
1359 ImGuiTreeNodeFlags_Bullet = 1 << 9,
1360 ImGuiTreeNodeFlags_FramePadding = 1 << 10,
1361 ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
1362 ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
1363 ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13,
1364 ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14,
1365 ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15,
1367 ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17,
1368 ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
1372 ImGuiTreeNodeFlags_DrawLinesNone = 1 << 18,
1373 ImGuiTreeNodeFlags_DrawLinesFull = 1 << 19,
1374 ImGuiTreeNodeFlags_DrawLinesToNodes = 1 << 20,
1376 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1377 ImGuiTreeNodeFlags_NavLeftJumpsBackHere = ImGuiTreeNodeFlags_NavLeftJumpsToParent,
1378 ImGuiTreeNodeFlags_SpanTextWidth = ImGuiTreeNodeFlags_SpanLabelWidth,
1386 enum ImGuiPopupFlags_
1388 ImGuiPopupFlags_None = 0,
1389 ImGuiPopupFlags_MouseButtonLeft = 1 << 2,
1390 ImGuiPopupFlags_MouseButtonRight = 2 << 2,
1391 ImGuiPopupFlags_MouseButtonMiddle = 3 << 2,
1392 ImGuiPopupFlags_NoReopen = 1 << 5,
1394 ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7,
1395 ImGuiPopupFlags_NoOpenOverItems = 1 << 8,
1396 ImGuiPopupFlags_AnyPopupId = 1 << 10,
1397 ImGuiPopupFlags_AnyPopupLevel = 1 << 11,
1398 ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel,
1399 ImGuiPopupFlags_MouseButtonShift_ = 2,
1400 ImGuiPopupFlags_MouseButtonMask_ = 0x0C,
1401 ImGuiPopupFlags_InvalidMask_ = 0x03,
1405 enum ImGuiSelectableFlags_
1407 ImGuiSelectableFlags_None = 0,
1408 ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0,
1409 ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
1410 ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
1411 ImGuiSelectableFlags_Disabled = 1 << 3,
1412 ImGuiSelectableFlags_AllowOverlap = 1 << 4,
1413 ImGuiSelectableFlags_Highlight = 1 << 5,
1414 ImGuiSelectableFlags_SelectOnNav = 1 << 6,
1416 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1417 ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups,
1423 enum ImGuiComboFlags_
1425 ImGuiComboFlags_None = 0,
1426 ImGuiComboFlags_PopupAlignLeft = 1 << 0,
1427 ImGuiComboFlags_HeightSmall = 1 << 1,
1428 ImGuiComboFlags_HeightRegular = 1 << 2,
1429 ImGuiComboFlags_HeightLarge = 1 << 3,
1430 ImGuiComboFlags_HeightLargest = 1 << 4,
1431 ImGuiComboFlags_NoArrowButton = 1 << 5,
1432 ImGuiComboFlags_NoPreview = 1 << 6,
1433 ImGuiComboFlags_WidthFitPreview = 1 << 7,
1434 ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest,
1438 enum ImGuiTabBarFlags_
1440 ImGuiTabBarFlags_None = 0,
1441 ImGuiTabBarFlags_Reorderable = 1 << 0,
1442 ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
1443 ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
1444 ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3,
1445 ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
1446 ImGuiTabBarFlags_NoTooltip = 1 << 5,
1447 ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6,
1450 ImGuiTabBarFlags_FittingPolicyMixed = 1 << 7,
1451 ImGuiTabBarFlags_FittingPolicyShrink = 1 << 8,
1452 ImGuiTabBarFlags_FittingPolicyScroll = 1 << 9,
1453 ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyMixed | ImGuiTabBarFlags_FittingPolicyShrink | ImGuiTabBarFlags_FittingPolicyScroll,
1454 ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyMixed,
1456 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1457 ImGuiTabBarFlags_FittingPolicyResizeDown = ImGuiTabBarFlags_FittingPolicyShrink,
1462 enum ImGuiTabItemFlags_
1464 ImGuiTabItemFlags_None = 0,
1465 ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
1466 ImGuiTabItemFlags_SetSelected = 1 << 1,
1467 ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
1468 ImGuiTabItemFlags_NoPushId = 1 << 3,
1469 ImGuiTabItemFlags_NoTooltip = 1 << 4,
1470 ImGuiTabItemFlags_NoReorder = 1 << 5,
1471 ImGuiTabItemFlags_Leading = 1 << 6,
1472 ImGuiTabItemFlags_Trailing = 1 << 7,
1473 ImGuiTabItemFlags_NoAssumedClosure = 1 << 8,
1477 enum ImGuiFocusedFlags_
1479 ImGuiFocusedFlags_None = 0,
1480 ImGuiFocusedFlags_ChildWindows = 1 << 0,
1481 ImGuiFocusedFlags_RootWindow = 1 << 1,
1482 ImGuiFocusedFlags_AnyWindow = 1 << 2,
1483 ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
1484 ImGuiFocusedFlags_DockHierarchy = 1 << 4,
1485 ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows,
1491 enum ImGuiHoveredFlags_
1493 ImGuiHoveredFlags_None = 0,
1494 ImGuiHoveredFlags_ChildWindows = 1 << 0,
1495 ImGuiHoveredFlags_RootWindow = 1 << 1,
1496 ImGuiHoveredFlags_AnyWindow = 1 << 2,
1497 ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
1498 ImGuiHoveredFlags_DockHierarchy = 1 << 4,
1499 ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
1501 ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
1502 ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8,
1503 ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9,
1504 ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10,
1505 ImGuiHoveredFlags_NoNavOverride = 1 << 11,
1506 ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow,
1507 ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
1508 ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows,
1516 ImGuiHoveredFlags_ForTooltip = 1 << 12,
1521 ImGuiHoveredFlags_Stationary = 1 << 13,
1522 ImGuiHoveredFlags_DelayNone = 1 << 14,
1523 ImGuiHoveredFlags_DelayShort = 1 << 15,
1524 ImGuiHoveredFlags_DelayNormal = 1 << 16,
1525 ImGuiHoveredFlags_NoSharedDelay = 1 << 17,
1531 enum ImGuiDockNodeFlags_
1533 ImGuiDockNodeFlags_None = 0,
1534 ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0,
1536 ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2,
1537 ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3,
1538 ImGuiDockNodeFlags_NoDockingSplit = 1 << 4,
1539 ImGuiDockNodeFlags_NoResize = 1 << 5,
1540 ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6,
1541 ImGuiDockNodeFlags_NoUndocking = 1 << 7,
1543 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1544 ImGuiDockNodeFlags_NoSplit = ImGuiDockNodeFlags_NoDockingSplit,
1545 ImGuiDockNodeFlags_NoDockingInCentralNode = ImGuiDockNodeFlags_NoDockingOverCentralNode,
1550 enum ImGuiDragDropFlags_
1552 ImGuiDragDropFlags_None = 0,
1554 ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
1555 ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
1556 ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
1557 ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
1558 ImGuiDragDropFlags_SourceExtern = 1 << 4,
1559 ImGuiDragDropFlags_PayloadAutoExpire = 1 << 5,
1560 ImGuiDragDropFlags_PayloadNoCrossContext = 1 << 6,
1561 ImGuiDragDropFlags_PayloadNoCrossProcess = 1 << 7,
1563 ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
1564 ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
1565 ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
1566 ImGuiDragDropFlags_AcceptDrawAsHovered = 1 << 13,
1567 ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect,
1569 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1570 ImGuiDragDropFlags_SourceAutoExpirePayload = ImGuiDragDropFlags_PayloadAutoExpire,
1575 #define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F" // float[3]: Standard type for colors, without alpha. User code may use this type. 1576 #define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F" // float[4]: Standard type for colors. User code may use this type. 1589 ImGuiDataType_Float,
1590 ImGuiDataType_Double,
1592 ImGuiDataType_String,
1608 enum ImGuiSortDirection : ImU8
1610 ImGuiSortDirection_None = 0,
1611 ImGuiSortDirection_Ascending = 1,
1612 ImGuiSortDirection_Descending = 2
1625 ImGuiKey_NamedKey_BEGIN = 512,
1629 ImGuiKey_RightArrow,
1642 ImGuiKey_LeftCtrl, ImGuiKey_LeftShift, ImGuiKey_LeftAlt, ImGuiKey_LeftSuper,
1643 ImGuiKey_RightCtrl, ImGuiKey_RightShift, ImGuiKey_RightAlt, ImGuiKey_RightSuper,
1645 ImGuiKey_0, ImGuiKey_1, ImGuiKey_2, ImGuiKey_3, ImGuiKey_4, ImGuiKey_5, ImGuiKey_6, ImGuiKey_7, ImGuiKey_8, ImGuiKey_9,
1646 ImGuiKey_A, ImGuiKey_B, ImGuiKey_C, ImGuiKey_D, ImGuiKey_E, ImGuiKey_F, ImGuiKey_G, ImGuiKey_H, ImGuiKey_I, ImGuiKey_J,
1647 ImGuiKey_K, ImGuiKey_L, ImGuiKey_M, ImGuiKey_N, ImGuiKey_O, ImGuiKey_P, ImGuiKey_Q, ImGuiKey_R, ImGuiKey_S, ImGuiKey_T,
1648 ImGuiKey_U, ImGuiKey_V, ImGuiKey_W, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z,
1649 ImGuiKey_F1, ImGuiKey_F2, ImGuiKey_F3, ImGuiKey_F4, ImGuiKey_F5, ImGuiKey_F6,
1650 ImGuiKey_F7, ImGuiKey_F8, ImGuiKey_F9, ImGuiKey_F10, ImGuiKey_F11, ImGuiKey_F12,
1651 ImGuiKey_F13, ImGuiKey_F14, ImGuiKey_F15, ImGuiKey_F16, ImGuiKey_F17, ImGuiKey_F18,
1652 ImGuiKey_F19, ImGuiKey_F20, ImGuiKey_F21, ImGuiKey_F22, ImGuiKey_F23, ImGuiKey_F24,
1653 ImGuiKey_Apostrophe,
1660 ImGuiKey_LeftBracket,
1662 ImGuiKey_RightBracket,
1663 ImGuiKey_GraveAccent,
1665 ImGuiKey_ScrollLock,
1667 ImGuiKey_PrintScreen,
1669 ImGuiKey_Keypad0, ImGuiKey_Keypad1, ImGuiKey_Keypad2, ImGuiKey_Keypad3, ImGuiKey_Keypad4,
1670 ImGuiKey_Keypad5, ImGuiKey_Keypad6, ImGuiKey_Keypad7, ImGuiKey_Keypad8, ImGuiKey_Keypad9,
1671 ImGuiKey_KeypadDecimal,
1672 ImGuiKey_KeypadDivide,
1673 ImGuiKey_KeypadMultiply,
1674 ImGuiKey_KeypadSubtract,
1676 ImGuiKey_KeypadEnter,
1677 ImGuiKey_KeypadEqual,
1679 ImGuiKey_AppForward,
1686 ImGuiKey_GamepadStart,
1687 ImGuiKey_GamepadBack,
1688 ImGuiKey_GamepadFaceLeft,
1689 ImGuiKey_GamepadFaceRight,
1690 ImGuiKey_GamepadFaceUp,
1691 ImGuiKey_GamepadFaceDown,
1692 ImGuiKey_GamepadDpadLeft,
1693 ImGuiKey_GamepadDpadRight,
1694 ImGuiKey_GamepadDpadUp,
1695 ImGuiKey_GamepadDpadDown,
1702 ImGuiKey_GamepadLStickLeft,
1703 ImGuiKey_GamepadLStickRight,
1704 ImGuiKey_GamepadLStickUp,
1705 ImGuiKey_GamepadLStickDown,
1706 ImGuiKey_GamepadRStickLeft,
1707 ImGuiKey_GamepadRStickRight,
1708 ImGuiKey_GamepadRStickUp,
1709 ImGuiKey_GamepadRStickDown,
1713 ImGuiKey_MouseLeft, ImGuiKey_MouseRight, ImGuiKey_MouseMiddle, ImGuiKey_MouseX1, ImGuiKey_MouseX2, ImGuiKey_MouseWheelX, ImGuiKey_MouseWheelY,
1716 ImGuiKey_ReservedForModCtrl, ImGuiKey_ReservedForModShift, ImGuiKey_ReservedForModAlt, ImGuiKey_ReservedForModSuper,
1719 ImGuiKey_NamedKey_END,
1720 ImGuiKey_NamedKey_COUNT = ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN,
1733 ImGuiMod_Ctrl = 1 << 12,
1734 ImGuiMod_Shift = 1 << 13,
1735 ImGuiMod_Alt = 1 << 14,
1736 ImGuiMod_Super = 1 << 15,
1737 ImGuiMod_Mask_ = 0xF000,
1739 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1740 ImGuiKey_COUNT = ImGuiKey_NamedKey_END,
1741 ImGuiMod_Shortcut = ImGuiMod_Ctrl,
1750 enum ImGuiInputFlags_
1752 ImGuiInputFlags_None = 0,
1753 ImGuiInputFlags_Repeat = 1 << 0,
1758 ImGuiInputFlags_RouteActive = 1 << 10,
1759 ImGuiInputFlags_RouteFocused = 1 << 11,
1760 ImGuiInputFlags_RouteGlobal = 1 << 12,
1761 ImGuiInputFlags_RouteAlways = 1 << 13,
1763 ImGuiInputFlags_RouteOverFocused = 1 << 14,
1764 ImGuiInputFlags_RouteOverActive = 1 << 15,
1765 ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16,
1766 ImGuiInputFlags_RouteFromRootWindow = 1 << 17,
1769 ImGuiInputFlags_Tooltip = 1 << 18,
1773 enum ImGuiConfigFlags_
1775 ImGuiConfigFlags_None = 0,
1776 ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
1777 ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
1778 ImGuiConfigFlags_NoMouse = 1 << 4,
1779 ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
1780 ImGuiConfigFlags_NoKeyboard = 1 << 6,
1783 ImGuiConfigFlags_DockingEnable = 1 << 7,
1787 ImGuiConfigFlags_ViewportsEnable = 1 << 10,
1790 ImGuiConfigFlags_IsSRGB = 1 << 20,
1791 ImGuiConfigFlags_IsTouchScreen = 1 << 21,
1793 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1794 ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
1795 ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3,
1796 ImGuiConfigFlags_DpiEnableScaleFonts = 1 << 14,
1797 ImGuiConfigFlags_DpiEnableScaleViewports= 1 << 15,
1802 enum ImGuiBackendFlags_
1804 ImGuiBackendFlags_None = 0,
1805 ImGuiBackendFlags_HasGamepad = 1 << 0,
1806 ImGuiBackendFlags_HasMouseCursors = 1 << 1,
1807 ImGuiBackendFlags_HasSetMousePos = 1 << 2,
1808 ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3,
1809 ImGuiBackendFlags_RendererHasTextures = 1 << 4,
1812 ImGuiBackendFlags_RendererHasViewports = 1 << 10,
1813 ImGuiBackendFlags_PlatformHasViewports = 1 << 11,
1814 ImGuiBackendFlags_HasMouseHoveredViewport=1 << 12,
1815 ImGuiBackendFlags_HasParentViewport = 1 << 13,
1822 ImGuiCol_TextDisabled,
1827 ImGuiCol_BorderShadow,
1829 ImGuiCol_FrameBgHovered,
1830 ImGuiCol_FrameBgActive,
1832 ImGuiCol_TitleBgActive,
1833 ImGuiCol_TitleBgCollapsed,
1835 ImGuiCol_ScrollbarBg,
1836 ImGuiCol_ScrollbarGrab,
1837 ImGuiCol_ScrollbarGrabHovered,
1838 ImGuiCol_ScrollbarGrabActive,
1840 ImGuiCol_SliderGrab,
1841 ImGuiCol_SliderGrabActive,
1843 ImGuiCol_ButtonHovered,
1844 ImGuiCol_ButtonActive,
1846 ImGuiCol_HeaderHovered,
1847 ImGuiCol_HeaderActive,
1849 ImGuiCol_SeparatorHovered,
1850 ImGuiCol_SeparatorActive,
1851 ImGuiCol_ResizeGrip,
1852 ImGuiCol_ResizeGripHovered,
1853 ImGuiCol_ResizeGripActive,
1854 ImGuiCol_InputTextCursor,
1855 ImGuiCol_TabHovered,
1857 ImGuiCol_TabSelected,
1858 ImGuiCol_TabSelectedOverline,
1860 ImGuiCol_TabDimmedSelected,
1861 ImGuiCol_TabDimmedSelectedOverline,
1862 ImGuiCol_DockingPreview,
1863 ImGuiCol_DockingEmptyBg,
1865 ImGuiCol_PlotLinesHovered,
1866 ImGuiCol_PlotHistogram,
1867 ImGuiCol_PlotHistogramHovered,
1868 ImGuiCol_TableHeaderBg,
1869 ImGuiCol_TableBorderStrong,
1870 ImGuiCol_TableBorderLight,
1871 ImGuiCol_TableRowBg,
1872 ImGuiCol_TableRowBgAlt,
1874 ImGuiCol_TextSelectedBg,
1876 ImGuiCol_DragDropTarget,
1877 ImGuiCol_DragDropTargetBg,
1878 ImGuiCol_UnsavedMarker,
1880 ImGuiCol_NavWindowingHighlight,
1881 ImGuiCol_NavWindowingDimBg,
1882 ImGuiCol_ModalWindowDimBg,
1885 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1886 ImGuiCol_TabActive = ImGuiCol_TabSelected,
1887 ImGuiCol_TabUnfocused = ImGuiCol_TabDimmed,
1888 ImGuiCol_TabUnfocusedActive = ImGuiCol_TabDimmedSelected,
1889 ImGuiCol_NavHighlight = ImGuiCol_NavCursor,
1904 ImGuiStyleVar_Alpha,
1905 ImGuiStyleVar_DisabledAlpha,
1906 ImGuiStyleVar_WindowPadding,
1907 ImGuiStyleVar_WindowRounding,
1908 ImGuiStyleVar_WindowBorderSize,
1909 ImGuiStyleVar_WindowMinSize,
1910 ImGuiStyleVar_WindowTitleAlign,
1911 ImGuiStyleVar_ChildRounding,
1912 ImGuiStyleVar_ChildBorderSize,
1913 ImGuiStyleVar_PopupRounding,
1914 ImGuiStyleVar_PopupBorderSize,
1915 ImGuiStyleVar_FramePadding,
1916 ImGuiStyleVar_FrameRounding,
1917 ImGuiStyleVar_FrameBorderSize,
1918 ImGuiStyleVar_ItemSpacing,
1919 ImGuiStyleVar_ItemInnerSpacing,
1920 ImGuiStyleVar_IndentSpacing,
1921 ImGuiStyleVar_CellPadding,
1922 ImGuiStyleVar_ScrollbarSize,
1923 ImGuiStyleVar_ScrollbarRounding,
1924 ImGuiStyleVar_ScrollbarPadding,
1925 ImGuiStyleVar_GrabMinSize,
1926 ImGuiStyleVar_GrabRounding,
1927 ImGuiStyleVar_ImageRounding,
1928 ImGuiStyleVar_ImageBorderSize,
1929 ImGuiStyleVar_TabRounding,
1930 ImGuiStyleVar_TabBorderSize,
1931 ImGuiStyleVar_TabMinWidthBase,
1932 ImGuiStyleVar_TabMinWidthShrink,
1933 ImGuiStyleVar_TabBarBorderSize,
1934 ImGuiStyleVar_TabBarOverlineSize,
1935 ImGuiStyleVar_TableAngledHeadersAngle,
1936 ImGuiStyleVar_TableAngledHeadersTextAlign,
1937 ImGuiStyleVar_TreeLinesSize,
1938 ImGuiStyleVar_TreeLinesRounding,
1939 ImGuiStyleVar_ButtonTextAlign,
1940 ImGuiStyleVar_SelectableTextAlign,
1941 ImGuiStyleVar_SeparatorTextBorderSize,
1942 ImGuiStyleVar_SeparatorTextAlign,
1943 ImGuiStyleVar_SeparatorTextPadding,
1944 ImGuiStyleVar_DockingSeparatorSize,
1949 enum ImGuiButtonFlags_
1951 ImGuiButtonFlags_None = 0,
1952 ImGuiButtonFlags_MouseButtonLeft = 1 << 0,
1953 ImGuiButtonFlags_MouseButtonRight = 1 << 1,
1954 ImGuiButtonFlags_MouseButtonMiddle = 1 << 2,
1955 ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
1956 ImGuiButtonFlags_EnableNav = 1 << 3,
1960 enum ImGuiColorEditFlags_
1962 ImGuiColorEditFlags_None = 0,
1963 ImGuiColorEditFlags_NoAlpha = 1 << 1,
1964 ImGuiColorEditFlags_NoPicker = 1 << 2,
1965 ImGuiColorEditFlags_NoOptions = 1 << 3,
1966 ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
1967 ImGuiColorEditFlags_NoInputs = 1 << 5,
1968 ImGuiColorEditFlags_NoTooltip = 1 << 6,
1969 ImGuiColorEditFlags_NoLabel = 1 << 7,
1970 ImGuiColorEditFlags_NoSidePreview = 1 << 8,
1971 ImGuiColorEditFlags_NoDragDrop = 1 << 9,
1972 ImGuiColorEditFlags_NoBorder = 1 << 10,
1973 ImGuiColorEditFlags_NoColorMarkers = 1 << 11,
1979 ImGuiColorEditFlags_AlphaOpaque = 1 << 12,
1980 ImGuiColorEditFlags_AlphaNoBg = 1 << 13,
1981 ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 14,
1984 ImGuiColorEditFlags_AlphaBar = 1 << 18,
1985 ImGuiColorEditFlags_HDR = 1 << 19,
1986 ImGuiColorEditFlags_DisplayRGB = 1 << 20,
1987 ImGuiColorEditFlags_DisplayHSV = 1 << 21,
1988 ImGuiColorEditFlags_DisplayHex = 1 << 22,
1989 ImGuiColorEditFlags_Uint8 = 1 << 23,
1990 ImGuiColorEditFlags_Float = 1 << 24,
1991 ImGuiColorEditFlags_PickerHueBar = 1 << 25,
1992 ImGuiColorEditFlags_PickerHueWheel = 1 << 26,
1993 ImGuiColorEditFlags_InputRGB = 1 << 27,
1994 ImGuiColorEditFlags_InputHSV = 1 << 28,
1998 ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
2001 ImGuiColorEditFlags_AlphaMask_ = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaOpaque | ImGuiColorEditFlags_AlphaNoBg | ImGuiColorEditFlags_AlphaPreviewHalf,
2002 ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
2003 ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
2004 ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
2005 ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV,
2008 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2009 ImGuiColorEditFlags_AlphaPreview = 0,
2017 enum ImGuiSliderFlags_
2019 ImGuiSliderFlags_None = 0,
2020 ImGuiSliderFlags_Logarithmic = 1 << 5,
2021 ImGuiSliderFlags_NoRoundToFormat = 1 << 6,
2022 ImGuiSliderFlags_NoInput = 1 << 7,
2023 ImGuiSliderFlags_WrapAround = 1 << 8,
2024 ImGuiSliderFlags_ClampOnInput = 1 << 9,
2025 ImGuiSliderFlags_ClampZeroRange = 1 << 10,
2026 ImGuiSliderFlags_NoSpeedTweaks = 1 << 11,
2027 ImGuiSliderFlags_ColorMarkers = 1 << 12,
2028 ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange,
2029 ImGuiSliderFlags_InvalidMask_ = 0x7000000F,
2034 enum ImGuiMouseButton_
2036 ImGuiMouseButton_Left = 0,
2037 ImGuiMouseButton_Right = 1,
2038 ImGuiMouseButton_Middle = 2,
2039 ImGuiMouseButton_COUNT = 5
2044 enum ImGuiMouseCursor_
2046 ImGuiMouseCursor_None = -1,
2047 ImGuiMouseCursor_Arrow = 0,
2048 ImGuiMouseCursor_TextInput,
2049 ImGuiMouseCursor_ResizeAll,
2050 ImGuiMouseCursor_ResizeNS,
2051 ImGuiMouseCursor_ResizeEW,
2052 ImGuiMouseCursor_ResizeNESW,
2053 ImGuiMouseCursor_ResizeNWSE,
2054 ImGuiMouseCursor_Hand,
2055 ImGuiMouseCursor_Wait,
2056 ImGuiMouseCursor_Progress,
2057 ImGuiMouseCursor_NotAllowed,
2058 ImGuiMouseCursor_COUNT
2065 enum ImGuiMouseSource :
int 2067 ImGuiMouseSource_Mouse = 0,
2068 ImGuiMouseSource_TouchScreen,
2069 ImGuiMouseSource_Pen,
2070 ImGuiMouseSource_COUNT
2079 ImGuiCond_Always = 1 << 0,
2080 ImGuiCond_Once = 1 << 1,
2081 ImGuiCond_FirstUseEver = 1 << 2,
2082 ImGuiCond_Appearing = 1 << 3,
2111 enum ImGuiTableFlags_
2114 ImGuiTableFlags_None = 0,
2115 ImGuiTableFlags_Resizable = 1 << 0,
2116 ImGuiTableFlags_Reorderable = 1 << 1,
2117 ImGuiTableFlags_Hideable = 1 << 2,
2118 ImGuiTableFlags_Sortable = 1 << 3,
2119 ImGuiTableFlags_NoSavedSettings = 1 << 4,
2120 ImGuiTableFlags_ContextMenuInBody = 1 << 5,
2122 ImGuiTableFlags_RowBg = 1 << 6,
2123 ImGuiTableFlags_BordersInnerH = 1 << 7,
2124 ImGuiTableFlags_BordersOuterH = 1 << 8,
2125 ImGuiTableFlags_BordersInnerV = 1 << 9,
2126 ImGuiTableFlags_BordersOuterV = 1 << 10,
2127 ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
2128 ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
2129 ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
2130 ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
2131 ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
2132 ImGuiTableFlags_NoBordersInBody = 1 << 11,
2133 ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
2135 ImGuiTableFlags_SizingFixedFit = 1 << 13,
2136 ImGuiTableFlags_SizingFixedSame = 2 << 13,
2137 ImGuiTableFlags_SizingStretchProp = 3 << 13,
2138 ImGuiTableFlags_SizingStretchSame = 4 << 13,
2140 ImGuiTableFlags_NoHostExtendX = 1 << 16,
2141 ImGuiTableFlags_NoHostExtendY = 1 << 17,
2142 ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
2143 ImGuiTableFlags_PreciseWidths = 1 << 19,
2145 ImGuiTableFlags_NoClip = 1 << 20,
2147 ImGuiTableFlags_PadOuterX = 1 << 21,
2148 ImGuiTableFlags_NoPadOuterX = 1 << 22,
2149 ImGuiTableFlags_NoPadInnerX = 1 << 23,
2151 ImGuiTableFlags_ScrollX = 1 << 24,
2152 ImGuiTableFlags_ScrollY = 1 << 25,
2154 ImGuiTableFlags_SortMulti = 1 << 26,
2155 ImGuiTableFlags_SortTristate = 1 << 27,
2157 ImGuiTableFlags_HighlightHoveredColumn = 1 << 28,
2160 ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame,
2164 enum ImGuiTableColumnFlags_
2167 ImGuiTableColumnFlags_None = 0,
2168 ImGuiTableColumnFlags_Disabled = 1 << 0,
2169 ImGuiTableColumnFlags_DefaultHide = 1 << 1,
2170 ImGuiTableColumnFlags_DefaultSort = 1 << 2,
2171 ImGuiTableColumnFlags_WidthStretch = 1 << 3,
2172 ImGuiTableColumnFlags_WidthFixed = 1 << 4,
2173 ImGuiTableColumnFlags_NoResize = 1 << 5,
2174 ImGuiTableColumnFlags_NoReorder = 1 << 6,
2175 ImGuiTableColumnFlags_NoHide = 1 << 7,
2176 ImGuiTableColumnFlags_NoClip = 1 << 8,
2177 ImGuiTableColumnFlags_NoSort = 1 << 9,
2178 ImGuiTableColumnFlags_NoSortAscending = 1 << 10,
2179 ImGuiTableColumnFlags_NoSortDescending = 1 << 11,
2180 ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12,
2181 ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13,
2182 ImGuiTableColumnFlags_PreferSortAscending = 1 << 14,
2183 ImGuiTableColumnFlags_PreferSortDescending = 1 << 15,
2184 ImGuiTableColumnFlags_IndentEnable = 1 << 16,
2185 ImGuiTableColumnFlags_IndentDisable = 1 << 17,
2186 ImGuiTableColumnFlags_AngledHeader = 1 << 18,
2189 ImGuiTableColumnFlags_IsEnabled = 1 << 24,
2190 ImGuiTableColumnFlags_IsVisible = 1 << 25,
2191 ImGuiTableColumnFlags_IsSorted = 1 << 26,
2192 ImGuiTableColumnFlags_IsHovered = 1 << 27,
2195 ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
2196 ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
2197 ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
2198 ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30,
2202 enum ImGuiTableRowFlags_
2204 ImGuiTableRowFlags_None = 0,
2205 ImGuiTableRowFlags_Headers = 1 << 0,
2217 enum ImGuiTableBgTarget_
2219 ImGuiTableBgTarget_None = 0,
2220 ImGuiTableBgTarget_RowBg0 = 1,
2221 ImGuiTableBgTarget_RowBg1 = 2,
2222 ImGuiTableBgTarget_CellBg = 3,
2241 ImGuiID ColumnUserID;
2244 ImGuiSortDirection SortDirection;
2257 #ifndef IMGUI_DISABLE_DEBUG_TOOLS 2258 #define IMGUI_DEBUG_LOG(...) ImGui::DebugLog(__VA_ARGS__) 2260 #define IMGUI_DEBUG_LOG(...) ((void)0) 2270 inline void*
operator new(size_t,
ImNewWrapper,
void* ptr) {
return ptr; }
2271 inline void operator delete(
void*,
ImNewWrapper,
void*) {}
2272 #define IM_ALLOC(_SIZE) ImGui::MemAlloc(_SIZE) 2273 #define IM_FREE(_PTR) ImGui::MemFree(_PTR) 2274 #define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR) 2275 #define IM_NEW(_TYPE) new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE 2276 template<
typename T>
void IM_DELETE(T* p) {
if (p) { p->~T(); ImGui::MemFree(p); } }
2289 IM_MSVC_RUNTIME_CHECKS_OFF
2290 template<
typename T>
2298 typedef T value_type;
2299 typedef value_type* iterator;
2300 typedef const value_type* const_iterator;
2303 inline ImVector() { Size = Capacity = 0; Data = NULL; }
2304 inline ImVector(
const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
2305 inline ImVector<T>& operator=(
const ImVector<T>& src) { clear(); resize(src.Size);
if (Data && src.Data) memcpy(Data, src.Data, (
size_t)Size *
sizeof(T));
return *
this; }
2306 inline ~
ImVector() {
if (Data) IM_FREE(Data); }
2308 inline void clear() {
if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
2309 inline void clear_delete() {
for (
int n = 0; n < Size; n++) IM_DELETE(Data[n]); clear(); }
2310 inline void clear_destruct() {
for (
int n = 0; n < Size; n++) Data[n].~T(); clear(); }
2312 inline bool empty()
const {
return Size == 0; }
2313 inline int size()
const {
return Size; }
2314 inline int size_in_bytes()
const {
return Size * (int)
sizeof(T); }
2315 inline int max_size()
const {
return 0x7FFFFFFF / (int)
sizeof(T); }
2316 inline int capacity()
const {
return Capacity; }
2317 inline T& operator[](
int i) { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2318 inline const T& operator[](
int i)
const { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2320 inline T* begin() {
return Data; }
2321 inline const T* begin()
const {
return Data; }
2322 inline T* end() {
return Data + Size; }
2323 inline const T* end()
const {
return Data + Size; }
2324 inline T& front() { IM_ASSERT(Size > 0);
return Data[0]; }
2325 inline const T& front()
const { IM_ASSERT(Size > 0);
return Data[0]; }
2326 inline T& back() { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2327 inline const T& back()
const { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2328 inline void swap(
ImVector<T>& rhs) {
int rhs_size = rhs.Size; rhs.Size = Size; Size = rhs_size;
int rhs_cap = rhs.Capacity; rhs.Capacity = Capacity; Capacity = rhs_cap; T* rhs_data = rhs.Data; rhs.Data = Data; Data = rhs_data; }
2330 inline int _grow_capacity(
int sz)
const {
int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8;
return new_capacity > sz ? new_capacity : sz; }
2331 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
2332 inline void resize(
int new_size,
const T& v) {
if (new_size > Capacity) reserve(_grow_capacity(new_size));
if (new_size > Size)
for (
int n = Size; n < new_size; n++) memcpy(&Data[n], &v,
sizeof(v)); Size = new_size; }
2333 inline void shrink(
int new_size) { IM_ASSERT(new_size <= Size); Size = new_size; }
2334 inline void reserve(
int new_capacity) {
if (new_capacity <= Capacity)
return; T* new_data = (T*)IM_ALLOC((
size_t)new_capacity *
sizeof(T));
if (Data) { memcpy(new_data, Data, (
size_t)Size *
sizeof(T)); IM_FREE(Data); } Data = new_data; Capacity = new_capacity; }
2335 inline void reserve_discard(
int new_capacity) {
if (new_capacity <= Capacity)
return;
if (Data) IM_FREE(Data); Data = (T*)IM_ALLOC((
size_t)new_capacity *
sizeof(T)); Capacity = new_capacity; }
2338 inline void push_back(
const T& v) {
if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v,
sizeof(v)); Size++; }
2339 inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
2340 inline void push_front(
const T& v) {
if (Size == 0) push_back(v);
else insert(Data, v); }
2341 inline T* erase(
const T* it) { IM_ASSERT(it >= Data && it < Data + Size);
const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((
size_t)Size - (
size_t)off - 1) *
sizeof(T)); Size--;
return Data + off; }
2342 inline T* erase(
const T* it,
const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last >= it && it_last <= Data + Size);
const ptrdiff_t count = it_last - it;
const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((
size_t)Size - (
size_t)off - (
size_t)count) *
sizeof(T)); Size -= (int)count;
return Data + off; }
2343 inline T* erase_unsorted(
const T* it) { IM_ASSERT(it >= Data && it < Data + Size);
const ptrdiff_t off = it - Data;
if (it < Data + Size - 1) memcpy(Data + off, Data + Size - 1,
sizeof(T)); Size--;
return Data + off; }
2344 inline T* insert(
const T* it,
const T& v) { IM_ASSERT(it >= Data && it <= Data + Size);
const ptrdiff_t off = it - Data;
if (Size == Capacity) reserve(_grow_capacity(Size + 1));
if (off < (
int)Size) memmove(Data + off + 1, Data + off, ((
size_t)Size - (
size_t)off) *
sizeof(T)); memcpy(&Data[off], &v,
sizeof(v)); Size++;
return Data + off; }
2345 inline bool contains(
const T& v)
const {
const T* data = Data;
const T* data_end = Data + Size;
while (data < data_end)
if (*data++ == v)
return true;
return false; }
2346 inline T*
find(
const T& v) { T* data = Data;
const T* data_end = Data + Size;
while (data < data_end)
if (*data == v)
break;
else ++data;
return data; }
2347 inline const T*
find(
const T& v)
const {
const T* data = Data;
const T* data_end = Data + Size;
while (data < data_end)
if (*data == v)
break;
else ++data;
return data; }
2348 inline int find_index(
const T& v)
const {
const T* data_end = Data + Size;
const T* it =
find(v);
if (it == data_end)
return -1;
const ptrdiff_t off = it - Data;
return (
int)off; }
2349 inline bool find_erase(
const T& v) {
const T* it =
find(v);
if (it < Data + Size) { erase(it);
return true; }
return false; }
2350 inline bool find_erase_unsorted(
const T& v) {
const T* it =
find(v);
if (it < Data + Size) { erase_unsorted(it);
return true; }
return false; }
2351 inline int index_from_ptr(
const T* it)
const { IM_ASSERT(it >= Data && it < Data + Size);
const ptrdiff_t off = it - Data;
return (
int)off; }
2353 IM_MSVC_RUNTIME_CHECKS_RESTORE
2368 float FontScaleMain;
2372 float DisabledAlpha;
2374 float WindowRounding;
2375 float WindowBorderSize;
2376 float WindowBorderHoverPadding;
2379 ImGuiDir WindowMenuButtonPosition;
2380 float ChildRounding;
2381 float ChildBorderSize;
2382 float PopupRounding;
2383 float PopupBorderSize;
2385 float FrameRounding;
2386 float FrameBorderSize;
2390 ImVec2 TouchExtraPadding;
2391 float IndentSpacing;
2392 float ColumnsMinSpacing;
2393 float ScrollbarSize;
2394 float ScrollbarRounding;
2395 float ScrollbarPadding;
2398 float LogSliderDeadzone;
2399 float ImageRounding;
2400 float ImageBorderSize;
2402 float TabBorderSize;
2403 float TabMinWidthBase;
2404 float TabMinWidthShrink;
2405 float TabCloseButtonMinWidthSelected;
2406 float TabCloseButtonMinWidthUnselected;
2407 float TabBarBorderSize;
2408 float TabBarOverlineSize;
2409 float TableAngledHeadersAngle;
2410 ImVec2 TableAngledHeadersTextAlign;
2411 ImGuiTreeNodeFlags TreeLinesFlags;
2412 float TreeLinesSize;
2413 float TreeLinesRounding;
2414 float DragDropTargetRounding;
2415 float DragDropTargetBorderSize;
2416 float DragDropTargetPadding;
2417 float ColorMarkerSize;
2418 ImGuiDir ColorButtonPosition;
2420 ImVec2 SelectableTextAlign;
2421 float SeparatorTextBorderSize;
2422 ImVec2 SeparatorTextAlign;
2423 ImVec2 SeparatorTextPadding;
2424 ImVec2 DisplayWindowPadding;
2425 ImVec2 DisplaySafeAreaPadding;
2426 bool DockingNodeHasCloseButton;
2427 float DockingSeparatorSize;
2428 float MouseCursorScale;
2429 bool AntiAliasedLines;
2430 bool AntiAliasedLinesUseTex;
2431 bool AntiAliasedFill;
2432 float CurveTessellationTol;
2433 float CircleTessellationMaxError;
2436 ImVec4 Colors[ImGuiCol_COUNT];
2440 float HoverStationaryDelay;
2441 float HoverDelayShort;
2442 float HoverDelayNormal;
2443 ImGuiHoveredFlags HoverFlagsForTooltipMouse;
2444 ImGuiHoveredFlags HoverFlagsForTooltipNav;
2448 float _NextFrameFontSizeBase;
2452 IMGUI_API
void ScaleAllSizes(
float scale_factor);
2455 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2478 float DownDurationPrev;
2488 ImGuiConfigFlags ConfigFlags;
2489 ImGuiBackendFlags BackendFlags;
2491 ImVec2 DisplayFramebufferScale;
2493 float IniSavingRate;
2494 const char* IniFilename;
2495 const char* LogFilename;
2501 bool FontAllowUserScaling;
2504 bool ConfigNavSwapGamepadButtons;
2505 bool ConfigNavMoveSetMousePos;
2506 bool ConfigNavCaptureKeyboard;
2507 bool ConfigNavEscapeClearFocusItem;
2508 bool ConfigNavEscapeClearFocusWindow;
2509 bool ConfigNavCursorVisibleAuto;
2510 bool ConfigNavCursorVisibleAlways;
2513 bool ConfigDockingNoSplit;
2514 bool ConfigDockingNoDockingOver;
2515 bool ConfigDockingWithShift;
2516 bool ConfigDockingAlwaysTabBar;
2517 bool ConfigDockingTransparentPayload;
2520 bool ConfigViewportsNoAutoMerge;
2521 bool ConfigViewportsNoTaskBarIcon;
2522 bool ConfigViewportsNoDecoration;
2523 bool ConfigViewportsNoDefaultParent;
2524 bool ConfigViewportsPlatformFocusSetsImGuiFocus;
2528 bool ConfigDpiScaleFonts;
2529 bool ConfigDpiScaleViewports;
2533 bool MouseDrawCursor;
2534 bool ConfigMacOSXBehaviors;
2535 bool ConfigInputTrickleEventQueue;
2536 bool ConfigInputTextCursorBlink;
2537 bool ConfigInputTextEnterKeepActive;
2538 bool ConfigDragClickToInputText;
2539 bool ConfigWindowsResizeFromEdges;
2540 bool ConfigWindowsMoveFromTitleBarOnly;
2541 bool ConfigWindowsCopyContentsWithCtrlC;
2542 bool ConfigScrollbarScrollByPage;
2543 float ConfigMemoryCompactTimer;
2547 float MouseDoubleClickTime;
2548 float MouseDoubleClickMaxDist;
2549 float MouseDragThreshold;
2550 float KeyRepeatDelay;
2551 float KeyRepeatRate;
2571 bool ConfigErrorRecovery;
2572 bool ConfigErrorRecoveryEnableAssert;
2573 bool ConfigErrorRecoveryEnableDebugLog;
2574 bool ConfigErrorRecoveryEnableTooltip;
2580 bool ConfigDebugIsDebuggerPresent;
2586 bool ConfigDebugHighlightIdConflicts;
2587 bool ConfigDebugHighlightIdConflictsShowItemPicker;
2593 bool ConfigDebugBeginReturnValueOnce;
2594 bool ConfigDebugBeginReturnValueLoop;
2599 bool ConfigDebugIgnoreFocusLoss;
2602 bool ConfigDebugIniSettings;
2611 const char* BackendPlatformName;
2612 const char* BackendRendererName;
2613 void* BackendPlatformUserData;
2614 void* BackendRendererUserData;
2615 void* BackendLanguageUserData;
2622 IMGUI_API
void AddKeyEvent(ImGuiKey key,
bool down);
2623 IMGUI_API
void AddKeyAnalogEvent(ImGuiKey key,
bool down,
float v);
2624 IMGUI_API
void AddMousePosEvent(
float x,
float y);
2625 IMGUI_API
void AddMouseButtonEvent(
int button,
bool down);
2626 IMGUI_API
void AddMouseWheelEvent(
float wheel_x,
float wheel_y);
2627 IMGUI_API
void AddMouseSourceEvent(ImGuiMouseSource source);
2628 IMGUI_API
void AddMouseViewportEvent(ImGuiID
id);
2629 IMGUI_API
void AddFocusEvent(
bool focused);
2630 IMGUI_API
void AddInputCharacter(
unsigned int c);
2631 IMGUI_API
void AddInputCharacterUTF16(ImWchar16 c);
2632 IMGUI_API
void AddInputCharactersUTF8(
const char* str);
2634 IMGUI_API
void SetKeyEventNativeData(ImGuiKey key,
int native_keycode,
int native_scancode,
int native_legacy_index = -1);
2635 IMGUI_API
void SetAppAcceptingEvents(
bool accepting_events);
2636 IMGUI_API
void ClearEventsQueue();
2637 IMGUI_API
void ClearInputKeys();
2638 IMGUI_API
void ClearInputMouse();
2646 bool WantCaptureMouse;
2647 bool WantCaptureKeyboard;
2649 bool WantSetMousePos;
2650 bool WantSaveIniSettings;
2654 int MetricsRenderVertices;
2655 int MetricsRenderIndices;
2656 int MetricsRenderWindows;
2657 int MetricsActiveWindows;
2673 ImGuiMouseSource MouseSource;
2674 ImGuiID MouseHoveredViewport;
2681 ImGuiKeyChord KeyMods;
2683 bool WantCaptureMouseUnlessPopupClose;
2685 ImVec2 MouseClickedPos[5];
2686 double MouseClickedTime[5];
2687 bool MouseClicked[5];
2688 bool MouseDoubleClicked[5];
2689 ImU16 MouseClickedCount[5];
2690 ImU16 MouseClickedLastCount[5];
2691 bool MouseReleased[5];
2692 double MouseReleasedTime[5];
2693 bool MouseDownOwned[5];
2694 bool MouseDownOwnedUnlessPopupClose[5];
2695 bool MouseWheelRequestAxisSwap;
2696 bool MouseCtrlLeftAsRightClick;
2697 float MouseDownDuration[5];
2698 float MouseDownDurationPrev[5];
2699 ImVec2 MouseDragMaxDistanceAbs[5];
2700 float MouseDragMaxDistanceSqr[5];
2703 bool AppAcceptingEvents;
2704 ImWchar16 InputQueueSurrogate;
2717 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2718 float FontGlobalScale;
2722 const char* (*GetClipboardTextFn)(
void* user_data);
2723 void (*SetClipboardTextFn)(
void* user_data,
const char* text);
2724 void* ClipboardUserData;
2748 ImGuiInputTextFlags EventFlag;
2749 ImGuiInputTextFlags Flags;
2760 bool EventActivated;
2772 IMGUI_API
void DeleteChars(
int pos,
int bytes_count);
2773 IMGUI_API
void InsertChars(
int pos,
const char* text,
const char* text_end = NULL);
2774 void SelectAll() { SelectionStart = 0; CursorPos = SelectionEnd = BufTextLen; }
2775 void SetSelection(
int s,
int e) { IM_ASSERT(s >= 0 && s <= BufTextLen); IM_ASSERT(e >= 0 && e <= BufTextLen); SelectionStart = s; CursorPos = SelectionEnd = e; }
2776 void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; }
2777 bool HasSelection()
const {
return SelectionStart != SelectionEnd; }
2800 ImGuiID ParentViewportId;
2801 ImGuiID FocusRouteParentWindowId;
2802 ImGuiViewportFlags ViewportFlagsOverrideSet;
2803 ImGuiViewportFlags ViewportFlagsOverrideClear;
2804 ImGuiTabItemFlags TabItemFlagsOverrideSet;
2805 ImGuiDockNodeFlags DockNodeFlagsOverrideSet;
2806 bool DockingAlwaysTabBar;
2807 bool DockingAllowUnclassed;
2809 ImGuiWindowClass() { memset((
void*)
this, 0,
sizeof(*
this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed =
true; }
2821 ImGuiID SourceParentId;
2823 char DataType[32 + 1];
2828 void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0,
sizeof(DataType)); DataFrameCount = -1; Preview = Delivery =
false; }
2829 bool IsDataType(
const char* type)
const {
return DataFrameCount != -1 && strcmp(type, DataType) == 0; }
2830 bool IsPreview()
const {
return Preview; }
2831 bool IsDelivery()
const {
return Delivery; }
2839 #define IM_UNICODE_CODEPOINT_INVALID 0xFFFD // Invalid Unicode code point (standard value). 2840 #ifdef IMGUI_USE_WCHAR32 2841 #define IM_UNICODE_CODEPOINT_MAX 0x10FFFF // Maximum Unicode code point supported by this build. 2843 #define IM_UNICODE_CODEPOINT_MAX 0xFFFF // Maximum Unicode code point supported by this build. 2851 mutable int RefFrame;
2852 operator bool()
const {
int current_frame = ImGui::GetFrameCount();
if (RefFrame == current_frame)
return false; RefFrame = current_frame;
return true; }
2859 IMGUI_API
bool Draw(
const char* label =
"Filter (inc,-exc)",
float width = 0.0f);
2860 IMGUI_API
bool PassFilter(
const char* text,
const char* text_end = NULL)
const;
2861 IMGUI_API
void Build();
2862 void Clear() { InputBuf[0] = 0; Build(); }
2863 bool IsActive()
const {
return !Filters.empty(); }
2872 ImGuiTextRange(
const char* _b,
const char* _e) { b = _b; e = _e; }
2873 bool empty()
const {
return b == e; }
2886 IMGUI_API
static char EmptyString[1];
2889 inline char operator[](
int i)
const { IM_ASSERT(Buf.Data != NULL);
return Buf.Data[i]; }
2890 const char* begin()
const {
return Buf.Data ? &Buf.front() : EmptyString; }
2891 const char* end()
const {
return Buf.Data ? &Buf.back() : EmptyString; }
2892 int size()
const {
return Buf.Size ? Buf.Size - 1 : 0; }
2893 bool empty()
const {
return Buf.Size <= 1; }
2894 void clear() { Buf.clear(); }
2895 void resize(
int size) {
if (Buf.Size > size) Buf.Data[size] = 0; Buf.resize(size ? size + 1 : 0, 0); }
2896 void reserve(
int capacity) { Buf.reserve(capacity); }
2897 const char* c_str()
const {
return Buf.Data ? Buf.Data : EmptyString; }
2898 IMGUI_API
void append(
const char* str,
const char* str_end = NULL);
2899 IMGUI_API
void appendf(
const char* fmt, ...) IM_FMTARGS(2);
2900 IMGUI_API
void appendfv(
const char* fmt, va_list args) IM_FMTLIST(2);
2907 union {
int val_i;
float val_f;
void* val_p; };
2929 void Clear() { Data.clear(); }
2930 IMGUI_API
int GetInt(ImGuiID key,
int default_val = 0)
const;
2931 IMGUI_API
void SetInt(ImGuiID key,
int val);
2932 IMGUI_API
bool GetBool(ImGuiID key,
bool default_val =
false)
const;
2933 IMGUI_API
void SetBool(ImGuiID key,
bool val);
2934 IMGUI_API
float GetFloat(ImGuiID key,
float default_val = 0.0f)
const;
2935 IMGUI_API
void SetFloat(ImGuiID key,
float val);
2936 IMGUI_API
void* GetVoidPtr(ImGuiID key)
const;
2937 IMGUI_API
void SetVoidPtr(ImGuiID key,
void* val);
2943 IMGUI_API
int* GetIntRef(ImGuiID key,
int default_val = 0);
2944 IMGUI_API
bool* GetBoolRef(ImGuiID key,
bool default_val =
false);
2945 IMGUI_API
float* GetFloatRef(ImGuiID key,
float default_val = 0.0f);
2946 IMGUI_API
void** GetVoidPtrRef(ImGuiID key,
void* default_val = NULL);
2949 IMGUI_API
void BuildSortByKey();
2951 IMGUI_API
void SetAllInt(
int val);
2953 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2959 enum ImGuiListClipperFlags_
2961 ImGuiListClipperFlags_None = 0,
2962 ImGuiListClipperFlags_NoSetTableRowCounters = 1 << 0,
2993 double StartSeekOffsetY;
2995 ImGuiListClipperFlags Flags;
3000 IMGUI_API ~ImGuiListClipper();
3001 IMGUI_API
void Begin(
int items_count,
float items_height = -1.0f);
3002 IMGUI_API
void End();
3003 IMGUI_API
bool Step();
3007 inline void IncludeItemByIndex(
int item_index) { IncludeItemsByIndex(item_index, item_index + 1); }
3008 IMGUI_API
void IncludeItemsByIndex(
int item_begin,
int item_end);
3013 IMGUI_API
void SeekCursorForItem(
int item_index);
3015 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3027 #ifdef IMGUI_DEFINE_MATH_OPERATORS 3028 #define IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED 3029 IM_MSVC_RUNTIME_CHECKS_OFF
3031 inline ImVec2 operator*(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x * rhs, lhs.y * rhs); }
3032 inline ImVec2 operator/(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x / rhs, lhs.y / rhs); }
3038 inline ImVec2& operator*=(
ImVec2& lhs,
const float rhs) { lhs.x *= rhs; lhs.y *= rhs;
return lhs; }
3039 inline ImVec2& operator/=(
ImVec2& lhs,
const float rhs) { lhs.x /= rhs; lhs.y /= rhs;
return lhs; }
3040 inline ImVec2& operator+=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y;
return lhs; }
3041 inline ImVec2& operator-=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y;
return lhs; }
3042 inline ImVec2& operator*=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x *= rhs.x; lhs.y *= rhs.y;
return lhs; }
3043 inline ImVec2& operator/=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x /= rhs.x; lhs.y /= rhs.y;
return lhs; }
3044 inline bool operator==(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x == rhs.x && lhs.y == rhs.y; }
3045 inline bool operator!=(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x != rhs.x || lhs.y != rhs.y; }
3047 inline ImVec4 operator*(
const ImVec4& lhs,
const float rhs) {
return ImVec4(lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); }
3048 inline ImVec4 operator/(
const ImVec4& lhs,
const float rhs) {
return ImVec4(lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); }
3049 inline ImVec4 operator+(
const ImVec4& lhs,
const ImVec4& rhs) {
return ImVec4(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w); }
3050 inline ImVec4 operator-(
const ImVec4& lhs,
const ImVec4& rhs) {
return ImVec4(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w); }
3051 inline ImVec4 operator*(
const ImVec4& lhs,
const ImVec4& rhs) {
return ImVec4(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); }
3052 inline ImVec4 operator/(
const ImVec4& lhs,
const ImVec4& rhs) {
return ImVec4(lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z, lhs.w / rhs.w); }
3053 inline ImVec4 operator-(
const ImVec4& lhs) {
return ImVec4(-lhs.x, -lhs.y, -lhs.z, -lhs.w); }
3054 inline bool operator==(
const ImVec4& lhs,
const ImVec4& rhs) {
return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z && lhs.w == rhs.w; }
3055 inline bool operator!=(
const ImVec4& lhs,
const ImVec4& rhs) {
return lhs.x != rhs.x || lhs.y != rhs.y || lhs.z != rhs.z || lhs.w != rhs.w; }
3056 IM_MSVC_RUNTIME_CHECKS_RESTORE
3062 #ifndef IM_COL32_R_SHIFT 3063 #ifdef IMGUI_USE_BGRA_PACKED_COLOR 3064 #define IM_COL32_R_SHIFT 16 3065 #define IM_COL32_G_SHIFT 8 3066 #define IM_COL32_B_SHIFT 0 3067 #define IM_COL32_A_SHIFT 24 3068 #define IM_COL32_A_MASK 0xFF000000 3070 #define IM_COL32_R_SHIFT 0 3071 #define IM_COL32_G_SHIFT 8 3072 #define IM_COL32_B_SHIFT 16 3073 #define IM_COL32_A_SHIFT 24 3074 #define IM_COL32_A_MASK 0xFF000000 3077 #define IM_COL32(R,G,B,A) (((ImU32)(A)<<IM_COL32_A_SHIFT) | ((ImU32)(B)<<IM_COL32_B_SHIFT) | ((ImU32)(G)<<IM_COL32_G_SHIFT) | ((ImU32)(R)<<IM_COL32_R_SHIFT)) 3078 #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF 3079 #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black 3080 #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000 3091 constexpr
ImColor(
float r,
float g,
float b,
float a = 1.0f) : Value(r, g, b, a) { }
3092 constexpr ImColor(
const ImVec4& col) : Value(col) {}
3093 constexpr ImColor(
int r,
int g,
int b,
int a = 255) : Value((
float)r * (1.0f / 255.0f), (
float)g * (1.0f / 255.0f), (
float)b * (1.0f / 255.0f), (
float)a* (1.0f / 255.0f)) {}
3094 constexpr ImColor(ImU32 rgba) : Value((
float)((rgba >> IM_COL32_R_SHIFT) & 0xFF) * (1.0f / 255.0f), (
float)((rgba >> IM_COL32_G_SHIFT) & 0xFF) * (1.0f / 255.0f), (
float)((rgba >> IM_COL32_B_SHIFT) & 0xFF) * (1.0f / 255.0f), (
float)((rgba >> IM_COL32_A_SHIFT) & 0xFF) * (1.0f / 255.0f)) {}
3095 inline operator ImU32()
const {
return ImGui::ColorConvertFloat4ToU32(Value); }
3096 inline operator ImVec4()
const {
return Value; }
3099 inline void SetHSV(
float h,
float s,
float v,
float a = 1.0f){ ImGui::ColorConvertHSVtoRGB(h, s, v, Value.x, Value.y, Value.z); Value.w = a; }
3100 static ImColor HSV(
float h,
float s,
float v,
float a = 1.0f) {
float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b);
return ImColor(r, g, b, a); }
3144 enum ImGuiMultiSelectFlags_
3146 ImGuiMultiSelectFlags_None = 0,
3147 ImGuiMultiSelectFlags_SingleSelect = 1 << 0,
3148 ImGuiMultiSelectFlags_NoSelectAll = 1 << 1,
3149 ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2,
3150 ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3,
3151 ImGuiMultiSelectFlags_NoAutoClear = 1 << 4,
3152 ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5,
3153 ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6,
3154 ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7,
3155 ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8,
3156 ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9,
3157 ImGuiMultiSelectFlags_ClearOnClickVoid = 1 << 10,
3158 ImGuiMultiSelectFlags_ScopeWindow = 1 << 11,
3159 ImGuiMultiSelectFlags_ScopeRect = 1 << 12,
3160 ImGuiMultiSelectFlags_SelectOnClick = 1 << 13,
3161 ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14,
3163 ImGuiMultiSelectFlags_NavWrapX = 1 << 16,
3164 ImGuiMultiSelectFlags_NoSelectOnRightClick = 1 << 17,
3176 ImGuiSelectionUserData RangeSrcItem;
3177 ImGuiSelectionUserData NavIdItem;
3184 enum ImGuiSelectionRequestType
3186 ImGuiSelectionRequestType_None = 0,
3187 ImGuiSelectionRequestType_SetAll,
3188 ImGuiSelectionRequestType_SetRange,
3195 ImGuiSelectionRequestType
Type;
3197 ImS8 RangeDirection;
3198 ImGuiSelectionUserData RangeFirstItem;
3199 ImGuiSelectionUserData RangeLastItem;
3225 int _SelectionOrder;
3231 IMGUI_API
bool Contains(ImGuiID
id)
const;
3232 IMGUI_API
void Clear();
3233 IMGUI_API
void Swap(ImGuiSelectionBasicStorage& r);
3234 IMGUI_API
void SetItemSelected(ImGuiID
id,
bool selected);
3235 IMGUI_API
bool GetNextSelectedItem(
void** opaque_it, ImGuiID* out_id);
3236 inline ImGuiID GetStorageIdFromIndex(
int idx) {
return AdapterIndexToStorageId(
this, idx); }
3258 #ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX 3259 #define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32) 3266 typedef unsigned short ImDrawIdx;
3276 #ifndef ImDrawCallback 3284 #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8) 3295 unsigned int VtxOffset;
3296 unsigned int IdxOffset;
3297 unsigned int ElemCount;
3298 ImDrawCallback UserCallback;
3299 void* UserCallbackData;
3300 int UserCallbackDataSize;
3301 int UserCallbackDataOffset;
3303 ImDrawCmd() { memset((
void*)
this, 0,
sizeof(*
this)); }
3307 inline ImTextureID GetTexID()
const;
3311 #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT 3323 IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
3331 unsigned int VtxOffset;
3351 inline void Clear() { _Current = 0; _Count = 1; }
3352 IMGUI_API
void ClearFreeMemory();
3353 IMGUI_API
void Split(
ImDrawList* draw_list,
int count);
3355 IMGUI_API
void SetCurrentChannel(
ImDrawList* draw_list,
int channel_idx);
3362 ImDrawFlags_None = 0,
3363 ImDrawFlags_Closed = 1 << 0,
3364 ImDrawFlags_RoundCornersTopLeft = 1 << 4,
3365 ImDrawFlags_RoundCornersTopRight = 1 << 5,
3366 ImDrawFlags_RoundCornersBottomLeft = 1 << 6,
3367 ImDrawFlags_RoundCornersBottomRight = 1 << 7,
3368 ImDrawFlags_RoundCornersNone = 1 << 8,
3369 ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight,
3370 ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
3371 ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft,
3372 ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight,
3373 ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
3374 ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll,
3375 ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone,
3380 enum ImDrawListFlags_
3382 ImDrawListFlags_None = 0,
3383 ImDrawListFlags_AntiAliasedLines = 1 << 0,
3384 ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1,
3385 ImDrawListFlags_AntiAliasedFill = 1 << 2,
3386 ImDrawListFlags_AllowVtxOffset = 1 << 3,
3404 ImDrawListFlags Flags;
3407 unsigned int _VtxCurrentIdx;
3410 ImDrawIdx* _IdxWritePtr;
3418 const char* _OwnerName;
3423 IMGUI_API ~ImDrawList();
3425 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect =
false);
3426 IMGUI_API
void PushClipRectFullScreen();
3427 IMGUI_API
void PopClipRect();
3429 IMGUI_API
void PopTexture();
3430 inline ImVec2 GetClipRectMin()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.x, cr.y); }
3431 inline ImVec2 GetClipRectMax()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.z, cr.w); }
3440 IMGUI_API
void AddLine(
const ImVec2& p1,
const ImVec2& p2, ImU32 col,
float thickness = 1.0f);
3441 IMGUI_API
void AddRect(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col,
float rounding = 0.0f, ImDrawFlags flags = 0,
float thickness = 1.0f);
3442 IMGUI_API
void AddRectFilled(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col,
float rounding = 0.0f, ImDrawFlags flags = 0);
3443 IMGUI_API
void AddRectFilledMultiColor(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
3444 IMGUI_API
void AddQuad(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness = 1.0f);
3446 IMGUI_API
void AddTriangle(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness = 1.0f);
3447 IMGUI_API
void AddTriangleFilled(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col);
3448 IMGUI_API
void AddCircle(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0,
float thickness = 1.0f);
3449 IMGUI_API
void AddCircleFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0);
3450 IMGUI_API
void AddNgon(
const ImVec2& center,
float radius, ImU32 col,
int num_segments,
float thickness = 1.0f);
3451 IMGUI_API
void AddNgonFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments);
3452 IMGUI_API
void AddEllipse(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0,
float thickness = 1.0f);
3453 IMGUI_API
void AddEllipseFilled(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0);
3454 IMGUI_API
void AddText(
const ImVec2& pos, ImU32 col,
const char* text_begin,
const char* text_end = NULL);
3455 IMGUI_API
void AddText(
ImFont* font,
float font_size,
const ImVec2& pos, ImU32 col,
const char* text_begin,
const char* text_end = NULL,
float wrap_width = 0.0f,
const ImVec4* cpu_fine_clip_rect = NULL);
3456 IMGUI_API
void AddBezierCubic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness,
int num_segments = 0);
3457 IMGUI_API
void AddBezierQuadratic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness,
int num_segments = 0);
3462 IMGUI_API
void AddPolyline(
const ImVec2* points,
int num_points, ImU32 col, ImDrawFlags flags,
float thickness);
3463 IMGUI_API
void AddConvexPolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
3464 IMGUI_API
void AddConcavePolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
3471 IMGUI_API
void AddImageQuad(
ImTextureRef tex_ref,
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
const ImVec2& uv1 =
ImVec2(0, 0),
const ImVec2& uv2 =
ImVec2(1, 0),
const ImVec2& uv3 =
ImVec2(1, 1),
const ImVec2& uv4 =
ImVec2(0, 1), ImU32 col = IM_COL32_WHITE);
3472 IMGUI_API
void AddImageRounded(
ImTextureRef tex_ref,
const ImVec2& p_min,
const ImVec2& p_max,
const ImVec2& uv_min,
const ImVec2& uv_max, ImU32 col,
float rounding, ImDrawFlags flags = 0);
3477 inline void PathClear() { _Path.Size = 0; }
3478 inline void PathLineTo(
const ImVec2& pos) { _Path.push_back(pos); }
3479 inline void PathLineToMergeDuplicate(
const ImVec2& pos) {
if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); }
3480 inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
3481 inline void PathFillConcave(ImU32 col) { AddConcavePolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
3482 inline void PathStroke(ImU32 col, ImDrawFlags flags = 0,
float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, flags, thickness); _Path.Size = 0; }
3483 IMGUI_API
void PathArcTo(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments = 0);
3484 IMGUI_API
void PathArcToFast(
const ImVec2& center,
float radius,
int a_min_of_12,
int a_max_of_12);
3485 IMGUI_API
void PathEllipticalArcTo(
const ImVec2& center,
const ImVec2& radius,
float rot,
float a_min,
float a_max,
int num_segments = 0);
3486 IMGUI_API
void PathBezierCubicCurveTo(
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
int num_segments = 0);
3487 IMGUI_API
void PathBezierQuadraticCurveTo(
const ImVec2& p2,
const ImVec2& p3,
int num_segments = 0);
3488 IMGUI_API
void PathRect(
const ImVec2& rect_min,
const ImVec2& rect_max,
float rounding = 0.0f, ImDrawFlags flags = 0);
3499 IMGUI_API
void AddCallback(ImDrawCallback callback,
void* userdata,
size_t userdata_size = 0);
3502 IMGUI_API
void AddDrawCmd();
3503 IMGUI_API ImDrawList* CloneOutput()
const;
3511 inline void ChannelsSplit(
int count) { _Splitter.Split(
this, count); }
3512 inline void ChannelsMerge() { _Splitter.Merge(
this); }
3513 inline void ChannelsSetCurrent(
int n) { _Splitter.SetCurrentChannel(
this, n); }
3518 IMGUI_API
void PrimReserve(
int idx_count,
int vtx_count);
3519 IMGUI_API
void PrimUnreserve(
int idx_count,
int vtx_count);
3520 IMGUI_API
void PrimRect(
const ImVec2& a,
const ImVec2& b, ImU32 col);
3523 inline void PrimWriteVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
3524 inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
3525 inline void PrimVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
3528 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3529 inline void PushTextureID(
ImTextureRef tex_ref) { PushTexture(tex_ref); }
3530 inline void PopTextureID() { PopTexture(); }
3540 IMGUI_API
void _ResetForNewFrame();
3541 IMGUI_API
void _ClearFreeMemory();
3542 IMGUI_API
void _PopUnusedDrawCmd();
3543 IMGUI_API
void _TryMergeDrawCmds();
3544 IMGUI_API
void _OnChangedClipRect();
3545 IMGUI_API
void _OnChangedTexture();
3546 IMGUI_API
void _OnChangedVtxOffset();
3548 IMGUI_API
int _CalcCircleAutoSegmentCount(
float radius)
const;
3549 IMGUI_API
void _PathArcToFastEx(
const ImVec2& center,
float radius,
int a_min_sample,
int a_max_sample,
int a_step);
3550 IMGUI_API
void _PathArcToN(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments);
3571 IMGUI_API
void Clear();
3572 IMGUI_API
void AddDrawList(
ImDrawList* draw_list);
3573 IMGUI_API
void DeIndexAllBuffers();
3574 IMGUI_API
void ScaleClipRects(
const ImVec2& fb_scale);
3585 #undef Status // X11 headers are leaking this. 3589 enum ImTextureFormat
3591 ImTextureFormat_RGBA32,
3592 ImTextureFormat_Alpha8,
3596 enum ImTextureStatus
3599 ImTextureStatus_Destroyed,
3600 ImTextureStatus_WantCreate,
3601 ImTextureStatus_WantUpdates,
3602 ImTextureStatus_WantDestroy,
3610 unsigned short x, y;
3611 unsigned short w, h;
3625 ImTextureStatus Status;
3626 void* BackendUserData;
3628 ImTextureFormat Format;
3632 unsigned char* Pixels;
3637 unsigned short RefCount;
3639 bool WantDestroyNextFrame;
3642 ImTextureData() { memset((
void*)
this, 0,
sizeof(*
this)); Status = ImTextureStatus_Destroyed; TexID = ImTextureID_Invalid; }
3644 IMGUI_API
void Create(ImTextureFormat format,
int w,
int h);
3645 IMGUI_API
void DestroyPixels();
3646 void* GetPixels() { IM_ASSERT(Pixels != NULL);
return Pixels; }
3647 void* GetPixelsAt(
int x,
int y) { IM_ASSERT(Pixels != NULL);
return Pixels + (x + y * Width) * BytesPerPixel; }
3648 int GetSizeInBytes()
const {
return Width * Height * BytesPerPixel; }
3649 int GetPitch()
const {
return Width * BytesPerPixel; }
3650 ImTextureRef GetTexRef() {
ImTextureRef tex_ref; tex_ref._TexData =
this; tex_ref._TexID = ImTextureID_Invalid;
return tex_ref; }
3651 ImTextureID GetTexID()
const {
return TexID; }
3656 void SetTexID(ImTextureID tex_id) { TexID = tex_id; }
3657 void SetStatus(ImTextureStatus status) { Status = status;
if (status == ImTextureStatus_Destroyed && !WantDestroyNextFrame && Pixels !=
nullptr) Status = ImTextureStatus_WantCreate; }
3671 bool FontDataOwnedByAtlas;
3678 ImWchar EllipsisChar;
3680 const ImWchar* GlyphRanges;
3681 const ImWchar* GlyphExcludeRanges;
3684 float GlyphMinAdvanceX;
3685 float GlyphMaxAdvanceX;
3686 float GlyphExtraAdvanceX;
3688 unsigned int FontLoaderFlags;
3690 float RasterizerMultiply;
3691 float RasterizerDensity;
3692 float ExtraSizeScale;
3698 void* FontLoaderData;
3700 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3710 unsigned int Colored : 1;
3711 unsigned int Visible : 1;
3712 unsigned int SourceIdx : 4;
3713 unsigned int Codepoint : 26;
3715 float X0, Y0, X1, Y1;
3716 float U0, V0, U1, V1;
3719 ImFontGlyph() { memset((
void*)
this, 0,
sizeof(*
this)); PackId = -1; }
3729 inline void Clear() {
int size_in_bytes = (IM_UNICODE_CODEPOINT_MAX + 1) / 8; UsedChars.resize(size_in_bytes / (
int)
sizeof(ImU32)); memset(UsedChars.Data, 0, (
size_t)size_in_bytes); }
3730 inline bool GetBit(
size_t n)
const {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31);
return (UsedChars[off] & mask) != 0; }
3731 inline void SetBit(
size_t n) {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; }
3732 inline void AddChar(ImWchar c) { SetBit(c); }
3733 IMGUI_API
void AddText(
const char* text,
const char* text_end = NULL);
3734 IMGUI_API
void AddRanges(
const ImWchar* ranges);
3740 typedef int ImFontAtlasRectId;
3741 #define ImFontAtlasRectId_Invalid -1 3748 unsigned short x, y;
3749 unsigned short w, h;
3756 enum ImFontAtlasFlags_
3758 ImFontAtlasFlags_None = 0,
3759 ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
3760 ImFontAtlasFlags_NoMouseCursors = 1 << 1,
3761 ImFontAtlasFlags_NoBakedLines = 1 << 2,
3786 IMGUI_API ~ImFontAtlas();
3791 IMGUI_API
ImFont* AddFontFromFileTTF(
const char* filename,
float size_pixels = 0.0f,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3792 IMGUI_API
ImFont* AddFontFromMemoryTTF(
void* font_data,
int font_data_size,
float size_pixels = 0.0f,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3793 IMGUI_API
ImFont* AddFontFromMemoryCompressedTTF(
const void* compressed_font_data,
int compressed_font_data_size,
float size_pixels = 0.0f,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3794 IMGUI_API
ImFont* AddFontFromMemoryCompressedBase85TTF(
const char* compressed_font_data_base85,
float size_pixels = 0.0f,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3795 IMGUI_API
void RemoveFont(
ImFont* font);
3797 IMGUI_API
void Clear();
3798 IMGUI_API
void CompactCache();
3799 IMGUI_API
void SetFontLoader(
const ImFontLoader* font_loader);
3802 IMGUI_API
void ClearInputData();
3803 IMGUI_API
void ClearFonts();
3804 IMGUI_API
void ClearTexData();
3806 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3815 IMGUI_API
bool Build();
3816 IMGUI_API
void GetTexDataAsAlpha8(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3817 IMGUI_API
void GetTexDataAsRGBA32(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3818 void SetTexID(ImTextureID
id) { IM_ASSERT(TexRef._TexID == ImTextureID_Invalid); TexRef._TexData->TexID = id; }
3819 void SetTexID(
ImTextureRef id) { IM_ASSERT(TexRef._TexID == ImTextureID_Invalid &&
id._TexData == NULL); TexRef._TexData->TexID =
id._TexID; }
3820 bool IsBuilt()
const {
return Fonts.Size > 0 && TexIsBuilt; }
3828 IMGUI_API
const ImWchar* GetGlyphRangesDefault();
3829 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3834 IMGUI_API
const ImWchar* GetGlyphRangesGreek();
3835 IMGUI_API
const ImWchar* GetGlyphRangesKorean();
3836 IMGUI_API
const ImWchar* GetGlyphRangesJapanese();
3837 IMGUI_API
const ImWchar* GetGlyphRangesChineseFull();
3838 IMGUI_API
const ImWchar* GetGlyphRangesChineseSimplifiedCommon();
3839 IMGUI_API
const ImWchar* GetGlyphRangesCyrillic();
3840 IMGUI_API
const ImWchar* GetGlyphRangesThai();
3841 IMGUI_API
const ImWchar* GetGlyphRangesVietnamese();
3865 IMGUI_API ImFontAtlasRectId AddCustomRect(
int width,
int height,
ImFontAtlasRect* out_r = NULL);
3866 IMGUI_API
void RemoveCustomRect(ImFontAtlasRectId
id);
3867 IMGUI_API
bool GetCustomRect(ImFontAtlasRectId
id,
ImFontAtlasRect* out_r)
const;
3874 ImFontAtlasFlags Flags;
3875 ImTextureFormat TexDesiredFormat;
3876 int TexGlyphPadding;
3886 #ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3896 bool RendererHasTextures;
3898 bool TexPixelsUseColors;
3903 ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1];
3904 int TexNextUniqueID;
3905 int FontNextUniqueID;
3909 const char* FontLoaderName;
3910 void* FontLoaderData;
3911 unsigned int FontLoaderFlags;
3916 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3919 inline ImFontAtlasRectId AddCustomRectRegular(
int w,
int h) {
return AddCustomRect(w, h); }
3920 inline const ImFontAtlasRect* GetCustomRectByIndex(ImFontAtlasRectId
id) {
return GetCustomRect(
id, &TempRect) ? &TempRect : NULL; }
3921 inline void CalcCustomRectUV(
const ImFontAtlasRect* r,
ImVec2* out_uv_min,
ImVec2* out_uv_max)
const { *out_uv_min = r->uv0; *out_uv_max = r->uv1; }
3922 IMGUI_API ImFontAtlasRectId AddCustomRectFontGlyph(
ImFont* font, ImWchar codepoint,
int w,
int h,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
3923 IMGUI_API ImFontAtlasRectId AddCustomRectFontGlyphForSize(
ImFont* font,
float font_size, ImWchar codepoint,
int w,
int h,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
3938 float FallbackAdvanceX;
3940 float RasterizerDensity;
3945 int FallbackGlyphIndex;
3948 float Ascent, Descent;
3949 unsigned int MetricsTotalSurface:26;
3950 unsigned int WantDestroy:1;
3951 unsigned int LoadNoFallback:1;
3952 unsigned int LoadNoRenderOnLayout:1;
3956 void* FontLoaderDatas;
3960 IMGUI_API
void ClearOutputData();
3962 IMGUI_API
ImFontGlyph* FindGlyphNoFallback(ImWchar c);
3963 IMGUI_API
float GetCharAdvance(ImWchar c);
3964 IMGUI_API
bool IsGlyphLoaded(ImWchar c);
3971 ImFontFlags_None = 0,
3972 ImFontFlags_NoLoadError = 1 << 1,
3973 ImFontFlags_NoLoadGlyphs = 1 << 2,
3974 ImFontFlags_LockBakedSizes = 1 << 3,
3988 float CurrentRasterizerDensity;
3995 ImWchar EllipsisChar;
3996 ImWchar FallbackChar;
3997 ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8];
3998 bool EllipsisAutoBake;
4000 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4006 IMGUI_API ~ImFont();
4007 IMGUI_API
bool IsGlyphInFont(ImWchar c);
4008 bool IsLoaded()
const {
return OwnerAtlas != NULL; }
4009 const char* GetDebugName()
const {
return Sources.Size ? Sources[0]->Name :
"<unknown>"; }
4014 IMGUI_API
ImFontBaked* GetFontBaked(
float font_size,
float density = -1.0f);
4015 IMGUI_API
ImVec2 CalcTextSizeA(
float size,
float max_width,
float wrap_width,
const char* text_begin,
const char* text_end = NULL,
const char** out_remaining = NULL);
4016 IMGUI_API
const char* CalcWordWrapPosition(
float size,
const char* text,
const char* text_end,
float wrap_width);
4017 IMGUI_API
void RenderChar(
ImDrawList* draw_list,
float size,
const ImVec2& pos, ImU32 col, ImWchar c,
const ImVec4* cpu_fine_clip = NULL);
4018 IMGUI_API
void RenderText(
ImDrawList* draw_list,
float size,
const ImVec2& pos, ImU32 col,
const ImVec4& clip_rect,
const char* text_begin,
const char* text_end,
float wrap_width = 0.0f, ImDrawTextFlags flags = 0);
4019 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4020 inline const char* CalcWordWrapPositionA(
float scale,
const char* text,
const char* text_end,
float wrap_width) {
return CalcWordWrapPosition(LegacySize * scale, text, text_end, wrap_width); }
4024 IMGUI_API
void ClearOutputData();
4025 IMGUI_API
void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint);
4026 IMGUI_API
bool IsGlyphRangeUnused(
unsigned int c_begin,
unsigned int c_last);
4030 inline ImTextureID ImTextureRef::GetTexID()
const 4032 IM_ASSERT(!(_TexData != NULL && _TexID != ImTextureID_Invalid));
4033 return _TexData ? _TexData->TexID : _TexID;
4037 inline ImTextureID ImDrawCmd::GetTexID()
const 4041 ImTextureID tex_id = TexRef._TexData ? TexRef._TexData->TexID : TexRef._TexID;
4042 if (TexRef._TexData != NULL)
4043 IM_ASSERT(tex_id != ImTextureID_Invalid &&
"ImDrawCmd is referring to ImTextureData that wasn't uploaded to graphics system. Backend must call ImTextureData::SetTexID() after handling ImTextureStatus_WantCreate request!");
4052 enum ImGuiViewportFlags_
4054 ImGuiViewportFlags_None = 0,
4055 ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
4056 ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
4057 ImGuiViewportFlags_OwnedByApp = 1 << 2,
4058 ImGuiViewportFlags_NoDecoration = 1 << 3,
4059 ImGuiViewportFlags_NoTaskBarIcon = 1 << 4,
4060 ImGuiViewportFlags_NoFocusOnAppearing = 1 << 5,
4061 ImGuiViewportFlags_NoFocusOnClick = 1 << 6,
4062 ImGuiViewportFlags_NoInputs = 1 << 7,
4063 ImGuiViewportFlags_NoRendererClear = 1 << 8,
4064 ImGuiViewportFlags_NoAutoMerge = 1 << 9,
4065 ImGuiViewportFlags_TopMost = 1 << 10,
4066 ImGuiViewportFlags_CanHostOtherWindows = 1 << 11,
4069 ImGuiViewportFlags_IsMinimized = 1 << 12,
4070 ImGuiViewportFlags_IsFocused = 1 << 13,
4083 ImGuiViewportFlags Flags;
4090 ImGuiID ParentViewportId;
4099 void* RendererUserData;
4100 void* PlatformUserData;
4101 void* PlatformHandle;
4102 void* PlatformHandleRaw;
4103 bool PlatformWindowCreated;
4104 bool PlatformRequestMove;
4105 bool PlatformRequestResize;
4106 bool PlatformRequestClose;
4109 ~
ImGuiViewport() { IM_ASSERT(PlatformUserData == NULL && RendererUserData == NULL); }
4112 ImVec2 GetCenter()
const {
return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
4113 ImVec2 GetWorkCenter()
const {
return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
4177 const char* (*Platform_GetClipboardTextFn)(
ImGuiContext* ctx);
4178 void (*Platform_SetClipboardTextFn)(
ImGuiContext* ctx,
const char* text);
4179 void* Platform_ClipboardUserData;
4183 bool (*Platform_OpenInShellFn)(
ImGuiContext* ctx,
const char* path);
4184 void* Platform_OpenInShellUserData;
4189 void* Platform_ImeUserData;
4194 ImWchar Platform_LocaleDecimalPoint;
4201 int Renderer_TextureMaxWidth;
4202 int Renderer_TextureMaxHeight;
4205 void* Renderer_RenderState;
4235 void (*Platform_SetWindowTitle)(
ImGuiViewport* vp,
const char* str);
4236 void (*Platform_SetWindowAlpha)(
ImGuiViewport* vp,
float alpha);
4238 void (*Platform_RenderWindow)(
ImGuiViewport* vp,
void* render_arg);
4239 void (*Platform_SwapBuffers)(
ImGuiViewport* vp,
void* render_arg);
4243 int (*Platform_CreateVkSurface)(
ImGuiViewport* vp, ImU64 vk_inst,
const void* vk_allocators, ImU64* out_vk_surface);
4249 void (*Renderer_RenderWindow)(
ImGuiViewport* vp,
void* render_arg);
4250 void (*Renderer_SwapBuffers)(
ImGuiViewport* vp,
void* render_arg);
4273 IMGUI_API
void ClearPlatformHandlers();
4274 IMGUI_API
void ClearRendererHandlers();
4281 ImVec2 MainPos, MainSize;
4282 ImVec2 WorkPos, WorkSize;
4284 void* PlatformHandle;
4294 float InputLineHeight;
4306 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4310 inline void PushFont(
ImFont* font) { PushFont(font, font ? font->LegacySize : 0.0f); }
4311 IMGUI_API
void SetWindowFontScale(
float scale);
4315 inline void PushButtonRepeat(
bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
4316 inline void PopButtonRepeat() { PopItemFlag(); }
4317 inline void PushTabStop(
bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
4318 inline void PopTabStop() { PopItemFlag(); }
4320 IMGUI_API
ImVec2 GetContentRegionMax();
4321 IMGUI_API
ImVec2 GetWindowContentRegionMin();
4322 IMGUI_API
ImVec2 GetWindowContentRegionMax();
4324 IMGUI_API
bool Combo(
const char* label,
int* current_item,
bool (*old_callback)(
void* user_data,
int idx,
const char** out_text),
void* user_data,
int items_count,
int popup_max_height_in_items = -1);
4325 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
bool (*old_callback)(
void* user_data,
int idx,
const char** out_text),
void* user_data,
int items_count,
int height_in_items = -1);
4445 #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4447 #define IM_ARRAYSIZE IM_COUNTOF // RENAMED IN 1.92.6: IM_ARRAYSIZE -> IM_COUNTOF 4450 #ifdef IMGUI_DISABLE_METRICS_WINDOW 4451 #error IMGUI_DISABLE_METRICS_WINDOW was renamed to IMGUI_DISABLE_DEBUG_TOOLS, please use new name. 4456 #if defined(__clang__) 4457 #pragma clang diagnostic pop 4458 #elif defined(__GNUC__) 4459 #pragma GCC diagnostic pop 4463 #pragma warning (pop) 4468 #ifdef IMGUI_INCLUDE_IMGUI_USER_H 4469 #ifdef IMGUI_USER_H_FILENAME 4470 #include IMGUI_USER_H_FILENAME 4472 #include "imgui_user.h" 4476 #endif // #ifndef IMGUI_DISABLE Definition: imgui_internal.h:871
In find(In first, In last, const T &v)
Definition: algorithm.h:225
Definition: imgui_internal.h:4073
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: imgui_internal.h:4159
Definition: imgui_internal.h:2383
Definition: movie_decoder.h:32