30 #define IMGUI_VERSION "1.90.7 WIP" 31 #define IMGUI_VERSION_NUM 19067 32 #define IMGUI_HAS_TABLE 33 #define IMGUI_HAS_VIEWPORT // Viewport WIP branch 34 #define IMGUI_HAS_DOCK // Docking WIP branch 61 #ifdef IMGUI_USER_CONFIG 62 #include IMGUI_USER_CONFIG 84 #ifndef IMGUI_IMPL_API 85 #define IMGUI_IMPL_API IMGUI_API 91 #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h 93 #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) // Size of a static C-style array. Don't use on pointers! 94 #define IM_UNUSED(_VAR) ((void)(_VAR)) // Used to silence "unused variable warnings". Often useful as asserts may be stripped out from final builds. 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__)) 108 #define IM_FMTARGS(FMT) 109 #define IM_FMTLIST(FMT) 111 #define IM_FMTARGS(FMT) 112 #define IM_FMTLIST(FMT) 116 #if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(IMGUI_DEBUG_PARANOID) 117 #define IM_MSVC_RUNTIME_CHECKS_OFF __pragma(runtime_checks("",off)) __pragma(check_stack(off)) __pragma(strict_gs_check(push,off)) 118 #define IM_MSVC_RUNTIME_CHECKS_RESTORE __pragma(runtime_checks("",restore)) __pragma(check_stack()) __pragma(strict_gs_check(pop)) 120 #define IM_MSVC_RUNTIME_CHECKS_OFF 121 #define IM_MSVC_RUNTIME_CHECKS_RESTORE 126 #pragma warning (push) 127 #pragma warning (disable: 26495) // [Static Analyzer] Variable 'XXX' is uninitialized. Always initialize a member variable (type.6). 129 #if defined(__clang__) 130 #pragma clang diagnostic push 131 #if __has_warning("-Wunknown-warning-option") 132 #pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx' 134 #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' 135 #pragma clang diagnostic ignored "-Wold-style-cast" 136 #pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe 137 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" 138 #pragma clang diagnostic ignored "-Wreserved-identifier" // warning: identifier '_Xxx' is reserved because it starts with '_' followed by a capital letter 139 #pragma clang diagnostic ignored "-Wunsafe-buffer-usage" // warning: 'xxx' is an unsafe pointer used for buffer access 140 #elif defined(__GNUC__) 141 #pragma GCC diagnostic push 142 #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind 143 #pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead 192 enum ImGuiMouseSource : int;
193 typedef int ImGuiCol;
194 typedef int ImGuiCond;
195 typedef int ImGuiDataType;
196 typedef int ImGuiDir;
197 typedef int ImGuiMouseButton;
198 typedef int ImGuiMouseCursor;
199 typedef int ImGuiSortDirection;
200 typedef int ImGuiStyleVar;
201 typedef int ImGuiTableBgTarget;
208 typedef int ImDrawFlags;
209 typedef int ImDrawListFlags;
210 typedef int ImFontAtlasFlags;
211 typedef int ImGuiBackendFlags;
212 typedef int ImGuiButtonFlags;
213 typedef int ImGuiChildFlags;
214 typedef int ImGuiColorEditFlags;
215 typedef int ImGuiConfigFlags;
216 typedef int ImGuiComboFlags;
217 typedef int ImGuiDockNodeFlags;
218 typedef int ImGuiDragDropFlags;
219 typedef int ImGuiFocusedFlags;
220 typedef int ImGuiHoveredFlags;
221 typedef int ImGuiInputFlags;
222 typedef int ImGuiInputTextFlags;
223 typedef int ImGuiKeyChord;
224 typedef int ImGuiPopupFlags;
225 typedef int ImGuiSelectableFlags;
226 typedef int ImGuiSliderFlags;
227 typedef int ImGuiTabBarFlags;
228 typedef int ImGuiTabItemFlags;
229 typedef int ImGuiTableFlags;
230 typedef int ImGuiTableColumnFlags;
231 typedef int ImGuiTableRowFlags;
232 typedef int ImGuiTreeNodeFlags;
233 typedef int ImGuiViewportFlags;
234 typedef int ImGuiWindowFlags;
240 typedef void* ImTextureID;
247 typedef unsigned short ImDrawIdx;
251 typedef unsigned int ImGuiID;
252 typedef signed char ImS8;
253 typedef unsigned char ImU8;
254 typedef signed short ImS16;
255 typedef unsigned short ImU16;
256 typedef signed int ImS32;
257 typedef unsigned int ImU32;
258 typedef signed long long ImS64;
259 typedef unsigned long long ImU64;
263 typedef unsigned int ImWchar32;
264 typedef unsigned short ImWchar16;
265 #ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16] 266 typedef ImWchar32 ImWchar;
268 typedef ImWchar16 ImWchar;
274 typedef void* (*ImGuiMemAllocFunc)(
size_t sz,
void* user_data);
275 typedef void (*ImGuiMemFreeFunc)(
void* ptr,
void* user_data);
280 IM_MSVC_RUNTIME_CHECKS_OFF
284 constexpr
ImVec2() : x(0.0f), y(0.0f) { }
285 constexpr ImVec2(
float _x,
float _y) : x(_x), y(_y) { }
286 float& operator[] (
size_t idx) { IM_ASSERT(idx == 0 || idx == 1);
return ((
float*)(
void*)(
char*)
this)[idx]; }
287 float operator[] (
size_t idx)
const { IM_ASSERT(idx == 0 || idx == 1);
return ((
const float*)(
const void*)(
const char*)
this)[idx]; }
288 #ifdef IM_VEC2_CLASS_EXTRA 297 constexpr
ImVec4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) { }
298 constexpr ImVec4(
float _x,
float _y,
float _z,
float _w) : x(_x), y(_y), z(_z), w(_w) { }
299 #ifdef IM_VEC4_CLASS_EXTRA 303 IM_MSVC_RUNTIME_CHECKS_RESTORE
317 IMGUI_API
void DestroyContext(
ImGuiContext* ctx = NULL);
324 IMGUI_API
void NewFrame();
325 IMGUI_API
void EndFrame();
326 IMGUI_API
void Render();
330 IMGUI_API
void ShowDemoWindow(
bool* p_open = NULL);
331 IMGUI_API
void ShowMetricsWindow(
bool* p_open = NULL);
332 IMGUI_API
void ShowDebugLogWindow(
bool* p_open = NULL);
333 IMGUI_API
void ShowIDStackToolWindow(
bool* p_open = NULL);
334 IMGUI_API
void ShowAboutWindow(
bool* p_open = NULL);
335 IMGUI_API
void ShowStyleEditor(
ImGuiStyle* ref = NULL);
336 IMGUI_API
bool ShowStyleSelector(
const char* label);
337 IMGUI_API
void ShowFontSelector(
const char* label);
338 IMGUI_API
void ShowUserGuide();
339 IMGUI_API
const char* GetVersion();
342 IMGUI_API
void StyleColorsDark(
ImGuiStyle* dst = NULL);
343 IMGUI_API
void StyleColorsLight(
ImGuiStyle* dst = NULL);
344 IMGUI_API
void StyleColorsClassic(
ImGuiStyle* dst = NULL);
358 IMGUI_API
bool Begin(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
359 IMGUI_API
void End();
379 IMGUI_API
bool BeginChild(
const char* str_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
380 IMGUI_API
bool BeginChild(ImGuiID
id,
const ImVec2& size =
ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
381 IMGUI_API
void EndChild();
385 IMGUI_API
bool IsWindowAppearing();
386 IMGUI_API
bool IsWindowCollapsed();
387 IMGUI_API
bool IsWindowFocused(ImGuiFocusedFlags flags=0);
388 IMGUI_API
bool IsWindowHovered(ImGuiHoveredFlags flags=0);
390 IMGUI_API
float GetWindowDpiScale();
391 IMGUI_API
ImVec2 GetWindowPos();
392 IMGUI_API
ImVec2 GetWindowSize();
393 IMGUI_API
float GetWindowWidth();
394 IMGUI_API
float GetWindowHeight();
399 IMGUI_API
void SetNextWindowPos(
const ImVec2& pos, ImGuiCond cond = 0,
const ImVec2& pivot =
ImVec2(0, 0));
400 IMGUI_API
void SetNextWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
401 IMGUI_API
void SetNextWindowSizeConstraints(
const ImVec2& size_min,
const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL,
void* custom_callback_data = NULL);
402 IMGUI_API
void SetNextWindowContentSize(
const ImVec2& size);
403 IMGUI_API
void SetNextWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
404 IMGUI_API
void SetNextWindowFocus();
405 IMGUI_API
void SetNextWindowScroll(
const ImVec2& scroll);
406 IMGUI_API
void SetNextWindowBgAlpha(
float alpha);
407 IMGUI_API
void SetNextWindowViewport(ImGuiID viewport_id);
408 IMGUI_API
void SetWindowPos(
const ImVec2& pos, ImGuiCond cond = 0);
409 IMGUI_API
void SetWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
410 IMGUI_API
void SetWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
411 IMGUI_API
void SetWindowFocus();
412 IMGUI_API
void SetWindowFontScale(
float scale);
413 IMGUI_API
void SetWindowPos(
const char* name,
const ImVec2& pos, ImGuiCond cond = 0);
414 IMGUI_API
void SetWindowSize(
const char* name,
const ImVec2& size, ImGuiCond cond = 0);
415 IMGUI_API
void SetWindowCollapsed(
const char* name,
bool collapsed, ImGuiCond cond = 0);
416 IMGUI_API
void SetWindowFocus(
const char* name);
421 IMGUI_API
ImVec2 GetContentRegionAvail();
422 IMGUI_API
ImVec2 GetContentRegionMax();
423 IMGUI_API
ImVec2 GetWindowContentRegionMin();
424 IMGUI_API
ImVec2 GetWindowContentRegionMax();
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 PopStyleVar(
int count = 1);
449 IMGUI_API
void PushTabStop(
bool tab_stop);
450 IMGUI_API
void PopTabStop();
451 IMGUI_API
void PushButtonRepeat(
bool repeat);
452 IMGUI_API
void PopButtonRepeat();
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);
480 IMGUI_API
ImVec2 GetCursorScreenPos();
481 IMGUI_API
void SetCursorScreenPos(
const ImVec2& pos);
482 IMGUI_API
ImVec2 GetCursorPos();
483 IMGUI_API
float GetCursorPosX();
484 IMGUI_API
float GetCursorPosY();
485 IMGUI_API
void SetCursorPos(
const ImVec2& local_pos);
486 IMGUI_API
void SetCursorPosX(
float local_x);
487 IMGUI_API
void SetCursorPosY(
float local_y);
488 IMGUI_API
ImVec2 GetCursorStartPos();
491 IMGUI_API
void Separator();
492 IMGUI_API
void SameLine(
float offset_from_start_x=0.0f,
float spacing=-1.0f);
493 IMGUI_API
void NewLine();
494 IMGUI_API
void Spacing();
495 IMGUI_API
void Dummy(
const ImVec2& size);
496 IMGUI_API
void Indent(
float indent_w = 0.0f);
497 IMGUI_API
void Unindent(
float indent_w = 0.0f);
498 IMGUI_API
void BeginGroup();
499 IMGUI_API
void EndGroup();
500 IMGUI_API
void AlignTextToFramePadding();
501 IMGUI_API
float GetTextLineHeight();
502 IMGUI_API
float GetTextLineHeightWithSpacing();
503 IMGUI_API
float GetFrameHeight();
504 IMGUI_API
float GetFrameHeightWithSpacing();
517 IMGUI_API
void PushID(
const char* str_id);
518 IMGUI_API
void PushID(
const char* str_id_begin,
const char* str_id_end);
519 IMGUI_API
void PushID(
const void* ptr_id);
520 IMGUI_API
void PushID(
int int_id);
521 IMGUI_API
void PopID();
522 IMGUI_API ImGuiID GetID(
const char* str_id);
523 IMGUI_API ImGuiID GetID(
const char* str_id_begin,
const char* str_id_end);
524 IMGUI_API ImGuiID GetID(
const void* ptr_id);
527 IMGUI_API
void TextUnformatted(
const char* text,
const char* text_end = NULL);
528 IMGUI_API
void Text(
const char* fmt, ...) IM_FMTARGS(1);
529 IMGUI_API
void TextV(
const char* fmt, va_list args) IM_FMTLIST(1);
530 IMGUI_API
void TextColored(
const ImVec4& col,
const char* fmt, ...) IM_FMTARGS(2);
531 IMGUI_API
void TextColoredV(
const ImVec4& col,
const char* fmt, va_list args) IM_FMTLIST(2);
532 IMGUI_API
void TextDisabled(
const char* fmt, ...) IM_FMTARGS(1);
533 IMGUI_API
void TextDisabledV(
const char* fmt, va_list args) IM_FMTLIST(1);
534 IMGUI_API
void TextWrapped(
const char* fmt, ...) IM_FMTARGS(1);
535 IMGUI_API
void TextWrappedV(
const char* fmt, va_list args) IM_FMTLIST(1);
536 IMGUI_API
void LabelText(
const char* label,
const char* fmt, ...) IM_FMTARGS(2);
537 IMGUI_API
void LabelTextV(
const char* label,
const char* fmt, va_list args) IM_FMTLIST(2);
538 IMGUI_API
void BulletText(
const char* fmt, ...) IM_FMTARGS(1);
539 IMGUI_API
void BulletTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
540 IMGUI_API
void SeparatorText(
const char* label);
546 IMGUI_API
bool SmallButton(
const char* label);
547 IMGUI_API
bool InvisibleButton(
const char* str_id,
const ImVec2& size, ImGuiButtonFlags flags = 0);
548 IMGUI_API
bool ArrowButton(
const char* str_id, ImGuiDir dir);
549 IMGUI_API
bool Checkbox(
const char* label,
bool* v);
550 IMGUI_API
bool CheckboxFlags(
const char* label,
int* flags,
int flags_value);
551 IMGUI_API
bool CheckboxFlags(
const char* label,
unsigned int* flags,
unsigned int flags_value);
552 IMGUI_API
bool RadioButton(
const char* label,
bool active);
553 IMGUI_API
bool RadioButton(
const char* label,
int* v,
int v_button);
554 IMGUI_API
void ProgressBar(
float fraction,
const ImVec2& size_arg =
ImVec2(-FLT_MIN, 0),
const char* overlay = NULL);
555 IMGUI_API
void Bullet();
561 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));
562 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));
567 IMGUI_API
bool BeginCombo(
const char* label,
const char* preview_value, ImGuiComboFlags flags = 0);
568 IMGUI_API
void EndCombo();
569 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int popup_max_height_in_items = -1);
570 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char* items_separated_by_zeros,
int popup_max_height_in_items = -1);
571 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);
585 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);
586 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);
587 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);
588 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);
589 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);
590 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);
591 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);
592 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);
593 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);
594 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);
595 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);
596 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);
604 IMGUI_API
bool SliderFloat(
const char* label,
float* v,
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
605 IMGUI_API
bool SliderFloat2(
const char* label,
float v[2],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
606 IMGUI_API
bool SliderFloat3(
const char* label,
float v[3],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
607 IMGUI_API
bool SliderFloat4(
const char* label,
float v[4],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
608 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);
609 IMGUI_API
bool SliderInt(
const char* label,
int* v,
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
610 IMGUI_API
bool SliderInt2(
const char* label,
int v[2],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
611 IMGUI_API
bool SliderInt3(
const char* label,
int v[3],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
612 IMGUI_API
bool SliderInt4(
const char* label,
int v[4],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
613 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);
614 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);
615 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);
616 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);
617 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);
622 IMGUI_API
bool InputText(
const char* label,
char* buf,
size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
623 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);
624 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);
625 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);
626 IMGUI_API
bool InputFloat2(
const char* label,
float v[2],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
627 IMGUI_API
bool InputFloat3(
const char* label,
float v[3],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
628 IMGUI_API
bool InputFloat4(
const char* label,
float v[4],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
629 IMGUI_API
bool InputInt(
const char* label,
int* v,
int step = 1,
int step_fast = 100, ImGuiInputTextFlags flags = 0);
630 IMGUI_API
bool InputInt2(
const char* label,
int v[2], ImGuiInputTextFlags flags = 0);
631 IMGUI_API
bool InputInt3(
const char* label,
int v[3], ImGuiInputTextFlags flags = 0);
632 IMGUI_API
bool InputInt4(
const char* label,
int v[4], ImGuiInputTextFlags flags = 0);
633 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);
634 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);
635 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);
640 IMGUI_API
bool ColorEdit3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
641 IMGUI_API
bool ColorEdit4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0);
642 IMGUI_API
bool ColorPicker3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
643 IMGUI_API
bool ColorPicker4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0,
const float* ref_col = NULL);
644 IMGUI_API
bool ColorButton(
const char* desc_id,
const ImVec4& col, ImGuiColorEditFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
645 IMGUI_API
void SetColorEditOptions(ImGuiColorEditFlags flags);
649 IMGUI_API
bool TreeNode(
const char* label);
650 IMGUI_API
bool TreeNode(
const char* str_id,
const char* fmt, ...) IM_FMTARGS(2);
651 IMGUI_API
bool TreeNode(
const void* ptr_id,
const char* fmt, ...) IM_FMTARGS(2);
652 IMGUI_API
bool TreeNodeV(
const char* str_id,
const char* fmt, va_list args) IM_FMTLIST(2);
653 IMGUI_API
bool TreeNodeV(
const void* ptr_id,
const char* fmt, va_list args) IM_FMTLIST(2);
654 IMGUI_API
bool TreeNodeEx(
const char* label, ImGuiTreeNodeFlags flags = 0);
655 IMGUI_API
bool TreeNodeEx(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
656 IMGUI_API
bool TreeNodeEx(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
657 IMGUI_API
bool TreeNodeExV(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
658 IMGUI_API
bool TreeNodeExV(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
659 IMGUI_API
void TreePush(
const char* str_id);
660 IMGUI_API
void TreePush(
const void* ptr_id);
661 IMGUI_API
void TreePop();
662 IMGUI_API
float GetTreeNodeToLabelSpacing();
663 IMGUI_API
bool CollapsingHeader(
const char* label, ImGuiTreeNodeFlags flags = 0);
664 IMGUI_API
bool CollapsingHeader(
const char* label,
bool* p_visible, ImGuiTreeNodeFlags flags = 0);
665 IMGUI_API
void SetNextItemOpen(
bool is_open, ImGuiCond cond = 0);
670 IMGUI_API
bool Selectable(
const char* label,
bool selected =
false, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
671 IMGUI_API
bool Selectable(
const char* label,
bool* p_selected, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
679 IMGUI_API
bool BeginListBox(
const char* label,
const ImVec2& size =
ImVec2(0, 0));
680 IMGUI_API
void EndListBox();
681 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int height_in_items = -1);
682 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);
686 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));
687 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));
688 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));
689 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));
693 IMGUI_API
void Value(
const char* prefix,
bool b);
694 IMGUI_API
void Value(
const char* prefix,
int v);
695 IMGUI_API
void Value(
const char* prefix,
unsigned int v);
696 IMGUI_API
void Value(
const char* prefix,
float v,
const char* float_format = NULL);
703 IMGUI_API
bool BeginMenuBar();
704 IMGUI_API
void EndMenuBar();
705 IMGUI_API
bool BeginMainMenuBar();
706 IMGUI_API
void EndMainMenuBar();
707 IMGUI_API
bool BeginMenu(
const char* label,
bool enabled =
true);
708 IMGUI_API
void EndMenu();
709 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut = NULL,
bool selected =
false,
bool enabled =
true);
710 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut,
bool* p_selected,
bool enabled =
true);
716 IMGUI_API
bool BeginTooltip();
717 IMGUI_API
void EndTooltip();
718 IMGUI_API
void SetTooltip(
const char* fmt, ...) IM_FMTARGS(1);
719 IMGUI_API
void SetTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
725 IMGUI_API
bool BeginItemTooltip();
726 IMGUI_API
void SetItemTooltip(
const char* fmt, ...) IM_FMTARGS(1);
727 IMGUI_API
void SetItemTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
739 IMGUI_API
bool BeginPopup(
const char* str_id, ImGuiWindowFlags flags = 0);
740 IMGUI_API
bool BeginPopupModal(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
741 IMGUI_API
void EndPopup();
751 IMGUI_API
void OpenPopup(
const char* str_id, ImGuiPopupFlags popup_flags = 0);
752 IMGUI_API
void OpenPopup(ImGuiID
id, ImGuiPopupFlags popup_flags = 0);
753 IMGUI_API
void OpenPopupOnItemClick(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
754 IMGUI_API
void CloseCurrentPopup();
761 IMGUI_API
bool BeginPopupContextItem(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
762 IMGUI_API
bool BeginPopupContextWindow(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
763 IMGUI_API
bool BeginPopupContextVoid(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
769 IMGUI_API
bool IsPopupOpen(
const char* str_id, ImGuiPopupFlags flags = 0);
792 IMGUI_API
bool BeginTable(
const char* str_id,
int column, ImGuiTableFlags flags = 0,
const ImVec2& outer_size =
ImVec2(0.0f, 0.0f),
float inner_width = 0.0f);
793 IMGUI_API
void EndTable();
794 IMGUI_API
void TableNextRow(ImGuiTableRowFlags row_flags = 0,
float min_row_height = 0.0f);
795 IMGUI_API
bool TableNextColumn();
796 IMGUI_API
bool TableSetColumnIndex(
int column_n);
806 IMGUI_API
void TableSetupColumn(
const char* label, ImGuiTableColumnFlags flags = 0,
float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
807 IMGUI_API
void TableSetupScrollFreeze(
int cols,
int rows);
808 IMGUI_API
void TableHeader(
const char* label);
809 IMGUI_API
void TableHeadersRow();
810 IMGUI_API
void TableAngledHeadersRow();
819 IMGUI_API
int TableGetColumnCount();
820 IMGUI_API
int TableGetColumnIndex();
821 IMGUI_API
int TableGetRowIndex();
822 IMGUI_API
const char* TableGetColumnName(
int column_n = -1);
823 IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(
int column_n = -1);
824 IMGUI_API
void TableSetColumnEnabled(
int column_n,
bool v);
825 IMGUI_API
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color,
int column_n = -1);
829 IMGUI_API
void Columns(
int count = 1,
const char*
id = NULL,
bool border =
true);
830 IMGUI_API
void NextColumn();
831 IMGUI_API
int GetColumnIndex();
832 IMGUI_API
float GetColumnWidth(
int column_index = -1);
833 IMGUI_API
void SetColumnWidth(
int column_index,
float width);
834 IMGUI_API
float GetColumnOffset(
int column_index = -1);
835 IMGUI_API
void SetColumnOffset(
int column_index,
float offset_x);
836 IMGUI_API
int GetColumnsCount();
840 IMGUI_API
bool BeginTabBar(
const char* str_id, ImGuiTabBarFlags flags = 0);
841 IMGUI_API
void EndTabBar();
842 IMGUI_API
bool BeginTabItem(
const char* label,
bool* p_open = NULL, ImGuiTabItemFlags flags = 0);
843 IMGUI_API
void EndTabItem();
844 IMGUI_API
bool TabItemButton(
const char* label, ImGuiTabItemFlags flags = 0);
845 IMGUI_API
void SetTabItemClosed(
const char* tab_or_docked_window_label);
860 IMGUI_API ImGuiID DockSpace(ImGuiID dockspace_id,
const ImVec2& size =
ImVec2(0, 0), ImGuiDockNodeFlags flags = 0,
const ImGuiWindowClass* window_class = NULL);
861 IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0,
const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0,
const ImGuiWindowClass* window_class = NULL);
862 IMGUI_API
void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0);
864 IMGUI_API ImGuiID GetWindowDockID();
865 IMGUI_API
bool IsWindowDocked();
869 IMGUI_API
void LogToTTY(
int auto_open_depth = -1);
870 IMGUI_API
void LogToFile(
int auto_open_depth = -1,
const char* filename = NULL);
871 IMGUI_API
void LogToClipboard(
int auto_open_depth = -1);
872 IMGUI_API
void LogFinish();
873 IMGUI_API
void LogButtons();
874 IMGUI_API
void LogText(
const char* fmt, ...) IM_FMTARGS(1);
875 IMGUI_API
void LogTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
882 IMGUI_API
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0);
883 IMGUI_API
bool SetDragDropPayload(
const char* type,
const void* data,
size_t sz, ImGuiCond cond = 0);
884 IMGUI_API
void EndDragDropSource();
885 IMGUI_API
bool BeginDragDropTarget();
886 IMGUI_API
const ImGuiPayload* AcceptDragDropPayload(
const char* type, ImGuiDragDropFlags flags = 0);
887 IMGUI_API
void EndDragDropTarget();
894 IMGUI_API
void BeginDisabled(
bool disabled =
true);
895 IMGUI_API
void EndDisabled();
899 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect);
900 IMGUI_API
void PopClipRect();
904 IMGUI_API
void SetItemDefaultFocus();
905 IMGUI_API
void SetKeyboardFocusHere(
int offset = 0);
908 IMGUI_API
void SetNextItemAllowOverlap();
913 IMGUI_API
bool IsItemHovered(ImGuiHoveredFlags flags = 0);
914 IMGUI_API
bool IsItemActive();
915 IMGUI_API
bool IsItemFocused();
916 IMGUI_API
bool IsItemClicked(ImGuiMouseButton mouse_button = 0);
917 IMGUI_API
bool IsItemVisible();
918 IMGUI_API
bool IsItemEdited();
919 IMGUI_API
bool IsItemActivated();
920 IMGUI_API
bool IsItemDeactivated();
921 IMGUI_API
bool IsItemDeactivatedAfterEdit();
922 IMGUI_API
bool IsItemToggledOpen();
923 IMGUI_API
bool IsAnyItemHovered();
924 IMGUI_API
bool IsAnyItemActive();
925 IMGUI_API
bool IsAnyItemFocused();
926 IMGUI_API ImGuiID GetItemID();
927 IMGUI_API
ImVec2 GetItemRectMin();
928 IMGUI_API
ImVec2 GetItemRectMax();
929 IMGUI_API
ImVec2 GetItemRectSize();
938 IMGUI_API
ImDrawList* GetBackgroundDrawList();
939 IMGUI_API
ImDrawList* GetForegroundDrawList();
944 IMGUI_API
bool IsRectVisible(
const ImVec2& size);
945 IMGUI_API
bool IsRectVisible(
const ImVec2& rect_min,
const ImVec2& rect_max);
946 IMGUI_API
double GetTime();
947 IMGUI_API
int GetFrameCount();
949 IMGUI_API
const char* GetStyleColorName(ImGuiCol idx);
954 IMGUI_API
ImVec2 CalcTextSize(
const char* text,
const char* text_end = NULL,
bool hide_text_after_double_hash =
false,
float wrap_width = -1.0f);
957 IMGUI_API
ImVec4 ColorConvertU32ToFloat4(ImU32 in);
958 IMGUI_API ImU32 ColorConvertFloat4ToU32(
const ImVec4& in);
959 IMGUI_API
void ColorConvertRGBtoHSV(
float r,
float g,
float b,
float& out_h,
float& out_s,
float& out_v);
960 IMGUI_API
void ColorConvertHSVtoRGB(
float h,
float s,
float v,
float& out_r,
float& out_g,
float& out_b);
967 IMGUI_API
bool IsKeyDown(ImGuiKey key);
968 IMGUI_API
bool IsKeyPressed(ImGuiKey key,
bool repeat =
true);
969 IMGUI_API
bool IsKeyReleased(ImGuiKey key);
970 IMGUI_API
bool IsKeyChordPressed(ImGuiKeyChord key_chord);
971 IMGUI_API
int GetKeyPressedAmount(ImGuiKey key,
float repeat_delay,
float rate);
972 IMGUI_API
const char* GetKeyName(ImGuiKey key);
973 IMGUI_API
void SetNextFrameWantCaptureKeyboard(
bool want_capture_keyboard);
990 IMGUI_API
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
991 IMGUI_API
void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
997 IMGUI_API
bool IsMouseDown(ImGuiMouseButton button);
998 IMGUI_API
bool IsMouseClicked(ImGuiMouseButton button,
bool repeat =
false);
999 IMGUI_API
bool IsMouseReleased(ImGuiMouseButton button);
1000 IMGUI_API
bool IsMouseDoubleClicked(ImGuiMouseButton button);
1001 IMGUI_API
int GetMouseClickedCount(ImGuiMouseButton button);
1002 IMGUI_API
bool IsMouseHoveringRect(
const ImVec2& r_min,
const ImVec2& r_max,
bool clip =
true);
1003 IMGUI_API
bool IsMousePosValid(
const ImVec2* mouse_pos = NULL);
1004 IMGUI_API
bool IsAnyMouseDown();
1005 IMGUI_API
ImVec2 GetMousePos();
1006 IMGUI_API
ImVec2 GetMousePosOnOpeningCurrentPopup();
1007 IMGUI_API
bool IsMouseDragging(ImGuiMouseButton button,
float lock_threshold = -1.0f);
1008 IMGUI_API
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0,
float lock_threshold = -1.0f);
1009 IMGUI_API
void ResetMouseDragDelta(ImGuiMouseButton button = 0);
1010 IMGUI_API ImGuiMouseCursor GetMouseCursor();
1011 IMGUI_API
void SetMouseCursor(ImGuiMouseCursor cursor_type);
1012 IMGUI_API
void SetNextFrameWantCaptureMouse(
bool want_capture_mouse);
1016 IMGUI_API
const char* GetClipboardText();
1017 IMGUI_API
void SetClipboardText(
const char* text);
1023 IMGUI_API
void LoadIniSettingsFromDisk(
const char* ini_filename);
1024 IMGUI_API
void LoadIniSettingsFromMemory(
const char* ini_data,
size_t ini_size=0);
1025 IMGUI_API
void SaveIniSettingsToDisk(
const char* ini_filename);
1026 IMGUI_API
const char* SaveIniSettingsToMemory(
size_t* out_ini_size = NULL);
1030 IMGUI_API
void DebugTextEncoding(
const char* text);
1031 IMGUI_API
void DebugFlashStyleColor(ImGuiCol idx);
1032 IMGUI_API
void DebugStartItemPicker();
1033 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);
1039 IMGUI_API
void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func,
void* user_data = NULL);
1040 IMGUI_API
void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func,
void** p_user_data);
1041 IMGUI_API
void* MemAlloc(
size_t size);
1042 IMGUI_API
void MemFree(
void* ptr);
1048 IMGUI_API
void UpdatePlatformWindows();
1049 IMGUI_API
void RenderPlatformWindowsDefault(
void* platform_render_arg = NULL,
void* renderer_render_arg = NULL);
1050 IMGUI_API
void DestroyPlatformWindows();
1052 IMGUI_API
ImGuiViewport* FindViewportByPlatformHandle(
void* platform_handle);
1062 enum ImGuiWindowFlags_
1064 ImGuiWindowFlags_None = 0,
1065 ImGuiWindowFlags_NoTitleBar = 1 << 0,
1066 ImGuiWindowFlags_NoResize = 1 << 1,
1067 ImGuiWindowFlags_NoMove = 1 << 2,
1068 ImGuiWindowFlags_NoScrollbar = 1 << 3,
1069 ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
1070 ImGuiWindowFlags_NoCollapse = 1 << 5,
1071 ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
1072 ImGuiWindowFlags_NoBackground = 1 << 7,
1073 ImGuiWindowFlags_NoSavedSettings = 1 << 8,
1074 ImGuiWindowFlags_NoMouseInputs = 1 << 9,
1075 ImGuiWindowFlags_MenuBar = 1 << 10,
1076 ImGuiWindowFlags_HorizontalScrollbar = 1 << 11,
1077 ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12,
1078 ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
1079 ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,
1080 ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,
1081 ImGuiWindowFlags_NoNavInputs = 1 << 16,
1082 ImGuiWindowFlags_NoNavFocus = 1 << 17,
1083 ImGuiWindowFlags_UnsavedDocument = 1 << 18,
1084 ImGuiWindowFlags_NoDocking = 1 << 19,
1085 ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1086 ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse,
1087 ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
1090 ImGuiWindowFlags_NavFlattened = 1 << 23,
1091 ImGuiWindowFlags_ChildWindow = 1 << 24,
1092 ImGuiWindowFlags_Tooltip = 1 << 25,
1093 ImGuiWindowFlags_Popup = 1 << 26,
1094 ImGuiWindowFlags_Modal = 1 << 27,
1095 ImGuiWindowFlags_ChildMenu = 1 << 28,
1096 ImGuiWindowFlags_DockNodeHost = 1 << 29,
1099 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1100 ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30,
1113 enum ImGuiChildFlags_
1115 ImGuiChildFlags_None = 0,
1116 ImGuiChildFlags_Border = 1 << 0,
1117 ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1,
1118 ImGuiChildFlags_ResizeX = 1 << 2,
1119 ImGuiChildFlags_ResizeY = 1 << 3,
1120 ImGuiChildFlags_AutoResizeX = 1 << 4,
1121 ImGuiChildFlags_AutoResizeY = 1 << 5,
1122 ImGuiChildFlags_AlwaysAutoResize = 1 << 6,
1123 ImGuiChildFlags_FrameStyle = 1 << 7,
1128 enum ImGuiInputTextFlags_
1130 ImGuiInputTextFlags_None = 0,
1131 ImGuiInputTextFlags_CharsDecimal = 1 << 0,
1132 ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
1133 ImGuiInputTextFlags_CharsUppercase = 1 << 2,
1134 ImGuiInputTextFlags_CharsNoBlank = 1 << 3,
1135 ImGuiInputTextFlags_AutoSelectAll = 1 << 4,
1136 ImGuiInputTextFlags_EnterReturnsTrue = 1 << 5,
1137 ImGuiInputTextFlags_CallbackCompletion = 1 << 6,
1138 ImGuiInputTextFlags_CallbackHistory = 1 << 7,
1139 ImGuiInputTextFlags_CallbackAlways = 1 << 8,
1140 ImGuiInputTextFlags_CallbackCharFilter = 1 << 9,
1141 ImGuiInputTextFlags_AllowTabInput = 1 << 10,
1142 ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11,
1143 ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12,
1144 ImGuiInputTextFlags_AlwaysOverwrite = 1 << 13,
1145 ImGuiInputTextFlags_ReadOnly = 1 << 14,
1146 ImGuiInputTextFlags_Password = 1 << 15,
1147 ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
1148 ImGuiInputTextFlags_CharsScientific = 1 << 17,
1149 ImGuiInputTextFlags_CallbackResize = 1 << 18,
1150 ImGuiInputTextFlags_CallbackEdit = 1 << 19,
1151 ImGuiInputTextFlags_EscapeClearsAll = 1 << 20,
1158 enum ImGuiTreeNodeFlags_
1160 ImGuiTreeNodeFlags_None = 0,
1161 ImGuiTreeNodeFlags_Selected = 1 << 0,
1162 ImGuiTreeNodeFlags_Framed = 1 << 1,
1163 ImGuiTreeNodeFlags_AllowOverlap = 1 << 2,
1164 ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
1165 ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
1166 ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
1167 ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6,
1168 ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
1169 ImGuiTreeNodeFlags_Leaf = 1 << 8,
1170 ImGuiTreeNodeFlags_Bullet = 1 << 9,
1171 ImGuiTreeNodeFlags_FramePadding = 1 << 10,
1172 ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
1173 ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
1174 ImGuiTreeNodeFlags_SpanTextWidth = 1 << 13,
1175 ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14,
1176 ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 15,
1178 ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
1180 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1181 ImGuiTreeNodeFlags_AllowItemOverlap = ImGuiTreeNodeFlags_AllowOverlap,
1193 enum ImGuiPopupFlags_
1195 ImGuiPopupFlags_None = 0,
1196 ImGuiPopupFlags_MouseButtonLeft = 0,
1197 ImGuiPopupFlags_MouseButtonRight = 1,
1198 ImGuiPopupFlags_MouseButtonMiddle = 2,
1199 ImGuiPopupFlags_MouseButtonMask_ = 0x1F,
1200 ImGuiPopupFlags_MouseButtonDefault_ = 1,
1201 ImGuiPopupFlags_NoReopen = 1 << 5,
1203 ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7,
1204 ImGuiPopupFlags_NoOpenOverItems = 1 << 8,
1205 ImGuiPopupFlags_AnyPopupId = 1 << 10,
1206 ImGuiPopupFlags_AnyPopupLevel = 1 << 11,
1207 ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel,
1211 enum ImGuiSelectableFlags_
1213 ImGuiSelectableFlags_None = 0,
1214 ImGuiSelectableFlags_DontClosePopups = 1 << 0,
1215 ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
1216 ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
1217 ImGuiSelectableFlags_Disabled = 1 << 3,
1218 ImGuiSelectableFlags_AllowOverlap = 1 << 4,
1220 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1221 ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap,
1226 enum ImGuiComboFlags_
1228 ImGuiComboFlags_None = 0,
1229 ImGuiComboFlags_PopupAlignLeft = 1 << 0,
1230 ImGuiComboFlags_HeightSmall = 1 << 1,
1231 ImGuiComboFlags_HeightRegular = 1 << 2,
1232 ImGuiComboFlags_HeightLarge = 1 << 3,
1233 ImGuiComboFlags_HeightLargest = 1 << 4,
1234 ImGuiComboFlags_NoArrowButton = 1 << 5,
1235 ImGuiComboFlags_NoPreview = 1 << 6,
1236 ImGuiComboFlags_WidthFitPreview = 1 << 7,
1237 ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest,
1241 enum ImGuiTabBarFlags_
1243 ImGuiTabBarFlags_None = 0,
1244 ImGuiTabBarFlags_Reorderable = 1 << 0,
1245 ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
1246 ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
1247 ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3,
1248 ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
1249 ImGuiTabBarFlags_NoTooltip = 1 << 5,
1250 ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6,
1251 ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
1252 ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
1253 ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown,
1257 enum ImGuiTabItemFlags_
1259 ImGuiTabItemFlags_None = 0,
1260 ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
1261 ImGuiTabItemFlags_SetSelected = 1 << 1,
1262 ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
1263 ImGuiTabItemFlags_NoPushId = 1 << 3,
1264 ImGuiTabItemFlags_NoTooltip = 1 << 4,
1265 ImGuiTabItemFlags_NoReorder = 1 << 5,
1266 ImGuiTabItemFlags_Leading = 1 << 6,
1267 ImGuiTabItemFlags_Trailing = 1 << 7,
1268 ImGuiTabItemFlags_NoAssumedClosure = 1 << 8,
1272 enum ImGuiFocusedFlags_
1274 ImGuiFocusedFlags_None = 0,
1275 ImGuiFocusedFlags_ChildWindows = 1 << 0,
1276 ImGuiFocusedFlags_RootWindow = 1 << 1,
1277 ImGuiFocusedFlags_AnyWindow = 1 << 2,
1278 ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
1279 ImGuiFocusedFlags_DockHierarchy = 1 << 4,
1280 ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows,
1286 enum ImGuiHoveredFlags_
1288 ImGuiHoveredFlags_None = 0,
1289 ImGuiHoveredFlags_ChildWindows = 1 << 0,
1290 ImGuiHoveredFlags_RootWindow = 1 << 1,
1291 ImGuiHoveredFlags_AnyWindow = 1 << 2,
1292 ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
1293 ImGuiHoveredFlags_DockHierarchy = 1 << 4,
1294 ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
1296 ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
1297 ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8,
1298 ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9,
1299 ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10,
1300 ImGuiHoveredFlags_NoNavOverride = 1 << 11,
1301 ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow,
1302 ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
1303 ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows,
1311 ImGuiHoveredFlags_ForTooltip = 1 << 12,
1316 ImGuiHoveredFlags_Stationary = 1 << 13,
1317 ImGuiHoveredFlags_DelayNone = 1 << 14,
1318 ImGuiHoveredFlags_DelayShort = 1 << 15,
1319 ImGuiHoveredFlags_DelayNormal = 1 << 16,
1320 ImGuiHoveredFlags_NoSharedDelay = 1 << 17,
1326 enum ImGuiDockNodeFlags_
1328 ImGuiDockNodeFlags_None = 0,
1329 ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0,
1331 ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2,
1332 ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3,
1333 ImGuiDockNodeFlags_NoDockingSplit = 1 << 4,
1334 ImGuiDockNodeFlags_NoResize = 1 << 5,
1335 ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6,
1336 ImGuiDockNodeFlags_NoUndocking = 1 << 7,
1338 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1339 ImGuiDockNodeFlags_NoSplit = ImGuiDockNodeFlags_NoDockingSplit,
1340 ImGuiDockNodeFlags_NoDockingInCentralNode = ImGuiDockNodeFlags_NoDockingOverCentralNode,
1345 enum ImGuiDragDropFlags_
1347 ImGuiDragDropFlags_None = 0,
1349 ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
1350 ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
1351 ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
1352 ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
1353 ImGuiDragDropFlags_SourceExtern = 1 << 4,
1354 ImGuiDragDropFlags_SourceAutoExpirePayload = 1 << 5,
1356 ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
1357 ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
1358 ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
1359 ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect,
1363 #define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F" // float[3]: Standard type for colors, without alpha. User code may use this type. 1364 #define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F" // float[4]: Standard type for colors. User code may use this type. 1377 ImGuiDataType_Float,
1378 ImGuiDataType_Double,
1394 enum ImGuiSortDirection_
1396 ImGuiSortDirection_None = 0,
1397 ImGuiSortDirection_Ascending = 1,
1398 ImGuiSortDirection_Descending = 2
1402 #if defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && !defined(IMGUI_DISABLE_OBSOLETE_KEYIO) 1403 #define IMGUI_DISABLE_OBSOLETE_KEYIO 1418 ImGuiKey_RightArrow,
1431 ImGuiKey_LeftCtrl, ImGuiKey_LeftShift, ImGuiKey_LeftAlt, ImGuiKey_LeftSuper,
1432 ImGuiKey_RightCtrl, ImGuiKey_RightShift, ImGuiKey_RightAlt, ImGuiKey_RightSuper,
1434 ImGuiKey_0, ImGuiKey_1, ImGuiKey_2, ImGuiKey_3, ImGuiKey_4, ImGuiKey_5, ImGuiKey_6, ImGuiKey_7, ImGuiKey_8, ImGuiKey_9,
1435 ImGuiKey_A, ImGuiKey_B, ImGuiKey_C, ImGuiKey_D, ImGuiKey_E, ImGuiKey_F, ImGuiKey_G, ImGuiKey_H, ImGuiKey_I, ImGuiKey_J,
1436 ImGuiKey_K, ImGuiKey_L, ImGuiKey_M, ImGuiKey_N, ImGuiKey_O, ImGuiKey_P, ImGuiKey_Q, ImGuiKey_R, ImGuiKey_S, ImGuiKey_T,
1437 ImGuiKey_U, ImGuiKey_V, ImGuiKey_W, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z,
1438 ImGuiKey_F1, ImGuiKey_F2, ImGuiKey_F3, ImGuiKey_F4, ImGuiKey_F5, ImGuiKey_F6,
1439 ImGuiKey_F7, ImGuiKey_F8, ImGuiKey_F9, ImGuiKey_F10, ImGuiKey_F11, ImGuiKey_F12,
1440 ImGuiKey_F13, ImGuiKey_F14, ImGuiKey_F15, ImGuiKey_F16, ImGuiKey_F17, ImGuiKey_F18,
1441 ImGuiKey_F19, ImGuiKey_F20, ImGuiKey_F21, ImGuiKey_F22, ImGuiKey_F23, ImGuiKey_F24,
1442 ImGuiKey_Apostrophe,
1449 ImGuiKey_LeftBracket,
1451 ImGuiKey_RightBracket,
1452 ImGuiKey_GraveAccent,
1454 ImGuiKey_ScrollLock,
1456 ImGuiKey_PrintScreen,
1458 ImGuiKey_Keypad0, ImGuiKey_Keypad1, ImGuiKey_Keypad2, ImGuiKey_Keypad3, ImGuiKey_Keypad4,
1459 ImGuiKey_Keypad5, ImGuiKey_Keypad6, ImGuiKey_Keypad7, ImGuiKey_Keypad8, ImGuiKey_Keypad9,
1460 ImGuiKey_KeypadDecimal,
1461 ImGuiKey_KeypadDivide,
1462 ImGuiKey_KeypadMultiply,
1463 ImGuiKey_KeypadSubtract,
1465 ImGuiKey_KeypadEnter,
1466 ImGuiKey_KeypadEqual,
1468 ImGuiKey_AppForward,
1472 ImGuiKey_GamepadStart,
1473 ImGuiKey_GamepadBack,
1474 ImGuiKey_GamepadFaceLeft,
1475 ImGuiKey_GamepadFaceRight,
1476 ImGuiKey_GamepadFaceUp,
1477 ImGuiKey_GamepadFaceDown,
1478 ImGuiKey_GamepadDpadLeft,
1479 ImGuiKey_GamepadDpadRight,
1480 ImGuiKey_GamepadDpadUp,
1481 ImGuiKey_GamepadDpadDown,
1488 ImGuiKey_GamepadLStickLeft,
1489 ImGuiKey_GamepadLStickRight,
1490 ImGuiKey_GamepadLStickUp,
1491 ImGuiKey_GamepadLStickDown,
1492 ImGuiKey_GamepadRStickLeft,
1493 ImGuiKey_GamepadRStickRight,
1494 ImGuiKey_GamepadRStickUp,
1495 ImGuiKey_GamepadRStickDown,
1499 ImGuiKey_MouseLeft, ImGuiKey_MouseRight, ImGuiKey_MouseMiddle, ImGuiKey_MouseX1, ImGuiKey_MouseX2, ImGuiKey_MouseWheelX, ImGuiKey_MouseWheelY,
1502 ImGuiKey_ReservedForModCtrl, ImGuiKey_ReservedForModShift, ImGuiKey_ReservedForModAlt, ImGuiKey_ReservedForModSuper,
1515 ImGuiMod_Ctrl = 1 << 12,
1516 ImGuiMod_Shift = 1 << 13,
1517 ImGuiMod_Alt = 1 << 14,
1518 ImGuiMod_Super = 1 << 15,
1519 ImGuiMod_Mask_ = 0xF000,
1524 ImGuiKey_NamedKey_BEGIN = 512,
1525 ImGuiKey_NamedKey_END = ImGuiKey_COUNT,
1526 ImGuiKey_NamedKey_COUNT = ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN,
1527 #ifdef IMGUI_DISABLE_OBSOLETE_KEYIO 1528 ImGuiKey_KeysData_SIZE = ImGuiKey_NamedKey_COUNT,
1529 ImGuiKey_KeysData_OFFSET = ImGuiKey_NamedKey_BEGIN,
1531 ImGuiKey_KeysData_SIZE = ImGuiKey_COUNT,
1532 ImGuiKey_KeysData_OFFSET = 0,
1535 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1536 ImGuiMod_Shortcut = ImGuiMod_Ctrl,
1537 ImGuiKey_ModCtrl = ImGuiMod_Ctrl, ImGuiKey_ModShift = ImGuiMod_Shift, ImGuiKey_ModAlt = ImGuiMod_Alt, ImGuiKey_ModSuper = ImGuiMod_Super,
1545 enum ImGuiInputFlags_
1547 ImGuiInputFlags_None = 0,
1548 ImGuiInputFlags_Repeat = 1 << 0,
1553 ImGuiInputFlags_RouteActive = 1 << 10,
1554 ImGuiInputFlags_RouteFocused = 1 << 11,
1555 ImGuiInputFlags_RouteGlobal = 1 << 12,
1556 ImGuiInputFlags_RouteAlways = 1 << 13,
1558 ImGuiInputFlags_RouteOverFocused = 1 << 14,
1559 ImGuiInputFlags_RouteOverActive = 1 << 15,
1560 ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16,
1561 ImGuiInputFlags_RouteFromRootWindow = 1 << 17,
1564 ImGuiInputFlags_Tooltip = 1 << 18,
1567 #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO 1573 ImGuiNavInput_Activate, ImGuiNavInput_Cancel, ImGuiNavInput_Input, ImGuiNavInput_Menu, ImGuiNavInput_DpadLeft, ImGuiNavInput_DpadRight, ImGuiNavInput_DpadUp, ImGuiNavInput_DpadDown,
1574 ImGuiNavInput_LStickLeft, ImGuiNavInput_LStickRight, ImGuiNavInput_LStickUp, ImGuiNavInput_LStickDown, ImGuiNavInput_FocusPrev, ImGuiNavInput_FocusNext, ImGuiNavInput_TweakSlow, ImGuiNavInput_TweakFast,
1575 ImGuiNavInput_COUNT,
1580 enum ImGuiConfigFlags_
1582 ImGuiConfigFlags_None = 0,
1583 ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
1584 ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
1585 ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
1586 ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3,
1587 ImGuiConfigFlags_NoMouse = 1 << 4,
1588 ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
1591 ImGuiConfigFlags_DockingEnable = 1 << 6,
1595 ImGuiConfigFlags_ViewportsEnable = 1 << 10,
1596 ImGuiConfigFlags_DpiEnableScaleViewports= 1 << 14,
1597 ImGuiConfigFlags_DpiEnableScaleFonts = 1 << 15,
1600 ImGuiConfigFlags_IsSRGB = 1 << 20,
1601 ImGuiConfigFlags_IsTouchScreen = 1 << 21,
1605 enum ImGuiBackendFlags_
1607 ImGuiBackendFlags_None = 0,
1608 ImGuiBackendFlags_HasGamepad = 1 << 0,
1609 ImGuiBackendFlags_HasMouseCursors = 1 << 1,
1610 ImGuiBackendFlags_HasSetMousePos = 1 << 2,
1611 ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3,
1614 ImGuiBackendFlags_PlatformHasViewports = 1 << 10,
1615 ImGuiBackendFlags_HasMouseHoveredViewport=1 << 11,
1616 ImGuiBackendFlags_RendererHasViewports = 1 << 12,
1623 ImGuiCol_TextDisabled,
1628 ImGuiCol_BorderShadow,
1630 ImGuiCol_FrameBgHovered,
1631 ImGuiCol_FrameBgActive,
1633 ImGuiCol_TitleBgActive,
1634 ImGuiCol_TitleBgCollapsed,
1636 ImGuiCol_ScrollbarBg,
1637 ImGuiCol_ScrollbarGrab,
1638 ImGuiCol_ScrollbarGrabHovered,
1639 ImGuiCol_ScrollbarGrabActive,
1641 ImGuiCol_SliderGrab,
1642 ImGuiCol_SliderGrabActive,
1644 ImGuiCol_ButtonHovered,
1645 ImGuiCol_ButtonActive,
1647 ImGuiCol_HeaderHovered,
1648 ImGuiCol_HeaderActive,
1650 ImGuiCol_SeparatorHovered,
1651 ImGuiCol_SeparatorActive,
1652 ImGuiCol_ResizeGrip,
1653 ImGuiCol_ResizeGripHovered,
1654 ImGuiCol_ResizeGripActive,
1656 ImGuiCol_TabHovered,
1658 ImGuiCol_TabUnfocused,
1659 ImGuiCol_TabUnfocusedActive,
1660 ImGuiCol_DockingPreview,
1661 ImGuiCol_DockingEmptyBg,
1663 ImGuiCol_PlotLinesHovered,
1664 ImGuiCol_PlotHistogram,
1665 ImGuiCol_PlotHistogramHovered,
1666 ImGuiCol_TableHeaderBg,
1667 ImGuiCol_TableBorderStrong,
1668 ImGuiCol_TableBorderLight,
1669 ImGuiCol_TableRowBg,
1670 ImGuiCol_TableRowBgAlt,
1671 ImGuiCol_TextSelectedBg,
1672 ImGuiCol_DragDropTarget,
1673 ImGuiCol_NavHighlight,
1674 ImGuiCol_NavWindowingHighlight,
1675 ImGuiCol_NavWindowingDimBg,
1676 ImGuiCol_ModalWindowDimBg,
1691 ImGuiStyleVar_Alpha,
1692 ImGuiStyleVar_DisabledAlpha,
1693 ImGuiStyleVar_WindowPadding,
1694 ImGuiStyleVar_WindowRounding,
1695 ImGuiStyleVar_WindowBorderSize,
1696 ImGuiStyleVar_WindowMinSize,
1697 ImGuiStyleVar_WindowTitleAlign,
1698 ImGuiStyleVar_ChildRounding,
1699 ImGuiStyleVar_ChildBorderSize,
1700 ImGuiStyleVar_PopupRounding,
1701 ImGuiStyleVar_PopupBorderSize,
1702 ImGuiStyleVar_FramePadding,
1703 ImGuiStyleVar_FrameRounding,
1704 ImGuiStyleVar_FrameBorderSize,
1705 ImGuiStyleVar_ItemSpacing,
1706 ImGuiStyleVar_ItemInnerSpacing,
1707 ImGuiStyleVar_IndentSpacing,
1708 ImGuiStyleVar_CellPadding,
1709 ImGuiStyleVar_ScrollbarSize,
1710 ImGuiStyleVar_ScrollbarRounding,
1711 ImGuiStyleVar_GrabMinSize,
1712 ImGuiStyleVar_GrabRounding,
1713 ImGuiStyleVar_TabRounding,
1714 ImGuiStyleVar_TabBorderSize,
1715 ImGuiStyleVar_TabBarBorderSize,
1716 ImGuiStyleVar_TableAngledHeadersAngle,
1717 ImGuiStyleVar_TableAngledHeadersTextAlign,
1718 ImGuiStyleVar_ButtonTextAlign,
1719 ImGuiStyleVar_SelectableTextAlign,
1720 ImGuiStyleVar_SeparatorTextBorderSize,
1721 ImGuiStyleVar_SeparatorTextAlign,
1722 ImGuiStyleVar_SeparatorTextPadding,
1723 ImGuiStyleVar_DockingSeparatorSize,
1728 enum ImGuiButtonFlags_
1730 ImGuiButtonFlags_None = 0,
1731 ImGuiButtonFlags_MouseButtonLeft = 1 << 0,
1732 ImGuiButtonFlags_MouseButtonRight = 1 << 1,
1733 ImGuiButtonFlags_MouseButtonMiddle = 1 << 2,
1736 ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
1737 ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft,
1741 enum ImGuiColorEditFlags_
1743 ImGuiColorEditFlags_None = 0,
1744 ImGuiColorEditFlags_NoAlpha = 1 << 1,
1745 ImGuiColorEditFlags_NoPicker = 1 << 2,
1746 ImGuiColorEditFlags_NoOptions = 1 << 3,
1747 ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
1748 ImGuiColorEditFlags_NoInputs = 1 << 5,
1749 ImGuiColorEditFlags_NoTooltip = 1 << 6,
1750 ImGuiColorEditFlags_NoLabel = 1 << 7,
1751 ImGuiColorEditFlags_NoSidePreview = 1 << 8,
1752 ImGuiColorEditFlags_NoDragDrop = 1 << 9,
1753 ImGuiColorEditFlags_NoBorder = 1 << 10,
1756 ImGuiColorEditFlags_AlphaBar = 1 << 16,
1757 ImGuiColorEditFlags_AlphaPreview = 1 << 17,
1758 ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 18,
1759 ImGuiColorEditFlags_HDR = 1 << 19,
1760 ImGuiColorEditFlags_DisplayRGB = 1 << 20,
1761 ImGuiColorEditFlags_DisplayHSV = 1 << 21,
1762 ImGuiColorEditFlags_DisplayHex = 1 << 22,
1763 ImGuiColorEditFlags_Uint8 = 1 << 23,
1764 ImGuiColorEditFlags_Float = 1 << 24,
1765 ImGuiColorEditFlags_PickerHueBar = 1 << 25,
1766 ImGuiColorEditFlags_PickerHueWheel = 1 << 26,
1767 ImGuiColorEditFlags_InputRGB = 1 << 27,
1768 ImGuiColorEditFlags_InputHSV = 1 << 28,
1772 ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
1775 ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
1776 ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
1777 ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
1778 ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV,
1787 enum ImGuiSliderFlags_
1789 ImGuiSliderFlags_None = 0,
1790 ImGuiSliderFlags_AlwaysClamp = 1 << 4,
1791 ImGuiSliderFlags_Logarithmic = 1 << 5,
1792 ImGuiSliderFlags_NoRoundToFormat = 1 << 6,
1793 ImGuiSliderFlags_NoInput = 1 << 7,
1794 ImGuiSliderFlags_InvalidMask_ = 0x7000000F,
1802 enum ImGuiMouseButton_
1804 ImGuiMouseButton_Left = 0,
1805 ImGuiMouseButton_Right = 1,
1806 ImGuiMouseButton_Middle = 2,
1807 ImGuiMouseButton_COUNT = 5
1812 enum ImGuiMouseCursor_
1814 ImGuiMouseCursor_None = -1,
1815 ImGuiMouseCursor_Arrow = 0,
1816 ImGuiMouseCursor_TextInput,
1817 ImGuiMouseCursor_ResizeAll,
1818 ImGuiMouseCursor_ResizeNS,
1819 ImGuiMouseCursor_ResizeEW,
1820 ImGuiMouseCursor_ResizeNESW,
1821 ImGuiMouseCursor_ResizeNWSE,
1822 ImGuiMouseCursor_Hand,
1823 ImGuiMouseCursor_NotAllowed,
1824 ImGuiMouseCursor_COUNT
1831 enum ImGuiMouseSource :
int 1833 ImGuiMouseSource_Mouse = 0,
1834 ImGuiMouseSource_TouchScreen,
1835 ImGuiMouseSource_Pen,
1836 ImGuiMouseSource_COUNT
1845 ImGuiCond_Always = 1 << 0,
1846 ImGuiCond_Once = 1 << 1,
1847 ImGuiCond_FirstUseEver = 1 << 2,
1848 ImGuiCond_Appearing = 1 << 3,
1877 enum ImGuiTableFlags_
1880 ImGuiTableFlags_None = 0,
1881 ImGuiTableFlags_Resizable = 1 << 0,
1882 ImGuiTableFlags_Reorderable = 1 << 1,
1883 ImGuiTableFlags_Hideable = 1 << 2,
1884 ImGuiTableFlags_Sortable = 1 << 3,
1885 ImGuiTableFlags_NoSavedSettings = 1 << 4,
1886 ImGuiTableFlags_ContextMenuInBody = 1 << 5,
1888 ImGuiTableFlags_RowBg = 1 << 6,
1889 ImGuiTableFlags_BordersInnerH = 1 << 7,
1890 ImGuiTableFlags_BordersOuterH = 1 << 8,
1891 ImGuiTableFlags_BordersInnerV = 1 << 9,
1892 ImGuiTableFlags_BordersOuterV = 1 << 10,
1893 ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
1894 ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
1895 ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
1896 ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
1897 ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
1898 ImGuiTableFlags_NoBordersInBody = 1 << 11,
1899 ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
1901 ImGuiTableFlags_SizingFixedFit = 1 << 13,
1902 ImGuiTableFlags_SizingFixedSame = 2 << 13,
1903 ImGuiTableFlags_SizingStretchProp = 3 << 13,
1904 ImGuiTableFlags_SizingStretchSame = 4 << 13,
1906 ImGuiTableFlags_NoHostExtendX = 1 << 16,
1907 ImGuiTableFlags_NoHostExtendY = 1 << 17,
1908 ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
1909 ImGuiTableFlags_PreciseWidths = 1 << 19,
1911 ImGuiTableFlags_NoClip = 1 << 20,
1913 ImGuiTableFlags_PadOuterX = 1 << 21,
1914 ImGuiTableFlags_NoPadOuterX = 1 << 22,
1915 ImGuiTableFlags_NoPadInnerX = 1 << 23,
1917 ImGuiTableFlags_ScrollX = 1 << 24,
1918 ImGuiTableFlags_ScrollY = 1 << 25,
1920 ImGuiTableFlags_SortMulti = 1 << 26,
1921 ImGuiTableFlags_SortTristate = 1 << 27,
1923 ImGuiTableFlags_HighlightHoveredColumn = 1 << 28,
1926 ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame,
1930 enum ImGuiTableColumnFlags_
1933 ImGuiTableColumnFlags_None = 0,
1934 ImGuiTableColumnFlags_Disabled = 1 << 0,
1935 ImGuiTableColumnFlags_DefaultHide = 1 << 1,
1936 ImGuiTableColumnFlags_DefaultSort = 1 << 2,
1937 ImGuiTableColumnFlags_WidthStretch = 1 << 3,
1938 ImGuiTableColumnFlags_WidthFixed = 1 << 4,
1939 ImGuiTableColumnFlags_NoResize = 1 << 5,
1940 ImGuiTableColumnFlags_NoReorder = 1 << 6,
1941 ImGuiTableColumnFlags_NoHide = 1 << 7,
1942 ImGuiTableColumnFlags_NoClip = 1 << 8,
1943 ImGuiTableColumnFlags_NoSort = 1 << 9,
1944 ImGuiTableColumnFlags_NoSortAscending = 1 << 10,
1945 ImGuiTableColumnFlags_NoSortDescending = 1 << 11,
1946 ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12,
1947 ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13,
1948 ImGuiTableColumnFlags_PreferSortAscending = 1 << 14,
1949 ImGuiTableColumnFlags_PreferSortDescending = 1 << 15,
1950 ImGuiTableColumnFlags_IndentEnable = 1 << 16,
1951 ImGuiTableColumnFlags_IndentDisable = 1 << 17,
1952 ImGuiTableColumnFlags_AngledHeader = 1 << 18,
1955 ImGuiTableColumnFlags_IsEnabled = 1 << 24,
1956 ImGuiTableColumnFlags_IsVisible = 1 << 25,
1957 ImGuiTableColumnFlags_IsSorted = 1 << 26,
1958 ImGuiTableColumnFlags_IsHovered = 1 << 27,
1961 ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
1962 ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
1963 ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
1964 ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30,
1968 enum ImGuiTableRowFlags_
1970 ImGuiTableRowFlags_None = 0,
1971 ImGuiTableRowFlags_Headers = 1 << 0,
1983 enum ImGuiTableBgTarget_
1985 ImGuiTableBgTarget_None = 0,
1986 ImGuiTableBgTarget_RowBg0 = 1,
1987 ImGuiTableBgTarget_RowBg1 = 2,
1988 ImGuiTableBgTarget_CellBg = 3,
2007 ImGuiID ColumnUserID;
2010 ImGuiSortDirection SortDirection : 8;
2026 inline void*
operator new(size_t,
ImNewWrapper,
void* ptr) {
return ptr; }
2027 inline void operator delete(
void*,
ImNewWrapper,
void*) {}
2028 #define IM_ALLOC(_SIZE) ImGui::MemAlloc(_SIZE) 2029 #define IM_FREE(_PTR) ImGui::MemFree(_PTR) 2030 #define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR) 2031 #define IM_NEW(_TYPE) new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE 2032 template<
typename T>
void IM_DELETE(T* p) {
if (p) { p->~T(); ImGui::MemFree(p); } }
2045 IM_MSVC_RUNTIME_CHECKS_OFF
2046 template<
typename T>
2054 typedef T value_type;
2055 typedef value_type* iterator;
2056 typedef const value_type* const_iterator;
2059 inline ImVector() { Size = Capacity = 0; Data = NULL; }
2060 inline ImVector(
const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
2061 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; }
2062 inline ~
ImVector() {
if (Data) IM_FREE(Data); }
2064 inline void clear() {
if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
2065 inline void clear_delete() {
for (
int n = 0; n < Size; n++) IM_DELETE(Data[n]); clear(); }
2066 inline void clear_destruct() {
for (
int n = 0; n < Size; n++) Data[n].~T(); clear(); }
2068 inline bool empty()
const {
return Size == 0; }
2069 inline int size()
const {
return Size; }
2070 inline int size_in_bytes()
const {
return Size * (int)
sizeof(T); }
2071 inline int max_size()
const {
return 0x7FFFFFFF / (int)
sizeof(T); }
2072 inline int capacity()
const {
return Capacity; }
2073 inline T& operator[](
int i) { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2074 inline const T& operator[](
int i)
const { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
2076 inline T* begin() {
return Data; }
2077 inline const T* begin()
const {
return Data; }
2078 inline T* end() {
return Data + Size; }
2079 inline const T* end()
const {
return Data + Size; }
2080 inline T& front() { IM_ASSERT(Size > 0);
return Data[0]; }
2081 inline const T& front()
const { IM_ASSERT(Size > 0);
return Data[0]; }
2082 inline T& back() { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2083 inline const T& back()
const { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
2084 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; }
2086 inline int _grow_capacity(
int sz)
const {
int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8;
return new_capacity > sz ? new_capacity : sz; }
2087 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
2088 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; }
2089 inline void shrink(
int new_size) { IM_ASSERT(new_size <= Size); Size = new_size; }
2090 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; }
2091 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; }
2094 inline void push_back(
const T& v) {
if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v,
sizeof(v)); Size++; }
2095 inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
2096 inline void push_front(
const T& v) {
if (Size == 0) push_back(v);
else insert(Data, v); }
2097 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; }
2098 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; }
2099 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; }
2100 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; }
2101 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; }
2102 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; }
2103 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; }
2104 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; }
2105 inline bool find_erase(
const T& v) {
const T* it =
find(v);
if (it < Data + Size) { erase(it);
return true; }
return false; }
2106 inline bool find_erase_unsorted(
const T& v) {
const T* it =
find(v);
if (it < Data + Size) { erase_unsorted(it);
return true; }
return false; }
2107 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; }
2109 IM_MSVC_RUNTIME_CHECKS_RESTORE
2122 float DisabledAlpha;
2124 float WindowRounding;
2125 float WindowBorderSize;
2128 ImGuiDir WindowMenuButtonPosition;
2129 float ChildRounding;
2130 float ChildBorderSize;
2131 float PopupRounding;
2132 float PopupBorderSize;
2134 float FrameRounding;
2135 float FrameBorderSize;
2139 ImVec2 TouchExtraPadding;
2140 float IndentSpacing;
2141 float ColumnsMinSpacing;
2142 float ScrollbarSize;
2143 float ScrollbarRounding;
2146 float LogSliderDeadzone;
2148 float TabBorderSize;
2149 float TabMinWidthForCloseButton;
2150 float TabBarBorderSize;
2151 float TableAngledHeadersAngle;
2152 ImVec2 TableAngledHeadersTextAlign;
2153 ImGuiDir ColorButtonPosition;
2155 ImVec2 SelectableTextAlign;
2156 float SeparatorTextBorderSize;
2157 ImVec2 SeparatorTextAlign;
2158 ImVec2 SeparatorTextPadding;
2159 ImVec2 DisplayWindowPadding;
2160 ImVec2 DisplaySafeAreaPadding;
2161 float DockingSeparatorSize;
2162 float MouseCursorScale;
2163 bool AntiAliasedLines;
2164 bool AntiAliasedLinesUseTex;
2165 bool AntiAliasedFill;
2166 float CurveTessellationTol;
2167 float CircleTessellationMaxError;
2168 ImVec4 Colors[ImGuiCol_COUNT];
2172 float HoverStationaryDelay;
2173 float HoverDelayShort;
2174 float HoverDelayNormal;
2175 ImGuiHoveredFlags HoverFlagsForTooltipMouse;
2176 ImGuiHoveredFlags HoverFlagsForTooltipNav;
2179 IMGUI_API
void ScaleAllSizes(
float scale_factor);
2198 float DownDurationPrev;
2208 ImGuiConfigFlags ConfigFlags;
2209 ImGuiBackendFlags BackendFlags;
2212 float IniSavingRate;
2213 const char* IniFilename;
2214 const char* LogFilename;
2218 float FontGlobalScale;
2219 bool FontAllowUserScaling;
2221 ImVec2 DisplayFramebufferScale;
2224 bool ConfigDockingNoSplit;
2225 bool ConfigDockingWithShift;
2226 bool ConfigDockingAlwaysTabBar;
2227 bool ConfigDockingTransparentPayload;
2230 bool ConfigViewportsNoAutoMerge;
2231 bool ConfigViewportsNoTaskBarIcon;
2232 bool ConfigViewportsNoDecoration;
2233 bool ConfigViewportsNoDefaultParent;
2236 bool MouseDrawCursor;
2237 bool ConfigMacOSXBehaviors;
2238 bool ConfigInputTrickleEventQueue;
2239 bool ConfigInputTextCursorBlink;
2240 bool ConfigInputTextEnterKeepActive;
2241 bool ConfigDragClickToInputText;
2242 bool ConfigWindowsResizeFromEdges;
2243 bool ConfigWindowsMoveFromTitleBarOnly;
2244 float ConfigMemoryCompactTimer;
2248 float MouseDoubleClickTime;
2249 float MouseDoubleClickMaxDist;
2250 float MouseDragThreshold;
2251 float KeyRepeatDelay;
2252 float KeyRepeatRate;
2262 bool ConfigDebugIsDebuggerPresent;
2268 bool ConfigDebugBeginReturnValueOnce;
2269 bool ConfigDebugBeginReturnValueLoop;
2274 bool ConfigDebugIgnoreFocusLoss;
2277 bool ConfigDebugIniSettings;
2285 const char* BackendPlatformName;
2286 const char* BackendRendererName;
2287 void* BackendPlatformUserData;
2288 void* BackendRendererUserData;
2289 void* BackendLanguageUserData;
2293 const char* (*GetClipboardTextFn)(
void* user_data);
2294 void (*SetClipboardTextFn)(
void* user_data,
const char* text);
2295 void* ClipboardUserData;
2302 ImWchar PlatformLocaleDecimalPoint;
2309 IMGUI_API
void AddKeyEvent(ImGuiKey key,
bool down);
2310 IMGUI_API
void AddKeyAnalogEvent(ImGuiKey key,
bool down,
float v);
2311 IMGUI_API
void AddMousePosEvent(
float x,
float y);
2312 IMGUI_API
void AddMouseButtonEvent(
int button,
bool down);
2313 IMGUI_API
void AddMouseWheelEvent(
float wheel_x,
float wheel_y);
2314 IMGUI_API
void AddMouseSourceEvent(ImGuiMouseSource source);
2315 IMGUI_API
void AddMouseViewportEvent(ImGuiID
id);
2316 IMGUI_API
void AddFocusEvent(
bool focused);
2317 IMGUI_API
void AddInputCharacter(
unsigned int c);
2318 IMGUI_API
void AddInputCharacterUTF16(ImWchar16 c);
2319 IMGUI_API
void AddInputCharactersUTF8(
const char* str);
2321 IMGUI_API
void SetKeyEventNativeData(ImGuiKey key,
int native_keycode,
int native_scancode,
int native_legacy_index = -1);
2322 IMGUI_API
void SetAppAcceptingEvents(
bool accepting_events);
2323 IMGUI_API
void ClearEventsQueue();
2324 IMGUI_API
void ClearInputKeys();
2325 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2326 IMGUI_API
void ClearInputCharacters();
2335 bool WantCaptureMouse;
2336 bool WantCaptureKeyboard;
2338 bool WantSetMousePos;
2339 bool WantSaveIniSettings;
2343 int MetricsRenderVertices;
2344 int MetricsRenderIndices;
2345 int MetricsRenderWindows;
2346 int MetricsActiveWindows;
2362 ImGuiMouseSource MouseSource;
2363 ImGuiID MouseHoveredViewport;
2370 ImGuiKeyChord KeyMods;
2372 bool WantCaptureMouseUnlessPopupClose;
2374 ImVec2 MouseClickedPos[5];
2375 double MouseClickedTime[5];
2376 bool MouseClicked[5];
2377 bool MouseDoubleClicked[5];
2378 ImU16 MouseClickedCount[5];
2379 ImU16 MouseClickedLastCount[5];
2380 bool MouseReleased[5];
2381 bool MouseDownOwned[5];
2382 bool MouseDownOwnedUnlessPopupClose[5];
2383 bool MouseWheelRequestAxisSwap;
2384 bool MouseCtrlLeftAsRightClick;
2385 float MouseDownDuration[5];
2386 float MouseDownDurationPrev[5];
2387 ImVec2 MouseDragMaxDistanceAbs[5];
2388 float MouseDragMaxDistanceSqr[5];
2391 bool AppAcceptingEvents;
2392 ImS8 BackendUsingLegacyKeyArrays;
2393 bool BackendUsingLegacyNavInputArray;
2394 ImWchar16 InputQueueSurrogate;
2400 #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO 2401 int KeyMap[ImGuiKey_COUNT];
2402 bool KeysDown[ImGuiKey_COUNT];
2403 float NavInputs[ImGuiNavInput_COUNT];
2426 ImGuiInputTextFlags EventFlag;
2427 ImGuiInputTextFlags Flags;
2448 IMGUI_API
void DeleteChars(
int pos,
int bytes_count);
2449 IMGUI_API
void InsertChars(
int pos,
const char* text,
const char* text_end = NULL);
2450 void SelectAll() { SelectionStart = 0; SelectionEnd = BufTextLen; }
2451 void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; }
2452 bool HasSelection()
const {
return SelectionStart != SelectionEnd; }
2475 ImGuiID ParentViewportId;
2476 ImGuiID FocusRouteParentWindowId;
2477 ImGuiViewportFlags ViewportFlagsOverrideSet;
2478 ImGuiViewportFlags ViewportFlagsOverrideClear;
2479 ImGuiTabItemFlags TabItemFlagsOverrideSet;
2480 ImGuiDockNodeFlags DockNodeFlagsOverrideSet;
2481 bool DockingAlwaysTabBar;
2482 bool DockingAllowUnclassed;
2484 ImGuiWindowClass() { memset(
this, 0,
sizeof(*
this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed =
true; }
2496 ImGuiID SourceParentId;
2498 char DataType[32 + 1];
2503 void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0,
sizeof(DataType)); DataFrameCount = -1; Preview = Delivery =
false; }
2504 bool IsDataType(
const char* type)
const {
return DataFrameCount != -1 && strcmp(type, DataType) == 0; }
2505 bool IsPreview()
const {
return Preview; }
2506 bool IsDelivery()
const {
return Delivery; }
2514 #define IM_UNICODE_CODEPOINT_INVALID 0xFFFD // Invalid Unicode code point (standard value). 2515 #ifdef IMGUI_USE_WCHAR32 2516 #define IM_UNICODE_CODEPOINT_MAX 0x10FFFF // Maximum Unicode code point supported by this build. 2518 #define IM_UNICODE_CODEPOINT_MAX 0xFFFF // Maximum Unicode code point supported by this build. 2526 mutable int RefFrame;
2527 operator bool()
const {
int current_frame = ImGui::GetFrameCount();
if (RefFrame == current_frame)
return false; RefFrame = current_frame;
return true; }
2534 IMGUI_API
bool Draw(
const char* label =
"Filter (inc,-exc)",
float width = 0.0f);
2535 IMGUI_API
bool PassFilter(
const char* text,
const char* text_end = NULL)
const;
2536 IMGUI_API
void Build();
2537 void Clear() { InputBuf[0] = 0; Build(); }
2538 bool IsActive()
const {
return !Filters.empty(); }
2547 ImGuiTextRange(
const char* _b,
const char* _e) { b = _b; e = _e; }
2548 bool empty()
const {
return b == e; }
2561 IMGUI_API
static char EmptyString[1];
2564 inline char operator[](
int i)
const { IM_ASSERT(Buf.Data != NULL);
return Buf.Data[i]; }
2565 const char* begin()
const {
return Buf.Data ? &Buf.front() : EmptyString; }
2566 const char* end()
const {
return Buf.Data ? &Buf.back() : EmptyString; }
2567 int size()
const {
return Buf.Size ? Buf.Size - 1 : 0; }
2568 bool empty()
const {
return Buf.Size <= 1; }
2569 void clear() { Buf.clear(); }
2570 void reserve(
int capacity) { Buf.reserve(capacity); }
2571 const char* c_str()
const {
return Buf.Data ? Buf.Data : EmptyString; }
2572 IMGUI_API
void append(
const char* str,
const char* str_end = NULL);
2573 IMGUI_API
void appendf(
const char* fmt, ...) IM_FMTARGS(2);
2574 IMGUI_API
void appendfv(
const char* fmt, va_list args) IM_FMTLIST(2);
2591 union {
int val_i;
float val_f;
void* val_p; };
2602 void Clear() { Data.clear(); }
2603 IMGUI_API
int GetInt(ImGuiID key,
int default_val = 0)
const;
2604 IMGUI_API
void SetInt(ImGuiID key,
int val);
2605 IMGUI_API
bool GetBool(ImGuiID key,
bool default_val =
false)
const;
2606 IMGUI_API
void SetBool(ImGuiID key,
bool val);
2607 IMGUI_API
float GetFloat(ImGuiID key,
float default_val = 0.0f)
const;
2608 IMGUI_API
void SetFloat(ImGuiID key,
float val);
2609 IMGUI_API
void* GetVoidPtr(ImGuiID key)
const;
2610 IMGUI_API
void SetVoidPtr(ImGuiID key,
void* val);
2616 IMGUI_API
int* GetIntRef(ImGuiID key,
int default_val = 0);
2617 IMGUI_API
bool* GetBoolRef(ImGuiID key,
bool default_val =
false);
2618 IMGUI_API
float* GetFloatRef(ImGuiID key,
float default_val = 0.0f);
2619 IMGUI_API
void** GetVoidPtrRef(ImGuiID key,
void* default_val = NULL);
2622 IMGUI_API
void BuildSortByKey();
2624 IMGUI_API
void SetAllInt(
int val);
2660 IMGUI_API ~ImGuiListClipper();
2661 IMGUI_API
void Begin(
int items_count,
float items_height = -1.0f);
2662 IMGUI_API
void End();
2663 IMGUI_API
bool Step();
2667 inline void IncludeItemByIndex(
int item_index) { IncludeItemsByIndex(item_index, item_index + 1); }
2668 IMGUI_API
void IncludeItemsByIndex(
int item_begin,
int item_end);
2670 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2671 inline void IncludeRangeByIndices(
int item_begin,
int item_end) { IncludeItemsByIndex(item_begin, item_end); }
2672 inline void ForceDisplayRangeByIndices(
int item_begin,
int item_end) { IncludeItemsByIndex(item_begin, item_end); }
2681 #ifdef IMGUI_DEFINE_MATH_OPERATORS 2682 #define IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED 2683 IM_MSVC_RUNTIME_CHECKS_OFF
2684 static inline ImVec2 operator*(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x * rhs, lhs.y * rhs); }
2685 static inline ImVec2 operator/(
const ImVec2& lhs,
const float rhs) {
return ImVec2(lhs.x / rhs, lhs.y / rhs); }
2686 static inline ImVec2 operator+(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x + rhs.x, lhs.y + rhs.y); }
2687 static inline ImVec2 operator-(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x - rhs.x, lhs.y - rhs.y); }
2688 static inline ImVec2 operator*(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
2689 static inline ImVec2 operator/(
const ImVec2& lhs,
const ImVec2& rhs) {
return ImVec2(lhs.x / rhs.x, lhs.y / rhs.y); }
2691 static inline ImVec2& operator*=(
ImVec2& lhs,
const float rhs) { lhs.x *= rhs; lhs.y *= rhs;
return lhs; }
2692 static inline ImVec2& operator/=(
ImVec2& lhs,
const float rhs) { lhs.x /= rhs; lhs.y /= rhs;
return lhs; }
2693 static inline ImVec2& operator+=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y;
return lhs; }
2694 static inline ImVec2& operator-=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y;
return lhs; }
2695 static inline ImVec2& operator*=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x *= rhs.x; lhs.y *= rhs.y;
return lhs; }
2696 static inline ImVec2& operator/=(
ImVec2& lhs,
const ImVec2& rhs) { lhs.x /= rhs.x; lhs.y /= rhs.y;
return lhs; }
2697 static inline bool operator==(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x == rhs.x && lhs.y == rhs.y; }
2698 static inline bool operator!=(
const ImVec2& lhs,
const ImVec2& rhs) {
return lhs.x != rhs.x || lhs.y != rhs.y; }
2699 static 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); }
2700 static 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); }
2701 static 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); }
2702 static 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; }
2703 static 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; }
2704 IM_MSVC_RUNTIME_CHECKS_RESTORE
2709 #ifndef IM_COL32_R_SHIFT 2710 #ifdef IMGUI_USE_BGRA_PACKED_COLOR 2711 #define IM_COL32_R_SHIFT 16 2712 #define IM_COL32_G_SHIFT 8 2713 #define IM_COL32_B_SHIFT 0 2714 #define IM_COL32_A_SHIFT 24 2715 #define IM_COL32_A_MASK 0xFF000000 2717 #define IM_COL32_R_SHIFT 0 2718 #define IM_COL32_G_SHIFT 8 2719 #define IM_COL32_B_SHIFT 16 2720 #define IM_COL32_A_SHIFT 24 2721 #define IM_COL32_A_MASK 0xFF000000 2724 #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)) 2725 #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF 2726 #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black 2727 #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000 2738 constexpr
ImColor(
float r,
float g,
float b,
float a = 1.0f) : Value(r, g, b, a) { }
2739 constexpr ImColor(
const ImVec4& col) : Value(col) {}
2740 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)) {}
2741 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)) {}
2742 inline operator ImU32()
const {
return ImGui::ColorConvertFloat4ToU32(Value); }
2743 inline operator ImVec4()
const {
return Value; }
2746 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; }
2747 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); }
2756 #ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX 2757 #define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (63) 2767 #ifndef ImDrawCallback 2775 #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8) 2785 ImTextureID TextureId;
2786 unsigned int VtxOffset;
2787 unsigned int IdxOffset;
2788 unsigned int ElemCount;
2789 ImDrawCallback UserCallback;
2790 void* UserCallbackData;
2792 ImDrawCmd() { memset(
this, 0,
sizeof(*
this)); }
2795 inline ImTextureID GetTexID()
const {
return TextureId; }
2799 #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT 2811 IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
2818 ImTextureID TextureId;
2819 unsigned int VtxOffset;
2840 inline void Clear() { _Current = 0; _Count = 1; }
2841 IMGUI_API
void ClearFreeMemory();
2842 IMGUI_API
void Split(
ImDrawList* draw_list,
int count);
2844 IMGUI_API
void SetCurrentChannel(
ImDrawList* draw_list,
int channel_idx);
2851 ImDrawFlags_None = 0,
2852 ImDrawFlags_Closed = 1 << 0,
2853 ImDrawFlags_RoundCornersTopLeft = 1 << 4,
2854 ImDrawFlags_RoundCornersTopRight = 1 << 5,
2855 ImDrawFlags_RoundCornersBottomLeft = 1 << 6,
2856 ImDrawFlags_RoundCornersBottomRight = 1 << 7,
2857 ImDrawFlags_RoundCornersNone = 1 << 8,
2858 ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight,
2859 ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
2860 ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft,
2861 ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight,
2862 ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
2863 ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll,
2864 ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone,
2869 enum ImDrawListFlags_
2871 ImDrawListFlags_None = 0,
2872 ImDrawListFlags_AntiAliasedLines = 1 << 0,
2873 ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1,
2874 ImDrawListFlags_AntiAliasedFill = 1 << 2,
2875 ImDrawListFlags_AllowVtxOffset = 1 << 3,
2893 ImDrawListFlags Flags;
2896 unsigned int _VtxCurrentIdx;
2899 ImDrawIdx* _IdxWritePtr;
2906 const char* _OwnerName;
2912 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect =
false);
2913 IMGUI_API
void PushClipRectFullScreen();
2914 IMGUI_API
void PopClipRect();
2915 IMGUI_API
void PushTextureID(ImTextureID texture_id);
2916 IMGUI_API
void PopTextureID();
2917 inline ImVec2 GetClipRectMin()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.x, cr.y); }
2918 inline ImVec2 GetClipRectMax()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.z, cr.w); }
2927 IMGUI_API
void AddLine(
const ImVec2& p1,
const ImVec2& p2, ImU32 col,
float thickness = 1.0f);
2928 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);
2929 IMGUI_API
void AddRectFilled(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col,
float rounding = 0.0f, ImDrawFlags flags = 0);
2930 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);
2931 IMGUI_API
void AddQuad(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness = 1.0f);
2933 IMGUI_API
void AddTriangle(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness = 1.0f);
2934 IMGUI_API
void AddTriangleFilled(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col);
2935 IMGUI_API
void AddCircle(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0,
float thickness = 1.0f);
2936 IMGUI_API
void AddCircleFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0);
2937 IMGUI_API
void AddNgon(
const ImVec2& center,
float radius, ImU32 col,
int num_segments,
float thickness = 1.0f);
2938 IMGUI_API
void AddNgonFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments);
2939 IMGUI_API
void AddEllipse(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0,
float thickness = 1.0f);
2940 IMGUI_API
void AddEllipseFilled(
const ImVec2& center,
const ImVec2& radius, ImU32 col,
float rot = 0.0f,
int num_segments = 0);
2941 IMGUI_API
void AddText(
const ImVec2& pos, ImU32 col,
const char* text_begin,
const char* text_end = NULL);
2942 IMGUI_API
void AddText(
const 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);
2943 IMGUI_API
void AddBezierCubic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness,
int num_segments = 0);
2944 IMGUI_API
void AddBezierQuadratic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness,
int num_segments = 0);
2949 IMGUI_API
void AddPolyline(
const ImVec2* points,
int num_points, ImU32 col, ImDrawFlags flags,
float thickness);
2950 IMGUI_API
void AddConvexPolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
2951 IMGUI_API
void AddConcavePolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
2957 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);
2958 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);
2959 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);
2964 inline void PathClear() { _Path.Size = 0; }
2965 inline void PathLineTo(
const ImVec2& pos) { _Path.push_back(pos); }
2966 inline void PathLineToMergeDuplicate(
const ImVec2& pos) {
if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); }
2967 inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
2968 inline void PathFillConcave(ImU32 col) { AddConcavePolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
2969 inline void PathStroke(ImU32 col, ImDrawFlags flags = 0,
float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, flags, thickness); _Path.Size = 0; }
2970 IMGUI_API
void PathArcTo(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments = 0);
2971 IMGUI_API
void PathArcToFast(
const ImVec2& center,
float radius,
int a_min_of_12,
int a_max_of_12);
2972 IMGUI_API
void PathEllipticalArcTo(
const ImVec2& center,
const ImVec2& radius,
float rot,
float a_min,
float a_max,
int num_segments = 0);
2973 IMGUI_API
void PathBezierCubicCurveTo(
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
int num_segments = 0);
2974 IMGUI_API
void PathBezierQuadraticCurveTo(
const ImVec2& p2,
const ImVec2& p3,
int num_segments = 0);
2975 IMGUI_API
void PathRect(
const ImVec2& rect_min,
const ImVec2& rect_max,
float rounding = 0.0f, ImDrawFlags flags = 0);
2978 IMGUI_API
void AddCallback(ImDrawCallback callback,
void* callback_data);
2979 IMGUI_API
void AddDrawCmd();
2988 inline void ChannelsSplit(
int count) { _Splitter.Split(
this, count); }
2989 inline void ChannelsMerge() { _Splitter.Merge(
this); }
2990 inline void ChannelsSetCurrent(
int n) { _Splitter.SetCurrentChannel(
this, n); }
2995 IMGUI_API
void PrimReserve(
int idx_count,
int vtx_count);
2996 IMGUI_API
void PrimUnreserve(
int idx_count,
int vtx_count);
2997 IMGUI_API
void PrimRect(
const ImVec2& a,
const ImVec2& b, ImU32 col);
3000 inline void PrimWriteVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
3001 inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
3002 inline void PrimVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
3012 IMGUI_API
void _ResetForNewFrame();
3013 IMGUI_API
void _ClearFreeMemory();
3014 IMGUI_API
void _PopUnusedDrawCmd();
3015 IMGUI_API
void _TryMergeDrawCmds();
3016 IMGUI_API
void _OnChangedClipRect();
3017 IMGUI_API
void _OnChangedTextureID();
3018 IMGUI_API
void _OnChangedVtxOffset();
3019 IMGUI_API
int _CalcCircleAutoSegmentCount(
float radius)
const;
3020 IMGUI_API
void _PathArcToFastEx(
const ImVec2& center,
float radius,
int a_min_sample,
int a_max_sample,
int a_step);
3021 IMGUI_API
void _PathArcToN(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments);
3041 IMGUI_API
void Clear();
3042 IMGUI_API
void AddDrawList(
ImDrawList* draw_list);
3043 IMGUI_API
void DeIndexAllBuffers();
3044 IMGUI_API
void ScaleClipRects(
const ImVec2& fb_scale);
3055 bool FontDataOwnedByAtlas;
3061 ImVec2 GlyphExtraSpacing;
3063 const ImWchar* GlyphRanges;
3064 float GlyphMinAdvanceX;
3065 float GlyphMaxAdvanceX;
3067 unsigned int FontBuilderFlags;
3068 float RasterizerMultiply;
3069 float RasterizerDensity;
3070 ImWchar EllipsisChar;
3083 unsigned int Colored : 1;
3084 unsigned int Visible : 1;
3085 unsigned int Codepoint : 30;
3087 float X0, Y0, X1, Y1;
3088 float U0, V0, U1, V1;
3098 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); }
3099 inline bool GetBit(
size_t n)
const {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31);
return (UsedChars[off] & mask) != 0; }
3100 inline void SetBit(
size_t n) {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; }
3101 inline void AddChar(ImWchar c) { SetBit(c); }
3102 IMGUI_API
void AddText(
const char* text,
const char* text_end = NULL);
3103 IMGUI_API
void AddRanges(
const ImWchar* ranges);
3110 unsigned short Width, Height;
3111 unsigned short X, Y;
3112 unsigned int GlyphID;
3113 float GlyphAdvanceX;
3116 ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphAdvanceX = 0.0f; GlyphOffset =
ImVec2(0, 0); Font = NULL; }
3117 bool IsPacked()
const {
return X != 0xFFFF; }
3121 enum ImFontAtlasFlags_
3123 ImFontAtlasFlags_None = 0,
3124 ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
3125 ImFontAtlasFlags_NoMouseCursors = 1 << 1,
3126 ImFontAtlasFlags_NoBakedLines = 1 << 2,
3149 IMGUI_API ~ImFontAtlas();
3152 IMGUI_API
ImFont* AddFontFromFileTTF(
const char* filename,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3153 IMGUI_API
ImFont* AddFontFromMemoryTTF(
void* font_data,
int font_data_size,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3154 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);
3155 IMGUI_API
ImFont* AddFontFromMemoryCompressedBase85TTF(
const char* compressed_font_data_base85,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
3156 IMGUI_API
void ClearInputData();
3157 IMGUI_API
void ClearTexData();
3158 IMGUI_API
void ClearFonts();
3159 IMGUI_API
void Clear();
3166 IMGUI_API
bool Build();
3167 IMGUI_API
void GetTexDataAsAlpha8(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3168 IMGUI_API
void GetTexDataAsRGBA32(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
3169 bool IsBuilt()
const {
return Fonts.Size > 0 && TexReady; }
3170 void SetTexID(ImTextureID
id) { TexID = id; }
3180 IMGUI_API
const ImWchar* GetGlyphRangesDefault();
3181 IMGUI_API
const ImWchar* GetGlyphRangesGreek();
3182 IMGUI_API
const ImWchar* GetGlyphRangesKorean();
3183 IMGUI_API
const ImWchar* GetGlyphRangesJapanese();
3184 IMGUI_API
const ImWchar* GetGlyphRangesChineseFull();
3185 IMGUI_API
const ImWchar* GetGlyphRangesChineseSimplifiedCommon();
3186 IMGUI_API
const ImWchar* GetGlyphRangesCyrillic();
3187 IMGUI_API
const ImWchar* GetGlyphRangesThai();
3188 IMGUI_API
const ImWchar* GetGlyphRangesVietnamese();
3201 IMGUI_API
int AddCustomRectRegular(
int width,
int height);
3202 IMGUI_API
int AddCustomRectFontGlyph(
ImFont* font, ImWchar
id,
int width,
int height,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
3203 ImFontAtlasCustomRect* GetCustomRectByIndex(
int index) { IM_ASSERT(index >= 0);
return &CustomRects[index]; }
3207 IMGUI_API
bool GetMouseCursorTexData(ImGuiMouseCursor cursor,
ImVec2* out_offset,
ImVec2* out_size,
ImVec2 out_uv_border[2],
ImVec2 out_uv_fill[2]);
3213 ImFontAtlasFlags Flags;
3215 int TexDesiredWidth;
3216 int TexGlyphPadding;
3223 bool TexPixelsUseColors;
3224 unsigned char* TexPixelsAlpha8;
3225 unsigned int* TexPixelsRGBA32;
3233 ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1];
3237 unsigned int FontBuilderFlags;
3240 int PackIdMouseCursors;
3254 float FallbackAdvanceX;
3265 short ConfigDataCount;
3266 ImWchar FallbackChar;
3267 ImWchar EllipsisChar;
3268 short EllipsisCharCount;
3269 float EllipsisWidth;
3270 float EllipsisCharStep;
3271 bool DirtyLookupTables;
3273 float Ascent, Descent;
3274 int MetricsTotalSurface;
3275 ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8];
3279 IMGUI_API ~ImFont();
3280 IMGUI_API
const ImFontGlyph*FindGlyph(ImWchar c)
const;
3281 IMGUI_API
const ImFontGlyph*FindGlyphNoFallback(ImWchar c)
const;
3282 float GetCharAdvance(ImWchar c)
const {
return ((
int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; }
3283 bool IsLoaded()
const {
return ContainerAtlas != NULL; }
3284 const char* GetDebugName()
const {
return ConfigData ? ConfigData->Name :
"<unknown>"; }
3288 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)
const;
3289 IMGUI_API
const char* CalcWordWrapPositionA(
float scale,
const char* text,
const char* text_end,
float wrap_width)
const;
3290 IMGUI_API
void RenderChar(
ImDrawList* draw_list,
float size,
const ImVec2& pos, ImU32 col, ImWchar c)
const;
3291 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)
const;
3294 IMGUI_API
void BuildLookupTable();
3295 IMGUI_API
void ClearOutputData();
3296 IMGUI_API
void GrowIndex(
int new_size);
3297 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);
3298 IMGUI_API
void AddRemapChar(ImWchar dst, ImWchar src,
bool overwrite_dst =
true);
3299 IMGUI_API
void SetGlyphVisible(ImWchar c,
bool visible);
3300 IMGUI_API
bool IsGlyphRangeUnused(
unsigned int c_begin,
unsigned int c_last);
3308 enum ImGuiViewportFlags_
3310 ImGuiViewportFlags_None = 0,
3311 ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
3312 ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
3313 ImGuiViewportFlags_OwnedByApp = 1 << 2,
3314 ImGuiViewportFlags_NoDecoration = 1 << 3,
3315 ImGuiViewportFlags_NoTaskBarIcon = 1 << 4,
3316 ImGuiViewportFlags_NoFocusOnAppearing = 1 << 5,
3317 ImGuiViewportFlags_NoFocusOnClick = 1 << 6,
3318 ImGuiViewportFlags_NoInputs = 1 << 7,
3319 ImGuiViewportFlags_NoRendererClear = 1 << 8,
3320 ImGuiViewportFlags_NoAutoMerge = 1 << 9,
3321 ImGuiViewportFlags_TopMost = 1 << 10,
3322 ImGuiViewportFlags_CanHostOtherWindows = 1 << 11,
3325 ImGuiViewportFlags_IsMinimized = 1 << 12,
3326 ImGuiViewportFlags_IsFocused = 1 << 13,
3339 ImGuiViewportFlags Flags;
3345 ImGuiID ParentViewportId;
3353 void* RendererUserData;
3354 void* PlatformUserData;
3355 void* PlatformHandle;
3356 void* PlatformHandleRaw;
3357 bool PlatformWindowCreated;
3358 bool PlatformRequestMove;
3359 bool PlatformRequestResize;
3360 bool PlatformRequestClose;
3363 ~
ImGuiViewport() { IM_ASSERT(PlatformUserData == NULL && RendererUserData == NULL); }
3366 ImVec2 GetCenter()
const {
return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
3367 ImVec2 GetWorkCenter()
const {
return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
3450 void (*Platform_SetWindowTitle)(
ImGuiViewport* vp,
const char* str);
3451 void (*Platform_SetWindowAlpha)(
ImGuiViewport* vp,
float alpha);
3453 void (*Platform_RenderWindow)(
ImGuiViewport* vp,
void* render_arg);
3454 void (*Platform_SwapBuffers)(
ImGuiViewport* vp,
void* render_arg);
3457 int (*Platform_CreateVkSurface)(
ImGuiViewport* vp, ImU64 vk_inst,
const void* vk_allocators, ImU64* out_vk_surface);
3463 void (*Renderer_RenderWindow)(
ImGuiViewport* vp,
void* render_arg);
3464 void (*Renderer_SwapBuffers)(
ImGuiViewport* vp,
void* render_arg);
3485 ImVec2 MainPos, MainSize;
3486 ImVec2 WorkPos, WorkSize;
3488 void* PlatformHandle;
3497 float InputLineHeight;
3508 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3512 static inline bool BeginChildFrame(ImGuiID
id,
const ImVec2& size, ImGuiWindowFlags window_flags = 0) {
return BeginChild(
id, size, ImGuiChildFlags_FrameStyle, window_flags); }
3513 static inline void EndChildFrame() { EndChild(); }
3516 static inline void ShowStackToolWindow(
bool* p_open = NULL) { ShowIDStackToolWindow(p_open); }
3517 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);
3518 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);
3520 IMGUI_API
void SetItemAllowOverlap();
3522 static inline void PushAllowKeyboardFocus(
bool tab_stop) { PushTabStop(tab_stop); }
3523 static inline void PopAllowKeyboardFocus() { PopTabStop(); }
3525 IMGUI_API
bool ImageButton(ImTextureID user_texture_id,
const ImVec2& size,
const ImVec2& uv0 =
ImVec2(0, 0),
const ImVec2& uv1 =
ImVec2(1, 1),
int frame_padding = -1,
const ImVec4& bg_col =
ImVec4(0, 0, 0, 0),
const ImVec4& tint_col =
ImVec4(1, 1, 1, 1));
3527 static inline void CaptureKeyboardFromApp(
bool want_capture_keyboard =
true) { SetNextFrameWantCaptureKeyboard(want_capture_keyboard); }
3528 static inline void CaptureMouseFromApp(
bool want_capture_mouse =
true) { SetNextFrameWantCaptureMouse(want_capture_mouse); }
3530 IMGUI_API ImGuiKey GetKeyIndex(ImGuiKey key);
3606 typedef ImGuiKeyChord ImGuiModFlags;
3607 enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiModFlags_Shift = ImGuiMod_Shift, ImGuiModFlags_Alt = ImGuiMod_Alt, ImGuiModFlags_Super = ImGuiMod_Super };
3611 #define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER) // OBSOLETED IN 1.90 (now using C++11 standard version) 3613 #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 3616 #if defined(IMGUI_DISABLE_METRICS_WINDOW) && !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && !defined(IMGUI_DISABLE_DEBUG_TOOLS) 3617 #define IMGUI_DISABLE_DEBUG_TOOLS 3619 #if defined(IMGUI_DISABLE_METRICS_WINDOW) && defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) 3620 #error IMGUI_DISABLE_METRICS_WINDOW was renamed to IMGUI_DISABLE_DEBUG_TOOLS, please use new name. 3625 #if defined(__clang__) 3626 #pragma clang diagnostic pop 3627 #elif defined(__GNUC__) 3628 #pragma GCC diagnostic pop 3632 #pragma warning (pop) 3637 #ifdef IMGUI_INCLUDE_IMGUI_USER_H 3638 #ifdef IMGUI_USER_H_FILENAME 3639 #include IMGUI_USER_H_FILENAME 3641 #include "imgui_user.h" 3645 #endif // #ifndef IMGUI_DISABLE Definition: imgui_internal.h:782
In find(In first, In last, const T &v)
Definition: algorithm.h:225
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: imgui_internal.h:3857
Definition: imgui_internal.h:2103
Definition: movie_decoder.h:32