Ylva And Malin
imgui_internal.h
Go to the documentation of this file.
1 
2 // dear imgui, v1.62 WIP
3 // (internals)
4 
5 // You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
6 // Set:
7 // #define IMGUI_DEFINE_MATH_OPERATORS
8 // 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)
9 
10 #pragma once
11 
12 #ifndef IMGUI_VERSION
13 #error Must include imgui.h before imgui_internal.h
14 #endif
15 
16 #include <stdio.h> // FILE*
17 #include <stdlib.h> // NULL, malloc, free, qsort, atoi, atof
18 #include <math.h> // sqrtf, fabsf, fmodf, powf, floorf, ceilf, cosf, sinf
19 #include <limits.h> // INT_MIN, INT_MAX
20 
21 #ifdef _MSC_VER
22 #pragma warning (push)
23 #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)
24 #endif
25 
26 #ifdef __clang__
27 #pragma clang diagnostic push
28 #pragma clang diagnostic ignored "-Wunused-function" // for stb_textedit.h
29 #pragma clang diagnostic ignored "-Wmissing-prototypes" // for stb_textedit.h
30 #pragma clang diagnostic ignored "-Wold-style-cast"
31 #endif
32 
33 //-----------------------------------------------------------------------------
34 // Forward Declarations
35 //-----------------------------------------------------------------------------
36 
37 struct ImRect; // An axis-aligned rectangle (2 points)
38 struct ImDrawDataBuilder; // Helper to build a ImDrawData instance
39 struct ImDrawListSharedData; // Data shared between all ImDrawList instances
40 struct ImGuiColMod; // Stacked color modifier, backup of modified data so we can restore it
41 struct ImGuiColumnData; // Storage data for a single column
42 struct ImGuiColumnsSet; // Storage data for a columns set
43 struct ImGuiContext; // Main imgui context
44 struct ImGuiGroupData; // Stacked storage data for BeginGroup()/EndGroup()
45 struct ImGuiItemHoveredDataBackup; // Backup and restore IsItemHovered() internal data
46 struct ImGuiMenuColumns; // Simple column measurement, currently used for MenuItem() only
47 struct ImGuiNavMoveResult; // Result of a directional navigation move query result
48 struct ImGuiNextWindowData; // Storage for SetNexWindow** functions
49 struct ImGuiPopupRef; // Storage for current popup stack
51 struct ImGuiStyleMod; // Stacked style modifier, backup of modified data so we can restore it
52 struct ImGuiTextEditState; // Internal state of the currently focused/edited text input box
53 struct ImGuiWindow; // Storage for one window
54 struct ImGuiWindowTempData; // Temporary storage for one, that's the data which in theory we could ditch at the end of the frame
55 struct ImGuiWindowSettings; // Storage for window settings stored in .ini file (we keep one of those even if the actual window wasn't instanced during this session)
56 
57 typedef int ImGuiLayoutType; // enum: horizontal or vertical // enum ImGuiLayoutType_
58 typedef int ImGuiButtonFlags; // flags: for ButtonEx(), ButtonBehavior() // enum ImGuiButtonFlags_
59 typedef int ImGuiItemFlags; // flags: for PushItemFlag() // enum ImGuiItemFlags_
60 typedef int ImGuiItemStatusFlags; // flags: storage for DC.LastItemXXX // enum ImGuiItemStatusFlags_
61 typedef int ImGuiNavHighlightFlags; // flags: for RenderNavHighlight() // enum ImGuiNavHighlightFlags_
62 typedef int ImGuiNavDirSourceFlags; // flags: for GetNavInputAmount2d() // enum ImGuiNavDirSourceFlags_
63 typedef int ImGuiNavMoveFlags; // flags: for navigation requests // enum ImGuiNavMoveFlags_
64 typedef int ImGuiSeparatorFlags; // flags: for Separator() - internal // enum ImGuiSeparatorFlags_
65 typedef int ImGuiSliderFlags; // flags: for SliderBehavior() // enum ImGuiSliderFlags_
66 
67 //-------------------------------------------------------------------------
68 // STB libraries
69 //-------------------------------------------------------------------------
70 
71 namespace ImGuiStb
72 {
73 
74 #undef STB_TEXTEDIT_STRING
75 #undef STB_TEXTEDIT_CHARTYPE
76 #define STB_TEXTEDIT_STRING ImGuiTextEditState
77 #define STB_TEXTEDIT_CHARTYPE ImWchar
78 #define STB_TEXTEDIT_GETWIDTH_NEWLINE -1.0f
79 #include "stb_textedit.h"
80 
81 } // namespace ImGuiStb
82 
83 //-----------------------------------------------------------------------------
84 // Context
85 //-----------------------------------------------------------------------------
86 
87 #ifndef GImGui
88 extern IMGUI_API ImGuiContext* GImGui; // Current implicit ImGui context pointer
89 #endif
90 
91 //-----------------------------------------------------------------------------
92 // Helpers
93 //-----------------------------------------------------------------------------
94 
95 #define IM_PI 3.14159265358979323846f
96 #ifdef _WIN32
97 #define IM_NEWLINE "\r\n" // Play it nice with Windows users (2018/05 news: Microsoft announced that Notepad will finally display Unix-style carriage returns!)
98 #else
99 #define IM_NEWLINE "\n"
100 #endif
101 
102 // Helpers: UTF-8 <> wchar
103 IMGUI_API int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
104 IMGUI_API int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count
105 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
106 IMGUI_API int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end); // return number of UTF-8 code-points (NOT bytes count)
107 IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end); // return number of bytes to express string as UTF-8 code-points
108 
109 // Helpers: Misc
110 IMGUI_API ImU32 ImHash(const void* data, int data_size, ImU32 seed = 0); // Pass data_size==0 for zero-terminated strings
111 IMGUI_API void* ImFileLoadToMemory(const char* filename, const char* file_open_mode, size_t* out_file_size = NULL, int padding_bytes = 0);
112 IMGUI_API FILE* ImFileOpen(const char* filename, const char* file_open_mode);
113 static inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
114 static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
115 static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; }
116 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; }
117 
118 // Helpers: Geometry
119 IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p);
120 IMGUI_API bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);
121 IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);
122 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);
123 
124 // Helpers: String
125 IMGUI_API int ImStricmp(const char* str1, const char* str2);
126 IMGUI_API int ImStrnicmp(const char* str1, const char* str2, size_t count);
127 IMGUI_API void ImStrncpy(char* dst, const char* src, size_t count);
128 IMGUI_API char* ImStrdup(const char* str);
129 IMGUI_API const char* ImStrchrRange(const char* str_begin, const char* str_end, char c);
130 IMGUI_API int ImStrlenW(const ImWchar* str);
131 IMGUI_API const ImWchar*ImStrbolW(const ImWchar* buf_mid_line, const ImWchar* buf_begin); // Find beginning-of-line
132 IMGUI_API const char* ImStristr(const char* haystack, const char* haystack_end, const char* needle, const char* needle_end);
133 IMGUI_API void ImStrTrimBlanks(char* str);
134 IMGUI_API int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) IM_FMTARGS(3);
135 IMGUI_API int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) IM_FMTLIST(3);
136 IMGUI_API const char* ImParseFormatFindStart(const char* format);
137 IMGUI_API const char* ImParseFormatFindEnd(const char* format);
138 IMGUI_API const char* ImParseFormatTrimDecorations(const char* format, char* buf, int buf_size);
139 IMGUI_API int ImParseFormatPrecision(const char* format, int default_value);
140 
141 // Helpers: ImVec2/ImVec4 operators
142 // 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.)
143 // We unfortunately don't have a unary- operator for ImVec2 because this would needs to be defined inside the class itself.
144 #ifdef IMGUI_DEFINE_MATH_OPERATORS
145 static inline ImVec2 operator*(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x*rhs, lhs.y*rhs); }
146 static inline ImVec2 operator/(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x/rhs, lhs.y/rhs); }
147 static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); }
148 static inline ImVec2 operator-(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x-rhs.x, lhs.y-rhs.y); }
149 static inline ImVec2 operator*(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x*rhs.x, lhs.y*rhs.y); }
150 static inline ImVec2 operator/(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x/rhs.x, lhs.y/rhs.y); }
151 static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y; return lhs; }
152 static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; }
153 static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) { lhs.x *= rhs; lhs.y *= rhs; return lhs; }
154 static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) { lhs.x /= rhs; lhs.y /= rhs; return lhs; }
155 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); }
156 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); }
157 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); }
158 #endif
159 
160 // Helpers: Maths
161 // - Wrapper for standard libs functions. (Note that imgui_demo.cpp does _not_ use them to keep the code easy to copy)
162 #ifndef IMGUI_DISABLE_MATH_FUNCTIONS
163 static inline float ImFabs(float x) { return fabsf(x); }
164 static inline float ImSqrt(float x) { return sqrtf(x); }
165 static inline float ImPow(float x, float y) { return powf(x, y); }
166 static inline double ImPow(double x, double y) { return pow(x, y); }
167 static inline float ImFmod(float x, float y) { return fmodf(x, y); }
168 static inline double ImFmod(double x, double y) { return fmod(x, y); }
169 static inline float ImCos(float x) { return cosf(x); }
170 static inline float ImSin(float x) { return sinf(x); }
171 static inline float ImAcos(float x) { return acosf(x); }
172 static inline float ImAtan2(float y, float x) { return atan2f(y, x); }
173 static inline double ImAtof(const char* s) { return atof(s); }
174 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)
175 static inline float ImCeil(float x) { return ceilf(x); }
176 #endif
177 // - ImMin/ImMax/ImClamp/ImLerp/ImSwap are used by widgets which support for variety of types: signed/unsigned int/long long float/double, using templates here but we could also redefine them 6 times
178 template<typename T> static inline T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; }
179 template<typename T> static inline T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; }
180 template<typename T> static inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
181 template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
182 template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
183 // - Misc maths helpers
184 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); }
185 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); }
186 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); }
187 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); }
188 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); }
189 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); }
190 static inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
191 static inline float ImLengthSqr(const ImVec2& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y; }
192 static inline float ImLengthSqr(const ImVec4& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y + lhs.z*lhs.z + lhs.w*lhs.w; }
193 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; }
194 static inline float ImFloor(float f) { return (float)(int)f; }
195 static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2((float)(int)v.x, (float)(int)v.y); }
196 static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; }
197 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); }
198 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; }
199 static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
200 
201 //-----------------------------------------------------------------------------
202 // Types
203 //-----------------------------------------------------------------------------
204 
206 {
207  ImGuiButtonFlags_Repeat = 1 << 0, // hold to repeat
208  ImGuiButtonFlags_PressedOnClickRelease = 1 << 1, // return true on click + release on same item [DEFAULT if no PressedOn* flag is set]
209  ImGuiButtonFlags_PressedOnClick = 1 << 2, // return true on click (default requires click+release)
210  ImGuiButtonFlags_PressedOnRelease = 1 << 3, // return true on release (default requires click+release)
211  ImGuiButtonFlags_PressedOnDoubleClick = 1 << 4, // return true on double-click (default requires click+release)
212  ImGuiButtonFlags_FlattenChildren = 1 << 5, // allow interactions even if a child window is overlapping
213  ImGuiButtonFlags_AllowItemOverlap = 1 << 6, // require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap()
214  ImGuiButtonFlags_DontClosePopups = 1 << 7, // disable automatically closing parent popup on press // [UNUSED]
215  ImGuiButtonFlags_Disabled = 1 << 8, // disable interactions
216  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
217  ImGuiButtonFlags_NoKeyModifiers = 1 << 10, // disable interaction if a key modifier is held
218  ImGuiButtonFlags_NoHoldingActiveID = 1 << 11, // don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
219  ImGuiButtonFlags_PressedOnDragDropHold = 1 << 12, // press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
220  ImGuiButtonFlags_NoNavFocus = 1 << 13 // don't override navigation focus when activated
221 };
222 
224 {
226 };
227 
229 {
230  // Default: 0
231  ImGuiColumnsFlags_NoBorder = 1 << 0, // Disable column dividers
232  ImGuiColumnsFlags_NoResize = 1 << 1, // Disable resizing columns when clicking on the dividers
233  ImGuiColumnsFlags_NoPreserveWidths = 1 << 2, // Disable column width preservation when adjusting columns
234  ImGuiColumnsFlags_NoForceWithinWindow = 1 << 3, // Disable forcing columns to fit within window
235  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.
236 };
237 
239 {
240  // NB: need to be in sync with last value of ImGuiSelectableFlags_
246 };
247 
249 {
250  ImGuiSeparatorFlags_Horizontal = 1 << 0, // Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar
252 };
253 
254 // Storage for LastItem data
256 {
259 };
260 
261 // FIXME: this is in development, not exposed/functional as a generic feature yet.
263 {
266 };
267 
269 {
273 };
276 {
279 };
280 
282 {
286  ImGuiInputSource_NavKeyboard, // Only used occasionally for storage, not tested/handled by most code
289 };
290 
291 // FIXME-NAV: Clarify/expose various repeat delay/rate
293 {
300 };
303 {
308 };
309 
311 {
315 };
318 {
319  ImGuiNavMoveFlags_LoopX = 1 << 0, // On failed request, restart from opposite side
321  ImGuiNavMoveFlags_WrapX = 1 << 2, // On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
322  ImGuiNavMoveFlags_WrapY = 1 << 3 // This is not super useful for provided for completeness
323 };
324 
326 {
330 };
331 
332 // 2D axis aligned bounding-box
333 // NB: we can't rely on ImVec2 math operators being available here
335 {
336  ImVec2 Min; // Upper-left
337  ImVec2 Max; // Lower-right
338 
339  ImRect() : Min(FLT_MAX,FLT_MAX), Max(-FLT_MAX,-FLT_MAX) {}
340  ImRect(const ImVec2& min, const ImVec2& max) : Min(min), Max(max) {}
341  ImRect(const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {}
342  ImRect(float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {}
344  ImVec2 GetCenter() const { return ImVec2((Min.x + Max.x) * 0.5f, (Min.y + Max.y) * 0.5f); }
345  ImVec2 GetSize() const { return ImVec2(Max.x - Min.x, Max.y - Min.y); }
346  float GetWidth() const { return Max.x - Min.x; }
347  float GetHeight() const { return Max.y - Min.y; }
348  ImVec2 GetTL() const { return Min; } // Top-left
349  ImVec2 GetTR() const { return ImVec2(Max.x, Min.y); } // Top-right
350  ImVec2 GetBL() const { return ImVec2(Min.x, Max.y); } // Bottom-left
351  ImVec2 GetBR() const { return Max; } // Bottom-right
352  bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; }
353  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; }
354  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; }
355  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; }
356  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; }
357  void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; }
358  void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; }
359  void Translate(const ImVec2& d) { Min.x += d.x; Min.y += d.y; Max.x += d.x; Max.y += d.y; }
360  void TranslateX(float dx) { Min.x += dx; Max.x += dx; }
361  void TranslateY(float dy) { Min.y += dy; Max.y += dy; }
362  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.
363  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.
364  void Floor() { Min.x = (float)(int)Min.x; Min.y = (float)(int)Min.y; Max.x = (float)(int)Max.x; Max.y = (float)(int)Max.y; }
365  bool IsInverted() const { return Min.x > Max.x || Min.y > Max.y; }
366 };
367 
368 // Stacked color modifier, backup of modified data so we can restore it
370 {
373 };
374 
375 // Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the variable.
377 {
379  union { int BackupInt[2]; float BackupFloat[2]; };
380  ImGuiStyleMod(ImGuiStyleVar idx, int v) { VarIdx = idx; BackupInt[0] = v; }
381  ImGuiStyleMod(ImGuiStyleVar idx, float v) { VarIdx = idx; BackupFloat[0] = v; }
382  ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloat[0] = v.x; BackupFloat[1] = v.y; }
383 };
384 
385 // Stacked storage data for BeginGroup()/EndGroup()
387 {
397 };
398 
399 // Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper.
401 {
402  int Count;
403  float Spacing;
404  float Width, NextWidth;
405  float Pos[4], NextWidths[4];
406 
408  void Update(int count, float spacing, bool clear);
409  float DeclColumns(float w0, float w1, float w2);
410  float CalcExtraSpace(float avail_w);
411 };
412 
413 // Internal state of the currently focused/edited text input box
415 {
416  ImGuiID Id; // widget id owning the text state
417  ImVector<ImWchar> Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer.
418  ImVector<char> InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered)
420  int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format.
421  int BufSizeA; // end-user buffer size
422  float ScrollX;
424  float CursorAnim;
427 
428  ImGuiTextEditState() { memset(this, 0, sizeof(*this)); }
429  void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking
430  void CursorClamp() { StbState.cursor = ImMin(StbState.cursor, CurLenW); StbState.select_start = ImMin(StbState.select_start, CurLenW); StbState.select_end = ImMin(StbState.select_end, CurLenW); }
431  bool HasSelection() const { return StbState.select_start != StbState.select_end; }
432  void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; }
433  void SelectAll() { StbState.select_start = 0; StbState.cursor = StbState.select_end = CurLenW; StbState.has_preferred_x = false; }
434  void OnKeyPressed(int key);
435 };
436 
437 // Windows data saved in imgui.ini file
439 {
440  char* Name;
444  bool Collapsed;
445 
446  ImGuiWindowSettings() { Name = NULL; Id = 0; Pos = Size = ImVec2(0,0); Collapsed = false; }
447 };
448 
450 {
451  const char* TypeName; // Short description stored in .ini file. Disallowed characters: '[' ']'
452  ImGuiID TypeHash; // == ImHash(TypeName, 0, 0)
453  void* (*ReadOpenFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name); // Read: Called when entering into a new ini entry e.g. "[Window][Name]"
454  void (*ReadLineFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line); // Read: Called for every line of text within an ini entry
455  void (*WriteAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* out_buf); // Write: Output every entries into 'out_buf'
456  void* UserData;
457 
458  ImGuiSettingsHandler() { memset(this, 0, sizeof(*this)); }
459 };
460 
461 // Storage for current popup stack
463 {
464  ImGuiID PopupId; // Set on OpenPopup()
465  ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup()
466  ImGuiWindow* ParentWindow; // Set on OpenPopup()
467  int OpenFrameCount; // Set on OpenPopup()
468  ImGuiID OpenParentId; // Set on OpenPopup(), we need this to differenciate multiple menu sets from each others (e.g. inside menu bar vs loose menu items)
469  ImVec2 OpenPopupPos; // Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse)
470  ImVec2 OpenMousePos; // Set on OpenPopup(), copy of mouse position at the time of opening popup
471 };
472 
474 {
475  float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
477  ImGuiColumnsFlags Flags; // Not exposed
479 
480  ImGuiColumnData() { OffsetNorm = OffsetNormBeforeResize = 0.0f; Flags = 0; }
481 };
482 
484 {
489  int Current;
490  int Count;
491  float MinX, MaxX;
492  float LineMinY, LineMaxY;
493  float StartPosY; // Copy of CursorPos
494  float StartMaxPosX; // Copy of CursorMaxPos
496 
497  ImGuiColumnsSet() { Clear(); }
498  void Clear()
499  {
500  ID = 0;
501  Flags = 0;
502  IsFirstFrame = false;
503  IsBeingResized = false;
504  Current = 0;
505  Count = 1;
506  MinX = MaxX = 0.0f;
507  LineMinY = LineMaxY = 0.0f;
508  StartPosY = 0.0f;
509  StartMaxPosX = 0.0f;
510  Columns.clear();
511  }
512 };
513 
514 // Data shared between all ImDrawList instances
516 {
517  ImVec2 TexUvWhitePixel; // UV of white pixel in the atlas
518  ImFont* Font; // Current/default font (optional, for simplified AddText overload)
519  float FontSize; // Current/default font size (optional, for simplified AddText overload)
521  ImVec4 ClipRectFullscreen; // Value for PushClipRectFullscreen()
522 
523  // Const data
524  // FIXME: Bake rounded corners fill/borders in atlas
525  ImVec2 CircleVtx12[12];
526 
528 };
529 
531 {
532  ImVector<ImDrawList*> Layers[2]; // Global layers for: regular, tooltip
533 
534  void Clear() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].resize(0); }
535  void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].clear(); }
536  IMGUI_API void FlattenIntoSingleLayer();
537 };
538 
540 {
541  ImGuiID ID; // Best candidate
542  ImGuiID ParentID; // Best candidate window->IDStack.back() - to compare context
543  ImGuiWindow* Window; // Best candidate window
544  float DistBox; // Best candidate box distance to current NavId
545  float DistCenter; // Best candidate center distance to current NavId
546  float DistAxial;
547  ImRect RectRel; // Best candidate bounding box in window relative space
548 
549  ImGuiNavMoveResult() { Clear(); }
550  void Clear() { ID = ParentID = 0; Window = NULL; DistBox = DistCenter = DistAxial = FLT_MAX; RectRel = ImRect(); }
551 };
552 
553 // Storage for SetNexWindow** functions
555 {
571  float BgAlphaVal;
572  ImVec2 MenuBarOffsetMinVal; // This is not exposed publicly, so we don't clear it.
573 
575  {
576  PosCond = SizeCond = ContentSizeCond = CollapsedCond = SizeConstraintCond = FocusCond = BgAlphaCond = 0;
577  PosVal = PosPivotVal = SizeVal = ImVec2(0.0f, 0.0f);
578  ContentSizeVal = ImVec2(0.0f, 0.0f);
579  CollapsedVal = false;
580  SizeConstraintRect = ImRect();
581  SizeCallback = NULL;
582  SizeCallbackUserData = NULL;
583  BgAlphaVal = FLT_MAX;
584  MenuBarOffsetMinVal = ImVec2(0.0f, 0.0f);
585  }
586 
587  void Clear()
588  {
589  PosCond = SizeCond = ContentSizeCond = CollapsedCond = SizeConstraintCond = FocusCond = BgAlphaCond = 0;
590  }
591 };
592 
593 // Main imgui context
595 {
597  bool FontAtlasOwnedByContext; // Io.Fonts-> is owned by the ImGuiContext and will be destructed along with it.
600  ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
601  float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
602  float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
604 
605  float Time;
614  ImGuiWindow* CurrentWindow; // Being drawn into
615  ImGuiWindow* HoveredWindow; // Will catch mouse inputs
616  ImGuiWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only)
617  ImGuiID HoveredId; // Hovered widget
621  ImGuiID ActiveId; // Active widget
624  bool ActiveIdIsAlive; // Active widget has been seen this frame
625  bool ActiveIdIsJustActivated; // Set at the time of activation for one frame
626  bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
627  int ActiveIdAllowNavDirFlags; // Active widget allows using directional navigation (e.g. can activate a button and move away from it)
628  ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
630  ImGuiInputSource ActiveIdSource; // Activating with mouse or nav (gamepad/keyboard)
631  ImGuiWindow* MovingWindow; // Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
632  ImVector<ImGuiColMod> ColorModifiers; // Stack for PushStyleColor()/PopStyleColor()
633  ImVector<ImGuiStyleMod> StyleModifiers; // Stack for PushStyleVar()/PopStyleVar()
634  ImVector<ImFont*> FontStack; // Stack for PushFont()/PopFont()
635  ImVector<ImGuiPopupRef> OpenPopupStack; // Which popups are open (persistent)
636  ImVector<ImGuiPopupRef> CurrentPopupStack; // Which level of BeginPopup() we are in (reset every frame)
637  ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions
638  bool NextTreeNodeOpenVal; // Storage for SetNextTreeNode** functions
640 
641  // Navigation data (for gamepad/keyboard)
642  ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusWindow'
643  ImGuiID NavId; // Focused item for navigation
644  ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0, also set when calling ActivateItem()
645  ImGuiID NavActivateDownId; // ~~ IsNavInputDown(ImGuiNavInput_Activate) ? NavId : 0
646  ImGuiID NavActivatePressedId; // ~~ IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0
647  ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_Input) ? NavId : 0
648  ImGuiID NavJustTabbedId; // Just tabbed to this id.
649  ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest)
650  ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame
651  ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode?
652  ImRect NavScoringRectScreen; // Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
653  int NavScoringCount; // Metrics for debugging
654  ImGuiWindow* NavWindowingTarget; // When selecting a window (holding Menu+FocusPrev/Next, or equivalent of CTRL-TAB) this window is temporarily displayed front-most.
658  int 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.
659  int NavIdTabCounter; // == NavWindow->DC.FocusIdxTabCounter at time of NavId processing
660  bool NavIdIsAlive; // Nav widget has been seen this frame ~~ NavRefRectRel is valid
661  bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
662  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)
663  bool NavDisableMouseHover; // When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
664  bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest
665  bool NavInitRequest; // Init request for appearing window to select first item
669  bool NavMoveFromClampedRefRect; // Set by manual scrolling, if we scroll to a point where NavId isn't visible we reset navigation from visible items
670  bool NavMoveRequest; // Move request for this frame
672  ImGuiNavForward NavMoveRequestForward; // None / ForwardQueued / ForwardActive (this is used to navigate sibling parent menus from a child menu)
673  ImGuiDir NavMoveDir, NavMoveDirLast; // Direction of the move request (left/right/up/down), direction of the previous move request
675  ImGuiNavMoveResult NavMoveResultLocal; // Best move request candidate within NavWindow
676  ImGuiNavMoveResult NavMoveResultOther; // Best move request candidate within NavWindow's flattened hierarchy (when using the NavFlattened flag)
677 
678  // Render
679  ImDrawData DrawData; // Main ImDrawData instance to pass render information to the user
682  ImDrawList OverlayDrawList; // Optional software render of mouse cursors, if io.MouseDrawCursor is set + a few debug overlays
684 
685  // Drag and Drop
693  ImGuiID DragDropAcceptIdCurr; // Target item id (set at the time of accepting the payload)
694  ImGuiID DragDropAcceptIdPrev; // Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets)
695  int DragDropAcceptFrameCount; // Last time a target expressed a desire to accept the source
696  ImVector<unsigned char> DragDropPayloadBufHeap; // We don't expose the ImVector<> directly
697  unsigned char DragDropPayloadBufLocal[8]; // Local buffer for small payloads
698 
699  // Widget state
702  ImGuiID ScalarAsInputTextId; // Temporary text input when CTRL+clicking on a slider, etc.
703  ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets
706  float DragCurrentAccum; // Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
707  float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
708  ImVec2 ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
710  ImVector<char> PrivateClipboard; // If no custom clipboard handler is defined
711  ImVec2 PlatformImePos, PlatformImeLastPos; // Cursor position request & last passed to the OS Input Method Editor
712 
713  // Settings
715  float SettingsDirtyTimer; // Save .ini Settings to memory when time reaches zero
716  ImGuiTextBuffer SettingsIniData; // In memory .ini settings
717  ImVector<ImGuiSettingsHandler> SettingsHandlers; // List of .ini settings handlers
718  ImVector<ImGuiWindowSettings> SettingsWindows; // ImGuiWindow .ini settings entries (parsed from the last loaded .ini file and maintained on saving)
719 
720  // Logging
722  FILE* LogFile; // If != NULL log to stdout/ file
723  ImGuiTextBuffer LogClipboard; // Accumulation buffer when log to clipboard. This is pointer so our GImGui static constructor doesn't call heap allocators.
726 
727  // Misc
728  float FramerateSecPerFrame[120]; // Calculate estimate of framerate for user over the last 2 seconds.
731  int WantCaptureMouseNextFrame; // Explicit capture via CaptureKeyboardFromApp()/CaptureMouseFromApp() sets those flags
734  char TempBuffer[1024*3+1]; // Temporary text buffer
735 
736  ImGuiContext(ImFontAtlas* shared_font_atlas) : OverlayDrawList(NULL)
737  {
738  Initialized = false;
739  Font = NULL;
740  FontSize = FontBaseSize = 0.0f;
741  FontAtlasOwnedByContext = shared_font_atlas ? false : true;
742  IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
743 
744  Time = 0.0f;
745  FrameCount = 0;
746  FrameCountEnded = FrameCountRendered = -1;
747  WindowsActiveCount = 0;
748  CurrentWindow = NULL;
749  HoveredWindow = NULL;
750  HoveredRootWindow = NULL;
751  HoveredId = 0;
752  HoveredIdAllowOverlap = false;
753  HoveredIdPreviousFrame = 0;
754  HoveredIdTimer = 0.0f;
755  ActiveId = 0;
756  ActiveIdPreviousFrame = 0;
757  ActiveIdTimer = 0.0f;
758  ActiveIdIsAlive = false;
759  ActiveIdIsJustActivated = false;
760  ActiveIdAllowOverlap = false;
761  ActiveIdAllowNavDirFlags = 0;
762  ActiveIdClickOffset = ImVec2(-1,-1);
763  ActiveIdWindow = NULL;
764  ActiveIdSource = ImGuiInputSource_None;
765  MovingWindow = NULL;
766  NextTreeNodeOpenVal = false;
767  NextTreeNodeOpenCond = 0;
768 
769  NavWindow = NULL;
770  NavId = NavActivateId = NavActivateDownId = NavActivatePressedId = NavInputId = 0;
771  NavJustTabbedId = NavJustMovedToId = NavNextActivateId = 0;
772  NavInputSource = ImGuiInputSource_None;
773  NavScoringRectScreen = ImRect();
774  NavScoringCount = 0;
775  NavWindowingTarget = NULL;
776  NavWindowingHighlightTimer = NavWindowingHighlightAlpha = 0.0f;
777  NavWindowingToggleLayer = false;
778  NavLayer = 0;
779  NavIdTabCounter = INT_MAX;
780  NavIdIsAlive = false;
781  NavMousePosDirty = false;
782  NavDisableHighlight = true;
783  NavDisableMouseHover = false;
784  NavAnyRequest = false;
785  NavInitRequest = false;
786  NavInitRequestFromMove = false;
787  NavInitResultId = 0;
788  NavMoveFromClampedRefRect = false;
789  NavMoveRequest = false;
790  NavMoveRequestFlags = 0;
791  NavMoveRequestForward = ImGuiNavForward_None;
792  NavMoveDir = NavMoveDirLast = NavMoveClipDir = ImGuiDir_None;
793 
794  ModalWindowDarkeningRatio = 0.0f;
795  OverlayDrawList._Data = &DrawListSharedData;
796  OverlayDrawList._OwnerName = "##Overlay"; // Give it a name for debugging
797  MouseCursor = ImGuiMouseCursor_Arrow;
798 
799  DragDropActive = false;
800  DragDropSourceFlags = 0;
801  DragDropMouseButton = -1;
802  DragDropTargetId = 0;
803  DragDropAcceptIdCurrRectSurface = 0.0f;
804  DragDropAcceptIdPrev = DragDropAcceptIdCurr = 0;
805  DragDropAcceptFrameCount = -1;
806  memset(DragDropPayloadBufLocal, 0, sizeof(DragDropPayloadBufLocal));
807 
808  ScalarAsInputTextId = 0;
809  ColorEditOptions = ImGuiColorEditFlags__OptionsDefault;
810  DragCurrentAccumDirty = false;
811  DragCurrentAccum = 0.0f;
812  DragSpeedDefaultRatio = 1.0f / 100.0f;
813  ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f);
814  TooltipOverrideCount = 0;
815  PlatformImePos = PlatformImeLastPos = ImVec2(FLT_MAX, FLT_MAX);
816 
817  SettingsLoaded = false;
818  SettingsDirtyTimer = 0.0f;
819 
820  LogEnabled = false;
821  LogFile = NULL;
822  LogStartDepth = 0;
823  LogAutoExpandMaxDepth = 2;
824 
825  memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));
826  FramerateSecPerFrameIdx = 0;
827  FramerateSecPerFrameAccum = 0.0f;
828  WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1;
829  memset(TempBuffer, 0, sizeof(TempBuffer));
830  }
831 };
832 
833 // Transient per-window flags, reset at the beginning of the frame. For child window, inherited from parent on first Begin().
834 // This is going to be exposed in imgui.h when stabilized enough.
836 {
838  ImGuiItemFlags_ButtonRepeat = 1 << 1, // false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings.
839  ImGuiItemFlags_Disabled = 1 << 2, // false // FIXME-WIP: Disable interactions but doesn't affect visuals. Should be: grey out and disable interactions with widgets that affect data + view widgets (WIP)
840  ImGuiItemFlags_NoNav = 1 << 3, // false
842  ImGuiItemFlags_SelectableDontClosePopup = 1 << 5, // false // MenuItem/Selectable() automatically closes current Popup window
844 };
845 
846 // Transient per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the DC variable name in ImGuiWindow.
847 // FIXME: That's theory, in practice the delimitation between ImGuiWindow and ImGuiWindowTempData is quite tenuous and could be reconsidered.
849 {
853  ImVec2 CursorMaxPos; // Used to implicitly calculate the size of our contents, always growing during the frame. Turned into window->SizeContents at the beginning of next frame
858  float LogLinePosY;
860  ImU32 TreeDepthMayJumpToParentOnPop; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31
863  ImRect LastItemRect; // Interaction rect
864  ImRect LastItemDisplayRect; // End-user display rect (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
866  bool NavHasScroll; // Set when scrolling can be used (ScrollMax > 0.0f)
867  int NavLayerCurrent; // Current layer, 0..31 (we currently only use 0..1)
868  int NavLayerCurrentMask; // = (1 << NavLayerCurrent) used by ItemAdd prior to clipping.
869  int NavLayerActiveMask; // Which layer have been written to (result from previous frame)
870  int NavLayerActiveMaskNext; // Which layer have been written to (buffer for current frame)
871  bool MenuBarAppending; // FIXME: Remove this
872  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.
876  ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin()
877 
878  // 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.
879  ImGuiItemFlags ItemFlags; // == ItemFlagsStack.back() [empty == ImGuiItemFlags_Default]
880  float ItemWidth; // == ItemWidthStack.back(). 0.0: default, >0.0: width in pixels, <0.0: align xx pixels to the right of window
881  float TextWrapPos; // == TextWrapPosStack.back() [empty == -1.0f]
886  int StackSizesBackup[6]; // Store size of various stacks for asserting
887 
888  float IndentX; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
890  float ColumnsOffsetX; // 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.
891  ImGuiColumnsSet* ColumnsSet; // Current columns set
892 
894  {
895  CursorPos = CursorPosPrevLine = CursorStartPos = CursorMaxPos = ImVec2(0.0f, 0.0f);
896  CurrentLineHeight = PrevLineHeight = 0.0f;
897  CurrentLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f;
898  LogLinePosY = -1.0f;
899  TreeDepth = 0;
900  TreeDepthMayJumpToParentOnPop = 0x00;
901  LastItemId = 0;
902  LastItemStatusFlags = 0;
903  LastItemRect = LastItemDisplayRect = ImRect();
904  NavHideHighlightOneFrame = false;
905  NavHasScroll = false;
906  NavLayerActiveMask = NavLayerActiveMaskNext = 0x00;
907  NavLayerCurrent = 0;
908  NavLayerCurrentMask = 1 << 0;
909  MenuBarAppending = false;
910  MenuBarOffset = ImVec2(0.0f, 0.0f);
911  StateStorage = NULL;
912  LayoutType = ParentLayoutType = ImGuiLayoutType_Vertical;
913  ItemWidth = 0.0f;
914  ItemFlags = ImGuiItemFlags_Default_;
915  TextWrapPos = -1.0f;
916  memset(StackSizesBackup, 0, sizeof(StackSizesBackup));
917 
918  IndentX = 0.0f;
919  GroupOffsetX = 0.0f;
920  ColumnsOffsetX = 0.0f;
921  ColumnsSet = NULL;
922  }
923 };
924 
925 // Storage for one window
927 {
928  char* Name;
929  ImGuiID ID; // == ImHash(Name)
930  ImGuiWindowFlags Flags; // See enum ImGuiWindowFlags_
931  ImVec2 Pos; // Position (always rounded-up to nearest pixel)
932  ImVec2 Size; // Current size (==SizeFull or collapsed title bar size)
933  ImVec2 SizeFull; // Size when non collapsed
934  ImVec2 SizeFullAtLastBegin; // Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars.
935  ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame. Include decoration, window title, border, menu, etc.
936  ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize()
937  ImVec2 WindowPadding; // Window padding at the time of begin.
938  float WindowRounding; // Window rounding at the time of begin.
939  float WindowBorderSize; // Window border size at the time of begin.
940  ImGuiID MoveId; // == window->GetID("#MOVE")
941  ImGuiID ChildId; // Id of corresponding item in parent window (for child windows)
943  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)
944  ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
945  ImVec2 ScrollbarSizes; // Size taken by scrollbars on each axis
946  bool ScrollbarX, ScrollbarY;
947  bool Active; // Set to true on Begin(), unless Collapsed
948  bool WasActive;
949  bool WriteAccessed; // Set to true when any widget access the current window
950  bool Collapsed; // Set when collapsing window to become only title-bar
952  bool SkipItems; // Set when items can safely be all clipped (e.g. window not visible or collapsed)
953  bool Appearing; // Set during the frame where the window is appearing (or re-appearing)
954  bool CloseButton; // Set when the window has a close button (p_open != NULL)
955  int BeginOrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
956  int BeginOrderWithinContext; // Order within entire imgui context. This is mostly used for debugging submission order related issues.
957  int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
958  ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
959  int AutoFitFramesX, AutoFitFramesY;
964  ImGuiCond SetWindowPosAllowFlags; // store acceptable condition flags for SetNextWindowPos() use.
965  ImGuiCond SetWindowSizeAllowFlags; // store acceptable condition flags for SetNextWindowSize() use.
966  ImGuiCond SetWindowCollapsedAllowFlags; // store acceptable condition flags for SetNextWindowCollapsed() use.
967  ImVec2 SetWindowPosVal; // store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
968  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.
969 
970  ImGuiWindowTempData DC; // Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the "DC" variable name.
971  ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack
972  ImRect ClipRect; // Current clipping rectangle. = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2.
973  ImRect OuterRectClipped; // = WindowRect just after setup in Begin(). == window->Rect() for root window.
974  ImRect InnerMainRect, InnerClipRect;
975  ImRect ContentsRegionRect; // FIXME: This is currently confusing/misleading. Maximum visible content position ~~ Pos + (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
978  ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items
981  float FontWindowScale; // User scale multiplier per-window
982 
983  ImDrawList* DrawList; // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
985  ImGuiWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.
986  ImGuiWindow* RootWindow; // Point to ourself or first ancestor that is not a child window.
987  ImGuiWindow* RootWindowForTitleBarHighlight; // Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
988  ImGuiWindow* RootWindowForTabbing; // Point to ourself or first ancestor which can be CTRL-Tabbed into.
989  ImGuiWindow* RootWindowForNav; // Point to ourself or first ancestor which doesn't have the NavFlattened flag.
990 
991  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.)
992  ImGuiID NavLastIds[2]; // Last known NavId for this window, per layer (0/1)
993  ImRect NavRectRel[2]; // Reference rectangle, in window relative space
994 
995  // Navigation / Focus
996  // FIXME-NAV: Merge all this with the new Nav system, at least the request variables should be moved to ImGuiContext
997  int FocusIdxAllCounter; // Start at -1 and increase as assigned via FocusItemRegister()
998  int FocusIdxTabCounter; // (same, but only count widgets which you can Tab through)
999  int FocusIdxAllRequestCurrent; // Item being requested for focus
1000  int FocusIdxTabRequestCurrent; // Tab-able item being requested for focus
1001  int FocusIdxAllRequestNext; // Item being requested for focus, for next update (relies on layout to be stable between the frame pressing TAB and the next frame)
1003 
1004 public:
1005  ImGuiWindow(ImGuiContext* context, const char* name);
1006  ~ImGuiWindow();
1007 
1008  ImGuiID GetID(const char* str, const char* str_end = NULL);
1009  ImGuiID GetID(const void* ptr);
1010  ImGuiID GetIDNoKeepAlive(const char* str, const char* str_end = NULL);
1011  ImGuiID GetIDFromRectangle(const ImRect& r_abs);
1012 
1013  // We don't use g.FontSize because the window may be != g.CurrentWidow.
1014  ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x+Size.x, Pos.y+Size.y); }
1015  float CalcFontSize() const { return GImGui->FontBaseSize * FontWindowScale; }
1016  float TitleBarHeight() const { return (Flags & ImGuiWindowFlags_NoTitleBar) ? 0.0f : CalcFontSize() + GImGui->Style.FramePadding.y * 2.0f; }
1017  ImRect TitleBarRect() const { return ImRect(Pos, ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight())); }
1018  float MenuBarHeight() const { return (Flags & ImGuiWindowFlags_MenuBar) ? DC.MenuBarOffset.y + CalcFontSize() + GImGui->Style.FramePadding.y * 2.0f : 0.0f; }
1019  ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight(); return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight()); }
1020 };
1021 
1022 // 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.
1024 {
1029 
1031  void Backup() { ImGuiWindow* window = GImGui->CurrentWindow; LastItemId = window->DC.LastItemId; LastItemStatusFlags = window->DC.LastItemStatusFlags; LastItemRect = window->DC.LastItemRect; LastItemDisplayRect = window->DC.LastItemDisplayRect; }
1032  void Restore() const { ImGuiWindow* window = GImGui->CurrentWindow; window->DC.LastItemId = LastItemId; window->DC.LastItemStatusFlags = LastItemStatusFlags; window->DC.LastItemRect = LastItemRect; window->DC.LastItemDisplayRect = LastItemDisplayRect; }
1033 };
1034 
1035 //-----------------------------------------------------------------------------
1036 // Internal API
1037 // No guarantee of forward compatibility here.
1038 //-----------------------------------------------------------------------------
1039 
1040 namespace ImGui
1041 {
1042  // We should always have a CurrentWindow in the stack (there is an implicit "Debug" window)
1043  // If this ever crash because g.CurrentWindow is NULL it means that either
1044  // - ImGui::NewFrame() has never been called, which is illegal.
1045  // - You are calling ImGui functions after ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal.
1049  IMGUI_API void FocusWindow(ImGuiWindow* window);
1051  IMGUI_API void BringWindowToBack(ImGuiWindow* window);
1052  IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
1054 
1055  IMGUI_API void Initialize(ImGuiContext* context);
1056  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().
1057 
1059 
1062  IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name);
1064 
1065  IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window);
1067  IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow* window);
1068  IMGUI_API void ClearActiveID();
1069  IMGUI_API void SetHoveredID(ImGuiID id);
1071  IMGUI_API void KeepAliveID(ImGuiID id);
1072 
1073  IMGUI_API void ItemSize(const ImVec2& size, float text_offset_y = 0.0f);
1074  IMGUI_API void ItemSize(const ImRect& bb, float text_offset_y = 0.0f);
1075  IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL);
1076  IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id);
1077  IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged);
1078  IMGUI_API bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id, bool tab_stop = true); // Return true if focus is requested
1080  IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y);
1081  IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
1082  IMGUI_API void PushMultiItemsWidths(int components, float width_full = 0.0f);
1083  IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled);
1084  IMGUI_API void PopItemFlag();
1085 
1086  IMGUI_API void SetCurrentFont(ImFont* font);
1087 
1088  IMGUI_API void OpenPopupEx(ImGuiID id);
1089  IMGUI_API void ClosePopup(ImGuiID id);
1090  IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window);
1091  IMGUI_API bool IsPopupOpen(ImGuiID id);
1092  IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags);
1093  IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip = true);
1095 
1096  IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
1098  IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect& bb_rel, ImGuiNavMoveFlags move_flags);
1100  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.
1101 
1103  IMGUI_API ImVec2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor = 0.0f, float fast_factor = 0.0f);
1104  IMGUI_API int CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate);
1105 
1106  IMGUI_API void Scrollbar(ImGuiLayoutType direction);
1107  IMGUI_API void VerticalSeparator(); // Vertical separator, for menu bars (use current line height). not exposed because it is misleading what it doesn't have an effect on regular layout.
1108  IMGUI_API bool SplitterBehavior(ImGuiID id, const ImRect& bb, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f);
1109 
1110  IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id);
1111  IMGUI_API void ClearDragDrop();
1113 
1114  // FIXME-WIP: New Columns API
1115  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().
1116  IMGUI_API void EndColumns(); // close columns
1117  IMGUI_API void PushColumnClipRect(int column_index = -1);
1118 
1119  // NB: All position are in absolute pixels coordinates (never using window coordinates internally)
1120  // 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.
1121  IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true);
1122  IMGUI_API void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width);
1123  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);
1124  IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border = true, float rounding = 0.0f);
1125  IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f);
1126  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);
1127  IMGUI_API void RenderArrow(ImVec2 pos, ImGuiDir dir, float scale = 1.0f);
1128  IMGUI_API void RenderBullet(ImVec2 pos);
1129  IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col, float sz);
1130  IMGUI_API void RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags = ImGuiNavHighlightFlags_TypeDefault); // Navigation highlight
1131  IMGUI_API void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding);
1132  IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); // Find the optional ## from which we stop displaying text.
1133 
1134  IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
1135  IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0);
1136  IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos, float radius);
1137 
1138  IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* v, float v_speed, const void* v_min, const void* v_max, const char* format, float power);
1139  IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* v, const void* v_min, const void* v_max, const char* format, float power, ImGuiSliderFlags flags = 0);
1140 
1141  IMGUI_API bool InputTextEx(const char* label, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback = NULL, void* user_data = NULL);
1142  IMGUI_API bool InputScalarAsWidgetReplacement(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* data_ptr, const char* format);
1143 
1144  IMGUI_API void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags);
1145  IMGUI_API void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags);
1146 
1147  IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);
1148  IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0); // Consume previous SetNextTreeNodeOpened() data, if any. May return true when logging
1149  IMGUI_API void TreePushRawID(ImGuiID id);
1150 
1151  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 graph_size);
1152 
1153  // Shade functions (write over already created vertices)
1154  IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawVert* vert_start, ImDrawVert* vert_end, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1);
1155  IMGUI_API void ShadeVertsLinearAlphaGradientForLeftToRightText(ImDrawVert* vert_start, ImDrawVert* vert_end, float gradient_p0_x, float gradient_p1_x);
1156  IMGUI_API void ShadeVertsLinearUV(ImDrawVert* vert_start, ImDrawVert* vert_end, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp);
1157 
1158 } // namespace ImGui
1159 
1160 // ImFontAtlas internals
1163 IMGUI_API void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent);
1164 IMGUI_API void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* spc);
1166 IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor);
1167 IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride);
1168 
1169 #ifdef __clang__
1170 #pragma clang diagnostic pop
1171 #endif
1172 
1173 #ifdef _MSC_VER
1174 #pragma warning (pop)
1175 #endif
Definition: imgui_internal.h:304
ImGuiCol Col
Definition: imgui_internal.h:371
ImGuiWindowTempData DC
Definition: imgui_internal.h:970
ImGuiDir NavMoveDirLast
Definition: imgui_internal.h:673
Definition: imgui_internal.h:211
Definition: imgui_internal.h:839
void Update(sf::RenderWindow &window, sf::Time dt)
Definition: imgui-SFML.cpp:308
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow *window, ImGuiNavMoveFlags move_flags)
Definition: imgui.cpp:5125
ImVec2 BackupCursorPos
Definition: imgui_internal.h:388
int NavScoringCount
Definition: imgui_internal.h:653
bool Active
Definition: imgui_internal.h:947
ImU32 TreeDepthMayJumpToParentOnPop
Definition: imgui_internal.h:860
int FocusIdxTabRequestNext
Definition: imgui_internal.h:1002
int FocusIdxTabCounter
Definition: imgui_internal.h:998
bool NavHideHighlightOneFrame
Definition: imgui_internal.h:865
bool HasSelection() const
Definition: imgui_internal.h:431
ImGuiWindow * RootWindowForTitleBarHighlight
Definition: imgui_internal.h:987
unsigned int ImU32
Definition: imgui.h:111
IMGUI_API void RenderText(ImVec2 pos, const char *text, const char *text_end=NULL, bool hide_text_after_hash=true)
Definition: imgui.cpp:4302
ImRect NavInitResultRectRel
Definition: imgui_internal.h:668
ImVec2 PosVal
Definition: imgui_internal.h:563
ImVec2 Scroll
Definition: imgui_internal.h:942
float WindowBorderSize
Definition: imgui_internal.h:939
ImGuiInputSource
Definition: imgui_internal.h:281
Definition: imgui_internal.h:305
float IndentX
Definition: imgui_internal.h:888
int BeginCount
Definition: imgui_internal.h:957
Definition: imgui_internal.h:438
ImGuiSeparatorFlags_
Definition: imgui_internal.h:248
int ActiveIdAllowNavDirFlags
Definition: imgui_internal.h:627
ImGuiCond SetWindowPosAllowFlags
Definition: imgui_internal.h:964
ImGuiCond SizeCond
Definition: imgui_internal.h:557
float FontSize
Definition: imgui_internal.h:601
float ColumnsOffsetX
Definition: imgui_internal.h:890
float DistAxial
Definition: imgui_internal.h:546
ImGuiColumnsFlags Flags
Definition: imgui_internal.h:477
Definition: imgui_internal.h:312
char * Name
Definition: imgui_internal.h:928
float CurrentLineHeight
Definition: imgui_internal.h:854
bool ActiveIdIsJustActivated
Definition: imgui_internal.h:625
bool Contains(const ImRect &r) const
Definition: imgui_internal.h:353
ImVec2 GetBR() const
Definition: imgui_internal.h:351
float ScrollX
Definition: imgui_internal.h:422
ImRect TitleBarRect() const
Definition: imgui_internal.h:1017
IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col, float sz)
Definition: imgui.cpp:4456
float ModalWindowDarkeningRatio
Definition: imgui_internal.h:681
ImGuiWindow * ParentWindow
Definition: imgui_internal.h:985
IMGUI_API void PushColumnClipRect(int column_index=-1)
Definition: imgui.cpp:12858
Definition: imgui_internal.h:296
ImVec2 ActiveIdClickOffset
Definition: imgui_internal.h:628
IMGUI_API void ColorEditOptionsPopup(const float *col, ImGuiColorEditFlags flags)
Definition: imgui.cpp:11845
IMGUI_API bool IsPopupOpen(ImGuiID id)
Definition: imgui.cpp:5073
ImVec2 SizeVal
Definition: imgui_internal.h:565
ImVector< ImWchar > Text
Definition: imgui_internal.h:417
ImGuiStyleMod(ImGuiStyleVar idx, int v)
Definition: imgui_internal.h:380
ImDrawData DrawData
Definition: imgui_internal.h:679
ImVec2 OpenPopupPos
Definition: imgui_internal.h:469
bool SettingsLoaded
Definition: imgui_internal.h:714
ImRect ClipRect
Definition: imgui_internal.h:972
Definition: imgui_internal.h:231
bool LogEnabled
Definition: imgui_internal.h:721
IMGUI_API void ClosePopupsOverWindow(ImGuiWindow *ref_window)
Definition: imgui.cpp:4966
Definition: imgui_internal.h:271
IMGUI_API const char * FindRenderedTextEnd(const char *text, const char *text_end=NULL)
Definition: imgui.cpp:4221
int WantCaptureMouseNextFrame
Definition: imgui_internal.h:731
IMGUI_API ImGuiWindowSettings * FindWindowSettings(ImGuiID id)
Definition: imgui.cpp:3801
#define IM_FMTLIST(FMT)
Definition: imgui.h:44
Definition: imgui.h:592
IMGUI_API bool IsWindowChildOf(ImGuiWindow *window, ImGuiWindow *potential_parent)
Definition: imgui.cpp:6901
Definition: imgui_internal.h:218
IMGUI_API void PopItemFlag()
Definition: imgui.cpp:6691
void TranslateX(float dx)
Definition: imgui_internal.h:360
ImGuiID ParentID
Definition: imgui_internal.h:542
float LogLinePosY
Definition: imgui_internal.h:858
void * SizeCallbackUserData
Definition: imgui_internal.h:570
ImGuiID NavActivateId
Definition: imgui_internal.h:644
ImVec2 MenuBarOffset
Definition: imgui_internal.h:872
Definition: imgui_internal.h:225
ImGuiColumnsSet()
Definition: imgui_internal.h:497
float FontWindowScale
Definition: imgui_internal.h:981
ImGuiNavHighlightFlags_
Definition: imgui_internal.h:302
Definition: imgui_internal.h:316
Definition: imgui.h:121
T const & operator+(T const &value, StreamEndStop)
Definition: catch.hpp:303
ImGuiContext(ImFontAtlas *shared_font_atlas)
Definition: imgui_internal.h:736
ImVector< float > ItemWidthStack
Definition: imgui_internal.h:883
int TooltipOverrideCount
Definition: imgui_internal.h:709
IMGUI_API void PushMultiItemsWidths(int components, float width_full=0.0f)
Definition: imgui.cpp:6607
IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding=0.0f)
Definition: imgui.cpp:4399
bool ActiveIdAllowOverlap
Definition: imgui_internal.h:626
ImVec2 ScrollbarClickDeltaToGrabCenter
Definition: imgui_internal.h:708
void Clear()
Definition: imgui_internal.h:498
Definition: imgui_internal.h:369
int NavLayerCurrent
Definition: imgui_internal.h:867
Definition: imgui_internal.h:288
ImGuiItemHoveredDataBackup()
Definition: imgui_internal.h:1030
Definition: imgui_internal.h:232
ImGuiWindow * Window
Definition: imgui_internal.h:543
int FramerateSecPerFrameIdx
Definition: imgui_internal.h:729
IMGUI_API void * ImFileLoadToMemory(const char *filename, const char *file_open_mode, size_t *out_file_size=NULL, int padding_bytes=0)
Definition: imgui.cpp:1495
Definition: imgui_internal.h:314
int NavLayer
Definition: imgui_internal.h:658
void(* ImGuiSizeCallback)(ImGuiSizeCallbackData *data)
Definition: imgui.h:107
IMGUI_API void SetHoveredID(ImGuiID id)
Definition: imgui.cpp:2142
ImGuiID HoveredId
Definition: imgui_internal.h:617
#define IM_FMTARGS(FMT)
Definition: imgui.h:43
ImDrawList OverlayDrawList
Definition: imgui_internal.h:682
int FocusIdxAllRequestCurrent
Definition: imgui_internal.h:999
ImGuiNavMoveResult NavMoveResultLocal
Definition: imgui_internal.h:675
float HoveredIdTimer
Definition: imgui_internal.h:620
Definition: imgui.h:743
bool Collapsed
Definition: imgui_internal.h:444
bool BackupActiveIdIsAlive
Definition: imgui_internal.h:395
float CurrentLineTextBaseOffset
Definition: imgui_internal.h:855
Definition: imgui_internal.h:1023
int ImGuiTreeNodeFlags
Definition: imgui.h:104
IMGUI_API bool FocusableItemRegister(ImGuiWindow *window, ImGuiID id, bool tab_stop=true)
Definition: imgui.cpp:2587
Definition: imgui_internal.h:299
int ImGuiColorEditFlags
Definition: imgui.h:95
Definition: imgui_internal.h:283
ImRect DragDropTargetRect
Definition: imgui_internal.h:690
ImGuiWindow * RootWindowForNav
Definition: imgui_internal.h:989
float TitleBarHeight() const
Definition: imgui_internal.h:1016
bool IsInverted() const
Definition: imgui_internal.h:365
ImGuiID TypeHash
Definition: imgui_internal.h:452
float BackupIndentX
Definition: imgui_internal.h:390
int ImGuiLayoutType
Definition: imgui_internal.h:55
Definition: imgui.h:996
int ImGuiNavMoveFlags
Definition: imgui_internal.h:63
int(* ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data)
Definition: imgui.h:106
float FramerateSecPerFrameAccum
Definition: imgui_internal.h:730
float LineMinY
Definition: imgui_internal.h:492
IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow *window)
Definition: imgui.cpp:2115
ImGuiAxis
Definition: imgui_internal.h:268
bool IsFirstFrame
Definition: imgui_internal.h:487
bool MenuBarAppending
Definition: imgui_internal.h:871
IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char *pixels, int x, int y, int w, int h, int stride)
Definition: imgui_draw.cpp:1684
ImGuiSizeCallback SizeCallback
Definition: imgui_internal.h:569
IMGUI_API int ImParseFormatPrecision(const char *format, int default_value)
Definition: imgui.cpp:8786
IMGUI_API int ImTextStrToUtf8(char *buf, int buf_size, const ImWchar *in_text, const ImWchar *in_text_end)
Definition: imgui.cpp:1344
Definition: imgui_internal.h:250
ImGuiID MoveId
Definition: imgui_internal.h:940
IMGUI_API bool IsDragDropPayloadBeingAccepted()
Definition: imgui.cpp:13328
ImVec2 PlatformImePos
Definition: imgui_internal.h:711
ImGuiLayoutType LayoutType
Definition: imgui_internal.h:875
ImVector< ImGuiItemFlags > ItemFlagsStack
Definition: imgui_internal.h:882
ImGuiDragDropFlags DragDropSourceFlags
Definition: imgui_internal.h:687
Definition: imgui_internal.h:278
int BeginOrderWithinContext
Definition: imgui_internal.h:956
int FrameCountRendered
Definition: imgui_internal.h:608
ImGuiButtonFlags_
Definition: imgui_internal.h:205
bool FontAtlasOwnedByContext
Definition: imgui_internal.h:597
Definition: imgui.h:1340
Definition: imgui_internal.h:244
bool NavInitRequest
Definition: imgui_internal.h:665
#define IM_ARRAYSIZE(_ARR)
Definition: imgui.h:46
float BackupCurrentLineTextBaseOffset
Definition: imgui_internal.h:393
ImVec2 SetWindowPosVal
Definition: imgui_internal.h:967
ImGuiStorage StateStorage
Definition: imgui_internal.h:979
ImRect NavScoringRectScreen
Definition: imgui_internal.h:652
IMGUI_API ImVec2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor=0.0f, float fast_factor=0.0f)
Definition: imgui.cpp:2864
int CurLenW
Definition: imgui_internal.h:420
IMGUI_API void SetCurrentFont(ImFont *font)
Definition: imgui.cpp:6648
Definition: imgui_internal.h:321
ImGuiID LastItemId
Definition: imgui_internal.h:1025
ImVec2 Size
Definition: imgui_internal.h:932
bool NavIdIsAlive
Definition: imgui_internal.h:660
ImGuiPlotType
Definition: imgui_internal.h:275
Definition: imgui_internal.h:209
ImGuiInputReadMode
Definition: imgui_internal.h:292
ImGuiNavMoveFlags_
Definition: imgui_internal.h:317
ImRect ClipRect
Definition: imgui_internal.h:478
const ImDrawListSharedData * _Data
Definition: imgui.h:1597
ImGuiMenuColumns MenuColumns
Definition: imgui_internal.h:978
float WindowRounding
Definition: imgui_internal.h:938
Definition: imgui_internal.h:234
IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char *label, const char *label_end=NULL)
Definition: imgui.cpp:8160
ImGuiInputSource NavInputSource
Definition: imgui_internal.h:651
unsigned char has_preferred_x
Definition: imgui_internal.h:343
IMGUI_API void ImFontAtlasBuildSetupFont(ImFontAtlas *atlas, ImFont *font, ImFontConfig *font_config, float ascent, float descent)
Definition: imgui_draw.cpp:1915
int LogStartDepth
Definition: imgui_internal.h:724
IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor)
Definition: imgui_draw.cpp:1675
int ImGuiItemFlags
Definition: imgui_internal.h:59
float CursorAnim
Definition: imgui_internal.h:424
bool SkipItems
Definition: imgui_internal.h:952
IMGUI_API int ImStrlenW(const ImWchar *str)
Definition: imgui.cpp:1059
ImGuiSettingsHandler()
Definition: imgui_internal.h:458
float BgAlphaVal
Definition: imgui_internal.h:571
ImVec4 ClipRectFullscreen
Definition: imgui_internal.h:521
IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
Definition: imgui.cpp:1007
int int y
Definition: wglext.h:61
ImGuiColorEditFlags ColorEditOptions
Definition: imgui_internal.h:703
IMGUI_API void ClosePopup(ImGuiID id)
Definition: imgui.cpp:5020
IMGUI_API float GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode)
Definition: imgui.cpp:2825
int select_start
Definition: imgui_internal.h:326
Definition: imgui_internal.h:210
ImRect RectRel
Definition: imgui_internal.h:547
ImVector< ImGuiWindow * > CurrentWindowStack
Definition: imgui_internal.h:611
Definition: imgui_internal.h:208
int ImGuiDragDropFlags
Definition: imgui.h:99
bool NavMousePosDirty
Definition: imgui_internal.h:661
ImVector< ImFont * > FontStack
Definition: imgui_internal.h:634
ImGuiID NavActivatePressedId
Definition: imgui_internal.h:646
IMGUI_API void ActivateItem(ImGuiID id)
Definition: imgui.cpp:7405
ImVec2 Pos
Definition: imgui_internal.h:931
typedef void(WINAPI *PFNWGLFREEMEMORYNVPROC)(void *pointer)
bool DragDropActive
Definition: imgui_internal.h:686
ImVec2 CursorPosPrevLine
Definition: imgui_internal.h:851
ImGuiWindow * RootWindowForTabbing
Definition: imgui_internal.h:988
void Add(const ImRect &r)
Definition: imgui_internal.h:356
ImGuiNavMoveFlags NavMoveRequestFlags
Definition: imgui_internal.h:671
ImGuiItemFlags ItemFlags
Definition: imgui_internal.h:879
void Backup()
Definition: imgui_internal.h:1031
IMGUI_API bool SplitterBehavior(ImGuiID id, const ImRect &bb, ImGuiAxis axis, float *size1, float *size2, float min_size1, float min_size2, float hover_extend=0.0f)
Definition: imgui.cpp:12526
IMGUI_API bool BeginDragDropTargetCustom(const ImRect &bb, ImGuiID id)
Definition: imgui.cpp:13282
ImVec2 TexUvWhitePixel
Definition: imgui_internal.h:517
int GLenum UINT size
Definition: wglext.h:321
ImDrawList * DrawList
Definition: imgui_internal.h:983
ImVec2 SetWindowPosPivot
Definition: imgui_internal.h:968
ImDrawDataBuilder DrawDataBuilder
Definition: imgui_internal.h:680
float ItemWidth
Definition: imgui_internal.h:880
Definition: imgui_internal.h:297
ImRect Rect() const
Definition: imgui_internal.h:1014
IMGUI_API ImGuiID GetHoveredID()
Definition: imgui.cpp:2150
unsigned short ImWchar
Definition: imgui.h:82
ImGuiNavMoveResult()
Definition: imgui_internal.h:549
IMGUI_API void ItemSize(const ImRect &bb, float text_offset_y=0.0f)
Definition: imgui.cpp:2210
int ImGuiCond
Definition: imgui.h:86
Definition: imgui.h:1588
Definition: imgui_internal.h:307
ImGuiID LastItemId
Definition: imgui_internal.h:861
int ImGuiInputTextFlags
Definition: imgui.h:102
ImGuiID ActiveId
Definition: imgui_internal.h:621
Definition: imgui.cpp:9978
int ImGuiDir
Definition: imgui.h:85
Definition: imgui_internal.h:926
ImRect MenuBarRect() const
Definition: imgui_internal.h:1019
ImGuiDir NavMoveClipDir
Definition: imgui_internal.h:674
bool Collapsed
Definition: imgui_internal.h:950
ImGuiLayoutType ParentLayoutType
Definition: imgui_internal.h:876
IMGUI_API void RenderRectFilledRangeH(ImDrawList *draw_list, const ImRect &rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding)
Definition: imgui_draw.cpp:2720
Definition: imgui_internal.h:840
Definition: imgui_internal.h:285
IMGUI_API FILE * ImFileOpen(const char *filename, const char *file_open_mode)
Definition: imgui.cpp:1477
IMGUI_API const char * ImParseFormatFindEnd(const char *format)
Definition: imgui.cpp:8750
float DragSpeedDefaultRatio
Definition: imgui_internal.h:707
IMGUI_API ImU32 ImHash(const void *data, int data_size, ImU32 seed=0)
Definition: imgui.cpp:1156
ImGuiID Id
Definition: imgui_internal.h:416
IMGUI_API void RenderArrow(ImVec2 pos, ImGuiDir dir, float scale=1.0f)
Definition: imgui.cpp:4412
ImGuiWindow * NavLastChildNavWindow
Definition: imgui_internal.h:991
ImVector< ImGuiWindow * > Windows
Definition: imgui_internal.h:609
IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void *v, float v_speed, const void *v_min, const void *v_max, const char *format, float power)
Definition: imgui.cpp:9385
int WantTextInputNextFrame
Definition: imgui_internal.h:733
Definition: imgui_internal.h:449
int ImGuiWindowFlags
Definition: imgui.h:105
bool NavWindowingToggleLayer
Definition: imgui_internal.h:657
#define IMGUI_API
Definition: imgui.h:31
Definition: imgui_internal.h:284
ImRect(const ImVec4 &v)
Definition: imgui_internal.h:341
ImVec2 SizeContentsExplicit
Definition: imgui_internal.h:936
ImGuiNavForward NavMoveRequestForward
Definition: imgui_internal.h:672
ImGuiStb::STB_TexteditState StbState
Definition: imgui_internal.h:423
Definition: imgui_internal.h:462
Definition: imgui_internal.h:320
IMGUI_API void KeepAliveID(ImGuiID id)
Definition: imgui.cpp:2156
void Expand(const float amount)
Definition: imgui_internal.h:357
ImVector< char > TempTextBuffer
Definition: imgui_internal.h:419
void Clear()
Definition: imgui_internal.h:587
IMGUI_API int ImStrnicmp(const char *str1, const char *str2, size_t count)
Definition: imgui.cpp:1030
ImGuiID OpenParentId
Definition: imgui_internal.h:468
Definition: imgui_internal.h:216
IMGUI_API void NewFrameUpdateHoveredWindowAndCaptureFlags()
Definition: imgui.cpp:3418
float w
Definition: imgui.h:135
void SelectAll()
Definition: imgui_internal.h:433
ImFont InputTextPasswordFont
Definition: imgui_internal.h:701
bool WriteAccessed
Definition: imgui_internal.h:949
Definition: imgui.h:1541
bool NavInitRequestFromMove
Definition: imgui_internal.h:666
int select_end
Definition: imgui_internal.h:327
ImGuiColumnsFlags Flags
Definition: imgui_internal.h:486
void ClipWith(const ImRect &r)
Definition: imgui_internal.h:362
bool NavHasScroll
Definition: imgui_internal.h:866
ImVec2 SizeFullAtLastBegin
Definition: imgui_internal.h:934
ImGuiTextEditState InputTextState
Definition: imgui_internal.h:700
IMGUI_API void ColorTooltip(const char *text, const float *col, ImGuiColorEditFlags flags)
Definition: imgui.cpp:11680
ImGuiID NavJustTabbedId
Definition: imgui_internal.h:648
bool CollapseToggleWanted
Definition: imgui_internal.h:951
IMGUI_API void TreePushRawID(ImGuiID id)
Definition: imgui.cpp:13061
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled)
Definition: imgui.cpp:6681
ImGuiWindow * RootWindow
Definition: imgui_internal.h:986
IMGUI_API void ImStrncpy(char *dst, const char *src, size_t count)
Definition: imgui.cpp:1037
ImVector< ImGuiColMod > ColorModifiers
Definition: imgui_internal.h:632
Definition: imgui_internal.h:313
IMGUI_API void Scrollbar(ImGuiLayoutType direction)
Definition: imgui.cpp:6419
bool CursorFollow
Definition: imgui_internal.h:425
IMGUI_API int ImStricmp(const char *str1, const char *str2)
Definition: imgui.cpp:1023
ImVec2 Max
Definition: imgui_internal.h:337
Definition: imgui_internal.h:212
const char * _OwnerName
Definition: imgui.h:1598
ImVec2 PosPivotVal
Definition: imgui_internal.h:564
ImGuiID Id
Definition: imgui_internal.h:441
float ItemWidthDefault
Definition: imgui_internal.h:977
IMGUI_API void FocusWindow(ImGuiWindow *window)
Definition: imgui.cpp:6554
Definition: imgui_internal.h:848
ImRect LastItemRect
Definition: imgui_internal.h:863
ImGuiWindow * ActiveIdWindow
Definition: imgui_internal.h:629
ImGuiTextBuffer SettingsIniData
Definition: imgui_internal.h:716
IMGUI_API const char * ImStrchrRange(const char *str_begin, const char *str_end, char c)
Definition: imgui.cpp:1051
IMGUI_API bool ImTriangleContainsPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
Definition: imgui.cpp:988
bool AutoFitOnlyGrows
Definition: imgui_internal.h:960
Definition: imgui.h:1696
float FontSize
Definition: imgui_internal.h:519
ImGuiWindow * NavWindowingTarget
Definition: imgui_internal.h:654
ImVector< ImGuiStyleMod > StyleModifiers
Definition: imgui_internal.h:633
int GLenum UINT void * data
Definition: wglext.h:321
IMGUI_API void RenderNavHighlight(const ImRect &bb, ImGuiID id, ImGuiNavHighlightFlags flags=ImGuiNavHighlightFlags_TypeDefault)
Definition: imgui.cpp:4474
bool Contains(const ImVec2 &p) const
Definition: imgui_internal.h:352
ImGuiDir AutoPosLastDirection
Definition: imgui_internal.h:962
bool DragCurrentAccumDirty
Definition: imgui_internal.h:705
ImRect ContentsRegionRect
Definition: imgui_internal.h:975
int ImGuiStyleVar
Definition: imgui.h:90
Definition: imgui.h:1420
ImDrawListSharedData DrawListSharedData
Definition: imgui_internal.h:603
ImGuiID HoveredIdPreviousFrame
Definition: imgui_internal.h:619
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
IMGUI_API bool ItemAdd(const ImRect &bb, ImGuiID id, const ImRect *nav_bb=NULL)
Definition: imgui.cpp:2476
ImGuiItemStatusFlags_
Definition: imgui_internal.h:255
ImGuiID DragDropTargetId
Definition: imgui_internal.h:691
ImVector< ImGuiColumnData > Columns
Definition: imgui_internal.h:495
ImVec2 SizeFull
Definition: imgui_internal.h:933
void CursorClamp()
Definition: imgui_internal.h:430
void CursorAnimReset()
Definition: imgui_internal.h:429
Definition: imgui_internal.h:277
Definition: imgui_internal.h:264
ImGuiColumnData()
Definition: imgui_internal.h:480
int FrameCountEnded
Definition: imgui_internal.h:607
IMGUI_API void Shutdown(ImGuiContext *context)
Definition: imgui.cpp:3745
IMGUI_API ImGuiWindow * GetFrontMostPopupModal()
Definition: imgui.cpp:4998
int Current
Definition: imgui_internal.h:489
float z
Definition: imgui.h:135
Definition: imgui_internal.h:242
int ImGuiNavDirSourceFlags
Definition: imgui_internal.h:62
IMGUI_API void ImFontAtlasBuildFinish(ImFontAtlas *atlas)
Definition: imgui_draw.cpp:1986
ImVec2 WindowPadding
Definition: imgui_internal.h:937
Definition: imgui_internal.h:207
bool Appearing
Definition: imgui_internal.h:953
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow *window)
Definition: imgui.cpp:6977
ImGuiID NavInitResultId
Definition: imgui_internal.h:667
IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawVert *vert_start, ImDrawVert *vert_end, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1)
Definition: imgui_draw.cpp:1256
Definition: imgui_internal.h:215
Definition: imgui_internal.h:838
ImGuiID ActiveIdPreviousFrame
Definition: imgui_internal.h:622
IMGUI_API void VerticalSeparator()
Definition: imgui.cpp:12507
Definition: imgui_internal.h:539
Definition: imgui_internal.h:258
Definition: imgui_internal.h:217
FILE * LogFile
Definition: imgui_internal.h:722
IMGUI_API void Initialize(ImGuiContext *context)
Definition: imgui.cpp:3727
ImRect()
Definition: imgui_internal.h:339
int DragDropMouseButton
Definition: imgui_internal.h:688
unsigned int ImGuiID
Definition: imgui.h:81
float CalcFontSize() const
Definition: imgui_internal.h:1015
ImVector< ImGuiWindowSettings > SettingsWindows
Definition: imgui_internal.h:718
int NavIdTabCounter
Definition: imgui_internal.h:659
Definition: imgui_internal.h:319
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.cpp:996
Definition: imgui_internal.h:287
ImVec2 ScrollTargetCenterRatio
Definition: imgui_internal.h:944
ImGuiWindow * HoveredRootWindow
Definition: imgui_internal.h:616
int FocusIdxTabRequestCurrent
Definition: imgui_internal.h:1000
ImGuiID ChildId
Definition: imgui_internal.h:941
void clear()
Definition: imgui.h:1220
IMGUI_API int ImTextStrFromUtf8(ImWchar *buf, int buf_size, const char *in_text, const char *in_text_end, const char **in_remaining=NULL)
Definition: imgui.cpp:1263
IMGUI_API void FocusableItemUnregister(ImGuiWindow *window)
Definition: imgui.cpp:2612
Definition: imgui.h:133
ImGuiWindow * MovingWindow
Definition: imgui_internal.h:631
ImVec4 BackupValue
Definition: imgui_internal.h:372
float FontBaseSize
Definition: imgui_internal.h:602
Definition: imgui_internal.h:243
ImGuiTextEditState()
Definition: imgui_internal.h:428
int ImGuiSliderFlags
Definition: imgui_internal.h:65
float StartPosY
Definition: imgui_internal.h:493
ImVec2 GetTL() const
Definition: imgui_internal.h:348
ImGuiID ScalarAsInputTextId
Definition: imgui_internal.h:702
bool WasActive
Definition: imgui_internal.h:948
bool ScrollbarY
Definition: imgui_internal.h:946
float DistCenter
Definition: imgui_internal.h:545
ImGuiTextBuffer LogClipboard
Definition: imgui_internal.h:723
float DragDropAcceptIdCurrRectSurface
Definition: imgui_internal.h:692
int ImGuiMouseCursor
Definition: imgui.h:89
bool Initialized
Definition: imgui_internal.h:596
void Restore() const
Definition: imgui_internal.h:1032
ImVec2 CursorStartPos
Definition: imgui_internal.h:852
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)
Definition: imgui.cpp:11715
ImVec2 ContentSizeVal
Definition: imgui_internal.h:566
Definition: imgui.h:582
void ClearFreeMemory()
Definition: imgui_internal.h:535
Definition: imgui.h:1680
Definition: imgui_internal.h:265
ImGuiWindow * ParentWindow
Definition: imgui_internal.h:466
ImGuiSelectableFlagsPrivate_
Definition: imgui_internal.h:238
IMGUI_API void RenderTextWrapped(ImVec2 pos, const char *text, const char *text_end, float wrap_width)
Definition: imgui.cpp:4328
IMGUI_API void ClearDragDrop()
Definition: imgui.cpp:13120
Definition: imgui_internal.h:327
IMGUI_API void RenderBullet(ImVec2 pos)
Definition: imgui.cpp:4449
Definition: imgui_internal.h:241
float x
Definition: imgui.h:135
ImRect(const ImVec2 &min, const ImVec2 &max)
Definition: imgui_internal.h:340
Definition: imgui_internal.h:251
ImGuiItemFlags_
Definition: imgui_internal.h:835
ImVector< ImGuiPopupRef > OpenPopupStack
Definition: imgui_internal.h:635
bool AdvanceCursor
Definition: imgui_internal.h:396
auto operator+=(std::string &lhs, StringRef const &sr) -> std::string &
ImGuiID DragDropAcceptIdPrev
Definition: imgui_internal.h:694
ImGuiCond ContentSizeCond
Definition: imgui_internal.h:558
Definition: imgui_internal.h:272
IMGUI_API bool ButtonEx(const char *label, const ImVec2 &size_arg=ImVec2(0, 0), ImGuiButtonFlags flags=0)
Definition: imgui.cpp:7809
ImVector< char > PrivateClipboard
Definition: imgui_internal.h:710
int x
Definition: wglext.h:61
int HiddenFrames
Definition: imgui_internal.h:963
ImGuiCond SetWindowCollapsedAllowFlags
Definition: imgui_internal.h:966
ImVec2 OpenMousePos
Definition: imgui_internal.h:470
float BackupGroupOffsetX
Definition: imgui_internal.h:391
ImVec2 CursorPos
Definition: imgui_internal.h:850
ImRect SizeConstraintRect
Definition: imgui_internal.h:568
IMGUI_API void BeginColumns(const char *str_id, int count, ImGuiColumnsFlags flags=0)
Definition: imgui.cpp:12880
void Clear()
Definition: imgui_internal.h:534
ImGuiWindowTempData()
Definition: imgui_internal.h:893
float SettingsDirtyTimer
Definition: imgui_internal.h:715
ImGuiWindow * CurrentWindow
Definition: imgui_internal.h:614
float OffsetNorm
Definition: imgui_internal.h:475
float NavWindowingHighlightTimer
Definition: imgui_internal.h:655
float y
Definition: imgui.h:123
const char * TypeName
Definition: imgui_internal.h:451
ImGuiStyle Style
Definition: imgui_internal.h:599
Definition: imgui_internal.h:270
Definition: imgui_internal.h:245
void ClearSelection()
Definition: imgui_internal.h:432
IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar *in_text, const ImWchar *in_text_end)
Definition: imgui.cpp:1360
float TextWrapPos
Definition: imgui_internal.h:881
int NavLayerActiveMask
Definition: imgui_internal.h:869
IMGUI_API void MarkIniSettingsDirty(ImGuiWindow *window)
Definition: imgui.cpp:3941
ImRect InnerMainRect
Definition: imgui_internal.h:974
float PrevLineHeight
Definition: imgui_internal.h:856
ImVec2 FramePadding
Definition: imgui.h:1008
IMGUI_API void ShadeVertsLinearUV(ImDrawVert *vert_start, ImDrawVert *vert_end, const ImVec2 &a, const ImVec2 &b, const ImVec2 &uv_a, const ImVec2 &uv_b, bool clamp)
Definition: imgui_draw.cpp:1289
float Spacing
Definition: imgui_internal.h:403
Definition: imgui_internal.h:213
int ImGuiSeparatorFlags
Definition: imgui_internal.h:64
int DragDropAcceptFrameCount
Definition: imgui_internal.h:695
Definition: imgui_internal.h:515
void * UserData
Definition: imgui_internal.h:456
IMGUI_API int ImFormatString(char *buf, size_t buf_size, const char *fmt,...) IM_FMTARGS(3)
Definition: imgui.cpp:1128
int LogAutoExpandMaxDepth
Definition: imgui_internal.h:725
IMGUI_API void ImFontAtlasBuildPackCustomRects(ImFontAtlas *atlas, void *spc)
Definition: imgui_draw.cpp:1929
ImGuiID ID
Definition: imgui_internal.h:541
Definition: imgui.h:1315
Definition: imgui_internal.h:328
ImGuiNextWindowData()
Definition: imgui_internal.h:574
IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border=true, float rounding=0.0f)
Definition: imgui.cpp:4386
ImGuiWindowFlags Flags
Definition: imgui_internal.h:930
Definition: imgui_internal.h:841
ImVec2 GetTR() const
Definition: imgui_internal.h:349
ImGuiColumnsFlags_
Definition: imgui_internal.h:228
IMGUI_API const ImWchar * ImStrbolW(const ImWchar *buf_mid_line, const ImWchar *buf_begin)
Definition: imgui.cpp:1066
ImRect LastItemDisplayRect
Definition: imgui_internal.h:864
ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v)
Definition: imgui_internal.h:382
ImRect LastItemDisplayRect
Definition: imgui_internal.h:1028
Definition: imgui_internal.h:376
Definition: imgui_internal.h:483
IMGUI_API ImGuiWindow * FindWindowByName(const char *name)
Definition: imgui.cpp:5469
IMGUI_API void NavMoveRequestCancel()
Definition: imgui.cpp:2409
bool NavDisableHighlight
Definition: imgui_internal.h:662
IMGUI_API char * ImStrdup(const char *str)
Definition: imgui.cpp:1044
ImDrawList DrawListInst
Definition: imgui_internal.h:984
IMGUI_API const char * ImStristr(const char *haystack, const char *haystack_end, const char *needle, const char *needle_end)
Definition: imgui.cpp:1073
int FocusIdxAllCounter
Definition: imgui_internal.h:997
IMGUI_API void OpenPopupEx(ImGuiID id)
Definition: imgui.cpp:4921
ImVec4 ColorPickerRef
Definition: imgui_internal.h:704
char * Name
Definition: imgui_internal.h:440
IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &p)
Definition: imgui.cpp:975
ImVector< ImGuiWindow * > WindowsSortBuffer
Definition: imgui_internal.h:610
ImVec2 GetBL() const
Definition: imgui_internal.h:350
ImVector< ImGuiSettingsHandler > SettingsHandlers
Definition: imgui_internal.h:717
ImGuiID ID
Definition: imgui_internal.h:485
float BackupLogLinePosY
Definition: imgui_internal.h:394
ImVector< float > TextWrapPosStack
Definition: imgui_internal.h:884
IMGUI_API void BringWindowToBack(ImGuiWindow *window)
Definition: imgui.cpp:6539
ImGuiCond PosCond
Definition: imgui_internal.h:556
ImGuiSliderFlags_
Definition: imgui_internal.h:223
Definition: imgui_internal.h:837
ImGuiNavMoveResult NavMoveResultOther
Definition: imgui_internal.h:676
IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip=true)
Definition: imgui.cpp:4874
IMGUI_API void ShadeVertsLinearAlphaGradientForLeftToRightText(ImDrawVert *vert_start, ImDrawVert *vert_end, float gradient_p0_x, float gradient_p1_x)
Definition: imgui_draw.cpp:1272
Definition: imgui-SFML.cpp:166
int ImGuiDataType
Definition: imgui.h:84
Definition: imgui_internal.h:220
IMGUI_API void EndColumns()
Definition: imgui.cpp:12944
int FocusIdxAllRequestNext
Definition: imgui_internal.h:1001
ImVec2 ScrollbarSizes
Definition: imgui_internal.h:945
int Count
Definition: imgui_internal.h:402
IMGUI_API bool ButtonBehavior(const ImRect &bb, ImGuiID id, bool *out_hovered, bool *out_held, ImGuiButtonFlags flags=0)
Definition: imgui.cpp:7664
int AutoFitChildAxises
Definition: imgui_internal.h:961
Definition: imgui.h:1843
ImRect LastItemRect
Definition: imgui_internal.h:1027
IMGUI_API bool SliderBehavior(const ImRect &bb, ImGuiID id, ImGuiDataType data_type, void *v, const void *v_min, const void *v_max, const char *format, float power, ImGuiSliderFlags flags=0)
Definition: imgui.cpp:9034
IMGUI_API int CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate)
Definition: imgui.cpp:4628
ImGuiID NavActivateDownId
Definition: imgui_internal.h:645
IMGUI_API bool ItemHoverable(const ImRect &bb, ImGuiID id)
Definition: imgui.cpp:2554
int BufSizeA
Definition: imgui_internal.h:421
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 graph_size)
Definition: imgui.cpp:9604
Definition: imgui_internal.h:554
int NavLayerCurrentMask
Definition: imgui_internal.h:868
IMGUI_API ImGuiID GetActiveID()
Definition: imgui.cpp:2109
ImGuiStyleMod(ImGuiStyleVar idx, float v)
Definition: imgui_internal.h:381
ImGuiCond FocusCond
Definition: imgui_internal.h:561
IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow *window)
Definition: imgui.cpp:2092
ImGuiWindow * NavWindow
Definition: imgui_internal.h:642
IMGUI_API const char * ImParseFormatTrimDecorations(const char *format, char *buf, int buf_size)
Definition: imgui.cpp:8772
ImFont * Font
Definition: imgui_internal.h:518
IMGUI_API bool CloseButton(ImGuiID id, const ImVec2 &pos, float radius)
Definition: imgui.cpp:7912
int AutoFitFramesY
Definition: imgui_internal.h:959
Definition: imgui_internal.h:400
Definition: imgui_internal.h:386
ImGuiID ID
Definition: imgui_internal.h:929
float OffsetNormBeforeResize
Definition: imgui_internal.h:476
float DistBox
Definition: imgui_internal.h:544
Definition: imgui.h:964
bool HoveredIdAllowOverlap
Definition: imgui_internal.h:618
int NavLayerActiveMaskNext
Definition: imgui_internal.h:870
int WantCaptureKeyboardNextFrame
Definition: imgui_internal.h:732
bool NavMoveFromClampedRefRect
Definition: imgui_internal.h:669
ImGuiID PopupId
Definition: imgui_internal.h:958
Definition: imgui_internal.h:329
IMGUI_API void NavInitWindow(ImGuiWindow *window, bool force_reinit)
Definition: imgui.cpp:2771
bool NavMoveRequest
Definition: imgui_internal.h:670
Definition: imgui.h:1035
Definition: imgui_internal.h:235
float Time
Definition: imgui_internal.h:605
bool ActiveIdIsAlive
Definition: imgui_internal.h:624
Definition: imgui_internal.h:219
IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags=0)
Definition: imgui.cpp:8113
ImVec2 Pos
Definition: imgui_internal.h:442
IMGUI_API bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas *atlas)
Definition: imgui_draw.cpp:1692
ImVec2 MenuBarOffsetMinVal
Definition: imgui_internal.h:572
ImVec2 Size
Definition: imgui_internal.h:443
IMGUI_API float CalcWrapWidthForPos(const ImVec2 &pos, float wrap_pos_x)
Definition: imgui.cpp:2631
ImVector< ImGuiGroupData > GroupStack
Definition: imgui_internal.h:885
ImGuiIO IO
Definition: imgui_internal.h:598
ImGuiNavDirSourceFlags_
Definition: imgui_internal.h:310
ImVector< ImGuiColumnsSet > ColumnsStorage
Definition: imgui_internal.h:980
ImGuiPayload DragDropPayload
Definition: imgui_internal.h:689
ImGuiCond CollapsedCond
Definition: imgui_internal.h:559
IMGUI_API void BringWindowToFront(ImGuiWindow *window)
Definition: imgui.cpp:6524
float MenuBarHeight() const
Definition: imgui_internal.h:1018
IMGUI_API void ImStrTrimBlanks(char *str)
Definition: imgui.cpp:1096
IMGUI_API void ImFontAtlasBuildRegisterDefaultCustomRects(ImFontAtlas *atlas)
Definition: imgui_draw.cpp:1905
IMGUI_API int ImTextCharFromUtf8(unsigned int *out_char, const char *in_text, const char *in_text_end)
Definition: imgui.cpp:1205
Definition: imgui_internal.h:257
ImGuiItemStatusFlags LastItemStatusFlags
Definition: imgui_internal.h:862
int cursor
Definition: imgui_internal.h:323
bool CloseButton
Definition: imgui_internal.h:954
ImGuiLayoutType_
Definition: imgui_internal.h:262
Definition: imgui_internal.h:295
ImGuiID GetID(const char *str_id)
Definition: imgui.cpp:8478
void Expand(const ImVec2 &amount)
Definition: imgui_internal.h:358
ImGuiID NavId
Definition: imgui_internal.h:643
IMGUI_API bool InputTextEx(const char *label, char *buf, int buf_size, const ImVec2 &size_arg, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback=NULL, void *user_data=NULL)
Definition: imgui.cpp:10178
Definition: imgui_internal.h:842
ImVector< ImGuiID > IDStack
Definition: imgui_internal.h:971
ImGuiMouseCursor MouseCursor
Definition: imgui_internal.h:683
ImGuiCond NextTreeNodeOpenCond
Definition: imgui_internal.h:639
float DragCurrentAccum
Definition: imgui_internal.h:706
bool SelectedAllMouseLock
Definition: imgui_internal.h:426
int ImGuiColumnsFlags
Definition: imgui.h:96
float MinX
Definition: imgui_internal.h:491
int WindowsActiveCount
Definition: imgui_internal.h:613
ImGuiNextWindowData NextWindowData
Definition: imgui_internal.h:637
void Clear()
Definition: imgui_internal.h:550
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)
Definition: imgui.cpp:4346
IMGUI_API int ImTextCountCharsFromUtf8(const char *in_text, const char *in_text_end)
Definition: imgui.cpp:1282
ImGuiWindow * GetCurrentWindow()
Definition: imgui_internal.h:1047
ImGuiStorage * StateStorage
Definition: imgui_internal.h:874
int ImGuiCol
Definition: imgui.h:83
ImVector< ImGuiWindow * > ChildWindows
Definition: imgui_internal.h:873
float CurveTessellationTol
Definition: imgui_internal.h:520
Definition: imgui_internal.h:298
Definition: imgui_internal.h:286
ImRect OuterRectClipped
Definition: imgui_internal.h:973
int ImGuiNavInput
Definition: imgui.h:88
ImGuiColumnsSet * ColumnsSet
Definition: imgui_internal.h:891
float ActiveIdTimer
Definition: imgui_internal.h:623
Definition: imgui_internal.h:233
ImGuiItemStatusFlags LastItemStatusFlags
Definition: imgui_internal.h:1026
Definition: imgui_internal.h:306
ImGuiCond SizeConstraintCond
Definition: imgui_internal.h:560
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y)
Definition: imgui.cpp:2618
Definition: imgui_internal.h:322
void Translate(const ImVec2 &d)
Definition: imgui_internal.h:359
IMGUI_API ImGuiSettingsHandler * FindSettingsHandler(const char *type_name)
Definition: imgui.cpp:3830
ImFont * Font
Definition: imgui_internal.h:600
ImVector< char > InitialText
Definition: imgui_internal.h:418
IMGUI_API ImGuiContext * GImGui
Definition: imgui.cpp:804
int TreeDepth
Definition: imgui_internal.h:859
ImGuiWindow * Window
Definition: imgui_internal.h:465
int ImGuiNavHighlightFlags
Definition: imgui_internal.h:61
ImVec2 BackupCursorMaxPos
Definition: imgui_internal.h:389
Definition: imgui_internal.h:334
ImVec2 SizeContents
Definition: imgui_internal.h:935
ImGuiStorage WindowsById
Definition: imgui_internal.h:612
float StartMaxPosX
Definition: imgui_internal.h:494
float PrevLineTextBaseOffset
Definition: imgui_internal.h:857
bool NextTreeNodeOpenVal
Definition: imgui_internal.h:638
void GLuint name
Definition: wglext.h:636
IMGUI_API void ClearActiveID()
Definition: imgui.cpp:2137
ImGuiNavForward
Definition: imgui_internal.h:325
Definition: imgui_internal.h:214
int LastFrameActive
Definition: imgui_internal.h:976
ImVec2 CursorMaxPos
Definition: imgui_internal.h:853
ImVec2 Min
Definition: imgui_internal.h:336
Definition: imgui_internal.h:594
Definition: imgui_internal.h:473
IMGUI_API const char * ImParseFormatFindStart(const char *format)
Definition: imgui.cpp:8737
ImFontAtlas * Fonts
Definition: imgui.h:1056
bool IsBeingResized
Definition: imgui_internal.h:488
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect &bb_rel, ImGuiNavMoveFlags move_flags)
Definition: imgui.cpp:5113
ImGuiID NavInputId
Definition: imgui_internal.h:647
Definition: imgui.h:1742
ImGuiWindow * HoveredWindow
Definition: imgui_internal.h:615
ImGuiID DragDropAcceptIdCurr
Definition: imgui_internal.h:693
bool Overlaps(const ImRect &r) const
Definition: imgui_internal.h:354
float BackupCurrentLineHeight
Definition: imgui_internal.h:392
bool NavDisableMouseHover
Definition: imgui_internal.h:663
Definition: imgui_internal.h:843
int FrameCount
Definition: imgui_internal.h:606
ImVector< unsigned char > DragDropPayloadBufHeap
Definition: imgui_internal.h:696
float Width
Definition: imgui_internal.h:404
IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags)
Definition: imgui.cpp:5040
bool CollapsedVal
Definition: imgui_internal.h:567
Definition: imgui_internal.h:530
int OpenFrameCount
Definition: imgui_internal.h:467
void Add(const ImVec2 &p)
Definition: imgui_internal.h:355
float GroupOffsetX
Definition: imgui_internal.h:889
IMGUI_API bool IsClippedEx(const ImRect &bb, ImGuiID id, bool clip_even_when_logged)
Definition: imgui.cpp:2576
int ImGuiButtonFlags
Definition: imgui_internal.h:58
bool NavAnyRequest
Definition: imgui_internal.h:664
const HANDLE const LPVOID const DWORD UINT count
Definition: wglext.h:590
Definition: imgui_internal.h:294
ImGuiStyleVar VarIdx
Definition: imgui_internal.h:378
ImGuiWindow * GetCurrentWindowRead()
Definition: imgui_internal.h:1046
int ImGuiItemStatusFlags
Definition: imgui_internal.h:60
ImVector< ImGuiPopupRef > CurrentPopupStack
Definition: imgui_internal.h:636
ImVec2 ScrollTarget
Definition: imgui_internal.h:943
float y
Definition: imgui.h:135
float x
Definition: imgui.h:123
ImGuiCond SetWindowSizeAllowFlags
Definition: imgui_internal.h:965
int BeginOrderWithinParent
Definition: imgui_internal.h:955
ImGuiID NavNextActivateId
Definition: imgui_internal.h:650
ImGuiInputSource ActiveIdSource
Definition: imgui_internal.h:630
int Count
Definition: imgui_internal.h:490
ImGuiID NavJustMovedToId
Definition: imgui_internal.h:649
IMGUI_API bool InputScalarAsWidgetReplacement(const ImRect &bb, ImGuiID id, const char *label, ImGuiDataType data_type, void *data_ptr, const char *format)
Definition: imgui.cpp:8706
Definition: imgui_internal.h:414
ImGuiWindowSettings()
Definition: imgui_internal.h:446
IMGUI_API int ImFormatStringV(char *buf, size_t buf_size, const char *fmt, va_list args) IM_FMTLIST(3)
Definition: imgui.cpp:1142
#define IM_NEW(_TYPE)
Definition: imgui.h:1266
float NavWindowingHighlightAlpha
Definition: imgui_internal.h:656
ImGuiCond BgAlphaCond
Definition: imgui_internal.h:562
ImGuiID PopupId
Definition: imgui_internal.h:464