31#define IMGUI_VERSION "1.91.6"
32#define IMGUI_VERSION_NUM 19160
33#define IMGUI_HAS_TABLE
61#ifdef IMGUI_USER_CONFIG
62#include IMGUI_USER_CONFIG
85#define IMGUI_IMPL_API IMGUI_API
91#define IM_ASSERT(_EXPR) assert(_EXPR)
93#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR))))
94#define IM_UNUSED(_VAR) ((void)(_VAR))
97#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
102#if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__)
103#define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1)))
104#define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0)))
105#elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__))
106#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
107#define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0)))
109#define IM_FMTARGS(FMT)
110#define IM_FMTLIST(FMT)
114#if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(IMGUI_DEBUG_PARANOID)
115#define IM_MSVC_RUNTIME_CHECKS_OFF __pragma(runtime_checks("",off)) __pragma(check_stack(off)) __pragma(strict_gs_check(push,off))
116#define IM_MSVC_RUNTIME_CHECKS_RESTORE __pragma(runtime_checks("",restore)) __pragma(check_stack()) __pragma(strict_gs_check(pop))
118#define IM_MSVC_RUNTIME_CHECKS_OFF
119#define IM_MSVC_RUNTIME_CHECKS_RESTORE
124#pragma warning (push)
125#pragma warning (disable: 26495)
127#if defined(__clang__)
128#pragma clang diagnostic push
129#if __has_warning("-Wunknown-warning-option")
130#pragma clang diagnostic ignored "-Wunknown-warning-option"
132#pragma clang diagnostic ignored "-Wunknown-pragmas"
133#pragma clang diagnostic ignored "-Wold-style-cast"
134#pragma clang diagnostic ignored "-Wfloat-equal"
135#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
136#pragma clang diagnostic ignored "-Wreserved-identifier"
137#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
138#pragma clang diagnostic ignored "-Wnontrivial-memaccess"
139#elif defined(__GNUC__)
140#pragma GCC diagnostic push
141#pragma GCC diagnostic ignored "-Wpragmas"
142#pragma GCC diagnostic ignored "-Wclass-memaccess"
150typedef unsigned int ImGuiID;
151typedef signed char ImS8;
152typedef unsigned char ImU8;
153typedef signed short ImS16;
154typedef unsigned short ImU16;
155typedef signed int ImS32;
156typedef unsigned int ImU32;
157typedef signed long long ImS64;
158typedef unsigned long long ImU64;
206enum ImGuiMouseSource : int;
207enum ImGuiSortDirection : ImU8;
209typedef int ImGuiCond;
210typedef int ImGuiDataType;
211typedef int ImGuiMouseButton;
212typedef int ImGuiMouseCursor;
213typedef int ImGuiStyleVar;
214typedef int ImGuiTableBgTarget;
221typedef int ImDrawFlags;
222typedef int ImDrawListFlags;
223typedef int ImFontAtlasFlags;
224typedef int ImGuiBackendFlags;
225typedef int ImGuiButtonFlags;
226typedef int ImGuiChildFlags;
227typedef int ImGuiColorEditFlags;
228typedef int ImGuiConfigFlags;
229typedef int ImGuiComboFlags;
230typedef int ImGuiDragDropFlags;
231typedef int ImGuiFocusedFlags;
232typedef int ImGuiHoveredFlags;
233typedef int ImGuiInputFlags;
234typedef int ImGuiInputTextFlags;
235typedef int ImGuiItemFlags;
236typedef int ImGuiKeyChord;
237typedef int ImGuiPopupFlags;
238typedef int ImGuiMultiSelectFlags;
239typedef int ImGuiSelectableFlags;
240typedef int ImGuiSliderFlags;
241typedef int ImGuiTabBarFlags;
242typedef int ImGuiTabItemFlags;
243typedef int ImGuiTableFlags;
244typedef int ImGuiTableColumnFlags;
245typedef int ImGuiTableRowFlags;
246typedef int ImGuiTreeNodeFlags;
247typedef int ImGuiViewportFlags;
248typedef int ImGuiWindowFlags;
256typedef ImU64 ImTextureID;
263typedef unsigned short ImDrawIdx;
268typedef unsigned int ImWchar32;
269typedef unsigned short ImWchar16;
270#ifdef IMGUI_USE_WCHAR32
271typedef ImWchar32 ImWchar;
273typedef ImWchar16 ImWchar;
279typedef ImS64 ImGuiSelectionUserData;
284typedef void* (*ImGuiMemAllocFunc)(
size_t sz,
void* user_data);
285typedef void (*ImGuiMemFreeFunc)(
void* ptr,
void* user_data);
290IM_MSVC_RUNTIME_CHECKS_OFF
294 constexpr ImVec2() : x(0.0f), y(0.0f) { }
295 constexpr ImVec2(
float _x,
float _y) : x(_x), y(_y) { }
296 float& operator[] (
size_t idx) { IM_ASSERT(idx == 0 || idx == 1);
return ((
float*)(
void*)(
char*)
this)[idx]; }
297 float operator[] (
size_t idx)
const { IM_ASSERT(idx == 0 || idx == 1);
return ((
const float*)(
const void*)(
const char*)
this)[idx]; }
298#ifdef IM_VEC2_CLASS_EXTRA
307 constexpr ImVec4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) { }
308 constexpr ImVec4(
float _x,
float _y,
float _z,
float _w) : x(_x), y(_y), z(_z), w(_w) { }
309#ifdef IM_VEC4_CLASS_EXTRA
313IM_MSVC_RUNTIME_CHECKS_RESTORE
327 IMGUI_API
void DestroyContext(
ImGuiContext* ctx = NULL);
335 IMGUI_API
void NewFrame();
336 IMGUI_API
void EndFrame();
337 IMGUI_API
void Render();
341 IMGUI_API
void ShowDemoWindow(
bool* p_open = NULL);
342 IMGUI_API
void ShowMetricsWindow(
bool* p_open = NULL);
343 IMGUI_API
void ShowDebugLogWindow(
bool* p_open = NULL);
344 IMGUI_API
void ShowIDStackToolWindow(
bool* p_open = NULL);
345 IMGUI_API
void ShowAboutWindow(
bool* p_open = NULL);
346 IMGUI_API
void ShowStyleEditor(
ImGuiStyle* ref = NULL);
347 IMGUI_API
bool ShowStyleSelector(
const char* label);
348 IMGUI_API
void ShowFontSelector(
const char* label);
349 IMGUI_API
void ShowUserGuide();
350 IMGUI_API
const char* GetVersion();
353 IMGUI_API
void StyleColorsDark(
ImGuiStyle* dst = NULL);
354 IMGUI_API
void StyleColorsLight(
ImGuiStyle* dst = NULL);
355 IMGUI_API
void StyleColorsClassic(
ImGuiStyle* dst = NULL);
369 IMGUI_API
bool Begin(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
370 IMGUI_API
void End();
390 IMGUI_API
bool BeginChild(
const char* str_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
391 IMGUI_API
bool BeginChild(ImGuiID
id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
392 IMGUI_API
void EndChild();
396 IMGUI_API
bool IsWindowAppearing();
397 IMGUI_API
bool IsWindowCollapsed();
398 IMGUI_API
bool IsWindowFocused(ImGuiFocusedFlags flags=0);
399 IMGUI_API
bool IsWindowHovered(ImGuiHoveredFlags flags=0);
401 IMGUI_API
ImVec2 GetWindowPos();
402 IMGUI_API
ImVec2 GetWindowSize();
403 IMGUI_API
float GetWindowWidth();
404 IMGUI_API
float GetWindowHeight();
408 IMGUI_API
void SetNextWindowPos(
const ImVec2& pos, ImGuiCond cond = 0,
const ImVec2& pivot =
ImVec2(0, 0));
409 IMGUI_API
void SetNextWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
410 IMGUI_API
void SetNextWindowSizeConstraints(
const ImVec2& size_min,
const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL,
void* custom_callback_data = NULL);
411 IMGUI_API
void SetNextWindowContentSize(
const ImVec2& size);
412 IMGUI_API
void SetNextWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
413 IMGUI_API
void SetNextWindowFocus();
414 IMGUI_API
void SetNextWindowScroll(
const ImVec2& scroll);
415 IMGUI_API
void SetNextWindowBgAlpha(
float alpha);
416 IMGUI_API
void SetWindowPos(
const ImVec2& pos, ImGuiCond cond = 0);
417 IMGUI_API
void SetWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
418 IMGUI_API
void SetWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
419 IMGUI_API
void SetWindowFocus();
420 IMGUI_API
void SetWindowFontScale(
float scale);
421 IMGUI_API
void SetWindowPos(
const char* name,
const ImVec2& pos, ImGuiCond cond = 0);
422 IMGUI_API
void SetWindowSize(
const char* name,
const ImVec2& size, ImGuiCond cond = 0);
423 IMGUI_API
void SetWindowCollapsed(
const char* name,
bool collapsed, ImGuiCond cond = 0);
424 IMGUI_API
void SetWindowFocus(
const char* name);
429 IMGUI_API
float GetScrollX();
430 IMGUI_API
float GetScrollY();
431 IMGUI_API
void SetScrollX(
float scroll_x);
432 IMGUI_API
void SetScrollY(
float scroll_y);
433 IMGUI_API
float GetScrollMaxX();
434 IMGUI_API
float GetScrollMaxY();
435 IMGUI_API
void SetScrollHereX(
float center_x_ratio = 0.5f);
436 IMGUI_API
void SetScrollHereY(
float center_y_ratio = 0.5f);
437 IMGUI_API
void SetScrollFromPosX(
float local_x,
float center_x_ratio = 0.5f);
438 IMGUI_API
void SetScrollFromPosY(
float local_y,
float center_y_ratio = 0.5f);
441 IMGUI_API
void PushFont(
ImFont* font);
442 IMGUI_API
void PopFont();
443 IMGUI_API
void PushStyleColor(ImGuiCol idx, ImU32 col);
444 IMGUI_API
void PushStyleColor(ImGuiCol idx,
const ImVec4& col);
445 IMGUI_API
void PopStyleColor(
int count = 1);
446 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
float val);
447 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
const ImVec2& val);
448 IMGUI_API
void PushStyleVarX(ImGuiStyleVar idx,
float val_x);
449 IMGUI_API
void PushStyleVarY(ImGuiStyleVar idx,
float val_y);
450 IMGUI_API
void PopStyleVar(
int count = 1);
451 IMGUI_API
void PushItemFlag(ImGuiItemFlags option,
bool enabled);
452 IMGUI_API
void PopItemFlag();
455 IMGUI_API
void PushItemWidth(
float item_width);
456 IMGUI_API
void PopItemWidth();
457 IMGUI_API
void SetNextItemWidth(
float item_width);
458 IMGUI_API
float CalcItemWidth();
459 IMGUI_API
void PushTextWrapPos(
float wrap_local_pos_x = 0.0f);
460 IMGUI_API
void PopTextWrapPos();
464 IMGUI_API
ImFont* GetFont();
465 IMGUI_API
float GetFontSize();
466 IMGUI_API
ImVec2 GetFontTexUvWhitePixel();
467 IMGUI_API ImU32 GetColorU32(ImGuiCol idx,
float alpha_mul = 1.0f);
468 IMGUI_API ImU32 GetColorU32(
const ImVec4& col);
469 IMGUI_API ImU32 GetColorU32(ImU32 col,
float alpha_mul = 1.0f);
470 IMGUI_API
const ImVec4& GetStyleColorVec4(ImGuiCol idx);
482 IMGUI_API
ImVec2 GetCursorScreenPos();
483 IMGUI_API
void SetCursorScreenPos(
const ImVec2& pos);
484 IMGUI_API
ImVec2 GetContentRegionAvail();
485 IMGUI_API
ImVec2 GetCursorPos();
486 IMGUI_API
float GetCursorPosX();
487 IMGUI_API
float GetCursorPosY();
488 IMGUI_API
void SetCursorPos(
const ImVec2& local_pos);
489 IMGUI_API
void SetCursorPosX(
float local_x);
490 IMGUI_API
void SetCursorPosY(
float local_y);
491 IMGUI_API
ImVec2 GetCursorStartPos();
494 IMGUI_API
void Separator();
495 IMGUI_API
void SameLine(
float offset_from_start_x=0.0f,
float spacing=-1.0f);
496 IMGUI_API
void NewLine();
497 IMGUI_API
void Spacing();
498 IMGUI_API
void Dummy(
const ImVec2& size);
499 IMGUI_API
void Indent(
float indent_w = 0.0f);
500 IMGUI_API
void Unindent(
float indent_w = 0.0f);
501 IMGUI_API
void BeginGroup();
502 IMGUI_API
void EndGroup();
503 IMGUI_API
void AlignTextToFramePadding();
504 IMGUI_API
float GetTextLineHeight();
505 IMGUI_API
float GetTextLineHeightWithSpacing();
506 IMGUI_API
float GetFrameHeight();
507 IMGUI_API
float GetFrameHeightWithSpacing();
520 IMGUI_API
void PushID(
const char* str_id);
521 IMGUI_API
void PushID(
const char* str_id_begin,
const char* str_id_end);
522 IMGUI_API
void PushID(
const void* ptr_id);
523 IMGUI_API
void PushID(
int int_id);
524 IMGUI_API
void PopID();
525 IMGUI_API ImGuiID GetID(
const char* str_id);
526 IMGUI_API ImGuiID GetID(
const char* str_id_begin,
const char* str_id_end);
527 IMGUI_API ImGuiID GetID(
const void* ptr_id);
528 IMGUI_API ImGuiID GetID(
int int_id);
531 IMGUI_API
void TextUnformatted(
const char* text,
const char* text_end = NULL);
532 IMGUI_API
void Text(
const char* fmt, ...) IM_FMTARGS(1);
533 IMGUI_API
void TextV(const
char* fmt, va_list args) IM_FMTLIST(1);
534 IMGUI_API
void TextColored(const
ImVec4& col, const
char* fmt, ...) IM_FMTARGS(2);
535 IMGUI_API
void TextColoredV(const
ImVec4& col, const
char* fmt, va_list args) IM_FMTLIST(2);
536 IMGUI_API
void TextDisabled(const
char* fmt, ...) IM_FMTARGS(1);
537 IMGUI_API
void TextDisabledV(const
char* fmt, va_list args) IM_FMTLIST(1);
538 IMGUI_API
void TextWrapped(const
char* fmt, ...) IM_FMTARGS(1);
539 IMGUI_API
void TextWrappedV(const
char* fmt, va_list args) IM_FMTLIST(1);
540 IMGUI_API
void LabelText(const
char* label, const
char* fmt, ...) IM_FMTARGS(2);
541 IMGUI_API
void LabelTextV(const
char* label, const
char* fmt, va_list args) IM_FMTLIST(2);
542 IMGUI_API
void BulletText(const
char* fmt, ...) IM_FMTARGS(1);
543 IMGUI_API
void BulletTextV(const
char* fmt, va_list args) IM_FMTLIST(1);
544 IMGUI_API
void SeparatorText(const
char* label);
549 IMGUI_API
bool Button(const
char* label, const
ImVec2& size =
ImVec2(0, 0));
550 IMGUI_API
bool SmallButton(const
char* label);
551 IMGUI_API
bool InvisibleButton(const
char* str_id, const
ImVec2& size, ImGuiButtonFlags flags = 0);
552 IMGUI_API
bool ArrowButton(const
char* str_id, ImGuiDir dir);
553 IMGUI_API
bool Checkbox(const
char* label,
bool* v);
554 IMGUI_API
bool CheckboxFlags(const
char* label,
int* flags,
int flags_value);
555 IMGUI_API
bool CheckboxFlags(const
char* label,
unsigned int* flags,
unsigned int flags_value);
556 IMGUI_API
bool RadioButton(const
char* label,
bool active);
557 IMGUI_API
bool RadioButton(const
char* label,
int* v,
int v_button);
558 IMGUI_API
void ProgressBar(
float fraction, const
ImVec2& size_arg =
ImVec2(-FLT_MIN, 0), const
char* overlay = NULL);
559 IMGUI_API
void Bullet();
560 IMGUI_API
bool TextLink(const
char* label);
561 IMGUI_API
void TextLinkOpenURL(const
char* label, const
char* url = NULL);
568 IMGUI_API
void Image(ImTextureID user_texture_id, const
ImVec2& image_size, const
ImVec2& uv0 =
ImVec2(0, 0), const
ImVec2& uv1 =
ImVec2(1, 1), const
ImVec4& tint_col =
ImVec4(1, 1, 1, 1), const
ImVec4& border_col =
ImVec4(0, 0, 0, 0));
569 IMGUI_API
bool ImageButton(const
char* str_id, ImTextureID user_texture_id, 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));
574 IMGUI_API
bool BeginCombo(const
char* label, const
char* preview_value, ImGuiComboFlags flags = 0);
575 IMGUI_API
void EndCombo();
576 IMGUI_API
bool Combo(const
char* label,
int* current_item, const
char* const items[],
int items_count,
int popup_max_height_in_items = -1);
577 IMGUI_API
bool Combo(const
char* label,
int* current_item, const
char* items_separated_by_zeros,
int popup_max_height_in_items = -1);
578 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);
592 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);
593 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);
594 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);
595 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);
596 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);
597 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);
598 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);
599 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);
600 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);
601 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);
602 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);
603 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);
611 IMGUI_API
bool SliderFloat(const
char* label,
float* v,
float v_min,
float v_max, const
char* format =
"%.3f", ImGuiSliderFlags flags = 0);
612 IMGUI_API
bool SliderFloat2(const
char* label,
float v[2],
float v_min,
float v_max, const
char* format =
"%.3f", ImGuiSliderFlags flags = 0);
613 IMGUI_API
bool SliderFloat3(const
char* label,
float v[3],
float v_min,
float v_max, const
char* format =
"%.3f", ImGuiSliderFlags flags = 0);
614 IMGUI_API
bool SliderFloat4(const
char* label,
float v[4],
float v_min,
float v_max, const
char* format =
"%.3f", ImGuiSliderFlags flags = 0);
615 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);
616 IMGUI_API
bool SliderInt(const
char* label,
int* v,
int v_min,
int v_max, const
char* format =
"%d", ImGuiSliderFlags flags = 0);
617 IMGUI_API
bool SliderInt2(const
char* label,
int v[2],
int v_min,
int v_max, const
char* format =
"%d", ImGuiSliderFlags flags = 0);
618 IMGUI_API
bool SliderInt3(const
char* label,
int v[3],
int v_min,
int v_max, const
char* format =
"%d", ImGuiSliderFlags flags = 0);
619 IMGUI_API
bool SliderInt4(const
char* label,
int v[4],
int v_min,
int v_max, const
char* format =
"%d", ImGuiSliderFlags flags = 0);
620 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);
621 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);
622 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);
623 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);
624 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);
629 IMGUI_API
bool InputText(const
char* label,
char* buf,
size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
630 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);
631 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);
632 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);
633 IMGUI_API
bool InputFloat2(const
char* label,
float v[2], const
char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
634 IMGUI_API
bool InputFloat3(const
char* label,
float v[3], const
char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
635 IMGUI_API
bool InputFloat4(const
char* label,
float v[4], const
char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
636 IMGUI_API
bool InputInt(const
char* label,
int* v,
int step = 1,
int step_fast = 100, ImGuiInputTextFlags flags = 0);
637 IMGUI_API
bool InputInt2(const
char* label,
int v[2], ImGuiInputTextFlags flags = 0);
638 IMGUI_API
bool InputInt3(const
char* label,
int v[3], ImGuiInputTextFlags flags = 0);
639 IMGUI_API
bool InputInt4(const
char* label,
int v[4], ImGuiInputTextFlags flags = 0);
640 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);
641 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);
642 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);
647 IMGUI_API
bool ColorEdit3(const
char* label,
float col[3], ImGuiColorEditFlags flags = 0);
648 IMGUI_API
bool ColorEdit4(const
char* label,
float col[4], ImGuiColorEditFlags flags = 0);
649 IMGUI_API
bool ColorPicker3(const
char* label,
float col[3], ImGuiColorEditFlags flags = 0);
650 IMGUI_API
bool ColorPicker4(const
char* label,
float col[4], ImGuiColorEditFlags flags = 0, const
float* ref_col = NULL);
651 IMGUI_API
bool ColorButton(const
char* desc_id, const
ImVec4& col, ImGuiColorEditFlags flags = 0, const
ImVec2& size =
ImVec2(0, 0));
652 IMGUI_API
void SetColorEditOptions(ImGuiColorEditFlags flags);
656 IMGUI_API
bool TreeNode(const
char* label);
657 IMGUI_API
bool TreeNode(const
char* str_id, const
char* fmt, ...) IM_FMTARGS(2);
658 IMGUI_API
bool TreeNode(const
void* ptr_id, const
char* fmt, ...) IM_FMTARGS(2);
659 IMGUI_API
bool TreeNodeV(const
char* str_id, const
char* fmt, va_list args) IM_FMTLIST(2);
660 IMGUI_API
bool TreeNodeV(const
void* ptr_id, const
char* fmt, va_list args) IM_FMTLIST(2);
661 IMGUI_API
bool TreeNodeEx(const
char* label, ImGuiTreeNodeFlags flags = 0);
662 IMGUI_API
bool TreeNodeEx(const
char* str_id, ImGuiTreeNodeFlags flags, const
char* fmt, ...) IM_FMTARGS(3);
663 IMGUI_API
bool TreeNodeEx(const
void* ptr_id, ImGuiTreeNodeFlags flags, const
char* fmt, ...) IM_FMTARGS(3);
664 IMGUI_API
bool TreeNodeExV(const
char* str_id, ImGuiTreeNodeFlags flags, const
char* fmt, va_list args) IM_FMTLIST(3);
665 IMGUI_API
bool TreeNodeExV(const
void* ptr_id, ImGuiTreeNodeFlags flags, const
char* fmt, va_list args) IM_FMTLIST(3);
666 IMGUI_API
void TreePush(const
char* str_id);
667 IMGUI_API
void TreePush(const
void* ptr_id);
668 IMGUI_API
void TreePop();
669 IMGUI_API
float GetTreeNodeToLabelSpacing();
670 IMGUI_API
bool CollapsingHeader(const
char* label, ImGuiTreeNodeFlags flags = 0);
671 IMGUI_API
bool CollapsingHeader(const
char* label,
bool* p_visible, ImGuiTreeNodeFlags flags = 0);
672 IMGUI_API
void SetNextItemOpen(
bool is_open, ImGuiCond cond = 0);
673 IMGUI_API
void SetNextItemStorageID(ImGuiID storage_id);
678 IMGUI_API
bool Selectable(const
char* label,
bool selected = false, ImGuiSelectableFlags flags = 0, const
ImVec2& size =
ImVec2(0, 0));
679 IMGUI_API
bool Selectable(const
char* label,
bool* p_selected, ImGuiSelectableFlags flags = 0, const
ImVec2& size =
ImVec2(0, 0));
688 IMGUI_API
ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags,
int selection_size = -1,
int items_count = -1);
690 IMGUI_API
void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data);
691 IMGUI_API
bool IsItemToggledSelection();
699 IMGUI_API
bool BeginListBox(const
char* label, const
ImVec2& size =
ImVec2(0, 0));
700 IMGUI_API
void EndListBox();
701 IMGUI_API
bool ListBox(const
char* label,
int* current_item, const
char* const items[],
int items_count,
int height_in_items = -1);
702 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);
706 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));
707 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));
708 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));
709 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));
713 IMGUI_API
void Value(const
char* prefix,
bool b);
714 IMGUI_API
void Value(const
char* prefix,
int v);
715 IMGUI_API
void Value(const
char* prefix,
unsigned int v);
716 IMGUI_API
void Value(const
char* prefix,
float v, const
char* float_format = NULL);
723 IMGUI_API
bool BeginMenuBar();
724 IMGUI_API
void EndMenuBar();
725 IMGUI_API
bool BeginMainMenuBar();
726 IMGUI_API
void EndMainMenuBar();
727 IMGUI_API
bool BeginMenu(const
char* label,
bool enabled = true);
728 IMGUI_API
void EndMenu();
729 IMGUI_API
bool MenuItem(const
char* label, const
char* shortcut = NULL,
bool selected = false,
bool enabled = true);
730 IMGUI_API
bool MenuItem(const
char* label, const
char* shortcut,
bool* p_selected,
bool enabled = true);
736 IMGUI_API
bool BeginTooltip();
737 IMGUI_API
void EndTooltip();
738 IMGUI_API
void SetTooltip(const
char* fmt, ...) IM_FMTARGS(1);
739 IMGUI_API
void SetTooltipV(const
char* fmt, va_list args) IM_FMTLIST(1);
745 IMGUI_API
bool BeginItemTooltip();
746 IMGUI_API
void SetItemTooltip(const
char* fmt, ...) IM_FMTARGS(1);
747 IMGUI_API
void SetItemTooltipV(const
char* fmt, va_list args) IM_FMTLIST(1);
759 IMGUI_API
bool BeginPopup(const
char* str_id, ImGuiWindowFlags flags = 0);
760 IMGUI_API
bool BeginPopupModal(const
char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
761 IMGUI_API
void EndPopup();
771 IMGUI_API
void OpenPopup(const
char* str_id, ImGuiPopupFlags popup_flags = 0);
772 IMGUI_API
void OpenPopup(ImGuiID
id, ImGuiPopupFlags popup_flags = 0);
773 IMGUI_API
void OpenPopupOnItemClick(const
char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
774 IMGUI_API
void CloseCurrentPopup();
781 IMGUI_API
bool BeginPopupContextItem(const
char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
782 IMGUI_API
bool BeginPopupContextWindow(const
char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
783 IMGUI_API
bool BeginPopupContextVoid(const
char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
789 IMGUI_API
bool IsPopupOpen(const
char* str_id, ImGuiPopupFlags flags = 0);
812 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);
813 IMGUI_API
void EndTable();
814 IMGUI_API
void TableNextRow(ImGuiTableRowFlags row_flags = 0,
float min_row_height = 0.0f);
815 IMGUI_API
bool TableNextColumn();
816 IMGUI_API
bool TableSetColumnIndex(
int column_n);
826 IMGUI_API
void TableSetupColumn(const
char* label, ImGuiTableColumnFlags flags = 0,
float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
827 IMGUI_API
void TableSetupScrollFreeze(
int cols,
int rows);
828 IMGUI_API
void TableHeader(const
char* label);
829 IMGUI_API
void TableHeadersRow();
830 IMGUI_API
void TableAngledHeadersRow();
839 IMGUI_API
int TableGetColumnCount();
840 IMGUI_API
int TableGetColumnIndex();
841 IMGUI_API
int TableGetRowIndex();
842 IMGUI_API const
char* TableGetColumnName(
int column_n = -1);
843 IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(
int column_n = -1);
844 IMGUI_API
void TableSetColumnEnabled(
int column_n,
bool v);
845 IMGUI_API
int TableGetHoveredColumn();
846 IMGUI_API
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color,
int column_n = -1);
850 IMGUI_API
void Columns(
int count = 1, const
char*
id = NULL,
bool borders = true);
851 IMGUI_API
void NextColumn();
852 IMGUI_API
int GetColumnIndex();
853 IMGUI_API
float GetColumnWidth(
int column_index = -1);
854 IMGUI_API
void SetColumnWidth(
int column_index,
float width);
855 IMGUI_API
float GetColumnOffset(
int column_index = -1);
856 IMGUI_API
void SetColumnOffset(
int column_index,
float offset_x);
857 IMGUI_API
int GetColumnsCount();
861 IMGUI_API
bool BeginTabBar(const
char* str_id, ImGuiTabBarFlags flags = 0);
862 IMGUI_API
void EndTabBar();
863 IMGUI_API
bool BeginTabItem(const
char* label,
bool* p_open = NULL, ImGuiTabItemFlags flags = 0);
864 IMGUI_API
void EndTabItem();
865 IMGUI_API
bool TabItemButton(const
char* label, ImGuiTabItemFlags flags = 0);
866 IMGUI_API
void SetTabItemClosed(const
char* tab_or_docked_window_label);
870 IMGUI_API
void LogToTTY(
int auto_open_depth = -1);
871 IMGUI_API
void LogToFile(
int auto_open_depth = -1, const
char* filename = NULL);
872 IMGUI_API
void LogToClipboard(
int auto_open_depth = -1);
873 IMGUI_API
void LogFinish();
874 IMGUI_API
void LogButtons();
875 IMGUI_API
void LogText(const
char* fmt, ...) IM_FMTARGS(1);
876 IMGUI_API
void LogTextV(const
char* fmt, va_list args) IM_FMTLIST(1);
883 IMGUI_API
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0);
884 IMGUI_API
bool SetDragDropPayload(const
char* type, const
void* data,
size_t sz, ImGuiCond cond = 0);
885 IMGUI_API
void EndDragDropSource();
886 IMGUI_API
bool BeginDragDropTarget();
887 IMGUI_API const
ImGuiPayload* AcceptDragDropPayload(const
char* type, ImGuiDragDropFlags flags = 0);
888 IMGUI_API
void EndDragDropTarget();
896 IMGUI_API
void BeginDisabled(
bool disabled = true);
897 IMGUI_API
void EndDisabled();
901 IMGUI_API
void PushClipRect(const
ImVec2& clip_rect_min, const
ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect);
902 IMGUI_API
void PopClipRect();
905 IMGUI_API
void SetItemDefaultFocus();
906 IMGUI_API
void SetKeyboardFocusHere(
int offset = 0);
909 IMGUI_API
void SetNavCursorVisible(
bool visible);
912 IMGUI_API
void SetNextItemAllowOverlap();
917 IMGUI_API
bool IsItemHovered(ImGuiHoveredFlags flags = 0);
918 IMGUI_API
bool IsItemActive();
919 IMGUI_API
bool IsItemFocused();
920 IMGUI_API
bool IsItemClicked(ImGuiMouseButton mouse_button = 0);
921 IMGUI_API
bool IsItemVisible();
922 IMGUI_API
bool IsItemEdited();
923 IMGUI_API
bool IsItemActivated();
924 IMGUI_API
bool IsItemDeactivated();
925 IMGUI_API
bool IsItemDeactivatedAfterEdit();
926 IMGUI_API
bool IsItemToggledOpen();
927 IMGUI_API
bool IsAnyItemHovered();
928 IMGUI_API
bool IsAnyItemActive();
929 IMGUI_API
bool IsAnyItemFocused();
930 IMGUI_API ImGuiID GetItemID();
931 IMGUI_API
ImVec2 GetItemRectMin();
932 IMGUI_API
ImVec2 GetItemRectMax();
933 IMGUI_API
ImVec2 GetItemRectSize();
942 IMGUI_API
ImDrawList* GetBackgroundDrawList();
943 IMGUI_API
ImDrawList* GetForegroundDrawList();
946 IMGUI_API
bool IsRectVisible(const
ImVec2& size);
947 IMGUI_API
bool IsRectVisible(const
ImVec2& rect_min, const
ImVec2& rect_max);
948 IMGUI_API
double GetTime();
949 IMGUI_API
int GetFrameCount();
951 IMGUI_API const
char* GetStyleColorName(ImGuiCol idx);
956 IMGUI_API
ImVec2 CalcTextSize(const
char* text, const
char* text_end = NULL,
bool hide_text_after_double_hash = false,
float wrap_width = -1.0f);
959 IMGUI_API
ImVec4 ColorConvertU32ToFloat4(ImU32 in);
960 IMGUI_API ImU32 ColorConvertFloat4ToU32(const
ImVec4& in);
961 IMGUI_API
void ColorConvertRGBtoHSV(
float r,
float g,
float b,
float& out_h,
float& out_s,
float& out_v);
962 IMGUI_API
void ColorConvertHSVtoRGB(
float h,
float s,
float v,
float& out_r,
float& out_g,
float& out_b);
968 IMGUI_API
bool IsKeyDown(ImGuiKey key);
969 IMGUI_API
bool IsKeyPressed(ImGuiKey key,
bool repeat = true);
970 IMGUI_API
bool IsKeyReleased(ImGuiKey key);
971 IMGUI_API
bool IsKeyChordPressed(ImGuiKeyChord key_chord);
972 IMGUI_API
int GetKeyPressedAmount(ImGuiKey key,
float repeat_delay,
float rate);
973 IMGUI_API const
char* GetKeyName(ImGuiKey key);
974 IMGUI_API
void SetNextFrameWantCaptureKeyboard(
bool want_capture_keyboard);
991 IMGUI_API
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
992 IMGUI_API
void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
1000 IMGUI_API
void SetItemKeyOwner(ImGuiKey key);
1006 IMGUI_API
bool IsMouseDown(ImGuiMouseButton button);
1007 IMGUI_API
bool IsMouseClicked(ImGuiMouseButton button,
bool repeat = false);
1008 IMGUI_API
bool IsMouseReleased(ImGuiMouseButton button);
1009 IMGUI_API
bool IsMouseDoubleClicked(ImGuiMouseButton button);
1010 IMGUI_API
int GetMouseClickedCount(ImGuiMouseButton button);
1011 IMGUI_API
bool IsMouseHoveringRect(const
ImVec2& r_min, const
ImVec2& r_max,
bool clip = true);
1012 IMGUI_API
bool IsMousePosValid(const
ImVec2* mouse_pos = NULL);
1013 IMGUI_API
bool IsAnyMouseDown();
1014 IMGUI_API
ImVec2 GetMousePos();
1015 IMGUI_API
ImVec2 GetMousePosOnOpeningCurrentPopup();
1016 IMGUI_API
bool IsMouseDragging(ImGuiMouseButton button,
float lock_threshold = -1.0f);
1017 IMGUI_API
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0,
float lock_threshold = -1.0f);
1018 IMGUI_API
void ResetMouseDragDelta(ImGuiMouseButton button = 0);
1019 IMGUI_API ImGuiMouseCursor GetMouseCursor();
1020 IMGUI_API
void SetMouseCursor(ImGuiMouseCursor cursor_type);
1021 IMGUI_API
void SetNextFrameWantCaptureMouse(
bool want_capture_mouse);
1025 IMGUI_API const
char* GetClipboardText();
1026 IMGUI_API
void SetClipboardText(const
char* text);
1032 IMGUI_API
void LoadIniSettingsFromDisk(const
char* ini_filename);
1033 IMGUI_API
void LoadIniSettingsFromMemory(const
char* ini_data,
size_t ini_size=0);
1034 IMGUI_API
void SaveIniSettingsToDisk(const
char* ini_filename);
1035 IMGUI_API const
char* SaveIniSettingsToMemory(
size_t* out_ini_size = NULL);
1039 IMGUI_API
void DebugTextEncoding(const
char* text);
1040 IMGUI_API
void DebugFlashStyleColor(ImGuiCol idx);
1041 IMGUI_API
void DebugStartItemPicker();
1042 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);
1043#ifndef IMGUI_DISABLE_DEBUG_TOOLS
1044 IMGUI_API
void DebugLog(
const char* fmt, ...) IM_FMTARGS(1);
1045 IMGUI_API
void DebugLogV(const
char* fmt, va_list args) IM_FMTLIST(1);
1052 IMGUI_API
void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func,
void* user_data = NULL);
1053 IMGUI_API
void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func,
void** p_user_data);
1054 IMGUI_API
void* MemAlloc(
size_t size);
1055 IMGUI_API
void MemFree(
void* ptr);
1065enum ImGuiWindowFlags_
1067 ImGuiWindowFlags_None = 0,
1068 ImGuiWindowFlags_NoTitleBar = 1 << 0,
1069 ImGuiWindowFlags_NoResize = 1 << 1,
1070 ImGuiWindowFlags_NoMove = 1 << 2,
1071 ImGuiWindowFlags_NoScrollbar = 1 << 3,
1072 ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
1073 ImGuiWindowFlags_NoCollapse = 1 << 5,
1074 ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
1075 ImGuiWindowFlags_NoBackground = 1 << 7,
1076 ImGuiWindowFlags_NoSavedSettings = 1 << 8,
1077 ImGuiWindowFlags_NoMouseInputs = 1 << 9,
1078 ImGuiWindowFlags_MenuBar = 1 << 10,
1079 ImGuiWindowFlags_HorizontalScrollbar = 1 << 11,
1080 ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12,
1081 ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
1082 ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,
1083 ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,
1084 ImGuiWindowFlags_NoNavInputs = 1 << 16,
1085 ImGuiWindowFlags_NoNavFocus = 1 << 17,
1086 ImGuiWindowFlags_UnsavedDocument = 1 << 18,
1087 ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1088 ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse,
1089 ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1092 ImGuiWindowFlags_ChildWindow = 1 << 24,
1093 ImGuiWindowFlags_Tooltip = 1 << 25,
1094 ImGuiWindowFlags_Popup = 1 << 26,
1095 ImGuiWindowFlags_Modal = 1 << 27,
1096 ImGuiWindowFlags_ChildMenu = 1 << 28,
1099#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1100 ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30,
1101 ImGuiWindowFlags_NavFlattened = 1 << 31,
1114enum ImGuiChildFlags_
1116 ImGuiChildFlags_None = 0,
1117 ImGuiChildFlags_Borders = 1 << 0,
1118 ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1,
1119 ImGuiChildFlags_ResizeX = 1 << 2,
1120 ImGuiChildFlags_ResizeY = 1 << 3,
1121 ImGuiChildFlags_AutoResizeX = 1 << 4,
1122 ImGuiChildFlags_AutoResizeY = 1 << 5,
1123 ImGuiChildFlags_AlwaysAutoResize = 1 << 6,
1124 ImGuiChildFlags_FrameStyle = 1 << 7,
1125 ImGuiChildFlags_NavFlattened = 1 << 8,
1128#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1129 ImGuiChildFlags_Border = ImGuiChildFlags_Borders,
1137 ImGuiItemFlags_None = 0,
1138 ImGuiItemFlags_NoTabStop = 1 << 0,
1139 ImGuiItemFlags_NoNav = 1 << 1,
1140 ImGuiItemFlags_NoNavDefaultFocus = 1 << 2,
1141 ImGuiItemFlags_ButtonRepeat = 1 << 3,
1142 ImGuiItemFlags_AutoClosePopups = 1 << 4,
1143 ImGuiItemFlags_AllowDuplicateId = 1 << 5,
1148enum ImGuiInputTextFlags_
1151 ImGuiInputTextFlags_None = 0,
1152 ImGuiInputTextFlags_CharsDecimal = 1 << 0,
1153 ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
1154 ImGuiInputTextFlags_CharsScientific = 1 << 2,
1155 ImGuiInputTextFlags_CharsUppercase = 1 << 3,
1156 ImGuiInputTextFlags_CharsNoBlank = 1 << 4,
1159 ImGuiInputTextFlags_AllowTabInput = 1 << 5,
1160 ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6,
1161 ImGuiInputTextFlags_EscapeClearsAll = 1 << 7,
1162 ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8,
1165 ImGuiInputTextFlags_ReadOnly = 1 << 9,
1166 ImGuiInputTextFlags_Password = 1 << 10,
1167 ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11,
1168 ImGuiInputTextFlags_AutoSelectAll = 1 << 12,
1169 ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13,
1170 ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14,
1171 ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15,
1172 ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
1175 ImGuiInputTextFlags_ElideLeft = 1 << 17,
1178 ImGuiInputTextFlags_CallbackCompletion = 1 << 18,
1179 ImGuiInputTextFlags_CallbackHistory = 1 << 19,
1180 ImGuiInputTextFlags_CallbackAlways = 1 << 20,
1181 ImGuiInputTextFlags_CallbackCharFilter = 1 << 21,
1182 ImGuiInputTextFlags_CallbackResize = 1 << 22,
1183 ImGuiInputTextFlags_CallbackEdit = 1 << 23,
1190enum ImGuiTreeNodeFlags_
1192 ImGuiTreeNodeFlags_None = 0,
1193 ImGuiTreeNodeFlags_Selected = 1 << 0,
1194 ImGuiTreeNodeFlags_Framed = 1 << 1,
1195 ImGuiTreeNodeFlags_AllowOverlap = 1 << 2,
1196 ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
1197 ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
1198 ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
1199 ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6,
1200 ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
1201 ImGuiTreeNodeFlags_Leaf = 1 << 8,
1202 ImGuiTreeNodeFlags_Bullet = 1 << 9,
1203 ImGuiTreeNodeFlags_FramePadding = 1 << 10,
1204 ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
1205 ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
1206 ImGuiTreeNodeFlags_SpanTextWidth = 1 << 13,
1207 ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14,
1208 ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 15,
1210 ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
1212#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1213 ImGuiTreeNodeFlags_AllowItemOverlap = ImGuiTreeNodeFlags_AllowOverlap,
1225enum ImGuiPopupFlags_
1227 ImGuiPopupFlags_None = 0,
1228 ImGuiPopupFlags_MouseButtonLeft = 0,
1229 ImGuiPopupFlags_MouseButtonRight = 1,
1230 ImGuiPopupFlags_MouseButtonMiddle = 2,
1231 ImGuiPopupFlags_MouseButtonMask_ = 0x1F,
1232 ImGuiPopupFlags_MouseButtonDefault_ = 1,
1233 ImGuiPopupFlags_NoReopen = 1 << 5,
1235 ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7,
1236 ImGuiPopupFlags_NoOpenOverItems = 1 << 8,
1237 ImGuiPopupFlags_AnyPopupId = 1 << 10,
1238 ImGuiPopupFlags_AnyPopupLevel = 1 << 11,
1239 ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel,
1243enum ImGuiSelectableFlags_
1245 ImGuiSelectableFlags_None = 0,
1246 ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0,
1247 ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
1248 ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
1249 ImGuiSelectableFlags_Disabled = 1 << 3,
1250 ImGuiSelectableFlags_AllowOverlap = 1 << 4,
1251 ImGuiSelectableFlags_Highlight = 1 << 5,
1253#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1254 ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups,
1255 ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap,
1260enum ImGuiComboFlags_
1262 ImGuiComboFlags_None = 0,
1263 ImGuiComboFlags_PopupAlignLeft = 1 << 0,
1264 ImGuiComboFlags_HeightSmall = 1 << 1,
1265 ImGuiComboFlags_HeightRegular = 1 << 2,
1266 ImGuiComboFlags_HeightLarge = 1 << 3,
1267 ImGuiComboFlags_HeightLargest = 1 << 4,
1268 ImGuiComboFlags_NoArrowButton = 1 << 5,
1269 ImGuiComboFlags_NoPreview = 1 << 6,
1270 ImGuiComboFlags_WidthFitPreview = 1 << 7,
1271 ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest,
1275enum ImGuiTabBarFlags_
1277 ImGuiTabBarFlags_None = 0,
1278 ImGuiTabBarFlags_Reorderable = 1 << 0,
1279 ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
1280 ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
1281 ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3,
1282 ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
1283 ImGuiTabBarFlags_NoTooltip = 1 << 5,
1284 ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6,
1285 ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 7,
1286 ImGuiTabBarFlags_FittingPolicyScroll = 1 << 8,
1287 ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
1288 ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown,
1292enum ImGuiTabItemFlags_
1294 ImGuiTabItemFlags_None = 0,
1295 ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
1296 ImGuiTabItemFlags_SetSelected = 1 << 1,
1297 ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
1298 ImGuiTabItemFlags_NoPushId = 1 << 3,
1299 ImGuiTabItemFlags_NoTooltip = 1 << 4,
1300 ImGuiTabItemFlags_NoReorder = 1 << 5,
1301 ImGuiTabItemFlags_Leading = 1 << 6,
1302 ImGuiTabItemFlags_Trailing = 1 << 7,
1303 ImGuiTabItemFlags_NoAssumedClosure = 1 << 8,
1307enum ImGuiFocusedFlags_
1309 ImGuiFocusedFlags_None = 0,
1310 ImGuiFocusedFlags_ChildWindows = 1 << 0,
1311 ImGuiFocusedFlags_RootWindow = 1 << 1,
1312 ImGuiFocusedFlags_AnyWindow = 1 << 2,
1313 ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
1315 ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows,
1321enum ImGuiHoveredFlags_
1323 ImGuiHoveredFlags_None = 0,
1324 ImGuiHoveredFlags_ChildWindows = 1 << 0,
1325 ImGuiHoveredFlags_RootWindow = 1 << 1,
1326 ImGuiHoveredFlags_AnyWindow = 1 << 2,
1327 ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
1329 ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
1331 ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
1332 ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8,
1333 ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9,
1334 ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10,
1335 ImGuiHoveredFlags_NoNavOverride = 1 << 11,
1336 ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow,
1337 ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
1338 ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows,
1346 ImGuiHoveredFlags_ForTooltip = 1 << 12,
1351 ImGuiHoveredFlags_Stationary = 1 << 13,
1352 ImGuiHoveredFlags_DelayNone = 1 << 14,
1353 ImGuiHoveredFlags_DelayShort = 1 << 15,
1354 ImGuiHoveredFlags_DelayNormal = 1 << 16,
1355 ImGuiHoveredFlags_NoSharedDelay = 1 << 17,
1359enum ImGuiDragDropFlags_
1361 ImGuiDragDropFlags_None = 0,
1363 ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
1364 ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
1365 ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
1366 ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
1367 ImGuiDragDropFlags_SourceExtern = 1 << 4,
1368 ImGuiDragDropFlags_PayloadAutoExpire = 1 << 5,
1369 ImGuiDragDropFlags_PayloadNoCrossContext = 1 << 6,
1370 ImGuiDragDropFlags_PayloadNoCrossProcess = 1 << 7,
1372 ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
1373 ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
1374 ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
1375 ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect,
1377#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1378 ImGuiDragDropFlags_SourceAutoExpirePayload = ImGuiDragDropFlags_PayloadAutoExpire,
1383#define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F"
1384#define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F"
1397 ImGuiDataType_Float,
1398 ImGuiDataType_Double,
1415enum ImGuiSortDirection : ImU8
1417 ImGuiSortDirection_None = 0,
1418 ImGuiSortDirection_Ascending = 1,
1419 ImGuiSortDirection_Descending = 2
1432 ImGuiKey_NamedKey_BEGIN = 512,
1436 ImGuiKey_RightArrow,
1449 ImGuiKey_LeftCtrl, ImGuiKey_LeftShift, ImGuiKey_LeftAlt, ImGuiKey_LeftSuper,
1450 ImGuiKey_RightCtrl, ImGuiKey_RightShift, ImGuiKey_RightAlt, ImGuiKey_RightSuper,
1452 ImGuiKey_0, ImGuiKey_1, ImGuiKey_2, ImGuiKey_3, ImGuiKey_4, ImGuiKey_5, ImGuiKey_6, ImGuiKey_7, ImGuiKey_8, ImGuiKey_9,
1453 ImGuiKey_A, ImGuiKey_B, ImGuiKey_C, ImGuiKey_D, ImGuiKey_E, ImGuiKey_F, ImGuiKey_G, ImGuiKey_H, ImGuiKey_I, ImGuiKey_J,
1454 ImGuiKey_K, ImGuiKey_L, ImGuiKey_M, ImGuiKey_N, ImGuiKey_O, ImGuiKey_P, ImGuiKey_Q, ImGuiKey_R, ImGuiKey_S, ImGuiKey_T,
1455 ImGuiKey_U, ImGuiKey_V, ImGuiKey_W, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z,
1456 ImGuiKey_F1, ImGuiKey_F2, ImGuiKey_F3, ImGuiKey_F4, ImGuiKey_F5, ImGuiKey_F6,
1457 ImGuiKey_F7, ImGuiKey_F8, ImGuiKey_F9, ImGuiKey_F10, ImGuiKey_F11, ImGuiKey_F12,
1458 ImGuiKey_F13, ImGuiKey_F14, ImGuiKey_F15, ImGuiKey_F16, ImGuiKey_F17, ImGuiKey_F18,
1459 ImGuiKey_F19, ImGuiKey_F20, ImGuiKey_F21, ImGuiKey_F22, ImGuiKey_F23, ImGuiKey_F24,
1460 ImGuiKey_Apostrophe,
1467 ImGuiKey_LeftBracket,
1469 ImGuiKey_RightBracket,
1470 ImGuiKey_GraveAccent,
1472 ImGuiKey_ScrollLock,
1474 ImGuiKey_PrintScreen,
1476 ImGuiKey_Keypad0, ImGuiKey_Keypad1, ImGuiKey_Keypad2, ImGuiKey_Keypad3, ImGuiKey_Keypad4,
1477 ImGuiKey_Keypad5, ImGuiKey_Keypad6, ImGuiKey_Keypad7, ImGuiKey_Keypad8, ImGuiKey_Keypad9,
1478 ImGuiKey_KeypadDecimal,
1479 ImGuiKey_KeypadDivide,
1480 ImGuiKey_KeypadMultiply,
1481 ImGuiKey_KeypadSubtract,
1483 ImGuiKey_KeypadEnter,
1484 ImGuiKey_KeypadEqual,
1486 ImGuiKey_AppForward,
1490 ImGuiKey_GamepadStart,
1491 ImGuiKey_GamepadBack,
1492 ImGuiKey_GamepadFaceLeft,
1493 ImGuiKey_GamepadFaceRight,
1494 ImGuiKey_GamepadFaceUp,
1495 ImGuiKey_GamepadFaceDown,
1496 ImGuiKey_GamepadDpadLeft,
1497 ImGuiKey_GamepadDpadRight,
1498 ImGuiKey_GamepadDpadUp,
1499 ImGuiKey_GamepadDpadDown,
1506 ImGuiKey_GamepadLStickLeft,
1507 ImGuiKey_GamepadLStickRight,
1508 ImGuiKey_GamepadLStickUp,
1509 ImGuiKey_GamepadLStickDown,
1510 ImGuiKey_GamepadRStickLeft,
1511 ImGuiKey_GamepadRStickRight,
1512 ImGuiKey_GamepadRStickUp,
1513 ImGuiKey_GamepadRStickDown,
1517 ImGuiKey_MouseLeft, ImGuiKey_MouseRight, ImGuiKey_MouseMiddle, ImGuiKey_MouseX1, ImGuiKey_MouseX2, ImGuiKey_MouseWheelX, ImGuiKey_MouseWheelY,
1520 ImGuiKey_ReservedForModCtrl, ImGuiKey_ReservedForModShift, ImGuiKey_ReservedForModAlt, ImGuiKey_ReservedForModSuper,
1521 ImGuiKey_NamedKey_END,
1533 ImGuiMod_Ctrl = 1 << 12,
1534 ImGuiMod_Shift = 1 << 13,
1535 ImGuiMod_Alt = 1 << 14,
1536 ImGuiMod_Super = 1 << 15,
1537 ImGuiMod_Mask_ = 0xF000,
1540 ImGuiKey_NamedKey_COUNT = ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN,
1544#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1545 ImGuiKey_COUNT = ImGuiKey_NamedKey_END,
1546 ImGuiMod_Shortcut = ImGuiMod_Ctrl,
1547 ImGuiKey_ModCtrl = ImGuiMod_Ctrl, ImGuiKey_ModShift = ImGuiMod_Shift, ImGuiKey_ModAlt = ImGuiMod_Alt, ImGuiKey_ModSuper = ImGuiMod_Super,
1555enum ImGuiInputFlags_
1557 ImGuiInputFlags_None = 0,
1558 ImGuiInputFlags_Repeat = 1 << 0,
1563 ImGuiInputFlags_RouteActive = 1 << 10,
1564 ImGuiInputFlags_RouteFocused = 1 << 11,
1565 ImGuiInputFlags_RouteGlobal = 1 << 12,
1566 ImGuiInputFlags_RouteAlways = 1 << 13,
1568 ImGuiInputFlags_RouteOverFocused = 1 << 14,
1569 ImGuiInputFlags_RouteOverActive = 1 << 15,
1570 ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16,
1571 ImGuiInputFlags_RouteFromRootWindow = 1 << 17,
1574 ImGuiInputFlags_Tooltip = 1 << 18,
1578enum ImGuiConfigFlags_
1580 ImGuiConfigFlags_None = 0,
1581 ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
1582 ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
1583 ImGuiConfigFlags_NoMouse = 1 << 4,
1584 ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
1585 ImGuiConfigFlags_NoKeyboard = 1 << 6,
1588 ImGuiConfigFlags_IsSRGB = 1 << 20,
1589 ImGuiConfigFlags_IsTouchScreen = 1 << 21,
1591#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1592 ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
1593 ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3,
1598enum ImGuiBackendFlags_
1600 ImGuiBackendFlags_None = 0,
1601 ImGuiBackendFlags_HasGamepad = 1 << 0,
1602 ImGuiBackendFlags_HasMouseCursors = 1 << 1,
1603 ImGuiBackendFlags_HasSetMousePos = 1 << 2,
1604 ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3,
1611 ImGuiCol_TextDisabled,
1616 ImGuiCol_BorderShadow,
1618 ImGuiCol_FrameBgHovered,
1619 ImGuiCol_FrameBgActive,
1621 ImGuiCol_TitleBgActive,
1622 ImGuiCol_TitleBgCollapsed,
1624 ImGuiCol_ScrollbarBg,
1625 ImGuiCol_ScrollbarGrab,
1626 ImGuiCol_ScrollbarGrabHovered,
1627 ImGuiCol_ScrollbarGrabActive,
1629 ImGuiCol_SliderGrab,
1630 ImGuiCol_SliderGrabActive,
1632 ImGuiCol_ButtonHovered,
1633 ImGuiCol_ButtonActive,
1635 ImGuiCol_HeaderHovered,
1636 ImGuiCol_HeaderActive,
1638 ImGuiCol_SeparatorHovered,
1639 ImGuiCol_SeparatorActive,
1640 ImGuiCol_ResizeGrip,
1641 ImGuiCol_ResizeGripHovered,
1642 ImGuiCol_ResizeGripActive,
1643 ImGuiCol_TabHovered,
1645 ImGuiCol_TabSelected,
1646 ImGuiCol_TabSelectedOverline,
1648 ImGuiCol_TabDimmedSelected,
1649 ImGuiCol_TabDimmedSelectedOverline,
1651 ImGuiCol_PlotLinesHovered,
1652 ImGuiCol_PlotHistogram,
1653 ImGuiCol_PlotHistogramHovered,
1654 ImGuiCol_TableHeaderBg,
1655 ImGuiCol_TableBorderStrong,
1656 ImGuiCol_TableBorderLight,
1657 ImGuiCol_TableRowBg,
1658 ImGuiCol_TableRowBgAlt,
1660 ImGuiCol_TextSelectedBg,
1661 ImGuiCol_DragDropTarget,
1663 ImGuiCol_NavWindowingHighlight,
1664 ImGuiCol_NavWindowingDimBg,
1665 ImGuiCol_ModalWindowDimBg,
1668#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1669 ImGuiCol_TabActive = ImGuiCol_TabSelected,
1670 ImGuiCol_TabUnfocused = ImGuiCol_TabDimmed,
1671 ImGuiCol_TabUnfocusedActive = ImGuiCol_TabDimmedSelected,
1672 ImGuiCol_NavHighlight = ImGuiCol_NavCursor,
1687 ImGuiStyleVar_Alpha,
1688 ImGuiStyleVar_DisabledAlpha,
1689 ImGuiStyleVar_WindowPadding,
1690 ImGuiStyleVar_WindowRounding,
1691 ImGuiStyleVar_WindowBorderSize,
1692 ImGuiStyleVar_WindowMinSize,
1693 ImGuiStyleVar_WindowTitleAlign,
1694 ImGuiStyleVar_ChildRounding,
1695 ImGuiStyleVar_ChildBorderSize,
1696 ImGuiStyleVar_PopupRounding,
1697 ImGuiStyleVar_PopupBorderSize,
1698 ImGuiStyleVar_FramePadding,
1699 ImGuiStyleVar_FrameRounding,
1700 ImGuiStyleVar_FrameBorderSize,
1701 ImGuiStyleVar_ItemSpacing,
1702 ImGuiStyleVar_ItemInnerSpacing,
1703 ImGuiStyleVar_IndentSpacing,
1704 ImGuiStyleVar_CellPadding,
1705 ImGuiStyleVar_ScrollbarSize,
1706 ImGuiStyleVar_ScrollbarRounding,
1707 ImGuiStyleVar_GrabMinSize,
1708 ImGuiStyleVar_GrabRounding,
1709 ImGuiStyleVar_TabRounding,
1710 ImGuiStyleVar_TabBorderSize,
1711 ImGuiStyleVar_TabBarBorderSize,
1712 ImGuiStyleVar_TabBarOverlineSize,
1713 ImGuiStyleVar_TableAngledHeadersAngle,
1714 ImGuiStyleVar_TableAngledHeadersTextAlign,
1715 ImGuiStyleVar_ButtonTextAlign,
1716 ImGuiStyleVar_SelectableTextAlign,
1717 ImGuiStyleVar_SeparatorTextBorderSize,
1718 ImGuiStyleVar_SeparatorTextAlign,
1719 ImGuiStyleVar_SeparatorTextPadding,
1724enum ImGuiButtonFlags_
1726 ImGuiButtonFlags_None = 0,
1727 ImGuiButtonFlags_MouseButtonLeft = 1 << 0,
1728 ImGuiButtonFlags_MouseButtonRight = 1 << 1,
1729 ImGuiButtonFlags_MouseButtonMiddle = 1 << 2,
1730 ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
1731 ImGuiButtonFlags_EnableNav = 1 << 3,
1735enum ImGuiColorEditFlags_
1737 ImGuiColorEditFlags_None = 0,
1738 ImGuiColorEditFlags_NoAlpha = 1 << 1,
1739 ImGuiColorEditFlags_NoPicker = 1 << 2,
1740 ImGuiColorEditFlags_NoOptions = 1 << 3,
1741 ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
1742 ImGuiColorEditFlags_NoInputs = 1 << 5,
1743 ImGuiColorEditFlags_NoTooltip = 1 << 6,
1744 ImGuiColorEditFlags_NoLabel = 1 << 7,
1745 ImGuiColorEditFlags_NoSidePreview = 1 << 8,
1746 ImGuiColorEditFlags_NoDragDrop = 1 << 9,
1747 ImGuiColorEditFlags_NoBorder = 1 << 10,
1750 ImGuiColorEditFlags_AlphaBar = 1 << 16,
1751 ImGuiColorEditFlags_AlphaPreview = 1 << 17,
1752 ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 18,
1753 ImGuiColorEditFlags_HDR = 1 << 19,
1754 ImGuiColorEditFlags_DisplayRGB = 1 << 20,
1755 ImGuiColorEditFlags_DisplayHSV = 1 << 21,
1756 ImGuiColorEditFlags_DisplayHex = 1 << 22,
1757 ImGuiColorEditFlags_Uint8 = 1 << 23,
1758 ImGuiColorEditFlags_Float = 1 << 24,
1759 ImGuiColorEditFlags_PickerHueBar = 1 << 25,
1760 ImGuiColorEditFlags_PickerHueWheel = 1 << 26,
1761 ImGuiColorEditFlags_InputRGB = 1 << 27,
1762 ImGuiColorEditFlags_InputHSV = 1 << 28,
1766 ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
1769 ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
1770 ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
1771 ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
1772 ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV,
1781enum ImGuiSliderFlags_
1783 ImGuiSliderFlags_None = 0,
1784 ImGuiSliderFlags_Logarithmic = 1 << 5,
1785 ImGuiSliderFlags_NoRoundToFormat = 1 << 6,
1786 ImGuiSliderFlags_NoInput = 1 << 7,
1787 ImGuiSliderFlags_WrapAround = 1 << 8,
1788 ImGuiSliderFlags_ClampOnInput = 1 << 9,
1789 ImGuiSliderFlags_ClampZeroRange = 1 << 10,
1790 ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange,
1791 ImGuiSliderFlags_InvalidMask_ = 0x7000000F,
1796enum ImGuiMouseButton_
1798 ImGuiMouseButton_Left = 0,
1799 ImGuiMouseButton_Right = 1,
1800 ImGuiMouseButton_Middle = 2,
1801 ImGuiMouseButton_COUNT = 5
1806enum ImGuiMouseCursor_
1808 ImGuiMouseCursor_None = -1,
1809 ImGuiMouseCursor_Arrow = 0,
1810 ImGuiMouseCursor_TextInput,
1811 ImGuiMouseCursor_ResizeAll,
1812 ImGuiMouseCursor_ResizeNS,
1813 ImGuiMouseCursor_ResizeEW,
1814 ImGuiMouseCursor_ResizeNESW,
1815 ImGuiMouseCursor_ResizeNWSE,
1816 ImGuiMouseCursor_Hand,
1817 ImGuiMouseCursor_NotAllowed,
1818 ImGuiMouseCursor_COUNT
1825enum ImGuiMouseSource :
int
1827 ImGuiMouseSource_Mouse = 0,
1828 ImGuiMouseSource_TouchScreen,
1829 ImGuiMouseSource_Pen,
1830 ImGuiMouseSource_COUNT
1839 ImGuiCond_Always = 1 << 0,
1840 ImGuiCond_Once = 1 << 1,
1841 ImGuiCond_FirstUseEver = 1 << 2,
1842 ImGuiCond_Appearing = 1 << 3,
1871enum ImGuiTableFlags_
1874 ImGuiTableFlags_None = 0,
1875 ImGuiTableFlags_Resizable = 1 << 0,
1876 ImGuiTableFlags_Reorderable = 1 << 1,
1877 ImGuiTableFlags_Hideable = 1 << 2,
1878 ImGuiTableFlags_Sortable = 1 << 3,
1879 ImGuiTableFlags_NoSavedSettings = 1 << 4,
1880 ImGuiTableFlags_ContextMenuInBody = 1 << 5,
1882 ImGuiTableFlags_RowBg = 1 << 6,
1883 ImGuiTableFlags_BordersInnerH = 1 << 7,
1884 ImGuiTableFlags_BordersOuterH = 1 << 8,
1885 ImGuiTableFlags_BordersInnerV = 1 << 9,
1886 ImGuiTableFlags_BordersOuterV = 1 << 10,
1887 ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
1888 ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
1889 ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
1890 ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
1891 ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
1892 ImGuiTableFlags_NoBordersInBody = 1 << 11,
1893 ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
1895 ImGuiTableFlags_SizingFixedFit = 1 << 13,
1896 ImGuiTableFlags_SizingFixedSame = 2 << 13,
1897 ImGuiTableFlags_SizingStretchProp = 3 << 13,
1898 ImGuiTableFlags_SizingStretchSame = 4 << 13,
1900 ImGuiTableFlags_NoHostExtendX = 1 << 16,
1901 ImGuiTableFlags_NoHostExtendY = 1 << 17,
1902 ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
1903 ImGuiTableFlags_PreciseWidths = 1 << 19,
1905 ImGuiTableFlags_NoClip = 1 << 20,
1907 ImGuiTableFlags_PadOuterX = 1 << 21,
1908 ImGuiTableFlags_NoPadOuterX = 1 << 22,
1909 ImGuiTableFlags_NoPadInnerX = 1 << 23,
1911 ImGuiTableFlags_ScrollX = 1 << 24,
1912 ImGuiTableFlags_ScrollY = 1 << 25,
1914 ImGuiTableFlags_SortMulti = 1 << 26,
1915 ImGuiTableFlags_SortTristate = 1 << 27,
1917 ImGuiTableFlags_HighlightHoveredColumn = 1 << 28,
1920 ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame,
1924enum ImGuiTableColumnFlags_
1927 ImGuiTableColumnFlags_None = 0,
1928 ImGuiTableColumnFlags_Disabled = 1 << 0,
1929 ImGuiTableColumnFlags_DefaultHide = 1 << 1,
1930 ImGuiTableColumnFlags_DefaultSort = 1 << 2,
1931 ImGuiTableColumnFlags_WidthStretch = 1 << 3,
1932 ImGuiTableColumnFlags_WidthFixed = 1 << 4,
1933 ImGuiTableColumnFlags_NoResize = 1 << 5,
1934 ImGuiTableColumnFlags_NoReorder = 1 << 6,
1935 ImGuiTableColumnFlags_NoHide = 1 << 7,
1936 ImGuiTableColumnFlags_NoClip = 1 << 8,
1937 ImGuiTableColumnFlags_NoSort = 1 << 9,
1938 ImGuiTableColumnFlags_NoSortAscending = 1 << 10,
1939 ImGuiTableColumnFlags_NoSortDescending = 1 << 11,
1940 ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12,
1941 ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13,
1942 ImGuiTableColumnFlags_PreferSortAscending = 1 << 14,
1943 ImGuiTableColumnFlags_PreferSortDescending = 1 << 15,
1944 ImGuiTableColumnFlags_IndentEnable = 1 << 16,
1945 ImGuiTableColumnFlags_IndentDisable = 1 << 17,
1946 ImGuiTableColumnFlags_AngledHeader = 1 << 18,
1949 ImGuiTableColumnFlags_IsEnabled = 1 << 24,
1950 ImGuiTableColumnFlags_IsVisible = 1 << 25,
1951 ImGuiTableColumnFlags_IsSorted = 1 << 26,
1952 ImGuiTableColumnFlags_IsHovered = 1 << 27,
1955 ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
1956 ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
1957 ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
1958 ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30,
1962enum ImGuiTableRowFlags_
1964 ImGuiTableRowFlags_None = 0,
1965 ImGuiTableRowFlags_Headers = 1 << 0,
1977enum ImGuiTableBgTarget_
1979 ImGuiTableBgTarget_None = 0,
1980 ImGuiTableBgTarget_RowBg0 = 1,
1981 ImGuiTableBgTarget_RowBg1 = 2,
1982 ImGuiTableBgTarget_CellBg = 3,
1989struct ImGuiTableSortSpecs
1995 ImGuiTableSortSpecs() { memset(
this, 0,
sizeof(*
this)); }
1999struct ImGuiTableColumnSortSpecs
2001 ImGuiID ColumnUserID;
2004 ImGuiSortDirection SortDirection;
2006 ImGuiTableColumnSortSpecs() { memset(
this, 0,
sizeof(*
this)); }
2017#ifndef IMGUI_DISABLE_DEBUG_TOOLS
2018#define IMGUI_DEBUG_LOG(...) ImGui::DebugLog(__VA_ARGS__)
2020#define IMGUI_DEBUG_LOG(...) ((void)0)
2030inline void*
operator new(size_t,
ImNewWrapper,
void* ptr) {
return ptr; }
2031inline void operator delete(
void*,
ImNewWrapper,
void*) {}
2032#define IM_ALLOC(_SIZE) ImGui::MemAlloc(_SIZE)
2033#define IM_FREE(_PTR) ImGui::MemFree(_PTR)
2034#define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR)
2035#define IM_NEW(_TYPE) new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE
2036template<
typename T>
void IM_DELETE(T* p) {
if (p) { p->~T(); ImGui::MemFree(p); } }
2049IM_MSVC_RUNTIME_CHECKS_OFF
2058 typedef T value_type;
2059 typedef value_type* iterator;
2060 typedef const value_type* const_iterator;
2063 inline ImVector() { Size = Capacity = 0; Data = NULL; }
2064 inline ImVector(
const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
2065 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; }
2066 inline ~ImVector() {
if (Data) IM_FREE(Data); }
2068 inline void clear() {
if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
2069 inline void clear_delete() {
for (
int n = 0; n < Size; n++) IM_DELETE(Data[n]); clear(); }
2070 inline void clear_destruct() {
for (
int n = 0; n < Size; n++) Data[n].~T(); clear(); }
2072 inline bool empty()
const {
return Size == 0; }
2073 inline int size()
const {
return Size; }
2074 inline int size_in_bytes()
const {
return Size * (int)
sizeof(T); }
2075 inline int max_size()
const {
return 0x7FFFFFFF / (int)
sizeof(T); }
2076 inline int capacity()
const {
return Capacity; }
2077 inline T& operator[](
int i) { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2078 inline const T& operator[](
int i)
const { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2080 inline T* begin() {
return Data; }
2081 inline const T* begin()
const {
return Data; }
2082 inline T* end() {
return Data + Size; }
2083 inline const T* end()
const {
return Data + Size; }
2084 inline T& front() { IM_ASSERT(Size > 0);
return Data[0]; }
2085 inline const T& front()
const { IM_ASSERT(Size > 0);
return Data[0]; }
2086 inline T& back() { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2087 inline const T& back()
const { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2088 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; }
2090 inline int _grow_capacity(
int sz)
const {
int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8;
return new_capacity > sz ? new_capacity : sz; }
2091 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
2092 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; }
2093 inline void shrink(
int new_size) { IM_ASSERT(new_size <= Size); Size = new_size; }
2094 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; }
2095 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; }
2098 inline void push_back(
const T& v) {
if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v,
sizeof(v)); Size++; }
2099 inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
2100 inline void push_front(
const T& v) {
if (Size == 0) push_back(v);
else insert(Data, v); }
2101 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; }
2102 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; }
2103 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; }
2104 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; }
2105 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; }
2106 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; }
2107 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; }
2108 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; }
2109 inline bool find_erase(
const T& v) {
const T* it = find(v);
if (it < Data + Size) { erase(it);
return true; }
return false; }
2110 inline bool find_erase_unsorted(
const T& v) {
const T* it = find(v);
if (it < Data + Size) { erase_unsorted(it);
return true; }
return false; }
2111 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; }
2113IM_MSVC_RUNTIME_CHECKS_RESTORE
2126 float DisabledAlpha;
2128 float WindowRounding;
2129 float WindowBorderSize;
2132 ImGuiDir WindowMenuButtonPosition;
2133 float ChildRounding;
2134 float ChildBorderSize;
2135 float PopupRounding;
2136 float PopupBorderSize;
2138 float FrameRounding;
2139 float FrameBorderSize;
2143 ImVec2 TouchExtraPadding;
2144 float IndentSpacing;
2145 float ColumnsMinSpacing;
2146 float ScrollbarSize;
2147 float ScrollbarRounding;
2150 float LogSliderDeadzone;
2152 float TabBorderSize;
2153 float TabMinWidthForCloseButton;
2154 float TabBarBorderSize;
2155 float TabBarOverlineSize;
2156 float TableAngledHeadersAngle;
2157 ImVec2 TableAngledHeadersTextAlign;
2158 ImGuiDir ColorButtonPosition;
2160 ImVec2 SelectableTextAlign;
2161 float SeparatorTextBorderSize;
2162 ImVec2 SeparatorTextAlign;
2163 ImVec2 SeparatorTextPadding;
2164 ImVec2 DisplayWindowPadding;
2165 ImVec2 DisplaySafeAreaPadding;
2166 float MouseCursorScale;
2167 bool AntiAliasedLines;
2168 bool AntiAliasedLinesUseTex;
2169 bool AntiAliasedFill;
2170 float CurveTessellationTol;
2171 float CircleTessellationMaxError;
2172 ImVec4 Colors[ImGuiCol_COUNT];
2176 float HoverStationaryDelay;
2177 float HoverDelayShort;
2178 float HoverDelayNormal;
2179 ImGuiHoveredFlags HoverFlagsForTooltipMouse;
2180 ImGuiHoveredFlags HoverFlagsForTooltipNav;
2182 IMGUI_API ImGuiStyle();
2183 IMGUI_API
void ScaleAllSizes(
float scale_factor);
2204 float DownDurationPrev;
2214 ImGuiConfigFlags ConfigFlags;
2215 ImGuiBackendFlags BackendFlags;
2218 float IniSavingRate;
2219 const char* IniFilename;
2220 const char* LogFilename;
2225 float FontGlobalScale;
2226 bool FontAllowUserScaling;
2228 ImVec2 DisplayFramebufferScale;
2231 bool ConfigNavSwapGamepadButtons;
2232 bool ConfigNavMoveSetMousePos;
2233 bool ConfigNavCaptureKeyboard;
2234 bool ConfigNavEscapeClearFocusItem;
2235 bool ConfigNavEscapeClearFocusWindow;
2236 bool ConfigNavCursorVisibleAuto;
2237 bool ConfigNavCursorVisibleAlways;
2241 bool MouseDrawCursor;
2242 bool ConfigMacOSXBehaviors;
2243 bool ConfigInputTrickleEventQueue;
2244 bool ConfigInputTextCursorBlink;
2245 bool ConfigInputTextEnterKeepActive;
2246 bool ConfigDragClickToInputText;
2247 bool ConfigWindowsResizeFromEdges;
2248 bool ConfigWindowsMoveFromTitleBarOnly;
2249 bool ConfigWindowsCopyContentsWithCtrlC;
2250 bool ConfigScrollbarScrollByPage;
2251 float ConfigMemoryCompactTimer;
2255 float MouseDoubleClickTime;
2256 float MouseDoubleClickMaxDist;
2257 float MouseDragThreshold;
2258 float KeyRepeatDelay;
2259 float KeyRepeatRate;
2279 bool ConfigErrorRecovery;
2280 bool ConfigErrorRecoveryEnableAssert;
2281 bool ConfigErrorRecoveryEnableDebugLog;
2282 bool ConfigErrorRecoveryEnableTooltip;
2288 bool ConfigDebugIsDebuggerPresent;
2294 bool ConfigDebugHighlightIdConflicts;
2300 bool ConfigDebugBeginReturnValueOnce;
2301 bool ConfigDebugBeginReturnValueLoop;
2306 bool ConfigDebugIgnoreFocusLoss;
2309 bool ConfigDebugIniSettings;
2318 const char* BackendPlatformName;
2319 const char* BackendRendererName;
2320 void* BackendPlatformUserData;
2321 void* BackendRendererUserData;
2322 void* BackendLanguageUserData;
2329 IMGUI_API
void AddKeyEvent(ImGuiKey key,
bool down);
2330 IMGUI_API
void AddKeyAnalogEvent(ImGuiKey key,
bool down,
float v);
2331 IMGUI_API
void AddMousePosEvent(
float x,
float y);
2332 IMGUI_API
void AddMouseButtonEvent(
int button,
bool down);
2333 IMGUI_API
void AddMouseWheelEvent(
float wheel_x,
float wheel_y);
2334 IMGUI_API
void AddMouseSourceEvent(ImGuiMouseSource source);
2335 IMGUI_API
void AddFocusEvent(
bool focused);
2336 IMGUI_API
void AddInputCharacter(
unsigned int c);
2337 IMGUI_API
void AddInputCharacterUTF16(ImWchar16 c);
2338 IMGUI_API
void AddInputCharactersUTF8(
const char* str);
2340 IMGUI_API
void SetKeyEventNativeData(ImGuiKey key,
int native_keycode,
int native_scancode,
int native_legacy_index = -1);
2341 IMGUI_API
void SetAppAcceptingEvents(
bool accepting_events);
2342 IMGUI_API
void ClearEventsQueue();
2343 IMGUI_API
void ClearInputKeys();
2344 IMGUI_API
void ClearInputMouse();
2345#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
2346 IMGUI_API
void ClearInputCharacters();
2355 bool WantCaptureMouse;
2356 bool WantCaptureKeyboard;
2358 bool WantSetMousePos;
2359 bool WantSaveIniSettings;
2363 int MetricsRenderVertices;
2364 int MetricsRenderIndices;
2365 int MetricsRenderWindows;
2366 int MetricsActiveWindows;
2382 ImGuiMouseSource MouseSource;
2389 ImGuiKeyChord KeyMods;
2391 bool WantCaptureMouseUnlessPopupClose;
2393 ImVec2 MouseClickedPos[5];
2394 double MouseClickedTime[5];
2395 bool MouseClicked[5];
2396 bool MouseDoubleClicked[5];
2397 ImU16 MouseClickedCount[5];
2398 ImU16 MouseClickedLastCount[5];
2399 bool MouseReleased[5];
2400 bool MouseDownOwned[5];
2401 bool MouseDownOwnedUnlessPopupClose[5];
2402 bool MouseWheelRequestAxisSwap;
2403 bool MouseCtrlLeftAsRightClick;
2404 float MouseDownDuration[5];
2405 float MouseDownDurationPrev[5];
2406 float MouseDragMaxDistanceSqr[5];
2409 bool AppAcceptingEvents;
2410 ImWchar16 InputQueueSurrogate;
2425#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
2426 const char* (*GetClipboardTextFn)(
void* user_data);
2427 void (*SetClipboardTextFn)(
void* user_data,
const char* text);
2428 void* ClipboardUserData;
2431 IMGUI_API ImGuiIO();
2447struct ImGuiInputTextCallbackData
2450 ImGuiInputTextFlags EventFlag;
2451 ImGuiInputTextFlags Flags;
2471 IMGUI_API ImGuiInputTextCallbackData();
2472 IMGUI_API
void DeleteChars(
int pos,
int bytes_count);
2473 IMGUI_API
void InsertChars(
int pos,
const char* text,
const char* text_end = NULL);
2474 void SelectAll() { SelectionStart = 0; SelectionEnd = BufTextLen; }
2475 void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; }
2476 bool HasSelection()
const {
return SelectionStart != SelectionEnd; }
2498 ImGuiID SourceParentId;
2500 char DataType[32 + 1];
2504 ImGuiPayload() { Clear(); }
2505 void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0,
sizeof(DataType)); DataFrameCount = -1; Preview = Delivery =
false; }
2506 bool IsDataType(
const char* type)
const {
return DataFrameCount != -1 && strcmp(type, DataType) == 0; }
2507 bool IsPreview()
const {
return Preview; }
2508 bool IsDelivery()
const {
return Delivery; }
2516#define IM_UNICODE_CODEPOINT_INVALID 0xFFFD
2517#ifdef IMGUI_USE_WCHAR32
2518#define IM_UNICODE_CODEPOINT_MAX 0x10FFFF
2520#define IM_UNICODE_CODEPOINT_MAX 0xFFFF
2525struct ImGuiOnceUponAFrame
2527 ImGuiOnceUponAFrame() { RefFrame = -1; }
2528 mutable int RefFrame;
2529 operator bool()
const {
int current_frame = ImGui::GetFrameCount();
if (RefFrame == current_frame)
return false; RefFrame = current_frame;
return true; }
2533struct ImGuiTextFilter
2535 IMGUI_API ImGuiTextFilter(
const char* default_filter =
"");
2536 IMGUI_API
bool Draw(
const char* label =
"Filter (inc,-exc)",
float width = 0.0f);
2537 IMGUI_API
bool PassFilter(
const char* text,
const char* text_end = NULL)
const;
2538 IMGUI_API
void Build();
2539 void Clear() { InputBuf[0] = 0; Build(); }
2540 bool IsActive()
const {
return !Filters.empty(); }
2543 struct ImGuiTextRange
2548 ImGuiTextRange() { b = e = NULL; }
2549 ImGuiTextRange(
const char* _b,
const char* _e) { b = _b; e = _e; }
2550 bool empty()
const {
return b == e; }
2560struct ImGuiTextBuffer
2563 IMGUI_API
static char EmptyString[1];
2565 ImGuiTextBuffer() { }
2566 inline char operator[](
int i)
const { IM_ASSERT(Buf.Data != NULL);
return Buf.Data[i]; }
2567 const char* begin()
const {
return Buf.Data ? &Buf.front() : EmptyString; }
2568 const char* end()
const {
return Buf.Data ? &Buf.back() : EmptyString; }
2569 int size()
const {
return Buf.Size ? Buf.Size - 1 : 0; }
2570 bool empty()
const {
return Buf.Size <= 1; }
2571 void clear() { Buf.clear(); }
2572 void reserve(
int capacity) { Buf.reserve(capacity); }
2573 const char* c_str()
const {
return Buf.Data ? Buf.Data : EmptyString; }
2574 IMGUI_API
void append(
const char* str,
const char* str_end = NULL);
2575 IMGUI_API
void appendf(
const char* fmt, ...) IM_FMTARGS(2);
2576 IMGUI_API
void appendfv(
const char* fmt, va_list args) IM_FMTLIST(2);
2580struct ImGuiStoragePair
2583 union {
int val_i;
float val_f;
void* val_p; };
2584 ImGuiStoragePair(ImGuiID _key,
int _val) { key = _key; val_i = _val; }
2585 ImGuiStoragePair(ImGuiID _key,
float _val) { key = _key; val_f = _val; }
2586 ImGuiStoragePair(ImGuiID _key,
void* _val) { key = _key; val_p = _val; }
2605 void Clear() { Data.clear(); }
2606 IMGUI_API
int GetInt(ImGuiID key,
int default_val = 0)
const;
2607 IMGUI_API
void SetInt(ImGuiID key,
int val);
2608 IMGUI_API
bool GetBool(ImGuiID key,
bool default_val =
false)
const;
2609 IMGUI_API
void SetBool(ImGuiID key,
bool val);
2610 IMGUI_API
float GetFloat(ImGuiID key,
float default_val = 0.0f)
const;
2611 IMGUI_API
void SetFloat(ImGuiID key,
float val);
2612 IMGUI_API
void* GetVoidPtr(ImGuiID key)
const;
2613 IMGUI_API
void SetVoidPtr(ImGuiID key,
void* val);
2619 IMGUI_API
int* GetIntRef(ImGuiID key,
int default_val = 0);
2620 IMGUI_API
bool* GetBoolRef(ImGuiID key,
bool default_val =
false);
2621 IMGUI_API
float* GetFloatRef(ImGuiID key,
float default_val = 0.0f);
2622 IMGUI_API
void** GetVoidPtrRef(ImGuiID key,
void* default_val = NULL);
2625 IMGUI_API
void BuildSortByKey();
2627 IMGUI_API
void SetAllInt(
int val);
2629#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
2654struct ImGuiListClipper
2662 double StartSeekOffsetY;
2667 IMGUI_API ImGuiListClipper();
2668 IMGUI_API ~ImGuiListClipper();
2669 IMGUI_API
void Begin(
int items_count,
float items_height = -1.0f);
2670 IMGUI_API
void End();
2671 IMGUI_API
bool Step();
2675 inline void IncludeItemByIndex(
int item_index) { IncludeItemsByIndex(item_index, item_index + 1); }
2676 IMGUI_API
void IncludeItemsByIndex(
int item_begin,
int item_end);
2681 IMGUI_API
void SeekCursorForItem(
int item_index);
2683#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
2684 inline void IncludeRangeByIndices(
int item_begin,
int item_end) { IncludeItemsByIndex(item_begin, item_end); }
2685 inline void ForceDisplayRangeByIndices(
int item_begin,
int item_end) { IncludeItemsByIndex(item_begin, item_end); }
2694#ifdef IMGUI_DEFINE_MATH_OPERATORS
2695#define IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED
2696IM_MSVC_RUNTIME_CHECKS_OFF
2697static inline ImVec2 operator*(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x * rhs, lhs.y * rhs); }
2698static inline ImVec2 operator/(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x / rhs, lhs.y / rhs); }
2699static inline ImVec2 operator+(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x + rhs.x, lhs.y + rhs.y); }
2700static inline ImVec2 operator-(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x - rhs.x, lhs.y - rhs.y); }
2701static inline ImVec2 operator*(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
2702static inline ImVec2 operator/(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x / rhs.x, lhs.y / rhs.y); }
2704static inline ImVec2& operator*=(
ImVec2& lhs,
const float rhs) { lhs.x *= rhs; lhs.y *= rhs;
return lhs; }
2705static inline ImVec2& operator/=(
ImVec2& lhs,
const float rhs) { lhs.x /= rhs; lhs.y /= rhs;
return lhs; }
2706static inline ImVec2& operator+=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y;
return lhs; }
2707static inline ImVec2& operator-=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y;
return lhs; }
2708static inline ImVec2& operator*=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x *= rhs.x; lhs.y *= rhs.y;
return lhs; }
2709static inline ImVec2& operator/=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x /= rhs.x; lhs.y /= rhs.y;
return lhs; }
2710static inline bool operator==(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x == rhs.x && lhs.y == rhs.y; }
2711static inline bool operator!=(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x != rhs.x || lhs.y != rhs.y; }
2712static 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); }
2713static 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); }
2714static 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); }
2715static 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; }
2716static 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; }
2717IM_MSVC_RUNTIME_CHECKS_RESTORE
2723#ifndef IM_COL32_R_SHIFT
2724#ifdef IMGUI_USE_BGRA_PACKED_COLOR
2725#define IM_COL32_R_SHIFT 16
2726#define IM_COL32_G_SHIFT 8
2727#define IM_COL32_B_SHIFT 0
2728#define IM_COL32_A_SHIFT 24
2729#define IM_COL32_A_MASK 0xFF000000
2731#define IM_COL32_R_SHIFT 0
2732#define IM_COL32_G_SHIFT 8
2733#define IM_COL32_B_SHIFT 16
2734#define IM_COL32_A_SHIFT 24
2735#define IM_COL32_A_MASK 0xFF000000
2738#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))
2739#define IM_COL32_WHITE IM_COL32(255,255,255,255)
2740#define IM_COL32_BLACK IM_COL32(0,0,0,255)
2741#define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0)
2751 constexpr ImColor() { }
2752 constexpr ImColor(
float r,
float g,
float b,
float a = 1.0f) : Value(r, g, b, a) { }
2753 constexpr ImColor(
const ImVec4& col) : Value(col) {}
2754 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)) {}
2755 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)) {}
2756 inline operator ImU32()
const {
return ImGui::ColorConvertFloat4ToU32(Value); }
2757 inline operator ImVec4()
const {
return Value; }
2760 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; }
2761 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); }
2805enum ImGuiMultiSelectFlags_
2807 ImGuiMultiSelectFlags_None = 0,
2808 ImGuiMultiSelectFlags_SingleSelect = 1 << 0,
2809 ImGuiMultiSelectFlags_NoSelectAll = 1 << 1,
2810 ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2,
2811 ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3,
2812 ImGuiMultiSelectFlags_NoAutoClear = 1 << 4,
2813 ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5,
2814 ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6,
2815 ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7,
2816 ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8,
2817 ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9,
2818 ImGuiMultiSelectFlags_ClearOnClickVoid = 1 << 10,
2819 ImGuiMultiSelectFlags_ScopeWindow = 1 << 11,
2820 ImGuiMultiSelectFlags_ScopeRect = 1 << 12,
2821 ImGuiMultiSelectFlags_SelectOnClick = 1 << 13,
2822 ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14,
2824 ImGuiMultiSelectFlags_NavWrapX = 1 << 16,
2836 ImGuiSelectionUserData RangeSrcItem;
2837 ImGuiSelectionUserData NavIdItem;
2844enum ImGuiSelectionRequestType
2846 ImGuiSelectionRequestType_None = 0,
2847 ImGuiSelectionRequestType_SetAll,
2848 ImGuiSelectionRequestType_SetRange,
2855 ImGuiSelectionRequestType Type;
2857 ImS8 RangeDirection;
2858 ImGuiSelectionUserData RangeFirstItem;
2859 ImGuiSelectionUserData RangeLastItem;
2878struct ImGuiSelectionBasicStorage
2884 ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self,
int idx);
2885 int _SelectionOrder;
2889 IMGUI_API ImGuiSelectionBasicStorage();
2891 IMGUI_API
bool Contains(ImGuiID
id)
const;
2892 IMGUI_API
void Clear();
2893 IMGUI_API
void Swap(ImGuiSelectionBasicStorage& r);
2894 IMGUI_API
void SetItemSelected(ImGuiID
id,
bool selected);
2895 IMGUI_API
bool GetNextSelectedItem(
void** opaque_it, ImGuiID* out_id);
2896 inline ImGuiID GetStorageIdFromIndex(
int idx) {
return AdapterIndexToStorageId(
this, idx); }
2901struct ImGuiSelectionExternalStorage
2905 void (*AdapterSetItemSelected)(ImGuiSelectionExternalStorage* self,
int idx,
bool selected);
2908 IMGUI_API ImGuiSelectionExternalStorage();
2918#ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX
2919#define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (63)
2929#ifndef ImDrawCallback
2937#define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8)
2947 ImTextureID TextureId;
2948 unsigned int VtxOffset;
2949 unsigned int IdxOffset;
2950 unsigned int ElemCount;
2951 ImDrawCallback UserCallback;
2952 void* UserCallbackData;
2953 int UserCallbackDataSize;
2954 int UserCallbackDataOffset;
2956 ImDrawCmd() { memset(
this, 0,
sizeof(*
this)); }
2959 inline ImTextureID GetTexID()
const {
return TextureId; }
2963#ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT
2975IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
2982 ImTextureID TextureId;
2983 unsigned int VtxOffset;
2996struct ImDrawListSplitter
3002 inline ImDrawListSplitter() { memset(
this, 0,
sizeof(*
this)); }
3003 inline ~ImDrawListSplitter() { ClearFreeMemory(); }
3004 inline void Clear() { _Current = 0; _Count = 1; }
3005 IMGUI_API
void ClearFreeMemory();
3006 IMGUI_API
void Split(
ImDrawList* draw_list,
int count);
3008 IMGUI_API
void SetCurrentChannel(
ImDrawList* draw_list,
int channel_idx);
3015 ImDrawFlags_None = 0,
3016 ImDrawFlags_Closed = 1 << 0,
3017 ImDrawFlags_RoundCornersTopLeft = 1 << 4,
3018 ImDrawFlags_RoundCornersTopRight = 1 << 5,
3019 ImDrawFlags_RoundCornersBottomLeft = 1 << 6,
3020 ImDrawFlags_RoundCornersBottomRight = 1 << 7,
3021 ImDrawFlags_RoundCornersNone = 1 << 8,
3022 ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight,
3023 ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
3024 ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft,
3025 ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight,
3026 ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
3027 ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll,
3028 ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone,
3033enum ImDrawListFlags_
3035 ImDrawListFlags_None = 0,
3036 ImDrawListFlags_AntiAliasedLines = 1 << 0,
3037 ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1,
3038 ImDrawListFlags_AntiAliasedFill = 1 << 2,
3039 ImDrawListFlags_AllowVtxOffset = 1 << 3,
3057 ImDrawListFlags Flags;
3060 unsigned int _VtxCurrentIdx;
3063 ImDrawIdx* _IdxWritePtr;
3071 const char* _OwnerName;
3076 IMGUI_API ~ImDrawList();
3078 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect =
false);
3079 IMGUI_API
void PushClipRectFullScreen();
3080 IMGUI_API
void PopClipRect();
3081 IMGUI_API
void PushTextureID(ImTextureID texture_id);
3082 IMGUI_API
void PopTextureID();
3083 inline ImVec2 GetClipRectMin()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.x, cr.y); }
3084 inline ImVec2 GetClipRectMax()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.z, cr.w); }
3093 IMGUI_API
void AddLine(
const ImVec2& p1,
const ImVec2& p2, ImU32 col,
float thickness = 1.0f);
3094 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);
3095 IMGUI_API
void AddRectFilled(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col,
float rounding = 0.0f, ImDrawFlags flags = 0);
3096 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);
3097 IMGUI_API
void AddQuad(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness = 1.0f);
3099 IMGUI_API
void AddTriangle(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness = 1.0f);
3100 IMGUI_API
void AddTriangleFilled(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col);
3101 IMGUI_API
void AddCircle(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0,
float thickness = 1.0f);
3102 IMGUI_API
void AddCircleFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0);
3103 IMGUI_API
void AddNgon(
const ImVec2& center,
float radius, ImU32 col,
int num_segments,
float thickness = 1.0f);
3104 IMGUI_API
void AddNgonFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments);
3105 IMGUI_API
void AddEllipse(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0,
float thickness = 1.0f);
3106 IMGUI_API
void AddEllipseFilled(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0);
3107 IMGUI_API
void AddText(
const ImVec2& pos, ImU32 col,
const char* text_begin,
const char* text_end = NULL);
3108 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);
3109 IMGUI_API
void AddBezierCubic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness,
int num_segments = 0);
3110 IMGUI_API
void AddBezierQuadratic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness,
int num_segments = 0);
3115 IMGUI_API
void AddPolyline(
const ImVec2* points,
int num_points, ImU32 col, ImDrawFlags flags,
float thickness);
3116 IMGUI_API
void AddConvexPolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
3117 IMGUI_API
void AddConcavePolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
3123 IMGUI_API
void AddImage(ImTextureID user_texture_id,
const ImVec2& p_min,
const ImVec2& p_max,
const ImVec2& uv_min =
ImVec2(0, 0),
const ImVec2& uv_max =
ImVec2(1, 1), ImU32 col = IM_COL32_WHITE);
3124 IMGUI_API
void AddImageQuad(ImTextureID user_texture_id,
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);
3125 IMGUI_API
void AddImageRounded(ImTextureID user_texture_id,
const ImVec2& p_min,
const ImVec2& p_max,
const ImVec2& uv_min,
const ImVec2& uv_max, ImU32 col,
float rounding, ImDrawFlags flags = 0);
3130 inline void PathClear() { _Path.Size = 0; }
3131 inline void PathLineTo(
const ImVec2& pos) { _Path.push_back(pos); }
3132 inline void PathLineToMergeDuplicate(
const ImVec2& pos) {
if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); }
3133 inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
3134 inline void PathFillConcave(ImU32 col) { AddConcavePolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
3135 inline void PathStroke(ImU32 col, ImDrawFlags flags = 0,
float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, flags, thickness); _Path.Size = 0; }
3136 IMGUI_API
void PathArcTo(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments = 0);
3137 IMGUI_API
void PathArcToFast(
const ImVec2& center,
float radius,
int a_min_of_12,
int a_max_of_12);
3138 IMGUI_API
void PathEllipticalArcTo(
const ImVec2& center,
const ImVec2& radius,
float rot,
float a_min,
float a_max,
int num_segments = 0);
3139 IMGUI_API
void PathBezierCubicCurveTo(
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
int num_segments = 0);
3140 IMGUI_API
void PathBezierQuadraticCurveTo(
const ImVec2& p2,
const ImVec2& p3,
int num_segments = 0);
3141 IMGUI_API
void PathRect(
const ImVec2& rect_min,
const ImVec2& rect_max,
float rounding = 0.0f, ImDrawFlags flags = 0);
3152 IMGUI_API
void AddCallback(ImDrawCallback callback,
void* userdata,
size_t userdata_size = 0);
3155 IMGUI_API
void AddDrawCmd();
3156 IMGUI_API ImDrawList* CloneOutput()
const;
3164 inline void ChannelsSplit(
int count) { _Splitter.Split(
this, count); }
3165 inline void ChannelsMerge() { _Splitter.Merge(
this); }
3166 inline void ChannelsSetCurrent(
int n) { _Splitter.SetCurrentChannel(
this, n); }
3171 IMGUI_API
void PrimReserve(
int idx_count,
int vtx_count);
3172 IMGUI_API
void PrimUnreserve(
int idx_count,
int vtx_count);
3173 IMGUI_API
void PrimRect(
const ImVec2& a,
const ImVec2& b, ImU32 col);
3176 inline void PrimWriteVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
3177 inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
3178 inline void PrimVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
3188 IMGUI_API
void _ResetForNewFrame();
3189 IMGUI_API
void _ClearFreeMemory();
3190 IMGUI_API
void _PopUnusedDrawCmd();
3191 IMGUI_API
void _TryMergeDrawCmds();
3192 IMGUI_API
void _OnChangedClipRect();
3193 IMGUI_API
void _OnChangedTextureID();
3194 IMGUI_API
void _OnChangedVtxOffset();
3195 IMGUI_API
void _SetTextureID(ImTextureID texture_id);
3196 IMGUI_API
int _CalcCircleAutoSegmentCount(
float radius)
const;
3197 IMGUI_API
void _PathArcToFastEx(
const ImVec2& center,
float radius,
int a_min_sample,
int a_max_sample,
int a_step);
3198 IMGUI_API
void _PathArcToN(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments);
3217 ImDrawData() { Clear(); }
3218 IMGUI_API
void Clear();
3219 IMGUI_API
void AddDrawList(
ImDrawList* draw_list);
3220 IMGUI_API
void DeIndexAllBuffers();
3221 IMGUI_API
void ScaleClipRects(
const ImVec2& fb_scale);
3232 bool FontDataOwnedByAtlas;
3238 ImVec2 GlyphExtraSpacing;
3240 const ImWchar* GlyphRanges;
3241 float GlyphMinAdvanceX;
3242 float GlyphMaxAdvanceX;
3244 unsigned int FontBuilderFlags;
3245 float RasterizerMultiply;
3246 float RasterizerDensity;
3247 ImWchar EllipsisChar;
3253 IMGUI_API ImFontConfig();
3260 unsigned int Colored : 1;
3261 unsigned int Visible : 1;
3262 unsigned int Codepoint : 30;
3264 float X0, Y0, X1, Y1;
3265 float U0, V0, U1, V1;
3270struct ImFontGlyphRangesBuilder
3274 ImFontGlyphRangesBuilder() { Clear(); }
3275 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); }
3276 inline bool GetBit(
size_t n)
const {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31);
return (UsedChars[off] & mask) != 0; }
3277 inline void SetBit(
size_t n) {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; }
3278 inline void AddChar(ImWchar c) { SetBit(c); }
3279 IMGUI_API
void AddText(
const char* text,
const char* text_end = NULL);
3280 IMGUI_API
void AddRanges(
const ImWchar* ranges);
3285struct ImFontAtlasCustomRect
3287 unsigned short X, Y;
3290 unsigned short Width, Height;
3291 unsigned int GlyphID : 31;
3292 unsigned int GlyphColored : 1;
3293 float GlyphAdvanceX;
3296 ImFontAtlasCustomRect() { X = Y = 0xFFFF; Width = Height = 0; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset =
ImVec2(0, 0); Font = NULL; }
3297 bool IsPacked()
const {
return X != 0xFFFF; }
3301enum ImFontAtlasFlags_
3303 ImFontAtlasFlags_None = 0,
3304 ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
3305 ImFontAtlasFlags_NoMouseCursors = 1 << 1,
3306 ImFontAtlasFlags_NoBakedLines = 1 << 2,
3328 IMGUI_API ImFontAtlas();
3329 IMGUI_API ~ImFontAtlas();
3332 IMGUI_API
ImFont* AddFontFromFileTTF(
const char* filename,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3333 IMGUI_API
ImFont* AddFontFromMemoryTTF(
void* font_data,
int font_data_size,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3334 IMGUI_API
ImFont* AddFontFromMemoryCompressedTTF(
const void* compressed_font_data,
int compressed_font_data_size,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3335 IMGUI_API
ImFont* AddFontFromMemoryCompressedBase85TTF(
const char* compressed_font_data_base85,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3336 IMGUI_API
void ClearInputData();
3337 IMGUI_API
void ClearTexData();
3338 IMGUI_API
void ClearFonts();
3339 IMGUI_API
void Clear();
3346 IMGUI_API
bool Build();
3347 IMGUI_API
void GetTexDataAsAlpha8(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3348 IMGUI_API
void GetTexDataAsRGBA32(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3349 bool IsBuilt()
const {
return Fonts.Size > 0 && TexReady; }
3350 void SetTexID(ImTextureID
id) { TexID = id; }
3360 IMGUI_API
const ImWchar* GetGlyphRangesDefault();
3361 IMGUI_API
const ImWchar* GetGlyphRangesGreek();
3362 IMGUI_API
const ImWchar* GetGlyphRangesKorean();
3363 IMGUI_API
const ImWchar* GetGlyphRangesJapanese();
3364 IMGUI_API
const ImWchar* GetGlyphRangesChineseFull();
3365 IMGUI_API
const ImWchar* GetGlyphRangesChineseSimplifiedCommon();
3366 IMGUI_API
const ImWchar* GetGlyphRangesCyrillic();
3367 IMGUI_API
const ImWchar* GetGlyphRangesThai();
3368 IMGUI_API
const ImWchar* GetGlyphRangesVietnamese();
3381 IMGUI_API
int AddCustomRectRegular(
int width,
int height);
3382 IMGUI_API
int AddCustomRectFontGlyph(
ImFont* font, ImWchar
id,
int width,
int height,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
3383 ImFontAtlasCustomRect* GetCustomRectByIndex(
int index) { IM_ASSERT(index >= 0);
return &CustomRects[index]; }
3387 IMGUI_API
bool GetMouseCursorTexData(ImGuiMouseCursor cursor,
ImVec2* out_offset,
ImVec2* out_size,
ImVec2 out_uv_border[2],
ImVec2 out_uv_fill[2]);
3393 ImFontAtlasFlags Flags;
3395 int TexDesiredWidth;
3396 int TexGlyphPadding;
3403 bool TexPixelsUseColors;
3404 unsigned char* TexPixelsAlpha8;
3405 unsigned int* TexPixelsRGBA32;
3413 ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1];
3417 unsigned int FontBuilderFlags;
3420 int PackIdMouseCursors;
3434 float FallbackAdvanceX;
3446 short ConfigDataCount;
3447 short EllipsisCharCount;
3448 ImWchar EllipsisChar;
3449 ImWchar FallbackChar;
3450 float EllipsisWidth;
3451 float EllipsisCharStep;
3452 bool DirtyLookupTables;
3454 float Ascent, Descent;
3455 int MetricsTotalSurface;
3456 ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8];
3460 IMGUI_API ~ImFont();
3462 IMGUI_API
const ImFontGlyph*FindGlyphNoFallback(ImWchar c);
3463 float GetCharAdvance(ImWchar c) {
return ((
int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; }
3464 bool IsLoaded()
const {
return ContainerAtlas != NULL; }
3465 const char* GetDebugName()
const {
return ConfigData ? ConfigData->Name :
"<unknown>"; }
3469 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);
3470 IMGUI_API
const char* CalcWordWrapPositionA(
float scale,
const char* text,
const char* text_end,
float wrap_width);
3471 IMGUI_API
void RenderChar(
ImDrawList* draw_list,
float size,
const ImVec2& pos, ImU32 col, ImWchar c);
3472 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);
3475 IMGUI_API
void BuildLookupTable();
3476 IMGUI_API
void ClearOutputData();
3477 IMGUI_API
void GrowIndex(
int new_size);
3478 IMGUI_API
void AddGlyph(
const ImFontConfig* src_cfg, ImWchar c,
float x0,
float y0,
float x1,
float y1,
float u0,
float v0,
float u1,
float v1,
float advance_x);
3479 IMGUI_API
void AddRemapChar(ImWchar dst, ImWchar src,
bool overwrite_dst =
true);
3480 IMGUI_API
void SetGlyphVisible(ImWchar c,
bool visible);
3481 IMGUI_API
bool IsGlyphRangeUnused(
unsigned int c_begin,
unsigned int c_last);
3489enum ImGuiViewportFlags_
3491 ImGuiViewportFlags_None = 0,
3492 ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
3493 ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
3494 ImGuiViewportFlags_OwnedByApp = 1 << 2,
3507 ImGuiViewportFlags Flags;
3514 void* PlatformHandle;
3515 void* PlatformHandleRaw;
3517 ImGuiViewport() { memset(
this, 0,
sizeof(*
this)); }
3520 ImVec2 GetCenter()
const {
return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
3521 ImVec2 GetWorkCenter()
const {
return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
3529struct ImGuiPlatformIO
3531 IMGUI_API ImGuiPlatformIO();
3539 const char* (*Platform_GetClipboardTextFn)(
ImGuiContext* ctx);
3540 void (*Platform_SetClipboardTextFn)(
ImGuiContext* ctx,
const char* text);
3541 void* Platform_ClipboardUserData;
3545 bool (*Platform_OpenInShellFn)(
ImGuiContext* ctx,
const char* path);
3546 void* Platform_OpenInShellUserData;
3551 void* Platform_ImeUserData;
3556 ImWchar Platform_LocaleDecimalPoint;
3563 void* Renderer_RenderState;
3567struct ImGuiPlatformImeData
3571 float InputLineHeight;
3573 ImGuiPlatformImeData() { memset(
this, 0,
sizeof(*
this)); }
3582#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
3586 static inline void PushButtonRepeat(
bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
3587 static inline void PopButtonRepeat() { PopItemFlag(); }
3588 static inline void PushTabStop(
bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
3589 static inline void PopTabStop() { PopItemFlag(); }
3590 IMGUI_API ImVec2 GetContentRegionMax();
3591 IMGUI_API ImVec2 GetWindowContentRegionMin();
3592 IMGUI_API ImVec2 GetWindowContentRegionMax();
3594 static inline bool BeginChildFrame(ImGuiID
id,
const ImVec2& size, ImGuiWindowFlags window_flags = 0) {
return BeginChild(
id, size, ImGuiChildFlags_FrameStyle, window_flags); }
3595 static inline void EndChildFrame() { EndChild(); }
3598 static inline void ShowStackToolWindow(
bool* p_open = NULL) { ShowIDStackToolWindow(p_open); }
3599 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);
3600 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);
3602 IMGUI_API
void SetItemAllowOverlap();
3604 static inline void PushAllowKeyboardFocus(
bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
3605 static inline void PopAllowKeyboardFocus() { PopItemFlag(); }
3693#define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER)
3698#ifdef IMGUI_DISABLE_METRICS_WINDOW
3699#error IMGUI_DISABLE_METRICS_WINDOW was renamed to IMGUI_DISABLE_DEBUG_TOOLS, please use new name.
3704#if defined(__clang__)
3705#pragma clang diagnostic pop
3706#elif defined(__GNUC__)
3707#pragma GCC diagnostic pop
3711#pragma warning (pop)
3716#ifdef IMGUI_INCLUDE_IMGUI_USER_H
3717#ifdef IMGUI_USER_H_FILENAME
3718#include IMGUI_USER_H_FILENAME
3720#include "imgui_user.h"
Definition imgui_internal.h:771
Definition imgui_internal.h:3536
Definition imgui_internal.h:2030