31 #define IMGUI_VERSION "1.92.0" 32 #define IMGUI_VERSION_NUM 19200 33 #define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000 34 #define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198 35 #define IMGUI_HAS_VIEWPORT // In 'docking' WIP branch. 36 #define IMGUI_HAS_DOCK // In 'docking' WIP branch. 66 #ifdef IMGUI_USER_CONFIG 67 #include IMGUI_USER_CONFIG 89 #ifndef IMGUI_IMPL_API 90 #define IMGUI_IMPL_API IMGUI_API 96 #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h 98 #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) // Size of a static C-style array. Don't use on pointers! 99 #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 IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) 107 #if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__) 108 #define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1))) 109 #define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0))) 110 #elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__)) 113 #define IM_FMTARGS(FMT) 114 #define IM_FMTLIST(FMT) 116 #define IM_FMTARGS(FMT) 117 #define IM_FMTLIST(FMT) 121 #if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(IMGUI_DEBUG_PARANOID) 122 #define IM_MSVC_RUNTIME_CHECKS_OFF __pragma(runtime_checks("",off)) __pragma(check_stack(off)) __pragma(strict_gs_check(push,off)) 123 #define IM_MSVC_RUNTIME_CHECKS_RESTORE __pragma(runtime_checks("",restore)) __pragma(check_stack()) __pragma(strict_gs_check(pop)) 125 #define IM_MSVC_RUNTIME_CHECKS_OFF 126 #define IM_MSVC_RUNTIME_CHECKS_RESTORE 131 #pragma warning (push) 132 #pragma warning (disable: 26495) // [Static Analyzer] Variable 'XXX' is uninitialized. Always initialize a member variable (type.6). 134 #if defined(__clang__) 135 #pragma clang diagnostic push 136 #if __has_warning("-Wunknown-warning-option") 137 #pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx' 139 #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' 140 #pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast 141 #pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe 142 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" // warning: zero as null pointer constant 143 #pragma clang diagnostic ignored "-Wreserved-identifier" // warning: identifier '_Xxx' is reserved because it starts with '_' followed by a capital letter 144 #pragma clang diagnostic ignored "-Wunsafe-buffer-usage" // warning: 'xxx' is an unsafe pointer used for buffer access 145 #pragma clang diagnostic ignored "-Wnontrivial-memaccess" // warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 146 #elif defined(__GNUC__) 147 #pragma GCC diagnostic push 148 #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind 149 #pragma GCC diagnostic ignored "-Wfloat-equal" // warning: comparing floating-point with '==' or '!=' is unsafe 150 #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 158 typedef unsigned int ImGuiID;
159 typedef signed char ImS8;
160 typedef unsigned char ImU8;
161 typedef signed short ImS16;
162 typedef unsigned short ImU16;
163 typedef signed int ImS32;
164 typedef unsigned int ImU32;
165 typedef signed long long ImS64;
166 typedef unsigned long long ImU64;
223 enum ImGuiMouseSource : int;
224 enum ImGuiSortDirection : ImU8;
225 typedef int ImGuiCol;
226 typedef int ImGuiCond;
227 typedef int ImGuiDataType;
228 typedef int ImGuiMouseButton;
229 typedef int ImGuiMouseCursor;
230 typedef int ImGuiStyleVar;
231 typedef int ImGuiTableBgTarget;
238 typedef int ImDrawFlags;
239 typedef int ImDrawListFlags;
240 typedef int ImFontFlags;
241 typedef int ImFontAtlasFlags;
242 typedef int ImGuiBackendFlags;
243 typedef int ImGuiButtonFlags;
244 typedef int ImGuiChildFlags;
245 typedef int ImGuiColorEditFlags;
246 typedef int ImGuiConfigFlags;
247 typedef int ImGuiComboFlags;
248 typedef int ImGuiDockNodeFlags;
249 typedef int ImGuiDragDropFlags;
250 typedef int ImGuiFocusedFlags;
251 typedef int ImGuiHoveredFlags;
252 typedef int ImGuiInputFlags;
253 typedef int ImGuiInputTextFlags;
254 typedef int ImGuiItemFlags;
255 typedef int ImGuiKeyChord;
256 typedef int ImGuiPopupFlags;
257 typedef int ImGuiMultiSelectFlags;
258 typedef int ImGuiSelectableFlags;
259 typedef int ImGuiSliderFlags;
260 typedef int ImGuiTabBarFlags;
261 typedef int ImGuiTabItemFlags;
262 typedef int ImGuiTableFlags;
263 typedef int ImGuiTableColumnFlags;
264 typedef int ImGuiTableRowFlags;
265 typedef int ImGuiTreeNodeFlags;
266 typedef int ImGuiViewportFlags;
267 typedef int ImGuiWindowFlags;
271 typedef unsigned int ImWchar32;
272 typedef unsigned short ImWchar16;
273 #ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16] 274 typedef ImWchar32 ImWchar;
276 typedef ImWchar16 ImWchar;
282 typedef ImS64 ImGuiSelectionUserData;
287 typedef void* (*ImGuiMemAllocFunc)(
size_t sz,
void* user_data);
288 typedef void (*ImGuiMemFreeFunc)(
void* ptr,
void* user_data);
293 IM_MSVC_RUNTIME_CHECKS_OFF
297 constexpr
ImVec2() : x(0.0f), y(0.0f) { }
298 constexpr ImVec2(
float _x,
float _y) : x(_x), y(_y) { }
299 float& operator[] (
size_t idx) { IM_ASSERT(idx == 0 || idx == 1);
return ((
float*)(
void*)(
char*)
this)[idx]; }
300 float operator[] (
size_t idx)
const { IM_ASSERT(idx == 0 || idx == 1);
return ((
const float*)(
const void*)(
const char*)
this)[idx]; }
301 #ifdef IM_VEC2_CLASS_EXTRA 310 constexpr
ImVec4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) { }
311 constexpr ImVec4(
float _x,
float _y,
float _z,
float _w) : x(_x), y(_y), z(_z), w(_w) { }
312 #ifdef IM_VEC4_CLASS_EXTRA 316 IM_MSVC_RUNTIME_CHECKS_RESTORE
339 typedef ImU64 ImTextureID;
343 #ifndef ImTextureID_Invalid 344 #define ImTextureID_Invalid ((ImTextureID)0) 361 IM_MSVC_RUNTIME_CHECKS_OFF
364 ImTextureRef() { _TexData = NULL; _TexID = ImTextureID_Invalid; }
365 ImTextureRef(ImTextureID tex_id) { _TexData = NULL; _TexID = tex_id; }
366 #if !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && !defined(ImTextureID) 367 ImTextureRef(
void* tex_id) { _TexData = NULL; _TexID = (ImTextureID)(
size_t)tex_id; }
370 inline ImTextureID GetTexID()
const;
376 IM_MSVC_RUNTIME_CHECKS_RESTORE
390 IMGUI_API
void DestroyContext(
ImGuiContext* ctx = NULL);
398 IMGUI_API
void NewFrame();
399 IMGUI_API
void EndFrame();
400 IMGUI_API
void Render();
404 IMGUI_API
void ShowDemoWindow(
bool* p_open = NULL);
405 IMGUI_API
void ShowMetricsWindow(
bool* p_open = NULL);
406 IMGUI_API
void ShowDebugLogWindow(
bool* p_open = NULL);
407 IMGUI_API
void ShowIDStackToolWindow(
bool* p_open = NULL);
408 IMGUI_API
void ShowAboutWindow(
bool* p_open = NULL);
409 IMGUI_API
void ShowStyleEditor(
ImGuiStyle* ref = NULL);
410 IMGUI_API
bool ShowStyleSelector(
const char* label);
411 IMGUI_API
void ShowFontSelector(
const char* label);
412 IMGUI_API
void ShowUserGuide();
413 IMGUI_API
const char* GetVersion();
416 IMGUI_API
void StyleColorsDark(
ImGuiStyle* dst = NULL);
417 IMGUI_API
void StyleColorsLight(
ImGuiStyle* dst = NULL);
418 IMGUI_API
void StyleColorsClassic(
ImGuiStyle* dst = NULL);
432 IMGUI_API
bool Begin(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
433 IMGUI_API
void End();
453 IMGUI_API
bool BeginChild(
const char* str_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
454 IMGUI_API
bool BeginChild(ImGuiID
id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
455 IMGUI_API
void EndChild();
459 IMGUI_API
bool IsWindowAppearing();
460 IMGUI_API
bool IsWindowCollapsed();
461 IMGUI_API
bool IsWindowFocused(ImGuiFocusedFlags flags=0);
462 IMGUI_API
bool IsWindowHovered(ImGuiHoveredFlags flags=0);
464 IMGUI_API
float GetWindowDpiScale();
465 IMGUI_API
ImVec2 GetWindowPos();
466 IMGUI_API
ImVec2 GetWindowSize();
467 IMGUI_API
float GetWindowWidth();
468 IMGUI_API
float GetWindowHeight();
473 IMGUI_API
void SetNextWindowPos(
const ImVec2& pos, ImGuiCond cond = 0,
const ImVec2& pivot =
ImVec2(0, 0));
474 IMGUI_API
void SetNextWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
475 IMGUI_API
void SetNextWindowSizeConstraints(
const ImVec2& size_min,
const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL,
void* custom_callback_data = NULL);
476 IMGUI_API
void SetNextWindowContentSize(
const ImVec2& size);
477 IMGUI_API
void SetNextWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
478 IMGUI_API
void SetNextWindowFocus();
479 IMGUI_API
void SetNextWindowScroll(
const ImVec2& scroll);
480 IMGUI_API
void SetNextWindowBgAlpha(
float alpha);
481 IMGUI_API
void SetNextWindowViewport(ImGuiID viewport_id);
482 IMGUI_API
void SetWindowPos(
const ImVec2& pos, ImGuiCond cond = 0);
483 IMGUI_API
void SetWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
484 IMGUI_API
void SetWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
485 IMGUI_API
void SetWindowFocus();
486 IMGUI_API
void SetWindowPos(
const char* name,
const ImVec2& pos, ImGuiCond cond = 0);
487 IMGUI_API
void SetWindowSize(
const char* name,
const ImVec2& size, ImGuiCond cond = 0);
488 IMGUI_API
void SetWindowCollapsed(
const char* name,
bool collapsed, ImGuiCond cond = 0);
489 IMGUI_API
void SetWindowFocus(
const char* name);
494 IMGUI_API
float GetScrollX();
495 IMGUI_API
float GetScrollY();
496 IMGUI_API
void SetScrollX(
float scroll_x);
497 IMGUI_API
void SetScrollY(
float scroll_y);
498 IMGUI_API
float GetScrollMaxX();
499 IMGUI_API
float GetScrollMaxY();
500 IMGUI_API
void SetScrollHereX(
float center_x_ratio = 0.5f);
501 IMGUI_API
void SetScrollHereY(
float center_y_ratio = 0.5f);
502 IMGUI_API
void SetScrollFromPosX(
float local_x,
float center_x_ratio = 0.5f);
503 IMGUI_API
void SetScrollFromPosY(
float local_y,
float center_y_ratio = 0.5f);
521 IMGUI_API
void PushFont(
ImFont* font,
float font_size_base_unscaled);
522 IMGUI_API
void PopFont();
523 IMGUI_API
ImFont* GetFont();
524 IMGUI_API
float GetFontSize();
528 IMGUI_API
void PushStyleColor(ImGuiCol idx, ImU32 col);
529 IMGUI_API
void PushStyleColor(ImGuiCol idx,
const ImVec4& col);
530 IMGUI_API
void PopStyleColor(
int count = 1);
531 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
float val);
532 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
const ImVec2& val);
533 IMGUI_API
void PushStyleVarX(ImGuiStyleVar idx,
float val_x);
534 IMGUI_API
void PushStyleVarY(ImGuiStyleVar idx,
float val_y);
535 IMGUI_API
void PopStyleVar(
int count = 1);
536 IMGUI_API
void PushItemFlag(ImGuiItemFlags option,
bool enabled);
537 IMGUI_API
void PopItemFlag();
540 IMGUI_API
void PushItemWidth(
float item_width);
541 IMGUI_API
void PopItemWidth();
542 IMGUI_API
void SetNextItemWidth(
float item_width);
543 IMGUI_API
float CalcItemWidth();
544 IMGUI_API
void PushTextWrapPos(
float wrap_local_pos_x = 0.0f);
545 IMGUI_API
void PopTextWrapPos();
549 IMGUI_API
ImVec2 GetFontTexUvWhitePixel();
550 IMGUI_API ImU32 GetColorU32(ImGuiCol idx,
float alpha_mul = 1.0f);
551 IMGUI_API ImU32 GetColorU32(
const ImVec4& col);
552 IMGUI_API ImU32 GetColorU32(ImU32 col,
float alpha_mul = 1.0f);
553 IMGUI_API
const ImVec4& GetStyleColorVec4(ImGuiCol idx);
565 IMGUI_API
ImVec2 GetCursorScreenPos();
566 IMGUI_API
void SetCursorScreenPos(
const ImVec2& pos);
567 IMGUI_API
ImVec2 GetContentRegionAvail();
568 IMGUI_API
ImVec2 GetCursorPos();
569 IMGUI_API
float GetCursorPosX();
570 IMGUI_API
float GetCursorPosY();
571 IMGUI_API
void SetCursorPos(
const ImVec2& local_pos);
572 IMGUI_API
void SetCursorPosX(
float local_x);
573 IMGUI_API
void SetCursorPosY(
float local_y);
574 IMGUI_API
ImVec2 GetCursorStartPos();
577 IMGUI_API
void Separator();
578 IMGUI_API
void SameLine(
float offset_from_start_x=0.0f,
float spacing=-1.0f);
579 IMGUI_API
void NewLine();
580 IMGUI_API
void Spacing();
581 IMGUI_API
void Dummy(
const ImVec2& size);
582 IMGUI_API
void Indent(
float indent_w = 0.0f);
583 IMGUI_API
void Unindent(
float indent_w = 0.0f);
584 IMGUI_API
void BeginGroup();
585 IMGUI_API
void EndGroup();
586 IMGUI_API
void AlignTextToFramePadding();
587 IMGUI_API
float GetTextLineHeight();
588 IMGUI_API
float GetTextLineHeightWithSpacing();
589 IMGUI_API
float GetFrameHeight();
590 IMGUI_API
float GetFrameHeightWithSpacing();
603 IMGUI_API
void PushID(
const char* str_id);
604 IMGUI_API
void PushID(
const char* str_id_begin,
const char* str_id_end);
605 IMGUI_API
void PushID(
const void* ptr_id);
606 IMGUI_API
void PushID(
int int_id);
607 IMGUI_API
void PopID();
608 IMGUI_API ImGuiID GetID(
const char* str_id);
609 IMGUI_API ImGuiID GetID(
const char* str_id_begin,
const char* str_id_end);
610 IMGUI_API ImGuiID GetID(
const void* ptr_id);
611 IMGUI_API ImGuiID GetID(
int int_id);
614 IMGUI_API
void TextUnformatted(
const char* text,
const char* text_end = NULL);
615 IMGUI_API
void Text(
const char* fmt, ...) IM_FMTARGS(1);
616 IMGUI_API
void TextV(
const char* fmt, va_list args) IM_FMTLIST(1);
617 IMGUI_API
void TextColored(
const ImVec4& col,
const char* fmt, ...) IM_FMTARGS(2);
618 IMGUI_API
void TextColoredV(
const ImVec4& col,
const char* fmt, va_list args) IM_FMTLIST(2);
619 IMGUI_API
void TextDisabled(
const char* fmt, ...) IM_FMTARGS(1);
620 IMGUI_API
void TextDisabledV(
const char* fmt, va_list args) IM_FMTLIST(1);
621 IMGUI_API
void TextWrapped(
const char* fmt, ...) IM_FMTARGS(1);
622 IMGUI_API
void TextWrappedV(
const char* fmt, va_list args) IM_FMTLIST(1);
623 IMGUI_API
void LabelText(
const char* label,
const char* fmt, ...) IM_FMTARGS(2);
624 IMGUI_API
void LabelTextV(
const char* label,
const char* fmt, va_list args) IM_FMTLIST(2);
625 IMGUI_API
void BulletText(
const char* fmt, ...) IM_FMTARGS(1);
626 IMGUI_API
void BulletTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
627 IMGUI_API
void SeparatorText(
const char* label);
633 IMGUI_API
bool SmallButton(
const char* label);
634 IMGUI_API
bool InvisibleButton(
const char* str_id,
const ImVec2& size, ImGuiButtonFlags flags = 0);
635 IMGUI_API
bool ArrowButton(
const char* str_id, ImGuiDir dir);
636 IMGUI_API
bool Checkbox(
const char* label,
bool* v);
637 IMGUI_API
bool CheckboxFlags(
const char* label,
int* flags,
int flags_value);
638 IMGUI_API
bool CheckboxFlags(
const char* label,
unsigned int* flags,
unsigned int flags_value);
639 IMGUI_API
bool RadioButton(
const char* label,
bool active);
640 IMGUI_API
bool RadioButton(
const char* label,
int* v,
int v_button);
641 IMGUI_API
void ProgressBar(
float fraction,
const ImVec2& size_arg =
ImVec2(-FLT_MIN, 0),
const char* overlay = NULL);
642 IMGUI_API
void Bullet();
643 IMGUI_API
bool TextLink(
const char* label);
644 IMGUI_API
bool TextLinkOpenURL(
const char* label,
const char* url = NULL);
653 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));
654 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));
659 IMGUI_API
bool BeginCombo(
const char* label,
const char* preview_value, ImGuiComboFlags flags = 0);
660 IMGUI_API
void EndCombo();
661 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int popup_max_height_in_items = -1);
662 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char* items_separated_by_zeros,
int popup_max_height_in_items = -1);
663 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);
677 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);
678 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);
679 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);
680 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);
681 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);
682 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);
683 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);
684 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);
685 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);
686 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);
687 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);
688 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);
696 IMGUI_API
bool SliderFloat(
const char* label,
float* v,
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
697 IMGUI_API
bool SliderFloat2(
const char* label,
float v[2],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
698 IMGUI_API
bool SliderFloat3(
const char* label,
float v[3],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
699 IMGUI_API
bool SliderFloat4(
const char* label,
float v[4],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
700 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);
701 IMGUI_API
bool SliderInt(
const char* label,
int* v,
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
702 IMGUI_API
bool SliderInt2(
const char* label,
int v[2],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
703 IMGUI_API
bool SliderInt3(
const char* label,
int v[3],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
704 IMGUI_API
bool SliderInt4(
const char* label,
int v[4],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
705 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);
706 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);
707 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);
708 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);
709 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);
714 IMGUI_API
bool InputText(
const char* label,
char* buf,
size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
715 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);
716 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);
717 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);
718 IMGUI_API
bool InputFloat2(
const char* label,
float v[2],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
719 IMGUI_API
bool InputFloat3(
const char* label,
float v[3],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
720 IMGUI_API
bool InputFloat4(
const char* label,
float v[4],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
721 IMGUI_API
bool InputInt(
const char* label,
int* v,
int step = 1,
int step_fast = 100, ImGuiInputTextFlags flags = 0);
722 IMGUI_API
bool InputInt2(
const char* label,
int v[2], ImGuiInputTextFlags flags = 0);
723 IMGUI_API
bool InputInt3(
const char* label,
int v[3], ImGuiInputTextFlags flags = 0);
724 IMGUI_API
bool InputInt4(
const char* label,
int v[4], ImGuiInputTextFlags flags = 0);
725 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);
726 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);
727 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);
732 IMGUI_API
bool ColorEdit3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
733 IMGUI_API
bool ColorEdit4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0);
734 IMGUI_API
bool ColorPicker3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
735 IMGUI_API
bool ColorPicker4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0,
const float* ref_col = NULL);
736 IMGUI_API
bool ColorButton(
const char* desc_id,
const ImVec4& col, ImGuiColorEditFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
737 IMGUI_API
void SetColorEditOptions(ImGuiColorEditFlags flags);
741 IMGUI_API
bool TreeNode(
const char* label);
742 IMGUI_API
bool TreeNode(
const char* str_id,
const char* fmt, ...) IM_FMTARGS(2);
743 IMGUI_API
bool TreeNode(
const void* ptr_id,
const char* fmt, ...) IM_FMTARGS(2);
744 IMGUI_API
bool TreeNodeV(
const char* str_id,
const char* fmt, va_list args) IM_FMTLIST(2);
745 IMGUI_API
bool TreeNodeV(
const void* ptr_id,
const char* fmt, va_list args) IM_FMTLIST(2);
746 IMGUI_API
bool TreeNodeEx(
const char* label, ImGuiTreeNodeFlags flags = 0);
747 IMGUI_API
bool TreeNodeEx(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
748 IMGUI_API
bool TreeNodeEx(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
749 IMGUI_API
bool TreeNodeExV(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
750 IMGUI_API
bool TreeNodeExV(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
751 IMGUI_API
void TreePush(
const char* str_id);
752 IMGUI_API
void TreePush(
const void* ptr_id);
753 IMGUI_API
void TreePop();
754 IMGUI_API
float GetTreeNodeToLabelSpacing();
755 IMGUI_API
bool CollapsingHeader(
const char* label, ImGuiTreeNodeFlags flags = 0);
756 IMGUI_API
bool CollapsingHeader(
const char* label,
bool* p_visible, ImGuiTreeNodeFlags flags = 0);
757 IMGUI_API
void SetNextItemOpen(
bool is_open, ImGuiCond cond = 0);
758 IMGUI_API
void SetNextItemStorageID(ImGuiID storage_id);
763 IMGUI_API
bool Selectable(
const char* label,
bool selected =
false, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
764 IMGUI_API
bool Selectable(
const char* label,
bool* p_selected, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
773 IMGUI_API
ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags,
int selection_size = -1,
int items_count = -1);
775 IMGUI_API
void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data);
776 IMGUI_API
bool IsItemToggledSelection();
785 IMGUI_API
bool BeginListBox(
const char* label,
const ImVec2& size =
ImVec2(0, 0));
786 IMGUI_API
void EndListBox();
787 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int height_in_items = -1);
788 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);
792 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));
793 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));
794 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));
795 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));
799 IMGUI_API
void Value(
const char* prefix,
bool b);
800 IMGUI_API
void Value(
const char* prefix,
int v);
801 IMGUI_API
void Value(
const char* prefix,
unsigned int v);
802 IMGUI_API
void Value(
const char* prefix,
float v,
const char* float_format = NULL);
809 IMGUI_API
bool BeginMenuBar();
810 IMGUI_API
void EndMenuBar();
811 IMGUI_API
bool BeginMainMenuBar();
812 IMGUI_API
void EndMainMenuBar();
813 IMGUI_API
bool BeginMenu(
const char* label,
bool enabled =
true);
814 IMGUI_API
void EndMenu();
815 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut = NULL,
bool selected =
false,
bool enabled =
true);
816 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut,
bool* p_selected,
bool enabled =
true);
822 IMGUI_API
bool BeginTooltip();
823 IMGUI_API
void EndTooltip();
824 IMGUI_API
void SetTooltip(
const char* fmt, ...) IM_FMTARGS(1);
825 IMGUI_API
void SetTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
831 IMGUI_API
bool BeginItemTooltip();
832 IMGUI_API
void SetItemTooltip(
const char* fmt, ...) IM_FMTARGS(1);
833 IMGUI_API
void SetItemTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
845 IMGUI_API
bool BeginPopup(
const char* str_id, ImGuiWindowFlags flags = 0);
846 IMGUI_API
bool BeginPopupModal(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
847 IMGUI_API
void EndPopup();
857 IMGUI_API
void OpenPopup(
const char* str_id, ImGuiPopupFlags popup_flags = 0);
858 IMGUI_API
void OpenPopup(ImGuiID
id, ImGuiPopupFlags popup_flags = 0);
859 IMGUI_API
void OpenPopupOnItemClick(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
860 IMGUI_API
void CloseCurrentPopup();
867 IMGUI_API
bool BeginPopupContextItem(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
868 IMGUI_API
bool BeginPopupContextWindow(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
869 IMGUI_API
bool BeginPopupContextVoid(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
875 IMGUI_API
bool IsPopupOpen(
const char* str_id, ImGuiPopupFlags flags = 0);
898 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);
899 IMGUI_API
void EndTable();
900 IMGUI_API
void TableNextRow(ImGuiTableRowFlags row_flags = 0,
float min_row_height = 0.0f);
901 IMGUI_API
bool TableNextColumn();
902 IMGUI_API
bool TableSetColumnIndex(
int column_n);
912 IMGUI_API
void TableSetupColumn(
const char* label, ImGuiTableColumnFlags flags = 0,
float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
913 IMGUI_API
void TableSetupScrollFreeze(
int cols,
int rows);
914 IMGUI_API
void TableHeader(
const char* label);
915 IMGUI_API
void TableHeadersRow();
916 IMGUI_API
void TableAngledHeadersRow();
925 IMGUI_API
int TableGetColumnCount();
926 IMGUI_API
int TableGetColumnIndex();
927 IMGUI_API
int TableGetRowIndex();
928 IMGUI_API
const char* TableGetColumnName(
int column_n = -1);
929 IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(
int column_n = -1);
930 IMGUI_API
void TableSetColumnEnabled(
int column_n,
bool v);
931 IMGUI_API
int TableGetHoveredColumn();
932 IMGUI_API
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color,
int column_n = -1);
936 IMGUI_API
void Columns(
int count = 1,
const char*
id = NULL,
bool borders =
true);
937 IMGUI_API
void NextColumn();
938 IMGUI_API
int GetColumnIndex();
939 IMGUI_API
float GetColumnWidth(
int column_index = -1);
940 IMGUI_API
void SetColumnWidth(
int column_index,
float width);
941 IMGUI_API
float GetColumnOffset(
int column_index = -1);
942 IMGUI_API
void SetColumnOffset(
int column_index,
float offset_x);
943 IMGUI_API
int GetColumnsCount();
947 IMGUI_API
bool BeginTabBar(
const char* str_id, ImGuiTabBarFlags flags = 0);
948 IMGUI_API
void EndTabBar();
949 IMGUI_API
bool BeginTabItem(
const char* label,
bool* p_open = NULL, ImGuiTabItemFlags flags = 0);
950 IMGUI_API
void EndTabItem();
951 IMGUI_API
bool TabItemButton(
const char* label, ImGuiTabItemFlags flags = 0);
952 IMGUI_API
void SetTabItemClosed(
const char* tab_or_docked_window_label);
967 IMGUI_API ImGuiID DockSpace(ImGuiID dockspace_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiDockNodeFlags flags = 0,
const ImGuiWindowClass* window_class = NULL);
968 IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0,
const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0,
const ImGuiWindowClass* window_class = NULL);
969 IMGUI_API
void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0);
971 IMGUI_API ImGuiID GetWindowDockID();
972 IMGUI_API
bool IsWindowDocked();
976 IMGUI_API
void LogToTTY(
int auto_open_depth = -1);
977 IMGUI_API
void LogToFile(
int auto_open_depth = -1,
const char* filename = NULL);
978 IMGUI_API
void LogToClipboard(
int auto_open_depth = -1);
979 IMGUI_API
void LogFinish();
980 IMGUI_API
void LogButtons();
981 IMGUI_API
void LogText(
const char* fmt, ...) IM_FMTARGS(1);
982 IMGUI_API
void LogTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
989 IMGUI_API
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0);
990 IMGUI_API
bool SetDragDropPayload(
const char* type,
const void* data,
size_t sz, ImGuiCond cond = 0);
991 IMGUI_API
void EndDragDropSource();
992 IMGUI_API
bool BeginDragDropTarget();
993 IMGUI_API
const ImGuiPayload* AcceptDragDropPayload(
const char* type, ImGuiDragDropFlags flags = 0);
994 IMGUI_API
void EndDragDropTarget();
1002 IMGUI_API
void BeginDisabled(
bool disabled =
true);
1003 IMGUI_API
void EndDisabled();
1007 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect);
1008 IMGUI_API
void PopClipRect();
1011 IMGUI_API
void SetItemDefaultFocus();
1012 IMGUI_API
void SetKeyboardFocusHere(
int offset = 0);
1015 IMGUI_API
void SetNavCursorVisible(
bool visible);
1018 IMGUI_API
void SetNextItemAllowOverlap();
1023 IMGUI_API
bool IsItemHovered(ImGuiHoveredFlags flags = 0);
1024 IMGUI_API
bool IsItemActive();
1025 IMGUI_API
bool IsItemFocused();
1026 IMGUI_API
bool IsItemClicked(ImGuiMouseButton mouse_button = 0);
1027 IMGUI_API
bool IsItemVisible();
1028 IMGUI_API
bool IsItemEdited();
1029 IMGUI_API
bool IsItemActivated();
1030 IMGUI_API
bool IsItemDeactivated();
1031 IMGUI_API
bool IsItemDeactivatedAfterEdit();
1032 IMGUI_API
bool IsItemToggledOpen();
1033 IMGUI_API
bool IsAnyItemHovered();
1034 IMGUI_API
bool IsAnyItemActive();
1035 IMGUI_API
bool IsAnyItemFocused();
1036 IMGUI_API ImGuiID GetItemID();
1037 IMGUI_API
ImVec2 GetItemRectMin();
1038 IMGUI_API
ImVec2 GetItemRectMax();
1039 IMGUI_API
ImVec2 GetItemRectSize();
1052 IMGUI_API
bool IsRectVisible(
const ImVec2& size);
1053 IMGUI_API
bool IsRectVisible(
const ImVec2& rect_min,
const ImVec2& rect_max);
1054 IMGUI_API
double GetTime();
1055 IMGUI_API
int GetFrameCount();
1057 IMGUI_API
const char* GetStyleColorName(ImGuiCol idx);
1062 IMGUI_API
ImVec2 CalcTextSize(
const char* text,
const char* text_end = NULL,
bool hide_text_after_double_hash =
false,
float wrap_width = -1.0f);
1065 IMGUI_API
ImVec4 ColorConvertU32ToFloat4(ImU32 in);
1066 IMGUI_API ImU32 ColorConvertFloat4ToU32(
const ImVec4& in);
1067 IMGUI_API
void ColorConvertRGBtoHSV(
float r,
float g,
float b,
float& out_h,
float& out_s,
float& out_v);
1068 IMGUI_API
void ColorConvertHSVtoRGB(
float h,
float s,
float v,
float& out_r,
float& out_g,
float& out_b);
1074 IMGUI_API
bool IsKeyDown(ImGuiKey key);
1075 IMGUI_API
bool IsKeyPressed(ImGuiKey key,
bool repeat =
true);
1076 IMGUI_API
bool IsKeyReleased(ImGuiKey key);
1077 IMGUI_API
bool IsKeyChordPressed(ImGuiKeyChord key_chord);
1078 IMGUI_API
int GetKeyPressedAmount(ImGuiKey key,
float repeat_delay,
float rate);
1079 IMGUI_API
const char* GetKeyName(ImGuiKey key);
1080 IMGUI_API
void SetNextFrameWantCaptureKeyboard(
bool want_capture_keyboard);
1097 IMGUI_API
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
1098 IMGUI_API
void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
1106 IMGUI_API
void SetItemKeyOwner(ImGuiKey key);
1112 IMGUI_API
bool IsMouseDown(ImGuiMouseButton button);
1113 IMGUI_API
bool IsMouseClicked(ImGuiMouseButton button,
bool repeat =
false);
1114 IMGUI_API
bool IsMouseReleased(ImGuiMouseButton button);
1115 IMGUI_API
bool IsMouseDoubleClicked(ImGuiMouseButton button);
1116 IMGUI_API
bool IsMouseReleasedWithDelay(ImGuiMouseButton button,
float delay);
1117 IMGUI_API
int GetMouseClickedCount(ImGuiMouseButton button);
1118 IMGUI_API
bool IsMouseHoveringRect(
const ImVec2& r_min,
const ImVec2& r_max,
bool clip =
true);
1119 IMGUI_API
bool IsMousePosValid(
const ImVec2* mouse_pos = NULL);
1120 IMGUI_API
bool IsAnyMouseDown();
1121 IMGUI_API
ImVec2 GetMousePos();
1122 IMGUI_API
ImVec2 GetMousePosOnOpeningCurrentPopup();
1123 IMGUI_API
bool IsMouseDragging(ImGuiMouseButton button,
float lock_threshold = -1.0f);
1124 IMGUI_API
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0,
float lock_threshold = -1.0f);
1125 IMGUI_API
void ResetMouseDragDelta(ImGuiMouseButton button = 0);
1126 IMGUI_API ImGuiMouseCursor GetMouseCursor();
1127 IMGUI_API
void SetMouseCursor(ImGuiMouseCursor cursor_type);
1128 IMGUI_API
void SetNextFrameWantCaptureMouse(
bool want_capture_mouse);
1132 IMGUI_API
const char* GetClipboardText();
1133 IMGUI_API
void SetClipboardText(
const char* text);
1139 IMGUI_API
void LoadIniSettingsFromDisk(
const char* ini_filename);
1140 IMGUI_API
void LoadIniSettingsFromMemory(
const char* ini_data,
size_t ini_size=0);
1141 IMGUI_API
void SaveIniSettingsToDisk(
const char* ini_filename);
1142 IMGUI_API
const char* SaveIniSettingsToMemory(
size_t* out_ini_size = NULL);
1146 IMGUI_API
void DebugTextEncoding(
const char* text);
1147 IMGUI_API
void DebugFlashStyleColor(ImGuiCol idx);
1148 IMGUI_API
void DebugStartItemPicker();
1149 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);
1150 #ifndef IMGUI_DISABLE_DEBUG_TOOLS 1151 IMGUI_API
void DebugLog(
const char* fmt, ...) IM_FMTARGS(1);
1152 IMGUI_API
void DebugLogV(
const char* fmt, va_list args) IM_FMTLIST(1);
1159 IMGUI_API
void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func,
void* user_data = NULL);
1160 IMGUI_API
void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func,
void** p_user_data);
1161 IMGUI_API
void* MemAlloc(
size_t size);
1162 IMGUI_API
void MemFree(
void* ptr);
1167 IMGUI_API
void UpdatePlatformWindows();
1168 IMGUI_API
void RenderPlatformWindowsDefault(
void* platform_render_arg = NULL,
void* renderer_render_arg = NULL);
1169 IMGUI_API
void DestroyPlatformWindows();
1171 IMGUI_API
ImGuiViewport* FindViewportByPlatformHandle(
void* platform_handle);
1181 enum ImGuiWindowFlags_
1183 ImGuiWindowFlags_None = 0,
1184 ImGuiWindowFlags_NoTitleBar = 1 << 0,
1185 ImGuiWindowFlags_NoResize = 1 << 1,
1186 ImGuiWindowFlags_NoMove = 1 << 2,
1187 ImGuiWindowFlags_NoScrollbar = 1 << 3,
1188 ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
1189 ImGuiWindowFlags_NoCollapse = 1 << 5,
1190 ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
1191 ImGuiWindowFlags_NoBackground = 1 << 7,
1192 ImGuiWindowFlags_NoSavedSettings = 1 << 8,
1193 ImGuiWindowFlags_NoMouseInputs = 1 << 9,
1194 ImGuiWindowFlags_MenuBar = 1 << 10,
1195 ImGuiWindowFlags_HorizontalScrollbar = 1 << 11,
1196 ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12,
1197 ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
1198 ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,
1199 ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,
1200 ImGuiWindowFlags_NoNavInputs = 1 << 16,
1201 ImGuiWindowFlags_NoNavFocus = 1 << 17,
1202 ImGuiWindowFlags_UnsavedDocument = 1 << 18,
1203 ImGuiWindowFlags_NoDocking = 1 << 19,
1204 ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1205 ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse,
1206 ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1209 ImGuiWindowFlags_DockNodeHost = 1 << 23,
1210 ImGuiWindowFlags_ChildWindow = 1 << 24,
1211 ImGuiWindowFlags_Tooltip = 1 << 25,
1212 ImGuiWindowFlags_Popup = 1 << 26,
1213 ImGuiWindowFlags_Modal = 1 << 27,
1214 ImGuiWindowFlags_ChildMenu = 1 << 28,
1217 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1218 ImGuiWindowFlags_NavFlattened = 1 << 29,
1219 ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30,
1232 enum ImGuiChildFlags_
1234 ImGuiChildFlags_None = 0,
1235 ImGuiChildFlags_Borders = 1 << 0,
1236 ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1,
1237 ImGuiChildFlags_ResizeX = 1 << 2,
1238 ImGuiChildFlags_ResizeY = 1 << 3,
1239 ImGuiChildFlags_AutoResizeX = 1 << 4,
1240 ImGuiChildFlags_AutoResizeY = 1 << 5,
1241 ImGuiChildFlags_AlwaysAutoResize = 1 << 6,
1242 ImGuiChildFlags_FrameStyle = 1 << 7,
1243 ImGuiChildFlags_NavFlattened = 1 << 8,
1246 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1247 ImGuiChildFlags_Border = ImGuiChildFlags_Borders,
1253 enum ImGuiItemFlags_
1255 ImGuiItemFlags_None = 0,
1256 ImGuiItemFlags_NoTabStop = 1 << 0,
1257 ImGuiItemFlags_NoNav = 1 << 1,
1258 ImGuiItemFlags_NoNavDefaultFocus = 1 << 2,
1259 ImGuiItemFlags_ButtonRepeat = 1 << 3,
1260 ImGuiItemFlags_AutoClosePopups = 1 << 4,
1261 ImGuiItemFlags_AllowDuplicateId = 1 << 5,
1266 enum ImGuiInputTextFlags_
1269 ImGuiInputTextFlags_None = 0,
1270 ImGuiInputTextFlags_CharsDecimal = 1 << 0,
1271 ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
1272 ImGuiInputTextFlags_CharsScientific = 1 << 2,
1273 ImGuiInputTextFlags_CharsUppercase = 1 << 3,
1274 ImGuiInputTextFlags_CharsNoBlank = 1 << 4,
1277 ImGuiInputTextFlags_AllowTabInput = 1 << 5,
1278 ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6,
1279 ImGuiInputTextFlags_EscapeClearsAll = 1 << 7,
1280 ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8,
1283 ImGuiInputTextFlags_ReadOnly = 1 << 9,
1284 ImGuiInputTextFlags_Password = 1 << 10,
1285 ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11,
1286 ImGuiInputTextFlags_AutoSelectAll = 1 << 12,
1287 ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13,
1288 ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14,
1289 ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15,
1290 ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
1293 ImGuiInputTextFlags_ElideLeft = 1 << 17,
1296 ImGuiInputTextFlags_CallbackCompletion = 1 << 18,
1297 ImGuiInputTextFlags_CallbackHistory = 1 << 19,
1298 ImGuiInputTextFlags_CallbackAlways = 1 << 20,
1299 ImGuiInputTextFlags_CallbackCharFilter = 1 << 21,
1300 ImGuiInputTextFlags_CallbackResize = 1 << 22,
1301 ImGuiInputTextFlags_CallbackEdit = 1 << 23,
1308 enum ImGuiTreeNodeFlags_
1310 ImGuiTreeNodeFlags_None = 0,
1311 ImGuiTreeNodeFlags_Selected = 1 << 0,
1312 ImGuiTreeNodeFlags_Framed = 1 << 1,
1313 ImGuiTreeNodeFlags_AllowOverlap = 1 << 2,
1314 ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
1315 ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
1316 ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
1317 ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6,
1318 ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
1319 ImGuiTreeNodeFlags_Leaf = 1 << 8,
1320 ImGuiTreeNodeFlags_Bullet = 1 << 9,
1321 ImGuiTreeNodeFlags_FramePadding = 1 << 10,
1322 ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
1323 ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
1324 ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13,
1325 ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14,
1326 ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15,
1328 ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17,
1329 ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
1333 ImGuiTreeNodeFlags_DrawLinesNone = 1 << 18,
1334 ImGuiTreeNodeFlags_DrawLinesFull = 1 << 19,
1335 ImGuiTreeNodeFlags_DrawLinesToNodes = 1 << 20,
1337 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1338 ImGuiTreeNodeFlags_NavLeftJumpsBackHere = ImGuiTreeNodeFlags_NavLeftJumpsToParent,
1339 ImGuiTreeNodeFlags_SpanTextWidth = ImGuiTreeNodeFlags_SpanLabelWidth,
1340 ImGuiTreeNodeFlags_AllowItemOverlap = ImGuiTreeNodeFlags_AllowOverlap,
1352 enum ImGuiPopupFlags_
1354 ImGuiPopupFlags_None = 0,
1355 ImGuiPopupFlags_MouseButtonLeft = 0,
1356 ImGuiPopupFlags_MouseButtonRight = 1,
1357 ImGuiPopupFlags_MouseButtonMiddle = 2,
1358 ImGuiPopupFlags_MouseButtonMask_ = 0x1F,
1359 ImGuiPopupFlags_MouseButtonDefault_ = 1,
1360 ImGuiPopupFlags_NoReopen = 1 << 5,
1362 ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7,
1363 ImGuiPopupFlags_NoOpenOverItems = 1 << 8,
1364 ImGuiPopupFlags_AnyPopupId = 1 << 10,
1365 ImGuiPopupFlags_AnyPopupLevel = 1 << 11,
1366 ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel,
1370 enum ImGuiSelectableFlags_
1372 ImGuiSelectableFlags_None = 0,
1373 ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0,
1374 ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
1375 ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
1376 ImGuiSelectableFlags_Disabled = 1 << 3,
1377 ImGuiSelectableFlags_AllowOverlap = 1 << 4,
1378 ImGuiSelectableFlags_Highlight = 1 << 5,
1380 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1381 ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups,
1382 ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap,
1387 enum ImGuiComboFlags_
1389 ImGuiComboFlags_None = 0,
1390 ImGuiComboFlags_PopupAlignLeft = 1 << 0,
1391 ImGuiComboFlags_HeightSmall = 1 << 1,
1392 ImGuiComboFlags_HeightRegular = 1 << 2,
1393 ImGuiComboFlags_HeightLarge = 1 << 3,
1394 ImGuiComboFlags_HeightLargest = 1 << 4,
1395 ImGuiComboFlags_NoArrowButton = 1 << 5,
1396 ImGuiComboFlags_NoPreview = 1 << 6,
1397 ImGuiComboFlags_WidthFitPreview = 1 << 7,
1398 ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest,
1402 enum ImGuiTabBarFlags_
1404 ImGuiTabBarFlags_None = 0,
1405 ImGuiTabBarFlags_Reorderable = 1 << 0,
1406 ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
1407 ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
1408 ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3,
1409 ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
1410 ImGuiTabBarFlags_NoTooltip = 1 << 5,
1411 ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6,
1412 ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 7,
1413 ImGuiTabBarFlags_FittingPolicyScroll = 1 << 8,
1414 ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
1415 ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown,
1419 enum ImGuiTabItemFlags_
1421 ImGuiTabItemFlags_None = 0,
1422 ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
1423 ImGuiTabItemFlags_SetSelected = 1 << 1,
1424 ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
1425 ImGuiTabItemFlags_NoPushId = 1 << 3,
1426 ImGuiTabItemFlags_NoTooltip = 1 << 4,
1427 ImGuiTabItemFlags_NoReorder = 1 << 5,
1428 ImGuiTabItemFlags_Leading = 1 << 6,
1429 ImGuiTabItemFlags_Trailing = 1 << 7,
1430 ImGuiTabItemFlags_NoAssumedClosure = 1 << 8,
1434 enum ImGuiFocusedFlags_
1436 ImGuiFocusedFlags_None = 0,
1437 ImGuiFocusedFlags_ChildWindows = 1 << 0,
1438 ImGuiFocusedFlags_RootWindow = 1 << 1,
1439 ImGuiFocusedFlags_AnyWindow = 1 << 2,
1440 ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
1441 ImGuiFocusedFlags_DockHierarchy = 1 << 4,
1442 ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows,
1448 enum ImGuiHoveredFlags_
1450 ImGuiHoveredFlags_None = 0,
1451 ImGuiHoveredFlags_ChildWindows = 1 << 0,
1452 ImGuiHoveredFlags_RootWindow = 1 << 1,
1453 ImGuiHoveredFlags_AnyWindow = 1 << 2,
1454 ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
1455 ImGuiHoveredFlags_DockHierarchy = 1 << 4,
1456 ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
1458 ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
1459 ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8,
1460 ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9,
1461 ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10,
1462 ImGuiHoveredFlags_NoNavOverride = 1 << 11,
1463 ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow,
1464 ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
1465 ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows,
1473 ImGuiHoveredFlags_ForTooltip = 1 << 12,
1478 ImGuiHoveredFlags_Stationary = 1 << 13,
1479 ImGuiHoveredFlags_DelayNone = 1 << 14,
1480 ImGuiHoveredFlags_DelayShort = 1 << 15,
1481 ImGuiHoveredFlags_DelayNormal = 1 << 16,
1482 ImGuiHoveredFlags_NoSharedDelay = 1 << 17,
1488 enum ImGuiDockNodeFlags_
1490 ImGuiDockNodeFlags_None = 0,
1491 ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0,
1493 ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2,
1494 ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3,
1495 ImGuiDockNodeFlags_NoDockingSplit = 1 << 4,
1496 ImGuiDockNodeFlags_NoResize = 1 << 5,
1497 ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6,
1498 ImGuiDockNodeFlags_NoUndocking = 1 << 7,
1500 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1501 ImGuiDockNodeFlags_NoSplit = ImGuiDockNodeFlags_NoDockingSplit,
1502 ImGuiDockNodeFlags_NoDockingInCentralNode = ImGuiDockNodeFlags_NoDockingOverCentralNode,
1507 enum ImGuiDragDropFlags_
1509 ImGuiDragDropFlags_None = 0,
1511 ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
1512 ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
1513 ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
1514 ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
1515 ImGuiDragDropFlags_SourceExtern = 1 << 4,
1516 ImGuiDragDropFlags_PayloadAutoExpire = 1 << 5,
1517 ImGuiDragDropFlags_PayloadNoCrossContext = 1 << 6,
1518 ImGuiDragDropFlags_PayloadNoCrossProcess = 1 << 7,
1520 ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
1521 ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
1522 ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
1523 ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect,
1525 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1526 ImGuiDragDropFlags_SourceAutoExpirePayload = ImGuiDragDropFlags_PayloadAutoExpire,
1531 #define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F" // float[3]: Standard type for colors, without alpha. User code may use this type. 1532 #define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F" // float[4]: Standard type for colors. User code may use this type. 1545 ImGuiDataType_Float,
1546 ImGuiDataType_Double,
1548 ImGuiDataType_String,
1564 enum ImGuiSortDirection : ImU8
1566 ImGuiSortDirection_None = 0,
1567 ImGuiSortDirection_Ascending = 1,
1568 ImGuiSortDirection_Descending = 2
1581 ImGuiKey_NamedKey_BEGIN = 512,
1585 ImGuiKey_RightArrow,
1598 ImGuiKey_LeftCtrl, ImGuiKey_LeftShift, ImGuiKey_LeftAlt, ImGuiKey_LeftSuper,
1599 ImGuiKey_RightCtrl, ImGuiKey_RightShift, ImGuiKey_RightAlt, ImGuiKey_RightSuper,
1601 ImGuiKey_0, ImGuiKey_1, ImGuiKey_2, ImGuiKey_3, ImGuiKey_4, ImGuiKey_5, ImGuiKey_6, ImGuiKey_7, ImGuiKey_8, ImGuiKey_9,
1602 ImGuiKey_A, ImGuiKey_B, ImGuiKey_C, ImGuiKey_D, ImGuiKey_E, ImGuiKey_F, ImGuiKey_G, ImGuiKey_H, ImGuiKey_I, ImGuiKey_J,
1603 ImGuiKey_K, ImGuiKey_L, ImGuiKey_M, ImGuiKey_N, ImGuiKey_O, ImGuiKey_P, ImGuiKey_Q, ImGuiKey_R, ImGuiKey_S, ImGuiKey_T,
1604 ImGuiKey_U, ImGuiKey_V, ImGuiKey_W, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z,
1605 ImGuiKey_F1, ImGuiKey_F2, ImGuiKey_F3, ImGuiKey_F4, ImGuiKey_F5, ImGuiKey_F6,
1606 ImGuiKey_F7, ImGuiKey_F8, ImGuiKey_F9, ImGuiKey_F10, ImGuiKey_F11, ImGuiKey_F12,
1607 ImGuiKey_F13, ImGuiKey_F14, ImGuiKey_F15, ImGuiKey_F16, ImGuiKey_F17, ImGuiKey_F18,
1608 ImGuiKey_F19, ImGuiKey_F20, ImGuiKey_F21, ImGuiKey_F22, ImGuiKey_F23, ImGuiKey_F24,
1609 ImGuiKey_Apostrophe,
1616 ImGuiKey_LeftBracket,
1618 ImGuiKey_RightBracket,
1619 ImGuiKey_GraveAccent,
1621 ImGuiKey_ScrollLock,
1623 ImGuiKey_PrintScreen,
1625 ImGuiKey_Keypad0, ImGuiKey_Keypad1, ImGuiKey_Keypad2, ImGuiKey_Keypad3, ImGuiKey_Keypad4,
1626 ImGuiKey_Keypad5, ImGuiKey_Keypad6, ImGuiKey_Keypad7, ImGuiKey_Keypad8, ImGuiKey_Keypad9,
1627 ImGuiKey_KeypadDecimal,
1628 ImGuiKey_KeypadDivide,
1629 ImGuiKey_KeypadMultiply,
1630 ImGuiKey_KeypadSubtract,
1632 ImGuiKey_KeypadEnter,
1633 ImGuiKey_KeypadEqual,
1635 ImGuiKey_AppForward,
1642 ImGuiKey_GamepadStart,
1643 ImGuiKey_GamepadBack,
1644 ImGuiKey_GamepadFaceLeft,
1645 ImGuiKey_GamepadFaceRight,
1646 ImGuiKey_GamepadFaceUp,
1647 ImGuiKey_GamepadFaceDown,
1648 ImGuiKey_GamepadDpadLeft,
1649 ImGuiKey_GamepadDpadRight,
1650 ImGuiKey_GamepadDpadUp,
1651 ImGuiKey_GamepadDpadDown,
1658 ImGuiKey_GamepadLStickLeft,
1659 ImGuiKey_GamepadLStickRight,
1660 ImGuiKey_GamepadLStickUp,
1661 ImGuiKey_GamepadLStickDown,
1662 ImGuiKey_GamepadRStickLeft,
1663 ImGuiKey_GamepadRStickRight,
1664 ImGuiKey_GamepadRStickUp,
1665 ImGuiKey_GamepadRStickDown,
1669 ImGuiKey_MouseLeft, ImGuiKey_MouseRight, ImGuiKey_MouseMiddle, ImGuiKey_MouseX1, ImGuiKey_MouseX2, ImGuiKey_MouseWheelX, ImGuiKey_MouseWheelY,
1672 ImGuiKey_ReservedForModCtrl, ImGuiKey_ReservedForModShift, ImGuiKey_ReservedForModAlt, ImGuiKey_ReservedForModSuper,
1675 ImGuiKey_NamedKey_END,
1676 ImGuiKey_NamedKey_COUNT = ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN,
1689 ImGuiMod_Ctrl = 1 << 12,
1690 ImGuiMod_Shift = 1 << 13,
1691 ImGuiMod_Alt = 1 << 14,
1692 ImGuiMod_Super = 1 << 15,
1693 ImGuiMod_Mask_ = 0xF000,
1695 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1696 ImGuiKey_COUNT = ImGuiKey_NamedKey_END,
1697 ImGuiMod_Shortcut = ImGuiMod_Ctrl,
1698 ImGuiKey_ModCtrl = ImGuiMod_Ctrl, ImGuiKey_ModShift = ImGuiMod_Shift, ImGuiKey_ModAlt = ImGuiMod_Alt, ImGuiKey_ModSuper = ImGuiMod_Super,
1706 enum ImGuiInputFlags_
1708 ImGuiInputFlags_None = 0,
1709 ImGuiInputFlags_Repeat = 1 << 0,
1714 ImGuiInputFlags_RouteActive = 1 << 10,
1715 ImGuiInputFlags_RouteFocused = 1 << 11,
1716 ImGuiInputFlags_RouteGlobal = 1 << 12,
1717 ImGuiInputFlags_RouteAlways = 1 << 13,
1719 ImGuiInputFlags_RouteOverFocused = 1 << 14,
1720 ImGuiInputFlags_RouteOverActive = 1 << 15,
1721 ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16,
1722 ImGuiInputFlags_RouteFromRootWindow = 1 << 17,
1725 ImGuiInputFlags_Tooltip = 1 << 18,
1729 enum ImGuiConfigFlags_
1731 ImGuiConfigFlags_None = 0,
1732 ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
1733 ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
1734 ImGuiConfigFlags_NoMouse = 1 << 4,
1735 ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
1736 ImGuiConfigFlags_NoKeyboard = 1 << 6,
1739 ImGuiConfigFlags_DockingEnable = 1 << 7,
1743 ImGuiConfigFlags_ViewportsEnable = 1 << 10,
1746 ImGuiConfigFlags_IsSRGB = 1 << 20,
1747 ImGuiConfigFlags_IsTouchScreen = 1 << 21,
1749 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1750 ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
1751 ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3,
1752 ImGuiConfigFlags_DpiEnableScaleFonts = 1 << 14,
1753 ImGuiConfigFlags_DpiEnableScaleViewports= 1 << 15,
1758 enum ImGuiBackendFlags_
1760 ImGuiBackendFlags_None = 0,
1761 ImGuiBackendFlags_HasGamepad = 1 << 0,
1762 ImGuiBackendFlags_HasMouseCursors = 1 << 1,
1763 ImGuiBackendFlags_HasSetMousePos = 1 << 2,
1764 ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3,
1765 ImGuiBackendFlags_RendererHasTextures = 1 << 4,
1768 ImGuiBackendFlags_PlatformHasViewports = 1 << 10,
1769 ImGuiBackendFlags_HasMouseHoveredViewport=1 << 11,
1770 ImGuiBackendFlags_RendererHasViewports = 1 << 12,
1777 ImGuiCol_TextDisabled,
1782 ImGuiCol_BorderShadow,
1784 ImGuiCol_FrameBgHovered,
1785 ImGuiCol_FrameBgActive,
1787 ImGuiCol_TitleBgActive,
1788 ImGuiCol_TitleBgCollapsed,
1790 ImGuiCol_ScrollbarBg,
1791 ImGuiCol_ScrollbarGrab,
1792 ImGuiCol_ScrollbarGrabHovered,
1793 ImGuiCol_ScrollbarGrabActive,
1795 ImGuiCol_SliderGrab,
1796 ImGuiCol_SliderGrabActive,
1798 ImGuiCol_ButtonHovered,
1799 ImGuiCol_ButtonActive,
1801 ImGuiCol_HeaderHovered,
1802 ImGuiCol_HeaderActive,
1804 ImGuiCol_SeparatorHovered,
1805 ImGuiCol_SeparatorActive,
1806 ImGuiCol_ResizeGrip,
1807 ImGuiCol_ResizeGripHovered,
1808 ImGuiCol_ResizeGripActive,
1809 ImGuiCol_InputTextCursor,
1810 ImGuiCol_TabHovered,
1812 ImGuiCol_TabSelected,
1813 ImGuiCol_TabSelectedOverline,
1815 ImGuiCol_TabDimmedSelected,
1816 ImGuiCol_TabDimmedSelectedOverline,
1817 ImGuiCol_DockingPreview,
1818 ImGuiCol_DockingEmptyBg,
1820 ImGuiCol_PlotLinesHovered,
1821 ImGuiCol_PlotHistogram,
1822 ImGuiCol_PlotHistogramHovered,
1823 ImGuiCol_TableHeaderBg,
1824 ImGuiCol_TableBorderStrong,
1825 ImGuiCol_TableBorderLight,
1826 ImGuiCol_TableRowBg,
1827 ImGuiCol_TableRowBgAlt,
1829 ImGuiCol_TextSelectedBg,
1831 ImGuiCol_DragDropTarget,
1833 ImGuiCol_NavWindowingHighlight,
1834 ImGuiCol_NavWindowingDimBg,
1835 ImGuiCol_ModalWindowDimBg,
1838 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1839 ImGuiCol_TabActive = ImGuiCol_TabSelected,
1840 ImGuiCol_TabUnfocused = ImGuiCol_TabDimmed,
1841 ImGuiCol_TabUnfocusedActive = ImGuiCol_TabDimmedSelected,
1842 ImGuiCol_NavHighlight = ImGuiCol_NavCursor,
1857 ImGuiStyleVar_Alpha,
1858 ImGuiStyleVar_DisabledAlpha,
1859 ImGuiStyleVar_WindowPadding,
1860 ImGuiStyleVar_WindowRounding,
1861 ImGuiStyleVar_WindowBorderSize,
1862 ImGuiStyleVar_WindowMinSize,
1863 ImGuiStyleVar_WindowTitleAlign,
1864 ImGuiStyleVar_ChildRounding,
1865 ImGuiStyleVar_ChildBorderSize,
1866 ImGuiStyleVar_PopupRounding,
1867 ImGuiStyleVar_PopupBorderSize,
1868 ImGuiStyleVar_FramePadding,
1869 ImGuiStyleVar_FrameRounding,
1870 ImGuiStyleVar_FrameBorderSize,
1871 ImGuiStyleVar_ItemSpacing,
1872 ImGuiStyleVar_ItemInnerSpacing,
1873 ImGuiStyleVar_IndentSpacing,
1874 ImGuiStyleVar_CellPadding,
1875 ImGuiStyleVar_ScrollbarSize,
1876 ImGuiStyleVar_ScrollbarRounding,
1877 ImGuiStyleVar_GrabMinSize,
1878 ImGuiStyleVar_GrabRounding,
1879 ImGuiStyleVar_ImageBorderSize,
1880 ImGuiStyleVar_TabRounding,
1881 ImGuiStyleVar_TabBorderSize,
1882 ImGuiStyleVar_TabBarBorderSize,
1883 ImGuiStyleVar_TabBarOverlineSize,
1884 ImGuiStyleVar_TableAngledHeadersAngle,
1885 ImGuiStyleVar_TableAngledHeadersTextAlign,
1886 ImGuiStyleVar_TreeLinesSize,
1887 ImGuiStyleVar_TreeLinesRounding,
1888 ImGuiStyleVar_ButtonTextAlign,
1889 ImGuiStyleVar_SelectableTextAlign,
1890 ImGuiStyleVar_SeparatorTextBorderSize,
1891 ImGuiStyleVar_SeparatorTextAlign,
1892 ImGuiStyleVar_SeparatorTextPadding,
1893 ImGuiStyleVar_DockingSeparatorSize,
1898 enum ImGuiButtonFlags_
1900 ImGuiButtonFlags_None = 0,
1901 ImGuiButtonFlags_MouseButtonLeft = 1 << 0,
1902 ImGuiButtonFlags_MouseButtonRight = 1 << 1,
1903 ImGuiButtonFlags_MouseButtonMiddle = 1 << 2,
1904 ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
1905 ImGuiButtonFlags_EnableNav = 1 << 3,
1909 enum ImGuiColorEditFlags_
1911 ImGuiColorEditFlags_None = 0,
1912 ImGuiColorEditFlags_NoAlpha = 1 << 1,
1913 ImGuiColorEditFlags_NoPicker = 1 << 2,
1914 ImGuiColorEditFlags_NoOptions = 1 << 3,
1915 ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
1916 ImGuiColorEditFlags_NoInputs = 1 << 5,
1917 ImGuiColorEditFlags_NoTooltip = 1 << 6,
1918 ImGuiColorEditFlags_NoLabel = 1 << 7,
1919 ImGuiColorEditFlags_NoSidePreview = 1 << 8,
1920 ImGuiColorEditFlags_NoDragDrop = 1 << 9,
1921 ImGuiColorEditFlags_NoBorder = 1 << 10,
1927 ImGuiColorEditFlags_AlphaOpaque = 1 << 11,
1928 ImGuiColorEditFlags_AlphaNoBg = 1 << 12,
1929 ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 13,
1932 ImGuiColorEditFlags_AlphaBar = 1 << 16,
1933 ImGuiColorEditFlags_HDR = 1 << 19,
1934 ImGuiColorEditFlags_DisplayRGB = 1 << 20,
1935 ImGuiColorEditFlags_DisplayHSV = 1 << 21,
1936 ImGuiColorEditFlags_DisplayHex = 1 << 22,
1937 ImGuiColorEditFlags_Uint8 = 1 << 23,
1938 ImGuiColorEditFlags_Float = 1 << 24,
1939 ImGuiColorEditFlags_PickerHueBar = 1 << 25,
1940 ImGuiColorEditFlags_PickerHueWheel = 1 << 26,
1941 ImGuiColorEditFlags_InputRGB = 1 << 27,
1942 ImGuiColorEditFlags_InputHSV = 1 << 28,
1946 ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
1949 ImGuiColorEditFlags_AlphaMask_ = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaOpaque | ImGuiColorEditFlags_AlphaNoBg | ImGuiColorEditFlags_AlphaPreviewHalf,
1950 ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
1951 ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
1952 ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
1953 ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV,
1956 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1957 ImGuiColorEditFlags_AlphaPreview = 0,
1965 enum ImGuiSliderFlags_
1967 ImGuiSliderFlags_None = 0,
1968 ImGuiSliderFlags_Logarithmic = 1 << 5,
1969 ImGuiSliderFlags_NoRoundToFormat = 1 << 6,
1970 ImGuiSliderFlags_NoInput = 1 << 7,
1971 ImGuiSliderFlags_WrapAround = 1 << 8,
1972 ImGuiSliderFlags_ClampOnInput = 1 << 9,
1973 ImGuiSliderFlags_ClampZeroRange = 1 << 10,
1974 ImGuiSliderFlags_NoSpeedTweaks = 1 << 11,
1975 ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange,
1976 ImGuiSliderFlags_InvalidMask_ = 0x7000000F,
1981 enum ImGuiMouseButton_
1983 ImGuiMouseButton_Left = 0,
1984 ImGuiMouseButton_Right = 1,
1985 ImGuiMouseButton_Middle = 2,
1986 ImGuiMouseButton_COUNT = 5
1991 enum ImGuiMouseCursor_
1993 ImGuiMouseCursor_None = -1,
1994 ImGuiMouseCursor_Arrow = 0,
1995 ImGuiMouseCursor_TextInput,
1996 ImGuiMouseCursor_ResizeAll,
1997 ImGuiMouseCursor_ResizeNS,
1998 ImGuiMouseCursor_ResizeEW,
1999 ImGuiMouseCursor_ResizeNESW,
2000 ImGuiMouseCursor_ResizeNWSE,
2001 ImGuiMouseCursor_Hand,
2002 ImGuiMouseCursor_Wait,
2003 ImGuiMouseCursor_Progress,
2004 ImGuiMouseCursor_NotAllowed,
2005 ImGuiMouseCursor_COUNT
2012 enum ImGuiMouseSource :
int 2014 ImGuiMouseSource_Mouse = 0,
2015 ImGuiMouseSource_TouchScreen,
2016 ImGuiMouseSource_Pen,
2017 ImGuiMouseSource_COUNT
2026 ImGuiCond_Always = 1 << 0,
2027 ImGuiCond_Once = 1 << 1,
2028 ImGuiCond_FirstUseEver = 1 << 2,
2029 ImGuiCond_Appearing = 1 << 3,
2058 enum ImGuiTableFlags_
2061 ImGuiTableFlags_None = 0,
2062 ImGuiTableFlags_Resizable = 1 << 0,
2063 ImGuiTableFlags_Reorderable = 1 << 1,
2064 ImGuiTableFlags_Hideable = 1 << 2,
2065 ImGuiTableFlags_Sortable = 1 << 3,
2066 ImGuiTableFlags_NoSavedSettings = 1 << 4,
2067 ImGuiTableFlags_ContextMenuInBody = 1 << 5,
2069 ImGuiTableFlags_RowBg = 1 << 6,
2070 ImGuiTableFlags_BordersInnerH = 1 << 7,
2071 ImGuiTableFlags_BordersOuterH = 1 << 8,
2072 ImGuiTableFlags_BordersInnerV = 1 << 9,
2073 ImGuiTableFlags_BordersOuterV = 1 << 10,
2074 ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
2075 ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
2076 ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
2077 ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
2078 ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
2079 ImGuiTableFlags_NoBordersInBody = 1 << 11,
2080 ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
2082 ImGuiTableFlags_SizingFixedFit = 1 << 13,
2083 ImGuiTableFlags_SizingFixedSame = 2 << 13,
2084 ImGuiTableFlags_SizingStretchProp = 3 << 13,
2085 ImGuiTableFlags_SizingStretchSame = 4 << 13,
2087 ImGuiTableFlags_NoHostExtendX = 1 << 16,
2088 ImGuiTableFlags_NoHostExtendY = 1 << 17,
2089 ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
2090 ImGuiTableFlags_PreciseWidths = 1 << 19,
2092 ImGuiTableFlags_NoClip = 1 << 20,
2094 ImGuiTableFlags_PadOuterX = 1 << 21,
2095 ImGuiTableFlags_NoPadOuterX = 1 << 22,
2096 ImGuiTableFlags_NoPadInnerX = 1 << 23,
2098 ImGuiTableFlags_ScrollX = 1 << 24,
2099 ImGuiTableFlags_ScrollY = 1 << 25,
2101 ImGuiTableFlags_SortMulti = 1 << 26,
2102 ImGuiTableFlags_SortTristate = 1 << 27,
2104 ImGuiTableFlags_HighlightHoveredColumn = 1 << 28,
2107 ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame,
2111 enum ImGuiTableColumnFlags_
2114 ImGuiTableColumnFlags_None = 0,
2115 ImGuiTableColumnFlags_Disabled = 1 << 0,
2116 ImGuiTableColumnFlags_DefaultHide = 1 << 1,
2117 ImGuiTableColumnFlags_DefaultSort = 1 << 2,
2118 ImGuiTableColumnFlags_WidthStretch = 1 << 3,
2119 ImGuiTableColumnFlags_WidthFixed = 1 << 4,
2120 ImGuiTableColumnFlags_NoResize = 1 << 5,
2121 ImGuiTableColumnFlags_NoReorder = 1 << 6,
2122 ImGuiTableColumnFlags_NoHide = 1 << 7,
2123 ImGuiTableColumnFlags_NoClip = 1 << 8,
2124 ImGuiTableColumnFlags_NoSort = 1 << 9,
2125 ImGuiTableColumnFlags_NoSortAscending = 1 << 10,
2126 ImGuiTableColumnFlags_NoSortDescending = 1 << 11,
2127 ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12,
2128 ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13,
2129 ImGuiTableColumnFlags_PreferSortAscending = 1 << 14,
2130 ImGuiTableColumnFlags_PreferSortDescending = 1 << 15,
2131 ImGuiTableColumnFlags_IndentEnable = 1 << 16,
2132 ImGuiTableColumnFlags_IndentDisable = 1 << 17,
2133 ImGuiTableColumnFlags_AngledHeader = 1 << 18,
2136 ImGuiTableColumnFlags_IsEnabled = 1 << 24,
2137 ImGuiTableColumnFlags_IsVisible = 1 << 25,
2138 ImGuiTableColumnFlags_IsSorted = 1 << 26,
2139 ImGuiTableColumnFlags_IsHovered = 1 << 27,
2142 ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
2143 ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
2144 ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
2145 ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30,
2149 enum ImGuiTableRowFlags_
2151 ImGuiTableRowFlags_None = 0,
2152 ImGuiTableRowFlags_Headers = 1 << 0,
2164 enum ImGuiTableBgTarget_
2166 ImGuiTableBgTarget_None = 0,
2167 ImGuiTableBgTarget_RowBg0 = 1,
2168 ImGuiTableBgTarget_RowBg1 = 2,
2169 ImGuiTableBgTarget_CellBg = 3,
2188 ImGuiID ColumnUserID;
2191 ImGuiSortDirection SortDirection;
2204 #ifndef IMGUI_DISABLE_DEBUG_TOOLS 2205 #define IMGUI_DEBUG_LOG(...) ImGui::DebugLog(__VA_ARGS__) 2207 #define IMGUI_DEBUG_LOG(...) ((void)0) 2217 inline void*
operator new(size_t,
ImNewWrapper,
void* ptr) {
return ptr; }
2218 inline void operator delete(
void*,
ImNewWrapper,
void*) {}
2219 #define IM_ALLOC(_SIZE) ImGui::MemAlloc(_SIZE) 2220 #define IM_FREE(_PTR) ImGui::MemFree(_PTR) 2221 #define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR) 2222 #define IM_NEW(_TYPE) new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE 2223 template<
typename T>
void IM_DELETE(T* p) {
if (p) { p->~T(); ImGui::MemFree(p); } }
2236 IM_MSVC_RUNTIME_CHECKS_OFF
2237 template<
typename T>
2245 typedef T value_type;
2246 typedef value_type* iterator;
2247 typedef const value_type* const_iterator;
2250 inline ImVector() { Size = Capacity = 0; Data = NULL; }
2251 inline ImVector(
const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
2252 inline ImVector<T>& operator=(
const ImVector<T>& src) { clear(); resize(src.Size);
if (src.Data) memcpy(Data, src.Data, (
size_t)Size *
sizeof(T));
return *
this; }
2253 inline ~
ImVector() {
if (Data) IM_FREE(Data); }
2255 inline void clear() {
if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
2256 inline void clear_delete() {
for (
int n = 0; n < Size; n++) IM_DELETE(Data[n]); clear(); }
2257 inline void clear_destruct() {
for (
int n = 0; n < Size; n++) Data[n].~T(); clear(); }
2259 inline bool empty()
const {
return Size == 0; }
2260 inline int size()
const {
return Size; }
2261 inline int size_in_bytes()
const {
return Size * (int)
sizeof(T); }
2262 inline int max_size()
const {
return 0x7FFFFFFF / (int)
sizeof(T); }
2263 inline int capacity()
const {
return Capacity; }
2264 inline T& operator[](
int i) { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2265 inline const T& operator[](
int i)
const { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2267 inline T* begin() {
return Data; }
2268 inline const T* begin()
const {
return Data; }
2269 inline T* end() {
return Data + Size; }
2270 inline const T* end()
const {
return Data + Size; }
2271 inline T& front() { IM_ASSERT(Size > 0);
return Data[0]; }
2272 inline const T& front()
const { IM_ASSERT(Size > 0);
return Data[0]; }
2273 inline T& back() { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2274 inline const T& back()
const { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2275 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; }
2277 inline int _grow_capacity(
int sz)
const {
int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8;
return new_capacity > sz ? new_capacity : sz; }
2278 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
2279 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; }
2280 inline void shrink(
int new_size) { IM_ASSERT(new_size <= Size); Size = new_size; }
2281 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; }
2282 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; }
2285 inline void push_back(
const T& v) {
if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v,
sizeof(v)); Size++; }
2286 inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
2287 inline void push_front(
const T& v) {
if (Size == 0) push_back(v);
else insert(Data, v); }
2288 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; }
2289 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; }
2290 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; }
2291 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; }
2292 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; }
2293 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; }
2294 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; }
2295 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; }
2296 inline bool find_erase(
const T& v) {
const T* it =
find(v);
if (it < Data + Size) { erase(it);
return true; }
return false; }
2297 inline bool find_erase_unsorted(
const T& v) {
const T* it =
find(v);
if (it < Data + Size) { erase_unsorted(it);
return true; }
return false; }
2298 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; }
2300 IM_MSVC_RUNTIME_CHECKS_RESTORE
2315 float FontScaleMain;
2319 float DisabledAlpha;
2321 float WindowRounding;
2322 float WindowBorderSize;
2323 float WindowBorderHoverPadding;
2326 ImGuiDir WindowMenuButtonPosition;
2327 float ChildRounding;
2328 float ChildBorderSize;
2329 float PopupRounding;
2330 float PopupBorderSize;
2332 float FrameRounding;
2333 float FrameBorderSize;
2337 ImVec2 TouchExtraPadding;
2338 float IndentSpacing;
2339 float ColumnsMinSpacing;
2340 float ScrollbarSize;
2341 float ScrollbarRounding;
2344 float LogSliderDeadzone;
2345 float ImageBorderSize;
2347 float TabBorderSize;
2348 float TabCloseButtonMinWidthSelected;
2349 float TabCloseButtonMinWidthUnselected;
2350 float TabBarBorderSize;
2351 float TabBarOverlineSize;
2352 float TableAngledHeadersAngle;
2353 ImVec2 TableAngledHeadersTextAlign;
2354 ImGuiTreeNodeFlags TreeLinesFlags;
2355 float TreeLinesSize;
2356 float TreeLinesRounding;
2357 ImGuiDir ColorButtonPosition;
2359 ImVec2 SelectableTextAlign;
2360 float SeparatorTextBorderSize;
2361 ImVec2 SeparatorTextAlign;
2362 ImVec2 SeparatorTextPadding;
2363 ImVec2 DisplayWindowPadding;
2364 ImVec2 DisplaySafeAreaPadding;
2365 float DockingSeparatorSize;
2366 float MouseCursorScale;
2367 bool AntiAliasedLines;
2368 bool AntiAliasedLinesUseTex;
2369 bool AntiAliasedFill;
2370 float CurveTessellationTol;
2371 float CircleTessellationMaxError;
2374 ImVec4 Colors[ImGuiCol_COUNT];
2378 float HoverStationaryDelay;
2379 float HoverDelayShort;
2380 float HoverDelayNormal;
2381 ImGuiHoveredFlags HoverFlagsForTooltipMouse;
2382 ImGuiHoveredFlags HoverFlagsForTooltipNav;
2386 float _NextFrameFontSizeBase;
2390 IMGUI_API
void ScaleAllSizes(
float scale_factor);
2393 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2416 float DownDurationPrev;
2426 ImGuiConfigFlags ConfigFlags;
2427 ImGuiBackendFlags BackendFlags;
2429 ImVec2 DisplayFramebufferScale;
2431 float IniSavingRate;
2432 const char* IniFilename;
2433 const char* LogFilename;
2439 bool FontAllowUserScaling;
2442 bool ConfigNavSwapGamepadButtons;
2443 bool ConfigNavMoveSetMousePos;
2444 bool ConfigNavCaptureKeyboard;
2445 bool ConfigNavEscapeClearFocusItem;
2446 bool ConfigNavEscapeClearFocusWindow;
2447 bool ConfigNavCursorVisibleAuto;
2448 bool ConfigNavCursorVisibleAlways;
2451 bool ConfigDockingNoSplit;
2452 bool ConfigDockingWithShift;
2453 bool ConfigDockingAlwaysTabBar;
2454 bool ConfigDockingTransparentPayload;
2457 bool ConfigViewportsNoAutoMerge;
2458 bool ConfigViewportsNoTaskBarIcon;
2459 bool ConfigViewportsNoDecoration;
2460 bool ConfigViewportsNoDefaultParent;
2464 bool ConfigDpiScaleFonts;
2465 bool ConfigDpiScaleViewports;
2469 bool MouseDrawCursor;
2470 bool ConfigMacOSXBehaviors;
2471 bool ConfigInputTrickleEventQueue;
2472 bool ConfigInputTextCursorBlink;
2473 bool ConfigInputTextEnterKeepActive;
2474 bool ConfigDragClickToInputText;
2475 bool ConfigWindowsResizeFromEdges;
2476 bool ConfigWindowsMoveFromTitleBarOnly;
2477 bool ConfigWindowsCopyContentsWithCtrlC;
2478 bool ConfigScrollbarScrollByPage;
2479 float ConfigMemoryCompactTimer;
2483 float MouseDoubleClickTime;
2484 float MouseDoubleClickMaxDist;
2485 float MouseDragThreshold;
2486 float KeyRepeatDelay;
2487 float KeyRepeatRate;
2507 bool ConfigErrorRecovery;
2508 bool ConfigErrorRecoveryEnableAssert;
2509 bool ConfigErrorRecoveryEnableDebugLog;
2510 bool ConfigErrorRecoveryEnableTooltip;
2516 bool ConfigDebugIsDebuggerPresent;
2522 bool ConfigDebugHighlightIdConflicts;
2523 bool ConfigDebugHighlightIdConflictsShowItemPicker;
2529 bool ConfigDebugBeginReturnValueOnce;
2530 bool ConfigDebugBeginReturnValueLoop;
2535 bool ConfigDebugIgnoreFocusLoss;
2538 bool ConfigDebugIniSettings;
2547 const char* BackendPlatformName;
2548 const char* BackendRendererName;
2549 void* BackendPlatformUserData;
2550 void* BackendRendererUserData;
2551 void* BackendLanguageUserData;
2558 IMGUI_API
void AddKeyEvent(ImGuiKey key,
bool down);
2559 IMGUI_API
void AddKeyAnalogEvent(ImGuiKey key,
bool down,
float v);
2560 IMGUI_API
void AddMousePosEvent(
float x,
float y);
2561 IMGUI_API
void AddMouseButtonEvent(
int button,
bool down);
2562 IMGUI_API
void AddMouseWheelEvent(
float wheel_x,
float wheel_y);
2563 IMGUI_API
void AddMouseSourceEvent(ImGuiMouseSource source);
2564 IMGUI_API
void AddMouseViewportEvent(ImGuiID
id);
2565 IMGUI_API
void AddFocusEvent(
bool focused);
2566 IMGUI_API
void AddInputCharacter(
unsigned int c);
2567 IMGUI_API
void AddInputCharacterUTF16(ImWchar16 c);
2568 IMGUI_API
void AddInputCharactersUTF8(
const char* str);
2570 IMGUI_API
void SetKeyEventNativeData(ImGuiKey key,
int native_keycode,
int native_scancode,
int native_legacy_index = -1);
2571 IMGUI_API
void SetAppAcceptingEvents(
bool accepting_events);
2572 IMGUI_API
void ClearEventsQueue();
2573 IMGUI_API
void ClearInputKeys();
2574 IMGUI_API
void ClearInputMouse();
2575 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2576 IMGUI_API
void ClearInputCharacters();
2585 bool WantCaptureMouse;
2586 bool WantCaptureKeyboard;
2588 bool WantSetMousePos;
2589 bool WantSaveIniSettings;
2593 int MetricsRenderVertices;
2594 int MetricsRenderIndices;
2595 int MetricsRenderWindows;
2596 int MetricsActiveWindows;
2612 ImGuiMouseSource MouseSource;
2613 ImGuiID MouseHoveredViewport;
2620 ImGuiKeyChord KeyMods;
2622 bool WantCaptureMouseUnlessPopupClose;
2624 ImVec2 MouseClickedPos[5];
2625 double MouseClickedTime[5];
2626 bool MouseClicked[5];
2627 bool MouseDoubleClicked[5];
2628 ImU16 MouseClickedCount[5];
2629 ImU16 MouseClickedLastCount[5];
2630 bool MouseReleased[5];
2631 double MouseReleasedTime[5];
2632 bool MouseDownOwned[5];
2633 bool MouseDownOwnedUnlessPopupClose[5];
2634 bool MouseWheelRequestAxisSwap;
2635 bool MouseCtrlLeftAsRightClick;
2636 float MouseDownDuration[5];
2637 float MouseDownDurationPrev[5];
2638 ImVec2 MouseDragMaxDistanceAbs[5];
2639 float MouseDragMaxDistanceSqr[5];
2642 bool AppAcceptingEvents;
2643 ImWchar16 InputQueueSurrogate;
2656 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2657 float FontGlobalScale;
2661 const char* (*GetClipboardTextFn)(
void* user_data);
2662 void (*SetClipboardTextFn)(
void* user_data,
const char* text);
2663 void* ClipboardUserData;
2685 ImGuiInputTextFlags EventFlag;
2686 ImGuiInputTextFlags Flags;
2707 IMGUI_API
void DeleteChars(
int pos,
int bytes_count);
2708 IMGUI_API
void InsertChars(
int pos,
const char* text,
const char* text_end = NULL);
2709 void SelectAll() { SelectionStart = 0; SelectionEnd = BufTextLen; }
2710 void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; }
2711 bool HasSelection()
const {
return SelectionStart != SelectionEnd; }
2734 ImGuiID ParentViewportId;
2735 ImGuiID FocusRouteParentWindowId;
2736 ImGuiViewportFlags ViewportFlagsOverrideSet;
2737 ImGuiViewportFlags ViewportFlagsOverrideClear;
2738 ImGuiTabItemFlags TabItemFlagsOverrideSet;
2739 ImGuiDockNodeFlags DockNodeFlagsOverrideSet;
2740 bool DockingAlwaysTabBar;
2741 bool DockingAllowUnclassed;
2743 ImGuiWindowClass() { memset(
this, 0,
sizeof(*
this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed =
true; }
2755 ImGuiID SourceParentId;
2757 char DataType[32 + 1];
2762 void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0,
sizeof(DataType)); DataFrameCount = -1; Preview = Delivery =
false; }
2763 bool IsDataType(
const char* type)
const {
return DataFrameCount != -1 && strcmp(type, DataType) == 0; }
2764 bool IsPreview()
const {
return Preview; }
2765 bool IsDelivery()
const {
return Delivery; }
2773 #define IM_UNICODE_CODEPOINT_INVALID 0xFFFD // Invalid Unicode code point (standard value). 2774 #ifdef IMGUI_USE_WCHAR32 2775 #define IM_UNICODE_CODEPOINT_MAX 0x10FFFF // Maximum Unicode code point supported by this build. 2777 #define IM_UNICODE_CODEPOINT_MAX 0xFFFF // Maximum Unicode code point supported by this build. 2785 mutable int RefFrame;
2786 operator bool()
const {
int current_frame = ImGui::GetFrameCount();
if (RefFrame == current_frame)
return false; RefFrame = current_frame;
return true; }
2793 IMGUI_API
bool Draw(
const char* label =
"Filter (inc,-exc)",
float width = 0.0f);
2794 IMGUI_API
bool PassFilter(
const char* text,
const char* text_end = NULL)
const;
2795 IMGUI_API
void Build();
2796 void Clear() { InputBuf[0] = 0; Build(); }
2797 bool IsActive()
const {
return !Filters.empty(); }
2806 ImGuiTextRange(
const char* _b,
const char* _e) { b = _b; e = _e; }
2807 bool empty()
const {
return b == e; }
2820 IMGUI_API
static char EmptyString[1];
2823 inline char operator[](
int i)
const { IM_ASSERT(Buf.Data != NULL);
return Buf.Data[i]; }
2824 const char* begin()
const {
return Buf.Data ? &Buf.front() : EmptyString; }
2825 const char* end()
const {
return Buf.Data ? &Buf.back() : EmptyString; }
2826 int size()
const {
return Buf.Size ? Buf.Size - 1 : 0; }
2827 bool empty()
const {
return Buf.Size <= 1; }
2828 void clear() { Buf.clear(); }
2829 void resize(
int size) {
if (Buf.Size > size) Buf.Data[size] = 0; Buf.resize(size ? size + 1 : 0, 0); }
2830 void reserve(
int capacity) { Buf.reserve(capacity); }
2831 const char* c_str()
const {
return Buf.Data ? Buf.Data : EmptyString; }
2832 IMGUI_API
void append(
const char* str,
const char* str_end = NULL);
2833 IMGUI_API
void appendf(
const char* fmt, ...) IM_FMTARGS(2);
2834 IMGUI_API
void appendfv(
const char* fmt, va_list args) IM_FMTLIST(2);
2841 union {
int val_i;
float val_f;
void* val_p; };
2863 void Clear() { Data.clear(); }
2864 IMGUI_API
int GetInt(ImGuiID key,
int default_val = 0)
const;
2865 IMGUI_API
void SetInt(ImGuiID key,
int val);
2866 IMGUI_API
bool GetBool(ImGuiID key,
bool default_val =
false)
const;
2867 IMGUI_API
void SetBool(ImGuiID key,
bool val);
2868 IMGUI_API
float GetFloat(ImGuiID key,
float default_val = 0.0f)
const;
2869 IMGUI_API
void SetFloat(ImGuiID key,
float val);
2870 IMGUI_API
void* GetVoidPtr(ImGuiID key)
const;
2871 IMGUI_API
void SetVoidPtr(ImGuiID key,
void* val);
2877 IMGUI_API
int* GetIntRef(ImGuiID key,
int default_val = 0);
2878 IMGUI_API
bool* GetBoolRef(ImGuiID key,
bool default_val =
false);
2879 IMGUI_API
float* GetFloatRef(ImGuiID key,
float default_val = 0.0f);
2880 IMGUI_API
void** GetVoidPtrRef(ImGuiID key,
void* default_val = NULL);
2883 IMGUI_API
void BuildSortByKey();
2885 IMGUI_API
void SetAllInt(
int val);
2887 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2920 double StartSeekOffsetY;
2926 IMGUI_API ~ImGuiListClipper();
2927 IMGUI_API
void Begin(
int items_count,
float items_height = -1.0f);
2928 IMGUI_API
void End();
2929 IMGUI_API
bool Step();
2933 inline void IncludeItemByIndex(
int item_index) { IncludeItemsByIndex(item_index, item_index + 1); }
2934 IMGUI_API
void IncludeItemsByIndex(
int item_begin,
int item_end);
2939 IMGUI_API
void SeekCursorForItem(
int item_index);
2941 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2942 inline void IncludeRangeByIndices(
int item_begin,
int item_end) { IncludeItemsByIndex(item_begin, item_end); }
2953 #ifdef IMGUI_DEFINE_MATH_OPERATORS 2954 #define IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED 2955 IM_MSVC_RUNTIME_CHECKS_OFF
2957 inline ImVec2 operator*(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x * rhs, lhs.y * rhs); }
2958 inline ImVec2 operator/(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x / rhs, lhs.y / rhs); }
2964 inline ImVec2& operator*=(
ImVec2& lhs,
const float rhs) { lhs.x *= rhs; lhs.y *= rhs;
return lhs; }
2965 inline ImVec2& operator/=(
ImVec2& lhs,
const float rhs) { lhs.x /= rhs; lhs.y /= rhs;
return lhs; }
2966 inline ImVec2& operator+=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y;
return lhs; }
2967 inline ImVec2& operator-=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y;
return lhs; }
2968 inline ImVec2& operator*=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x *= rhs.x; lhs.y *= rhs.y;
return lhs; }
2969 inline ImVec2& operator/=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x /= rhs.x; lhs.y /= rhs.y;
return lhs; }
2970 inline bool operator==(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x == rhs.x && lhs.y == rhs.y; }
2971 inline bool operator!=(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x != rhs.x || lhs.y != rhs.y; }
2973 inline ImVec4 operator*(
const ImVec4& lhs,
const float rhs) {
return ImVec4(lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); }
2974 inline ImVec4 operator/(
const ImVec4& lhs,
const float rhs) {
return ImVec4(lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); }
2975 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); }
2976 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); }
2977 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); }
2978 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); }
2979 inline ImVec4 operator-(
const ImVec4& lhs) {
return ImVec4(-lhs.x, -lhs.y, -lhs.z, -lhs.w); }
2980 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; }
2981 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; }
2982 IM_MSVC_RUNTIME_CHECKS_RESTORE
2988 #ifndef IM_COL32_R_SHIFT 2989 #ifdef IMGUI_USE_BGRA_PACKED_COLOR 2990 #define IM_COL32_R_SHIFT 16 2991 #define IM_COL32_G_SHIFT 8 2992 #define IM_COL32_B_SHIFT 0 2993 #define IM_COL32_A_SHIFT 24 2994 #define IM_COL32_A_MASK 0xFF000000 2996 #define IM_COL32_R_SHIFT 0 2997 #define IM_COL32_G_SHIFT 8 2998 #define IM_COL32_B_SHIFT 16 2999 #define IM_COL32_A_SHIFT 24 3000 #define IM_COL32_A_MASK 0xFF000000 3003 #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)) 3004 #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF 3005 #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black 3006 #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000 3017 constexpr
ImColor(
float r,
float g,
float b,
float a = 1.0f) : Value(r, g, b, a) { }
3018 constexpr ImColor(
const ImVec4& col) : Value(col) {}
3019 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)) {}
3020 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)) {}
3021 inline operator ImU32()
const {
return ImGui::ColorConvertFloat4ToU32(Value); }
3022 inline operator ImVec4()
const {
return Value; }
3025 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; }
3026 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); }
3070 enum ImGuiMultiSelectFlags_
3072 ImGuiMultiSelectFlags_None = 0,
3073 ImGuiMultiSelectFlags_SingleSelect = 1 << 0,
3074 ImGuiMultiSelectFlags_NoSelectAll = 1 << 1,
3075 ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2,
3076 ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3,
3077 ImGuiMultiSelectFlags_NoAutoClear = 1 << 4,
3078 ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5,
3079 ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6,
3080 ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7,
3081 ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8,
3082 ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9,
3083 ImGuiMultiSelectFlags_ClearOnClickVoid = 1 << 10,
3084 ImGuiMultiSelectFlags_ScopeWindow = 1 << 11,
3085 ImGuiMultiSelectFlags_ScopeRect = 1 << 12,
3086 ImGuiMultiSelectFlags_SelectOnClick = 1 << 13,
3087 ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14,
3089 ImGuiMultiSelectFlags_NavWrapX = 1 << 16,
3101 ImGuiSelectionUserData RangeSrcItem;
3102 ImGuiSelectionUserData NavIdItem;
3109 enum ImGuiSelectionRequestType
3111 ImGuiSelectionRequestType_None = 0,
3112 ImGuiSelectionRequestType_SetAll,
3113 ImGuiSelectionRequestType_SetRange,
3120 ImGuiSelectionRequestType
Type;
3122 ImS8 RangeDirection;
3123 ImGuiSelectionUserData RangeFirstItem;
3124 ImGuiSelectionUserData RangeLastItem;
3150 int _SelectionOrder;
3156 IMGUI_API
bool Contains(ImGuiID
id)
const;
3157 IMGUI_API
void Clear();
3158 IMGUI_API
void Swap(ImGuiSelectionBasicStorage& r);
3159 IMGUI_API
void SetItemSelected(ImGuiID
id,
bool selected);
3160 IMGUI_API
bool GetNextSelectedItem(
void** opaque_it, ImGuiID* out_id);
3161 inline ImGuiID GetStorageIdFromIndex(
int idx) {
return AdapterIndexToStorageId(
this, idx); }
3183 #ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX 3184 #define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32) 3191 typedef unsigned short ImDrawIdx;
3201 #ifndef ImDrawCallback 3209 #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8) 3220 unsigned int VtxOffset;
3221 unsigned int IdxOffset;
3222 unsigned int ElemCount;
3223 ImDrawCallback UserCallback;
3224 void* UserCallbackData;
3225 int UserCallbackDataSize;
3226 int UserCallbackDataOffset;
3228 ImDrawCmd() { memset(
this, 0,
sizeof(*
this)); }
3232 inline ImTextureID GetTexID()
const;
3236 #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT 3248 IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
3256 unsigned int VtxOffset;
3276 inline void Clear() { _Current = 0; _Count = 1; }
3277 IMGUI_API
void ClearFreeMemory();
3278 IMGUI_API
void Split(
ImDrawList* draw_list,
int count);
3280 IMGUI_API
void SetCurrentChannel(
ImDrawList* draw_list,
int channel_idx);
3287 ImDrawFlags_None = 0,
3288 ImDrawFlags_Closed = 1 << 0,
3289 ImDrawFlags_RoundCornersTopLeft = 1 << 4,
3290 ImDrawFlags_RoundCornersTopRight = 1 << 5,
3291 ImDrawFlags_RoundCornersBottomLeft = 1 << 6,
3292 ImDrawFlags_RoundCornersBottomRight = 1 << 7,
3293 ImDrawFlags_RoundCornersNone = 1 << 8,
3294 ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight,
3295 ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
3296 ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft,
3297 ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight,
3298 ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
3299 ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll,
3300 ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone,
3305 enum ImDrawListFlags_
3307 ImDrawListFlags_None = 0,
3308 ImDrawListFlags_AntiAliasedLines = 1 << 0,
3309 ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1,
3310 ImDrawListFlags_AntiAliasedFill = 1 << 2,
3311 ImDrawListFlags_AllowVtxOffset = 1 << 3,
3329 ImDrawListFlags Flags;
3332 unsigned int _VtxCurrentIdx;
3335 ImDrawIdx* _IdxWritePtr;
3343 const char* _OwnerName;
3348 IMGUI_API ~ImDrawList();
3350 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect =
false);
3351 IMGUI_API
void PushClipRectFullScreen();
3352 IMGUI_API
void PopClipRect();
3354 IMGUI_API
void PopTexture();
3355 inline ImVec2 GetClipRectMin()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.x, cr.y); }
3356 inline ImVec2 GetClipRectMax()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.z, cr.w); }
3365 IMGUI_API
void AddLine(
const ImVec2& p1,
const ImVec2& p2, ImU32 col,
float thickness = 1.0f);
3366 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);
3367 IMGUI_API
void AddRectFilled(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col,
float rounding = 0.0f, ImDrawFlags flags = 0);
3368 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);
3369 IMGUI_API
void AddQuad(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness = 1.0f);
3371 IMGUI_API
void AddTriangle(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness = 1.0f);
3372 IMGUI_API
void AddTriangleFilled(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col);
3373 IMGUI_API
void AddCircle(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0,
float thickness = 1.0f);
3374 IMGUI_API
void AddCircleFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0);
3375 IMGUI_API
void AddNgon(
const ImVec2& center,
float radius, ImU32 col,
int num_segments,
float thickness = 1.0f);
3376 IMGUI_API
void AddNgonFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments);
3377 IMGUI_API
void AddEllipse(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0,
float thickness = 1.0f);
3378 IMGUI_API
void AddEllipseFilled(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0);
3379 IMGUI_API
void AddText(
const ImVec2& pos, ImU32 col,
const char* text_begin,
const char* text_end = NULL);
3380 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);
3381 IMGUI_API
void AddBezierCubic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness,
int num_segments = 0);
3382 IMGUI_API
void AddBezierQuadratic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness,
int num_segments = 0);
3387 IMGUI_API
void AddPolyline(
const ImVec2* points,
int num_points, ImU32 col, ImDrawFlags flags,
float thickness);
3388 IMGUI_API
void AddConvexPolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
3389 IMGUI_API
void AddConcavePolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
3396 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);
3397 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);
3402 inline void PathClear() { _Path.Size = 0; }
3403 inline void PathLineTo(
const ImVec2& pos) { _Path.push_back(pos); }
3404 inline void PathLineToMergeDuplicate(
const ImVec2& pos) {
if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); }
3405 inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
3406 inline void PathFillConcave(ImU32 col) { AddConcavePolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
3407 inline void PathStroke(ImU32 col, ImDrawFlags flags = 0,
float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, flags, thickness); _Path.Size = 0; }
3408 IMGUI_API
void PathArcTo(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments = 0);
3409 IMGUI_API
void PathArcToFast(
const ImVec2& center,
float radius,
int a_min_of_12,
int a_max_of_12);
3410 IMGUI_API
void PathEllipticalArcTo(
const ImVec2& center,
const ImVec2& radius,
float rot,
float a_min,
float a_max,
int num_segments = 0);
3411 IMGUI_API
void PathBezierCubicCurveTo(
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
int num_segments = 0);
3412 IMGUI_API
void PathBezierQuadraticCurveTo(
const ImVec2& p2,
const ImVec2& p3,
int num_segments = 0);
3413 IMGUI_API
void PathRect(
const ImVec2& rect_min,
const ImVec2& rect_max,
float rounding = 0.0f, ImDrawFlags flags = 0);
3424 IMGUI_API
void AddCallback(ImDrawCallback callback,
void* userdata,
size_t userdata_size = 0);
3427 IMGUI_API
void AddDrawCmd();
3428 IMGUI_API ImDrawList* CloneOutput()
const;
3436 inline void ChannelsSplit(
int count) { _Splitter.Split(
this, count); }
3437 inline void ChannelsMerge() { _Splitter.Merge(
this); }
3438 inline void ChannelsSetCurrent(
int n) { _Splitter.SetCurrentChannel(
this, n); }
3443 IMGUI_API
void PrimReserve(
int idx_count,
int vtx_count);
3444 IMGUI_API
void PrimUnreserve(
int idx_count,
int vtx_count);
3445 IMGUI_API
void PrimRect(
const ImVec2& a,
const ImVec2& b, ImU32 col);
3448 inline void PrimWriteVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
3449 inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
3450 inline void PrimVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
3453 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3454 IMGUI_API
void PushTextureID(
ImTextureRef tex_ref) { PushTexture(tex_ref); }
3455 IMGUI_API
void PopTextureID() { PopTexture(); }
3465 IMGUI_API
void _ResetForNewFrame();
3466 IMGUI_API
void _ClearFreeMemory();
3467 IMGUI_API
void _PopUnusedDrawCmd();
3468 IMGUI_API
void _TryMergeDrawCmds();
3469 IMGUI_API
void _OnChangedClipRect();
3470 IMGUI_API
void _OnChangedTexture();
3471 IMGUI_API
void _OnChangedVtxOffset();
3473 IMGUI_API
int _CalcCircleAutoSegmentCount(
float radius)
const;
3474 IMGUI_API
void _PathArcToFastEx(
const ImVec2& center,
float radius,
int a_min_sample,
int a_max_sample,
int a_step);
3475 IMGUI_API
void _PathArcToN(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments);
3496 IMGUI_API
void Clear();
3497 IMGUI_API
void AddDrawList(
ImDrawList* draw_list);
3498 IMGUI_API
void DeIndexAllBuffers();
3499 IMGUI_API
void ScaleClipRects(
const ImVec2& fb_scale);
3512 enum ImTextureFormat
3514 ImTextureFormat_RGBA32,
3515 ImTextureFormat_Alpha8,
3519 enum ImTextureStatus
3522 ImTextureStatus_Destroyed,
3523 ImTextureStatus_WantCreate,
3524 ImTextureStatus_WantUpdates,
3525 ImTextureStatus_WantDestroy,
3533 unsigned short x, y;
3534 unsigned short w, h;
3548 ImTextureStatus Status;
3549 void* BackendUserData;
3551 ImTextureFormat Format;
3555 unsigned char* Pixels;
3560 unsigned short RefCount;
3562 bool WantDestroyNextFrame;
3567 IMGUI_API
void Create(ImTextureFormat format,
int w,
int h);
3568 IMGUI_API
void DestroyPixels();
3569 void* GetPixels() { IM_ASSERT(Pixels != NULL);
return Pixels; }
3570 void* GetPixelsAt(
int x,
int y) { IM_ASSERT(Pixels != NULL);
return Pixels + (x + y * Width) * BytesPerPixel; }
3571 int GetSizeInBytes()
const {
return Width * Height * BytesPerPixel; }
3572 int GetPitch()
const {
return Width * BytesPerPixel; }
3573 ImTextureRef GetTexRef() {
ImTextureRef tex_ref; tex_ref._TexData =
this; tex_ref._TexID = ImTextureID_Invalid;
return tex_ref; }
3574 ImTextureID GetTexID()
const {
return TexID; }
3577 void SetTexID(ImTextureID tex_id) { TexID = tex_id; }
3578 void SetStatus(ImTextureStatus status) { Status = status; }
3592 bool FontDataOwnedByAtlas;
3602 const ImWchar* GlyphRanges;
3603 const ImWchar* GlyphExcludeRanges;
3606 float GlyphMinAdvanceX;
3607 float GlyphMaxAdvanceX;
3608 float GlyphExtraAdvanceX;
3609 unsigned int FontLoaderFlags;
3611 float RasterizerMultiply;
3612 float RasterizerDensity;
3613 ImWchar EllipsisChar;
3619 void* FontLoaderData;
3628 unsigned int Colored : 1;
3629 unsigned int Visible : 1;
3630 unsigned int SourceIdx : 4;
3631 unsigned int Codepoint : 26;
3633 float X0, Y0, X1, Y1;
3634 float U0, V0, U1, V1;
3637 ImFontGlyph() { memset(
this, 0,
sizeof(*
this)); PackId = -1; }
3647 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); }
3648 inline bool GetBit(
size_t n)
const {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31);
return (UsedChars[off] & mask) != 0; }
3649 inline void SetBit(
size_t n) {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; }
3650 inline void AddChar(ImWchar c) { SetBit(c); }
3651 IMGUI_API
void AddText(
const char* text,
const char* text_end = NULL);
3652 IMGUI_API
void AddRanges(
const ImWchar* ranges);
3658 typedef int ImFontAtlasRectId;
3659 #define ImFontAtlasRectId_Invalid -1 3666 unsigned short x, y;
3667 unsigned short w, h;
3674 enum ImFontAtlasFlags_
3676 ImFontAtlasFlags_None = 0,
3677 ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
3678 ImFontAtlasFlags_NoMouseCursors = 1 << 1,
3679 ImFontAtlasFlags_NoBakedLines = 1 << 2,
3704 IMGUI_API ~ImFontAtlas();
3707 IMGUI_API
ImFont* AddFontFromFileTTF(
const char* filename,
float size_pixels = 0.0f,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3708 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);
3709 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);
3710 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);
3711 IMGUI_API
void RemoveFont(
ImFont* font);
3713 IMGUI_API
void Clear();
3714 IMGUI_API
void CompactCache();
3717 IMGUI_API
void ClearInputData();
3718 IMGUI_API
void ClearFonts();
3719 IMGUI_API
void ClearTexData();
3721 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3730 IMGUI_API
bool Build();
3731 IMGUI_API
void GetTexDataAsAlpha8(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3732 IMGUI_API
void GetTexDataAsRGBA32(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3733 void SetTexID(ImTextureID
id) { IM_ASSERT(TexRef._TexID == ImTextureID_Invalid); TexRef._TexData->TexID = id; }
3734 void SetTexID(
ImTextureRef id) { IM_ASSERT(TexRef._TexID == ImTextureID_Invalid &&
id._TexData == NULL); TexRef._TexData->TexID =
id._TexID; }
3735 bool IsBuilt()
const {
return Fonts.Size > 0 && TexIsBuilt; }
3743 IMGUI_API
const ImWchar* GetGlyphRangesDefault();
3744 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3749 IMGUI_API
const ImWchar* GetGlyphRangesGreek();
3750 IMGUI_API
const ImWchar* GetGlyphRangesKorean();
3751 IMGUI_API
const ImWchar* GetGlyphRangesJapanese();
3752 IMGUI_API
const ImWchar* GetGlyphRangesChineseFull();
3753 IMGUI_API
const ImWchar* GetGlyphRangesChineseSimplifiedCommon();
3754 IMGUI_API
const ImWchar* GetGlyphRangesCyrillic();
3755 IMGUI_API
const ImWchar* GetGlyphRangesThai();
3756 IMGUI_API
const ImWchar* GetGlyphRangesVietnamese();
3780 IMGUI_API ImFontAtlasRectId AddCustomRect(
int width,
int height,
ImFontAtlasRect* out_r = NULL);
3781 IMGUI_API
void RemoveCustomRect(ImFontAtlasRectId
id);
3782 IMGUI_API
bool GetCustomRect(ImFontAtlasRectId
id,
ImFontAtlasRect* out_r)
const;
3789 ImFontAtlasFlags Flags;
3790 ImTextureFormat TexDesiredFormat;
3791 int TexGlyphPadding;
3801 #ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3811 bool RendererHasTextures;
3813 bool TexPixelsUseColors;
3818 ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1];
3819 int TexNextUniqueID;
3820 int FontNextUniqueID;
3824 const char* FontLoaderName;
3825 void* FontLoaderData;
3826 unsigned int FontLoaderFlags;
3831 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3834 inline ImFontAtlasRectId AddCustomRectRegular(
int w,
int h) {
return AddCustomRect(w, h); }
3835 inline const ImFontAtlasRect* GetCustomRectByIndex(ImFontAtlasRectId
id) {
return GetCustomRect(
id, &TempRect) ? &TempRect : NULL; }
3836 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; }
3837 IMGUI_API ImFontAtlasRectId AddCustomRectFontGlyph(
ImFont* font, ImWchar codepoint,
int w,
int h,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
3838 IMGUI_API ImFontAtlasRectId AddCustomRectFontGlyphForSize(
ImFont* font,
float font_size, ImWchar codepoint,
int w,
int h,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
3853 float FallbackAdvanceX;
3855 float RasterizerDensity;
3860 int FallbackGlyphIndex;
3863 float Ascent, Descent;
3864 unsigned int MetricsTotalSurface:26;
3865 unsigned int WantDestroy:1;
3866 unsigned int LockLoadingFallback:1;
3870 void* FontLoaderDatas;
3874 IMGUI_API
void ClearOutputData();
3876 IMGUI_API
ImFontGlyph* FindGlyphNoFallback(ImWchar c);
3877 IMGUI_API
float GetCharAdvance(ImWchar c);
3878 IMGUI_API
bool IsGlyphLoaded(ImWchar c);
3885 ImFontFlags_None = 0,
3886 ImFontFlags_NoLoadError = 1 << 1,
3887 ImFontFlags_NoLoadGlyphs = 1 << 2,
3888 ImFontFlags_LockBakedSizes = 1 << 3,
3902 float CurrentRasterizerDensity;
3909 ImWchar EllipsisChar;
3910 ImWchar FallbackChar;
3911 ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8];
3912 bool EllipsisAutoBake;
3914 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3920 IMGUI_API ~ImFont();
3921 IMGUI_API
bool IsGlyphInFont(ImWchar c);
3922 bool IsLoaded()
const {
return ContainerAtlas != NULL; }
3923 const char* GetDebugName()
const {
return Sources.Size ? Sources[0]->Name :
"<unknown>"; }
3928 IMGUI_API
ImFontBaked* GetFontBaked(
float font_size,
float density = -1.0f);
3929 IMGUI_API
ImVec2 CalcTextSizeA(
float size,
float max_width,
float wrap_width,
const char* text_begin,
const char* text_end = NULL,
const char** remaining = NULL);
3930 IMGUI_API
const char* CalcWordWrapPosition(
float size,
const char* text,
const char* text_end,
float wrap_width);
3931 IMGUI_API
void RenderChar(
ImDrawList* draw_list,
float size,
const ImVec2& pos, ImU32 col, ImWchar c,
const ImVec4* cpu_fine_clip = NULL);
3932 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,
bool cpu_fine_clip =
false);
3933 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3934 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); }
3938 IMGUI_API
void ClearOutputData();
3939 IMGUI_API
void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint);
3940 IMGUI_API
bool IsGlyphRangeUnused(
unsigned int c_begin,
unsigned int c_last);
3944 inline ImTextureID ImTextureRef::GetTexID()
const 3946 IM_ASSERT(!(_TexData != NULL && _TexID != ImTextureID_Invalid));
3947 return _TexData ? _TexData->TexID : _TexID;
3951 inline ImTextureID ImDrawCmd::GetTexID()
const 3955 ImTextureID tex_id = TexRef._TexData ? TexRef._TexData->TexID : TexRef._TexID;
3956 if (TexRef._TexData != NULL)
3957 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!");
3966 enum ImGuiViewportFlags_
3968 ImGuiViewportFlags_None = 0,
3969 ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
3970 ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
3971 ImGuiViewportFlags_OwnedByApp = 1 << 2,
3972 ImGuiViewportFlags_NoDecoration = 1 << 3,
3973 ImGuiViewportFlags_NoTaskBarIcon = 1 << 4,
3974 ImGuiViewportFlags_NoFocusOnAppearing = 1 << 5,
3975 ImGuiViewportFlags_NoFocusOnClick = 1 << 6,
3976 ImGuiViewportFlags_NoInputs = 1 << 7,
3977 ImGuiViewportFlags_NoRendererClear = 1 << 8,
3978 ImGuiViewportFlags_NoAutoMerge = 1 << 9,
3979 ImGuiViewportFlags_TopMost = 1 << 10,
3980 ImGuiViewportFlags_CanHostOtherWindows = 1 << 11,
3983 ImGuiViewportFlags_IsMinimized = 1 << 12,
3984 ImGuiViewportFlags_IsFocused = 1 << 13,
3997 ImGuiViewportFlags Flags;
4004 ImGuiID ParentViewportId;
4012 void* RendererUserData;
4013 void* PlatformUserData;
4014 void* PlatformHandle;
4015 void* PlatformHandleRaw;
4016 bool PlatformWindowCreated;
4017 bool PlatformRequestMove;
4018 bool PlatformRequestResize;
4019 bool PlatformRequestClose;
4022 ~
ImGuiViewport() { IM_ASSERT(PlatformUserData == NULL && RendererUserData == NULL); }
4025 ImVec2 GetCenter()
const {
return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
4026 ImVec2 GetWorkCenter()
const {
return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
4090 const char* (*Platform_GetClipboardTextFn)(
ImGuiContext* ctx);
4091 void (*Platform_SetClipboardTextFn)(
ImGuiContext* ctx,
const char* text);
4092 void* Platform_ClipboardUserData;
4096 bool (*Platform_OpenInShellFn)(
ImGuiContext* ctx,
const char* path);
4097 void* Platform_OpenInShellUserData;
4102 void* Platform_ImeUserData;
4107 ImWchar Platform_LocaleDecimalPoint;
4114 int Renderer_TextureMaxWidth;
4115 int Renderer_TextureMaxHeight;
4118 void* Renderer_RenderState;
4148 void (*Platform_SetWindowTitle)(
ImGuiViewport* vp,
const char* str);
4149 void (*Platform_SetWindowAlpha)(
ImGuiViewport* vp,
float alpha);
4151 void (*Platform_RenderWindow)(
ImGuiViewport* vp,
void* render_arg);
4152 void (*Platform_SwapBuffers)(
ImGuiViewport* vp,
void* render_arg);
4156 int (*Platform_CreateVkSurface)(
ImGuiViewport* vp, ImU64 vk_inst,
const void* vk_allocators, ImU64* out_vk_surface);
4162 void (*Renderer_RenderWindow)(
ImGuiViewport* vp,
void* render_arg);
4163 void (*Renderer_SwapBuffers)(
ImGuiViewport* vp,
void* render_arg);
4187 ImVec2 MainPos, MainSize;
4188 ImVec2 WorkPos, WorkSize;
4190 void* PlatformHandle;
4200 float InputLineHeight;
4212 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4216 static inline void PushFont(
ImFont* font) { PushFont(font, font ? font->LegacySize : 0.0f); }
4217 IMGUI_API
void SetWindowFontScale(
float scale);
4221 static inline void PushButtonRepeat(
bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
4222 static inline void PopButtonRepeat() { PopItemFlag(); }
4223 static inline void PushTabStop(
bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
4224 static inline void PopTabStop() { PopItemFlag(); }
4225 IMGUI_API
ImVec2 GetContentRegionMax();
4226 IMGUI_API
ImVec2 GetWindowContentRegionMin();
4227 IMGUI_API
ImVec2 GetWindowContentRegionMax();
4229 static inline bool BeginChildFrame(ImGuiID
id,
const ImVec2& size, ImGuiWindowFlags window_flags = 0) {
return BeginChild(
id, size, ImGuiChildFlags_FrameStyle, window_flags); }
4230 static inline void EndChildFrame() { EndChild(); }
4233 static inline void ShowStackToolWindow(
bool* p_open = NULL) { ShowIDStackToolWindow(p_open); }
4234 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);
4235 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);
4237 IMGUI_API
void SetItemAllowOverlap();
4347 #define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER) // OBSOLETED IN 1.90 (now using C++11 standard version) 4349 #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 4352 #ifdef IMGUI_DISABLE_METRICS_WINDOW 4353 #error IMGUI_DISABLE_METRICS_WINDOW was renamed to IMGUI_DISABLE_DEBUG_TOOLS, please use new name. 4358 #if defined(__clang__) 4359 #pragma clang diagnostic pop 4360 #elif defined(__GNUC__) 4361 #pragma GCC diagnostic pop 4365 #pragma warning (pop) 4370 #ifdef IMGUI_INCLUDE_IMGUI_USER_H 4371 #ifdef IMGUI_USER_H_FILENAME 4372 #include IMGUI_USER_H_FILENAME 4374 #include "imgui_user.h" 4378 #endif // #ifndef IMGUI_DISABLE Definition: imgui_internal.h:848
In find(In first, In last, const T &v)
Definition: algorithm.h:225
Definition: imgui_internal.h:3982
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: imgui_internal.h:4065
Definition: imgui_internal.h:2329
Definition: movie_decoder.h:32