11 #if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H) 20 #define IMGUI_VERSION "1.52 WIP" 24 #define IMGUI_API ENGINE_API 30 #define IM_ASSERT(_EXPR) assert(_EXPR) 34 #if defined(__clang__) || defined(__GNUC__) 35 #define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1))) 36 #define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0))) 38 #define IM_FMTARGS(FMT) 39 #define IM_FMTLIST(FMT) 42 #if defined(__clang__) 43 #pragma clang diagnostic push 44 #pragma clang diagnostic ignored "-Wold-style-cast" 69 typedef unsigned int ImU32;
87 typedef unsigned __int64
ImU64;
89 typedef unsigned long long ImU64;
100 ImVec2(
float _x,
float _y) { x = _x; y = _y; }
101 #ifdef IM_VEC2_CLASS_EXTRA // Define constructor and implicit cast operators in imconfig.h to convert back<>forth from your math types and ImVec2. 110 ImVec4(
float _x,
float _y,
float _z,
float _w) { x = _x; y = _y; z = _z; w = _w; }
111 #ifdef IM_VEC4_CLASS_EXTRA // Define constructor and implicit cast operators in imconfig.h to convert back<>forth from your math types and ImVec4. 238 IMGUI_API void Columns(
int count = 1,
const char*
id = NULL,
bool border =
true);
251 IMGUI_API void PushID(
const char* str_id_begin,
const char* str_id_end);
279 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));
280 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));
285 IMGUI_API bool Combo(
const char* label,
int* current_item,
const char*
const* items,
int items_count,
int height_in_items = -1);
286 IMGUI_API bool Combo(
const char* label,
int* current_item,
const char* items_separated_by_zeros,
int height_in_items = -1);
287 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 height_in_items = -1);
288 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));
289 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));
290 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));
291 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));
296 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* display_format =
"%.3f",
float power = 1.0f);
297 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* display_format =
"%.3f",
float power = 1.0f);
298 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* display_format =
"%.3f",
float power = 1.0f);
299 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* display_format =
"%.3f",
float power = 1.0f);
300 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* display_format =
"%.3f",
const char* display_format_max = NULL,
float power = 1.0f);
301 IMGUI_API bool DragInt(
const char* label,
int* v,
float v_speed = 1.0f,
int v_min = 0,
int v_max = 0,
const char* display_format =
"%.0f");
302 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* display_format =
"%.0f");
303 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* display_format =
"%.0f");
304 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* display_format =
"%.0f");
305 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* display_format =
"%.0f",
const char* display_format_max = NULL);
320 IMGUI_API bool SliderFloat(
const char* label,
float* v,
float v_min,
float v_max,
const char* display_format =
"%.3f",
float power = 1.0f);
321 IMGUI_API bool SliderFloat2(
const char* label,
float v[2],
float v_min,
float v_max,
const char* display_format =
"%.3f",
float power = 1.0f);
322 IMGUI_API bool SliderFloat3(
const char* label,
float v[3],
float v_min,
float v_max,
const char* display_format =
"%.3f",
float power = 1.0f);
323 IMGUI_API bool SliderFloat4(
const char* label,
float v[4],
float v_min,
float v_max,
const char* display_format =
"%.3f",
float power = 1.0f);
324 IMGUI_API bool SliderAngle(
const char* label,
float* v_rad,
float v_degrees_min = -360.0f,
float v_degrees_max = +360.0f);
325 IMGUI_API bool SliderInt(
const char* label,
int* v,
int v_min,
int v_max,
const char* display_format =
"%.0f");
326 IMGUI_API bool SliderInt2(
const char* label,
int v[2],
int v_min,
int v_max,
const char* display_format =
"%.0f");
327 IMGUI_API bool SliderInt3(
const char* label,
int v[3],
int v_min,
int v_max,
const char* display_format =
"%.0f");
328 IMGUI_API bool SliderInt4(
const char* label,
int v[4],
int v_min,
int v_max,
const char* display_format =
"%.0f");
329 IMGUI_API bool VSliderFloat(
const char* label,
const ImVec2& size,
float* v,
float v_min,
float v_max,
const char* display_format =
"%.3f",
float power = 1.0f);
330 IMGUI_API bool VSliderInt(
const char* label,
const ImVec2& size,
int* v,
int v_min,
int v_max,
const char* display_format =
"%.0f");
364 IMGUI_API bool ListBox(
const char* label,
int* current_item,
const char*
const* items,
int items_count,
int height_in_items = -1);
365 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);
374 IMGUI_API void Value(
const char* prefix,
float v,
const char* float_format = NULL);
389 IMGUI_API bool MenuItem(
const char* label,
const char* shortcut = NULL,
bool selected =
false,
bool enabled =
true);
390 IMGUI_API bool MenuItem(
const char* label,
const char* shortcut,
bool* p_selected,
bool enabled =
true);
443 IMGUI_API ImVec2 CalcTextSize(
const char* text,
const char* text_end = NULL,
bool hide_text_after_double_hash =
false,
float wrap_width = -1.0f);
444 IMGUI_API void CalcListClipping(
int items_count,
float items_height,
int* out_items_display_start,
int* out_items_display_end);
491 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 494 static inline bool IsPosHoveringAnyWindow(
const ImVec2&) {
IM_ASSERT(0);
return false; }
497 static inline bool CollapsingHeader(
const char* label,
const char* str_id,
bool framed =
true,
bool default_open =
false) { (void)str_id; (void)framed;
ImGuiTreeNodeFlags default_open_flags = 1 << 5;
return CollapsingHeader(label, (default_open ? default_open_flags : 0)); }
499 static inline float GetWindowFontSize() {
return GetFontSize(); }
660 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 740 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 818 const char* (*GetClipboardTextFn)(
void* user_data);
819 void(*SetClipboardTextFn)(
void* user_data,
const char* text);
824 void* (*MemAllocFn)(
size_t sz);
825 void(*MemFreeFn)(
void* ptr);
829 void(*ImeSetInputScreenPosFn)(
int x,
int y);
849 IMGUI_API void AddInputCharactersUTF8(
const char* utf8_chars);
872 bool MouseClicked[5];
874 float MouseClickedTime[5];
875 bool MouseDoubleClicked[5];
876 bool MouseReleased[5];
877 bool MouseDownOwned[5];
878 float MouseDownDuration[5];
879 float MouseDownDurationPrev[5];
880 float MouseDragMaxDistanceSqr[5];
881 float KeysDownDuration[512];
882 float KeysDownDurationPrev[512];
908 inline bool empty()
const {
return Size == 0; }
909 inline int size()
const {
return Size; }
916 inline iterator
begin() {
return Data; }
917 inline const_iterator
begin()
const {
return Data; }
918 inline iterator
end() {
return Data + Size; }
919 inline const_iterator
end()
const {
return Data + Size; }
923 inline const value_type&
back()
const {
IM_ASSERT(Size > 0);
return Data[Size - 1]; }
926 inline int _grow_capacity(
int size)
const {
int new_capacity = Capacity ? (Capacity + Capacity / 2) : 8;
return new_capacity > size ? new_capacity : size; }
928 inline void resize(
int new_size) {
if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; }
929 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++) Data[n] = v; Size = new_size; }
932 if (new_capacity <= Capacity)
return;
933 T* new_data = (value_type*)
ImGui::MemAlloc((
size_t)new_capacity *
sizeof(T));
935 memcpy(new_data, Data, (
size_t)Size *
sizeof(T));
938 Capacity = new_capacity;
941 inline void push_back(
const value_type& v) {
if (Size == Capacity) reserve(_grow_capacity(Size + 1)); Data[Size++] = v; }
944 inline iterator
erase(const_iterator 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(value_type)); Size--;
return Data + off; }
945 inline iterator
insert(const_iterator it,
const value_type& v) {
IM_ASSERT(it >= Data && it <= Data + Size);
const ptrdiff_t off = it - Data;
if (Size == Capacity) reserve(Capacity ? Capacity * 2 : 4);
if (off < (
int)Size) memmove(Data + off + 1, Data + off, ((
size_t)Size - (
size_t)off) *
sizeof(value_type)); Data[off] = v; Size++;
return Data + off; }
957 operator bool()
const {
int current_frame =
ImGui::GetFrameCount();
if (RefFrame == current_frame)
return false; RefFrame = current_frame;
return true; }
961 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS // Will obsolete 962 #define IMGUI_ONCE_UPON_A_FRAME static ImGuiOnceUponAFrame imgui_oaf; if (imgui_oaf) 974 TextRange(
const char* _b,
const char* _e) { b = _b; e = _e; }
975 const char*
begin()
const {
return b; }
976 const char*
end()
const {
return e; }
977 bool empty()
const {
return b == e; }
979 static bool is_blank(
char c) {
return c ==
' ' || c ==
'\t'; }
980 void trim_blanks() {
while (b < e && is_blank(*b)) b++;
while (e > b && is_blank(*(e - 1))) e--; }
990 void Clear() { InputBuf[0] = 0; Build(); }
991 IMGUI_API bool Draw(
const char* label =
"Filter (inc,-exc)",
float width = 0.0f);
992 IMGUI_API bool PassFilter(
const char* text,
const char* text_end = NULL)
const;
1027 union {
int val_i;
float val_f;
void*
val_p; };
1083 IMGUI_API void DeleteChars(
int pos,
int bytes_count);
1084 IMGUI_API void InsertChars(
int pos,
const char* text,
const char* text_end = NULL);
1099 #ifdef IMGUI_USE_BGRA_PACKED_COLOR 1100 #define IM_COL32_R_SHIFT 16 1101 #define IM_COL32_G_SHIFT 8 1102 #define IM_COL32_B_SHIFT 0 1103 #define IM_COL32_A_SHIFT 24 1104 #define IM_COL32_A_MASK 0xFF000000 1106 #define IM_COL32_R_SHIFT 0 1107 #define IM_COL32_G_SHIFT 8 1108 #define IM_COL32_B_SHIFT 16 1109 #define IM_COL32_A_SHIFT 24 1110 #define IM_COL32_A_MASK 0xFF000000 1112 #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)) 1113 #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF 1114 #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black 1115 #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000 1126 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; }
1128 ImColor(
float r,
float g,
float b,
float a = 1.0f) { Value.
x = r; Value.
y = g; Value.
z = b; Value.
w = a; }
1135 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); }
1155 int ItemsCount,
StepNo, DisplayStart, DisplayEnd;
1164 IMGUI_API void Begin(
int items_count,
float items_height = -1.0f);
1188 ImDrawCmd() { ElemCount = 0; ClipRect.
x = ClipRect.
y = -8192.0f; ClipRect.
z = ClipRect.
w = +8192.0f; TextureId = NULL; UserCallback = NULL; UserCallbackData = NULL; }
1197 #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT 1209 IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
1249 IMGUI_API void PushClipRectFullScreen();
1258 IMGUI_API void AddRect(
const ImVec2& a,
const ImVec2& b,
ImU32 col,
float rounding = 0.0f,
int rounding_corners_flags = ~0,
float thickness = 1.0f);
1259 IMGUI_API void AddRectFilled(
const ImVec2& a,
const ImVec2& b,
ImU32 col,
float rounding = 0.0f,
int rounding_corners_flags = ~0);
1265 IMGUI_API void AddCircle(
const ImVec2& centre,
float radius,
ImU32 col,
int num_segments = 12,
float thickness = 1.0f);
1266 IMGUI_API void AddCircleFilled(
const ImVec2& centre,
float radius,
ImU32 col,
int num_segments = 12);
1267 IMGUI_API void AddText(
const ImVec2& pos,
ImU32 col,
const char* text_begin,
const char* text_end = NULL);
1268 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);
1270 IMGUI_API void AddImageQuad(
ImTextureID user_texture_id,
const ImVec2& a,
const ImVec2& b,
const ImVec2& c,
const ImVec2& d,
const ImVec2& uv_a =
ImVec2(0, 0),
const ImVec2& uv_b =
ImVec2(1, 0),
const ImVec2& uv_c =
ImVec2(1, 1),
const ImVec2& uv_d =
ImVec2(0, 1),
ImU32 col = 0xFFFFFFFF);
1271 IMGUI_API void AddPolyline(
const ImVec2* points,
const int num_points,
ImU32 col,
bool closed,
float thickness,
bool anti_aliased);
1272 IMGUI_API void AddConvexPolyFilled(
const ImVec2* points,
const int num_points,
ImU32 col,
bool anti_aliased);
1280 inline void PathStroke(
ImU32 col,
bool closed,
float thickness = 1.0f) { AddPolyline(_Path.
Data, _Path.
Size, col, closed, thickness,
true); PathClear(); }
1281 IMGUI_API void PathArcTo(
const ImVec2& centre,
float radius,
float a_min,
float a_max,
int num_segments = 10);
1282 IMGUI_API void PathArcToFast(
const ImVec2& centre,
float radius,
int a_min_of_12,
int a_max_of_12);
1284 IMGUI_API void PathRect(
const ImVec2& rect_min,
const ImVec2& rect_max,
float rounding = 0.0f,
int rounding_corners_flags = ~0);
1289 IMGUI_API void ChannelsSplit(
int channels_count);
1291 IMGUI_API void ChannelsSetCurrent(
int channel_index);
1301 IMGUI_API void PrimReserve(
int idx_count,
int vtx_count);
1322 ImDrawData() { Valid =
false; CmdLists = NULL; CmdListsCount = TotalVtxCount = TotalIdxCount = 0; }
1374 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);
1375 IMGUI_API ImFont* AddFontFromMemoryCompressedBase85TTF(
const char* compressed_font_data_base85,
float size_pixels,
const ImFontConfig* font_cfg = NULL,
const ImWchar* glyph_ranges = NULL);
1386 IMGUI_API void GetTexDataAsAlpha8(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
1387 IMGUI_API void GetTexDataAsRGBA32(
unsigned char** out_pixels,
int* out_width,
int* out_height,
int* out_bytes_per_pixel = NULL);
1408 bool GetBit(
int n) {
return (UsedChars[n >> 3] & (1 << (n & 7))) != 0; }
1409 void SetBit(
int n) { UsedChars[n >> 3] |= 1 << (n & 7); }
1411 IMGUI_API void AddText(
const char* text,
const char* text_end = NULL);
1426 unsigned short X,
Y;
1430 CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y = 0xFFFF; GlyphAdvanceX = 0.0f; GlyphOffset =
ImVec2(0, 0); Font = NULL; }
1434 IMGUI_API int AddCustomRectRegular(
unsigned int id,
int width,
int height);
1457 int CustomRectIds[1];
1490 bool IsLoaded()
const {
return ContainerAtlas != NULL; }
1494 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;
1495 IMGUI_API const char* CalcWordWrapPositionA(
float scale,
const char* text,
const char* text_end,
float wrap_width)
const;
1501 IMGUI_API void AddGlyph(
ImWchar c,
float x0,
float y0,
float x1,
float y1,
float u0,
float v0,
float u1,
float v1,
float advance_x);
1504 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 1509 #if defined(__clang__) 1510 #pragma clang diagnostic pop 1514 #ifdef IMGUI_INCLUDE_IMGUI_USER_H 1515 #include "imgui_user.h"
void SetNextWindowPosCenter(ImGuiCond cond=0)
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
IMGUI_API bool ColorPicker3(const char *label, float col[3], ImGuiColorEditFlags flags=0)
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))
IMGUI_API void TextColoredV(const ImVec4 &col, const char *fmt, va_list args) IM_FMTLIST(2)
ImVector< ImTextureID > _TextureIdStack
IMGUI_API float GetCursorPosX()
void PathStroke(ImU32 col, bool closed, float thickness=1.0f)
IMGUI_API bool IsAnyWindowHovered()
IMGUI_API ImVec2 GetCursorStartPos()
IMGUI_API void SetTooltip(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void RenderText(ImVec2 pos, const char *text, const char *text_end=NULL, bool hide_text_after_hash=true)
IMGUI_API bool IsMouseReleased(int button)
ImVector< unsigned char > UsedChars
IMGUI_API void SetNextTreeNodeOpen(bool is_open, ImGuiCond cond=0)
IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2 &size, ImGuiWindowFlags extra_flags=0)
IMGUI_API ImVec2 GetCursorPos()
IMGUI_API bool BeginPopupContextItem(const char *str_id, int mouse_button=1)
IMGUI_API void SetScrollFromPosY(float pos_y, float center_y_ratio=0.5f)
IMGUI_API float GetFontSize()
IMGUI_API bool TreeNodeExV(const void *ptr_id, ImGuiTreeNodeFlags flags, const char *fmt, va_list args) IM_FMTLIST(3)
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))
IMGUI_API void ProgressBar(float fraction, const ImVec2 &size_arg=ImVec2(-1, 0), const char *overlay=NULL)
IMGUI_API void SetColumnWidth(int column_index, float width)
void SetTexID(ImTextureID id)
void(* ImDrawCallback)(const ImDrawList *parent_list, const ImDrawCmd *cmd)
IMGUI_API bool BeginChild(ImGuiID id, const ImVec2 &size=ImVec2(0, 0), bool border=false, ImGuiWindowFlags extra_flags=0)
IMGUI_API ImGuiStorage * GetStateStorage()
IMGUI_API bool InputTextMultiline(const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), ImGuiInputTextFlags flags=0, ImGuiTextEditCallback callback=NULL, void *user_data=NULL)
IMGUI_API bool IsRootWindowFocused()
IMGUI_API bool IsWindowFocused()
void PathFillConvex(ImU32 col)
IMGUI_API bool TreeNodeEx(const void *ptr_id, ImGuiTreeNodeFlags flags, const char *fmt,...) IM_FMTARGS(3)
IMGUI_API bool InputInt3(const char *label, int v[3], ImGuiInputTextFlags extra_flags=0)
IMGUI_API void SetCursorPos(const ImVec2 &local_pos)
IMGUI_API void SetWindowCollapsed(const char *name, bool collapsed, ImGuiCond cond=0)
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)
void resize(int new_size)
IMGUI_API bool IsMouseClicked(int button, bool repeat=false)
IMGUI_API bool IsItemClicked(int mouse_button=0)
IMGUI_API bool IsKeyPressed(int user_key_index, bool repeat=true)
float CurveTessellationTol
IMGUI_API void PopTextWrapPos()
ImGuiInputTextFlags Flags
IMGUI_API void CalcListClipping(int items_count, float items_height, int *out_items_display_start, int *out_items_display_end)
IMGUI_API bool IsMouseDown(int button)
ImVector< ImFontGlyph > Glyphs
const value_type & operator[](int i) const
IMGUI_API ImVec2 GetItemRectMin()
IMGUI_API bool IsItemActive()
IMGUI_API bool ColorPicker4(const char *label, float col[4], ImGuiColorEditFlags flags=0, const float *ref_col=NULL)
IMGUI_API void * MemAlloc(size_t sz)
IMGUI_API void SetNextWindowFocus()
IMGUI_API ImVec2 GetMouseDragDelta(int button=0, float lock_threshold=-1.0f)
IMGUI_API void NewFrame()
IMGUI_API bool IsRootWindowOrAnyChildHovered()
IMGUI_API void EndTooltip()
IMGUI_API bool InputInt4(const char *label, int v[4], ImGuiInputTextFlags extra_flags=0)
const value_type * const_iterator
IMGUI_API void LogButtons()
value_type & operator[](int i)
IMGUI_API void CaptureMouseFromApp(bool capture=true)
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))
IMGUI_API bool Selectable(const char *label, bool *p_selected, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
int(* ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data)
IMGUI_API void SetScrollHere(float center_y_ratio=0.5f)
IMGUI_API void PopAllowKeyboardFocus()
IMGUI_API bool SmallButton(const char *label)
IMGUI_API bool IsMouseHoveringRect(const ImVec2 &r_min, const ImVec2 &r_max, bool clip=true)
IMGUI_API void PushClipRect(const ImVec2 &clip_rect_min, const ImVec2 &clip_rect_max, bool intersect_with_current_clip_rect)
IMGUI_API bool Begin(const char *name, bool *p_open, const ImVec2 &size_on_first_use, float bg_alpha=-1.0f, ImGuiWindowFlags flags=0)
unsigned char * TexPixelsAlpha8
IMGUI_API void ShowMetricsWindow(bool *p_open=NULL)
IMGUI_API void BeginTooltip()
IMGUI_API bool IsWindowAppearing()
IMGUI_API bool IsWindowRectHovered()
bool FontDataOwnedByAtlas
void swap(ImVector< T > &rhs)
const_iterator begin() const
const ImFontGlyph * FallbackGlyph
IMGUI_API void Indent(float indent_w=0.0f)
IMGUI_API void PushTextWrapPos(float wrap_pos_x=0.0f)
IMGUI_API void PushButtonRepeat(bool repeat)
IMGUI_API void ResetMouseDragDelta(int button=0)
IMGUI_API bool IsWindowHovered()
IMGUI_API void BulletTextV(const char *fmt, va_list args) IM_FMTLIST(1)
const CustomRect * GetCustomRectByIndex(int index) const
IMGUI_API void SetWindowFocus(const char *name)
IMGUI_API ImGuiMouseCursor GetMouseCursor()
IMGUI_API float GetColumnOffset(int column_index=-1)
bool HasSelection() const
IMGUI_API void SetStateStorage(ImGuiStorage *tree)
IMGUI_API void SetWindowSize(const char *name, const ImVec2 &size, ImGuiCond cond=0)
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiTextEditCallback callback=NULL, void *user_data=NULL)
ImColor(int r, int g, int b, int a=255)
ImVector< ImFont * > Fonts
IMGUI_API ImVec2 GetItemRectSize()
void SetHSV(float h, float s, float v, float a=1.0f)
void PrimWriteVtx(const ImVec2 &pos, const ImVec2 &uv, ImU32 col)
IMGUI_API float GetWindowWidth()
IMGUI_API void SetWindowPos(const char *name, const ImVec2 &pos, ImGuiCond cond=0)
IMGUI_API ImVec2 GetContentRegionMax()
IMGUI_API bool CheckboxFlags(const char *label, unsigned int *flags, unsigned int flags_value)
IMGUI_API bool TreeNode(const void *ptr_id, const char *fmt,...) IM_FMTARGS(2)
void ClearInputCharacters()
IMGUI_API bool ColorEdit4(const char *label, float col[4], ImGuiColorEditFlags flags=0)
IMGUI_API bool BeginMenuBar()
IMGUI_API void AlignFirstTextHeightToWidgets()
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2 &val)
IMGUI_API void MemFree(void *ptr)
IMGUI_API ImGuiContext * CreateContext(void *(*malloc_fn)(size_t)=NULL, void(*free_fn)(void *)=NULL)
IMGUI_API void TextWrappedV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API bool IsMousePosValid(const ImVec2 *mouse_pos=NULL)
IMGUI_API ImVec2 GetMousePos()
IMGUI_API bool InputFloat3(const char *label, float v[3], int decimal_precision=-1, ImGuiInputTextFlags extra_flags=0)
IMGUI_API bool BeginPopup(const char *str_id)
ImVector< CustomRect > CustomRects
IMGUI_API ImGuiID GetID(const void *ptr_id)
IMGUI_API void SameLine(float pos_x=0.0f, float spacing_w=-1.0f)
IMGUI_API void SetMouseCursor(ImGuiMouseCursor type)
IMGUI_API bool SliderFloat2(const char *label, float v[2], float v_min, float v_max, const char *display_format="%.3f", float power=1.0f)
IMGUI_API ImVec2 GetContentRegionAvail()
IMGUI_API void CaptureKeyboardFromApp(bool capture=true)
ImGuiInputTextFlags EventFlag
const value_type & back() const
IMGUI_API float GetScrollMaxY()
IMGUI_API void SetCurrentContext(ImGuiContext *ctx)
ImFontAtlas * ContainerAtlas
IMGUI_API ImDrawList * GetWindowDrawList()
IMGUI_API bool InputInt2(const char *label, int v[2], ImGuiInputTextFlags extra_flags=0)
IMGUI_API bool IsKeyDown(int user_key_index)
IMGUI_API void PopStyleVar(int count=1)
IMGUI_API void SetScrollY(float scroll_y)
IMGUI_API void SetTooltipV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API ImVec2 CalcTextSize(const char *text, const char *text_end=NULL, bool hide_text_after_double_hash=false, float wrap_width=-1.0f)
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
IMGUI_API ImVec2 GetWindowContentRegionMin()
IMGUI_API bool BeginPopupContextWindow(const char *str_id=NULL, int mouse_button=1, bool also_over_items=true)
IMGUI_API void Dummy(const ImVec2 &size)
IMGUI_API void BulletText(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API bool IsAnyItemHovered()
IMGUI_API const char * GetStyleColorName(ImGuiCol idx)
IMGUI_API bool IsMouseDragging(int button=0, float lock_threshold=-1.0f)
IMGUI_API ImVec2 GetWindowContentRegionMax()
Pair(ImGuiID _key, void *_val_p)
unsigned int RasterizerFlags
ImVector< ImDrawChannel > _Channels
IMGUI_API void TextUnformatted(const char *text, const char *text_end=NULL)
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 *display_format="%.3f", float power=1.0f)
IMGUI_API void SetColumnOffset(int column_index, float offset_x)
IMGUI_API void SetNextWindowContentWidth(float width)
IMGUI_API void Unindent(float indent_w=0.0f)
IMGUI_API int GetColumnsCount()
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))
IMGUI_API bool SliderAngle(const char *label, float *v_rad, float v_degrees_min=-360.0f, float v_degrees_max=+360.0f)
ImVector< ImDrawCmd > CmdBuffer
IMGUI_API bool ColorEdit3(const char *label, float col[3], ImGuiColorEditFlags flags=0)
IMGUI_API bool SliderFloat3(const char *label, float v[3], float v_min, float v_max, const char *display_format="%.3f", float power=1.0f)
IMGUI_API ImVec2 GetMousePosOnOpeningCurrentPopup()
float MouseDoubleClickTime
const ImWchar * GlyphRanges
void(* ImGuiSizeConstraintCallback)(ImGuiSizeConstraintCallbackData *data)
IMGUI_API ImGuiIO & GetIO()
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 *display_format="%.0f")
IMGUI_API bool InputFloat2(const char *label, float v[2], int decimal_precision=-1, ImGuiInputTextFlags extra_flags=0)
IMGUI_API void LabelTextV(const char *label, const char *fmt, va_list args) IM_FMTLIST(2)
IMGUI_API bool IsRootWindowOrAnyChildFocused()
unsigned int * TexPixelsRGBA32
IMGUI_API bool InputFloat4(const char *label, float v[4], int decimal_precision=-1, ImGuiInputTextFlags extra_flags=0)
IMGUI_API bool IsItemRectHovered()
IMGUI_API ImFont * GetFont()
IMGUI_API void EndGroup()
IMGUI_API float GetTime()
const char * c_str() const
IMGUI_API int GetColumnIndex()
IMGUI_API bool IsKeyReleased(int user_key_index)
IMGUI_API void LogToFile(int max_depth=-1, const char *filename=NULL)
IMGUI_API void SetNextWindowSizeConstraints(const ImVec2 &size_min, const ImVec2 &size_max, ImGuiSizeConstraintCallback custom_callback=NULL, void *custom_callback_data=NULL)
IMGUI_API bool InputFloat(const char *label, float *v, float step=0.0f, float step_fast=0.0f, int decimal_precision=-1, ImGuiInputTextFlags extra_flags=0)
IMGUI_API ImGuiContext * GetCurrentContext()
IMGUI_API void ShowTestWindow(bool *p_open=NULL)
void reserve(int new_capacity)
IMGUI_API bool IsWindowCollapsed()
IMGUI_API void SetCursorPosX(float x)
IMGUI_API void ShowStyleEditor(ImGuiStyle *ref=NULL)
void resize(int new_size, const T &v)
IMGUI_API float GetContentRegionAvailWidth()
IMGUI_API void PushItemWidth(float item_width)
IMGUI_API bool MenuItem(const char *label, const char *shortcut, bool *p_selected, bool enabled=true)
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
IMGUI_API float GetItemsLineHeightWithSpacing()
IMGUI_API void Separator()
ImVec2 GetClipRectMin() const
IMGUI_API void BeginGroup()
bool FontAllowUserScaling
int _grow_capacity(int size) const
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 *display_format="%.3f", const char *display_format_max=NULL, float power=1.0f)
IMGUI_API bool SliderFloat4(const char *label, float v[4], float v_min, float v_max, const char *display_format="%.3f", float power=1.0f)
IMGUI_API float GetScrollX()
float GetCharAdvance(ImWchar c) const
IMGUI_API bool SliderInt4(const char *label, int v[4], int v_min, int v_max, const char *display_format="%.0f")
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 *display_format="%.3f", float power=1.0f)
IMGUI_API bool BeginPopupContextVoid(const char *str_id=NULL, int mouse_button=1)
ImGuiListClipper(int items_count=-1, float items_height=-1.0f)
unsigned int _VtxCurrentIdx
IMGUI_API float GetColumnWidth(int column_index=-1)
IMGUI_API ImVec2 GetWindowSize()
ImVec2(float _x, float _y)
IMGUI_API void EndPopup()
IMGUI_API float GetTreeNodeToLabelSpacing()
IMGUI_API ImVec2 GetFontTexUvWhitePixel()
IMGUI_API void TextV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API void NextColumn()
IMGUI_API bool ColorButton(const char *desc_id, const ImVec4 &col, ImGuiColorEditFlags flags=0, ImVec2 size=ImVec2(0, 0))
Pair(ImGuiID _key, int _val_i)
IMGUI_API void PushStyleColor(ImGuiCol idx, const ImVec4 &col)
ImVector< ImDrawIdx > IdxBuffer
IMGUI_API float GetWindowHeight()
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 *display_format="%.3f", float power=1.0f)
const value_type & front() const
IMGUI_API bool BeginMainMenuBar()
IMGUI_API ImU32 ColorConvertFloat4ToU32(const ImVec4 &in)
ImVec2 DisplaySafeAreaPadding
IMGUI_API void TreePush(const void *ptr_id=NULL)
IMGUI_API void PushFont(ImFont *font)
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
ImVec2 DisplayWindowPadding
IMGUI_API void SetClipboardText(const char *text)
IMGUI_API bool InvisibleButton(const char *str_id, const ImVec2 &size)
int MetricsRenderVertices
IMGUI_API void EndChild()
IMGUI_API float GetWindowContentRegionWidth()
IMGUI_API float GetScrollMaxX()
IMGUI_API bool BeginMenu(const char *label, bool enabled=true)
IMGUI_API float GetTextLineHeightWithSpacing()
IMGUI_API void TextWrapped(const char *fmt,...) IM_FMTARGS(1)
iterator insert(const_iterator it, const value_type &v)
IMGUI_API void ListBoxFooter()
IMGUI_API void TextColored(const ImVec4 &col, const char *fmt,...) IM_FMTARGS(2)
void PrimVtx(const ImVec2 &pos, const ImVec2 &uv, ImU32 col)
IMGUI_API float CalcItemWidth()
ImDrawCallback UserCallback
IMGUI_API int GetKeyPressedAmount(int key_index, float repeat_delay, float rate)
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void DestroyContext(ImGuiContext *ctx)
IMGUI_API void LogToTTY(int max_depth=-1)
float MouseDoubleClickMaxDist
ImDrawVert * _VtxWritePtr
IMGUI_API ImVec2 GetCursorScreenPos()
IMGUI_API void Shutdown()
IMGUI_API void EndChildFrame()
IMGUI_API bool SliderInt3(const char *label, int v[3], int v_min, int v_max, const char *display_format="%.0f")
IMGUI_API bool SliderInt(const char *label, int *v, int v_min, int v_max, const char *display_format="%.0f")
void push_back(const value_type &v)
IMGUI_API void PopItemWidth()
iterator erase(const_iterator it)
IMGUI_API bool ListBoxHeader(const char *label, int items_count, int height_in_items=-1)
IMGUI_API void LogText(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API bool IsItemVisible()
IMGUI_API float GetTextLineHeight()
IMGUI_API bool SliderInt2(const char *label, int v[2], int v_min, int v_max, const char *display_format="%.0f")
IMGUI_API void LabelText(const char *label, const char *fmt,...) IM_FMTARGS(2)
ImVec4(float _x, float _y, float _z, float _w)
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 height_in_items=-1)
void PathLineToMergeDuplicate(const ImVec2 &pos)
void PathLineTo(const ImVec2 &pos)
IMGUI_API int GetFrameCount()
IMGUI_API bool TreeNodeV(const void *ptr_id, const char *fmt, va_list args) IM_FMTLIST(2)
IMGUI_API bool BeginPopupModal(const char *name, bool *p_open=NULL, ImGuiWindowFlags extra_flags=0)
IMGUI_API const char * GetClipboardText()
IMGUI_API void SetNextWindowContentSize(const ImVec2 &size)
IMGUI_API int GetKeyIndex(ImGuiKey imgui_key)
IMGUI_API void PopButtonRepeat()
IMGUI_API bool Checkbox(const char *label, bool *v)
ImVector< ImDrawVert > VtxBuffer
IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond=0)
IMGUI_API bool VSliderInt(const char *label, const ImVec2 &size, int *v, int v_min, int v_max, const char *display_format="%.0f")
IMGUI_API ImVec2 GetItemRectMax()
IMGUI_API float GetScrollY()
IMGUI_API void SetCursorScreenPos(const ImVec2 &pos)
IMGUI_API void PushID(int int_id)
ImVec2 DisplayFramebufferScale
IMGUI_API void LogToClipboard(int max_depth=-1)
const char * begin() const
IMGUI_API void EndMenuBar()
IMGUI_API const char * GetVersion()
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 *display_format="%.0f", const char *display_format_max=NULL)
IMGUI_API void PushAllowKeyboardFocus(bool allow_keyboard_focus)
ImVector< float > IndexAdvanceX
IMGUI_API ImVec2 GetWindowPos()
ImVector< ImDrawCmd > CmdBuffer
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 *display_format="%.0f")
ImColor(float r, float g, float b, float a=1.0f)
IMGUI_API ImGuiStyle & GetStyle()
IMGUI_API void ColorConvertRGBtoHSV(float r, float g, float b, float &out_h, float &out_s, float &out_v)
IMGUI_API void SetItemAllowOverlap()
IMGUI_API void CloseCurrentPopup()
IMGUI_API void PopClipRect()
IMGUI_API void OpenPopup(const char *str_id)
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 *display_format="%.0f")
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 *display_format="%.3f", float power=1.0f)
Pair(ImGuiID _key, float _val_f)
IMGUI_API bool SliderFloat(const char *label, float *v, float v_min, float v_max, const char *display_format="%.3f", float power=1.0f)
ImVector< TextRange > Filters
ImColor(const ImVec4 &col)
IMGUI_API void SetCursorPosY(float y)
ImVector< ImDrawIdx > IdxBuffer
ImVector< ImFontConfig > ConfigData
IMGUI_API void TextDisabled(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API ImDrawData * GetDrawData()
IMGUI_API void ShowUserGuide()
IMGUI_API const ImVec4 & GetStyleColorVec4(ImGuiCol idx)
ImFontConfig * ConfigData
IMGUI_API void Columns(int count=1, const char *id=NULL, bool border=true)
IMGUI_API void SetWindowFontScale(float scale)
IMGUI_API bool DragInt(const char *label, int *v, float v_speed=1.0f, int v_min=0, int v_max=0, const char *display_format="%.0f")
IMGUI_API bool IsMouseDoubleClicked(int button)
IMGUI_API void StyleColorsClassic(ImGuiStyle *dst=NULL)
IMGUI_API bool IsAnyItemActive()
float ChildWindowRounding
IMGUI_API void ColorConvertHSVtoRGB(float h, float s, float v, float &out_r, float &out_g, float &out_b)
void PrimWriteIdx(ImDrawIdx idx)
IMGUI_API float GetCursorPosY()
IMGUI_API void SetColorEditOptions(ImGuiColorEditFlags flags)
IMGUI_API bool IsItemHovered()
IMGUI_API void SetKeyboardFocusHere(int offset=0)
IMGUI_API void Value(const char *prefix, float v, const char *float_format=NULL)
IMGUI_API void LogFinish()
const_iterator end() const
static ImColor HSV(float h, float s, float v, float a=1.0f)
IMGUI_API void SetScrollX(float scroll_x)
IMGUI_API void TreeAdvanceToLabelPos()
IMGUI_API bool InputInt(const char *label, int *v, int step=1, int step_fast=100, ImGuiInputTextFlags extra_flags=0)
IMGUI_API ImU32 GetColorU32(ImU32 col)
IMGUI_API ImVec4 ColorConvertU32ToFloat4(ImU32 in)
IMGUI_API void PopStyleColor(int count=1)
IMGUI_API bool RadioButton(const char *label, int *v, int v_button)
ImVector< unsigned short > IndexLookup
ImVector< ImVec4 > _ClipRectStack
IMGUI_API void EndMainMenuBar()
IMGUI_API bool VSliderFloat(const char *label, const ImVec2 &size, float *v, float v_min, float v_max, const char *display_format="%.3f", float power=1.0f)
ImVec2 GetClipRectMax() const
IMGUI_API void TextDisabledV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API ImVec2 CalcItemRectClosestPoint(const ImVec2 &pos, bool on_edge=false, float outward=+0.0f)
IMGUI_API bool IsPopupOpen(const char *str_id)
IMGUI_API bool IsRectVisible(const ImVec2 &rect_min, const ImVec2 &rect_max)