42 #ifdef IMGUI_USER_CONFIG 43 #include IMGUI_USER_CONFIG 45 #if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H) 63 #define IMGUI_VERSION "1.82" 64 #define IMGUI_VERSION_NUM 18200 65 #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) 66 #define IMGUI_HAS_TABLE 74 #ifndef IMGUI_IMPL_API 75 #define IMGUI_IMPL_API IMGUI_API 81 #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h 83 #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) // Size of a static C-style array. Don't use on pointers! 84 #define IM_UNUSED(_VAR) ((void)(_VAR)) // Used to silence "unused variable warnings". Often useful as asserts may be stripped out from final builds. 85 #if (__cplusplus >= 201100) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201100) 86 #define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER) // Offset of _MEMBER within _TYPE. Standardized as offsetof() in C++11 88 #define IM_OFFSETOF(_TYPE,_MEMBER) ((size_t)&(((_TYPE*)0)->_MEMBER)) // Offset of _MEMBER within _TYPE. Old style macro. 92 #if !defined(IMGUI_USE_STB_SPRINTF) && defined(__clang__) 93 #define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1))) 94 #define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0))) 95 #elif !defined(IMGUI_USE_STB_SPRINTF) && defined(__GNUC__) && defined(__MINGW32__) 96 #define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1))) 97 #define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0))) 99 #define IM_FMTARGS(FMT) 100 #define IM_FMTLIST(FMT) 104 #if defined(__clang__) 105 #pragma clang diagnostic push 106 #pragma clang diagnostic ignored "-Wold-style-cast" 107 #if __has_warning("-Wzero-as-null-pointer-constant") 108 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" 110 #elif defined(__GNUC__) 111 #pragma GCC diagnostic push 112 #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind 113 #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 154 typedef int ImGuiCol;
155 typedef int ImGuiCond;
156 typedef int ImGuiDataType;
157 typedef int ImGuiDir;
158 typedef int ImGuiKey;
159 typedef int ImGuiNavInput;
160 typedef int ImGuiMouseButton;
161 typedef int ImGuiMouseCursor;
162 typedef int ImGuiSortDirection;
163 typedef int ImGuiStyleVar;
164 typedef int ImGuiTableBgTarget;
165 typedef int ImDrawFlags;
166 typedef int ImDrawListFlags;
167 typedef int ImFontAtlasFlags;
168 typedef int ImGuiBackendFlags;
169 typedef int ImGuiButtonFlags;
170 typedef int ImGuiColorEditFlags;
171 typedef int ImGuiConfigFlags;
172 typedef int ImGuiComboFlags;
173 typedef int ImGuiDragDropFlags;
174 typedef int ImGuiFocusedFlags;
175 typedef int ImGuiHoveredFlags;
176 typedef int ImGuiInputTextFlags;
177 typedef int ImGuiKeyModFlags;
178 typedef int ImGuiPopupFlags;
179 typedef int ImGuiSelectableFlags;
180 typedef int ImGuiSliderFlags;
181 typedef int ImGuiTabBarFlags;
182 typedef int ImGuiTabItemFlags;
183 typedef int ImGuiTableFlags;
184 typedef int ImGuiTableColumnFlags;
185 typedef int ImGuiTableRowFlags;
186 typedef int ImGuiTreeNodeFlags;
187 typedef int ImGuiViewportFlags;
188 typedef int ImGuiWindowFlags;
191 #ifndef ImTextureID // ImTextureID [configurable type: override in imconfig.h with '#define ImTextureID xxx'] 192 typedef void* ImTextureID;
194 typedef unsigned int ImGuiID;
197 typedef void* (*ImGuiMemAllocFunc)(
size_t sz,
void* user_data);
198 typedef void (*ImGuiMemFreeFunc)(
void* ptr,
void* user_data);
202 typedef unsigned short ImWchar16;
203 typedef unsigned int ImWchar32;
204 #ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16] 205 typedef ImWchar32 ImWchar;
207 typedef ImWchar16 ImWchar;
211 typedef signed char ImS8;
212 typedef unsigned char ImU8;
213 typedef signed short ImS16;
214 typedef unsigned short ImU16;
215 typedef signed int ImS32;
216 typedef unsigned int ImU32;
217 #if defined(_MSC_VER) && !defined(__clang__) 218 typedef signed __int64 ImS64;
219 typedef unsigned __int64 ImU64;
220 #elif (defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100) 222 typedef int64_t ImS64;
223 typedef uint64_t ImU64;
225 typedef signed long long ImS64;
226 typedef unsigned long long ImU64;
233 ImVec2() { x = y = 0.0f; }
234 ImVec2(
float _x,
float _y) { x = _x; y = _y; }
235 float operator[] (
size_t idx)
const { IM_ASSERT(idx <= 1);
return (&x)[idx]; }
236 float& operator[] (
size_t idx) { IM_ASSERT(idx <= 1);
return (&x)[idx]; }
237 #ifdef IM_VEC2_CLASS_EXTRA 246 ImVec4() { x = y = z = w = 0.0f; }
247 ImVec4(
float _x,
float _y,
float _z,
float _w) { x = _x; y = _y; z = _z; w = _w; }
248 #ifdef IM_VEC4_CLASS_EXTRA 265 IMGUI_API
void DestroyContext(
ImGuiContext* ctx = NULL);
272 IMGUI_API
void NewFrame();
273 IMGUI_API
void EndFrame();
274 IMGUI_API
void Render();
278 IMGUI_API
void ShowDemoWindow(
bool* p_open = NULL);
279 IMGUI_API
void ShowMetricsWindow(
bool* p_open = NULL);
280 IMGUI_API
void ShowAboutWindow(
bool* p_open = NULL);
281 IMGUI_API
void ShowStyleEditor(
ImGuiStyle* ref = NULL);
282 IMGUI_API
bool ShowStyleSelector(
const char* label);
283 IMGUI_API
void ShowFontSelector(
const char* label);
284 IMGUI_API
void ShowUserGuide();
285 IMGUI_API
const char* GetVersion();
288 IMGUI_API
void StyleColorsDark(
ImGuiStyle* dst = NULL);
289 IMGUI_API
void StyleColorsLight(
ImGuiStyle* dst = NULL);
290 IMGUI_API
void StyleColorsClassic(
ImGuiStyle* dst = NULL);
304 IMGUI_API
bool Begin(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
305 IMGUI_API
void End();
315 IMGUI_API
bool BeginChild(
const char* str_id,
const ImVec2& size =
ImVec2(0, 0),
bool border =
false, ImGuiWindowFlags flags = 0);
316 IMGUI_API
bool BeginChild(ImGuiID
id,
const ImVec2& size =
ImVec2(0, 0),
bool border =
false, ImGuiWindowFlags flags = 0);
317 IMGUI_API
void EndChild();
321 IMGUI_API
bool IsWindowAppearing();
322 IMGUI_API
bool IsWindowCollapsed();
323 IMGUI_API
bool IsWindowFocused(ImGuiFocusedFlags flags=0);
324 IMGUI_API
bool IsWindowHovered(ImGuiHoveredFlags flags=0);
326 IMGUI_API
ImVec2 GetWindowPos();
327 IMGUI_API
ImVec2 GetWindowSize();
328 IMGUI_API
float GetWindowWidth();
329 IMGUI_API
float GetWindowHeight();
332 IMGUI_API
void SetNextWindowPos(
const ImVec2& pos, ImGuiCond cond = 0,
const ImVec2& pivot =
ImVec2(0, 0));
333 IMGUI_API
void SetNextWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
334 IMGUI_API
void SetNextWindowSizeConstraints(
const ImVec2& size_min,
const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL,
void* custom_callback_data = NULL);
335 IMGUI_API
void SetNextWindowContentSize(
const ImVec2& size);
336 IMGUI_API
void SetNextWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
337 IMGUI_API
void SetNextWindowFocus();
338 IMGUI_API
void SetNextWindowBgAlpha(
float alpha);
339 IMGUI_API
void SetWindowPos(
const ImVec2& pos, ImGuiCond cond = 0);
340 IMGUI_API
void SetWindowSize(
const ImVec2& size, ImGuiCond cond = 0);
341 IMGUI_API
void SetWindowCollapsed(
bool collapsed, ImGuiCond cond = 0);
342 IMGUI_API
void SetWindowFocus();
343 IMGUI_API
void SetWindowFontScale(
float scale);
344 IMGUI_API
void SetWindowPos(
const char* name,
const ImVec2& pos, ImGuiCond cond = 0);
345 IMGUI_API
void SetWindowSize(
const char* name,
const ImVec2& size, ImGuiCond cond = 0);
346 IMGUI_API
void SetWindowCollapsed(
const char* name,
bool collapsed, ImGuiCond cond = 0);
347 IMGUI_API
void SetWindowFocus(
const char* name);
352 IMGUI_API
ImVec2 GetContentRegionAvail();
353 IMGUI_API
ImVec2 GetContentRegionMax();
354 IMGUI_API
ImVec2 GetWindowContentRegionMin();
355 IMGUI_API
ImVec2 GetWindowContentRegionMax();
356 IMGUI_API
float GetWindowContentRegionWidth();
359 IMGUI_API
float GetScrollX();
360 IMGUI_API
float GetScrollY();
361 IMGUI_API
void SetScrollX(
float scroll_x);
362 IMGUI_API
void SetScrollY(
float scroll_y);
363 IMGUI_API
float GetScrollMaxX();
364 IMGUI_API
float GetScrollMaxY();
365 IMGUI_API
void SetScrollHereX(
float center_x_ratio = 0.5f);
366 IMGUI_API
void SetScrollHereY(
float center_y_ratio = 0.5f);
367 IMGUI_API
void SetScrollFromPosX(
float local_x,
float center_x_ratio = 0.5f);
368 IMGUI_API
void SetScrollFromPosY(
float local_y,
float center_y_ratio = 0.5f);
371 IMGUI_API
void PushFont(
ImFont* font);
372 IMGUI_API
void PopFont();
373 IMGUI_API
void PushStyleColor(ImGuiCol idx, ImU32 col);
374 IMGUI_API
void PushStyleColor(ImGuiCol idx,
const ImVec4& col);
375 IMGUI_API
void PopStyleColor(
int count = 1);
376 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
float val);
377 IMGUI_API
void PushStyleVar(ImGuiStyleVar idx,
const ImVec2& val);
378 IMGUI_API
void PopStyleVar(
int count = 1);
379 IMGUI_API
void PushAllowKeyboardFocus(
bool allow_keyboard_focus);
380 IMGUI_API
void PopAllowKeyboardFocus();
381 IMGUI_API
void PushButtonRepeat(
bool repeat);
382 IMGUI_API
void PopButtonRepeat();
385 IMGUI_API
void PushItemWidth(
float item_width);
386 IMGUI_API
void PopItemWidth();
387 IMGUI_API
void SetNextItemWidth(
float item_width);
388 IMGUI_API
float CalcItemWidth();
389 IMGUI_API
void PushTextWrapPos(
float wrap_local_pos_x = 0.0f);
390 IMGUI_API
void PopTextWrapPos();
393 IMGUI_API
ImFont* GetFont();
394 IMGUI_API
float GetFontSize();
395 IMGUI_API
ImVec2 GetFontTexUvWhitePixel();
396 IMGUI_API ImU32 GetColorU32(ImGuiCol idx,
float alpha_mul = 1.0f);
397 IMGUI_API ImU32 GetColorU32(
const ImVec4& col);
398 IMGUI_API ImU32 GetColorU32(ImU32 col);
399 IMGUI_API
const ImVec4& GetStyleColorVec4(ImGuiCol idx);
408 IMGUI_API
void Separator();
409 IMGUI_API
void SameLine(
float offset_from_start_x=0.0f,
float spacing=-1.0f);
410 IMGUI_API
void NewLine();
411 IMGUI_API
void Spacing();
412 IMGUI_API
void Dummy(
const ImVec2& size);
413 IMGUI_API
void Indent(
float indent_w = 0.0f);
414 IMGUI_API
void Unindent(
float indent_w = 0.0f);
415 IMGUI_API
void BeginGroup();
416 IMGUI_API
void EndGroup();
417 IMGUI_API
ImVec2 GetCursorPos();
418 IMGUI_API
float GetCursorPosX();
419 IMGUI_API
float GetCursorPosY();
420 IMGUI_API
void SetCursorPos(
const ImVec2& local_pos);
421 IMGUI_API
void SetCursorPosX(
float local_x);
422 IMGUI_API
void SetCursorPosY(
float local_y);
423 IMGUI_API
ImVec2 GetCursorStartPos();
424 IMGUI_API
ImVec2 GetCursorScreenPos();
425 IMGUI_API
void SetCursorScreenPos(
const ImVec2& pos);
426 IMGUI_API
void AlignTextToFramePadding();
427 IMGUI_API
float GetTextLineHeight();
428 IMGUI_API
float GetTextLineHeightWithSpacing();
429 IMGUI_API
float GetFrameHeight();
430 IMGUI_API
float GetFrameHeightWithSpacing();
439 IMGUI_API
void PushID(
const char* str_id);
440 IMGUI_API
void PushID(
const char* str_id_begin,
const char* str_id_end);
441 IMGUI_API
void PushID(
const void* ptr_id);
442 IMGUI_API
void PushID(
int int_id);
443 IMGUI_API
void PopID();
444 IMGUI_API ImGuiID GetID(
const char* str_id);
445 IMGUI_API ImGuiID GetID(
const char* str_id_begin,
const char* str_id_end);
446 IMGUI_API ImGuiID GetID(
const void* ptr_id);
449 IMGUI_API
void TextUnformatted(
const char* text,
const char* text_end = NULL);
450 IMGUI_API
void Text(
const char* fmt, ...) IM_FMTARGS(1);
451 IMGUI_API
void TextV(
const char* fmt, va_list args) IM_FMTLIST(1);
452 IMGUI_API
void TextColored(
const ImVec4& col,
const char* fmt, ...) IM_FMTARGS(2);
453 IMGUI_API
void TextColoredV(
const ImVec4& col,
const char* fmt, va_list args) IM_FMTLIST(2);
454 IMGUI_API
void TextDisabled(
const char* fmt, ...) IM_FMTARGS(1);
455 IMGUI_API
void TextDisabledV(
const char* fmt, va_list args) IM_FMTLIST(1);
456 IMGUI_API
void TextWrapped(
const char* fmt, ...) IM_FMTARGS(1);
457 IMGUI_API
void TextWrappedV(
const char* fmt, va_list args) IM_FMTLIST(1);
458 IMGUI_API
void LabelText(
const char* label,
const char* fmt, ...) IM_FMTARGS(2);
459 IMGUI_API
void LabelTextV(
const char* label,
const char* fmt, va_list args) IM_FMTLIST(2);
460 IMGUI_API
void BulletText(
const char* fmt, ...) IM_FMTARGS(1);
461 IMGUI_API
void BulletTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
466 IMGUI_API
bool Button(
const char* label,
const ImVec2& size =
ImVec2(0, 0));
467 IMGUI_API
bool SmallButton(
const char* label);
468 IMGUI_API
bool InvisibleButton(
const char* str_id,
const ImVec2& size, ImGuiButtonFlags flags = 0);
469 IMGUI_API
bool ArrowButton(
const char* str_id, ImGuiDir dir);
470 IMGUI_API
void Image(ImTextureID user_texture_id,
const ImVec2& 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));
471 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));
472 IMGUI_API
bool Checkbox(
const char* label,
bool* v);
473 IMGUI_API
bool CheckboxFlags(
const char* label,
int* flags,
int flags_value);
474 IMGUI_API
bool CheckboxFlags(
const char* label,
unsigned int* flags,
unsigned int flags_value);
475 IMGUI_API
bool RadioButton(
const char* label,
bool active);
476 IMGUI_API
bool RadioButton(
const char* label,
int* v,
int v_button);
477 IMGUI_API
void ProgressBar(
float fraction,
const ImVec2& size_arg =
ImVec2(-FLT_MIN, 0),
const char* overlay = NULL);
478 IMGUI_API
void Bullet();
483 IMGUI_API
bool BeginCombo(
const char* label,
const char* preview_value, ImGuiComboFlags flags = 0);
484 IMGUI_API
void EndCombo();
485 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int popup_max_height_in_items = -1);
486 IMGUI_API
bool Combo(
const char* label,
int* current_item,
const char* items_separated_by_zeros,
int popup_max_height_in_items = -1);
487 IMGUI_API
bool Combo(
const char* label,
int* current_item,
bool(*items_getter)(
void* data,
int idx,
const char** out_text),
void* data,
int items_count,
int popup_max_height_in_items = -1);
500 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);
501 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);
502 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);
503 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);
504 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);
505 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);
506 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);
507 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);
508 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);
509 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);
510 IMGUI_API
bool DragScalar(
const char* label, ImGuiDataType data_type,
void* p_data,
float v_speed,
const void* p_min = NULL,
const void* p_max = NULL,
const char* format = NULL, ImGuiSliderFlags flags = 0);
511 IMGUI_API
bool DragScalarN(
const char* label, ImGuiDataType data_type,
void* p_data,
int components,
float v_speed,
const void* p_min = NULL,
const void* p_max = NULL,
const char* format = NULL, ImGuiSliderFlags flags = 0);
519 IMGUI_API
bool SliderFloat(
const char* label,
float* v,
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
520 IMGUI_API
bool SliderFloat2(
const char* label,
float v[2],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
521 IMGUI_API
bool SliderFloat3(
const char* label,
float v[3],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
522 IMGUI_API
bool SliderFloat4(
const char* label,
float v[4],
float v_min,
float v_max,
const char* format =
"%.3f", ImGuiSliderFlags flags = 0);
523 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);
524 IMGUI_API
bool SliderInt(
const char* label,
int* v,
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
525 IMGUI_API
bool SliderInt2(
const char* label,
int v[2],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
526 IMGUI_API
bool SliderInt3(
const char* label,
int v[3],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
527 IMGUI_API
bool SliderInt4(
const char* label,
int v[4],
int v_min,
int v_max,
const char* format =
"%d", ImGuiSliderFlags flags = 0);
528 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);
529 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);
530 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);
531 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);
532 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);
537 IMGUI_API
bool InputText(
const char* label,
char* buf,
size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL,
void* user_data = NULL);
538 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);
539 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);
540 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);
541 IMGUI_API
bool InputFloat2(
const char* label,
float v[2],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
542 IMGUI_API
bool InputFloat3(
const char* label,
float v[3],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
543 IMGUI_API
bool InputFloat4(
const char* label,
float v[4],
const char* format =
"%.3f", ImGuiInputTextFlags flags = 0);
544 IMGUI_API
bool InputInt(
const char* label,
int* v,
int step = 1,
int step_fast = 100, ImGuiInputTextFlags flags = 0);
545 IMGUI_API
bool InputInt2(
const char* label,
int v[2], ImGuiInputTextFlags flags = 0);
546 IMGUI_API
bool InputInt3(
const char* label,
int v[3], ImGuiInputTextFlags flags = 0);
547 IMGUI_API
bool InputInt4(
const char* label,
int v[4], ImGuiInputTextFlags flags = 0);
548 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);
549 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);
550 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);
555 IMGUI_API
bool ColorEdit3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
556 IMGUI_API
bool ColorEdit4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0);
557 IMGUI_API
bool ColorPicker3(
const char* label,
float col[3], ImGuiColorEditFlags flags = 0);
558 IMGUI_API
bool ColorPicker4(
const char* label,
float col[4], ImGuiColorEditFlags flags = 0,
const float* ref_col = NULL);
559 IMGUI_API
bool ColorButton(
const char* desc_id,
const ImVec4& col, ImGuiColorEditFlags flags = 0,
ImVec2 size =
ImVec2(0, 0));
560 IMGUI_API
void SetColorEditOptions(ImGuiColorEditFlags flags);
564 IMGUI_API
bool TreeNode(
const char* label);
565 IMGUI_API
bool TreeNode(
const char* str_id,
const char* fmt, ...) IM_FMTARGS(2);
566 IMGUI_API
bool TreeNode(
const void* ptr_id,
const char* fmt, ...) IM_FMTARGS(2);
567 IMGUI_API
bool TreeNodeV(
const char* str_id,
const char* fmt, va_list args) IM_FMTLIST(2);
568 IMGUI_API
bool TreeNodeV(
const void* ptr_id,
const char* fmt, va_list args) IM_FMTLIST(2);
569 IMGUI_API
bool TreeNodeEx(
const char* label, ImGuiTreeNodeFlags flags = 0);
570 IMGUI_API
bool TreeNodeEx(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
571 IMGUI_API
bool TreeNodeEx(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, ...) IM_FMTARGS(3);
572 IMGUI_API
bool TreeNodeExV(
const char* str_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
573 IMGUI_API
bool TreeNodeExV(
const void* ptr_id, ImGuiTreeNodeFlags flags,
const char* fmt, va_list args) IM_FMTLIST(3);
574 IMGUI_API
void TreePush(
const char* str_id);
575 IMGUI_API
void TreePush(
const void* ptr_id = NULL);
576 IMGUI_API
void TreePop();
577 IMGUI_API
float GetTreeNodeToLabelSpacing();
578 IMGUI_API
bool CollapsingHeader(
const char* label, ImGuiTreeNodeFlags flags = 0);
579 IMGUI_API
bool CollapsingHeader(
const char* label,
bool* p_visible, ImGuiTreeNodeFlags flags = 0);
580 IMGUI_API
void SetNextItemOpen(
bool is_open, ImGuiCond cond = 0);
585 IMGUI_API
bool Selectable(
const char* label,
bool selected =
false, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
586 IMGUI_API
bool Selectable(
const char* label,
bool* p_selected, ImGuiSelectableFlags flags = 0,
const ImVec2& size =
ImVec2(0, 0));
594 IMGUI_API
bool BeginListBox(
const char* label,
const ImVec2& size =
ImVec2(0, 0));
595 IMGUI_API
void EndListBox();
596 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
const char*
const items[],
int items_count,
int height_in_items = -1);
597 IMGUI_API
bool ListBox(
const char* label,
int* current_item,
bool (*items_getter)(
void* data,
int idx,
const char** out_text),
void* data,
int items_count,
int height_in_items = -1);
601 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));
602 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));
603 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));
604 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));
608 IMGUI_API
void Value(
const char* prefix,
bool b);
609 IMGUI_API
void Value(
const char* prefix,
int v);
610 IMGUI_API
void Value(
const char* prefix,
unsigned int v);
611 IMGUI_API
void Value(
const char* prefix,
float v,
const char* float_format = NULL);
617 IMGUI_API
bool BeginMenuBar();
618 IMGUI_API
void EndMenuBar();
619 IMGUI_API
bool BeginMainMenuBar();
620 IMGUI_API
void EndMainMenuBar();
621 IMGUI_API
bool BeginMenu(
const char* label,
bool enabled =
true);
622 IMGUI_API
void EndMenu();
623 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut = NULL,
bool selected =
false,
bool enabled =
true);
624 IMGUI_API
bool MenuItem(
const char* label,
const char* shortcut,
bool* p_selected,
bool enabled =
true);
628 IMGUI_API
void BeginTooltip();
629 IMGUI_API
void EndTooltip();
630 IMGUI_API
void SetTooltip(
const char* fmt, ...) IM_FMTARGS(1);
631 IMGUI_API
void SetTooltipV(
const char* fmt, va_list args) IM_FMTLIST(1);
644 IMGUI_API
bool BeginPopup(
const char* str_id, ImGuiWindowFlags flags = 0);
645 IMGUI_API
bool BeginPopupModal(
const char* name,
bool* p_open = NULL, ImGuiWindowFlags flags = 0);
646 IMGUI_API
void EndPopup();
653 IMGUI_API
void OpenPopup(
const char* str_id, ImGuiPopupFlags popup_flags = 0);
654 IMGUI_API
void OpenPopupOnItemClick(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
655 IMGUI_API
void CloseCurrentPopup();
661 IMGUI_API
bool BeginPopupContextItem(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
662 IMGUI_API
bool BeginPopupContextWindow(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
663 IMGUI_API
bool BeginPopupContextVoid(
const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1);
668 IMGUI_API
bool IsPopupOpen(
const char* str_id, ImGuiPopupFlags flags = 0);
695 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);
696 IMGUI_API
void EndTable();
697 IMGUI_API
void TableNextRow(ImGuiTableRowFlags row_flags = 0,
float min_row_height = 0.0f);
698 IMGUI_API
bool TableNextColumn();
699 IMGUI_API
bool TableSetColumnIndex(
int column_n);
708 IMGUI_API
void TableSetupColumn(
const char* label, ImGuiTableColumnFlags flags = 0,
float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
709 IMGUI_API
void TableSetupScrollFreeze(
int cols,
int rows);
710 IMGUI_API
void TableHeadersRow();
711 IMGUI_API
void TableHeader(
const char* label);
721 IMGUI_API
int TableGetColumnCount();
722 IMGUI_API
int TableGetColumnIndex();
723 IMGUI_API
int TableGetRowIndex();
724 IMGUI_API
const char* TableGetColumnName(
int column_n = -1);
725 IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(
int column_n = -1);
726 IMGUI_API
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color,
int column_n = -1);
730 IMGUI_API
void Columns(
int count = 1,
const char*
id = NULL,
bool border =
true);
731 IMGUI_API
void NextColumn();
732 IMGUI_API
int GetColumnIndex();
733 IMGUI_API
float GetColumnWidth(
int column_index = -1);
734 IMGUI_API
void SetColumnWidth(
int column_index,
float width);
735 IMGUI_API
float GetColumnOffset(
int column_index = -1);
736 IMGUI_API
void SetColumnOffset(
int column_index,
float offset_x);
737 IMGUI_API
int GetColumnsCount();
740 IMGUI_API
bool BeginTabBar(
const char* str_id, ImGuiTabBarFlags flags = 0);
741 IMGUI_API
void EndTabBar();
742 IMGUI_API
bool BeginTabItem(
const char* label,
bool* p_open = NULL, ImGuiTabItemFlags flags = 0);
743 IMGUI_API
void EndTabItem();
744 IMGUI_API
bool TabItemButton(
const char* label, ImGuiTabItemFlags flags = 0);
745 IMGUI_API
void SetTabItemClosed(
const char* tab_or_docked_window_label);
749 IMGUI_API
void LogToTTY(
int auto_open_depth = -1);
750 IMGUI_API
void LogToFile(
int auto_open_depth = -1,
const char* filename = NULL);
751 IMGUI_API
void LogToClipboard(
int auto_open_depth = -1);
752 IMGUI_API
void LogFinish();
753 IMGUI_API
void LogButtons();
754 IMGUI_API
void LogText(
const char* fmt, ...) IM_FMTARGS(1);
755 IMGUI_API
void LogTextV(
const char* fmt, va_list args) IM_FMTLIST(1);
762 IMGUI_API
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0);
763 IMGUI_API
bool SetDragDropPayload(
const char* type,
const void* data,
size_t sz, ImGuiCond cond = 0);
764 IMGUI_API
void EndDragDropSource();
765 IMGUI_API
bool BeginDragDropTarget();
766 IMGUI_API
const ImGuiPayload* AcceptDragDropPayload(
const char* type, ImGuiDragDropFlags flags = 0);
767 IMGUI_API
void EndDragDropTarget();
772 IMGUI_API
void PushClipRect(
const ImVec2& clip_rect_min,
const ImVec2& clip_rect_max,
bool intersect_with_current_clip_rect);
773 IMGUI_API
void PopClipRect();
777 IMGUI_API
void SetItemDefaultFocus();
778 IMGUI_API
void SetKeyboardFocusHere(
int offset = 0);
783 IMGUI_API
bool IsItemHovered(ImGuiHoveredFlags flags = 0);
784 IMGUI_API
bool IsItemActive();
785 IMGUI_API
bool IsItemFocused();
786 IMGUI_API
bool IsItemClicked(ImGuiMouseButton mouse_button = 0);
787 IMGUI_API
bool IsItemVisible();
788 IMGUI_API
bool IsItemEdited();
789 IMGUI_API
bool IsItemActivated();
790 IMGUI_API
bool IsItemDeactivated();
791 IMGUI_API
bool IsItemDeactivatedAfterEdit();
792 IMGUI_API
bool IsItemToggledOpen();
793 IMGUI_API
bool IsAnyItemHovered();
794 IMGUI_API
bool IsAnyItemActive();
795 IMGUI_API
bool IsAnyItemFocused();
796 IMGUI_API
ImVec2 GetItemRectMin();
797 IMGUI_API
ImVec2 GetItemRectMax();
798 IMGUI_API
ImVec2 GetItemRectSize();
799 IMGUI_API
void SetItemAllowOverlap();
808 IMGUI_API
bool IsRectVisible(
const ImVec2& size);
809 IMGUI_API
bool IsRectVisible(
const ImVec2& rect_min,
const ImVec2& rect_max);
810 IMGUI_API
double GetTime();
811 IMGUI_API
int GetFrameCount();
812 IMGUI_API
ImDrawList* GetBackgroundDrawList();
813 IMGUI_API
ImDrawList* GetForegroundDrawList();
815 IMGUI_API
const char* GetStyleColorName(ImGuiCol idx);
818 IMGUI_API
void CalcListClipping(
int items_count,
float items_height,
int* out_items_display_start,
int* out_items_display_end);
819 IMGUI_API
bool BeginChildFrame(ImGuiID
id,
const ImVec2& size, ImGuiWindowFlags flags = 0);
820 IMGUI_API
void EndChildFrame();
823 IMGUI_API
ImVec2 CalcTextSize(
const char* text,
const char* text_end = NULL,
bool hide_text_after_double_hash =
false,
float wrap_width = -1.0f);
826 IMGUI_API
ImVec4 ColorConvertU32ToFloat4(ImU32 in);
827 IMGUI_API ImU32 ColorConvertFloat4ToU32(
const ImVec4& in);
828 IMGUI_API
void ColorConvertRGBtoHSV(
float r,
float g,
float b,
float& out_h,
float& out_s,
float& out_v);
829 IMGUI_API
void ColorConvertHSVtoRGB(
float h,
float s,
float v,
float& out_r,
float& out_g,
float& out_b);
834 IMGUI_API
int GetKeyIndex(ImGuiKey imgui_key);
835 IMGUI_API
bool IsKeyDown(
int user_key_index);
836 IMGUI_API
bool IsKeyPressed(
int user_key_index,
bool repeat =
true);
837 IMGUI_API
bool IsKeyReleased(
int user_key_index);
838 IMGUI_API
int GetKeyPressedAmount(
int key_index,
float repeat_delay,
float rate);
839 IMGUI_API
void CaptureKeyboardFromApp(
bool want_capture_keyboard_value =
true);
845 IMGUI_API
bool IsMouseDown(ImGuiMouseButton button);
846 IMGUI_API
bool IsMouseClicked(ImGuiMouseButton button,
bool repeat =
false);
847 IMGUI_API
bool IsMouseReleased(ImGuiMouseButton button);
848 IMGUI_API
bool IsMouseDoubleClicked(ImGuiMouseButton button);
849 IMGUI_API
bool IsMouseHoveringRect(
const ImVec2& r_min,
const ImVec2& r_max,
bool clip =
true);
850 IMGUI_API
bool IsMousePosValid(
const ImVec2* mouse_pos = NULL);
851 IMGUI_API
bool IsAnyMouseDown();
852 IMGUI_API
ImVec2 GetMousePos();
853 IMGUI_API
ImVec2 GetMousePosOnOpeningCurrentPopup();
854 IMGUI_API
bool IsMouseDragging(ImGuiMouseButton button,
float lock_threshold = -1.0f);
855 IMGUI_API
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0,
float lock_threshold = -1.0f);
856 IMGUI_API
void ResetMouseDragDelta(ImGuiMouseButton button = 0);
857 IMGUI_API ImGuiMouseCursor GetMouseCursor();
858 IMGUI_API
void SetMouseCursor(ImGuiMouseCursor cursor_type);
859 IMGUI_API
void CaptureMouseFromApp(
bool want_capture_mouse_value =
true);
863 IMGUI_API
const char* GetClipboardText();
864 IMGUI_API
void SetClipboardText(
const char* text);
869 IMGUI_API
void LoadIniSettingsFromDisk(
const char* ini_filename);
870 IMGUI_API
void LoadIniSettingsFromMemory(
const char* ini_data,
size_t ini_size=0);
871 IMGUI_API
void SaveIniSettingsToDisk(
const char* ini_filename);
872 IMGUI_API
const char* SaveIniSettingsToMemory(
size_t* out_ini_size = NULL);
875 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);
881 IMGUI_API
void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func,
void* user_data = NULL);
882 IMGUI_API
void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func,
void** p_user_data);
883 IMGUI_API
void* MemAlloc(
size_t size);
884 IMGUI_API
void MemFree(
void* ptr);
893 enum ImGuiWindowFlags_
895 ImGuiWindowFlags_None = 0,
896 ImGuiWindowFlags_NoTitleBar = 1 << 0,
897 ImGuiWindowFlags_NoResize = 1 << 1,
898 ImGuiWindowFlags_NoMove = 1 << 2,
899 ImGuiWindowFlags_NoScrollbar = 1 << 3,
900 ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
901 ImGuiWindowFlags_NoCollapse = 1 << 5,
902 ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
903 ImGuiWindowFlags_NoBackground = 1 << 7,
904 ImGuiWindowFlags_NoSavedSettings = 1 << 8,
905 ImGuiWindowFlags_NoMouseInputs = 1 << 9,
906 ImGuiWindowFlags_MenuBar = 1 << 10,
907 ImGuiWindowFlags_HorizontalScrollbar = 1 << 11,
908 ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12,
909 ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
910 ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,
911 ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,
912 ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16,
913 ImGuiWindowFlags_NoNavInputs = 1 << 18,
914 ImGuiWindowFlags_NoNavFocus = 1 << 19,
915 ImGuiWindowFlags_UnsavedDocument = 1 << 20,
916 ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
917 ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse,
918 ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
921 ImGuiWindowFlags_NavFlattened = 1 << 23,
922 ImGuiWindowFlags_ChildWindow = 1 << 24,
923 ImGuiWindowFlags_Tooltip = 1 << 25,
924 ImGuiWindowFlags_Popup = 1 << 26,
925 ImGuiWindowFlags_Modal = 1 << 27,
926 ImGuiWindowFlags_ChildMenu = 1 << 28
933 enum ImGuiInputTextFlags_
935 ImGuiInputTextFlags_None = 0,
936 ImGuiInputTextFlags_CharsDecimal = 1 << 0,
937 ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
938 ImGuiInputTextFlags_CharsUppercase = 1 << 2,
939 ImGuiInputTextFlags_CharsNoBlank = 1 << 3,
940 ImGuiInputTextFlags_AutoSelectAll = 1 << 4,
941 ImGuiInputTextFlags_EnterReturnsTrue = 1 << 5,
942 ImGuiInputTextFlags_CallbackCompletion = 1 << 6,
943 ImGuiInputTextFlags_CallbackHistory = 1 << 7,
944 ImGuiInputTextFlags_CallbackAlways = 1 << 8,
945 ImGuiInputTextFlags_CallbackCharFilter = 1 << 9,
946 ImGuiInputTextFlags_AllowTabInput = 1 << 10,
947 ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11,
948 ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12,
949 ImGuiInputTextFlags_AlwaysOverwrite = 1 << 13,
950 ImGuiInputTextFlags_ReadOnly = 1 << 14,
951 ImGuiInputTextFlags_Password = 1 << 15,
952 ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
953 ImGuiInputTextFlags_CharsScientific = 1 << 17,
954 ImGuiInputTextFlags_CallbackResize = 1 << 18,
955 ImGuiInputTextFlags_CallbackEdit = 1 << 19,
957 ImGuiInputTextFlags_Multiline = 1 << 20,
958 ImGuiInputTextFlags_NoMarkEdited = 1 << 21
961 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 962 , ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite
967 enum ImGuiTreeNodeFlags_
969 ImGuiTreeNodeFlags_None = 0,
970 ImGuiTreeNodeFlags_Selected = 1 << 0,
971 ImGuiTreeNodeFlags_Framed = 1 << 1,
972 ImGuiTreeNodeFlags_AllowItemOverlap = 1 << 2,
973 ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
974 ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
975 ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
976 ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6,
977 ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
978 ImGuiTreeNodeFlags_Leaf = 1 << 8,
979 ImGuiTreeNodeFlags_Bullet = 1 << 9,
980 ImGuiTreeNodeFlags_FramePadding = 1 << 10,
981 ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
982 ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
983 ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,
985 ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
996 enum ImGuiPopupFlags_
998 ImGuiPopupFlags_None = 0,
999 ImGuiPopupFlags_MouseButtonLeft = 0,
1000 ImGuiPopupFlags_MouseButtonRight = 1,
1001 ImGuiPopupFlags_MouseButtonMiddle = 2,
1002 ImGuiPopupFlags_MouseButtonMask_ = 0x1F,
1003 ImGuiPopupFlags_MouseButtonDefault_ = 1,
1004 ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 5,
1005 ImGuiPopupFlags_NoOpenOverItems = 1 << 6,
1006 ImGuiPopupFlags_AnyPopupId = 1 << 7,
1007 ImGuiPopupFlags_AnyPopupLevel = 1 << 8,
1008 ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel
1012 enum ImGuiSelectableFlags_
1014 ImGuiSelectableFlags_None = 0,
1015 ImGuiSelectableFlags_DontClosePopups = 1 << 0,
1016 ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
1017 ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
1018 ImGuiSelectableFlags_Disabled = 1 << 3,
1019 ImGuiSelectableFlags_AllowItemOverlap = 1 << 4
1023 enum ImGuiComboFlags_
1025 ImGuiComboFlags_None = 0,
1026 ImGuiComboFlags_PopupAlignLeft = 1 << 0,
1027 ImGuiComboFlags_HeightSmall = 1 << 1,
1028 ImGuiComboFlags_HeightRegular = 1 << 2,
1029 ImGuiComboFlags_HeightLarge = 1 << 3,
1030 ImGuiComboFlags_HeightLargest = 1 << 4,
1031 ImGuiComboFlags_NoArrowButton = 1 << 5,
1032 ImGuiComboFlags_NoPreview = 1 << 6,
1033 ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
1037 enum ImGuiTabBarFlags_
1039 ImGuiTabBarFlags_None = 0,
1040 ImGuiTabBarFlags_Reorderable = 1 << 0,
1041 ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
1042 ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
1043 ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3,
1044 ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
1045 ImGuiTabBarFlags_NoTooltip = 1 << 5,
1046 ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6,
1047 ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
1048 ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
1049 ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown
1053 enum ImGuiTabItemFlags_
1055 ImGuiTabItemFlags_None = 0,
1056 ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
1057 ImGuiTabItemFlags_SetSelected = 1 << 1,
1058 ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
1059 ImGuiTabItemFlags_NoPushId = 1 << 3,
1060 ImGuiTabItemFlags_NoTooltip = 1 << 4,
1061 ImGuiTabItemFlags_NoReorder = 1 << 5,
1062 ImGuiTabItemFlags_Leading = 1 << 6,
1063 ImGuiTabItemFlags_Trailing = 1 << 7
1089 enum ImGuiTableFlags_
1092 ImGuiTableFlags_None = 0,
1093 ImGuiTableFlags_Resizable = 1 << 0,
1094 ImGuiTableFlags_Reorderable = 1 << 1,
1095 ImGuiTableFlags_Hideable = 1 << 2,
1096 ImGuiTableFlags_Sortable = 1 << 3,
1097 ImGuiTableFlags_NoSavedSettings = 1 << 4,
1098 ImGuiTableFlags_ContextMenuInBody = 1 << 5,
1100 ImGuiTableFlags_RowBg = 1 << 6,
1101 ImGuiTableFlags_BordersInnerH = 1 << 7,
1102 ImGuiTableFlags_BordersOuterH = 1 << 8,
1103 ImGuiTableFlags_BordersInnerV = 1 << 9,
1104 ImGuiTableFlags_BordersOuterV = 1 << 10,
1105 ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
1106 ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
1107 ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
1108 ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
1109 ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
1110 ImGuiTableFlags_NoBordersInBody = 1 << 11,
1111 ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
1113 ImGuiTableFlags_SizingFixedFit = 1 << 13,
1114 ImGuiTableFlags_SizingFixedSame = 2 << 13,
1115 ImGuiTableFlags_SizingStretchProp = 3 << 13,
1116 ImGuiTableFlags_SizingStretchSame = 4 << 13,
1118 ImGuiTableFlags_NoHostExtendX = 1 << 16,
1119 ImGuiTableFlags_NoHostExtendY = 1 << 17,
1120 ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
1121 ImGuiTableFlags_PreciseWidths = 1 << 19,
1123 ImGuiTableFlags_NoClip = 1 << 20,
1125 ImGuiTableFlags_PadOuterX = 1 << 21,
1126 ImGuiTableFlags_NoPadOuterX = 1 << 22,
1127 ImGuiTableFlags_NoPadInnerX = 1 << 23,
1129 ImGuiTableFlags_ScrollX = 1 << 24,
1130 ImGuiTableFlags_ScrollY = 1 << 25,
1132 ImGuiTableFlags_SortMulti = 1 << 26,
1133 ImGuiTableFlags_SortTristate = 1 << 27,
1136 ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame
1139 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1146 enum ImGuiTableColumnFlags_
1149 ImGuiTableColumnFlags_None = 0,
1150 ImGuiTableColumnFlags_DefaultHide = 1 << 0,
1151 ImGuiTableColumnFlags_DefaultSort = 1 << 1,
1152 ImGuiTableColumnFlags_WidthStretch = 1 << 2,
1153 ImGuiTableColumnFlags_WidthFixed = 1 << 3,
1154 ImGuiTableColumnFlags_NoResize = 1 << 4,
1155 ImGuiTableColumnFlags_NoReorder = 1 << 5,
1156 ImGuiTableColumnFlags_NoHide = 1 << 6,
1157 ImGuiTableColumnFlags_NoClip = 1 << 7,
1158 ImGuiTableColumnFlags_NoSort = 1 << 8,
1159 ImGuiTableColumnFlags_NoSortAscending = 1 << 9,
1160 ImGuiTableColumnFlags_NoSortDescending = 1 << 10,
1161 ImGuiTableColumnFlags_NoHeaderWidth = 1 << 11,
1162 ImGuiTableColumnFlags_PreferSortAscending = 1 << 12,
1163 ImGuiTableColumnFlags_PreferSortDescending = 1 << 13,
1164 ImGuiTableColumnFlags_IndentEnable = 1 << 14,
1165 ImGuiTableColumnFlags_IndentDisable = 1 << 15,
1168 ImGuiTableColumnFlags_IsEnabled = 1 << 20,
1169 ImGuiTableColumnFlags_IsVisible = 1 << 21,
1170 ImGuiTableColumnFlags_IsSorted = 1 << 22,
1171 ImGuiTableColumnFlags_IsHovered = 1 << 23,
1174 ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
1175 ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
1176 ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
1177 ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30
1180 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1186 enum ImGuiTableRowFlags_
1188 ImGuiTableRowFlags_None = 0,
1189 ImGuiTableRowFlags_Headers = 1 << 0
1201 enum ImGuiTableBgTarget_
1203 ImGuiTableBgTarget_None = 0,
1204 ImGuiTableBgTarget_RowBg0 = 1,
1205 ImGuiTableBgTarget_RowBg1 = 2,
1206 ImGuiTableBgTarget_CellBg = 3
1210 enum ImGuiFocusedFlags_
1212 ImGuiFocusedFlags_None = 0,
1213 ImGuiFocusedFlags_ChildWindows = 1 << 0,
1214 ImGuiFocusedFlags_RootWindow = 1 << 1,
1215 ImGuiFocusedFlags_AnyWindow = 1 << 2,
1216 ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
1222 enum ImGuiHoveredFlags_
1224 ImGuiHoveredFlags_None = 0,
1225 ImGuiHoveredFlags_ChildWindows = 1 << 0,
1226 ImGuiHoveredFlags_RootWindow = 1 << 1,
1227 ImGuiHoveredFlags_AnyWindow = 1 << 2,
1228 ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3,
1230 ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5,
1231 ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6,
1232 ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
1233 ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
1234 ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
1238 enum ImGuiDragDropFlags_
1240 ImGuiDragDropFlags_None = 0,
1242 ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
1243 ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
1244 ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
1245 ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
1246 ImGuiDragDropFlags_SourceExtern = 1 << 4,
1247 ImGuiDragDropFlags_SourceAutoExpirePayload = 1 << 5,
1249 ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
1250 ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
1251 ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
1252 ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
1256 #define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F" // float[3]: Standard type for colors, without alpha. User code may use this type. 1257 #define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F" // float[4]: Standard type for colors. User code may use this type. 1270 ImGuiDataType_Float,
1271 ImGuiDataType_Double,
1287 enum ImGuiSortDirection_
1289 ImGuiSortDirection_None = 0,
1290 ImGuiSortDirection_Ascending = 1,
1291 ImGuiSortDirection_Descending = 2
1299 ImGuiKey_RightArrow,
1312 ImGuiKey_KeyPadEnter,
1323 enum ImGuiKeyModFlags_
1325 ImGuiKeyModFlags_None = 0,
1326 ImGuiKeyModFlags_Ctrl = 1 << 0,
1327 ImGuiKeyModFlags_Shift = 1 << 1,
1328 ImGuiKeyModFlags_Alt = 1 << 2,
1329 ImGuiKeyModFlags_Super = 1 << 3
1339 ImGuiNavInput_Activate,
1340 ImGuiNavInput_Cancel,
1341 ImGuiNavInput_Input,
1343 ImGuiNavInput_DpadLeft,
1344 ImGuiNavInput_DpadRight,
1345 ImGuiNavInput_DpadUp,
1346 ImGuiNavInput_DpadDown,
1347 ImGuiNavInput_LStickLeft,
1348 ImGuiNavInput_LStickRight,
1349 ImGuiNavInput_LStickUp,
1350 ImGuiNavInput_LStickDown,
1351 ImGuiNavInput_FocusPrev,
1352 ImGuiNavInput_FocusNext,
1353 ImGuiNavInput_TweakSlow,
1354 ImGuiNavInput_TweakFast,
1358 ImGuiNavInput_KeyMenu_,
1359 ImGuiNavInput_KeyLeft_,
1360 ImGuiNavInput_KeyRight_,
1361 ImGuiNavInput_KeyUp_,
1362 ImGuiNavInput_KeyDown_,
1363 ImGuiNavInput_COUNT,
1364 ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyMenu_
1368 enum ImGuiConfigFlags_
1370 ImGuiConfigFlags_None = 0,
1371 ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
1372 ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
1373 ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
1374 ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3,
1375 ImGuiConfigFlags_NoMouse = 1 << 4,
1376 ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
1379 ImGuiConfigFlags_IsSRGB = 1 << 20,
1380 ImGuiConfigFlags_IsTouchScreen = 1 << 21
1384 enum ImGuiBackendFlags_
1386 ImGuiBackendFlags_None = 0,
1387 ImGuiBackendFlags_HasGamepad = 1 << 0,
1388 ImGuiBackendFlags_HasMouseCursors = 1 << 1,
1389 ImGuiBackendFlags_HasSetMousePos = 1 << 2,
1390 ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3
1397 ImGuiCol_TextDisabled,
1402 ImGuiCol_BorderShadow,
1404 ImGuiCol_FrameBgHovered,
1405 ImGuiCol_FrameBgActive,
1407 ImGuiCol_TitleBgActive,
1408 ImGuiCol_TitleBgCollapsed,
1410 ImGuiCol_ScrollbarBg,
1411 ImGuiCol_ScrollbarGrab,
1412 ImGuiCol_ScrollbarGrabHovered,
1413 ImGuiCol_ScrollbarGrabActive,
1415 ImGuiCol_SliderGrab,
1416 ImGuiCol_SliderGrabActive,
1418 ImGuiCol_ButtonHovered,
1419 ImGuiCol_ButtonActive,
1421 ImGuiCol_HeaderHovered,
1422 ImGuiCol_HeaderActive,
1424 ImGuiCol_SeparatorHovered,
1425 ImGuiCol_SeparatorActive,
1426 ImGuiCol_ResizeGrip,
1427 ImGuiCol_ResizeGripHovered,
1428 ImGuiCol_ResizeGripActive,
1430 ImGuiCol_TabHovered,
1432 ImGuiCol_TabUnfocused,
1433 ImGuiCol_TabUnfocusedActive,
1435 ImGuiCol_PlotLinesHovered,
1436 ImGuiCol_PlotHistogram,
1437 ImGuiCol_PlotHistogramHovered,
1438 ImGuiCol_TableHeaderBg,
1439 ImGuiCol_TableBorderStrong,
1440 ImGuiCol_TableBorderLight,
1441 ImGuiCol_TableRowBg,
1442 ImGuiCol_TableRowBgAlt,
1443 ImGuiCol_TextSelectedBg,
1444 ImGuiCol_DragDropTarget,
1445 ImGuiCol_NavHighlight,
1446 ImGuiCol_NavWindowingHighlight,
1447 ImGuiCol_NavWindowingDimBg,
1448 ImGuiCol_ModalWindowDimBg,
1462 ImGuiStyleVar_Alpha,
1463 ImGuiStyleVar_WindowPadding,
1464 ImGuiStyleVar_WindowRounding,
1465 ImGuiStyleVar_WindowBorderSize,
1466 ImGuiStyleVar_WindowMinSize,
1467 ImGuiStyleVar_WindowTitleAlign,
1468 ImGuiStyleVar_ChildRounding,
1469 ImGuiStyleVar_ChildBorderSize,
1470 ImGuiStyleVar_PopupRounding,
1471 ImGuiStyleVar_PopupBorderSize,
1472 ImGuiStyleVar_FramePadding,
1473 ImGuiStyleVar_FrameRounding,
1474 ImGuiStyleVar_FrameBorderSize,
1475 ImGuiStyleVar_ItemSpacing,
1476 ImGuiStyleVar_ItemInnerSpacing,
1477 ImGuiStyleVar_IndentSpacing,
1478 ImGuiStyleVar_CellPadding,
1479 ImGuiStyleVar_ScrollbarSize,
1480 ImGuiStyleVar_ScrollbarRounding,
1481 ImGuiStyleVar_GrabMinSize,
1482 ImGuiStyleVar_GrabRounding,
1483 ImGuiStyleVar_TabRounding,
1484 ImGuiStyleVar_ButtonTextAlign,
1485 ImGuiStyleVar_SelectableTextAlign,
1490 enum ImGuiButtonFlags_
1492 ImGuiButtonFlags_None = 0,
1493 ImGuiButtonFlags_MouseButtonLeft = 1 << 0,
1494 ImGuiButtonFlags_MouseButtonRight = 1 << 1,
1495 ImGuiButtonFlags_MouseButtonMiddle = 1 << 2,
1498 ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle,
1499 ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft
1503 enum ImGuiColorEditFlags_
1505 ImGuiColorEditFlags_None = 0,
1506 ImGuiColorEditFlags_NoAlpha = 1 << 1,
1507 ImGuiColorEditFlags_NoPicker = 1 << 2,
1508 ImGuiColorEditFlags_NoOptions = 1 << 3,
1509 ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
1510 ImGuiColorEditFlags_NoInputs = 1 << 5,
1511 ImGuiColorEditFlags_NoTooltip = 1 << 6,
1512 ImGuiColorEditFlags_NoLabel = 1 << 7,
1513 ImGuiColorEditFlags_NoSidePreview = 1 << 8,
1514 ImGuiColorEditFlags_NoDragDrop = 1 << 9,
1515 ImGuiColorEditFlags_NoBorder = 1 << 10,
1518 ImGuiColorEditFlags_AlphaBar = 1 << 16,
1519 ImGuiColorEditFlags_AlphaPreview = 1 << 17,
1520 ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 18,
1521 ImGuiColorEditFlags_HDR = 1 << 19,
1522 ImGuiColorEditFlags_DisplayRGB = 1 << 20,
1523 ImGuiColorEditFlags_DisplayHSV = 1 << 21,
1524 ImGuiColorEditFlags_DisplayHex = 1 << 22,
1525 ImGuiColorEditFlags_Uint8 = 1 << 23,
1526 ImGuiColorEditFlags_Float = 1 << 24,
1527 ImGuiColorEditFlags_PickerHueBar = 1 << 25,
1528 ImGuiColorEditFlags_PickerHueWheel = 1 << 26,
1529 ImGuiColorEditFlags_InputRGB = 1 << 27,
1530 ImGuiColorEditFlags_InputHSV = 1 << 28,
1534 ImGuiColorEditFlags__OptionsDefault = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
1537 ImGuiColorEditFlags__DisplayMask = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
1538 ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
1539 ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
1540 ImGuiColorEditFlags__InputMask = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV
1543 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1544 , ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex
1550 enum ImGuiSliderFlags_
1552 ImGuiSliderFlags_None = 0,
1553 ImGuiSliderFlags_AlwaysClamp = 1 << 4,
1554 ImGuiSliderFlags_Logarithmic = 1 << 5,
1555 ImGuiSliderFlags_NoRoundToFormat = 1 << 6,
1556 ImGuiSliderFlags_NoInput = 1 << 7,
1557 ImGuiSliderFlags_InvalidMask_ = 0x7000000F
1560 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1561 , ImGuiSliderFlags_ClampOnInput = ImGuiSliderFlags_AlwaysClamp
1567 enum ImGuiMouseButton_
1569 ImGuiMouseButton_Left = 0,
1570 ImGuiMouseButton_Right = 1,
1571 ImGuiMouseButton_Middle = 2,
1572 ImGuiMouseButton_COUNT = 5
1577 enum ImGuiMouseCursor_
1579 ImGuiMouseCursor_None = -1,
1580 ImGuiMouseCursor_Arrow = 0,
1581 ImGuiMouseCursor_TextInput,
1582 ImGuiMouseCursor_ResizeAll,
1583 ImGuiMouseCursor_ResizeNS,
1584 ImGuiMouseCursor_ResizeEW,
1585 ImGuiMouseCursor_ResizeNESW,
1586 ImGuiMouseCursor_ResizeNWSE,
1587 ImGuiMouseCursor_Hand,
1588 ImGuiMouseCursor_NotAllowed,
1589 ImGuiMouseCursor_COUNT
1598 ImGuiCond_Always = 1 << 0,
1599 ImGuiCond_Once = 1 << 1,
1600 ImGuiCond_FirstUseEver = 1 << 2,
1601 ImGuiCond_Appearing = 1 << 3
1615 inline void*
operator new(size_t,
ImNewWrapper,
void* ptr) {
return ptr; }
1616 inline void operator delete(
void*,
ImNewWrapper,
void*) {}
1617 #define IM_ALLOC(_SIZE) ImGui::MemAlloc(_SIZE) 1618 #define IM_FREE(_PTR) ImGui::MemFree(_PTR) 1619 #define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR) 1620 #define IM_NEW(_TYPE) new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE 1621 template<
typename T>
void IM_DELETE(T* p) {
if (p) { p->~T(); ImGui::MemFree(p); } }
1634 template<
typename T>
1642 typedef T value_type;
1643 typedef value_type* iterator;
1644 typedef const value_type* const_iterator;
1647 inline ImVector() { Size = Capacity = 0; Data = NULL; }
1648 inline ImVector(
const ImVector<T>& src) { Size = Capacity = 0; Data = NULL; operator=(src); }
1649 inline ImVector<T>& operator=(
const ImVector<T>& src) { clear(); resize(src.Size); memcpy(Data, src.Data, (
size_t)Size *
sizeof(T));
return *
this; }
1650 inline ~
ImVector() {
if (Data) IM_FREE(Data); }
1652 inline bool empty()
const {
return Size == 0; }
1653 inline int size()
const {
return Size; }
1654 inline int size_in_bytes()
const {
return Size * (int)
sizeof(T); }
1655 inline int max_size()
const {
return 0x7FFFFFFF / (int)
sizeof(T); }
1656 inline int capacity()
const {
return Capacity; }
1657 inline T& operator[](
int i) { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
1658 inline const T& operator[](
int i)
const { IM_ASSERT(i >= 0 && i < Size);
return Data[i]; }
1660 inline void clear() {
if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
1661 inline T* begin() {
return Data; }
1662 inline const T* begin()
const {
return Data; }
1663 inline T* end() {
return Data + Size; }
1664 inline const T* end()
const {
return Data + Size; }
1665 inline T& front() { IM_ASSERT(Size > 0);
return Data[0]; }
1666 inline const T& front()
const { IM_ASSERT(Size > 0);
return Data[0]; }
1667 inline T& back() { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
1668 inline const T& back()
const { IM_ASSERT(Size > 0);
return Data[Size - 1]; }
1669 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; }
1671 inline int _grow_capacity(
int sz)
const {
int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8;
return new_capacity > sz ? new_capacity : sz; }
1672 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
1673 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; }
1674 inline void shrink(
int new_size) { IM_ASSERT(new_size <= Size); Size = new_size; }
1675 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; }
1678 inline void push_back(
const T& v) {
if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v,
sizeof(v)); Size++; }
1679 inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
1680 inline void push_front(
const T& v) {
if (Size == 0) push_back(v);
else insert(Data, v); }
1681 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; }
1682 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 - count) *
sizeof(T)); Size -= (int)count;
return Data + off; }
1683 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; }
1684 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; }
1685 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; }
1686 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; }
1687 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; }
1688 inline bool find_erase(
const T& v) {
const T* it = find(v);
if (it < Data + Size) { erase(it);
return true; }
return false; }
1689 inline bool find_erase_unsorted(
const T& v) {
const T* it = find(v);
if (it < Data + Size) { erase_unsorted(it);
return true; }
return false; }
1690 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; }
1705 float WindowRounding;
1706 float WindowBorderSize;
1709 ImGuiDir WindowMenuButtonPosition;
1710 float ChildRounding;
1711 float ChildBorderSize;
1712 float PopupRounding;
1713 float PopupBorderSize;
1715 float FrameRounding;
1716 float FrameBorderSize;
1720 ImVec2 TouchExtraPadding;
1721 float IndentSpacing;
1722 float ColumnsMinSpacing;
1723 float ScrollbarSize;
1724 float ScrollbarRounding;
1727 float LogSliderDeadzone;
1729 float TabBorderSize;
1730 float TabMinWidthForCloseButton;
1731 ImGuiDir ColorButtonPosition;
1733 ImVec2 SelectableTextAlign;
1734 ImVec2 DisplayWindowPadding;
1735 ImVec2 DisplaySafeAreaPadding;
1736 float MouseCursorScale;
1737 bool AntiAliasedLines;
1738 bool AntiAliasedLinesUseTex;
1739 bool AntiAliasedFill;
1740 float CurveTessellationTol;
1741 float CircleTessellationMaxError;
1742 ImVec4 Colors[ImGuiCol_COUNT];
1745 IMGUI_API
void ScaleAllSizes(
float scale_factor);
1761 ImGuiConfigFlags ConfigFlags;
1762 ImGuiBackendFlags BackendFlags;
1765 float IniSavingRate;
1766 const char* IniFilename;
1767 const char* LogFilename;
1768 float MouseDoubleClickTime;
1769 float MouseDoubleClickMaxDist;
1770 float MouseDragThreshold;
1771 int KeyMap[ImGuiKey_COUNT];
1772 float KeyRepeatDelay;
1773 float KeyRepeatRate;
1777 float FontGlobalScale;
1778 bool FontAllowUserScaling;
1780 ImVec2 DisplayFramebufferScale;
1783 bool MouseDrawCursor;
1784 bool ConfigMacOSXBehaviors;
1785 bool ConfigInputTextCursorBlink;
1786 bool ConfigDragClickToInputText;
1787 bool ConfigWindowsResizeFromEdges;
1788 bool ConfigWindowsMoveFromTitleBarOnly;
1789 float ConfigMemoryCompactTimer;
1797 const char* BackendPlatformName;
1798 const char* BackendRendererName;
1799 void* BackendPlatformUserData;
1800 void* BackendRendererUserData;
1801 void* BackendLanguageUserData;
1805 const char* (*GetClipboardTextFn)(
void* user_data);
1806 void (*SetClipboardTextFn)(
void* user_data,
const char* text);
1807 void* ClipboardUserData;
1811 void (*ImeSetInputScreenPosFn)(
int x,
int y);
1812 void* ImeWindowHandle;
1827 float NavInputs[ImGuiNavInput_COUNT];
1830 IMGUI_API
void AddInputCharacter(
unsigned int c);
1831 IMGUI_API
void AddInputCharacterUTF16(ImWchar16 c);
1832 IMGUI_API
void AddInputCharactersUTF8(
const char* str);
1833 IMGUI_API
void ClearInputCharacters();
1841 bool WantCaptureMouse;
1842 bool WantCaptureKeyboard;
1844 bool WantSetMousePos;
1845 bool WantSaveIniSettings;
1849 int MetricsRenderVertices;
1850 int MetricsRenderIndices;
1851 int MetricsRenderWindows;
1852 int MetricsActiveWindows;
1853 int MetricsActiveAllocations;
1860 ImGuiKeyModFlags KeyMods;
1862 ImVec2 MouseClickedPos[5];
1863 double MouseClickedTime[5];
1864 bool MouseClicked[5];
1865 bool MouseDoubleClicked[5];
1866 bool MouseReleased[5];
1867 bool MouseDownOwned[5];
1868 bool MouseDownWasDoubleClick[5];
1869 float MouseDownDuration[5];
1870 float MouseDownDurationPrev[5];
1871 ImVec2 MouseDragMaxDistanceAbs[5];
1872 float MouseDragMaxDistanceSqr[5];
1873 float KeysDownDuration[512];
1874 float KeysDownDurationPrev[512];
1875 float NavInputsDownDuration[ImGuiNavInput_COUNT];
1876 float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
1878 ImWchar16 InputQueueSurrogate;
1899 ImGuiInputTextFlags EventFlag;
1900 ImGuiInputTextFlags Flags;
1919 IMGUI_API
void DeleteChars(
int pos,
int bytes_count);
1920 IMGUI_API
void InsertChars(
int pos,
const char* text,
const char* text_end = NULL);
1921 void SelectAll() { SelectionStart = 0; SelectionEnd = BufTextLen; }
1922 void ClearSelection() { SelectionStart = SelectionEnd = BufTextLen; }
1923 bool HasSelection()
const {
return SelectionStart != SelectionEnd; }
1945 ImGuiID SourceParentId;
1947 char DataType[32 + 1];
1952 void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0,
sizeof(DataType)); DataFrameCount = -1; Preview = Delivery =
false; }
1953 bool IsDataType(
const char* type)
const {
return DataFrameCount != -1 && strcmp(type, DataType) == 0; }
1954 bool IsPreview()
const {
return Preview; }
1955 bool IsDelivery()
const {
return Delivery; }
1961 ImGuiID ColumnUserID;
1964 ImGuiSortDirection SortDirection : 8;
1987 #define IM_UNICODE_CODEPOINT_INVALID 0xFFFD // Invalid Unicode code point (standard value). 1988 #ifdef IMGUI_USE_WCHAR32 1989 #define IM_UNICODE_CODEPOINT_MAX 0x10FFFF // Maximum Unicode code point supported by this build. 1991 #define IM_UNICODE_CODEPOINT_MAX 0xFFFF // Maximum Unicode code point supported by this build. 1999 mutable int RefFrame;
2000 operator bool()
const {
int current_frame = ImGui::GetFrameCount();
if (RefFrame == current_frame)
return false; RefFrame = current_frame;
return true; }
2007 IMGUI_API
bool Draw(
const char* label =
"Filter (inc,-exc)",
float width = 0.0f);
2008 IMGUI_API
bool PassFilter(
const char* text,
const char* text_end = NULL)
const;
2009 IMGUI_API
void Build();
2010 void Clear() { InputBuf[0] = 0; Build(); }
2011 bool IsActive()
const {
return !Filters.empty(); }
2020 ImGuiTextRange(
const char* _b,
const char* _e) { b = _b; e = _e; }
2021 bool empty()
const {
return b == e; }
2034 IMGUI_API
static char EmptyString[1];
2037 inline char operator[](
int i)
const { IM_ASSERT(Buf.Data != NULL);
return Buf.Data[i]; }
2038 const char* begin()
const {
return Buf.Data ? &Buf.front() : EmptyString; }
2039 const char* end()
const {
return Buf.Data ? &Buf.back() : EmptyString; }
2040 int size()
const {
return Buf.Size ? Buf.Size - 1 : 0; }
2041 bool empty()
const {
return Buf.Size <= 1; }
2042 void clear() { Buf.clear(); }
2043 void reserve(
int capacity) { Buf.reserve(capacity); }
2044 const char* c_str()
const {
return Buf.Data ? Buf.Data : EmptyString; }
2045 IMGUI_API
void append(
const char* str,
const char* str_end = NULL);
2046 IMGUI_API
void appendf(
const char* fmt, ...) IM_FMTARGS(2);
2047 IMGUI_API
void appendfv(
const char* fmt, va_list args) IM_FMTLIST(2);
2064 union {
int val_i;
float val_f;
void* val_p; };
2066 ImGuiStoragePair(ImGuiID _key,
float _val_f) { key = _key; val_f = _val_f; }
2067 ImGuiStoragePair(ImGuiID _key,
void* _val_p) { key = _key; val_p = _val_p; }
2075 void Clear() { Data.clear(); }
2076 IMGUI_API
int GetInt(ImGuiID key,
int default_val = 0)
const;
2077 IMGUI_API
void SetInt(ImGuiID key,
int val);
2078 IMGUI_API
bool GetBool(ImGuiID key,
bool default_val =
false)
const;
2079 IMGUI_API
void SetBool(ImGuiID key,
bool val);
2080 IMGUI_API
float GetFloat(ImGuiID key,
float default_val = 0.0f)
const;
2081 IMGUI_API
void SetFloat(ImGuiID key,
float val);
2082 IMGUI_API
void* GetVoidPtr(ImGuiID key)
const;
2083 IMGUI_API
void SetVoidPtr(ImGuiID key,
void* val);
2089 IMGUI_API
int* GetIntRef(ImGuiID key,
int default_val = 0);
2090 IMGUI_API
bool* GetBoolRef(ImGuiID key,
bool default_val =
false);
2091 IMGUI_API
float* GetFloatRef(ImGuiID key,
float default_val = 0.0f);
2092 IMGUI_API
void** GetVoidPtrRef(ImGuiID key,
void* default_val = NULL);
2095 IMGUI_API
void SetAllInt(
int val);
2098 IMGUI_API
void BuildSortByKey();
2131 IMGUI_API ~ImGuiListClipper();
2135 IMGUI_API
void Begin(
int items_count,
float items_height = -1.0f);
2136 IMGUI_API
void End();
2137 IMGUI_API
bool Step();
2139 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2140 inline ImGuiListClipper(
int items_count,
float items_height = -1.0f) { memset(
this, 0,
sizeof(*
this)); ItemsCount = -1; Begin(items_count, items_height); }
2145 #ifdef IMGUI_USE_BGRA_PACKED_COLOR 2146 #define IM_COL32_R_SHIFT 16 2147 #define IM_COL32_G_SHIFT 8 2148 #define IM_COL32_B_SHIFT 0 2149 #define IM_COL32_A_SHIFT 24 2150 #define IM_COL32_A_MASK 0xFF000000 2152 #define IM_COL32_R_SHIFT 0 2153 #define IM_COL32_G_SHIFT 8 2154 #define IM_COL32_B_SHIFT 16 2155 #define IM_COL32_A_SHIFT 24 2156 #define IM_COL32_A_MASK 0xFF000000 2158 #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)) 2159 #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF 2160 #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black 2161 #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000 2171 ImColor() { Value.x = Value.y = Value.z = Value.w = 0.0f; }
2172 ImColor(
int r,
int g,
int b,
int a = 255) {
float sc = 1.0f / 255.0f; Value.x = (float)r * sc; Value.y = (float)g * sc; Value.z = (float)b * sc; Value.w = (float)a * sc; }
2173 ImColor(ImU32 rgba) {
float sc = 1.0f / 255.0f; Value.x = (float)((rgba >> IM_COL32_R_SHIFT) & 0xFF) * sc; Value.y = (float)((rgba >> IM_COL32_G_SHIFT) & 0xFF) * sc; Value.z = (float)((rgba >> IM_COL32_B_SHIFT) & 0xFF) * sc; Value.w = (float)((rgba >> IM_COL32_A_SHIFT) & 0xFF) * sc; }
2174 ImColor(
float r,
float g,
float b,
float a = 1.0f) { Value.x = r; Value.y = g; Value.z = b; Value.w = a; }
2176 inline operator ImU32()
const {
return ImGui::ColorConvertFloat4ToU32(Value); }
2177 inline operator ImVec4()
const {
return Value; }
2180 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; }
2181 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); }
2190 #ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX 2191 #define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (63) 2201 #ifndef ImDrawCallback 2209 #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-1) 2219 ImTextureID TextureId;
2220 unsigned int VtxOffset;
2221 unsigned int IdxOffset;
2222 unsigned int ElemCount;
2223 ImDrawCallback UserCallback;
2224 void* UserCallbackData;
2226 ImDrawCmd() { memset(
this, 0,
sizeof(*
this)); }
2233 typedef unsigned short ImDrawIdx;
2237 #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT 2249 IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
2256 ImTextureID TextureId;
2257 unsigned int VtxOffset;
2278 inline void Clear() { _Current = 0; _Count = 1; }
2279 IMGUI_API
void ClearFreeMemory();
2280 IMGUI_API
void Split(
ImDrawList* draw_list,
int count);
2282 IMGUI_API
void SetCurrentChannel(
ImDrawList* draw_list,
int channel_idx);
2289 ImDrawFlags_None = 0,
2290 ImDrawFlags_Closed = 1 << 0,
2291 ImDrawFlags_RoundCornersTopLeft = 1 << 4,
2292 ImDrawFlags_RoundCornersTopRight = 1 << 5,
2293 ImDrawFlags_RoundCornersBottomLeft = 1 << 6,
2294 ImDrawFlags_RoundCornersBottomRight = 1 << 7,
2295 ImDrawFlags_RoundCornersNone = 1 << 8,
2296 ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight,
2297 ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
2298 ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft,
2299 ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight,
2300 ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight,
2301 ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll,
2302 ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone
2307 enum ImDrawListFlags_
2309 ImDrawListFlags_None = 0,
2310 ImDrawListFlags_AntiAliasedLines = 1 << 0,
2311 ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1,
2312 ImDrawListFlags_AntiAliasedFill = 1 << 2,
2313 ImDrawListFlags_AllowVtxOffset = 1 << 3
2331 ImDrawListFlags Flags;
2334 unsigned int _VtxCurrentIdx;
2336 const char* _OwnerName;
2338 ImDrawIdx* _IdxWritePtr;
2350 IMGUI_API
void PushClipRect(
ImVec2 clip_rect_min,
ImVec2 clip_rect_max,
bool intersect_with_current_clip_rect =
false);
2351 IMGUI_API
void PushClipRectFullScreen();
2352 IMGUI_API
void PopClipRect();
2353 IMGUI_API
void PushTextureID(ImTextureID texture_id);
2354 IMGUI_API
void PopTextureID();
2355 inline ImVec2 GetClipRectMin()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.x, cr.y); }
2356 inline ImVec2 GetClipRectMax()
const {
const ImVec4& cr = _ClipRectStack.back();
return ImVec2(cr.z, cr.w); }
2364 IMGUI_API
void AddLine(
const ImVec2& p1,
const ImVec2& p2, ImU32 col,
float thickness = 1.0f);
2365 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);
2366 IMGUI_API
void AddRectFilled(
const ImVec2& p_min,
const ImVec2& p_max, ImU32 col,
float rounding = 0.0f, ImDrawFlags flags = 0);
2367 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);
2368 IMGUI_API
void AddQuad(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness = 1.0f);
2370 IMGUI_API
void AddTriangle(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness = 1.0f);
2371 IMGUI_API
void AddTriangleFilled(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col);
2372 IMGUI_API
void AddCircle(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0,
float thickness = 1.0f);
2373 IMGUI_API
void AddCircleFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments = 0);
2374 IMGUI_API
void AddNgon(
const ImVec2& center,
float radius, ImU32 col,
int num_segments,
float thickness = 1.0f);
2375 IMGUI_API
void AddNgonFilled(
const ImVec2& center,
float radius, ImU32 col,
int num_segments);
2376 IMGUI_API
void AddText(
const ImVec2& pos, ImU32 col,
const char* text_begin,
const char* text_end = NULL);
2377 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);
2378 IMGUI_API
void AddPolyline(
const ImVec2* points,
int num_points, ImU32 col, ImDrawFlags flags,
float thickness);
2379 IMGUI_API
void AddConvexPolyFilled(
const ImVec2* points,
int num_points, ImU32 col);
2380 IMGUI_API
void AddBezierCubic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness,
int num_segments = 0);
2381 IMGUI_API
void AddBezierQuadratic(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3, ImU32 col,
float thickness,
int num_segments = 0);
2387 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);
2388 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);
2389 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);
2392 inline void PathClear() { _Path.Size = 0; }
2393 inline void PathLineTo(
const ImVec2& pos) { _Path.push_back(pos); }
2394 inline void PathLineToMergeDuplicate(
const ImVec2& pos) {
if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); }
2395 inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); _Path.Size = 0; }
2396 inline void PathStroke(ImU32 col, ImDrawFlags flags = 0,
float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, flags, thickness); _Path.Size = 0; }
2397 IMGUI_API
void PathArcTo(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments = 0);
2398 IMGUI_API
void PathArcToFast(
const ImVec2& center,
float radius,
int a_min_of_12,
int a_max_of_12);
2399 IMGUI_API
void PathBezierCubicCurveTo(
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
int num_segments = 0);
2400 IMGUI_API
void PathBezierQuadraticCurveTo(
const ImVec2& p2,
const ImVec2& p3,
int num_segments = 0);
2401 IMGUI_API
void PathRect(
const ImVec2& rect_min,
const ImVec2& rect_max,
float rounding = 0.0f, ImDrawFlags flags = 0);
2404 IMGUI_API
void AddCallback(ImDrawCallback callback,
void* callback_data);
2405 IMGUI_API
void AddDrawCmd();
2414 inline void ChannelsSplit(
int count) { _Splitter.Split(
this, count); }
2415 inline void ChannelsMerge() { _Splitter.Merge(
this); }
2416 inline void ChannelsSetCurrent(
int n) { _Splitter.SetCurrentChannel(
this, n); }
2421 IMGUI_API
void PrimReserve(
int idx_count,
int vtx_count);
2422 IMGUI_API
void PrimUnreserve(
int idx_count,
int vtx_count);
2423 IMGUI_API
void PrimRect(
const ImVec2& a,
const ImVec2& b, ImU32 col);
2426 inline void PrimWriteVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
2427 inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
2428 inline void PrimVtx(
const ImVec2& pos,
const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
2430 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2431 inline void AddBezierCurve(
const ImVec2& p1,
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4, ImU32 col,
float thickness,
int num_segments = 0) { AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments); }
2432 inline void PathBezierCurveTo(
const ImVec2& p2,
const ImVec2& p3,
const ImVec2& p4,
int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); }
2436 IMGUI_API
void _ResetForNewFrame();
2437 IMGUI_API
void _ClearFreeMemory();
2438 IMGUI_API
void _PopUnusedDrawCmd();
2439 IMGUI_API
void _OnChangedClipRect();
2440 IMGUI_API
void _OnChangedTextureID();
2441 IMGUI_API
void _OnChangedVtxOffset();
2442 IMGUI_API
int _CalcCircleAutoSegmentCount(
float radius)
const;
2443 IMGUI_API
void _PathArcToFastEx(
const ImVec2& center,
float radius,
int a_min_sample,
int a_max_sample,
int a_step);
2444 IMGUI_API
void _PathArcToN(
const ImVec2& center,
float radius,
float a_min,
float a_max,
int num_segments);
2463 void Clear() { memset(
this, 0,
sizeof(*
this)); }
2464 IMGUI_API
void DeIndexAllBuffers();
2465 IMGUI_API
void ScaleClipRects(
const ImVec2& fb_scale);
2476 bool FontDataOwnedByAtlas;
2482 ImVec2 GlyphExtraSpacing;
2484 const ImWchar* GlyphRanges;
2485 float GlyphMinAdvanceX;
2486 float GlyphMaxAdvanceX;
2488 unsigned int FontBuilderFlags;
2489 float RasterizerMultiply;
2490 ImWchar EllipsisChar;
2503 unsigned int Colored : 1;
2504 unsigned int Visible : 1;
2505 unsigned int Codepoint : 30;
2507 float X0, Y0, X1, Y1;
2508 float U0, V0, U1, V1;
2518 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); }
2519 inline bool GetBit(
size_t n)
const {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31);
return (UsedChars[off] & mask) != 0; }
2520 inline void SetBit(
size_t n) {
int off = (int)(n >> 5); ImU32 mask = 1u << (n & 31); UsedChars[off] |= mask; }
2521 inline void AddChar(ImWchar c) { SetBit(c); }
2522 IMGUI_API
void AddText(
const char* text,
const char* text_end = NULL);
2523 IMGUI_API
void AddRanges(
const ImWchar* ranges);
2530 unsigned short Width, Height;
2531 unsigned short X, Y;
2532 unsigned int GlyphID;
2533 float GlyphAdvanceX;
2536 ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphAdvanceX = 0.0f; GlyphOffset =
ImVec2(0, 0); Font = NULL; }
2537 bool IsPacked()
const {
return X != 0xFFFF; }
2541 enum ImFontAtlasFlags_
2543 ImFontAtlasFlags_None = 0,
2544 ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
2545 ImFontAtlasFlags_NoMouseCursors = 1 << 1,
2546 ImFontAtlasFlags_NoBakedLines = 1 << 2
2569 IMGUI_API ~ImFontAtlas();
2572 IMGUI_API
ImFont* AddFontFromFileTTF(
const char* filename,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
2573 IMGUI_API
ImFont* AddFontFromMemoryTTF(
void* font_data,
int font_size,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
2574 IMGUI_API
ImFont* AddFontFromMemoryCompressedTTF(
const void* compressed_font_data,
int compressed_font_size,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
2575 IMGUI_API
ImFont* AddFontFromMemoryCompressedBase85TTF(
const char* compressed_font_data_base85,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
2576 IMGUI_API
void ClearInputData();
2577 IMGUI_API
void ClearTexData();
2578 IMGUI_API
void ClearFonts();
2579 IMGUI_API
void Clear();
2586 IMGUI_API
bool Build();
2587 IMGUI_API
void GetTexDataAsAlpha8(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
2588 IMGUI_API
void GetTexDataAsRGBA32(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
2589 bool IsBuilt()
const {
return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
2590 void SetTexID(ImTextureID
id) { TexID = id; }
2599 IMGUI_API
const ImWchar* GetGlyphRangesDefault();
2600 IMGUI_API
const ImWchar* GetGlyphRangesKorean();
2601 IMGUI_API
const ImWchar* GetGlyphRangesJapanese();
2602 IMGUI_API
const ImWchar* GetGlyphRangesChineseFull();
2603 IMGUI_API
const ImWchar* GetGlyphRangesChineseSimplifiedCommon();
2604 IMGUI_API
const ImWchar* GetGlyphRangesCyrillic();
2605 IMGUI_API
const ImWchar* GetGlyphRangesThai();
2606 IMGUI_API
const ImWchar* GetGlyphRangesVietnamese();
2619 IMGUI_API
int AddCustomRectRegular(
int width,
int height);
2620 IMGUI_API
int AddCustomRectFontGlyph(
ImFont* font, ImWchar
id,
int width,
int height,
float advance_x,
const ImVec2& offset =
ImVec2(0, 0));
2621 ImFontAtlasCustomRect* GetCustomRectByIndex(
int index) { IM_ASSERT(index >= 0);
return &CustomRects[index]; }
2625 IMGUI_API
bool GetMouseCursorTexData(ImGuiMouseCursor cursor,
ImVec2* out_offset,
ImVec2* out_size,
ImVec2 out_uv_border[2],
ImVec2 out_uv_fill[2]);
2631 ImFontAtlasFlags Flags;
2633 int TexDesiredWidth;
2634 int TexGlyphPadding;
2639 bool TexPixelsUseColors;
2640 unsigned char* TexPixelsAlpha8;
2641 unsigned int* TexPixelsRGBA32;
2649 ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1];
2653 unsigned int FontBuilderFlags;
2656 int PackIdMouseCursors;
2659 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2671 float FallbackAdvanceX;
2682 short ConfigDataCount;
2683 ImWchar FallbackChar;
2684 ImWchar EllipsisChar;
2685 bool DirtyLookupTables;
2687 float Ascent, Descent;
2688 int MetricsTotalSurface;
2689 ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8];
2693 IMGUI_API ~ImFont();
2694 IMGUI_API
const ImFontGlyph*FindGlyph(ImWchar c)
const;
2695 IMGUI_API
const ImFontGlyph*FindGlyphNoFallback(ImWchar c)
const;
2696 float GetCharAdvance(ImWchar c)
const {
return ((
int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; }
2697 bool IsLoaded()
const {
return ContainerAtlas != NULL; }
2698 const char* GetDebugName()
const {
return ConfigData ? ConfigData->Name :
"<unknown>"; }
2702 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;
2703 IMGUI_API
const char* CalcWordWrapPositionA(
float scale,
const char* text,
const char* text_end,
float wrap_width)
const;
2704 IMGUI_API
void RenderChar(
ImDrawList* draw_list,
float size,
ImVec2 pos, ImU32 col, ImWchar c)
const;
2705 IMGUI_API
void RenderText(
ImDrawList* draw_list,
float size,
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;
2708 IMGUI_API
void BuildLookupTable();
2709 IMGUI_API
void ClearOutputData();
2710 IMGUI_API
void GrowIndex(
int new_size);
2711 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);
2712 IMGUI_API
void AddRemapChar(ImWchar dst, ImWchar src,
bool overwrite_dst =
true);
2713 IMGUI_API
void SetGlyphVisible(ImWchar c,
bool visible);
2714 IMGUI_API
void SetFallbackChar(ImWchar c);
2715 IMGUI_API
bool IsGlyphRangeUnused(
unsigned int c_begin,
unsigned int c_last);
2723 enum ImGuiViewportFlags_
2725 ImGuiViewportFlags_None = 0,
2726 ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
2727 ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
2728 ImGuiViewportFlags_OwnedByApp = 1 << 2
2740 ImGuiViewportFlags Flags;
2749 ImVec2 GetCenter()
const {
return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
2750 ImVec2 GetWorkCenter()
const {
return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
2759 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2763 IMGUI_API
bool ListBoxHeader(
const char* label,
int items_count,
int height_in_items = -1);
2764 static inline bool ListBoxHeader(
const char* label,
const ImVec2& size =
ImVec2(0, 0)) {
return BeginListBox(label, size); }
2765 static inline void ListBoxFooter() { EndListBox(); }
2767 static inline void OpenPopupContextItem(
const char* str_id = NULL, ImGuiMouseButton mb = 1) { OpenPopupOnItemClick(str_id, mb); }
2771 IMGUI_API
bool DragScalar(
const char* label, ImGuiDataType data_type,
void* p_data,
float v_speed,
const void* p_min,
const void* p_max,
const char* format,
float power);
2772 IMGUI_API
bool DragScalarN(
const char* label, ImGuiDataType data_type,
void* p_data,
int components,
float v_speed,
const void* p_min,
const void* p_max,
const char* format,
float power);
2773 static inline bool DragFloat(
const char* label,
float* v,
float v_speed,
float v_min,
float v_max,
const char* format,
float power) {
return DragScalar(label, ImGuiDataType_Float, v, v_speed, &v_min, &v_max, format, power); }
2774 static inline bool DragFloat2(
const char* label,
float v[2],
float v_speed,
float v_min,
float v_max,
const char* format,
float power) {
return DragScalarN(label, ImGuiDataType_Float, v, 2, v_speed, &v_min, &v_max, format, power); }
2775 static inline bool DragFloat3(
const char* label,
float v[3],
float v_speed,
float v_min,
float v_max,
const char* format,
float power) {
return DragScalarN(label, ImGuiDataType_Float, v, 3, v_speed, &v_min, &v_max, format, power); }
2776 static inline bool DragFloat4(
const char* label,
float v[4],
float v_speed,
float v_min,
float v_max,
const char* format,
float power) {
return DragScalarN(label, ImGuiDataType_Float, v, 4, v_speed, &v_min, &v_max, format, power); }
2777 IMGUI_API
bool SliderScalar(
const char* label, ImGuiDataType data_type,
void* p_data,
const void* p_min,
const void* p_max,
const char* format,
float power);
2778 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,
float power);
2779 static inline bool SliderFloat(
const char* label,
float* v,
float v_min,
float v_max,
const char* format,
float power) {
return SliderScalar(label, ImGuiDataType_Float, v, &v_min, &v_max, format, power); }
2780 static inline bool SliderFloat2(
const char* label,
float v[2],
float v_min,
float v_max,
const char* format,
float power) {
return SliderScalarN(label, ImGuiDataType_Float, v, 2, &v_min, &v_max, format, power); }
2781 static inline bool SliderFloat3(
const char* label,
float v[3],
float v_min,
float v_max,
const char* format,
float power) {
return SliderScalarN(label, ImGuiDataType_Float, v, 3, &v_min, &v_max, format, power); }
2782 static inline bool SliderFloat4(
const char* label,
float v[4],
float v_min,
float v_max,
const char* format,
float power) {
return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, power); }
2784 static inline bool BeginPopupContextWindow(
const char* str_id, ImGuiMouseButton mb,
bool over_items) {
return BeginPopupContextWindow(str_id, mb | (over_items ? 0 : ImGuiPopupFlags_NoOpenOverItems)); }
2786 static inline void TreeAdvanceToLabelPos() { SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()); }
2788 static inline void SetNextTreeNodeOpen(
bool open, ImGuiCond cond = 0) { SetNextItemOpen(open, cond); }
2790 static inline float GetContentRegionAvailWidth() {
return GetContentRegionAvail().x; }
2792 static inline ImDrawList* GetOverlayDrawList() {
return GetForegroundDrawList(); }
2796 typedef ImDrawFlags ImDrawCornerFlags;
2797 enum ImDrawCornerFlags_
2799 ImDrawCornerFlags_None = ImDrawFlags_RoundCornersNone,
2800 ImDrawCornerFlags_TopLeft = ImDrawFlags_RoundCornersTopLeft,
2801 ImDrawCornerFlags_TopRight = ImDrawFlags_RoundCornersTopRight,
2802 ImDrawCornerFlags_BotLeft = ImDrawFlags_RoundCornersBottomLeft,
2803 ImDrawCornerFlags_BotRight = ImDrawFlags_RoundCornersBottomRight,
2804 ImDrawCornerFlags_All = ImDrawFlags_RoundCornersAll,
2805 ImDrawCornerFlags_Top = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight,
2806 ImDrawCornerFlags_Bot = ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight,
2807 ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
2808 ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight
2811 #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 2815 #if defined(__clang__) 2816 #pragma clang diagnostic pop 2817 #elif defined(__GNUC__) 2818 #pragma GCC diagnostic pop 2822 #ifdef IMGUI_INCLUDE_IMGUI_USER_H 2823 #include "imgui_user.h" 2826 #endif // #ifndef IMGUI_DISABLE
Definition: imgui_internal.h:2546
Definition: imgui_internal.h:651
Definition: imgui.cpp:889
Definition: imgui_internal.h:1290