VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
imgui_internal.h
Go to the documentation of this file.
1 // dear imgui, v1.74
2 // (internal structures/api)
3 
4 // You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
5 // Set:
6 // #define IMGUI_DEFINE_MATH_OPERATORS
7 // To implement maths operators for ImVec2 (disabled by default to not collide with using IM_VEC2_CLASS_EXTRA along with your own math types+operators)
8 
9 /*
10 
11 Index of this file:
12 // Header mess
13 // Forward declarations
14 // STB libraries includes
15 // Context pointer
16 // Generic helpers
17 // Misc data structures
18 // Main imgui context
19 // Tab bar, tab item
20 // Internal API
21 
22 */
23 
24 #pragma once
25 
26 //-----------------------------------------------------------------------------
27 // Header mess
28 //-----------------------------------------------------------------------------
29 
30 #ifndef IMGUI_VERSION
31 #error Must include imgui.h before imgui_internal.h
32 #endif
33 
34 #include <stdio.h> // FILE*, sscanf
35 #include <stdlib.h> // NULL, malloc, free, qsort, atoi, atof
36 #include <math.h> // sqrtf, fabsf, fmodf, powf, floorf, ceilf, cosf, sinf
37 #include <limits.h> // INT_MIN, INT_MAX
38 
39 // Visual Studio warnings
40 #ifdef _MSC_VER
41 #pragma warning (push)
42 #pragma warning (disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of struct 'xxx' // when IMGUI_API is set to__declspec(dllexport)
43 #endif
44 
45 // Clang/GCC warnings with -Weverything
46 #if defined(__clang__)
47 #pragma clang diagnostic push
48 #pragma clang diagnostic ignored "-Wunused-function" // for stb_textedit.h
49 #pragma clang diagnostic ignored "-Wmissing-prototypes" // for stb_textedit.h
50 #pragma clang diagnostic ignored "-Wold-style-cast"
51 #if __has_warning("-Wzero-as-null-pointer-constant")
52 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
53 #endif
54 #if __has_warning("-Wdouble-promotion")
55 #pragma clang diagnostic ignored "-Wdouble-promotion"
56 #endif
57 #elif defined(__GNUC__)
58 #pragma GCC diagnostic push
59 #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
60 #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
61 #endif
62 
63 // Legacy defines
64 #ifdef IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS // Renamed in 1.74
65 #error Use IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
66 #endif
67 #ifdef IMGUI_DISABLE_MATH_FUNCTIONS // Renamed in 1.74
68 #error Use IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS
69 #endif
70 
71 //-----------------------------------------------------------------------------
72 // Forward declarations
73 //-----------------------------------------------------------------------------
74 
75 struct ImBoolVector; // Store 1-bit per value
76 struct ImRect; // An axis-aligned rectangle (2 points)
77 struct ImDrawDataBuilder; // Helper to build a ImDrawData instance
78 struct ImDrawListSharedData; // Data shared between all ImDrawList instances
79 struct ImGuiColorMod; // Stacked color modifier, backup of modified data so we can restore it
80 struct ImGuiColumnData; // Storage data for a single column
81 struct ImGuiColumns; // Storage data for a columns set
82 struct ImGuiContext; // Main Dear ImGui context
83 struct ImGuiDataTypeInfo; // Type information associated to a ImGuiDataType enum
84 struct ImGuiGroupData; // Stacked storage data for BeginGroup()/EndGroup()
85 struct ImGuiInputTextState; // Internal state of the currently focused/edited text input box
86 struct ImGuiItemHoveredDataBackup; // Backup and restore IsItemHovered() internal data
87 struct ImGuiMenuColumns; // Simple column measurement, currently used for MenuItem() only
88 struct ImGuiNavMoveResult; // Result of a directional navigation move query result
89 struct ImGuiNextWindowData; // Storage for SetNextWindow** functions
90 struct ImGuiNextItemData; // Storage for SetNextItem** functions
91 struct ImGuiPopupData; // Storage for current popup stack
92 struct ImGuiSettingsHandler; // Storage for one type registered in the .ini file
93 struct ImGuiStyleMod; // Stacked style modifier, backup of modified data so we can restore it
94 struct ImGuiTabBar; // Storage for a tab bar
95 struct ImGuiTabItem; // Storage for a tab item (within a tab bar)
96 struct ImGuiWindow; // Storage for one window
97 struct ImGuiWindowTempData; // Temporary storage for one window (that's the data which in theory we could ditch at the end of the frame)
98 struct ImGuiWindowSettings; // Storage for a window .ini settings (we keep one of those even if the actual window wasn't instanced during this session)
99 
100 // Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists.
101 typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ // Enum: Horizontal or vertical
102 typedef int ImGuiButtonFlags; // -> enum ImGuiButtonFlags_ // Flags: for ButtonEx(), ButtonBehavior()
103 typedef int ImGuiColumnsFlags; // -> enum ImGuiColumnsFlags_ // Flags: BeginColumns()
104 typedef int ImGuiDragFlags; // -> enum ImGuiDragFlags_ // Flags: for DragBehavior()
105 typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag()
106 typedef int ImGuiItemStatusFlags; // -> enum ImGuiItemStatusFlags_ // Flags: for DC.LastItemStatusFlags
107 typedef int ImGuiNavHighlightFlags; // -> enum ImGuiNavHighlightFlags_ // Flags: for RenderNavHighlight()
108 typedef int ImGuiNavDirSourceFlags; // -> enum ImGuiNavDirSourceFlags_ // Flags: for GetNavInputAmount2d()
109 typedef int ImGuiNavMoveFlags; // -> enum ImGuiNavMoveFlags_ // Flags: for navigation requests
110 typedef int ImGuiNextItemDataFlags; // -> enum ImGuiNextItemDataFlags_ // Flags: for SetNextItemXXX() functions
111 typedef int ImGuiNextWindowDataFlags; // -> enum ImGuiNextWindowDataFlags_// Flags: for SetNextWindowXXX() functions
112 typedef int ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // Flags: for SeparatorEx()
113 typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for SliderBehavior()
114 typedef int ImGuiTextFlags; // -> enum ImGuiTextFlags_ // Flags: for TextEx()
115 
116 //-------------------------------------------------------------------------
117 // STB libraries includes
118 //-------------------------------------------------------------------------
119 
120 namespace ImStb
121 {
122 
123 #undef STB_TEXTEDIT_STRING
124 #undef STB_TEXTEDIT_CHARTYPE
125 #define STB_TEXTEDIT_STRING ImGuiInputTextState
126 #define STB_TEXTEDIT_CHARTYPE ImWchar
127 #define STB_TEXTEDIT_GETWIDTH_NEWLINE -1.0f
128 #define STB_TEXTEDIT_UNDOSTATECOUNT 99
129 #define STB_TEXTEDIT_UNDOCHARCOUNT 999
130 #include "imstb_textedit.h"
131 
132 } // namespace ImStb
133 
134 //-----------------------------------------------------------------------------
135 // Context pointer
136 //-----------------------------------------------------------------------------
137 
138 #ifndef GImGui
139 extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer
140 #endif
141 
142 //-----------------------------------------------------------------------------
143 // Macros
144 //-----------------------------------------------------------------------------
145 
146 // Debug Logging
147 #ifndef IMGUI_DEBUG_LOG
148 #define IMGUI_DEBUG_LOG(_FMT,...) printf("[%05d] " _FMT, GImGui->FrameCount, __VA_ARGS__)
149 #endif
150 
151 // Static Asserts
152 #if (__cplusplus >= 201100)
153 #define IM_STATIC_ASSERT(_COND) static_assert(_COND, "")
154 #else
155 #define IM_STATIC_ASSERT(_COND) typedef char static_assertion_##__line__[(_COND)?1:-1]
156 #endif
157 
158 // "Paranoid" Debug Asserts are meant to only be enabled during specific debugging/work, otherwise would slow down the code too much.
159 #define IMGUI_DEBUG_PARANOID 0
160 #if IMGUI_DEBUG_PARANOID
161 #define IM_ASSERT_PARANOID(_EXPR) IM_ASSERT(_EXPR)
162 #else
163 #define IM_ASSERT_PARANOID(_EXPR)
164 #endif
165 
166 // Error handling
167 // Down the line in some frameworks/languages we would like to have a way to redirect those to the programmer and recover from more faults.
168 #ifndef IM_ASSERT_USER_ERROR
169 #define IM_ASSERT_USER_ERROR(_EXP,_MSG) IM_ASSERT((_EXP) && (_MSG)) // Recoverable User Error
170 #endif
171 
172 // Misc Macros
173 #define IM_PI 3.14159265358979323846f
174 #ifdef _WIN32
175 #define IM_NEWLINE "\r\n" // Play it nice with Windows users (Update: since 2018-05, Notepad finally appears to support Unix-style carriage returns!)
176 #else
177 #define IM_NEWLINE "\n"
178 #endif
179 #define IM_TABSIZE (4)
180 #define IM_F32_TO_INT8_UNBOUND(_VAL) ((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f))) // Unsaturated, for display purpose
181 #define IM_F32_TO_INT8_SAT(_VAL) ((int)(ImSaturate(_VAL) * 255.0f + 0.5f)) // Saturated, always output 0..255
182 #define IM_FLOOR(_VAL) ((float)(int)(_VAL)) // ImFloor() is not inlined in MSVC debug builds
183 #define IM_ROUND(_VAL) ((float)(int)((_VAL) + 0.5f)) //
184 
185 // Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall
186 #ifdef _MSC_VER
187 #define IMGUI_CDECL __cdecl
188 #else
189 #define IMGUI_CDECL
190 #endif
191 
192 //-----------------------------------------------------------------------------
193 // Generic helpers
194 //-----------------------------------------------------------------------------
195 // - Helpers: Misc
196 // - Helpers: Bit manipulation
197 // - Helpers: String, Formatting
198 // - Helpers: UTF-8 <> wchar conversions
199 // - Helpers: ImVec2/ImVec4 operators
200 // - Helpers: Maths
201 // - Helpers: Geometry
202 // - Helper: ImBoolVector
203 // - Helper: ImPool<>
204 // - Helper: ImChunkStream<>
205 //-----------------------------------------------------------------------------
206 
207 // Helpers: Misc
208 #define ImQsort qsort
209 IMGUI_API ImU32 ImHashData(const void* data, size_t data_size, ImU32 seed = 0);
210 IMGUI_API ImU32 ImHashStr(const char* data, size_t data_size = 0, ImU32 seed = 0);
211 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
212 static inline ImU32 ImHash(const void* data, int size, ImU32 seed = 0) { return size ? ImHashData(data, (size_t)size, seed) : ImHashStr((const char*)data, 0, seed); } // [moved to ImHashStr/ImHashData in 1.68]
213 #endif
214 
215 // Helpers: Bit manipulation
216 static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; }
217 static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }
218 
219 // Helpers: String, Formatting
220 IMGUI_API int ImStricmp(const char* str1, const char* str2);
221 IMGUI_API int ImStrnicmp(const char* str1, const char* str2, size_t count);
222 IMGUI_API void ImStrncpy(char* dst, const char* src, size_t count);
223 IMGUI_API char* ImStrdup(const char* str);
224 IMGUI_API char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* str);
225 IMGUI_API const char* ImStrchrRange(const char* str_begin, const char* str_end, char c);
226 IMGUI_API int ImStrlenW(const ImWchar* str);
227 IMGUI_API const char* ImStreolRange(const char* str, const char* str_end); // End end-of-line
228 IMGUI_API const ImWchar*ImStrbolW(const ImWchar* buf_mid_line, const ImWchar* buf_begin); // Find beginning-of-line
229 IMGUI_API const char* ImStristr(const char* haystack, const char* haystack_end, const char* needle, const char* needle_end);
230 IMGUI_API void ImStrTrimBlanks(char* str);
231 IMGUI_API const char* ImStrSkipBlank(const char* str);
232 IMGUI_API int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) IM_FMTARGS(3);
233 IMGUI_API int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) IM_FMTLIST(3);
234 IMGUI_API const char* ImParseFormatFindStart(const char* format);
235 IMGUI_API const char* ImParseFormatFindEnd(const char* format);
236 IMGUI_API const char* ImParseFormatTrimDecorations(const char* format, char* buf, size_t buf_size);
237 IMGUI_API int ImParseFormatPrecision(const char* format, int default_value);
238 static inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
239 static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
240 
241 // Helpers: UTF-8 <> wchar conversions
242 IMGUI_API int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
243 IMGUI_API int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // read one character. return input UTF-8 bytes count
244 IMGUI_API int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, const char* in_text_end, const char** in_remaining = NULL); // return input UTF-8 bytes count
245 IMGUI_API int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end); // return number of UTF-8 code-points (NOT bytes count)
246 IMGUI_API int ImTextCountUtf8BytesFromChar(const char* in_text, const char* in_text_end); // return number of bytes to express one char in UTF-8
247 IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end); // return number of bytes to express string in UTF-8
248 
249 // Helpers: ImVec2/ImVec4 operators
250 // We are keeping those disabled by default so they don't leak in user space, to allow user enabling implicit cast operators between ImVec2 and their own types (using IM_VEC2_CLASS_EXTRA etc.)
251 // We unfortunately don't have a unary- operator for ImVec2 because this would needs to be defined inside the class itself.
252 #ifdef IMGUI_DEFINE_MATH_OPERATORS
253 static inline ImVec2 operator*(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x*rhs, lhs.y*rhs); }
254 static inline ImVec2 operator/(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x/rhs, lhs.y/rhs); }
255 static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); }
256 static inline ImVec2 operator-(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x-rhs.x, lhs.y-rhs.y); }
257 static inline ImVec2 operator*(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x*rhs.x, lhs.y*rhs.y); }
258 static inline ImVec2 operator/(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x/rhs.x, lhs.y/rhs.y); }
259 static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y; return lhs; }
260 static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; }
261 static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) { lhs.x *= rhs; lhs.y *= rhs; return lhs; }
262 static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) { lhs.x /= rhs; lhs.y /= rhs; return lhs; }
263 static inline ImVec4 operator+(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x+rhs.x, lhs.y+rhs.y, lhs.z+rhs.z, lhs.w+rhs.w); }
264 static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x-rhs.x, lhs.y-rhs.y, lhs.z-rhs.z, lhs.w-rhs.w); }
265 static inline ImVec4 operator*(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x*rhs.x, lhs.y*rhs.y, lhs.z*rhs.z, lhs.w*rhs.w); }
266 #endif
267 
268 // Helpers: File System
269 #if defined(__EMSCRIPTEN__) && !defined(IMGUI_DISABLE_FILE_FUNCTIONS)
270 #define IMGUI_DISABLE_FILE_FUNCTIONS
271 #endif
272 #ifdef IMGUI_DISABLE_FILE_FUNCTIONS
273 #define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS
274 typedef void* ImFileHandle;
275 static inline ImFileHandle ImFileOpen(const char*, const char*) { return NULL; }
276 static inline bool ImFileClose(ImFileHandle) { return false; }
277 static inline ImU64 ImFileGetSize(ImFileHandle) { return (ImU64)-1; }
278 static inline ImU64 ImFileRead(void*, ImU64, ImU64, ImFileHandle) { return 0; }
279 static inline ImU64 ImFileWrite(const void*, ImU64, ImU64, ImFileHandle) { return 0; }
280 #endif
281 
282 #ifndef IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS
283 typedef FILE* ImFileHandle;
284 IMGUI_API ImFileHandle ImFileOpen(const char* filename, const char* mode);
285 IMGUI_API bool ImFileClose(ImFileHandle file);
286 IMGUI_API ImU64 ImFileGetSize(ImFileHandle file);
287 IMGUI_API ImU64 ImFileRead(void* data, ImU64 size, ImU64 count, ImFileHandle file);
288 IMGUI_API ImU64 ImFileWrite(const void* data, ImU64 size, ImU64 count, ImFileHandle file);
289 #else
290 #define IMGUI_DISABLE_TTY_FUNCTIONS // Can't use stdout, fflush if we are not using default file functions
291 #endif
292 IMGUI_API void* ImFileLoadToMemory(const char* filename, const char* mode, size_t* out_file_size = NULL, int padding_bytes = 0);
293 
294 // Helpers: Maths
295 // - Wrapper for standard libs functions. (Note that imgui_demo.cpp does _not_ use them to keep the code easy to copy)
296 #ifndef IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS
297 static inline float ImFabs(float x) { return fabsf(x); }
298 static inline float ImSqrt(float x) { return sqrtf(x); }
299 static inline float ImPow(float x, float y) { return powf(x, y); }
300 static inline double ImPow(double x, double y) { return pow(x, y); }
301 static inline float ImFmod(float x, float y) { return fmodf(x, y); }
302 static inline double ImFmod(double x, double y) { return fmod(x, y); }
303 static inline float ImCos(float x) { return cosf(x); }
304 static inline float ImSin(float x) { return sinf(x); }
305 static inline float ImAcos(float x) { return acosf(x); }
306 static inline float ImAtan2(float y, float x) { return atan2f(y, x); }
307 static inline double ImAtof(const char* s) { return atof(s); }
308 static inline float ImFloorStd(float x) { return floorf(x); } // we already uses our own ImFloor() { return (float)(int)v } internally so the standard one wrapper is named differently (it's used by stb_truetype)
309 static inline float ImCeil(float x) { return ceilf(x); }
310 #endif
311 // - ImMin/ImMax/ImClamp/ImLerp/ImSwap are used by widgets which support for variety of types: signed/unsigned int/long long float/double
312 // (Exceptionally using templates here but we could also redefine them for variety of types)
313 template<typename T> static inline T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; }
314 template<typename T> static inline T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; }
315 template<typename T> static inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
316 template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
317 template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
318 template<typename T> static inline T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 && (a < mn - b)) return mn; if (b > 0 && (a > mx - b)) return mx; return a + b; }
319 template<typename T> static inline T ImSubClampOverflow(T a, T b, T mn, T mx) { if (b > 0 && (a < mn + b)) return mn; if (b < 0 && (a > mx + b)) return mx; return a - b; }
320 // - Misc maths helpers
321 static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); }
322 static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x >= rhs.x ? lhs.x : rhs.x, lhs.y >= rhs.y ? lhs.y : rhs.y); }
323 static inline ImVec2 ImClamp(const ImVec2& v, const ImVec2& mn, ImVec2 mx) { return ImVec2((v.x < mn.x) ? mn.x : (v.x > mx.x) ? mx.x : v.x, (v.y < mn.y) ? mn.y : (v.y > mx.y) ? mx.y : v.y); }
324 static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) { return ImVec2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); }
325 static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); }
326 static inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); }
327 static inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
328 static inline float ImLengthSqr(const ImVec2& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y; }
329 static inline float ImLengthSqr(const ImVec4& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y + lhs.z*lhs.z + lhs.w*lhs.w; }
330 static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = lhs.x*lhs.x + lhs.y*lhs.y; if (d > 0.0f) return 1.0f / ImSqrt(d); return fail_value; }
331 static inline float ImFloor(float f) { return (float)(int)(f); }
332 static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); }
333 static inline int ImModPositive(int a, int b) { return (a + b) % b; }
334 static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; }
335 static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
336 static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
337 static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
338 
339 // Helpers: Geometry
340 IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p);
341 IMGUI_API bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);
342 IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);
343 IMGUI_API void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w);
344 inline float ImTriangleArea(const ImVec2& a, const ImVec2& b, const ImVec2& c) { return ImFabs((a.x * (b.y - c.y)) + (b.x * (c.y - a.y)) + (c.x * (a.y - b.y))) * 0.5f; }
347 // Helper: ImBoolVector
348 // Store 1-bit per value. Note that Resize() currently clears the whole vector.
350 {
351  ImVector<int> Storage;
353  void Resize(int sz) { Storage.resize((sz + 31) >> 5); memset(Storage.Data, 0, (size_t)Storage.Size * sizeof(Storage.Data[0])); }
354  void Clear() { Storage.clear(); }
355  bool GetBit(int n) const { int off = (n >> 5); int mask = 1 << (n & 31); return (Storage[off] & mask) != 0; }
356  void SetBit(int n, bool v) { int off = (n >> 5); int mask = 1 << (n & 31); if (v) Storage[off] |= mask; else Storage[off] &= ~mask; }
357 };
358 
359 // Helper: ImPool<>
360 // Basic keyed storage for contiguous instances, slow/amortized insertion, O(1) indexable, O(Log N) queries by ID over a dense/hot buffer,
361 // Honor constructor/destructor. Add/remove invalidate all pointers. Indexes have the same lifetime as the associated object.
362 typedef int ImPoolIdx;
363 template<typename T>
365 {
366  ImVector<T> Buf; // Contiguous data
367  ImGuiStorage Map; // ID->Index
368  ImPoolIdx FreeIdx; // Next free idx to use
369 
370  ImPool() { FreeIdx = 0; }
371  ~ImPool() { Clear(); }
372  T* GetByKey(ImGuiID key) { int idx = Map.GetInt(key, -1); return (idx != -1) ? &Buf[idx] : NULL; }
373  T* GetByIndex(ImPoolIdx n) { return &Buf[n]; }
374  ImPoolIdx GetIndex(const T* p) const { IM_ASSERT(p >= Buf.Data && p < Buf.Data + Buf.Size); return (ImPoolIdx)(p - Buf.Data); }
375  T* GetOrAddByKey(ImGuiID key) { int* p_idx = Map.GetIntRef(key, -1); if (*p_idx != -1) return &Buf[*p_idx]; *p_idx = FreeIdx; return Add(); }
376  bool Contains(const T* p) const { return (p >= Buf.Data && p < Buf.Data + Buf.Size); }
377  void Clear() { for (int n = 0; n < Map.Data.Size; n++) { int idx = Map.Data[n].val_i; if (idx != -1) Buf[idx].~T(); } Map.Clear(); Buf.clear(); FreeIdx = 0; }
378  T* Add() { int idx = FreeIdx; if (idx == Buf.Size) { Buf.resize(Buf.Size + 1); FreeIdx++; } else { FreeIdx = *(int*)&Buf[idx]; } IM_PLACEMENT_NEW(&Buf[idx]) T(); return &Buf[idx]; }
379  void Remove(ImGuiID key, const T* p) { Remove(key, GetIndex(p)); }
380  void Remove(ImGuiID key, ImPoolIdx idx) { Buf[idx].~T(); *(int*)&Buf[idx] = FreeIdx; FreeIdx = idx; Map.SetInt(key, -1); }
381  void Reserve(int capacity) { Buf.reserve(capacity); Map.Data.reserve(capacity); }
382  int GetSize() const { return Buf.Size; }
383 };
384 
385 // Helper: ImChunkStream<>
386 // Build and iterate a contiguous stream of variable-sized structures.
387 // This is used by Settings to store persistent data while reducing allocation count.
388 // We store the chunk size first, and align the final size on 4 bytes boundaries (this what the '(X + 3) & ~3' statement is for)
389 // The tedious/zealous amount of casting is to avoid -Wcast-align warnings.
390 template<typename T>
392 {
394 
395  void clear() { Buf.clear(); }
396  bool empty() const { return Buf.Size == 0; }
397  int size() const { return Buf.Size; }
398  T* alloc_chunk(size_t sz) { size_t HDR_SZ = 4; sz = ((HDR_SZ + sz) + 3u) & ~3u; int off = Buf.Size; Buf.resize(off + (int)sz); ((int*)(void*)(Buf.Data + off))[0] = (int)sz; return (T*)(void*)(Buf.Data + off + (int)HDR_SZ); }
399  T* begin() { size_t HDR_SZ = 4; if (!Buf.Data) return NULL; return (T*)(void*)(Buf.Data + HDR_SZ); }
400  T* next_chunk(T* p) { size_t HDR_SZ = 4; IM_ASSERT(p >= begin() && p < end()); p = (T*)(void*)((char*)(void*)p + chunk_size(p)); if (p == (T*)(void*)((char*)end() + HDR_SZ)) return (T*)0; IM_ASSERT(p < end()); return p; }
401  int chunk_size(const T* p) { return ((const int*)p)[-1]; }
402  T* end() { return (T*)(void*)(Buf.Data + Buf.Size); }
403  int offset_from_ptr(const T* p) { IM_ASSERT(p >= begin() && p < end()); const ptrdiff_t off = (const char*)p - Buf.Data; return (int)off; }
404  T* ptr_from_offset(int off) { IM_ASSERT(off >= 4 && off < Buf.Size); return (T*)(void*)(Buf.Data + off); }
405 };
406 
407 //-----------------------------------------------------------------------------
408 // Misc data structures
409 //-----------------------------------------------------------------------------
410 
412 {
414  ImGuiButtonFlags_Repeat = 1 << 0, // hold to repeat
415  ImGuiButtonFlags_PressedOnClickRelease = 1 << 1, // [Default] return true on click + release on same item
416  ImGuiButtonFlags_PressedOnClick = 1 << 2, // return true on click (default requires click+release)
417  ImGuiButtonFlags_PressedOnRelease = 1 << 3, // return true on release (default requires click+release)
418  ImGuiButtonFlags_PressedOnDoubleClick = 1 << 4, // return true on double-click (default requires click+release)
419  ImGuiButtonFlags_FlattenChildren = 1 << 5, // allow interactions even if a child window is overlapping
420  ImGuiButtonFlags_AllowItemOverlap = 1 << 6, // require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap()
421  ImGuiButtonFlags_DontClosePopups = 1 << 7, // disable automatically closing parent popup on press // [UNUSED]
422  ImGuiButtonFlags_Disabled = 1 << 8, // disable interactions
423  ImGuiButtonFlags_AlignTextBaseLine = 1 << 9, // vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
424  ImGuiButtonFlags_NoKeyModifiers = 1 << 10, // disable mouse interaction if a key modifier is held
425  ImGuiButtonFlags_NoHoldingActiveID = 1 << 11, // don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
426  ImGuiButtonFlags_PressedOnDragDropHold = 1 << 12, // press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
427  ImGuiButtonFlags_NoNavFocus = 1 << 13, // don't override navigation focus when activated
428  ImGuiButtonFlags_NoHoveredOnNav = 1 << 14 // don't report as hovered when navigated on
429 };
430 
432 {
435 };
436 
438 {
441 };
442 
444 {
445  // Default: 0
447  ImGuiColumnsFlags_NoBorder = 1 << 0, // Disable column dividers
448  ImGuiColumnsFlags_NoResize = 1 << 1, // Disable resizing columns when clicking on the dividers
449  ImGuiColumnsFlags_NoPreserveWidths = 1 << 2, // Disable column width preservation when adjusting columns
450  ImGuiColumnsFlags_NoForceWithinWindow = 1 << 3, // Disable forcing columns to fit within window
451  ImGuiColumnsFlags_GrowParentContentsSize= 1 << 4 // (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.
452 };
453 
454 // Extend ImGuiSelectableFlags_
456 {
457  // NB: need to be in sync with last value of ImGuiSelectableFlags_
461  ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 23, // FIXME: We may be able to remove this (added in 6251d379 for menus)
462  ImGuiSelectableFlags_DrawHoveredWhenHeld= 1 << 24, // Always show active when held, even is not hovered. This concept could probably be renamed/formalized somehow.
464 };
465 
466 // Extend ImGuiTreeNodeFlags_
468 {
470 };
471 
473 {
475  ImGuiSeparatorFlags_Horizontal = 1 << 0, // Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar
478 };
479 
480 // Transient per-window flags, reset at the beginning of the frame. For child window, inherited from parent on first Begin().
481 // This is going to be exposed in imgui.h when stabilized enough.
483 {
485  ImGuiItemFlags_NoTabStop = 1 << 0, // false
486  ImGuiItemFlags_ButtonRepeat = 1 << 1, // false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings.
487  ImGuiItemFlags_Disabled = 1 << 2, // false // [BETA] Disable interactions but doesn't affect visuals yet. See github.com/ocornut/imgui/issues/211
488  ImGuiItemFlags_NoNav = 1 << 3, // false
490  ImGuiItemFlags_SelectableDontClosePopup = 1 << 5, // false // MenuItem/Selectable() automatically closes current Popup window
491  ImGuiItemFlags_MixedValue = 1 << 6, // false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
493 };
494 
495 // Storage for LastItem data
497 {
501  ImGuiItemStatusFlags_Edited = 1 << 2, // Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
502  ImGuiItemStatusFlags_ToggledSelection = 1 << 3, // Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected" because reporting the change allows us to handle clipping with less issues.
503  ImGuiItemStatusFlags_ToggledOpen = 1 << 4, // Set when TreeNode() reports toggling their open state.
504  ImGuiItemStatusFlags_HasDeactivated = 1 << 5, // Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
505  ImGuiItemStatusFlags_Deactivated = 1 << 6 // Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
506 
507 #ifdef IMGUI_ENABLE_TEST_ENGINE
508  , // [imgui_tests only]
509  ImGuiItemStatusFlags_Openable = 1 << 10, //
510  ImGuiItemStatusFlags_Opened = 1 << 11, //
511  ImGuiItemStatusFlags_Checkable = 1 << 12, //
512  ImGuiItemStatusFlags_Checked = 1 << 13 //
513 #endif
514 };
515 
517 {
520 };
521 
522 // FIXME: this is in development, not exposed/functional as a generic feature yet.
523 // Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2
525 {
528 };
529 
531 {
537 };
538 
539 // X/Y enums are fixed to 0/1 so they may be used to index ImVec2
541 {
545 };
546 
548 {
551 };
552 
554 {
558  ImGuiInputSource_NavKeyboard, // Only used occasionally for storage, not tested/handled by most code
561 };
562 
563 // FIXME-NAV: Clarify/expose various repeat delay/rate
565 {
572 };
573 
575 {
579  ImGuiNavHighlightFlags_AlwaysDraw = 1 << 2, // Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse.
581 };
582 
584 {
589 };
590 
592 {
594  ImGuiNavMoveFlags_LoopX = 1 << 0, // On failed request, restart from opposite side
596  ImGuiNavMoveFlags_WrapX = 1 << 2, // On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
597  ImGuiNavMoveFlags_WrapY = 1 << 3, // This is not super useful for provided for completeness
598  ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, // Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
599  ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisibleSet that only comprise elements that are already fully visible.
601 };
602 
604 {
608 };
609 
611 {
612  ImGuiNavLayer_Main = 0, // Main scrolling layer
613  ImGuiNavLayer_Menu = 1, // Menu layer (access with Alt/ImGuiNavInput_Menu)
615 };
616 
618 {
621 };
622 
623 // 1D vector (this odd construct is used to facilitate the transition between 1D and 2D, and the maintenance of some branches/patches)
624 struct ImVec1
625 {
626  float x;
627  ImVec1() { x = 0.0f; }
628  ImVec1(float _x) { x = _x; }
629 };
630 
631 // 2D vector (half-size integer)
632 struct ImVec2ih
633 {
634  short x, y;
635  ImVec2ih() { x = y = 0; }
636  ImVec2ih(short _x, short _y) { x = _x; y = _y; }
637 };
638 
639 // 2D axis aligned bounding-box
640 // NB: we can't rely on ImVec2 math operators being available here
642 {
643  ImVec2 Min; // Upper-left
644  ImVec2 Max; // Lower-right
645 
646  ImRect() : Min(FLT_MAX,FLT_MAX), Max(-FLT_MAX,-FLT_MAX) {}
647  ImRect(const ImVec2& min, const ImVec2& max) : Min(min), Max(max) {}
648  ImRect(const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {}
649  ImRect(float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {}
650 
651  ImVec2 GetCenter() const { return ImVec2((Min.x + Max.x) * 0.5f, (Min.y + Max.y) * 0.5f); }
652  ImVec2 GetSize() const { return ImVec2(Max.x - Min.x, Max.y - Min.y); }
653  float GetWidth() const { return Max.x - Min.x; }
654  float GetHeight() const { return Max.y - Min.y; }
655  ImVec2 GetTL() const { return Min; } // Top-left
656  ImVec2 GetTR() const { return ImVec2(Max.x, Min.y); } // Top-right
657  ImVec2 GetBL() const { return ImVec2(Min.x, Max.y); } // Bottom-left
658  ImVec2 GetBR() const { return Max; } // Bottom-right
659  bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; }
660  bool Contains(const ImRect& r) const { return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x <= Max.x && r.Max.y <= Max.y; }
661  bool Overlaps(const ImRect& r) const { return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; }
662  void Add(const ImVec2& p) { if (Min.x > p.x) Min.x = p.x; if (Min.y > p.y) Min.y = p.y; if (Max.x < p.x) Max.x = p.x; if (Max.y < p.y) Max.y = p.y; }
663  void Add(const ImRect& r) { if (Min.x > r.Min.x) Min.x = r.Min.x; if (Min.y > r.Min.y) Min.y = r.Min.y; if (Max.x < r.Max.x) Max.x = r.Max.x; if (Max.y < r.Max.y) Max.y = r.Max.y; }
664  void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; }
665  void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; }
666  void Translate(const ImVec2& d) { Min.x += d.x; Min.y += d.y; Max.x += d.x; Max.y += d.y; }
667  void TranslateX(float dx) { Min.x += dx; Max.x += dx; }
668  void TranslateY(float dy) { Min.y += dy; Max.y += dy; }
669  void ClipWith(const ImRect& r) { Min = ImMax(Min, r.Min); Max = ImMin(Max, r.Max); } // Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display.
670  void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); } // Full version, ensure both points are fully clipped.
671  void Floor() { Min.x = IM_FLOOR(Min.x); Min.y = IM_FLOOR(Min.y); Max.x = IM_FLOOR(Max.x); Max.y = IM_FLOOR(Max.y); }
672  bool IsInverted() const { return Min.x > Max.x || Min.y > Max.y; }
673 };
674 
675 // Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo().
677 {
678  size_t Size; // Size in byte
679  const char* PrintFmt; // Default printf format for the type
680  const char* ScanFmt; // Default scanf format for the type
681 };
682 
683 // Stacked color modifier, backup of modified data so we can restore it
685 {
688 };
689 
690 // Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the variable.
692 {
694  union { int BackupInt[2]; float BackupFloat[2]; };
695  ImGuiStyleMod(ImGuiStyleVar idx, int v) { VarIdx = idx; BackupInt[0] = v; }
696  ImGuiStyleMod(ImGuiStyleVar idx, float v) { VarIdx = idx; BackupFloat[0] = v; }
697  ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloat[0] = v.x; BackupFloat[1] = v.y; }
698 };
699 
700 // Stacked storage data for BeginGroup()/EndGroup()
702 {
711  bool EmitItem;
712 };
713 
714 // Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper.
716 {
717  float Spacing;
718  float Width, NextWidth;
719  float Pos[3], NextWidths[3];
720 
722  void Update(int count, float spacing, bool clear);
723  float DeclColumns(float w0, float w1, float w2);
724  float CalcExtraSpace(float avail_w) const;
725 };
726 
727 // Internal state of the currently focused/edited text input box
729 {
730  ImGuiID ID; // widget id owning the text state
731  int CurLenW, CurLenA; // we need to maintain our buffer length in both UTF-8 and wchar format. UTF-8 len is valid even if TextA is not.
732  ImVector<ImWchar> TextW; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer.
733  ImVector<char> TextA; // temporary UTF8 buffer for callbacks and other operations. this is not updated in every code-path! size=capacity.
734  ImVector<char> InitialTextA; // backup of end-user buffer at the time of focus (in UTF-8, unaltered)
735  bool TextAIsValid; // temporary UTF8 buffer is not initially valid before we make the widget active (until then we pull the data from user argument)
736  int BufCapacityA; // end-user buffer capacity
737  float ScrollX; // horizontal scrolling/offset
738  ImStb::STB_TexteditState Stb; // state for stb_textedit.h
739  float CursorAnim; // timer for cursor blink, reset on every user action so the cursor reappears immediately
740  bool CursorFollow; // set when we want scrolling to follow the current cursor position (not always!)
741  bool SelectedAllMouseLock; // after a double-click to select all, we ignore further mouse drags to update selection
742  ImGuiInputTextFlags UserFlags; // Temporarily set while we call user's callback
744  void* UserCallbackData; // "
745 
746  ImGuiInputTextState() { memset(this, 0, sizeof(*this)); }
747  void ClearText() { CurLenW = CurLenA = 0; TextW[0] = 0; TextA[0] = 0; CursorClamp(); }
748  void ClearFreeMemory() { TextW.clear(); TextA.clear(); InitialTextA.clear(); }
749  int GetUndoAvailCount() const { return Stb.undostate.undo_point; }
750  int GetRedoAvailCount() const { return STB_TEXTEDIT_UNDOSTATECOUNT - Stb.undostate.redo_point; }
751  void OnKeyPressed(int key); // Cannot be inline because we call in code in stb_textedit.h implementation
752 
753  // Cursor & Selection
754  void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking
755  void CursorClamp() { Stb.cursor = ImMin(Stb.cursor, CurLenW); Stb.select_start = ImMin(Stb.select_start, CurLenW); Stb.select_end = ImMin(Stb.select_end, CurLenW); }
756  bool HasSelection() const { return Stb.select_start != Stb.select_end; }
757  void ClearSelection() { Stb.select_start = Stb.select_end = Stb.cursor; }
758  void SelectAll() { Stb.select_start = 0; Stb.cursor = Stb.select_end = CurLenW; Stb.has_preferred_x = 0; }
759 };
760 
761 // Windows data saved in imgui.ini file
762 // Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily.
763 // (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure)
765 {
769  bool Collapsed;
770 
771  ImGuiWindowSettings() { ID = 0; Pos = Size = ImVec2ih(0, 0); Collapsed = false; }
772  char* GetName() { return (char*)(this + 1); }
773 };
774 
776 {
777  const char* TypeName; // Short description stored in .ini file. Disallowed characters: '[' ']'
778  ImGuiID TypeHash; // == ImHashStr(TypeName)
779  void* (*ReadOpenFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name); // Read: Called when entering into a new ini entry e.g. "[Window][Name]"
780  void (*ReadLineFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line); // Read: Called for every line of text within an ini entry
781  void (*WriteAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* out_buf); // Write: Output every entries into 'out_buf'
782  void* UserData;
783 
784  ImGuiSettingsHandler() { memset(this, 0, sizeof(*this)); }
785 };
786 
787 // Storage for current popup stack
789 {
790  ImGuiID PopupId; // Set on OpenPopup()
791  ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup()
792  ImGuiWindow* SourceWindow; // Set on OpenPopup() copy of NavWindow at the time of opening the popup
793  int OpenFrameCount; // Set on OpenPopup()
794  ImGuiID OpenParentId; // Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu bar vs loose menu items)
795  ImVec2 OpenPopupPos; // Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse)
796  ImVec2 OpenMousePos; // Set on OpenPopup(), copy of mouse position at the time of opening popup
797 
799 };
800 
802 {
803  float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
805  ImGuiColumnsFlags Flags; // Not exposed
807 
809 };
810 
812 {
817  int Current;
818  int Count;
819  float OffMinX, OffMaxX; // Offsets from HostWorkRect.Min.x
821  float HostCursorPosY; // Backup of CursorPos at the time of BeginColumns()
822  float HostCursorMaxPosX; // Backup of CursorMaxPos at the time of BeginColumns()
823  ImRect HostClipRect; // Backup of ClipRect at the time of BeginColumns()
824  ImRect HostWorkRect; // Backup of WorkRect at the time of BeginColumns()
826 
828  void Clear()
829  {
830  ID = 0;
832  IsFirstFrame = false;
833  IsBeingResized = false;
834  Current = 0;
835  Count = 1;
836  OffMinX = OffMaxX = 0.0f;
837  LineMinY = LineMaxY = 0.0f;
838  HostCursorPosY = 0.0f;
839  HostCursorMaxPosX = 0.0f;
840  Columns.clear();
841  }
842 };
843 
844 // Data shared between all ImDrawList instances
846 {
847  ImVec2 TexUvWhitePixel; // UV of white pixel in the atlas
848  ImFont* Font; // Current/default font (optional, for simplified AddText overload)
849  float FontSize; // Current/default font size (optional, for simplified AddText overload)
851  ImVec4 ClipRectFullscreen; // Value for PushClipRectFullscreen()
852  ImDrawListFlags InitialFlags; // Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)
853 
854  // Const data
855  // FIXME: Bake rounded corners fill/borders in atlas
856  ImVec2 CircleVtx12[12];
857 
859 };
860 
862 {
863  ImVector<ImDrawList*> Layers[2]; // Global layers for: regular, tooltip
864 
865  void Clear() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].resize(0); }
866  void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].clear(); }
868 };
869 
871 {
872  ImGuiID ID; // Best candidate
873  ImGuiID SelectScopeId;// Best candidate window current selectable group ID
874  ImGuiWindow* Window; // Best candidate window
875  float DistBox; // Best candidate box distance to current NavId
876  float DistCenter; // Best candidate center distance to current NavId
877  float DistAxial;
878  ImRect RectRel; // Best candidate bounding box in window relative space
879 
881  void Clear() { ID = SelectScopeId = 0; Window = NULL; DistBox = DistCenter = DistAxial = FLT_MAX; RectRel = ImRect(); }
882 };
883 
885 {
894 };
895 
896 // Storage for SetNexWindow** functions
898 {
911  float BgAlphaVal;
912  ImVec2 MenuBarOffsetMinVal; // *Always on* This is not exposed publicly, so we don't clear it.
913 
914  ImGuiNextWindowData() { memset(this, 0, sizeof(*this)); }
916 };
917 
919 {
923 };
924 
926 {
928  float Width; // Set by SetNextItemWidth().
929  bool OpenVal; // Set by SetNextItemOpen() function.
931 
932  ImGuiNextItemData() { memset(this, 0, sizeof(*this)); }
934 };
935 
936 //-----------------------------------------------------------------------------
937 // Tabs
938 //-----------------------------------------------------------------------------
939 
941 {
942  int Index;
943  float Width;
944 };
945 
947 {
948  void* Ptr; // Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a pool.
949  int Index; // Usually index in a main pool.
950 
951  ImGuiPtrOrIndex(void* ptr) { Ptr = ptr; Index = -1; }
952  ImGuiPtrOrIndex(int index) { Ptr = NULL; Index = index; }
953 };
954 
955 //-----------------------------------------------------------------------------
956 // Main imgui context
957 //-----------------------------------------------------------------------------
958 
960 {
962  bool FontAtlasOwnedByContext; // IO.Fonts-> is owned by the ImGuiContext and will be destructed along with it.
965  ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
966  float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
967  float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
969  double Time;
973  bool WithinFrameScope; // Set by NewFrame(), cleared by EndFrame()
974  bool WithinFrameScopeWithImplicitWindow; // Set by NewFrame(), cleared by EndFrame() when the implicit debug window has been pushed
975  bool WithinEndChild; // Set within EndChild()
976 
977  // Windows state
978  ImVector<ImGuiWindow*> Windows; // Windows, sorted in display order, back to front
979  ImVector<ImGuiWindow*> WindowsFocusOrder; // Windows, sorted in focus order, back to front
982  ImGuiStorage WindowsById; // Map window's ImGuiID to ImGuiWindow*
983  int WindowsActiveCount; // Number of unique windows submitted by frame
984  ImGuiWindow* CurrentWindow; // Window being drawn into
985  ImGuiWindow* HoveredWindow; // Will catch mouse inputs
986  ImGuiWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only)
987  ImGuiWindow* MovingWindow; // Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
988  ImGuiWindow* WheelingWindow; // Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
991 
992  // Item/widgets state and tracking information
993  ImGuiID HoveredId; // Hovered widget
996  float HoveredIdTimer; // Measure contiguous hovering time
997  float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active
998  ImGuiID ActiveId; // Active widget
999  ImGuiID ActiveIdIsAlive; // Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
1001  bool ActiveIdIsJustActivated; // Set at the time of activation for one frame
1002  bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
1003  bool ActiveIdHasBeenPressedBefore; // Track whether the active id led to a press (this is to allow changing between PressOnClick and PressOnRelease without pressing twice). Used by range_select branch.
1004  bool ActiveIdHasBeenEditedBefore; // Was the value associated to the widget Edited over the course of the Active state.
1006  ImU32 ActiveIdUsingNavDirMask; // Active widget will want to read those directional navigation requests (e.g. can activate a button and move away from it)
1007  ImU32 ActiveIdUsingNavInputMask; // Active widget will want to read those nav inputs.
1008  ImU64 ActiveIdUsingKeyInputMask; // Active widget will want to read those key inputs. When we grow the ImGuiKey enum we'll need to either to order the enum to make useful keys come first, either redesign this into e.g. a small array.
1009  ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
1011  ImGuiInputSource ActiveIdSource; // Activating with mouse or nav (gamepad/keyboard)
1016  ImGuiID LastActiveId; // Store the last non-zero ActiveId, useful for animation.
1017  float LastActiveIdTimer; // Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
1018 
1019  // Next window/item data
1020  ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions
1021  ImGuiNextItemData NextItemData; // Storage for SetNextItem** functions
1022 
1023  // Shared stacks
1024  ImVector<ImGuiColorMod> ColorModifiers; // Stack for PushStyleColor()/PopStyleColor()
1025  ImVector<ImGuiStyleMod> StyleModifiers; // Stack for PushStyleVar()/PopStyleVar()
1026  ImVector<ImFont*> FontStack; // Stack for PushFont()/PopFont()
1027  ImVector<ImGuiPopupData>OpenPopupStack; // Which popups are open (persistent)
1028  ImVector<ImGuiPopupData>BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
1029 
1030  // Navigation data (for gamepad/keyboard)
1031  ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusWindow'
1032  ImGuiID NavId; // Focused item for navigation
1033  ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0, also set when calling ActivateItem()
1034  ImGuiID NavActivateDownId; // ~~ IsNavInputDown(ImGuiNavInput_Activate) ? NavId : 0
1035  ImGuiID NavActivatePressedId; // ~~ IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0
1036  ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_Input) ? NavId : 0
1037  ImGuiID NavJustTabbedId; // Just tabbed to this id.
1038  ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest).
1039  ImGuiID NavJustMovedToMultiSelectScopeId; // Just navigated to this select scope id (result of a successfully MoveRequest).
1040  ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
1041  ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS WILL ONLY BE None or NavGamepad or NavKeyboard.
1042  ImRect NavScoringRectScreen; // Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
1043  int NavScoringCount; // Metrics for debugging
1044  ImGuiWindow* NavWindowingTarget; // When selecting a window (holding Menu+FocusPrev/Next, or equivalent of CTRL-TAB) this window is temporarily displayed top-most.
1045  ImGuiWindow* NavWindowingTargetAnim; // Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0f
1050  ImGuiNavLayer NavLayer; // Layer we are navigating on. For now the system is hard-coded for 0=main contents and 1=menu/title bar, may expose layers later.
1051  int NavIdTabCounter; // == NavWindow->DC.FocusIdxTabCounter at time of NavId processing
1052  bool NavIdIsAlive; // Nav widget has been seen this frame ~~ NavRefRectRel is valid
1053  bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
1054  bool NavDisableHighlight; // When user starts using mouse, we hide gamepad/keyboard highlight (NB: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
1055  bool NavDisableMouseHover; // When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
1056  bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest
1057  bool NavInitRequest; // Init request for appearing window to select first item
1061  bool NavMoveFromClampedRefRect; // Set by manual scrolling, if we scroll to a point where NavId isn't visible we reset navigation from visible items
1062  bool NavMoveRequest; // Move request for this frame
1064  ImGuiNavForward NavMoveRequestForward; // None / ForwardQueued / ForwardActive (this is used to navigate sibling parent menus from a child menu)
1065  ImGuiDir NavMoveDir, NavMoveDirLast; // Direction of the move request (left/right/up/down), direction of the previous move request
1066  ImGuiDir NavMoveClipDir; // FIXME-NAV: Describe the purpose of this better. Might want to rename?
1067  ImGuiNavMoveResult NavMoveResultLocal; // Best move request candidate within NavWindow
1068  ImGuiNavMoveResult NavMoveResultLocalVisibleSet; // Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
1069  ImGuiNavMoveResult NavMoveResultOther; // Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
1070 
1071  // Tabbing system (older than Nav, active even if Nav is disabled. FIXME-NAV: This needs a redesign!)
1074  int FocusRequestCurrCounterAll; // Any item being requested for focus, stored as an index (we on layout to be stable between the frame pressing TAB and the next frame, semi-ouch)
1075  int FocusRequestCurrCounterTab; // Tab item being requested for focus, stored as an index
1076  int FocusRequestNextCounterAll; // Stored for next frame
1079 
1080  // Render
1081  ImDrawData DrawData; // Main ImDrawData instance to pass render information to the user
1083  float DimBgRatio; // 0.0..1.0 animation when fading in a dimming background (for modal window and CTRL+TAB list)
1084  ImDrawList BackgroundDrawList; // First draw list to be rendered.
1085  ImDrawList ForegroundDrawList; // Last draw list to be rendered. This is where we the render software mouse cursor (if io.MouseDrawCursor is set) and most debug overlays.
1087 
1088  // Drag and Drop
1098  float DragDropAcceptIdCurrRectSurface; // Target item surface (we resolve overlapping targets by prioritizing the smaller surface)
1099  ImGuiID DragDropAcceptIdCurr; // Target item id (set at the time of accepting the payload)
1100  ImGuiID DragDropAcceptIdPrev; // Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets)
1101  int DragDropAcceptFrameCount; // Last time a target expressed a desire to accept the source
1102  ImVector<unsigned char> DragDropPayloadBufHeap; // We don't expose the ImVector<> directly
1103  unsigned char DragDropPayloadBufLocal[16]; // Local buffer for small payloads
1104 
1105  // Tab bars
1110 
1111  // Widget state
1115  ImGuiID TempInputTextId; // Temporary text input when CTRL+clicking on a slider, etc.
1116  ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets
1117  float ColorEditLastHue; // Backup of last Hue associated to LastColor[3], so we can restore Hue in lossy RGB<>HSV round trips
1119  ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker.
1121  float DragCurrentAccum; // Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
1122  float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
1123  float ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
1125  ImVector<char> PrivateClipboard; // If no custom clipboard handler is defined
1126 
1127  // Range-Select/Multi-Select
1128  // [This is unused in this branch, but left here to facilitate merging/syncing multiple branches]
1130 
1131  // Platform support
1132  ImVec2 PlatformImePos; // Cursor position request & last passed to the OS Input Method Editor
1134 
1135  // Settings
1137  float SettingsDirtyTimer; // Save .ini Settings to memory when time reaches zero
1138  ImGuiTextBuffer SettingsIniData; // In memory .ini settings
1139  ImVector<ImGuiSettingsHandler> SettingsHandlers; // List of .ini settings handlers
1140  ImChunkStream<ImGuiWindowSettings> SettingsWindows; // ImGuiWindow .ini settings entries
1141 
1142  // Capture/Logging
1145  ImFileHandle LogFile; // If != NULL log to stdout/ file
1146  ImGuiTextBuffer LogBuffer; // Accumulation buffer when log to clipboard. This is pointer so our GImGui static constructor doesn't call heap allocators.
1151  int LogDepthToExpandDefault; // Default/stored value for LogDepthMaxExpand if not specified in the LogXXX function call.
1152 
1153  // Debug Tools
1155  ImGuiID DebugItemPickerBreakID; // Will call IM_DEBUG_BREAK() when encountering this id
1156 
1157  // Misc
1158  float FramerateSecPerFrame[120]; // Calculate estimate of framerate for user over the last 2 seconds.
1161  int WantCaptureMouseNextFrame; // Explicit capture via CaptureKeyboardFromApp()/CaptureMouseFromApp() sets those flags
1164  char TempBuffer[1024*3+1]; // Temporary text buffer
1165 
1167  {
1168  Initialized = false;
1169  Font = NULL;
1170  FontSize = FontBaseSize = 0.0f;
1171  FontAtlasOwnedByContext = shared_font_atlas ? false : true;
1172  IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
1173  Time = 0.0f;
1174  FrameCount = 0;
1177 
1178  WindowsActiveCount = 0;
1179  CurrentWindow = NULL;
1180  HoveredWindow = NULL;
1181  HoveredRootWindow = NULL;
1182  MovingWindow = NULL;
1183  WheelingWindow = NULL;
1184  WheelingWindowTimer = 0.0f;
1185 
1186  HoveredId = 0;
1187  HoveredIdAllowOverlap = false;
1190  ActiveId = 0;
1191  ActiveIdIsAlive = 0;
1192  ActiveIdTimer = 0.0f;
1193  ActiveIdIsJustActivated = false;
1194  ActiveIdAllowOverlap = false;
1198  ActiveIdUsingNavDirMask = 0x00;
1201  ActiveIdClickOffset = ImVec2(-1,-1);
1202  ActiveIdWindow = NULL;
1208  LastActiveId = 0;
1209  LastActiveIdTimer = 0.0f;
1210 
1211  NavWindow = NULL;
1216  NavScoringCount = 0;
1219  NavWindowingToggleLayer = false;
1221  NavIdTabCounter = INT_MAX;
1222  NavIdIsAlive = false;
1223  NavMousePosDirty = false;
1224  NavDisableHighlight = true;
1225  NavDisableMouseHover = false;
1226  NavAnyRequest = false;
1227  NavInitRequest = false;
1228  NavInitRequestFromMove = false;
1229  NavInitResultId = 0;
1230  NavMoveFromClampedRefRect = false;
1231  NavMoveRequest = false;
1232  NavMoveRequestFlags = 0;
1235 
1239  FocusTabPressed = false;
1240 
1241  DimBgRatio = 0.0f;
1242  BackgroundDrawList._OwnerName = "##Background"; // Give it a name for debugging
1243  ForegroundDrawList._OwnerName = "##Foreground"; // Give it a name for debugging
1245 
1247  DragDropSourceFlags = 0;
1249  DragDropMouseButton = -1;
1250  DragDropTargetId = 0;
1251  DragDropAcceptFlags = 0;
1256 
1257  CurrentTabBar = NULL;
1258 
1259  LastValidMousePos = ImVec2(0.0f, 0.0f);
1260  TempInputTextId = 0;
1262  ColorEditLastHue = 0.0f;
1264  DragCurrentAccumDirty = false;
1265  DragCurrentAccum = 0.0f;
1266  DragSpeedDefaultRatio = 1.0f / 100.0f;
1269 
1270  MultiSelectScopeId = 0;
1271 
1272  PlatformImePos = PlatformImeLastPos = ImVec2(FLT_MAX, FLT_MAX);
1273 
1274  SettingsLoaded = false;
1275  SettingsDirtyTimer = 0.0f;
1276 
1277  LogEnabled = false;
1279  LogFile = NULL;
1280  LogLinePosY = FLT_MAX;
1281  LogLineFirstItem = false;
1282  LogDepthRef = 0;
1284 
1285  DebugItemPickerActive = false;
1287 
1288  memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));
1292  memset(TempBuffer, 0, sizeof(TempBuffer));
1293  }
1294 };
1295 
1296 //-----------------------------------------------------------------------------
1297 // ImGuiWindow
1298 //-----------------------------------------------------------------------------
1299 
1300 // Transient per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the DC variable name in ImGuiWindow.
1301 // FIXME: That's theory, in practice the delimitation between ImGuiWindow and ImGuiWindowTempData is quite tenuous and could be reconsidered.
1303 {
1304  ImVec2 CursorPos; // Current emitting position, in absolute coordinates.
1306  ImVec2 CursorStartPos; // Initial position after Begin(), generally ~ window position + WindowPadding.
1307  ImVec2 CursorMaxPos; // Used to implicitly calculate the size of our contents, always growing during the frame. Used to calculate window->ContentSize at the beginning of next frame
1310  float CurrLineTextBaseOffset; // Baseline offset (0.0f by default on a new line, generally == style.FramePadding.y when a framed item has been added).
1312  int TreeDepth; // Current tree depth.
1313  ImU32 TreeMayJumpToParentOnPopMask; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31.. Could be turned into a ImU64 if necessary.
1314  ImGuiID LastItemId; // ID for last item
1315  ImGuiItemStatusFlags LastItemStatusFlags; // Status flags for last item (see ImGuiItemStatusFlags_)
1316  ImRect LastItemRect; // Interaction rect for last item
1317  ImRect LastItemDisplayRect; // End-user display rect for last item (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
1318  ImGuiNavLayer NavLayerCurrent; // Current layer, 0..31 (we currently only use 0..1)
1319  int NavLayerCurrentMask; // = (1 << NavLayerCurrent) used by ItemAdd prior to clipping.
1320  int NavLayerActiveMask; // Which layer have been written to (result from previous frame)
1321  int NavLayerActiveMaskNext; // Which layer have been written to (buffer for current frame)
1323  bool NavHasScroll; // Set when scrolling can be used (ScrollMax > 0.0f)
1324  bool MenuBarAppending; // FIXME: Remove this
1325  ImVec2 MenuBarOffset; // MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
1327  ImGuiStorage* StateStorage; // Current persistent per-window storage (store e.g. tree node open/close state)
1329  ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin()
1330  int FocusCounterAll; // Counter for focus/tabbing system. Start at -1 and increase as assigned via FocusableItemRegister() (FIXME-NAV: Needs redesign)
1331  int FocusCounterTab; // (same, but only count widgets which you can Tab through)
1332 
1333  // We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
1334  ImGuiItemFlags ItemFlags; // == ItemFlagsStack.back() [empty == ImGuiItemFlags_Default]
1335  float ItemWidth; // == ItemWidthStack.back(). 0.0: default, >0.0: width in pixels, <0.0: align xx pixels to the right of window
1336  float TextWrapPos; // == TextWrapPosStack.back() [empty == -1.0f]
1341  short StackSizesBackup[6]; // Store size of various stacks for asserting
1342 
1343  ImVec1 Indent; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
1345  ImVec1 ColumnsOffset; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
1346  ImGuiColumns* CurrentColumns; // Current columns set
1347 
1349  {
1350  CursorPos = CursorPosPrevLine = CursorStartPos = CursorMaxPos = ImVec2(0.0f, 0.0f);
1351  CurrLineSize = PrevLineSize = ImVec2(0.0f, 0.0f);
1352  CurrLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f;
1353  TreeDepth = 0;
1354  TreeMayJumpToParentOnPopMask = 0x00;
1355  LastItemId = 0;
1356  LastItemStatusFlags = 0;
1357  LastItemRect = LastItemDisplayRect = ImRect();
1358  NavLayerActiveMask = NavLayerActiveMaskNext = 0x00;
1359  NavLayerCurrent = ImGuiNavLayer_Main;
1360  NavLayerCurrentMask = (1 << ImGuiNavLayer_Main);
1361  NavHideHighlightOneFrame = false;
1362  NavHasScroll = false;
1363  MenuBarAppending = false;
1364  MenuBarOffset = ImVec2(0.0f, 0.0f);
1365  StateStorage = NULL;
1366  LayoutType = ParentLayoutType = ImGuiLayoutType_Vertical;
1367  FocusCounterAll = FocusCounterTab = -1;
1368 
1369  ItemFlags = ImGuiItemFlags_Default_;
1370  ItemWidth = 0.0f;
1371  TextWrapPos = -1.0f;
1372  memset(StackSizesBackup, 0, sizeof(StackSizesBackup));
1373 
1374  Indent = ImVec1(0.0f);
1375  GroupOffset = ImVec1(0.0f);
1376  ColumnsOffset = ImVec1(0.0f);
1377  CurrentColumns = NULL;
1378  }
1379 };
1380 
1381 // Storage for one window
1383 {
1384  char* Name;
1385  ImGuiID ID; // == ImHash(Name)
1386  ImGuiWindowFlags Flags; // See enum ImGuiWindowFlags_
1387  ImVec2 Pos; // Position (always rounded-up to nearest pixel)
1388  ImVec2 Size; // Current size (==SizeFull or collapsed title bar size)
1389  ImVec2 SizeFull; // Size when non collapsed
1390  ImVec2 ContentSize; // Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous frame. Does not include window decoration or window padding.
1391  ImVec2 ContentSizeExplicit; // Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize().
1392  ImVec2 WindowPadding; // Window padding at the time of Begin().
1393  float WindowRounding; // Window rounding at the time of Begin().
1394  float WindowBorderSize; // Window border size at the time of Begin().
1395  int NameBufLen; // Size of buffer storing Name. May be larger than strlen(Name)!
1396  ImGuiID MoveId; // == window->GetID("#MOVE")
1397  ImGuiID ChildId; // ID of corresponding item in parent window (for navigation to return from child window to parent window)
1400  ImVec2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change)
1401  ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
1402  ImVec2 ScrollbarSizes; // Size taken by scrollbars on each axis
1403  bool ScrollbarX, ScrollbarY; // Are scrollbars visible?
1404  bool Active; // Set to true on Begin(), unless Collapsed
1406  bool WriteAccessed; // Set to true when any widget access the current window
1407  bool Collapsed; // Set when collapsing window to become only title-bar
1409  bool SkipItems; // Set when items can safely be all clipped (e.g. window not visible or collapsed)
1410  bool Appearing; // Set during the frame where the window is appearing (or re-appearing)
1411  bool Hidden; // Do not display (== (HiddenFrames*** > 0))
1412  bool HasCloseButton; // Set when the window has a close button (p_open != NULL)
1413  signed char ResizeBorderHeld; // Current border being held for resize (-1: none, otherwise 0-3)
1414  short BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
1415  short BeginOrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
1416  short BeginOrderWithinContext; // Order within entire imgui context. This is mostly used for debugging submission order related issues.
1417  ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
1418  ImS8 AutoFitFramesX, AutoFitFramesY;
1422  int HiddenFramesCanSkipItems; // Hide the window for N frames
1423  int HiddenFramesCannotSkipItems; // Hide the window for N frames while allowing items to be submitted so we can measure their size
1424  ImGuiCond SetWindowPosAllowFlags; // store acceptable condition flags for SetNextWindowPos() use.
1425  ImGuiCond SetWindowSizeAllowFlags; // store acceptable condition flags for SetNextWindowSize() use.
1426  ImGuiCond SetWindowCollapsedAllowFlags; // store acceptable condition flags for SetNextWindowCollapsed() use.
1427  ImVec2 SetWindowPosVal; // store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
1428  ImVec2 SetWindowPosPivot; // store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right.
1429 
1430  ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack. (In theory this should be in the TempData structure)
1431  ImGuiWindowTempData DC; // Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the "DC" variable name.
1432 
1433  // The best way to understand what those rectangles are is to use the 'Metrics -> Tools -> Show windows rectangles' viewer.
1434  // The main 'OuterRect', omitted as a field, is window->Rect().
1435  ImRect OuterRectClipped; // == Window->Rect() just after setup in Begin(). == window->Rect() for root window.
1436  ImRect InnerRect; // Inner rectangle (omit title bar, menu bar, scroll bar)
1437  ImRect InnerClipRect; // == InnerRect shrunk by WindowPadding*0.5f on each side, clipped within viewport or parent clip rect.
1438  ImRect WorkRect; // Cover the whole scrolling region, shrunk by WindowPadding*1.0f on each side. This is meant to replace ContentRegionRect over time (from 1.71+ onward).
1439  ImRect ClipRect; // Current clipping/scissoring rectangle, evolve as we are using PushClipRect(), etc. == DrawList->clip_rect_stack.back().
1440  ImRect ContentRegionRect; // FIXME: This is currently confusing/misleading. It is essentially WorkRect but not handling of scrolling. We currently rely on it as right/bottom aligned sizing operation need some size to rely on.
1441 
1442  int LastFrameActive; // Last frame number the window was Active.
1443  float LastTimeActive; // Last timestamp the window was Active (using float as we don't need high precision there)
1445  ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items
1448  float FontWindowScale; // User scale multiplier per-window, via SetWindowFontScale()
1449  int SettingsOffset; // Offset into SettingsWindows[] (offsets are always valid as we only grow the array from the back)
1450 
1451  ImDrawList* DrawList; // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
1453  ImGuiWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.
1454  ImGuiWindow* RootWindow; // Point to ourself or first ancestor that is not a child window.
1455  ImGuiWindow* RootWindowForTitleBarHighlight; // Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
1456  ImGuiWindow* RootWindowForNav; // Point to ourself or first ancestor which doesn't have the NavFlattened flag.
1457 
1458  ImGuiWindow* NavLastChildNavWindow; // When going to the menu bar, we remember the child window we came from. (This could probably be made implicit if we kept g.Windows sorted by last focused including child window.)
1459  ImGuiID NavLastIds[ImGuiNavLayer_COUNT]; // Last known NavId for this window, per layer (0/1)
1460  ImRect NavRectRel[ImGuiNavLayer_COUNT]; // Reference rectangle, in window relative space
1461 
1465 
1466 public:
1467  ImGuiWindow(ImGuiContext* context, const char* name);
1468  ~ImGuiWindow();
1469 
1470  ImGuiID GetID(const char* str, const char* str_end = NULL);
1471  ImGuiID GetID(const void* ptr);
1472  ImGuiID GetID(int n);
1473  ImGuiID GetIDNoKeepAlive(const char* str, const char* str_end = NULL);
1474  ImGuiID GetIDNoKeepAlive(const void* ptr);
1475  ImGuiID GetIDNoKeepAlive(int n);
1476  ImGuiID GetIDFromRectangle(const ImRect& r_abs);
1477 
1478  // We don't use g.FontSize because the window may be != g.CurrentWidow.
1479  ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x+Size.x, Pos.y+Size.y); }
1480  float CalcFontSize() const { ImGuiContext& g = *GImGui; float scale = g.FontBaseSize * FontWindowScale; if (ParentWindow) scale *= ParentWindow->FontWindowScale; return scale; }
1481  float TitleBarHeight() const { ImGuiContext& g = *GImGui; return (Flags & ImGuiWindowFlags_NoTitleBar) ? 0.0f : CalcFontSize() + g.Style.FramePadding.y * 2.0f; }
1482  ImRect TitleBarRect() const { return ImRect(Pos, ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight())); }
1483  float MenuBarHeight() const { ImGuiContext& g = *GImGui; return (Flags & ImGuiWindowFlags_MenuBar) ? DC.MenuBarOffset.y + CalcFontSize() + g.Style.FramePadding.y * 2.0f : 0.0f; }
1484  ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight(); return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight()); }
1485 };
1486 
1487 // Backup and restore just enough data to be able to use IsItemHovered() on item A after another B in the same window has overwritten the data.
1489 {
1494 
1498 };
1499 
1500 //-----------------------------------------------------------------------------
1501 // Tab bar, tab item
1502 //-----------------------------------------------------------------------------
1503 
1504 // Extend ImGuiTabBarFlags_
1506 {
1507  ImGuiTabBarFlags_DockNode = 1 << 20, // Part of a dock node [we don't use this in the master branch but it facilitate branch syncing to keep this around]
1509  ImGuiTabBarFlags_SaveSettings = 1 << 22 // FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty when reordering tabs
1510 };
1511 
1512 // Extend ImGuiTabItemFlags_
1514 {
1515  ImGuiTabItemFlags_NoCloseButton = 1 << 20 // Store whether p_open is set or not, which we need to recompute ContentWidth during layout.
1516 };
1517 
1518 // Storage for one active tab item (sizeof() 26~32 bytes)
1520 {
1524  int LastFrameSelected; // This allows us to infer an ordered list of the last activated tabs with little maintenance
1525  int NameOffset; // When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames
1526  float Offset; // Position relative to beginning of tab
1527  float Width; // Width currently displayed
1528  float ContentWidth; // Width of actual contents, stored during BeginTabItem() call
1529 
1531 };
1532 
1533 // Storage for a tab bar (sizeof() 92~96 bytes)
1535 {
1537  ImGuiID ID; // Zero for tab-bars used by docking
1538  ImGuiID SelectedTabId; // Selected tab
1540  ImGuiID VisibleTabId; // Can occasionally be != SelectedTabId (e.g. when previewing contents for CTRL+TAB preview)
1544  float LastTabContentHeight; // Record the height of contents submitted below the tab bar
1545  float OffsetMax; // Distance from BarRect.Min.x, locked during layout
1546  float OffsetMaxIdeal; // Ideal offset if all tabs were visible and not clipped
1547  float OffsetNextTab; // Distance from BarRect.Min.x, incremented with each BeginTabItem() call, not used if ImGuiTabBarFlags_Reorderable if set.
1557  short LastTabItemIdx; // For BeginTabItem()/EndTabItem()
1558  ImVec2 FramePadding; // style.FramePadding locked at the time of BeginTabBar()
1559  ImGuiTextBuffer TabsNames; // For non-docking tab bar we re-append names in a contiguous buffer.
1560 
1561  ImGuiTabBar();
1562  int GetTabOrder(const ImGuiTabItem* tab) const { return Tabs.index_from_ptr(tab); }
1563  const char* GetTabName(const ImGuiTabItem* tab) const
1564  {
1565  IM_ASSERT(tab->NameOffset != -1 && tab->NameOffset < TabsNames.Buf.Size);
1566  return TabsNames.Buf.Data + tab->NameOffset;
1567  }
1568 };
1569 
1570 //-----------------------------------------------------------------------------
1571 // Internal API
1572 // No guarantee of forward compatibility here.
1573 //-----------------------------------------------------------------------------
1574 
1575 namespace ImGui
1576 {
1577  // We should always have a CurrentWindow in the stack (there is an implicit "Debug" window)
1578  // If this ever crash because g.CurrentWindow is NULL it means that either
1579  // - ImGui::NewFrame() has never been called, which is illegal.
1580  // - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal.
1584  IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
1585  IMGUI_API void FocusWindow(ImGuiWindow* window);
1586  IMGUI_API void FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window);
1592  IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
1595  IMGUI_API void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0);
1596  IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0);
1597  IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0);
1600 
1601  IMGUI_API void SetCurrentFont(ImFont* font);
1602  inline ImFont* GetDefaultFont() { ImGuiContext& g = *GImGui; return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; }
1603  inline ImDrawList* GetForegroundDrawList(ImGuiWindow*) { ImGuiContext& g = *GImGui; return &g.ForegroundDrawList; } // This seemingly unnecessary wrapper simplifies compatibility between the 'master' and 'docking' branches.
1604 
1605  // Init
1606  IMGUI_API void Initialize(ImGuiContext* context);
1607  IMGUI_API void Shutdown(ImGuiContext* context); // Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext().
1608 
1609  // NewFrame
1614 
1615  // Settings
1621  IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name);
1622 
1623  // Scrolling
1624  IMGUI_API void SetScrollX(ImGuiWindow* window, float new_scroll_x);
1625  IMGUI_API void SetScrollY(ImGuiWindow* window, float new_scroll_y);
1626  IMGUI_API void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio = 0.5f);
1627  IMGUI_API void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio = 0.5f);
1628  IMGUI_API ImVec2 ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& item_rect);
1629 
1630  // Basic Accessors
1632  inline ImGuiID GetActiveID() { ImGuiContext& g = *GImGui; return g.ActiveId; }
1633  inline ImGuiID GetFocusID() { ImGuiContext& g = *GImGui; return g.NavId; }
1634  IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window);
1635  IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow* window);
1636  IMGUI_API void ClearActiveID();
1638  IMGUI_API void SetHoveredID(ImGuiID id);
1639  IMGUI_API void KeepAliveID(ImGuiID id);
1640  IMGUI_API void MarkItemEdited(ImGuiID id);
1641  IMGUI_API void PushOverrideID(ImGuiID id);
1642 
1643  // Basic Helpers for widget code
1644  IMGUI_API void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f);
1645  IMGUI_API void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f);
1646  IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL);
1647  IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id);
1648  IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged);
1649  IMGUI_API bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id); // Return true if focus is requested
1651  IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
1652  IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
1653  IMGUI_API void PushMultiItemsWidths(int components, float width_full);
1654  IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled);
1655  IMGUI_API void PopItemFlag();
1656  IMGUI_API bool IsItemToggledSelection(); // Was the last item selection toggled? (after Selectable(), TreeNode() etc. We only returns toggle _event_ in order to handle clipping correctly)
1658  IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess);
1659 
1660  // Logging/Capture
1661  IMGUI_API void LogBegin(ImGuiLogType type, int auto_open_depth); // -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name.
1662  IMGUI_API void LogToBuffer(int auto_open_depth = -1); // Start logging/capturing to internal buffer
1663 
1664  // Popups, Modals, Tooltips
1665  IMGUI_API void OpenPopupEx(ImGuiID id);
1666  IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup);
1667  IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup);
1668  IMGUI_API bool IsPopupOpen(ImGuiID id); // Test for id within current popup stack level (currently begin-ed into); this doesn't scan the whole popup stack!
1669  IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags);
1670  IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip = true);
1673  IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy = ImGuiPopupPositionPolicy_Default);
1674 
1675  // Navigation
1676  IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
1679  IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect& bb_rel, ImGuiNavMoveFlags move_flags);
1682  IMGUI_API ImVec2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor = 0.0f, float fast_factor = 0.0f);
1683  IMGUI_API int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate);
1684  IMGUI_API void ActivateItem(ImGuiID id); // Remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again.
1685  IMGUI_API void SetNavID(ImGuiID id, int nav_layer);
1686  IMGUI_API void SetNavIDWithRectRel(ImGuiID id, int nav_layer, const ImRect& rect_rel);
1687 
1688  // Inputs
1689  // FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions.
1690  inline bool IsActiveIdUsingNavDir(ImGuiDir dir) { ImGuiContext& g = *GImGui; return (g.ActiveIdUsingNavDirMask & (1 << dir)) != 0; }
1691  inline bool IsActiveIdUsingNavInput(ImGuiNavInput input) { ImGuiContext& g = *GImGui; return (g.ActiveIdUsingNavInputMask & (1 << input)) != 0; }
1692  inline bool IsActiveIdUsingKey(ImGuiKey key) { ImGuiContext& g = *GImGui; IM_ASSERT(key < 64); return (g.ActiveIdUsingKeyInputMask & ((ImU64)1 << key)) != 0; }
1693  IMGUI_API bool IsMouseDragPastThreshold(int button, float lock_threshold = -1.0f);
1694  inline bool IsKeyPressedMap(ImGuiKey key, bool repeat = true) { ImGuiContext& g = *GImGui; const int key_index = g.IO.KeyMap[key]; return (key_index >= 0) ? IsKeyPressed(key_index, repeat) : false; }
1695  inline bool IsNavInputDown(ImGuiNavInput n) { ImGuiContext& g = *GImGui; return g.IO.NavInputs[n] > 0.0f; }
1696  inline bool IsNavInputTest(ImGuiNavInput n, ImGuiInputReadMode rm) { return (GetNavInputAmount(n, rm) > 0.0f); }
1697 
1698  // Drag and Drop
1699  IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id);
1700  IMGUI_API void ClearDragDrop();
1702 
1703  // New Columns API (FIXME-WIP)
1704  IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
1705  IMGUI_API void EndColumns(); // close columns
1706  IMGUI_API void PushColumnClipRect(int column_index);
1709  IMGUI_API ImGuiID GetColumnsID(const char* str_id, int count);
1711  IMGUI_API float GetColumnOffsetFromNorm(const ImGuiColumns* columns, float offset_norm);
1712  IMGUI_API float GetColumnNormFromOffset(const ImGuiColumns* columns, float offset);
1713 
1714  // Tab Bars
1715  IMGUI_API bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags);
1717  IMGUI_API void TabBarRemoveTab(ImGuiTabBar* tab_bar, ImGuiID tab_id);
1718  IMGUI_API void TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab);
1719  IMGUI_API void TabBarQueueChangeTabOrder(ImGuiTabBar* tab_bar, const ImGuiTabItem* tab, int dir);
1720  IMGUI_API bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags);
1721  IMGUI_API ImVec2 TabItemCalcSize(const char* label, bool has_close_button);
1722  IMGUI_API void TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col);
1723  IMGUI_API bool TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id);
1724 
1725  // Render helpers
1726  // AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT.
1727  // NB: All position are in absolute pixels coordinates (we are never using window coordinates internally)
1728  IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true);
1729  IMGUI_API void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width);
1730  IMGUI_API void RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0,0), const ImRect* clip_rect = NULL);
1731  IMGUI_API void RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL);
1732  IMGUI_API void RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, float clip_max_x, float ellipsis_max_x, const char* text, const char* text_end, const ImVec2* text_size_if_known);
1733  IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border = true, float rounding = 0.0f);
1734  IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f);
1735  IMGUI_API void RenderColorRectWithAlphaCheckerboard(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding = 0.0f, int rounding_corners_flags = ~0);
1736  IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col, float sz);
1737  IMGUI_API void RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags = ImGuiNavHighlightFlags_TypeDefault); // Navigation highlight
1738  IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); // Find the optional ## from which we stop displaying text.
1739  IMGUI_API void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL);
1740 
1741  // Render helpers (those functions don't access any ImGui state!)
1742  IMGUI_API void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale = 1.0f);
1743  IMGUI_API void RenderBullet(ImDrawList* draw_list, ImVec2 pos, ImU32 col);
1744  IMGUI_API void RenderMouseCursor(ImDrawList* draw_list, ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow);
1745  IMGUI_API void RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col);
1746  IMGUI_API void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding);
1747 
1748 #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1749  // [1.71: 2019/06/07: Updating prototypes of some of the internal functions. Leaving those for reference for a short while]
1750  inline void RenderArrow(ImVec2 pos, ImGuiDir dir, float scale=1.0f) { ImGuiWindow* window = GetCurrentWindow(); RenderArrow(window->DrawList, pos, GetColorU32(ImGuiCol_Text), dir, scale); }
1752 #endif
1753 
1754  // Widgets
1755  IMGUI_API void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0);
1756  IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0);
1757  IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos);
1758  IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2& pos);
1759  IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags);
1760  IMGUI_API void Scrollbar(ImGuiAxis axis);
1761  IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* p_scroll_v, float avail_v, float contents_v, ImDrawCornerFlags rounding_corners);
1763  IMGUI_API ImGuiID GetWindowResizeID(ImGuiWindow* window, int n); // 0..3: corners, 4..7: borders
1765 
1766  // Widgets low-level behaviors
1767  IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
1768  IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, float power, ImGuiDragFlags flags);
1769  IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb);
1770  IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f);
1771  IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);
1772  IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0); // Consume previous SetNextItemOpen() data, if any. May return true when logging
1774 
1775  // Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
1776  // To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
1777  // e.g. " extern template IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDataType data_type, float v); "
1778  template<typename T, typename SIGNED_T, typename FLOAT_T> IMGUI_API bool DragBehaviorT(ImGuiDataType data_type, T* v, float v_speed, T v_min, T v_max, const char* format, float power, ImGuiDragFlags flags);
1779  template<typename T, typename SIGNED_T, typename FLOAT_T> IMGUI_API bool SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, T* v, T v_min, T v_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb);
1780  template<typename T, typename FLOAT_T> IMGUI_API float SliderCalcRatioFromValueT(ImGuiDataType data_type, T v, T v_min, T v_max, float power, float linear_zero_pos);
1781  template<typename T, typename SIGNED_T> IMGUI_API T RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, T v);
1782 
1783  // Data type helpers
1785  IMGUI_API int DataTypeFormatString(char* buf, int buf_size, ImGuiDataType data_type, const void* p_data, const char* format);
1786  IMGUI_API void DataTypeApplyOp(ImGuiDataType data_type, int op, void* output, void* arg_1, const void* arg_2);
1787  IMGUI_API bool DataTypeApplyOpFromText(const char* buf, const char* initial_value_buf, ImGuiDataType data_type, void* p_data, const char* format);
1788 
1789  // InputText
1790  IMGUI_API bool InputTextEx(const char* label, const char* hint, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
1791  IMGUI_API bool TempInputTextScalar(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* p_data, const char* format);
1792  inline bool TempInputTextIsActive(ImGuiID id) { ImGuiContext& g = *GImGui; return (g.ActiveId == id && g.TempInputTextId == id); }
1793 
1794  // Color
1795  IMGUI_API void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags);
1796  IMGUI_API void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags);
1797  IMGUI_API void ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags);
1798 
1799  // Plot
1800  IMGUI_API void PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 frame_size);
1801 
1802  // Shade functions (write over already created vertices)
1803  IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1);
1804  IMGUI_API void ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp);
1805 
1806  // Debug Tools
1807  inline void DebugDrawItemRect(ImU32 col = IM_COL32(255,0,0,255)) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; GetForegroundDrawList(window)->AddRect(window->DC.LastItemRect.Min, window->DC.LastItemRect.Max, col); }
1809 
1810 } // namespace ImGui
1811 
1812 // ImFontAtlas internals
1815 IMGUI_API void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent);
1816 IMGUI_API void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* stbrp_context_opaque);
1818 IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor);
1819 IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride);
1820 
1821 // Debug Tools
1822 // Use 'Metrics->Tools->Item Picker' to break into the call-stack of a specific item.
1823 #ifndef IM_DEBUG_BREAK
1824 #if defined(__clang__)
1825 #define IM_DEBUG_BREAK() __builtin_debugtrap()
1826 #elif defined (_MSC_VER)
1827 #define IM_DEBUG_BREAK() __debugbreak()
1828 #else
1829 #define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger!
1830 #endif
1831 #endif // #ifndef IM_DEBUG_BREAK
1832 
1833 // Test Engine Hooks (imgui_tests)
1834 //#define IMGUI_ENABLE_TEST_ENGINE
1835 #ifdef IMGUI_ENABLE_TEST_ENGINE
1836 extern void ImGuiTestEngineHook_PreNewFrame(ImGuiContext* ctx);
1837 extern void ImGuiTestEngineHook_PostNewFrame(ImGuiContext* ctx);
1838 extern void ImGuiTestEngineHook_ItemAdd(ImGuiContext* ctx, const ImRect& bb, ImGuiID id);
1839 extern void ImGuiTestEngineHook_ItemInfo(ImGuiContext* ctx, ImGuiID id, const char* label, ImGuiItemStatusFlags flags);
1840 extern void ImGuiTestEngineHook_Log(ImGuiContext* ctx, const char* fmt, ...);
1841 #define IMGUI_TEST_ENGINE_ITEM_ADD(_BB, _ID) ImGuiTestEngineHook_ItemAdd(&g, _BB, _ID) // Register item bounding box
1842 #define IMGUI_TEST_ENGINE_ITEM_INFO(_ID, _LABEL, _FLAGS) ImGuiTestEngineHook_ItemInfo(&g, _ID, _LABEL, _FLAGS) // Register item label and status flags (optional)
1843 #define IMGUI_TEST_ENGINE_LOG(_FMT, ...) ImGuiTestEngineHook_Log(&g, _FMT, __VA_ARGS__) // Custom log entry from user land into test log
1844 #else
1845 #define IMGUI_TEST_ENGINE_ITEM_ADD(_BB, _ID) do { } while (0)
1846 #define IMGUI_TEST_ENGINE_ITEM_INFO(_ID, _LABEL, _FLAGS) do { } while (0)
1847 #define IMGUI_TEST_ENGINE_LOG(_FMT, ...) do { } while (0)
1848 #endif
1849 
1850 #if defined(__clang__)
1851 #pragma clang diagnostic pop
1852 #elif defined(__GNUC__)
1853 #pragma GCC diagnostic pop
1854 #endif
1855 
1856 #ifdef _MSC_VER
1857 #pragma warning (pop)
1858 #endif
Definition: imgui_internal.h:577
float CursorAnim
Definition: imgui_internal.h:739
Definition: imgui_internal.h:922
ImVector< ImGuiColumnData > Columns
Definition: imgui_internal.h:825
~ImPool()
Definition: imgui_internal.h:371
ImVector< ImGuiGroupData > GroupStack
Definition: imgui_internal.h:1340
float LastActiveIdTimer
Definition: imgui_internal.h:1017
ImGuiInputTextFlags UserFlags
Definition: imgui_internal.h:742
IMGUI_API void ColorPickerOptionsPopup(const float *ref_col, ImGuiColorEditFlags flags)
ImRect InnerRect
Definition: imgui_internal.h:1436
Definition: imgui_internal.h:1534
Definition: imgui_internal.h:845
Definition: imgui_internal.h:418
Definition: imgui_internal.h:487
ImGuiWindow * NavWindowingTargetAnim
Definition: imgui_internal.h:1045
Definition: imgui.h:2015
IMGUI_API void BringWindowToDisplayBack(ImGuiWindow *window)
bool NavHasScroll
Definition: imgui_internal.h:1323
IMGUI_API bool IsItemToggledSelection()
static float ImAcos(float x)
Definition: imgui_internal.h:305
void CursorClamp()
Definition: imgui_internal.h:755
ImVec2 CursorPosPrevLine
Definition: imgui_internal.h:1305
IMGUI_API void TabBarQueueChangeTabOrder(ImGuiTabBar *tab_bar, const ImGuiTabItem *tab, int dir)
ImGuiTabBarFlagsPrivate_
Definition: imgui_internal.h:1505
static float ImAtan2(float y, float x)
Definition: imgui_internal.h:306
ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v)
Definition: imgui_internal.h:697
float Spacing
Definition: imgui_internal.h:717
float FramerateSecPerFrame[120]
Definition: imgui_internal.h:1158
ImVec2 PrevLineSize
Definition: imgui_internal.h:1309
IMGUI_API const char * ImStreolRange(const char *str, const char *str_end)
ImVec2 PlatformImeLastPos
Definition: imgui_internal.h:1133
int FocusCounterAll
Definition: imgui_internal.h:1330
ImGuiWindow * Window
Definition: imgui_internal.h:874
ImGuiID DragDropAcceptIdPrev
Definition: imgui_internal.h:1100
T * end()
Definition: imgui_internal.h:402
int GetUndoAvailCount() const
Definition: imgui_internal.h:749
ImGuiNextItemDataFlags Flags
Definition: imgui_internal.h:927
int FrameCount
Definition: imgui_internal.h:970
static bool ImCharIsBlankW(unsigned int c)
Definition: imgui_internal.h:239
unsigned int ImU32
Definition: imgui.h:171
char TempBuffer[1024 *3+1]
Definition: imgui_internal.h:1164
unsigned char DragDropPayloadBufLocal[16]
Definition: imgui_internal.h:1103
bool ScrollbarY
Definition: imgui_internal.h:1403
ImVector< ImGuiWindow * > CurrentWindowStack
Definition: imgui_internal.h:981
ImGuiInputSource ActiveIdSource
Definition: imgui_internal.h:1011
IMGUI_API void RenderArrowPointingAt(ImDrawList *draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col)
ImGuiInputSource
Definition: imgui_internal.h:553
void SetBit(int n, bool v)
Definition: imgui_internal.h:356
int FocusRequestCurrCounterTab
Definition: imgui_internal.h:1075
ImGuiStyleMod(ImGuiStyleVar idx, int v)
Definition: imgui_internal.h:695
ImRect MenuBarRect() const
Definition: imgui_internal.h:1484
ImChunkStream< ImGuiWindowSettings > SettingsWindows
Definition: imgui_internal.h:1140
ImGuiID HoveredIdPreviousFrame
Definition: imgui_internal.h:995
ImGuiID DebugItemPickerBreakID
Definition: imgui_internal.h:1155
void Add(const ImRect &r)
Definition: imgui_internal.h:663
Definition: imgui_internal.h:578
IMGUI_API void ClearDragDrop()
ImGuiCond CollapsedCond
Definition: imgui_internal.h:902
IMGUI_API void NavMoveRequestCancel()
IMGUI_API void RenderTextEllipsis(ImDrawList *draw_list, const ImVec2 &pos_min, const ImVec2 &pos_max, float clip_max_x, float ellipsis_max_x, const char *text, const char *text_end, const ImVec2 *text_size_if_known)
float DragSpeedDefaultRatio
Definition: imgui_internal.h:1122
ImVec2 PosPivotVal
Definition: imgui_internal.h:904
ImGuiSeparatorFlags_
Definition: imgui_internal.h:472
bool NavMoveFromClampedRefRect
Definition: imgui_internal.h:1061
ImRect ClipRect
Definition: imgui_internal.h:806
ImGuiMenuColumns MenuColumns
Definition: imgui_internal.h:1445
float OffsetNorm
Definition: imgui_internal.h:803
Definition: imgui.h:1639
T * GetByIndex(ImPoolIdx n)
Definition: imgui_internal.h:373
ImRect TitleBarRect() const
Definition: imgui_internal.h:1482
void * SizeCallbackUserData
Definition: imgui_internal.h:910
float OffMinX
Definition: imgui_internal.h:819
float ColorEditLastHue
Definition: imgui_internal.h:1117
Definition: imgui_internal.h:535
ImGuiLayoutType LayoutType
Definition: imgui_internal.h:1328
IMGUI_API bool CloseButton(ImGuiID id, const ImVec2 &pos)
Definition: imgui_internal.h:586
ImGuiID NavActivatePressedId
Definition: imgui_internal.h:1035
bool WantLayout
Definition: imgui_internal.h:1555
ImGuiPopupData()
Definition: imgui_internal.h:798
int offset_from_ptr(const T *p)
Definition: imgui_internal.h:403
Definition: imgui_internal.h:519
ImVector< ImGuiPopupData > BeginPopupStack
Definition: imgui_internal.h:1028
ImGuiID DragDropAcceptIdCurr
Definition: imgui_internal.h:1099
ImGuiItemStatusFlags LastItemStatusFlags
Definition: imgui_internal.h:1315
IMGUI_API void RenderMouseCursor(ImDrawList *draw_list, ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow)
Definition: imgui_internal.h:764
bool BackupActiveIdPreviousFrameIsAlive
Definition: imgui_internal.h:710
ImVec2 GetTR() const
Definition: imgui_internal.h:656
bool IsNavInputTest(ImGuiNavInput n, ImGuiInputReadMode rm)
Definition: imgui_internal.h:1696
const char * TypeName
Definition: imgui_internal.h:777
T * Data
Definition: imgui.h:1245
int index_from_ptr(const T *it) const
Definition: imgui.h:1295
int Index
Definition: imgui_internal.h:949
ImGuiNavMoveFlags NavMoveRequestFlags
Definition: imgui_internal.h:1063
float x
Definition: imgui.h:200
ImGuiTabItem()
Definition: imgui_internal.h:1530
float FontSize
Definition: imgui_internal.h:966
int HiddenFramesCanSkipItems
Definition: imgui_internal.h:1422
Definition: imgui_internal.h:889
bool Hidden
Definition: imgui_internal.h:1411
Definition: imgui_internal.h:613
Definition: imgui_internal.h:568
void Clear()
Definition: imgui_internal.h:828
Definition: imgui_internal.h:391
Definition: imgui_internal.h:503
int WantCaptureMouseNextFrame
Definition: imgui_internal.h:1161
ImGuiID LastItemId
Definition: imgui_internal.h:1314
int NavLayerActiveMask
Definition: imgui_internal.h:1320
ImGuiDragDropFlags DragDropAcceptFlags
Definition: imgui_internal.h:1097
bool CursorFollow
Definition: imgui_internal.h:740
bool Active
Definition: imgui_internal.h:1404
ImGuiCond OpenCond
Definition: imgui_internal.h:930
ImVec2 OpenMousePos
Definition: imgui_internal.h:796
ImGuiID GetItemID()
Definition: imgui_internal.h:1631
Definition: imgui_internal.h:447
ImGuiPayload DragDropPayload
Definition: imgui_internal.h:1094
ImGuiLogType LogType
Definition: imgui_internal.h:1144
ImVec2 ActiveIdClickOffset
Definition: imgui_internal.h:1009
bool IsBeingResized
Definition: imgui_internal.h:816
IMGUI_API ImGuiID GetHoveredID()
Definition: imgui_internal.h:543
signed char ImS8
Definition: imgui.h:166
void clear()
Definition: imgui.h:1265
int ImGuiNextItemDataFlags
Definition: imgui_internal.h:110
#define IM_FMTLIST(FMT)
Definition: imgui.h:77
ImGuiColumns * CurrentColumns
Definition: imgui_internal.h:1346
Definition: imgui.h:737
float OffsetNextTab
Definition: imgui_internal.h:1547
Definition: imgui_internal.h:425
ImRect Rect() const
Definition: imgui_internal.h:1479
IMGUI_API void LogBegin(ImGuiLogType type, int auto_open_depth)
Definition: imgui_internal.h:890
IMGUI_API void UpdateWindowParentAndRootLinks(ImGuiWindow *window, ImGuiWindowFlags flags, ImGuiWindow *parent_window)
ImGuiID NavActivateId
Definition: imgui_internal.h:1033
Definition: imgui_internal.h:891
void(* ReadLineFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler, void *entry, const char *line)
Definition: imgui_internal.h:780
IMGUI_API void RenderTextClipped(const ImVec2 &pos_min, const ImVec2 &pos_max, const char *text, const char *text_end, const ImVec2 *text_size_if_known, const ImVec2 &align=ImVec2(0, 0), const ImRect *clip_rect=NULL)
float DragCurrentAccum
Definition: imgui_internal.h:1121
ImVec2 Scroll
Definition: imgui_internal.h:1398
IMGUI_API void TabBarRemoveTab(ImGuiTabBar *tab_bar, ImGuiID tab_id)
ImGuiNavMoveResult NavMoveResultLocalVisibleSet
Definition: imgui_internal.h:1068
bool FocusTabPressed
Definition: imgui_internal.h:1078
IMGUI_API float GetColumnNormFromOffset(const ImGuiColumns *columns, float offset)
int BackupInt[2]
Definition: imgui_internal.h:694
ImGuiNextItemData()
Definition: imgui_internal.h:932
void ClearFlags()
Definition: imgui_internal.h:915
ImGuiSizeCallback SizeCallback
Definition: imgui_internal.h:909
ImGuiID NavActivateDownId
Definition: imgui_internal.h:1034
IMGUI_API ImGuiWindowSettings * FindOrCreateWindowSettings(const char *name)
Definition: imgui_internal.h:434
T * next_chunk(T *p)
Definition: imgui_internal.h:400
void ClearFreeMemory()
Definition: imgui_internal.h:866
bool IsActiveIdUsingNavDir(ImGuiDir dir)
Definition: imgui_internal.h:1690
IMGUI_API void SetNavIDWithRectRel(ImGuiID id, int nav_layer, const ImRect &rect_rel)
float BackupFloat[2]
Definition: imgui_internal.h:694
ImGuiNavHighlightFlags_
Definition: imgui_internal.h:574
ImVec2 CursorPos
Definition: imgui_internal.h:1304
float TitleBarHeight() const
Definition: imgui_internal.h:1481
IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags)
T * Add()
Definition: imgui_internal.h:378
IMGUI_API char * ImStrdupcpy(char *dst, size_t *p_dst_size, const char *str)
ImVec2 OpenPopupPos
Definition: imgui_internal.h:795
ImRect OuterRectClipped
Definition: imgui_internal.h:1435
IMGUI_API void SetScrollFromPosX(float local_x, float center_x_ratio=0.5f)
Definition: imgui_internal.h:560
Definition: imgui_internal.h:599
ImGuiStorage WindowsById
Definition: imgui_internal.h:982
ImVec2 CursorStartPos
Definition: imgui_internal.h:1306
bool IsKeyPressedMap(ImGuiKey key, bool repeat=true)
Definition: imgui_internal.h:1694
ImVec4 BackupValue
Definition: imgui_internal.h:687
void ClearFlags()
Definition: imgui_internal.h:933
ImVector< ImFont * > FontStack
Definition: imgui_internal.h:1026
IMGUI_API void SetScrollX(float scroll_x)
Definition: imgui_internal.h:448
IMGUI_API void PlotEx(ImGuiPlotType plot_type, const char *label, float(*values_getter)(void *data, int idx), void *data, int values_count, int values_offset, const char *overlay_text, float scale_min, float scale_max, ImVec2 frame_size)
Definition: imgui_internal.h:624
ImGuiID NavJustMovedToId
Definition: imgui_internal.h:1038
Definition: imgui_internal.h:691
bool Overlaps(const ImRect &r) const
Definition: imgui_internal.h:661
Definition: imgui_internal.h:1507
Definition: imgui_internal.h:588
Definition: imgui_internal.h:619
IMGUI_API void GcAwakeTransientWindowBuffers(ImGuiWindow *window)
void Clear()
Definition: imgui_internal.h:865
ImVec1()
Definition: imgui_internal.h:627
ImGuiCond SetWindowCollapsedAllowFlags
Definition: imgui_internal.h:1426
IMGUI_API ImDrawList * GetForegroundDrawList()
#define IM_FMTARGS(FMT)
Definition: imgui.h:76
float CurrLineTextBaseOffset
Definition: imgui_internal.h:1310
ImGuiStorage StateStorage
Definition: imgui_internal.h:1446
ImGuiID SelectScopeId
Definition: imgui_internal.h:873
Definition: imgui.h:939
IMGUI_API bool TabItemLabelAndCloseButton(ImDrawList *draw_list, const ImRect &bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char *label, ImGuiID tab_id, ImGuiID close_button_id)
int TreeDepth
Definition: imgui_internal.h:1312
bool ActiveIdPreviousFrameHasBeenEditedBefore
Definition: imgui_internal.h:1014
ImVec2 GetBL() const
Definition: imgui_internal.h:657
ImVec2ih()
Definition: imgui_internal.h:635
IMGUI_API void UpdateMouseMovingWindowNewFrame()
ImGuiItemStatusFlags LastItemStatusFlags
Definition: imgui_internal.h:1491
Definition: imgui_internal.h:1519
Definition: imgui_internal.h:801
Definition: imgui_internal.h:614
bool ActiveIdIsJustActivated
Definition: imgui_internal.h:1001
bool WriteAccessed
Definition: imgui_internal.h:1406
static T ImClamp(T v, T mn, T mx)
Definition: imgui_internal.h:315
ImGuiID ID
Definition: imgui_internal.h:1521
bool EmitItem
Definition: imgui_internal.h:711
static ImVec2 ImMul(const ImVec2 &lhs, const ImVec2 &rhs)
Definition: imgui_internal.h:337
ImVec2 SizeVal
Definition: imgui_internal.h:905
ImVec1 ColumnsOffset
Definition: imgui_internal.h:1345
IMGUI_API ImGuiID GetID(const char *str_id)
bool ActiveIdHasBeenEditedThisFrame
Definition: imgui_internal.h:1005
ImRect NavInitResultRectRel
Definition: imgui_internal.h:1060
void clear()
Definition: imgui_internal.h:395
ImGuiCond SetWindowPosAllowFlags
Definition: imgui_internal.h:1424
int Index
Definition: imgui_internal.h:942
Definition: imgui_internal.h:571
static float ImCos(float x)
Definition: imgui_internal.h:303
bool Appearing
Definition: imgui_internal.h:1410
Definition: imgui_internal.h:555
ImS8 AutoFitChildAxises
Definition: imgui_internal.h:1419
Definition: imgui_internal.h:728
bool NavHideHighlightOneFrame
Definition: imgui_internal.h:1322
bool GetBit(int n) const
Definition: imgui_internal.h:355
IMGUI_API ImVec2 GetContentRegionMaxAbs()
Definition: imgui.h:2103
ImFont * Font
Definition: imgui_internal.h:965
IMGUI_API int DataTypeFormatString(char *buf, int buf_size, ImGuiDataType data_type, const void *p_data, const char *format)
void Add(const ImVec2 &p)
Definition: imgui_internal.h:662
void TranslateY(float dy)
Definition: imgui_internal.h:668
T * GetByKey(ImGuiID key)
Definition: imgui_internal.h:372
ImDrawList DrawListInst
Definition: imgui_internal.h:1452
int ImGuiLayoutType
Definition: imgui_internal.h:98
Definition: imgui_internal.h:1515
void ClipWith(const ImRect &r)
Definition: imgui_internal.h:669
ImGuiNavMoveResult NavMoveResultOther
Definition: imgui_internal.h:1069
ImVec2 ScrollTarget
Definition: imgui_internal.h:1400
int ImGuiNavMoveFlags
Definition: imgui_internal.h:109
ImRect NavScoringRectScreen
Definition: imgui_internal.h:1042
voidpf void uLong size
Definition: ioapi.h:39
float HoveredIdNotActiveTimer
Definition: imgui_internal.h:997
bool Contains(const ImRect &r) const
Definition: imgui_internal.h:660
int MemoryDrawListIdxCapacity
Definition: imgui_internal.h:1463
bool LogEnabled
Definition: imgui_internal.h:1143
bool IsNavInputDown(ImGuiNavInput n)
Definition: imgui_internal.h:1695
Definition: imgui.h:198
IMGUI_API ImU32 ImHashData(const void *data, size_t data_size, ImU32 seed=0)
ImVector< ImGuiTabItem > Tabs
Definition: imgui_internal.h:1536
ImGuiAxis
Definition: imgui_internal.h:540
IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char *pixels, int x, int y, int w, int h, int stride)
ImPoolIdx GetIndex(const T *p) const
Definition: imgui_internal.h:374
int MemoryDrawListVtxCapacity
Definition: imgui_internal.h:1464
IMGUI_API int ImParseFormatPrecision(const char *format, int default_value)
IMGUI_API bool ButtonEx(const char *label, const ImVec2 &size_arg=ImVec2(0, 0), ImGuiButtonFlags flags=0)
ImGuiWindowSettings()
Definition: imgui_internal.h:771
IMGUI_API int ImTextStrToUtf8(char *buf, int buf_size, const ImWchar *in_text, const ImWchar *in_text_end)
float DistAxial
Definition: imgui_internal.h:877
int NavIdTabCounter
Definition: imgui_internal.h:1051
Definition: imgui_internal.h:475
int NavLayerActiveMaskNext
Definition: imgui_internal.h:1321
Definition: imgui_internal.h:446
ImVec2 ContentSizeVal
Definition: imgui_internal.h:906
ImVec2 ScrollMax
Definition: imgui_internal.h:1399
bool HoveredIdAllowOverlap
Definition: imgui_internal.h:994
char * dst
Definition: lz4.h:464
ImGuiID NavInputId
Definition: imgui_internal.h:1036
ImGuiWindowTempData DC
Definition: imgui_internal.h:1431
bool SettingsLoaded
Definition: imgui_internal.h:1136
ImVec2 FramePadding
Definition: imgui.h:1318
IMGUI_API void ImFontAtlasBuildPackCustomRects(ImFontAtlas *atlas, void *stbrp_context_opaque)
IMGUI_API void UpdateHoveredWindowAndCaptureFlags()
float PrevLineTextBaseOffset
Definition: imgui_internal.h:1311
#define STB_TEXTEDIT_UNDOSTATECOUNT
Definition: imgui_internal.h:128
Definition: imgui_internal.h:550
ImGuiButtonFlags_
Definition: imgui_internal.h:411
ImRect WorkRect
Definition: imgui_internal.h:1438
ImVec4 ColorPickerRef
Definition: imgui_internal.h:1119
Definition: imgui_internal.h:887
IMGUI_API void FocusableItemUnregister(ImGuiWindow *window)
ImGuiNextWindowData NextWindowData
Definition: imgui_internal.h:1020
IMGUI_API bool ItemAdd(const ImRect &bb, ImGuiID id, const ImRect *nav_bb=NULL)
float HostCursorPosY
Definition: imgui_internal.h:821
static bool ImIsPowerOfTwo(int v)
Definition: imgui_internal.h:216
ImU32 ActiveIdUsingNavDirMask
Definition: imgui_internal.h:1006
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled)
IMGUI_API bool BeginDragDropTargetCustom(const ImRect &bb, ImGuiID id)
IMGUI_API void SetCurrentFont(ImFont *font)
void * Ptr
Definition: imgui_internal.h:948
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
IMGUI_API bool BeginTabBarEx(ImGuiTabBar *tab_bar, const ImRect &bb, ImGuiTabBarFlags flags)
ImGuiTreeNodeFlagsPrivate_
Definition: imgui_internal.h:467
ImVec2 Pos
Definition: imgui_internal.h:1387
#define IM_ARRAYSIZE(_ARR)
Definition: imgui.h:79
ImDrawList BackgroundDrawList
Definition: imgui_internal.h:1084
float NavWindowingHighlightAlpha
Definition: imgui_internal.h:1048
static float ImSin(float x)
Definition: imgui_internal.h:304
bool NavIdIsAlive
Definition: imgui_internal.h:1052
float GetWidth() const
Definition: imgui_internal.h:653
float HoveredIdTimer
Definition: imgui_internal.h:996
static float ImFloor(float f)
Definition: imgui_internal.h:331
ImVec2 MenuBarOffsetMinVal
Definition: imgui_internal.h:912
float CalcFontSize() const
Definition: imgui_internal.h:1480
Definition: imgui_internal.h:596
void Remove(ImGuiID key, ImPoolIdx idx)
Definition: imgui_internal.h:380
Definition: imgui_internal.h:593
IMGUI_API ImGuiID GetWindowResizeID(ImGuiWindow *window, int n)
int LastFrameVisible
Definition: imgui_internal.h:1523
ImRect SizeConstraintRect
Definition: imgui_internal.h:908
float ItemWidthDefault
Definition: imgui_internal.h:1444
ImGuiPlotType
Definition: imgui_internal.h:547
Definition: imgui_internal.h:416
ImGuiWindow * HoveredWindow
Definition: imgui_internal.h:985
ImGuiInputReadMode
Definition: imgui_internal.h:564
ImGuiNavMoveFlags_
Definition: imgui_internal.h:591
ImGuiID PopupId
Definition: imgui_internal.h:1417
ImGuiTextBuffer SettingsIniData
Definition: imgui_internal.h:1138
void ClipWithFull(const ImRect &r)
Definition: imgui_internal.h:670
T * ptr_from_offset(int off)
Definition: imgui_internal.h:404
ImGuiWindow * CurrentWindow
Definition: imgui_internal.h:984
IMGUI_API void TextEx(const char *text, const char *text_end=NULL, ImGuiTextFlags flags=0)
IMGUI_API bool ItemHoverable(const ImRect &bb, ImGuiID id)
Definition: imgui_internal.h:450
float WindowBorderSize
Definition: imgui_internal.h:1394
short BeginOrderWithinParent
Definition: imgui_internal.h:1415
ImGuiNavLayer NavLayer
Definition: imgui_internal.h:1050
int BufCapacityA
Definition: imgui_internal.h:736
bool SelectedAllMouseLock
Definition: imgui_internal.h:741
Definition: imgui_internal.h:888
ImRect ClipRect
Definition: imgui_internal.h:1439
IMGUI_API void ImFontAtlasBuildSetupFont(ImFontAtlas *atlas, ImFont *font, ImFontConfig *font_config, float ascent, float descent)
IMGUI_API void PushColumnsBackground()
ImVec2 SizeFull
Definition: imgui_internal.h:1389
void * UserData
Definition: imgui_internal.h:782
IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor)
int ImGuiItemFlags
Definition: imgui_internal.h:105
ImGuiItemFlags ItemFlags
Definition: imgui_internal.h:1334
ImGuiWindow * GetCurrentWindowRead()
Definition: imgui_internal.h:1581
IMGUI_API void UpdateMouseMovingWindowEndFrame()
IMGUI_API void RenderColorRectWithAlphaCheckerboard(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding=0.0f, int rounding_corners_flags=~0)
IMGUI_API int ImStrlenW(const ImWchar *str)
IMGUI_API int ImTextCountUtf8BytesFromChar(const char *in_text, const char *in_text_end)
ImVec2 TexUvWhitePixel
Definition: imgui_internal.h:847
ImDrawData DrawData
Definition: imgui_internal.h:1081
IMGUI_API void BringWindowToFocusFront(ImGuiWindow *window)
ImGuiWindowTempData()
Definition: imgui_internal.h:1348
ImVector< unsigned char > DragDropPayloadBufHeap
Definition: imgui_internal.h:1102
static ImVec2 ImRotate(const ImVec2 &v, float cos_a, float sin_a)
Definition: imgui_internal.h:335
ImVector< char > PrivateClipboard
Definition: imgui_internal.h:1125
IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
ImRect LastItemRect
Definition: imgui_internal.h:1492
float FontSize
Definition: imgui_internal.h:849
Definition: imgui_internal.h:417
float OffsetNormBeforeResize
Definition: imgui_internal.h:804
static T ImLerp(T a, T b, float t)
Definition: imgui_internal.h:316
ImGuiNavMoveResult NavMoveResultLocal
Definition: imgui_internal.h:1067
Definition: imgui_internal.h:433
IMGUI_API void ClosePopupsOverWindow(ImGuiWindow *ref_window, bool restore_focus_to_window_under_popup)
voidpf void * buf
Definition: ioapi.h:39
IMGUI_API T RoundScalarWithFormatT(const char *format, ImGuiDataType data_type, T v)
ImGuiID ActiveIdPreviousFrame
Definition: imgui_internal.h:1012
ImGuiCol Col
Definition: imgui_internal.h:686
Definition: imgui_internal.h:415
ImRect ContentRegionRect
Definition: imgui_internal.h:1440
ImGuiID SelectedTabId
Definition: imgui_internal.h:1538
bool NavDisableMouseHover
Definition: imgui_internal.h:1055
float GetHeight() const
Definition: imgui_internal.h:654
ImGuiStyleMod(ImGuiStyleVar idx, float v)
Definition: imgui_internal.h:696
ImGuiID LastItemId
Definition: imgui_internal.h:1490
float WindowRounding
Definition: imgui_internal.h:1393
ImGuiID ReorderRequestTabId
Definition: imgui_internal.h:1553
Definition: imgui_internal.h:600
float BackupCurrLineTextBaseOffset
Definition: imgui_internal.h:708
ImDrawList ForegroundDrawList
Definition: imgui_internal.h:1085
IMGUI_API void SetHoveredID(ImGuiID id)
Definition: imgui_internal.h:612
ImGuiColumns()
Definition: imgui_internal.h:827
ImRect LastItemDisplayRect
Definition: imgui_internal.h:1317
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow *window, ImGuiNavMoveFlags move_flags)
IMGUI_API void MarkIniSettingsDirty()
ImGuiWindow * Window
Definition: imgui_internal.h:791
IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char *label, const char *label_end=NULL)
IMGUI_API void ShadeVertsLinearUV(ImDrawList *draw_list, int vert_start_idx, int vert_end_idx, const ImVec2 &a, const ImVec2 &b, const ImVec2 &uv_a, const ImVec2 &uv_b, bool clamp)
short BeginOrderWithinContext
Definition: imgui_internal.h:1416
ImGuiStyle Style
Definition: imgui_internal.h:964
Definition: imgui_internal.h:462
int SettingsOffset
Definition: imgui_internal.h:1449
Definition: imgui_internal.h:463
ImVec1 BackupIndent
Definition: imgui_internal.h:705
IMGUI_API const char * FindRenderedTextEnd(const char *text, const char *text_end=NULL)
Definition: imgui_internal.h:569
unsigned short ImWchar
Definition: imgui.h:137
ImGuiID NavJustMovedToMultiSelectScopeId
Definition: imgui_internal.h:1039
void Clear()
Definition: imgui_internal.h:377
Definition: imgui_internal.h:580
ImVector< char > TextA
Definition: imgui_internal.h:733
int GetRedoAvailCount() const
Definition: imgui_internal.h:750
ImRect LastItemRect
Definition: imgui_internal.h:1316
ImGuiID DragDropTargetId
Definition: imgui_internal.h:1096
int CurrFrameVisible
Definition: imgui_internal.h:1541
Definition: imgui_internal.h:940
Definition: imgui.h:1666
Definition: imgui.h:1894
int size() const
Definition: imgui_internal.h:397
int Count
Definition: imgui_internal.h:818
IMGUI_API ImU64 ImFileGetSize(ImFileHandle file)
bool Collapsed
Definition: imgui_internal.h:769
ImGuiInputTextCallback UserCallback
Definition: imgui_internal.h:743
IMGUI_API void MarkItemEdited(ImGuiID id)
ImGuiID ID
Definition: imgui_internal.h:872
float OffMaxX
Definition: imgui_internal.h:819
ImVector< ImGuiColorMod > ColorModifiers
Definition: imgui_internal.h:1024
Definition: imgui_internal.h:498
bool Contains(const T *p) const
Definition: imgui_internal.h:376
int NavScoringCount
Definition: imgui_internal.h:1043
Definition: imgui.h:185
ImStb::STB_TexteditState Stb
Definition: imgui_internal.h:738
IMGUI_API void PopColumnsBackground()
Definition: imgui_internal.h:557
Definition: imgui_internal.h:488
bool ActiveIdHasBeenPressedBefore
Definition: imgui_internal.h:1003
ImGuiID ID
Definition: imgui_internal.h:1385
IMGUI_API const char * ImParseFormatFindEnd(const char *format)
ImGuiTabItemFlags Flags
Definition: imgui_internal.h:1522
Definition: imgui.h:2193
IMGUI_API const char * ImStrSkipBlank(const char *str)
ImGuiItemHoveredDataBackup()
Definition: imgui_internal.h:1495
bool Collapsed
Definition: imgui_internal.h:1407
bool NavDisableHighlight
Definition: imgui_internal.h:1054
#define IM_ASSERT(_EXPR)
Definition: imgui.h:70
bool IsInverted() const
Definition: imgui_internal.h:672
ImGuiID ActiveIdIsAlive
Definition: imgui_internal.h:999
ImGuiID MultiSelectScopeId
Definition: imgui_internal.h:1129
void(* ImGuiSizeCallback)(ImGuiSizeCallbackData *data)
Definition: imgui.h:163
ImVector< ImGuiPopupData > OpenPopupStack
Definition: imgui_internal.h:1027
float ContentWidth
Definition: imgui_internal.h:1528
ImVec2 LastValidMousePos
Definition: imgui_internal.h:1112
#define IMGUI_API
Definition: imgui.h:61
IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList *draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1)
int LastFrameActive
Definition: imgui_internal.h:1442
IMGUI_API bool TabItemEx(ImGuiTabBar *tab_bar, const char *label, bool *p_open, ImGuiTabItemFlags flags)
ImVec2 CurrLineSize
Definition: imgui_internal.h:1308
Definition: imgui_internal.h:556
IMGUI_API void BeginColumns(const char *str_id, int count, ImGuiColumnsFlags flags=0)
bool MemoryCompacted
Definition: imgui_internal.h:1462
Definition: imgui_internal.h:946
Definition: imgui.h:1167
IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiCond cond=0)
Definition: imgui_internal.h:505
bool ActiveIdHasBeenEditedBefore
Definition: imgui_internal.h:1004
ImVector< char > InitialTextA
Definition: imgui_internal.h:734
ImGuiID ID
Definition: imgui_internal.h:813
Definition: imgui_internal.h:595
ImGuiLogType
Definition: imgui_internal.h:530
int CurLenW
Definition: imgui_internal.h:731
ImVec2 ContentSize
Definition: imgui_internal.h:1390
ImVec2 GetSize() const
Definition: imgui_internal.h:652
IMGUI_API bool DragBehaviorT(ImGuiDataType data_type, T *v, float v_speed, T v_min, T v_max, const char *format, float power, ImGuiDragFlags flags)
ImRect BarRect
Definition: imgui_internal.h:1543
int FocusRequestNextCounterTab
Definition: imgui_internal.h:1077
float NavInputs[ImGuiNavInput_COUNT]
Definition: imgui.h:1436
float Width
Definition: imgui_internal.h:928
ImVec2 GetBR() const
Definition: imgui_internal.h:658
ImGuiMouseCursor MouseCursor
Definition: imgui_internal.h:1086
ImGuiID GetActiveID()
Definition: imgui_internal.h:1632
bool WithinEndChild
Definition: imgui_internal.h:975
Definition: imgui_internal.h:502
IMGUI_API int ImStrnicmp(const char *str1, const char *str2, size_t count)
Definition: imgui_internal.h:423
void ClearText()
Definition: imgui_internal.h:747
ImBoolVector()
Definition: imgui_internal.h:352
static void ImSwap(T &a, T &b)
Definition: imgui_internal.h:317
ImVector< ImDrawList * > Layers[2]
Definition: imgui_internal.h:863
IMGUI_API bool IsMouseDragPastThreshold(int button, float lock_threshold=-1.0f)
IMGUI_API bool DataTypeApplyOpFromText(const char *buf, const char *initial_value_buf, ImGuiDataType data_type, void *p_data, const char *format)
IMGUI_API float GetColumnOffsetFromNorm(const ImGuiColumns *columns, float offset_norm)
IMGUI_API ImU64 ImFileRead(void *data, ImU64 size, ImU64 count, ImFileHandle file)
Definition: imgui_internal.h:897
ImGuiTabBarFlags Flags
Definition: imgui_internal.h:1552
IMGUI_API void SetWindowPos(const ImVec2 &pos, ImGuiCond cond=0)
void SelectAll()
Definition: imgui_internal.h:758
ImGuiID BackupActiveIdIsAlive
Definition: imgui_internal.h:709
char * Name
Definition: imgui_internal.h:1384
static float ImLengthSqr(const ImVec2 &lhs)
Definition: imgui_internal.h:328
ImU32 ActiveIdUsingNavInputMask
Definition: imgui_internal.h:1007
Definition: imgui_internal.h:870
static float ImDot(const ImVec2 &a, const ImVec2 &b)
Definition: imgui_internal.h:334
IMGUI_API void GcCompactTransientWindowBuffers(ImGuiWindow *window)
Definition: imgui_internal.h:920
ImGuiNavLayer
Definition: imgui_internal.h:610
bool WithinFrameScopeWithImplicitWindow
Definition: imgui_internal.h:974
bool ActiveIdAllowOverlap
Definition: imgui_internal.h:1002
IMGUI_API bool ButtonBehavior(const ImRect &bb, ImGuiID id, bool *out_hovered, bool *out_held, ImGuiButtonFlags flags=0)
IMGUI_API void ImStrncpy(char *dst, const char *src, size_t count)
ImVec2 PosVal
Definition: imgui_internal.h:903
ImVector< ImGuiShrinkWidthItem > ShrinkWidthBuffer
Definition: imgui_internal.h:1109
ImS8 ReorderRequestDir
Definition: imgui_internal.h:1554
Definition: imgui_internal.h:587
IMGUI_API int ImStricmp(const char *str1, const char *str2)
IMGUI_API void RenderText(ImVec2 pos, const char *text, const char *text_end=NULL, bool hide_text_after_hash=true)
double Time
Definition: imgui_internal.h:969
Definition: imgui_internal.h:419
ImDrawListFlags InitialFlags
Definition: imgui_internal.h:852
int FrameCountRendered
Definition: imgui_internal.h:972
Definition: imgui_internal.h:701
int GetTabOrder(const ImGuiTabItem *tab) const
Definition: imgui_internal.h:1562
bool Contains(const ImVec2 &p) const
Definition: imgui_internal.h:659
ImGuiID ID
Definition: imgui_internal.h:1537
IMGUI_API void SetWindowSize(const ImVec2 &size, ImGuiCond cond=0)
IMGUI_API void FocusWindow(ImGuiWindow *window)
float NavWindowingTimer
Definition: imgui_internal.h:1047
IMGUI_API int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate)
ImVec2 FramePadding
Definition: imgui_internal.h:1558
void Expand(const float amount)
Definition: imgui_internal.h:664
void TranslateX(float dx)
Definition: imgui_internal.h:667
#define IM_COL32(R, G, B, A)
Definition: imgui.h:1753
static float ImFabs(float x)
Definition: imgui_internal.h:297
float LastTabContentHeight
Definition: imgui_internal.h:1544
void Floor()
Definition: imgui_internal.h:671
ImGuiWindow * RootWindowForNav
Definition: imgui_internal.h:1456
ImRect HostWorkRect
Definition: imgui_internal.h:824
ImVec4 ClipRectFullscreen
Definition: imgui_internal.h:851
IMGUI_API const char * ImStrchrRange(const char *str_begin, const char *str_end, char c)
IMGUI_API bool ImTriangleContainsPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
IMGUI_API bool TempInputTextScalar(const ImRect &bb, ImGuiID id, const char *label, ImGuiDataType data_type, void *p_data, const char *format)
ImGuiNextWindowDataFlags Flags
Definition: imgui_internal.h:899
Definition: imgui_internal.h:518
ImFont * GetDefaultFont()
Definition: imgui_internal.h:1602
ImGuiNavLayer NavLayerCurrent
Definition: imgui_internal.h:1318
float OffsetMax
Definition: imgui_internal.h:1545
ImGuiWindow * NavLastChildNavWindow
Definition: imgui_internal.h:1458
IMGUI_API bool SplitterBehavior(const ImRect &bb, ImGuiID id, ImGuiAxis axis, float *size1, float *size2, float min_size1, float min_size2, float hover_extend=0.0f, float hover_visibility_delay=0.0f)
ImVector< float > ItemWidthStack
Definition: imgui_internal.h:1338
ImGuiItemStatusFlags_
Definition: imgui_internal.h:496
IMGUI_API bool IsPopupOpen(const char *str_id)
IMGUI_API bool IsWindowChildOf(ImGuiWindow *window, ImGuiWindow *potential_parent)
float FontWindowScale
Definition: imgui_internal.h:1448
ImVec2ih(short _x, short _y)
Definition: imgui_internal.h:636
float Offset
Definition: imgui_internal.h:1526
ImGuiNextItemData NextItemData
Definition: imgui_internal.h:1021
ImU32 TreeMayJumpToParentOnPopMask
Definition: imgui_internal.h:1313
IMGUI_API void RenderArrow(ImDrawList *draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale=1.0f)
float LineMinY
Definition: imgui_internal.h:820
Definition: imgui_internal.h:549
Definition: imgui.h:1353
IMGUI_API bool SliderBehaviorT(const ImRect &bb, ImGuiID id, ImGuiDataType data_type, T *v, T v_min, T v_max, const char *format, float power, ImGuiSliderFlags flags, ImRect *out_grab_bb)
Definition: imgui_internal.h:527
static T ImMax(T lhs, T rhs)
Definition: imgui_internal.h:314
const char * ScanFmt
Definition: imgui_internal.h:680
ImFileHandle LogFile
Definition: imgui_internal.h:1145
Definition: imgui_internal.h:715
Definition: imgui_internal.h:459
static T ImAddClampOverflow(T a, T b, T mn, T mx)
Definition: imgui_internal.h:318
int ImGuiNavDirSourceFlags
Definition: imgui_internal.h:108
IMGUI_API void ImFontAtlasBuildFinish(ImFontAtlas *atlas)
Definition: imgui_internal.h:474
Definition: imgui_internal.h:414
ImVec2 PlatformImePos
Definition: imgui_internal.h:1132
ImGuiDragFlags_
Definition: imgui_internal.h:437
float ColorEditLastColor[3]
Definition: imgui_internal.h:1118
Definition: imgui_internal.h:422
Definition: imgui_internal.h:486
void CursorAnimReset()
Definition: imgui_internal.h:754
ImVector< ImWchar > TextW
Definition: imgui_internal.h:732
IMGUI_API ImGuiID GetWindowScrollbarID(ImGuiWindow *window, ImGuiAxis axis)
short y
Definition: imgui_internal.h:634
ImGuiCond SizeCond
Definition: imgui_internal.h:901
Definition: imgui_internal.h:500
int ImGuiColumnsFlags
Definition: imgui_internal.h:103
Definition: imgui_internal.h:424
int LogDepthToExpand
Definition: imgui_internal.h:1150
Definition: imgui_internal.h:491
IMGUI_API void PopItemFlag()
IMGUI_API bool SliderBehavior(const ImRect &bb, ImGuiID id, ImGuiDataType data_type, void *p_v, const void *p_min, const void *p_max, const char *format, float power, ImGuiSliderFlags flags, ImRect *out_grab_bb)
ImGuiID VisibleTabId
Definition: imgui_internal.h:1540
unsigned int ImGuiID
Definition: imgui.h:136
ImDrawList * DrawList
Definition: imgui_internal.h:1451
short LastTabItemIdx
Definition: imgui_internal.h:1557
ImU64 ActiveIdUsingKeyInputMask
Definition: imgui_internal.h:1008
static float ImInvLength(const ImVec2 &lhs, float fail_value)
Definition: imgui_internal.h:330
Definition: imgui_internal.h:1382
IMGUI_API void SetScrollFromPosY(float local_y, float center_y_ratio=0.5f)
ImGuiNavForward NavMoveRequestForward
Definition: imgui_internal.h:1064
bool LogLineFirstItem
Definition: imgui_internal.h:1148
IMGUI_API ImGuiTabItem * TabBarFindTabByID(ImGuiTabBar *tab_bar, ImGuiID tab_id)
Definition: imgui_internal.h:484
Definition: imgui_internal.h:684
bool Initialized
Definition: imgui_internal.h:961
bool NavWindowingToggleLayer
Definition: imgui_internal.h:1049
bool NavInitRequest
Definition: imgui_internal.h:1057
Definition: imgui_internal.h:594
bool WantCollapseToggle
Definition: imgui_internal.h:1408
ImGuiWindow * ActiveIdPreviousFrameWindow
Definition: imgui_internal.h:1015
IMGUI_API void ImTriangleBarycentricCoords(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p, float &out_u, float &out_v, float &out_w)
Definition: imgui_internal.h:559
Definition: imgui.h:1537
void Restore() const
Definition: imgui_internal.h:1497
float FramerateSecPerFrameAccum
Definition: imgui_internal.h:1160
int WantCaptureKeyboardNextFrame
Definition: imgui_internal.h:1162
float z
Definition: imgui.h:200
IMGUI_API void RenderTextClippedEx(ImDrawList *draw_list, const ImVec2 &pos_min, const ImVec2 &pos_max, const char *text, const char *text_end, const ImVec2 *text_size_if_known, const ImVec2 &align=ImVec2(0, 0), const ImRect *clip_rect=NULL)
int Current
Definition: imgui_internal.h:817
const char * _OwnerName
Definition: imgui.h:1904
Definition: imgui_internal.h:534
IMGUI_API void RenderRectFilledRangeH(ImDrawList *draw_list, const ImRect &rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding)
void DebugDrawItemRect(ImU32 col=IM_COL32(255, 0, 0, 255))
Definition: imgui_internal.h:1807
IMGUI_API int ImTextStrFromUtf8(ImWchar *buf, int buf_size, const char *in_text, const char *in_text_end, const char **in_remaining=NULL)
ImGuiPtrOrIndex(void *ptr)
Definition: imgui_internal.h:951
ImRect LastItemDisplayRect
Definition: imgui_internal.h:1493
ImVector< ImGuiWindow * > WindowsSortBuffer
Definition: imgui_internal.h:980
ImGuiInputTextState InputTextState
Definition: imgui_internal.h:1113
IMGUI_API bool NavMoveRequestButNoResultYet()
ImGuiWindow * ParentWindow
Definition: imgui_internal.h:1453
IMGUI_API ImVec2 CalcWindowExpectedSize(ImGuiWindow *window)
Definition: imgui_internal.h:460
Definition: imgui_internal.h:811
int ImGuiSliderFlags
Definition: imgui_internal.h:113
float w
Definition: imgui.h:200
int LastFrameSelected
Definition: imgui_internal.h:1524
ImRect()
Definition: imgui_internal.h:646
bool IsFirstFrame
Definition: imgui_internal.h:815
int LogDepthRef
Definition: imgui_internal.h:1149
ImGuiID ChildId
Definition: imgui_internal.h:1397
Definition: imgui_internal.h:585
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow *window)
bool TextAIsValid
Definition: imgui_internal.h:735
ImGuiID TempInputTextId
Definition: imgui_internal.h:1115
int TooltipOverrideCount
Definition: imgui_internal.h:1124
IMGUI_API void PushOverrideID(ImGuiID id)
Definition: imgui_internal.h:501
static float ImSqrt(float x)
Definition: imgui_internal.h:298
ImGuiCond SetWindowSizeAllowFlags
Definition: imgui_internal.h:1425
bool TempInputTextIsActive(ImGuiID id)
Definition: imgui_internal.h:1792
size_t Size
Definition: imgui_internal.h:678
IMGUI_API void FocusTopMostWindowUnderOne(ImGuiWindow *under_this_window, ImGuiWindow *ignore_window)
float ScrollingAnim
Definition: imgui_internal.h:1548
Definition: imgui.h:727
static T ImSubClampOverflow(T a, T b, T mn, T mx)
Definition: imgui_internal.h:319
float DragDropAcceptIdCurrRectSurface
Definition: imgui_internal.h:1098
ImGuiID NavId
Definition: imgui_internal.h:1032
ImVector< ImGuiWindow * > WindowsFocusOrder
Definition: imgui_internal.h:979
ImGuiID ID
Definition: imgui_internal.h:730
IMGUI_API void * ImFileLoadToMemory(const char *filename, const char *mode, size_t *out_file_size=NULL, int padding_bytes=0)
Definition: imgui_internal.h:526
ImGuiSelectableFlagsPrivate_
Definition: imgui_internal.h:455
int DragDropMouseButton
Definition: imgui_internal.h:1093
static bool ImCharIsBlankA(char c)
Definition: imgui_internal.h:238
float DimBgRatio
Definition: imgui_internal.h:1083
Definition: imgui_internal.h:605
IMGUI_API void DataTypeApplyOp(ImGuiDataType data_type, int op, void *output, void *arg_1, const void *arg_2)
Definition: imgui_internal.h:458
IMGUI_API void SetScrollY(float scroll_y)
void Clear()
Definition: imgui_internal.h:881
Definition: imgui_internal.h:476
ImGuiItemFlags_
Definition: imgui_internal.h:482
static int ImModPositive(int a, int b)
Definition: imgui_internal.h:333
bool SkipItems
Definition: imgui_internal.h:1409
IMGUI_API void LogRenderedText(const ImVec2 *ref_pos, const char *text, const char *text_end=NULL)
Definition: imgui_internal.h:477
signed char ResizeBorderHeld
Definition: imgui_internal.h:1413
ImVector< ImGuiPtrOrIndex > CurrentTabBarStack
Definition: imgui_internal.h:1108
ImGuiID NextSelectedTabId
Definition: imgui_internal.h:1539
Definition: imgui_internal.h:1508
bool DragCurrentAccumDirty
Definition: imgui_internal.h:1120
IMGUI_API void Scrollbar(ImGuiAxis axis)
IMGUI_API void NavInitWindow(ImGuiWindow *window, bool force_reinit)
ImVector< ImGuiColumns > ColumnsStorage
Definition: imgui_internal.h:1447
Definition: imgui_internal.h:349
ImVec2 Max
Definition: imgui_internal.h:644
IMGUI_API ImU64 ImFileWrite(const void *data, ImU64 size, ImU64 count, ImFileHandle file)
float ScrollingTargetDistToVisibility
Definition: imgui_internal.h:1550
ImVector< ImGuiID > IDStack
Definition: imgui_internal.h:1430
IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding=0.0f)
Definition: imgui_internal.h:544
IMGUI_API void ItemSize(const ImVec2 &size, float text_baseline_y=-1.0f)
short x
Definition: imgui_internal.h:634
float OffsetMaxIdeal
Definition: imgui_internal.h:1546
IMGUI_API ImGuiColumns * FindOrCreateColumns(ImGuiWindow *window, ImGuiID id)
ImGuiTabItemFlagsPrivate_
Definition: imgui_internal.h:1513
int NameOffset
Definition: imgui_internal.h:1525
IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags=0)
IMGUI_API bool IsDragDropPayloadBeingAccepted()
IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup)
bool NavMoveRequest
Definition: imgui_internal.h:1062
T * GetOrAddByKey(ImGuiID key)
Definition: imgui_internal.h:375
ImVec2 GetCenter() const
Definition: imgui_internal.h:651
FILE * ImFileHandle
Definition: imgui_internal.h:283
void(* WriteAllFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler, ImGuiTextBuffer *out_buf)
Definition: imgui_internal.h:781
int PrevFrameVisible
Definition: imgui_internal.h:1542
int FocusRequestNextCounterAll
Definition: imgui_internal.h:1076
Definition: imgui_internal.h:542
bool HasSelection() const
Definition: imgui_internal.h:756
ImGuiID GetFocusID()
Definition: imgui_internal.h:1633
Definition: imgui_internal.h:461
ImGuiDragDropFlags DragDropSourceFlags
Definition: imgui_internal.h:1091
IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar *in_text, const ImWchar *in_text_end)
float Width
Definition: imgui_internal.h:718
ImVec2 Min
Definition: imgui_internal.h:643
Definition: imgui_internal.h:536
int OpenFrameCount
Definition: imgui_internal.h:793
IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border=true, float rounding=0.0f)
ImRect(float x1, float y1, float x2, float y2)
Definition: imgui_internal.h:649
IMGUI_API float CalcWrapWidthForPos(const ImVec2 &pos, float wrap_pos_x)
Definition: imgui_internal.h:420
void Resize(int sz)
Definition: imgui_internal.h:353
Definition: imgui_internal.h:428
int ImGuiSeparatorFlags
Definition: imgui_internal.h:112
ImGuiStorage * StateStorage
Definition: imgui_internal.h:1327
ImVector< ImGuiItemFlags > ItemFlagsStack
Definition: imgui_internal.h:1337
ImVec2ih Size
Definition: imgui_internal.h:768
IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem *items, int count, float width_excess)
void Translate(const ImVec2 &d)
Definition: imgui_internal.h:666
#define IM_FLOOR(_VAL)
Definition: imgui_internal.h:182
ImVec2 BackupCursorPos
Definition: imgui_internal.h:703
IMGUI_API int ImFormatString(char *buf, size_t buf_size, const char *fmt,...) IM_FMTARGS(3)
Definition: imgui_internal.h:576
ImGuiWindow * NavWindowingTarget
Definition: imgui_internal.h:1044
float ScrollingTarget
Definition: imgui_internal.h:1549
float WheelingWindowTimer
Definition: imgui_internal.h:990
bool NavAnyRequest
Definition: imgui_internal.h:1056
Definition: imgui_internal.h:606
int HiddenFramesCannotSkipItems
Definition: imgui_internal.h:1423
IMGUI_API bool InputTextEx(const char *label, const char *hint, char *buf, int buf_size, const ImVec2 &size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
int NavLayerCurrentMask
Definition: imgui_internal.h:1319
IMGUI_API void Initialize(ImGuiContext *context)
ImVec2 ScrollTargetCenterRatio
Definition: imgui_internal.h:1401
Definition: imgui_internal.h:489
float DistBox
Definition: imgui_internal.h:875
ImGuiColumnsFlags_
Definition: imgui_internal.h:443
bool OpenVal
Definition: imgui_internal.h:929
int ImPoolIdx
Definition: imgui_internal.h:362
bool CollapsedVal
Definition: imgui_internal.h:907
IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void *p_v, float v_speed, const void *p_min, const void *p_max, const char *format, float power, ImGuiDragFlags flags)
IMGUI_API const ImWchar * ImStrbolW(const ImWchar *buf_mid_line, const ImWchar *buf_begin)
ImGuiWindow * HoveredRootWindow
Definition: imgui_internal.h:986
Definition: imgui_internal.h:925
int ImGuiNextWindowDataFlags
Definition: imgui_internal.h:111
short BeginCount
Definition: imgui_internal.h:1414
IMGUI_API void Shutdown(ImGuiContext *context)
Definition: imgui_internal.h:893
Definition: imgui_internal.h:632
static float ImCeil(float x)
Definition: imgui_internal.h:309
IMGUI_API void RenderTextWrapped(ImVec2 pos, const char *text, const char *text_end, float wrap_width)
int WindowsActiveCount
Definition: imgui_internal.h:983
ImGuiID OpenParentId
Definition: imgui_internal.h:794
ImGuiDir NavMoveDirLast
Definition: imgui_internal.h:1065
IMGUI_API char * ImStrdup(const char *str)
ImVec2 CursorMaxPos
Definition: imgui_internal.h:1307
IMGUI_API ImVec2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor=0.0f, float fast_factor=0.0f)
IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul=1.0f)
IMGUI_API const char * ImStristr(const char *haystack, const char *haystack_end, const char *needle, const char *needle_end)
IMGUI_API bool IsClippedEx(const ImRect &bb, ImGuiID id, bool clip_even_when_logged)
Definition: imgui_internal.h:532
bool DragDropActive
Definition: imgui_internal.h:1089
Definition: imgui.h:1039
int WantTextInputNextFrame
Definition: imgui_internal.h:1163
float y
Definition: imgui.h:200
ImVector< ImFont * > Fonts
Definition: imgui.h:2180
ImVec2 ContentSizeExplicit
Definition: imgui_internal.h:1391
ImFont InputTextPasswordFont
Definition: imgui_internal.h:1114
ImGuiDir NavMoveClipDir
Definition: imgui_internal.h:1066
IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &p)
float ScrollingSpeed
Definition: imgui_internal.h:1551
ImGuiID HoveredId
Definition: imgui_internal.h:993
ImGuiWindow * ActiveIdWindow
Definition: imgui_internal.h:1010
int FocusRequestCurrCounterAll
Definition: imgui_internal.h:1074
float CurveTessellationTol
Definition: imgui_internal.h:850
ImGuiNextWindowData()
Definition: imgui_internal.h:914
IMGUI_API void RenderBullet(ImDrawList *draw_list, ImVec2 pos, ImU32 col)
bool MenuBarAppending
Definition: imgui_internal.h:1324
ImGuiSliderFlags_
Definition: imgui_internal.h:431
IMGUI_API void LogToBuffer(int auto_open_depth=-1)
ImS8 AutoFitFramesY
Definition: imgui_internal.h:1418
ImFont * Font
Definition: imgui_internal.h:848
ImGuiDir AutoPosLastDirection
Definition: imgui_internal.h:1421
ImVec2 WheelingWindowRefMousePos
Definition: imgui_internal.h:989
bool ActiveIdPreviousFrameIsAlive
Definition: imgui_internal.h:1013
Definition: imgui_internal.h:427
float MenuBarHeight() const
Definition: imgui_internal.h:1483
bool AutoFitOnlyGrows
Definition: imgui_internal.h:1420
ImGuiWindow * FocusRequestCurrWindow
Definition: imgui_internal.h:1072
ImGuiSettingsHandler()
Definition: imgui_internal.h:784
ImGuiWindow * RootWindow
Definition: imgui_internal.h:1454
bool DebugItemPickerActive
Definition: imgui_internal.h:1154
static float ImSaturate(float f)
Definition: imgui_internal.h:327
IMGUI_API void ColorEditOptionsPopup(const float *col, ImGuiColorEditFlags flags)
Definition: imgui.h:1305
float HostCursorMaxPosX
Definition: imgui_internal.h:822
ImDrawDataBuilder DrawDataBuilder
Definition: imgui_internal.h:1082
Definition: imgui_internal.h:469
int FrameCountEnded
Definition: imgui_internal.h:971
ImVec2 BackupCurrLineSize
Definition: imgui_internal.h:707
ImGuiNavMoveResult()
Definition: imgui_internal.h:880
Definition: imgui_internal.h:1302
IMGUI_API void ColorTooltip(const char *text, const float *col, ImGuiColorEditFlags flags)
IMGUI_API void SeparatorEx(ImGuiSeparatorFlags flags)
const char int mode
Definition: ioapi.h:38
ImVector< ImGuiWindow * > Windows
Definition: imgui_internal.h:978
int chunk_size(const T *p)
Definition: imgui_internal.h:401
float FontBaseSize
Definition: imgui_internal.h:967
bool VisibleTabWasSubmitted
Definition: imgui_internal.h:1556
char * GetName()
Definition: imgui_internal.h:772
bool NavMousePosDirty
Definition: imgui_internal.h:1053
ImGuiPtrOrIndex(int index)
Definition: imgui_internal.h:952
Definition: imgui.h:1992
float Width
Definition: imgui_internal.h:943
Definition: imgui.h:1186
ImVec2 MenuBarOffset
Definition: imgui_internal.h:1325
const char * PrintFmt
Definition: imgui_internal.h:679
Definition: imgui_internal.h:440
ImGuiWindow * NavWindowingList
Definition: imgui_internal.h:1046
Definition: imgui_internal.h:607
float x
Definition: imgui.h:187
static float ImPow(float x, float y)
Definition: imgui_internal.h:299
IMGUI_API bool ArrowButtonEx(const char *str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags)
ImVector< char > Buf
Definition: imgui_internal.h:393
IMGUI_API bool FocusableItemRegister(ImGuiWindow *window, ImGuiID id)
Definition: imgui_internal.h:504
ImVector< ImGuiSettingsHandler > SettingsHandlers
Definition: imgui_internal.h:1139
static float ImFloorStd(float x)
Definition: imgui_internal.h:308
float x
Definition: imgui_internal.h:626
Definition: imgui_internal.h:451
ImRect DragDropTargetRect
Definition: imgui_internal.h:1095
bool empty() const
Definition: imgui_internal.h:396
Definition: imgui_internal.h:426
ImRect InnerClipRect
Definition: imgui_internal.h:1437
IMGUI_API bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas *atlas)
IMGUI_API void BringWindowToDisplayFront(ImGuiWindow *window)
IMGUI_API void TabBarCloseTab(ImGuiTabBar *tab_bar, ImGuiTabItem *tab)
static float ImFmod(float x, float y)
Definition: imgui_internal.h:301
ImGuiID NavJustTabbedId
Definition: imgui_internal.h:1037
ImRect RectRel
Definition: imgui_internal.h:878
ImGuiInputTextState()
Definition: imgui_internal.h:746
static double ImAtof(const char *s)
Definition: imgui_internal.h:307
void Clear()
Definition: imgui_internal.h:354
bool IsActiveIdUsingNavInput(ImGuiNavInput input)
Definition: imgui_internal.h:1691
ImGuiNavDirSourceFlags_
Definition: imgui_internal.h:583
ImGuiDir NavMoveDir
Definition: imgui_internal.h:1065
ImVec2 BackupCursorMaxPos
Definition: imgui_internal.h:704
void * UserCallbackData
Definition: imgui_internal.h:744
float LogLinePosY
Definition: imgui_internal.h:1147
Definition: imgui_internal.h:959
void Backup()
Definition: imgui_internal.h:1496
ImGuiLayoutType ParentLayoutType
Definition: imgui_internal.h:1329
ImGuiWindow * MovingWindow
Definition: imgui_internal.h:987
void ClearSelection()
Definition: imgui_internal.h:757
ImRect HostClipRect
Definition: imgui_internal.h:823
IMGUI_API ImFileHandle ImFileOpen(const char *filename, const char *mode)
IMGUI_API void ImStrTrimBlanks(char *str)
IMGUI_API void ImFontAtlasBuildRegisterDefaultCustomRects(ImFontAtlas *atlas)
ImVec1 BackupGroupOffset
Definition: imgui_internal.h:706
ImGuiID LastActiveId
Definition: imgui_internal.h:1016
Definition: imgui_internal.h:788
IMGUI_API void AddRect(const ImVec2 &p_min, const ImVec2 &p_max, ImU32 col, float rounding=0.0f, ImDrawCornerFlags rounding_corners=ImDrawCornerFlags_All, float thickness=1.0f)
Definition: imgui_internal.h:676
IMGUI_API int ImTextCharFromUtf8(unsigned int *out_char, const char *in_text, const char *in_text_end)
Definition: imgui_internal.h:499
void Expand(const ImVec2 &amount)
Definition: imgui_internal.h:665
IMGUI_API void PushMultiItemsWidths(int components, float width_full)
ImVector< float > TextWrapPosStack
Definition: imgui_internal.h:1339
static ImU32 ImHash(const void *data, int size, ImU32 seed=0)
Definition: imgui_internal.h:212
IMGUI_API ImVec2 FindBestWindowPosForPopup(ImGuiWindow *window)
ImVec1(float _x)
Definition: imgui_internal.h:628
ImGuiStyleVar VarIdx
Definition: imgui_internal.h:693
bool HasCloseButton
Definition: imgui_internal.h:1412
Definition: imgui_internal.h:921
ImGuiLayoutType_
Definition: imgui_internal.h:524
Definition: imgui_internal.h:567
Definition: imgui_internal.h:1488
int DragDropSourceFrameCount
Definition: imgui_internal.h:1092
IMGUI_API void ActivateItem(ImGuiID id)
Definition: imgui_internal.h:490
unsigned long long ImU64
Definition: imgui.h:181
ImGuiColorEditFlags ColorEditOptions
Definition: imgui_internal.h:1116
int(* ImGuiInputTextCallback)(ImGuiInputTextCallbackData *data)
Definition: imgui.h:162
IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2 &ref_pos, const ImVec2 &size, ImGuiDir *last_dir, const ImRect &r_outer, const ImRect &r_avoid, ImGuiPopupPositionPolicy policy=ImGuiPopupPositionPolicy_Default)
ImVec1 Indent
Definition: imgui_internal.h:1343
ImGuiNextWindowDataFlags_
Definition: imgui_internal.h:884
IMGUI_API bool ScrollbarEx(const ImRect &bb, ImGuiID id, ImGuiAxis axis, float *p_scroll_v, float avail_v, float contents_v, ImDrawCornerFlags rounding_corners)
ImGuiCond PosCond
Definition: imgui_internal.h:900
int Size
Definition: imgui.h:1243
ImVec2 ScrollbarSizes
Definition: imgui_internal.h:1402
Definition: imgui_internal.h:861
Definition: imgui_internal.h:485
ImGuiID PopupId
Definition: imgui_internal.h:790
float y
Definition: imgui.h:187
int GetSize() const
Definition: imgui_internal.h:382
IMGUI_API int ImTextCountCharsFromUtf8(const char *in_text, const char *in_text_end)
ImGuiColumnsFlags Flags
Definition: imgui_internal.h:805
ImGuiTextBuffer LogBuffer
Definition: imgui_internal.h:1146
IMGUI_API void SetNavID(ImGuiID id, int nav_layer)
Definition: imgui_internal.h:413
static float ImLinearSweep(float current, float target, float speed)
Definition: imgui_internal.h:336
IMGUI_API ImGuiWindowSettings * FindWindowSettings(ImGuiID id)
float Width
Definition: imgui_internal.h:1527
IMGUI_API float GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode)
ImVec2 SetWindowPosPivot
Definition: imgui_internal.h:1428
ImGuiColumnsFlags Flags
Definition: imgui_internal.h:814
Definition: imgui_internal.h:439
IMGUI_API void PushColumnClipRect(int column_index)
ImGuiTextBuffer TabsNames
Definition: imgui_internal.h:1559
Definition: imgui_internal.h:570
Definition: imgui_internal.h:558
ImDrawListSharedData DrawListSharedData
Definition: imgui_internal.h:968
float ScrollX
Definition: imgui_internal.h:737
voidpf uLong offset
Definition: ioapi.h:42
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h)
ImGuiWindow * SourceWindow
Definition: imgui_internal.h:792
IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow *window)
Definition: imgui_internal.h:449
IMGUI_API void ClearActiveID()
int ImGuiDragFlags
Definition: imgui_internal.h:104
IMGUI_API void Indent(float indent_w=0.0f)
Definition: imgui_internal.h:579
IMGUI_API void TabItemBackground(ImDrawList *draw_list, const ImRect &bb, ImGuiTabItemFlags flags, ImU32 col)
Definition: imgui_internal.h:597
ImVector< T > Buf
Definition: imgui_internal.h:366
void Reserve(int capacity)
Definition: imgui_internal.h:381
IMGUI_API bool IsKeyPressed(int user_key_index, bool repeat=true)
float ActiveIdTimer
Definition: imgui_internal.h:1000
IMGUI_API void RenderNavHighlight(const ImRect &bb, ImGuiID id, ImGuiNavHighlightFlags flags=ImGuiNavHighlightFlags_TypeDefault)
bool WithinFrameScope
Definition: imgui_internal.h:973
ImGuiTabBar * CurrentTabBar
Definition: imgui_internal.h:1106
ImGuiIO IO
Definition: imgui_internal.h:963
ImVec2 GetTL() const
Definition: imgui_internal.h:655
IMGUI_API ImGuiContext * GImGui
bool WasActive
Definition: imgui_internal.h:1405
IMGUI_API const char * ImParseFormatTrimDecorations(const char *format, char *buf, size_t buf_size)
T * alloc_chunk(size_t sz)
Definition: imgui_internal.h:398
IMGUI_API ImGuiID GetColumnsID(const char *str_id, int count)
ImGuiID TypeHash
Definition: imgui_internal.h:778
int ImGuiNavHighlightFlags
Definition: imgui_internal.h:107
ImGuiColumnData()
Definition: imgui_internal.h:808
float ItemWidth
Definition: imgui_internal.h:1335
ImFontAtlas * Fonts
Definition: imgui.h:1374
int FramerateSecPerFrameIdx
Definition: imgui_internal.h:1159
ImGuiNavForward
Definition: imgui_internal.h:603
float ImTriangleArea(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c)
Definition: imgui_internal.h:344
Definition: imgui_internal.h:421
Definition: imgui_internal.h:620
IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col, float sz)
float SettingsDirtyTimer
Definition: imgui_internal.h:1137
ImGuiWindow * GetCurrentWindow()
Definition: imgui_internal.h:1582
Definition: imgui_internal.h:364
int LogDepthToExpandDefault
Definition: imgui_internal.h:1151
ImVector< ImGuiStyleMod > StyleModifiers
Definition: imgui_internal.h:1025
void ClearFreeMemory()
Definition: imgui_internal.h:748
IMGUI_API void TreePushOverrideID(ImGuiID id)
IMGUI_API const char * ImParseFormatFindStart(const char *format)
ImPool()
Definition: imgui_internal.h:370
bool DragDropWithinSourceOrTarget
Definition: imgui_internal.h:1090
ImGuiTextFlags_
Definition: imgui_internal.h:516
IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2 &pos)
IMGUI_API const ImGuiDataTypeInfo * DataTypeGetInfo(ImGuiDataType data_type)
ImGuiWindowFlags Flags
Definition: imgui_internal.h:1386
Definition: imgui_internal.h:641
IMGUI_API ImGuiWindowSettings * CreateNewWindowSettings(const char *name)
int ImGuiTextFlags
Definition: imgui_internal.h:114
IMGUI_API ImVec2 TabItemCalcSize(const char *label, bool has_close_button)
ImGuiID ID
Definition: imgui_internal.h:766
ImGuiID ActiveId
Definition: imgui_internal.h:998
void Remove(ImGuiID key, const T *p)
Definition: imgui_internal.h:379
static int ImUpperPowerOfTwo(int v)
Definition: imgui_internal.h:217
ImVector< ImGuiWindow * > ChildWindows
Definition: imgui_internal.h:1326
float ScrollbarClickDeltaToGrabCenter
Definition: imgui_internal.h:1123
IMGUI_API float SliderCalcRatioFromValueT(ImGuiDataType data_type, T v, T v_min, T v_max, float power, float linear_zero_pos)
Definition: imgui_internal.h:892
Definition: imgui_internal.h:492
IMGUI_API ImU32 ImHashStr(const char *data, size_t data_size=0, ImU32 seed=0)
IMGUI_API ImVec2 ScrollToBringRectIntoView(ImGuiWindow *window, const ImRect &item_rect)
T * begin()
Definition: imgui_internal.h:399
IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow *window)
ImVec1 GroupOffset
Definition: imgui_internal.h:1344
Definition: imgui_internal.h:775
IMGUI_API ImGuiWindow * FindWindowByID(ImGuiID id)
int ImGuiButtonFlags
Definition: imgui_internal.h:102
Definition: imgui_internal.h:533
Definition: imgui_internal.h:886
const char * GetTabName(const ImGuiTabItem *tab) const
Definition: imgui_internal.h:1563
ImGuiContext(ImFontAtlas *shared_font_atlas)
Definition: imgui_internal.h:1166
bool FontAtlasOwnedByContext
Definition: imgui_internal.h:962
ImRect(const ImVec4 &v)
Definition: imgui_internal.h:648
Definition: imgui_internal.h:566
ImVec2 Size
Definition: imgui_internal.h:1388
float LastTimeActive
Definition: imgui_internal.h:1443
bool NavInitRequestFromMove
Definition: imgui_internal.h:1058
bool IsActiveIdUsingKey(ImGuiKey key)
Definition: imgui_internal.h:1692
int NameBufLen
Definition: imgui_internal.h:1395
IMGUI_API void KeepAliveID(ImGuiID id)
void DebugStartItemPicker()
Definition: imgui_internal.h:1808
IMGUI_API bool ImFileClose(ImFileHandle file)
IMGUI_API ImRect GetWindowAllowedExtentRect(ImGuiWindow *window)
ImGuiWindow * RootWindowForTitleBarHighlight
Definition: imgui_internal.h:1455
int ImGuiItemStatusFlags
Definition: imgui_internal.h:106
IMGUI_API ImGuiWindow * FindWindowByName(const char *name)
Definition: imgui_internal.h:320
int FocusCounterTab
Definition: imgui_internal.h:1331
IMGUI_API ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy)
float LineMaxY
Definition: imgui_internal.h:820
ImGuiWindow * NavWindow
Definition: imgui_internal.h:1031
IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip=true)
IMGUI_API void OpenPopupEx(ImGuiID id)
ImVec2ih Pos
Definition: imgui_internal.h:767
IMGUI_API ImGuiWindow * GetTopMostPopupModal()
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect &bb_rel, ImGuiNavMoveFlags move_flags)
ImRect(const ImVec2 &min, const ImVec2 &max)
Definition: imgui_internal.h:647
ImVector< char > Buf
Definition: imgui.h:1641
ImGuiNextItemDataFlags_
Definition: imgui_internal.h:918
ImGuiID MoveId
Definition: imgui_internal.h:1396
ImGuiInputSource NavInputSource
Definition: imgui_internal.h:1041
static T ImMin(T lhs, T rhs)
Definition: imgui_internal.h:313
IMGUI_API void EndColumns()
IMGUI_API void FlattenIntoSingleLayer()
ImPool< ImGuiTabBar > TabBars
Definition: imgui_internal.h:1107
int DragDropAcceptFrameCount
Definition: imgui_internal.h:1101
float TextWrapPos
Definition: imgui_internal.h:1336
ImGuiID NavInitResultId
Definition: imgui_internal.h:1059
#define IM_PLACEMENT_NEW(_PTR)
Definition: imgui.h:1225
Definition: imgui_internal.h:1509
IMGUI_API void StartMouseMovingWindow(ImGuiWindow *window)
ImVec2 SetWindowPosVal
Definition: imgui_internal.h:1427
float DistCenter
Definition: imgui_internal.h:876
ImGuiWindow * FocusRequestNextWindow
Definition: imgui_internal.h:1073
ImGuiWindow * WheelingWindow
Definition: imgui_internal.h:988
int KeyMap[ImGuiKey_COUNT]
Definition: imgui.h:1369
float BgAlphaVal
Definition: imgui_internal.h:911
IMGUI_API ImGuiSettingsHandler * FindSettingsHandler(const char *type_name)
ImFont * FontDefault
Definition: imgui.h:1377
IMGUI_API int ImFormatStringV(char *buf, size_t buf_size, const char *fmt, va_list args) IM_FMTLIST(3)
#define IM_NEW(_TYPE)
Definition: imgui.h:1226
ImGuiID NavNextActivateId
Definition: imgui_internal.h:1040
ImVec2 WindowPadding
Definition: imgui_internal.h:1392
ImGuiPopupPositionPolicy
Definition: imgui_internal.h:617
Definition: imgui_internal.h:598

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)