Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

imgui.internal (C++)

Dear ImGui’s internal API (imgui_internal.h): the functions and structures that the widgets are built with.

The C++ API of Dear ImGui as it is bound to Python: the entries of the module imgui_bundle.imgui.internal, in the same order, with their C++ signatures and the headers’ comments. From the stubs: the functions excluded from the bindings, the typedefs and the macros are absent.

imgui_internal.h

Generic helpers

ImGui::ImHashData

IMGUI_API ImGuiID ImHashData(const void* data, size_t data_size, ImGuiID seed = 0);

Note that the ImXXX helpers functions are lower-level than ImGui functions.
ImGui functions or the ImGui context are never called/used from other ImXXX functions.

ImGui::ImHashStr

IMGUI_API ImGuiID ImHashStr(const char* data, size_t data_size = 0, ImGuiID seed = 0);

ImGui::ImHashSkipUncontributingPrefix

IMGUI_API const char* ImHashSkipUncontributingPrefix(const char* label);

Helpers: Sorting

ImGui::ImAlphaBlendColors

IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b);

Helpers: Color Blending

Helpers: Bit manipulation

ImGui::ImIsPowerOfTwo

inline bool ImIsPowerOfTwo(int v);
inline bool ImIsPowerOfTwo(ImU64 v);

(private API)

ImGui::ImUpperPowerOfTwo

inline int ImUpperPowerOfTwo(int v);

(private API)

ImGui::ImCountSetBits

inline unsigned int ImCountSetBits(unsigned int v);

(private API)

Helpers: String

ImGui::ImMemdup

IMGUI_API void* ImMemdup(const void* src, size_t size);

Duplicate a chunk of memory.

ImGui::ImCharIsBlankW

inline bool ImCharIsBlankW(unsigned int c);

(private API)

Helpers: UTF-8 <> wchar conversions

ImGui::ImTextFindPreviousUtf8Codepoint

IMGUI_API const char* ImTextFindPreviousUtf8Codepoint(const char* in_text_start, const char* in_p);

return previous UTF-8 code-point.

ImGui::ImTextFindValidUtf8CodepointEnd

IMGUI_API const char* ImTextFindValidUtf8CodepointEnd(const char* in_text_start, const char* in_text_end, const char* in_p);

return previous UTF-8 code-point if ‘in_p’ is not the end of a valid one.

ImGui::ImTextCountLines

IMGUI_API int ImTextCountLines(const char* in_text, const char* in_text_end);

return number of lines taken by text. trailing carriage return doesn’t count as an extra line.

ImDrawTextFlags_ (enum)

Helpers: High-level text functions (DO NOT USE!!! THIS IS A MINIMAL SUBSET OF LARGER UPCOMING CHANGES)

MemberValue
ImDrawTextFlags_None = 00
ImDrawTextFlags_CpuFineClip = 1 << 01 << 0Must be == 1/True for legacy with ‘bool cpu_fine_clip’ arg to RenderText()
ImDrawTextFlags_WrapKeepBlanks = 1 << 11 << 1
ImDrawTextFlags_StopOnNewLine = 1 << 2, }1 << 2

ImGui::ImFontCalcWordWrapPositionEx

IMGUI_API const char* ImFontCalcWordWrapPositionEx(ImFont* font, float size, const char* text, const char* text_end, float wrap_width, ImDrawTextFlags flags = 0);

ImGui::ImTextCalcWordWrapNextLineStart

IMGUI_API const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_end, ImDrawTextFlags flags = 0);

trim trailing space and find beginning of next line

ImWcharClass (enum)

Character classification for word-wrapping logic

MemberValue
ImWcharClass_Blank0
ImWcharClass_Punct1
ImWcharClass_Other2

ImGui::ImTextInitClassifiers

IMGUI_API void ImTextInitClassifiers();

ImGui::ImTextClassifierClear

IMGUI_API void ImTextClassifierClear(ImU32* bits, unsigned int codepoint_min, unsigned int codepoint_end, ImWcharClass char_class);

ImGui::ImTextClassifierSetCharClass

IMGUI_API void ImTextClassifierSetCharClass(ImU32* bits, unsigned int codepoint_min, unsigned int codepoint_end, ImWcharClass char_class, unsigned int c);

Helpers: File System

ImGui::ImMin

inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs);

(private API)

ImGui::ImMax

inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs);

(private API)

ImGui::ImClamp

inline ImVec2 ImClamp(const ImVec2& v, const ImVec2&mn, const ImVec2&mx);

(private API)

ImGui::ImLerp

inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t);
inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t);
inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t);

(private API)

ImGui::ImSaturate

inline float ImSaturate(float f);

(private API)

ImGui::ImLengthSqr

inline float ImLengthSqr(const ImVec2& lhs);
inline float ImLengthSqr(const ImVec4& lhs);

(private API)

ImGui::ImInvLength

inline float ImInvLength(const ImVec2& lhs, float fail_value);

(private API)

ImGui::ImTrunc

inline float ImTrunc(float f);
inline ImVec2 ImTrunc(const ImVec2& v);

(private API)

ImGui::ImFloor

inline float ImFloor(float f);
inline ImVec2 ImFloor(const ImVec2& v);

(private API)

Decent replacement for floorf()

ImGui::ImTrunc64

inline float ImTrunc64(float f);

(private API)

ImGui::ImRound64

inline float ImRound64(float f);

(private API)

FIXME: Positive values only.

ImGui::ImCeilFast

inline float ImCeilFast(float f);

(private API)

Consider using the the bit-hack version (search for “0x1p120f”).

ImGui::ImModPositive

inline int ImModPositive(int a, int b);

(private API)

ImGui::ImDot

inline float ImDot(const ImVec2& a, const ImVec2& b);

(private API)

ImGui::ImRotate

inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a);

(private API)

ImGui::ImLinearSweep

inline float ImLinearSweep(float current, float target, float speed);

(private API)

ImGui::ImLinearRemapClamp

inline float ImLinearRemapClamp(float s0, float s1, float d0, float d1, float x);

(private API)

ImGui::ImMul

inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs);

(private API)

ImGui::ImIsFloatAboveGuaranteedIntegerPrecision

inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f);

(private API)

ImGui::ImExponentialMovingAverage

inline float ImExponentialMovingAverage(float avg, float sample, int n);

(private API)

Helpers: Geometry

ImGui::ImBezierCubicCalc

IMGUI_API ImVec2 ImBezierCubicCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, float t);

ImGui::ImBezierCubicClosestPoint

IMGUI_API ImVec2 ImBezierCubicClosestPoint(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, int num_segments);

For curves with explicit number of segments

ImGui::ImBezierCubicClosestPointCasteljau

IMGUI_API ImVec2 ImBezierCubicClosestPointCasteljau(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, float max_error);

For auto-tessellated curves you can use max_error = style.CurveTessellationMaxError

ImGui::ImBezierQuadraticCalc

IMGUI_API ImVec2 ImBezierQuadraticCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, float t);

ImGui::ImLineClosestPoint

IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p);

ImGui::ImTriangleContainsPoint

IMGUI_API bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);

ImGui::ImTriangleClosestPoint

IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p);

ImGui::ImTriangleBarycentricCoords

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);

ImGui::ImTriangleArea

inline float ImTriangleArea(const ImVec2& a, const ImVec2& b, const ImVec2& c);

(private API)

ImGui::ImTriangleIsClockwise

inline bool ImTriangleIsClockwise(const ImVec2& a, const ImVec2& b, const ImVec2& c);

(private API)

ImVec1 (struct)

Member
float x;
ImVec1::ImVec1
constexpr inline ImVec1() : x(0.0f);
constexpr inline ImVec1(float _x) : x(_x);

ImVec2i (struct)

Helper: ImVec2i (2D vector, integer)

Member
int x,
y;
ImVec2i::ImVec2i
constexpr inline ImVec2i() : x(0), y(0);
constexpr inline ImVec2i(int _x, int _y) : x(_x), y(_y);

ImVec2ih (struct)

Helper: ImVec2ih (2D vector, half-size integer, for long-term packed storage)

Member
short x,
y;
ImVec2ih::ImVec2ih
constexpr inline ImVec2ih() : x(0), y(0);
constexpr inline ImVec2ih(short _x, short _y) : x(_x), y(_y);
constexpr inline explicit ImVec2ih(const ImVec2& rhs) : x((short)rhs.x), y((short)rhs.y);

ImRect (struct)

Helper: ImRect (2D axis aligned bounding-box)
NB: we can’t rely on ImVec2 math operators being available here!

Member
ImVec2 Min;Upper-left
ImVec2 Max;Lower-right
ImRect::ImRect
constexpr inline ImRect() : Min(0.0f, 0.0f), Max(0.0f, 0.0f);
constexpr inline ImRect(const ImVec2& min, const ImVec2& max) : Min(min), Max(max);
constexpr inline ImRect(const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w);
constexpr inline ImRect(float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2);
ImRect::GetCenter
ImVec2 GetCenter() const;

(private API)

ImRect::GetSize
ImVec2 GetSize() const;

(private API)

ImRect::GetWidth
float GetWidth() const;

(private API)

ImRect::GetHeight
float GetHeight() const;

(private API)

ImRect::GetArea
float GetArea() const;

(private API)

ImRect::GetTL
ImVec2 GetTL() const;

(private API)

Top-left

ImRect::GetTR
ImVec2 GetTR() const;

(private API)

Top-right

ImRect::GetBL
ImVec2 GetBL() const;

(private API)

Bottom-left

ImRect::GetBR
ImVec2 GetBR() const;

(private API)

Bottom-right

ImRect::Contains
bool Contains(const ImVec2& p) const;
bool Contains(const ImRect& r) const;

(private API)

ImRect::ContainsWithPad
bool ContainsWithPad(const ImVec2& p, const ImVec2& pad) const;

(private API)

ImRect::Overlaps
bool Overlaps(const ImRect& r) const;

(private API)

ImRect::Add
void Add(const ImVec2& p);
void Add(const ImRect& r);

(private API)

ImRect::AddX
void AddX(float x);

(private API)

ImRect::AddY
void AddY(float y);

(private API)

ImRect::Expand
void Expand(const float amount);
void Expand(const ImVec2& amount);

(private API)

ImRect::Translate
void Translate(const ImVec2& d);

(private API)

ImRect::TranslateX
void TranslateX(float dx);

(private API)

ImRect::TranslateY
void TranslateY(float dy);

(private API)

ImRect::ClipWith
void ClipWith(const ImRect& r);

(private API)

Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display.

ImRect::ClipWithFull
void ClipWithFull(const ImRect& r);

(private API)

Full version, ensure both points are fully clipped.

ImRect::IsInverted
bool IsInverted() const;

(private API)

ImRect::ToVec4
ImVec4 ToVec4() const;

(private API)

ImRect::AsVec4
const ImVec4& AsVec4() const;

(private API)

Helper: ImBitArray

ImGui::ImBitArrayGetStorageSizeInBytes

inline size_t ImBitArrayGetStorageSizeInBytes(int bitcount);

(private API)

ImGui::ImBitArrayClearAllBits

inline void ImBitArrayClearAllBits(ImU32* arr, int bitcount);

(private API)

ImGui::ImBitArrayTestBit

inline bool ImBitArrayTestBit(const ImU32* arr, int n);

(private API)

ImGui::ImBitArrayClearBit

inline void ImBitArrayClearBit(ImU32* arr, int n);

(private API)

ImGui::ImBitArraySetBit

inline void ImBitArraySetBit(ImU32* arr, int n);

(private API)

ImGui::ImBitArraySetBitRange

inline void ImBitArraySetBitRange(ImU32* arr, int n, int n2) // Works on range [n..n2);

(private API)

// Works on range [n..n2)

ImBitVector (struct)

Helper: ImBitVector
Store 1-bit per value.

Member
ImVector<ImU32> Storage;
ImBitVector::Create
void Create(int sz);

(private API)

ImBitVector::Clear
void Clear();

(private API)

ImBitVector::TestBit
bool TestBit(int n) const;

(private API)

ImBitVector::SetBit
void SetBit(int n);

(private API)

ImBitVector::ClearBit
void ClearBit(int n);

(private API)

TextIndex (struct)

Helper: ImGuiTextIndex
Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API.

Member
ImVector<int> Offsets;
int EndOffset = 0;Because we don’t own text buffer we need to maintain EndOffset (may bake in LineOffsets?)
TextIndex::clear
void clear();

(private API)

TextIndex::size
int size();

(private API)

TextIndex::get_line_begin
const char* get_line_begin(const char* base, int n);

(private API)

TextIndex::get_line_end
const char* get_line_end(const char* base, int n);

(private API)

TextIndex::append
void append(const char* base, int old_size, int new_size);

(private API)

PackedDate (struct)

Helper: ImGuiPackedDate (sizeof() == 2)
Store a date in a way that is efficient to read/write in text form. If we stored e.g. number of days since Epoch we’d need costlier back and forth.
This is specifically designed to be able to prune old .ini data.

PackedDate::ImGuiPackedDate
ImGuiPackedDate();
ImGuiPackedDate(int yyyymmdd);

Pack

PackedDate::IsValid
bool IsValid();

(private API)

PackedDate::Unpack
int Unpack() const;

(private API)

Unpack

PackedDate::SubtractMonths
void SubtractMonths(int m);

(private API)

FIXME-OPT: Stupid but enough for what we do with it.

ImGui::ImLowerBound

IMGUI_API ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_end, ImGuiID key);

Helper: ImGuiStorage

ImDrawList support

ImDrawListSharedData (struct)

Data shared between all ImDrawList instances
Conceptually this could have been called e.g. ImDrawListSharedContext
Typically one ImGui context would create and maintain one of this.
You may want to create your own instance of you try to ImDrawList completely without ImGui. In that case, watch out for future changes to this structure.

Member
ImVec2 TexUvWhitePixel;UV of white pixel in the atlas (== FontAtlas->TexUvWhitePixel)
const ImVec4* TexUvLines;UV of anti-aliased lines in the atlas (== FontAtlas->TexUvLines) # (const)
ImFontAtlas* FontAtlas;Current font atlas
ImFont* Font;Current font (used for simplified AddText overload)
float FontSize;Current font size (used for for simplified AddText overload)
float FontScale;Current font scale (== FontSize / Font->FontSize)
float CurveTessellationMaxError;Tessellation tolerance when using PathBezierCurveTo()
float CircleTessellationMaxError;Number of circle segments to use per pixel of radius for AddCircle() etc
ImDrawListFlags InitialFlags;Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)
ImVec4 ClipRectFullscreen;Value for PushClipRectFullscreen()
ImVector<ImVec2> TempBuffer;Temporary write buffer
ImVector<ImDrawList*> DrawLists;All draw lists associated to this ImDrawListSharedData
ImGuiContext* Context;[OPTIONAL] Link to Dear ImGui context. 99% of ImDrawList/ImFontAtlas can function without an ImGui context, but this facilitate handling one legacy edge case.
float ArcFastRadiusCutoff;Cutoff radius after which arc drawing will fallback to slower PathArcTo()
ImU8 CircleSegmentCounts[64];ndarray[type=ImU8, size=64] # Precomputed segment count for given radius before we calculate it dynamically (to avoid calculation overhead)
ImDrawListSharedData::ImDrawListSharedData
ImDrawListSharedData();
ImDrawListSharedData::SetCircleTessellationMaxError
void SetCircleTessellationMaxError(float max_error);

(private API)

ImDrawDataBuilder (struct)

Member
ImVector<ImDrawList*> LayerData1;
ImDrawDataBuilder::ImDrawDataBuilder
ImDrawDataBuilder();

ImFontStackData (struct)

Member
ImFont* Font;
float FontSizeBeforeScaling;~~ style.FontSizeBase
float FontSizeAfterScaling;~~ g.FontSize

Style support

StyleVarInfo (struct)

StyleVarInfo::GetVarPtr
void* GetVarPtr(void* parent) const;

(private API)

ColorMod (struct)

Stacked color modifier, backup of modified data so we can restore it

Member
ImGuiCol Col;
ImVec4 BackupValue;

StyleMod (struct)

Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the variable.

Member
ImGuiStyleVar VarIdx;
StyleMod::ImGuiStyleMod
ImGuiStyleMod(ImGuiStyleVar idx, int v);
ImGuiStyleMod(ImGuiStyleVar idx, float v);
ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v);

Data types support

DataTypeStorage (struct)

Member
ImU8 Data[8];ndarray[type=ImU8, size=8] # Opaque storage to fit any data up to ImGuiDataType_COUNT

DataTypeInfo (struct)

Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo().

Member
size_t Size;Size in bytes
const char* Name;Short descriptive name for the type, for debugging # (const)
const char* PrintFmt;Default printf format for the type # (const)
const char* ScanFmt;Default scanf format for the type # (const)

DataTypePrivate_ (enum)

Extend ImGuiDataType_

MemberValue
ImGuiDataType_Pointer = ImGuiDataType_COUNTDataType_COUNT
ImGuiDataType_ID, }

Widgets support: flags, enums, data structures

ItemFlagsPrivate_ (enum)

Extend ImGuiItemFlags

MemberValue
ImGuiItemFlags_ReadOnly = 1 << 111 << 11False // [ALPHA] Allow hovering interactions but underlying value is not changed.
ImGuiItemFlags_NoWindowHoverableCheck = 1 << 131 << 13False // Disable hoverable check in ItemHoverable()
ImGuiItemFlags_AllowOverlap = 1 << 141 << 14False // Allow being overlapped by another widget. Not-hovered to Hovered transition deferred by a frame.
ImGuiItemFlags_NoNavDisableMouseHover = 1 << 151 << 15False // Nav keyboard/gamepad mode doesn’t disable hover highlight (behave as if NavHighlightItemUnderNav==False).
ImGuiItemFlags_NoMarkEdited = 1 << 161 << 16False // Skip calling MarkItemEdited()
ImGuiItemFlags_NoFocus = 1 << 171 << 17False // [EXPERIMENTAL: Not very well specced] Clicking doesn’t take focus. Automatically sets ImGuiButtonFlags_NoFocus + ImGuiButtonFlags_NoNavFocus in ButtonBehavior().
ImGuiItemFlags_Inputable = 1 << 201 << 20False // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
ImGuiItemFlags_HasSelectionUserData = 1 << 211 << 21False // Set by SetNextItemSelectionUserData()
ImGuiItemFlags_IsMultiSelect = 1 << 221 << 22False // Set by SetNextItemSelectionUserData()
ImGuiItemFlags_Default_ = ImGuiItemFlags_AutoClosePopups | ImGuiItemFlags_LiveEditOnInputTextItemFlags_AutoClosePopups | ItemFlags_LiveEditOnInputTextPlease don’t change, use PushItemFlag() instead.

Obsolete

ImGuiItemFlags_SelectableDontClosePopup = !ImGuiItemFlags_AutoClosePopups, // Can’t have a redirect as we inverted the behavior

ItemStatusFlags_ (enum)

Status flags for an already submitted item

MemberValue
ImGuiItemStatusFlags_None = 00
ImGuiItemStatusFlags_HoveredRect = 1 << 01 << 0Mouse position is within item rectangle (does NOT mean that the window is in correct z-order and can be hovered!, this is only one part of the most-common IsItemHovered test)
ImGuiItemStatusFlags_HasDisplayRect = 1 << 11 << 1g.LastItemData.DisplayRect is valid
ImGuiItemStatusFlags_Edited = 1 << 21 << 2Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
ImGuiItemStatusFlags_ToggledSelection = 1 << 31 << 3Set when Selectable(), TreeNode() reports toggling a selection. We can’t report “Selected”, only state changes, in order to easily handle clipping with less issues.
ImGuiItemStatusFlags_ToggledOpen = 1 << 41 << 4Set when TreeNode() reports toggling their open state.
ImGuiItemStatusFlags_HasDeactivated = 1 << 51 << 5Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
ImGuiItemStatusFlags_Deactivated = 1 << 61 << 6Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
ImGuiItemStatusFlags_HoveredWindow = 1 << 71 << 7Override the HoveredWindow test to allow cross-window hover testing.
ImGuiItemStatusFlags_Visible = 1 << 81 << 8[WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don’t use yet: API/system will change as we refactor Itemadd()).
ImGuiItemStatusFlags_HasClipRect = 1 << 91 << 9g.LastItemData.ClipRect is valid.
ImGuiItemStatusFlags_HasShortcut = 1 << 101 << 10g.LastItemData.Shortcut valid. Set by SetNextItemShortcut() -> ItemAdd().
ImGuiItemStatusFlags_EditedInternal = 1 << 111 << 11Similar to ImGuiItemStatusFlags_Edited but bypassing ImGuiItemFlags_NoMarkEdited.

Additional status + semantic for ImGuiTestEngine

HoveredFlagsPrivate_ (enum)

Extend ImGuiHoveredFlags_

MemberValue
ImGuiHoveredFlags_DelayMask_ = ImGuiHoveredFlags_DelayNone | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_DelayNormal | ImGuiHoveredFlags_NoSharedDelayHoveredFlags_DelayNone | HoveredFlags_DelayShort | HoveredFlags_DelayNormal | HoveredFlags_NoSharedDelay
ImGuiHoveredFlags_AllowedMaskForIsWindowHovered = ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_AnyWindow | ImGuiHoveredFlags_NoPopupHierarchy | ImGuiHoveredFlags_DockHierarchy | ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_StationaryHoveredFlags_ChildWindows | HoveredFlags_RootWindow | HoveredFlags_AnyWindow | HoveredFlags_NoPopupHierarchy | HoveredFlags_DockHierarchy | HoveredFlags_AllowWhenBlockedByPopup | HoveredFlags_AllowWhenBlockedByActiveItem | HoveredFlags_ForTooltip | HoveredFlags_Stationary
ImGuiHoveredFlags_AllowedMaskForIsItemHovered = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped | ImGuiHoveredFlags_AllowWhenDisabled | ImGuiHoveredFlags_NoNavOverride | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayMask_, }HoveredFlags_AllowWhenBlockedByPopup | HoveredFlags_AllowWhenBlockedByActiveItem | HoveredFlags_AllowWhenOverlapped | HoveredFlags_AllowWhenDisabled | HoveredFlags_NoNavOverride | HoveredFlags_ForTooltip | HoveredFlags_Stationary | HoveredFlags_DelayMask_

InputTextFlagsPrivate_ (enum)

Extend ImGuiInputTextFlags_

MemberValue
ImGuiInputTextFlags_Multiline = 1 << 261 << 26For internal use by InputTextMultiline()
ImGuiInputTextFlags_TempInput = 1 << 271 << 27For internal use by TempInputText(), will skip calling ItemAdd(). Require bounding-box to strictly match.
ImGuiInputTextFlags_LocalizeDecimalPoint= 1 << 281 << 28For internal use by InputScalar() and TempInputScalar()

ButtonFlagsPrivate_ (enum)

Extend ImGuiButtonFlags_

MemberValue
ImGuiButtonFlags_PressedOnClick = 1 << 41 << 4return True on click (mouse down event)
ImGuiButtonFlags_PressedOnClickRelease = 1 << 51 << 5[Default] return True on click + release on same item <-- this is what the majority of Button are using
ImGuiButtonFlags_PressedOnClickReleaseAnywhere = 1 << 61 << 6return True on click + release even if the release event is not done while hovering the item
ImGuiButtonFlags_PressedOnRelease = 1 << 71 << 7return True on release (default requires click+release). Prior to 2026/03/20 this implied ImGuiButtonFlags_NoHoldingActiveId but they are separate now.
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 81 << 8return True on double-click (default requires click+release)
ImGuiButtonFlags_PressedOnDragDropHold = 1 << 91 << 9return True when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_FlattenChildren = 1 << 111 << 11allow interactions even if a child window is overlapping
ImGuiButtonFlags_AlignTextBaseLine = 1 << 151 << 15vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_NoKeyModsAllowed = 1 << 161 << 16disable mouse interaction if a key modifier is held
ImGuiButtonFlags_NoHoldingActiveId = 1 << 171 << 17don’t set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_NoNavFocus = 1 << 181 << 18don’t override navigation focus when activated (FIXME: this is essentially used every time an item uses ImGuiItemFlags_NoNav, but because legacy specs don’t requires LastItemData to be set ButtonBehavior(), we can’t poll g.LastItemData.ItemFlags)
ImGuiButtonFlags_NoHoveredOnFocus = 1 << 191 << 19don’t report as hovered when nav focus is on this item
ImGuiButtonFlags_NoSetKeyOwner = 1 << 201 << 20don’t set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
ImGuiButtonFlags_NoTestKeyOwner = 1 << 211 << 21don’t test key/input owner when polling the key (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
ImGuiButtonFlags_NoFocus = 1 << 221 << 22[EXPERIMENTAL: Not very well specced]. Don’t focus parent window when clicking.
ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHoldButtonFlags_PressedOnClick | ButtonFlags_PressedOnClickRelease | ButtonFlags_PressedOnClickReleaseAnywhere | ButtonFlags_PressedOnRelease | ButtonFlags_PressedOnDoubleClick | ButtonFlags_PressedOnDragDropHold
ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickReleaseButtonFlags_PressedOnClickRelease

SliderFlagsPrivate_ (enum)

Extend ImGuiSliderFlags_

MemberValue
ImGuiSliderFlags_Vertical = 1 << 201 << 20Should this slider be orientated vertically?
ImGuiSliderFlags_ReadOnly = 1 << 211 << 21Consider using g.NextItemData.ItemFlags |= ImGuiItemFlags_ReadOnly instead.

SelectableFlagsPrivate_ (enum)

Extend ImGuiSelectableFlags_

MemberValue
ImGuiSelectableFlags_NoHoldingActiveID = 1 << 201 << 20
ImGuiSelectableFlags_SelectOnClick = 1 << 221 << 22Override button behavior to react on Click (default is Click+Release)
ImGuiSelectableFlags_SelectOnRelease = 1 << 231 << 23Override button behavior to react on Release (default is Click+Release)
ImGuiSelectableFlags_SpanAvailWidth = 1 << 241 << 24Span all avail width even if we declared less for layout purpose. FIXME: We may be able to remove this (added in 6251d379, 2bcafc86 for menus)
ImGuiSelectableFlags_SetNavIdOnHover = 1 << 251 << 25Set Nav/Focus ID on mouse hover (used by MenuItem)
ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 261 << 26Disable padding each side with ItemSpacing * 0.5
ImGuiSelectableFlags_NoSetKeyOwner = 1 << 271 << 27Don’t set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)

TreeNodeFlagsPrivate_ (enum)

Extend ImGuiTreeNodeFlags_

MemberValue
ImGuiTreeNodeFlags_NoNavFocus = 1 << 271 << 27Don’t claim nav focus when interacting with this item (#8551)
ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 281 << 28FIXME-WIP: Hard-coded for CollapsingHeader()
ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 291 << 29FIXME-WIP: Turn Down arrow into an Up arrow, for reversed trees (#6517)
ImGuiTreeNodeFlags_OpenOnMask_ = ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrowTreeNodeFlags_OpenOnDoubleClick | TreeNodeFlags_OpenOnArrow
ImGuiTreeNodeFlags_DrawLinesMask_ = ImGuiTreeNodeFlags_DrawLinesNone | ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes, }TreeNodeFlags_DrawLinesNone | TreeNodeFlags_DrawLinesFull | TreeNodeFlags_DrawLinesToNodes

SeparatorFlags_ (enum)

MemberValue
ImGuiSeparatorFlags_None = 00
ImGuiSeparatorFlags_Horizontal = 1 << 01 << 0Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar
ImGuiSeparatorFlags_Vertical = 1 << 11 << 1
ImGuiSeparatorFlags_SpanAllColumns = 1 << 21 << 2Make separator cover all columns of a legacy Columns() set.

FocusRequestFlags_ (enum)

Flags for FocusWindow(). This is not called ImGuiFocusFlags to avoid confusion with public-facing ImGuiFocusedFlags.
FIXME: Once we finishing replacing more uses of GetTopMostPopupModal()+IsWindowWithinBeginStackOf() and FindBlockingModal() with this, we may want to change the flag to be opt-out instead of opt-in.

MemberValue
ImGuiFocusRequestFlags_None = 00
ImGuiFocusRequestFlags_RestoreFocusedChild = 1 << 01 << 0Find last focused child (if any) and focus it instead.
ImGuiFocusRequestFlags_UnlessBelowModal = 1 << 11 << 1Do not set focus if the window is below a modal.

TextFlags_ (enum)

MemberValue
ImGuiTextFlags_None = 00
ImGuiTextFlags_NoWidthForLargeClippedText = 1 << 0, }1 << 0

TooltipFlags_ (enum)

MemberValue
ImGuiTooltipFlags_None = 00
ImGuiTooltipFlags_OverridePrevious = 1 << 11 << 1Clear/ignore previously submitted tooltip (defaults to append)

LayoutType_ (enum)

FIXME: this is in development, not exposed/functional as a generic feature yet.
Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2

MemberValue
ImGuiLayoutType_Horizontal = 00
ImGuiLayoutType_Vertical = 11

LogFlags_ (enum)

Flags for LogBegin() text capturing function

MemberValue
ImGuiLogFlags_None = 00
ImGuiLogFlags_OutputTTY = 1 << 01 << 0
ImGuiLogFlags_OutputFile = 1 << 11 << 1
ImGuiLogFlags_OutputBuffer = 1 << 21 << 2
ImGuiLogFlags_OutputClipboard = 1 << 31 << 3
ImGuiLogFlags_OutputMask_ = ImGuiLogFlags_OutputTTY | ImGuiLogFlags_OutputFile | ImGuiLogFlags_OutputBuffer | ImGuiLogFlags_OutputClipboard, }LogFlags_OutputTTY | LogFlags_OutputFile | LogFlags_OutputBuffer | LogFlags_OutputClipboard

Axis (enum)

X/Y enums are fixed to 0/1 so they may be used to index ImVec2

MemberValue
ImGuiAxis_None = -1-1
ImGuiAxis_X = 00
ImGuiAxis_Y = 11

PlotType (enum)

MemberValue
ImGuiPlotType_Lines0
ImGuiPlotType_Histogram, }1

ComboPreviewData (struct)

Storage data for BeginComboPreview()/EndComboPreview()

Member
ImRect PreviewRect;
ImVec2 BackupCursorPos;
ImVec2 BackupCursorMaxPos;
ImVec2 BackupCursorPosPrevLine;
float BackupPrevLineTextBaseOffset;
float BackupWorkRectMaxX;
float BackupContentRectMaxX;
ComboPreviewData::ImGuiComboPreviewData
ImGuiComboPreviewData();

GroupData (struct)

Stacked storage data for BeginGroup()/EndGroup()

Member
ImGuiID WindowID;
ImVec2 BackupCursorPos;
ImVec2 BackupCursorMaxPos;
ImVec2 BackupCursorPosPrevLine;
ImVec1 BackupIndent;
ImVec1 BackupGroupOffset;
ImVec2 BackupCurrLineSize;
float BackupCurrLineTextBaseOffset;
ImGuiID BackupActiveIdIsAlive;
bool BackupAnyIdHasBeenEditedThisFrame;
bool BackupDeactivatedIdIsAlive;
bool BackupHoveredIdIsAlive;
bool BackupIsSameLine;
bool EmitItem;

MenuColumns (struct)

Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper.

Member
ImU32 TotalWidth;
ImU32 NextTotalWidth;
ImU16 Spacing;
ImU16 OffsetIcon;Always zero for now
ImU16 OffsetLabel;Offsets are locked in Update()
ImU16 OffsetShortcut;
ImU16 OffsetMark;
ImU16 Widths[4];ndarray[type=ImU16, size=4] # Width of: Icon, Label, Shortcut, Mark (accumulators for current frame)
MenuColumns::ImGuiMenuColumns
ImGuiMenuColumns();
MenuColumns::Update
void Update(float spacing, bool window_reappearing);

(private API)

MenuColumns::DeclColumns
float DeclColumns(float w_icon, float w_label, float w_shortcut, float w_mark);

(private API)

MenuColumns::CalcNextTotalWidth
void CalcNextTotalWidth(bool update_offsets);

(private API)

InputTextDeactivatedState (struct)

Internal temporary state for deactivating InputText() instances.
Store as part of ImGuiDeactivatedItemData?

Member
ImGuiID ID;widget id owning the text state (which just got deactivated)
int ElapseFrame;
ImVector<char> TextA;text buffer
InputTextDeactivatedState::ImGuiInputTextDeactivatedState
ImGuiInputTextDeactivatedState();
InputTextDeactivatedState::ClearFreeMemory
void ClearFreeMemory();

(private API)

InputTextState (struct)

Internal state of the currently focused/edited text input box
For a given item ID, access with ImGui::GetInputTextState()

Member
ImGuiContext* Ctx;parent UI context (needs to be set explicitly by parent).
ImGuiInputTextFlags Flags;copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.
ImGuiID ID;widget id owning the text state
int TextLen;UTF-8 length of the string in TextA (in bytes)
const char* TextSrc;== TextA.Data unless read-only, in which case == buf passed to InputText(). For _ReadOnly fields, pointer will be null outside the InputText() call. # (const)
ImVector<char> TextA;main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).
ImVector<char> TextToRevertTo;value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)
ImVector<char> CallbackTextBackup;temporary storage for callback to support automatic reconcile of undo-stack
int BufCapacity;end-user buffer capacity (include zero terminator)
ImVec2 Scroll;horizontal offset (managed manually) + vertical scrolling (pulled from child window’s own Scroll.y)
int LineCount;last line count (solely for debugging)
float WrapWidth;word-wrapping width
float CursorAnim;timer for cursor blink, reset on every user action so the cursor reappears immediately
bool CursorFollow;set when we want scrolling to follow the current cursor position (not always!)
bool CursorCenterY;set when we want scrolling to be centered over the cursor position (while resizing a word-wrapping field)
bool SelectedAllMouseLock;after a double-click to select all, we ignore further mouse drags to update selection
bool EditedBefore;edited since activated
bool EditedThisFrame;edited this frame
bool ValidatedThisFrame;
bool WantReloadUserBuf;force a reload of user buf so it may be modified externally. may be automatic in future version.
ImS8 LastMoveDirectionLR;ImGuiDir_Left or ImGuiDir_Right. track last movement direction so when cursor cross over a word-wrapping boundaries we can display it on either line depending on last move.s
int ReloadSelectionStart;
int ReloadSelectionEnd;
InputTextState::ImGuiInputTextState
ImGuiInputTextState();
InputTextState::ClearText
void ClearText();

(private API)

InputTextState::ClearFreeMemory
void ClearFreeMemory();

(private API)

InputTextState::OnKeyPressed
void OnKeyPressed(int key);

(private API)

Cannot be inline because we call in code in stb_textedit.h implementation

InputTextState::OnCharPressed
void OnCharPressed(unsigned int c);

(private API)

InputTextState::GetPreferredOffsetX
float GetPreferredOffsetX() const;

(private API)

InputTextState::GetText
const char* GetText();

(private API)

InputTextState::CursorAnimReset
void CursorAnimReset();

(private API)

InputTextState::CursorClamp
void CursorClamp();

(private API)

InputTextState::HasSelection
bool HasSelection() const;

(private API)

InputTextState::ClearSelection
void ClearSelection();

(private API)

InputTextState::GetCursorPos
int GetCursorPos() const;

(private API)

InputTextState::GetSelectionStart
int GetSelectionStart() const;

(private API)

InputTextState::GetSelectionEnd
int GetSelectionEnd() const;

(private API)

InputTextState::SetSelection
void SetSelection(int start, int end);

(private API)

InputTextState::SelectAll
void SelectAll();

(private API)

InputTextState::ReloadUserBufAndSelectAll
void ReloadUserBufAndSelectAll();

(private API)

InputTextState::ReloadUserBufAndKeepSelection
void ReloadUserBufAndKeepSelection();

(private API)

InputTextState::ReloadUserBufAndMoveToEnd
void ReloadUserBufAndMoveToEnd();

(private API)

WindowRefreshFlags_ (enum)

MemberValue
ImGuiWindowRefreshFlags_None = 00
ImGuiWindowRefreshFlags_TryToAvoidRefresh = 1 << 01 << 0[EXPERIMENTAL] Try to keep existing contents, USER MUST NOT HONOR BEGIN() RETURNING FALSE AND NOT APPEND.
ImGuiWindowRefreshFlags_RefreshOnHover = 1 << 11 << 1[EXPERIMENTAL] Always refresh on hover
ImGuiWindowRefreshFlags_RefreshOnFocus = 1 << 21 << 2[EXPERIMENTAL] Always refresh on focus

WindowBgClickFlags_ (enum)

MemberValue
ImGuiWindowBgClickFlags_None = 00
ImGuiWindowBgClickFlags_Move = 1 << 01 << 0Click on bg/None + drag to move window. Cleared by default when using io.ConfigWindowsMoveFromTitleBarOnly.

NextWindowDataFlags_ (enum)

MemberValue
ImGuiNextWindowDataFlags_None = 00
ImGuiNextWindowDataFlags_HasPos = 1 << 01 << 0
ImGuiNextWindowDataFlags_HasSize = 1 << 11 << 1
ImGuiNextWindowDataFlags_HasContentSize = 1 << 21 << 2
ImGuiNextWindowDataFlags_HasCollapsed = 1 << 31 << 3
ImGuiNextWindowDataFlags_HasSizeConstraint = 1 << 41 << 4
ImGuiNextWindowDataFlags_HasFocus = 1 << 51 << 5
ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 61 << 6
ImGuiNextWindowDataFlags_HasScroll = 1 << 71 << 7
ImGuiNextWindowDataFlags_HasWindowFlags = 1 << 81 << 8
ImGuiNextWindowDataFlags_HasChildFlags = 1 << 91 << 9
ImGuiNextWindowDataFlags_HasRefreshPolicy = 1 << 101 << 10
ImGuiNextWindowDataFlags_HasViewport = 1 << 111 << 11
ImGuiNextWindowDataFlags_HasDock = 1 << 121 << 12
ImGuiNextWindowDataFlags_HasWindowClass = 1 << 13, }1 << 13

NextWindowData (struct)

Storage for SetNexWindow** functions

Member
ImGuiNextWindowDataFlags HasFlags;
ImGuiCond PosCond;
ImGuiCond SizeCond;
ImGuiCond CollapsedCond;
ImGuiCond DockCond;
ImVec2 PosVal;
ImVec2 PosPivotVal;
ImVec2 SizeVal;
ImVec2 ContentSizeVal;
ImVec2 ScrollVal;
ImGuiWindowFlags WindowFlagsSet;Flags to set. Use SetNextWindowFlags()!
ImGuiWindowFlags WindowFlagsClear;
ImGuiChildFlags ChildFlagsSet;Flags to set. Use SetNextWindowChildFlags().
ImGuiChildFlags ChildFlagsClear;
bool PosUndock;
bool CollapsedVal;
ImRect SizeConstraintRect;
ImGuiSizeCallback SizeCallback;
void* SizeCallbackUserData;
float BgAlphaVal;Override background alpha
ImGuiID ViewportId;
ImGuiID DockId;
ImGuiWindowClass WindowClass;
ImVec2 MenuBarOffsetMinVal;(Always on) This is not exposed publicly, so we don’t clear it and it doesn’t have a corresponding flag (could we? for consistency?)
ImGuiWindowRefreshFlags RefreshFlagsVal;
NextWindowData::ImGuiNextWindowData
ImGuiNextWindowData();
NextWindowData::ClearFlags
inline void ClearFlags();

(private API)

NextItemDataFlags_ (enum)

MemberValue
ImGuiNextItemDataFlags_None = 00
ImGuiNextItemDataFlags_HasWidth = 1 << 01 << 0
ImGuiNextItemDataFlags_HasOpen = 1 << 11 << 1
ImGuiNextItemDataFlags_HasShortcut = 1 << 21 << 2
ImGuiNextItemDataFlags_HasRefVal = 1 << 31 << 3
ImGuiNextItemDataFlags_HasStorageID = 1 << 41 << 4
ImGuiNextItemDataFlags_HasColorMarker = 1 << 5, }1 << 5

NextItemData (struct)

Member
ImGuiNextItemDataFlags HasFlags;Called HasFlags instead of Flags to avoid mistaking this
ImGuiItemFlags ItemFlagsSet;Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData.
ImGuiID FocusScopeId;Set by SetNextItemSelectionUserData()
ImGuiSelectionUserData SelectionUserData;Set by SetNextItemSelectionUserData() (note that None/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
float Width;Set by SetNextItemWidth()
ImGuiKeyChord Shortcut;Set by SetNextItemShortcut()
ImGuiInputFlags ShortcutFlags;Set by SetNextItemShortcut()
bool OpenVal;Set by SetNextItemOpen()
ImU8 OpenCond;Set by SetNextItemOpen()
ImGuiDataTypeStorage RefVal;Not exposed yet, for ImGuiInputTextFlags_ParseEmptyAsRefVal
ImGuiID StorageId;Set by SetNextItemStorageID()
ImU32 ColorMarker;Set by SetNextItemColorMarker(). Not exposed yet, supported by DragScalar,SliderScalar and for ImGuiSliderFlags_ColorMarkers.
NextItemData::ImGuiNextItemData
ImGuiNextItemData();
NextItemData::ClearFlags
inline void ClearFlags();

(private API)

Also cleared manually by ItemAdd()!

LastItemData (struct)

Status storage for the last submitted item

Member
ImGuiID ID;
ImGuiItemFlags ItemFlags;See ImGuiItemFlags_ (called ‘InFlags’ before v1.91.4).
ImGuiItemStatusFlags StatusFlags;See ImGuiItemStatusFlags_
ImRect Rect;Full rectangle
ImRect NavRect;Navigation scoring rectangle (not displayed)
ImRect DisplayRect;Display rectangle. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasDisplayRect) is set.
ImRect ClipRect;Clip rectangle at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasClipRect) is set..
ImGuiKeyChord Shortcut;Shortcut at the time of submitting item. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasShortcut) is set..
LastItemData::ImGuiLastItemData
ImGuiLastItemData();

TreeNodeStackData (struct)

Store data emitted by TreeNode() for usage by TreePop()

Member
ImGuiID ID;
ImGuiTreeNodeFlags TreeFlags;
ImGuiItemFlags ItemFlags;Used for nav landing
ImRect NavRect;Used for nav landing
float DrawLinesX1;
float DrawLinesToNodesY2;
ImGuiTableColumnIdx DrawLinesTableColumn;

ErrorRecoveryState (struct)

sizeof() = 20

Member
short SizeOfWindowStack;
short SizeOfIDStack;
short SizeOfTreeStack;
short SizeOfColorStack;
short SizeOfStyleVarStack;
short SizeOfFontStack;
short SizeOfFocusScopeStack;
short SizeOfGroupStack;
short SizeOfItemFlagsStack;
short SizeOfBeginPopupStack;
short SizeOfDisabledStack;
ErrorRecoveryState::ImGuiErrorRecoveryState
ImGuiErrorRecoveryState();

WindowStackData (struct)

Storage for each window pushed into the stack.

Member
ImGuiWindow* Window;
ImGuiLastItemData ParentLastItemDataBackup;
ImGuiErrorRecoveryState StackSizesInBegin;Store size of various stacks for asserting
bool DisabledOverrideReenable;Non-child window override disabled flag
float DisabledOverrideReenableAlphaBackup;
ImRect ParentLastComboPreviewRect;

ShrinkWidthItem (struct)

Member
int Index;
float Width;
float InitialWidth;

PtrOrIndex (struct)

Member
void* Ptr;Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a pool.
int Index;Usually index in a main pool.
PtrOrIndex::ImGuiPtrOrIndex
ImGuiPtrOrIndex(void* ptr);
ImGuiPtrOrIndex(int index);

DeactivatedItemData (struct)

Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions
Also see ImGuiInputTextDeactivatedState which is an extension for this for InputText()

Member
ImGuiID ID;
int ElapseFrame;
bool HasBeenEditedBefore;
bool IsAlive;

PopupPositionPolicy (enum)

MemberValue
ImGuiPopupPositionPolicy_Default0
ImGuiPopupPositionPolicy_ComboBox1
ImGuiPopupPositionPolicy_Tooltip, }2

PopupData (struct)

Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack)

Member
ImGuiID PopupId;Set on OpenPopup()
ImGuiWindow* Window;Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup()
ImGuiWindow* RestoreNavWindow;Set on OpenPopup(), a NavWindow that will be restored on popup close
int ParentNavLayer;Resolved on BeginPopup(). Actually a ImGuiNavLayer type (declared down below), initialized to -1 which is not part of an enum, but serves well-enough as “not any of layers” value
int OpenFrameCount;Set on OpenPopup()
ImGuiID OpenParentId;Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu bar vs loose menu items)
ImVec2 OpenPopupPos;Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse)
ImVec2 OpenMousePos;Set on OpenPopup(), copy of mouse position at the time of opening popup
PopupData::ImGuiPopupData
ImGuiPopupData();

Inputs support

[Internal] Key ranges

[Internal] Named shortcuts for Navigation

InputEventType (enum)

MemberValue
ImGuiInputEventType_None = 00
ImGuiInputEventType_MousePos1
ImGuiInputEventType_MouseWheel2
ImGuiInputEventType_MouseButton3
ImGuiInputEventType_MouseViewport4
ImGuiInputEventType_Key5
ImGuiInputEventType_Text6
ImGuiInputEventType_Focus7
ImGuiInputEventType_COUNT8

InputSource (enum)

MemberValue
ImGuiInputSource_None = 00
ImGuiInputSource_Mouse1Note: may be Mouse or TouchScreen or Pen. See io.MouseSource to distinguish them.
ImGuiInputSource_Keyboard2
ImGuiInputSource_Gamepad3
ImGuiInputSource_COUNT4

InputEventMousePos (struct)

Member
float PosX,
PosY;
ImGuiMouseSource MouseSource;

InputEventMouseWheel (struct)

Member
float WheelX,
WheelY;
ImGuiMouseSource MouseSource;

InputEventMouseButton (struct)

Member
int Button;
bool Down;
ImGuiMouseSource MouseSource;

InputEventMouseViewport (struct)

Member
ImGuiID HoveredViewportID;

InputEventKey (struct)

Member
ImGuiKey Key;
bool Down;
float AnalogValue;

InputEventText (struct)

Member
unsigned int Char;

InputEventAppFocused (struct)

Member
bool Focused;

InputEvent (struct)

Member
ImGuiInputEventType Type;
ImGuiInputSource Source;
ImU32 EventId;Unique, sequential increasing integer to identify an event (if you need to correlate them to other data).
bool AddedByTestEngine;
InputEvent::ImGuiInputEvent
ImGuiInputEvent();

KeyRoutingData (struct)

Routing table entry (sizeof() == 16 bytes)

Member
ImGuiKeyRoutingIndex NextEntryIndex;
ImU16 Mods;Technically we’d only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits.
ImU16 RoutingCurrScore;[DEBUG] For debug display
ImU16 RoutingNextScore;Lower is better (0: perfect score)
ImGuiID RoutingCurr;
ImGuiID RoutingNext;
KeyRoutingData::ImGuiKeyRoutingData
ImGuiKeyRoutingData();

KeyRoutingTable (struct)

Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching.
Stored in main context (1 instance)

Member
ImVector<ImGuiKeyRoutingData> Entries;
ImVector<ImGuiKeyRoutingData> EntriesNext;Double-buffer to avoid reallocation (could use a shared buffer)
KeyRoutingTable::ImGuiKeyRoutingTable
ImGuiKeyRoutingTable();
KeyRoutingTable::Clear
void Clear();

(private API)

KeyOwnerData (struct)

This extends ImGuiKeyData but only for named keys (legacy keys don’t support the new features)
Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData.

Member
ImGuiID OwnerCurr;
ImGuiID OwnerNext;
bool LockThisFrame;Reading this key requires explicit owner id (until end of frame). Set by ImGuiInputFlags_LockThisFrame.
bool LockUntilRelease;Reading this key requires explicit owner id (until key is released). Set by ImGuiInputFlags_LockUntilRelease. When this is True LockThisFrame is always True as well.
KeyOwnerData::ImGuiKeyOwnerData
ImGuiKeyOwnerData();

InputFlagsPrivate_ (enum)

Extend ImGuiInputFlags_
Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner()
Don’t mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function)

MemberValue
ImGuiInputFlags_RepeatRateDefault = 1 << 11 << 1Repeat rate: Regular (default)
ImGuiInputFlags_RepeatRateNavMove = 1 << 21 << 2Repeat rate: Fast
ImGuiInputFlags_RepeatRateNavTweak = 1 << 31 << 3Repeat rate: Faster
ImGuiInputFlags_RepeatUntilRelease = 1 << 41 << 4Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior.
ImGuiInputFlags_RepeatUntilKeyModsChange = 1 << 51 << 5Stop repeating when released OR if keyboard mods are changed (default for Shortcut)
ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone = 1 << 61 << 6Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod.
ImGuiInputFlags_RepeatUntilOtherKeyPress = 1 << 71 << 7Stop repeating when released OR if any other keyboard key is pressed during the repeat
ImGuiInputFlags_LockThisFrame = 1 << 201 << 20Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame.
ImGuiInputFlags_LockUntilRelease = 1 << 211 << 21Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released.
ImGuiInputFlags_CondHovered = 1 << 221 << 22Only set if item is hovered (default to both)
ImGuiInputFlags_CondActive = 1 << 231 << 23Only set if item is active (default to both)
ImGuiInputFlags_CondDefault_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActiveInputFlags_CondHovered | InputFlags_CondActive
ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweakInputFlags_RepeatRateDefault | InputFlags_RepeatRateNavMove | InputFlags_RepeatRateNavTweak
ImGuiInputFlags_RepeatUntilMask_ = ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPressInputFlags_RepeatUntilRelease | InputFlags_RepeatUntilKeyModsChange | InputFlags_RepeatUntilKeyModsChangeFromNone | InputFlags_RepeatUntilOtherKeyPress
ImGuiInputFlags_RepeatMask_ = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_InputFlags_Repeat | InputFlags_RepeatRateMask_ | InputFlags_RepeatUntilMask_
ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActiveInputFlags_CondHovered | InputFlags_CondActive
ImGuiInputFlags_RouteTypeMask_ = ImGuiInputFlags_RouteActive | ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteAlwaysInputFlags_RouteActive | InputFlags_RouteFocused | InputFlags_RouteGlobal | InputFlags_RouteAlways
ImGuiInputFlags_RouteOptionsMask_ = ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive | ImGuiInputFlags_RouteUnlessBgFocused | ImGuiInputFlags_RouteFromRootWindowInputFlags_RouteOverFocused | InputFlags_RouteOverActive | InputFlags_RouteUnlessBgFocused | InputFlags_RouteFromRootWindow
ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_RepeatMask_InputFlags_RepeatMask_
ImGuiInputFlags_SupportedByIsMouseClicked = ImGuiInputFlags_RepeatInputFlags_Repeat
ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_InputFlags_RepeatMask_ | InputFlags_RouteTypeMask_ | InputFlags_RouteOptionsMask_
ImGuiInputFlags_SupportedBySetNextItemShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_ | ImGuiInputFlags_TooltipInputFlags_RepeatMask_ | InputFlags_RouteTypeMask_ | InputFlags_RouteOptionsMask_ | InputFlags_Tooltip
ImGuiInputFlags_SupportedBySetKeyOwner = ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilReleaseInputFlags_LockThisFrame | InputFlags_LockUntilRelease
ImGuiInputFlags_SupportedBySetItemKeyOwner = ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_, }InputFlags_SupportedBySetKeyOwner | InputFlags_CondMask_

Clipper support

ListClipperRange (struct)

Note that Max is exclusive, so perhaps should be using a Begin/End convention.

Member
int Min;
int Max;
bool PosToIndexConvert;Begin/End are absolute position (will be converted to indices later)
ImS8 PosToIndexOffsetMin;Add to Min after converting to indices
ImS8 PosToIndexOffsetMax;Add to Min after converting to indices
ListClipperRange::FromIndices
static ImGuiListClipperRange FromIndices(int min, int max);

(private API)

ListClipperRange::FromPositions
static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max);

(private API)

ListClipperData (struct)

Temporary clipper data, buffers shared/reused between instances

Member
ImGuiListClipper* ListClipper;
float LossynessOffset;
int StepNo;
int ItemsFrozen;
ImVector<ImGuiListClipperRange> Ranges;
ListClipperData::ImGuiListClipperData
ImGuiListClipperData();
ListClipperData::Reset
void Reset(ImGuiListClipper* clipper);

(private API)

ActivateFlags_ (enum)

MemberValue
ImGuiActivateFlags_None = 00
ImGuiActivateFlags_PreferInput = 1 << 01 << 0Favor activation that requires keyboard text input (e.g. for Slider/Drag). Default for Enter key.
ImGuiActivateFlags_PreferTweak = 1 << 11 << 1Favor activation for tweaking with arrows or gamepad (e.g. for Slider/Drag). Default for Space key and if keyboard is not used.
ImGuiActivateFlags_TryToPreserveState = 1 << 21 << 2Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection)
ImGuiActivateFlags_FromTabbing = 1 << 31 << 3Activation requested by a tabbing request (ImGuiNavMoveFlags_IsTabbing)
ImGuiActivateFlags_FromShortcut = 1 << 41 << 4Activation requested by an item shortcut via SetNextItemShortcut() function.
ImGuiActivateFlags_FromFocusApi = 1 << 51 << 5Activation requested by an api request (ImGuiNavMoveFlags_FocusApi)

ScrollFlags_ (enum)

Early work-in-progress API for ScrollToItem()
FIXME: Missing flags to request making both edges visible when possible.

MemberValue
ImGuiScrollFlags_None = 00
ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 01 << 0If item is not visible: scroll as little as possible on X axis to bring item back into view [default for X axis]
ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 11 << 1If item is not visible: scroll as little as possible on Y axis to bring item back into view [default for Y axis for windows that are already visible]
ImGuiScrollFlags_KeepVisibleCenterX = 1 << 21 << 2If item is not visible: scroll to make the item centered on X axis [rarely used]
ImGuiScrollFlags_KeepVisibleCenterY = 1 << 31 << 3If item is not visible: scroll to make the item centered on Y axis
ImGuiScrollFlags_AlwaysCenterX = 1 << 41 << 4Always center the result item on X axis [rarely used]
ImGuiScrollFlags_AlwaysCenterY = 1 << 51 << 5Always center the result item on Y axis [default for Y axis for appearing window)
ImGuiScrollFlags_NoScrollParent = 1 << 61 << 6Disable forwarding scrolling to parent window if required to keep item/rect visible (only scroll window the function was applied to).
ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterXScrollFlags_KeepVisibleEdgeX | ScrollFlags_KeepVisibleCenterX | ScrollFlags_AlwaysCenterX
ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY, }ScrollFlags_KeepVisibleEdgeY | ScrollFlags_KeepVisibleCenterY | ScrollFlags_AlwaysCenterY

NavRenderCursorFlags_ (enum)

MemberValue
ImGuiNavRenderCursorFlags_None = 00
ImGuiNavRenderCursorFlags_Compact = 1 << 11 << 1Compact highlight, no padding/distance from focused item
ImGuiNavRenderCursorFlags_AlwaysDraw = 1 << 21 << 2Draw rectangular highlight if (g.NavId == id) even when g.NavCursorVisible == False, aka even when using the mouse.

NavMoveFlags_ (enum)

MemberValue
ImGuiNavMoveFlags_None = 00
ImGuiNavMoveFlags_LoopX = 1 << 01 << 0On failed request, restart from opposite side
ImGuiNavMoveFlags_LoopY = 1 << 11 << 1
ImGuiNavMoveFlags_WrapX = 1 << 21 << 2On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
ImGuiNavMoveFlags_WrapY = 1 << 31 << 3This is not super useful but provided for completeness
ImGuiNavMoveFlags_WrapMask_ = ImGuiNavMoveFlags_LoopX | ImGuiNavMoveFlags_LoopY | ImGuiNavMoveFlags_WrapX | ImGuiNavMoveFlags_WrapYNavMoveFlags_LoopX | NavMoveFlags_LoopY | NavMoveFlags_WrapX | NavMoveFlags_WrapY
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 41 << 4Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 51 << 5Store alternate result in NavMoveResultLocalVisible that only comprise elements that are already fully visible (used by PageUp/PageDown)
ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 61 << 6Force scrolling to min/max (used by Home/End) // FIXME-NAV: Aim to remove or reword as ImGuiScrollFlags
ImGuiNavMoveFlags_Forwarded = 1 << 71 << 7
ImGuiNavMoveFlags_DebugNoResult = 1 << 81 << 8Dummy scoring for debug purpose, don’t apply result
ImGuiNavMoveFlags_FocusApi = 1 << 91 << 9Requests from focus API can land/focus/activate items even if they are marked with _NoTabStop (see NavProcessItemForTabbingRequest() for details)
ImGuiNavMoveFlags_IsTabbing = 1 << 101 << 10== Focus + Activate if item is Inputable + DontChangeNavHighlight
ImGuiNavMoveFlags_IsPageMove = 1 << 111 << 11Identify a PageDown/PageUp request.
ImGuiNavMoveFlags_Activate = 1 << 121 << 12Activate/select target item.
ImGuiNavMoveFlags_NoSelect = 1 << 131 << 13Don’t trigger selection by not setting g.NavJustMovedTo
ImGuiNavMoveFlags_NoSetNavCursorVisible = 1 << 141 << 14Do not alter the nav cursor visible state
ImGuiNavMoveFlags_NoClearActiveId = 1 << 151 << 15(Experimental) Do not clear active id when applying move result

NavLayer (enum)

MemberValue
ImGuiNavLayer_Main = 00Main scrolling layer
ImGuiNavLayer_Menu = 11Menu layer (access with Alt)
ImGuiNavLayer_COUNT2

NavItemData (struct)

Storage for navigation query/results

Member
ImGuiWindow* Window;Init,Move // Best candidate window (result->ItemWindow->RootWindowForNav == request->Window)
ImGuiID ID;Init,Move // Best candidate item ID
ImGuiID FocusScopeId;Init,Move // Best candidate focus scope ID
ImRect RectRel;Init,Move // Best candidate bounding box in window relative space
ImGuiItemFlags ItemFlags;????,Move // Best candidate item flags
float DistBox;Move // Best candidate box distance to current NavId
float DistCenter;Move // Best candidate center distance to current NavId
float DistAxial;Move // Best candidate axial distance to current NavId
ImGuiSelectionUserData SelectionUserData;I+Mov // Best candidate SetNextItemSelectionUserData() value. Valid if (ItemFlags & ImGuiItemFlags_HasSelectionUserData)
NavItemData::ImGuiNavItemData
ImGuiNavItemData();
NavItemData::Clear
void Clear();

(private API)

FocusScopeData (struct)

Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[]

Member
ImGuiID ID;
ImGuiID WindowID;

Typing-select support

TypingSelectFlags_ (enum)

Flags for GetTypingSelectRequest()

MemberValue
ImGuiTypingSelectFlags_None = 00
ImGuiTypingSelectFlags_AllowBackspace = 1 << 01 << 0Backspace to delete character inputs. If using: ensure GetTypingSelectRequest() is not called more than once per frame (filter by e.g. focus state)
ImGuiTypingSelectFlags_AllowSingleCharMode = 1 << 11 << 1Allow “single char” search mode which is activated when pressing the same character multiple times.

TypingSelectRequest (struct)

Returned by GetTypingSelectRequest(), designed to eventually be public.

Member
ImGuiTypingSelectFlags Flags;Flags passed to GetTypingSelectRequest()
int SearchBufferLen;
const char* SearchBuffer;Search buffer contents (use full string. unless SingleCharMode is set, in which case use SingleCharSize). # (const)
bool SelectRequest;Set when buffer was modified this frame, requesting a selection.
bool SingleCharMode;Notify when buffer contains same character repeated, to implement special mode. In this situation it preferred to not display any on-screen search indication.
ImS8 SingleCharSize;Length in bytes of first letter codepoint (1 for ascii, 2-4 for UTF-8). If (SearchBufferLen==RepeatCharSize) only 1 letter has been input.

TypingSelectState (struct)

Storage for GetTypingSelectRequest()

Member
ImGuiTypingSelectRequest Request;User-facing data
ImGuiID FocusScope;
int LastRequestFrame = 0;
float LastRequestTime = 0.0f;
bool SingleCharModeLock = false;After a certain single char repeat count we lock into SingleCharMode. Two benefits: 1) buffer never fill, 2) we can provide an immediate SingleChar mode without timer elapsing.
TypingSelectState::ImGuiTypingSelectState
ImGuiTypingSelectState();
TypingSelectState::Clear
void Clear();

(private API)

We preserve remaining data for easier debugging

Columns support

OldColumnFlags_ (enum)

Flags for internal’s BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays!

MemberValue
ImGuiOldColumnFlags_None = 00
ImGuiOldColumnFlags_NoBorder = 1 << 01 << 0Disable column dividers
ImGuiOldColumnFlags_NoResize = 1 << 11 << 1Disable resizing columns when clicking on the dividers
ImGuiOldColumnFlags_NoPreserveWidths = 1 << 21 << 2Disable column width preservation when adjusting columns
ImGuiOldColumnFlags_NoForceWithinWindow = 1 << 31 << 3Disable forcing columns to fit within window
ImGuiOldColumnFlags_GrowParentContentsSize = 1 << 41 << 4Restore pre-1.51 behavior of extending the parent window contents size but without affecting the columns width at all. Will eventually remove.

Obsolete names (will be removed)

OldColumnData (struct)

Member
float OffsetNorm;Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
float OffsetNormBeforeResize;
ImGuiOldColumnFlags Flags;Not exposed
ImRect ClipRect;
OldColumnData::ImGuiOldColumnData
ImGuiOldColumnData();

OldColumns (struct)

Member
ImGuiID ID;
ImGuiOldColumnFlags Flags;
bool IsFirstFrame;
bool IsBeingResized;
int Current;
int Count;
float OffMinX,Offsets from HostWorkRect.Min.x
OffMaxX;Offsets from HostWorkRect.Min.x
float LineMinY,
LineMaxY;
float HostCursorPosY;Backup of CursorPos at the time of BeginColumns()
float HostCursorMaxPosX;Backup of CursorMaxPos at the time of BeginColumns()
ImRect HostInitialClipRect;Backup of ClipRect at the time of BeginColumns()
ImRect HostBackupClipRect;Backup of ClipRect during PushColumnsBackground()/PopColumnsBackground()
ImRect HostBackupParentWorkRect;Backup of WorkRect at the time of BeginColumns()
ImVector<ImGuiOldColumnData> Columns;
ImDrawListSplitter Splitter;
OldColumns::ImGuiOldColumns
ImGuiOldColumns();

Box-select support

BoxSelectState (struct)

Member
ImGuiID ID;
bool IsActive;
bool IsStarting;
bool IsStartedFromVoid;Starting click was not from an item.
bool IsStartedSetNavIdOnce;
bool RequestClear;
ImVec2 StartPosRel;Start position in window-contents relative space (to support scrolling)
ImVec2 EndPosRel;End position in window-contents relative space
ImVec2 ScrollAccum;Scrolling accumulator (to behave at high-frame spaces)
ImGuiWindow* Window;
bool UnclipMode;(Temp/Transient, here in hot area). Set/cleared by the BeginMultiSelect()/EndMultiSelect() owning active box-select.
ImRect UnclipRect;Rectangle where ItemAdd() clipping may be temporarily disabled. Need support by multi-select supporting widgets.
ImRect BoxSelectRectPrev;Selection rectangle in absolute coordinates (derived every frame from BoxSelectStartPosRel and MousePos)
ImRect BoxSelectRectCurr;
BoxSelectState::ImGuiBoxSelectState
ImGuiBoxSelectState();

Multi-select support

MultiSelectTempData (struct)

Temporary storage for multi-select

Member
ImGuiMultiSelectIO IO;MUST BE FIRST FIELD. Requests are set and returned by BeginMultiSelect()/EndMultiSelect() + written to by user during the loop.
ImGuiMultiSelectState* Storage;
ImGuiID FocusScopeId;Copied from g.CurrentFocusScopeId (unless another selection scope was pushed manually)
ImGuiMultiSelectFlags Flags;
ImVec2 ScopeRectMin;
ImVec2 BackupCursorMaxPos;
ImGuiID BoxSelectId;
ImGuiKeyChord KeyMods;
ImS8 LoopRequestSetAll;-1: no operation, 0: clear all, 1: select all.
bool IsEndIO;Set when switching IO from BeginMultiSelect() to EndMultiSelect() state.
bool IsFocused;Set if currently focusing the selection scope (any item of the selection). May be used if you have custom shortcut associated to selection.
bool IsKeyboardSetRange;Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can’t afford a frame of lag with Shift+Navigation.
bool NavIdPassedBy;
bool RangeSrcPassedBy;Set by the item that matches RangeSrcItem.
bool RangeDstPassedBy;Set by the item that matches NavJustMovedToId when IsSetRange is set.
bool IsSoleOrUnknownSelectionSize;
MultiSelectTempData::ImGuiMultiSelectTempData
ImGuiMultiSelectTempData();
MultiSelectTempData::Clear
void Clear();

(private API)

Zero-clear except IO as we preserve IO.Requests[] buffer allocation.

MultiSelectTempData::ClearIO
void ClearIO();

(private API)

MultiSelectState (struct)

Persistent storage for multi-select (as long as selection is alive)

Member
ImGuiWindow* Window;
ImGuiID ID;
int LastFrameActive;Last used frame-count, for GC.
int LastSelectionSize;Set by BeginMultiSelect() based on optional info provided by user. May be -1 if unknown.
ImS8 RangeSelected;-1 (don’t have) or True/False
ImS8 NavIdSelected;-1 (don’t have) or True/False
ImGuiSelectionUserData RangeSrcItem;
ImGuiSelectionUserData NavIdItem;SetNextItemSelectionUserData() value for NavId (if part of submitted items)
MultiSelectState::ImGuiMultiSelectState
ImGuiMultiSelectState();

Docking support

DockNodeFlagsPrivate_ (enum)

Extend ImGuiDockNodeFlags_

MemberValue
ImGuiDockNodeFlags_DockSpace = 1 << 101 << 10Saved // A dockspace is a node that occupy space within an existing user window. Otherwise the node is floating and create its own window.
ImGuiDockNodeFlags_CentralNode = 1 << 111 << 11Saved // The central node has 2 main properties: stay visible when empty, only use “remaining” spaces from its neighbor.
ImGuiDockNodeFlags_NoTabBar = 1 << 121 << 12Saved // Tab bar is completely unavailable. No triangle in the corner to enable it back.
ImGuiDockNodeFlags_HiddenTabBar = 1 << 131 << 13Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance may be destroyed as this is only used for single-window tab bar)
ImGuiDockNodeFlags_NoWindowMenuButton = 1 << 141 << 14Saved // Disable window/docking menu (that one that appears instead of the collapse button)
ImGuiDockNodeFlags_NoCloseButton = 1 << 151 << 15Saved // Disable close button
ImGuiDockNodeFlags_NoResizeX = 1 << 161 << 16//
ImGuiDockNodeFlags_NoResizeY = 1 << 171 << 17//
ImGuiDockNodeFlags_DockedWindowsInFocusRoute= 1 << 181 << 18// Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused.
ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 191 << 19// Disable this node from splitting other windows/nodes.
ImGuiDockNodeFlags_NoDockingOverMe = 1 << 201 << 20// Disable other windows/nodes from being docked over this node.
ImGuiDockNodeFlags_NoDockingOverOther = 1 << 211 << 21// Disable this node from being docked over another window or non-empty node.
ImGuiDockNodeFlags_NoDockingOverEmpty = 1 << 221 << 22// Disable this node from being docked over an empty node (e.g. DockSpace with no other windows)
ImGuiDockNodeFlags_NoDocking = ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoDockingSplitOtherDockNodeFlags_NoDockingOverMe | DockNodeFlags_NoDockingOverOther | DockNodeFlags_NoDockingOverEmpty | DockNodeFlags_NoDockingSplit | DockNodeFlags_NoDockingSplitOther
ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0~0
ImGuiDockNodeFlags_NoResizeFlagsMask_ = (int)ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY(intDockNodeFlags_NoResize | DockNodeFlags_NoResizeX | DockNodeFlags_NoResizeY)
ImGuiDockNodeFlags_LocalFlagsTransferMask_ = (int)ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | (int)ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton(intDockNodeFlags_NoDockingSplit | DockNodeFlags_NoResizeFlagsMask_ | (int)DockNodeFlags_AutoHideTabBar | DockNodeFlags_CentralNode | DockNodeFlags_NoTabBar | DockNodeFlags_HiddenTabBar | DockNodeFlags_NoWindowMenuButton | DockNodeFlags_NoCloseButton)
ImGuiDockNodeFlags_SavedFlagsMask_ = ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton, }DockNodeFlags_NoResizeFlagsMask_ | DockNodeFlags_DockSpace | DockNodeFlags_CentralNode | DockNodeFlags_NoTabBar | DockNodeFlags_HiddenTabBar | DockNodeFlags_NoWindowMenuButton | DockNodeFlags_NoCloseButton

DataAuthority_ (enum)

Store the source authority (dock node vs window) of a field

MemberValue
ImGuiDataAuthority_Auto0
ImGuiDataAuthority_DockNode1
ImGuiDataAuthority_Window, }2

DockNodeState (enum)

MemberValue
ImGuiDockNodeState_Unknown0
ImGuiDockNodeState_HostWindowHiddenBecauseSingleWindow1
ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing2
ImGuiDockNodeState_HostWindowVisible, }3

DockNode (struct)

sizeof() 176~216

Member
ImGuiID ID;
ImGuiDockNodeFlags SharedFlags;(Write) Flags shared by all nodes of a same dockspace hierarchy (inherited from the root node)
ImGuiDockNodeFlags LocalFlags;(Write) Flags specific to this node
ImGuiDockNodeFlags LocalFlagsInWindows;(Write) Flags specific to this node, applied from windows
ImGuiDockNodeFlags MergedFlags;(Read) Effective flags (== SharedFlags | LocalFlagsInNode | LocalFlagsInWindows)
ImGuiDockNodeState State;
ImGuiDockNode* ParentNode;
ImVector<ImGuiWindow*> Windows;Note: unordered list! Iterate TabBar->Tabs for user-order.
ImGuiTabBar* TabBar;
ImVec2 Pos;Current position
ImVec2 Size;Current size
ImVec2 SizeRef;[Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
ImGuiAxis SplitAxis;[Split node only] Split axis (X or Y)
ImU32 LastBgColor;
ImGuiWindowClass WindowClass;[Root node only]
ImGuiWindow* HostWindow;
ImGuiWindow* VisibleWindow;Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different window.
ImGuiDockNode* CentralNode;[Root node only] Pointer to central node.
ImGuiDockNode* OnlyNodeWithWindows;[Root node only] Set when there is a single visible node within the hierarchy.
int CountNodeWithWindows;[Root node only]
int LastFrameAlive;Last frame number the node was updated or kept alive explicitly with DockSpace() + ImGuiDockNodeFlags_KeepAliveOnly
int LastFrameActive;Last frame number the node was updated.
int LastFrameFocused;Last frame number the node was focused.
ImGuiID LastFocusedNodeId;[Root node only] Which of our child docking node (any ancestor in the hierarchy) was last focused.
ImGuiID SelectedTabId;[Leaf node only] Which of our tab/window is selected.
ImGuiID WantCloseTabId;[Leaf node only] Set when closing a specific tab/window.
ImGuiID RefViewportId;Reference viewport ID from visible window when HostWindow == None.
DockNode::ImGuiDockNode
ImGuiDockNode(ImGuiID id);
DockNode::IsRootNode
bool IsRootNode() const;

(private API)

DockNode::IsDockSpace
bool IsDockSpace() const;

(private API)

DockNode::IsFloatingNode
bool IsFloatingNode() const;

(private API)

DockNode::IsCentralNode
bool IsCentralNode() const;

(private API)

DockNode::IsHiddenTabBar
bool IsHiddenTabBar() const;

(private API)

Hidden tab bar can be shown back by clicking the small triangle

DockNode::IsNoTabBar
bool IsNoTabBar() const;

(private API)

Never show a tab bar

DockNode::IsSplitNode
bool IsSplitNode() const;

(private API)

DockNode::IsLeafNode
bool IsLeafNode() const;

(private API)

DockNode::IsEmpty
bool IsEmpty() const;

(private API)

DockNode::Rect
ImRect Rect() const;

(private API)

DockNode::SetLocalFlags
void SetLocalFlags(ImGuiDockNodeFlags flags);

(private API)

DockNode::UpdateMergedFlags
void UpdateMergedFlags();

(private API)

WindowDockStyleCol (enum)

List of colors that are stored at the time of Begin() into Docked Windows.
We currently store the packed colors in a simple array window->DockStyle.Colors[].
A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, but it would be more complex as we’d need to double-buffer both as e.g. drop target may refer to window from last frame.

MemberValue
ImGuiWindowDockStyleCol_Text0
ImGuiWindowDockStyleCol_TabHovered1
ImGuiWindowDockStyleCol_TabFocused2
ImGuiWindowDockStyleCol_TabSelected3
ImGuiWindowDockStyleCol_TabSelectedOverline4
ImGuiWindowDockStyleCol_TabDimmed5
ImGuiWindowDockStyleCol_TabDimmedSelected6
ImGuiWindowDockStyleCol_TabDimmedSelectedOverline7
ImGuiWindowDockStyleCol_UnsavedMarker8
ImGuiWindowDockStyleCol_COUNT9

WindowDockStyle (struct)

We don’t store style.Alpha: dock_node->LastBgColor embeds it and otherwise it would only affect the docking tab, which intuitively I would say we don’t want to.

DockContext (struct)

Member
ImGuiStorage Nodes;Map ID -> ImGuiDockNode*: Active nodes
bool WantFullRebuild;
DockContext::ImGuiDockContext
ImGuiDockContext();

Viewport support

ViewportP (struct)

ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!)
Every instance of ImGuiViewport is in fact a ImGuiViewportP.

Member
ImGuiWindow* Window;Set when the viewport is owned by a window (and ImGuiViewportFlags_CanHostOtherWindows is NOT set)
int Idx;
int LastFrameActive;Last frame number this viewport was activated by a window
int LastFocusedStampCount;Last stamp number from when a window hosted by this viewport was focused (by comparing this value between two viewport we have an implicit viewport z-order we use as fallback)
ImGuiID LastNameHash;
ImVec2 LastPos;
ImVec2 LastSize;
float Alpha;Window opacity (when dragging dockable windows/viewports we make them transparent)
float LastAlpha;
bool LastFocusedHadNavWindow;Instead of maintaining a LastFocusedWindow (which may harder to correctly maintain), we merely store weither NavWindow != None last time the viewport was focused.
short PlatformMonitor;
int BgFgDrawListsLastFrameActive[2];ndarray[type=int, size=2] # Last frame the background (0) and foreground (1) draw lists were used.
float BgFgDrawListsLastTimeActive[2];ndarray[type=float, size=2] # Timestamps for Gc.
ImDrawData DrawDataP;
ImDrawDataBuilder DrawDataBuilder;Temporary data while building final ImDrawData
ImVec2 LastPlatformPos;
ImVec2 LastPlatformSize;
ImVec2 LastRendererSize;
ImVec2 WorkInsetMin;Work Area inset locked for the frame. GetWorkRect() always fits within GetMainRect().
ImVec2 WorkInsetMax;"
ImVec2 BuildWorkInsetMin;Work Area inset accumulator for current frame, to become next frame’s WorkInset
ImVec2 BuildWorkInsetMax;"
ViewportP::ImGuiViewportP
ImGuiViewportP();
ViewportP::ClearRequestFlags
void ClearRequestFlags();

(private API)

ViewportP::CalcWorkRectPos
ImVec2 CalcWorkRectPos(const ImVec2& inset_min) const;

(private API)

Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last frame data, and 1 pair for currently building rect)

ViewportP::CalcWorkRectSize
ImVec2 CalcWorkRectSize(const ImVec2& inset_min, const ImVec2& inset_max) const;

(private API)

ViewportP::UpdateWorkRect
void UpdateWorkRect();

(private API)

Update public fields

ViewportP::GetMainRect
ImRect GetMainRect() const;

(private API)

Helpers to retrieve ImRect (we don’t need to store BuildWorkRect as every access tend to change it, hence the code asymmetry)

ViewportP::GetWorkRect
ImRect GetWorkRect() const;

(private API)

ViewportP::GetBuildWorkRect
ImRect GetBuildWorkRect() const;

(private API)

Settings support

WindowSettings (struct)

Windows data saved in imgui.ini file
Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure)

Member
ImGuiID ID;
ImVec2ih Pos;NB: Settings position are stored RELATIVE to the viewport! Whereas runtime ones are absolute positions.
ImVec2ih Size;
ImVec2ih ViewportPos;
ImGuiID ViewportId;
ImGuiID DockId;ID of last known DockNode (even if the DockNode is invisible because it has only 1 active window), or 0 if none.
ImGuiID ClassId;ID of window class if specified
short DockOrder;Order of the last time the window was visible within its DockNode. This is used to reorder windows that are reappearing on the same frame. Same value between windows that were active and windows that were none are possible.
ImGuiPackedDate LastUsedDate;
WindowSettings::ImGuiWindowSettings
ImGuiWindowSettings();

SettingsCleanupArgs (struct)

Member
ImGuiID TypeHashFilter = 0;Set to restrict cleanup to a given .ini type, e.g. == ImHashStr(“Window”), ImHashStr(“Table”). Otherwise every types supporting Cleanup will be affected.
int DiscardOlderThanMonths = 0;Enable to discard entries older than XX months.
bool DiscardWhenMissingDate = false;Enable to discard entries missing a date.
bool DiscardAll = false;Enable to discard all entries = same as calling ClearIniSettings() except it may be filtered.
bool SetCurrentSessionDateToAll = false;Enable to write current SessionDate to all supporting entries. // Let us know in #9460 if you use this.
bool SetCurrentSessionDateWhenMissingDate = false;Enable to write current SessionDate to all supporting entries missing a date. // Let us know in #9460 if you use this.
int _DiscardOlderThanDate = 0;[Internal]

SettingsHandler (struct)

Member
const char* TypeName;Short description stored in .ini file. Disallowed characters: ‘[’ ‘]’ # (const)
ImGuiID TypeHash;== ImHashStr(TypeName)
void* UserData;
SettingsHandler::ImGuiSettingsHandler
ImGuiSettingsHandler();

Localization support

LocKey (enum)

This is experimental and not officially supported, it’ll probably fall short of features, if/when it does we may backtrack.

MemberValue
ImGuiLocKey_VersionStr0
ImGuiLocKey_TableSizeOne1
ImGuiLocKey_TableSizeAllFit2
ImGuiLocKey_TableSizeAllDefault3
ImGuiLocKey_TableReset4
ImGuiLocKey_TableResetOrder5
ImGuiLocKey_TableResetVisibility6
ImGuiLocKey_WindowingMainMenuBar7
ImGuiLocKey_WindowingPopup8
ImGuiLocKey_WindowingUntitled9
ImGuiLocKey_OpenLink_s10
ImGuiLocKey_CopyLink11
ImGuiLocKey_DockingHideTabBar12
ImGuiLocKey_DockingHoldShiftToDock13
ImGuiLocKey_DockingDragToUndockOrMoveNode14
ImGuiLocKey_COUNT15

LocEntry (struct)

Member
ImGuiLocKey Key;
const char* Text;(const)

Metrics, Debug Tools

DebugLogFlags_ (enum)

See IMGUI_DEBUG_LOG() and IMGUI_DEBUG_LOG_XXX() macros.

MemberValue
ImGuiDebugLogFlags_None = 00
ImGuiDebugLogFlags_EventError = 1 << 01 << 0Error submitted by IM_ASSERT_USER_ERROR()
ImGuiDebugLogFlags_EventActiveId = 1 << 11 << 1
ImGuiDebugLogFlags_EventFocus = 1 << 21 << 2
ImGuiDebugLogFlags_EventPopup = 1 << 31 << 3
ImGuiDebugLogFlags_EventNav = 1 << 41 << 4
ImGuiDebugLogFlags_EventClipper = 1 << 51 << 5
ImGuiDebugLogFlags_EventSelection = 1 << 61 << 6
ImGuiDebugLogFlags_EventIO = 1 << 71 << 7
ImGuiDebugLogFlags_EventFont = 1 << 81 << 8
ImGuiDebugLogFlags_EventInputRouting = 1 << 91 << 9
ImGuiDebugLogFlags_EventDocking = 1 << 101 << 10
ImGuiDebugLogFlags_EventViewport = 1 << 111 << 11
ImGuiDebugLogFlags_EventTable = 1 << 121 << 12
ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventError | ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventTable | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventFont | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewportDebugLogFlags_EventError | DebugLogFlags_EventActiveId | DebugLogFlags_EventFocus | DebugLogFlags_EventPopup | DebugLogFlags_EventNav | DebugLogFlags_EventClipper | DebugLogFlags_EventSelection | DebugLogFlags_EventTable | DebugLogFlags_EventIO | DebugLogFlags_EventFont | DebugLogFlags_EventInputRouting | DebugLogFlags_EventDocking | DebugLogFlags_EventViewport
ImGuiDebugLogFlags_OutputToTTY = 1 << 201 << 20Also send output to TTY
ImGuiDebugLogFlags_OutputToDebugger = 1 << 211 << 21Also send output to Debugger Console [Windows only]
ImGuiDebugLogFlags_OutputToTestEngine = 1 << 221 << 22Also send output to Dear ImGui Test Engine

DebugAllocEntry (struct)

Member
int FrameCount;
ImS16 AllocCount;
ImS16 FreeCount;

DebugAllocInfo (struct)

Member
int TotalAllocCount;Number of call to MemAlloc().
int TotalFreeCount;
ImS16 LastEntriesIdx;Current index in buffer
DebugAllocInfo::ImGuiDebugAllocInfo
ImGuiDebugAllocInfo();

MetricsConfig (struct)

Member
bool ShowDebugLog = false;
bool ShowIDStackTool = false;
bool ShowWindowsRects = false;
bool ShowWindowsBeginOrder = false;
bool ShowTablesRects = false;
bool ShowDrawCmdMesh = true;
bool ShowDrawCmdBoundingBoxes = true;
bool ShowTextEncodingViewer = false;
bool ShowTextureUsedRect = false;
bool ShowDockingNodes = false;
int ShowWindowsRectsType = -1;
int ShowTablesRectsType = -1;
int HighlightMonitorIdx = -1;
ImGuiID HighlightViewportID = 0;
int SettingsDiscardMonths = 6;
bool SettingsHighlightOldEntries = false;
bool ShowFontPreview = true;

StackLevelInfo (struct)

Member
ImGuiID ID;
ImS8 QueryFrameCount;>= 1: Sub-query in progress
bool QuerySuccess;Sub-query obtained result from DebugHookIdInfo()
ImS8 DataType;ImGuiDataType
int DescOffset;-1 or offset into parent’s ResultsPathsBuf
StackLevelInfo::ImGuiStackLevelInfo
ImGuiStackLevelInfo();

DebugItemPathQuery (struct)

Member
ImGuiID MainID;ID to query details for.
bool Active;Used to disambiguate the case when ID == 0 and e.g. some code calls PushOverrideID(0).
bool Complete;All sub-queries are finished (some may have failed).
ImS8 Step;-1: query stack + init Results, >= 0: filling individual stack level.
ImVector<ImGuiStackLevelInfo> Results;
ImGuiTextBuffer ResultsDescBuf;
ImGuiTextBuffer ResultPathBuf;
DebugItemPathQuery::ImGuiDebugItemPathQuery
ImGuiDebugItemPathQuery();

IDStackTool (struct)

State for ID Stack tool queries

Member
bool OptHexEncodeNonAsciiChars;
bool OptCopyToClipboardOnCtrlC;
int LastActiveFrame;
float CopyToClipboardLastTime;
IDStackTool::ImGuiIDStackTool
ImGuiIDStackTool();

Generic context hooks

ContextHookType (enum)

[ADAPT_IMGUI_BUNDLE]: added ImGuiContextHookType_BeginWindow, ImGuiContextHookType_EndWindow (called at the start of Begin() and at the end of End())
They let a library that changes the coordinate space (e.g. the zoomable canvas of imgui-node-editor) know when a window is begun from inside it. cf thedmd/imgui-node-editor#242

MemberValue
ImGuiContextHookType_NewFramePre0
ImGuiContextHookType_NewFramePost1
ImGuiContextHookType_EndFramePre2
ImGuiContextHookType_EndFramePost3
ImGuiContextHookType_RenderPre4
ImGuiContextHookType_RenderPost5
ImGuiContextHookType_Shutdown6
ImGuiContextHookType_PendingRemoval_7
ImGuiContextHookType_BeginWindow8
ImGuiContextHookType_EndWindow }9

ContextHook (struct)

Member
ImGuiID HookId;A unique ID assigned by AddContextHook()
ImGuiContextHookType Type;
ImGuiID Owner;
void* UserData;
ContextHook::ImGuiContextHook
ImGuiContextHook();

ImGuiContext

Context (struct)

Member
bool Initialized;
bool WithinFrameScope;Set by NewFrame(), cleared by EndFrame()
bool WithinFrameScopeWithImplicitWindow;Set by NewFrame(), cleared by EndFrame() when the implicit debug window has been pushed
bool TestEngineHookItems;Will call test engine hooks: ImGuiTestEngineHook_ItemAdd(), ImGuiTestEngineHook_ItemInfo(), ImGuiTestEngineHook_Log()
int FrameCount;
int FrameCountEnded;
int FrameCountPlatformEnded;
int FrameCountRendered;
double Time;
ImGuiIO IO;
ImGuiPlatformIO PlatformIO;
ImGuiStyle Style;
ImGuiConfigFlags ConfigFlagsCurrFrame;= g.IO.ConfigFlags at the time of NewFrame()
ImGuiConfigFlags ConfigFlagsLastFrame;
ImVector<ImFontAtlas*> FontAtlases;List of font atlases used by the context (generally only contains g.IO.Fonts aka the main font atlas)
ImFont* Font;Currently bound font. (== FontStack.back().Font)
ImFontBaked* FontBaked;Currently bound font at currently bound size. (== Font->GetFontBaked(FontSize))
float FontSize;Currently bound font size == line height (== FontSizeBase + externals scales applied in the UpdateCurrentFontSize() function).
float FontSizeBase;Font size before scaling == style.FontSizeBase == value passed to PushFont() when specified.
float FontBakedScale;== FontBaked->Size / FontSize. Scale factor over baked size. Rarely used nowadays, very often == 1.0.
float CurrentPixelDensity;Current font density. Used by all calls to GetFontBaked().
float CurrentDpiScale;Current window/viewport DpiScale == CurrentViewport->DpiScale
ImDrawListSharedData DrawListSharedData;
ImGuiID WithinEndChildID;Set within EndChild()
ImGuiID WithinEndPopupID;Set within EndPopup()
void* TestEngine;Test engine user data
ImVector<ImGuiInputEvent> InputEventsQueue;Input events which will be trickled/written into IO structure.
ImVector<ImGuiInputEvent> InputEventsTrail;Past input events processed in NewFrame(). This is to allow domain-specific application to access e.g mouse/pen trail.
ImGuiMouseSource InputEventsNextMouseSource;
ImU32 InputEventsNextEventId;
ImVector<ImGuiWindow*> Windows;Windows, sorted in display order, back to front
ImVector<ImGuiWindow*> WindowsFocusOrder;Root windows, sorted in focus order, back to front.
ImVector<ImGuiWindow*> WindowsTempSortBuffer;Temporary buffer used in EndFrame() to reorder windows so parents are kept before their child
ImVector<ImGuiWindowStackData> CurrentWindowStack;
ImGuiStorage WindowsById;Map window’s ImGuiID to ImGuiWindow*
int WindowsActiveCount;Number of unique windows submitted by frame
float WindowsBorderHoverPadding;Padding around resizable windows for which hovering on counts as hovering the window == ImMax(style.TouchExtraPadding, style.WindowBorderHoverPadding). This isn’t so multi-dpi friendly.
ImGuiID DebugBreakInWindow;Set to break in Begin() call.
ImGuiWindow* CurrentWindow;Window being drawn into
ImGuiWindow* HoveredWindow;Window the mouse is hovering. Will typically catch mouse inputs.
ImGuiWindow* HoveredWindowUnderMovingWindow;Hovered window ignoring MovingWindow. Only set if MovingWindow is set.
ImGuiWindow* HoveredWindowBeforeClear;Window the mouse is hovering. Filled even with _NoMouse. This is currently useful for multi-context compositors.
ImGuiWindow* MovingWindow;Track the window we clicked on (in order to preserve focus). The actual window that is moved is generally MovingWindow->RootWindowDockTree.
ImGuiWindow* WheelingWindow;Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
ImVec2 WheelingWindowRefMousePos;
int WheelingWindowStartFrame;This may be set one frame before WheelingWindow is != None
int WheelingWindowScrolledFrame;
float WheelingWindowReleaseTimer;
ImVec2 WheelingWindowWheelRemainder;
ImVec2 WheelingAxisAvg;
const char* MixedValueLabel;Value replacement when displaying a mixed value. Default to “-” (Unreal uses “Multiple values”, Unity uses “---”). May be interpreted as a format: must not contain single %. Set to None to display original value. # (const)
ImGuiID DebugDrawIdConflictsId;Set when we detect multiple items with the same identifier
ImGuiID DebugHookIdInfoId;Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
ImGuiID HoveredId;Hovered widget, filled during the frame
ImGuiID HoveredIdPreviousFrame;
int HoveredIdPreviousFrameItemCount;Count numbers of items using the same ID as last frame’s hovered id
float HoveredIdTimer;Measure contiguous hovering time
float HoveredIdNotActiveTimer;Measure contiguous hovering time where the item has not been active
bool HoveredIdAllowOverlap;
bool HoveredIdIsDisabled;At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be True even if HoveredId == 0.
bool ItemUnclipByLog;Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled
bool AnyIdHasBeenEditedThisFrame;
ImGuiID ActiveId;Active widget
ImGuiID ActiveIdIsAlive;Active widget has been seen this frame (we can’t use a bool as the ActiveId may change within the frame)
float ActiveIdTimer;
bool ActiveIdIsJustActivated;Set at the time of activation for one frame
bool ActiveIdWasSelected;Active ID was selected at the time of activating
bool ActiveIdWasSoleSelected;Active ID was sole selection at the time of activating
bool ActiveIdAllowOverlap;Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
bool ActiveIdNoClearOnFocusLoss;Disable losing active id if the active id window gets unfocused.
bool ActiveIdHasBeenPressedBefore;Track whether the active id led to a press (this is to allow changing between PressOnClick and PressOnRelease without pressing twice). Used by range_select branch.
bool ActiveIdHasBeenEditedBefore;Was the value associated to the widget Edited over the course of the Active state.
bool ActiveIdHasBeenEditedThisFrame;
bool ActiveIdFromShortcut;
ImS8 ActiveIdMouseButton;
ImGuiID ActiveIdDisabledId;When clicking a disabled item we set ActiveId=window->MoveId to avoid interference with widget code. Actual item ID is stored here.
ImVec2 ActiveIdClickOffset;Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ImGuiInputSource ActiveIdSource;Activating source: ImGuiInputSource_Mouse OR ImGuiInputSource_Keyboard OR ImGuiInputSource_Gamepad
ImGuiWindow* ActiveIdWindow;
ImGuiID ActiveIdPreviousFrame;
ImGuiDeactivatedItemData DeactivatedItemData;
ImGuiDataTypeStorage ActiveIdValueOnActivation;Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX.
ImGuiID LastActiveId;Store the last non-zero ActiveId, useful for animation.
float LastActiveIdTimer;Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
bool LastActiveIdWasSelected;
bool LastActiveIdWasSoleSelected;
double LastKeyModsChangeTime;Record the last time key mods changed (affect repeat delay when using shortcut logic)
double LastKeyModsChangeFromNoneTime;Record the last time key mods changed away from being 0 (affect repeat delay when using shortcut logic)
double LastKeyboardKeyPressTime;Record the last time a keyboard key (ignore mouse/gamepad ones) was pressed.
ImGuiKeyRoutingTable KeysRoutingTable;
ImU32 ActiveIdUsingNavDirMask;Active widget will want to read those nav move requests (e.g. can activate a button and move away from it)
bool ActiveIdUsingAllKeyboardKeys;Active widget will want to read all keyboard keys inputs. (this is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations)
ImGuiKeyChord DebugBreakInShortcutRouting;Set to break in SetShortcutRouting()/Shortcut() calls.
ImGuiID CurrentFocusScopeId;Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with g.NavFocusScopeId.
ImGuiItemFlags CurrentItemFlags;Value for currently appending items == g.ItemFlagsStack.back()
ImGuiID DebugLocateId;Storage for DebugLocateItemOnHover() feature: this is read by ItemAdd() so we keep it in a hot/cached location
ImGuiNextItemData NextItemData;Storage for SetNextItem** functions
ImGuiLastItemData LastItemData;Storage for last submitted item (setup by ItemAdd)
ImGuiNextWindowData NextWindowData;Storage for SetNextWindow** functions
bool DebugShowGroupRects;
bool GcCompactAll;Request full GC
ImGuiCol DebugFlashStyleColorIdx;(Keep close to ColorStack to share cache line)
ImVector<ImGuiColorMod> ColorStack;Stack for PushStyleColor()/PopStyleColor() - inherited by Begin()
ImVector<ImGuiStyleMod> StyleVarStack;Stack for PushStyleVar()/PopStyleVar() - inherited by Begin()
ImVector<ImGuiFocusScopeData> FocusScopeStack;Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin()
ImVector<ImGuiItemFlags> ItemFlagsStack;Stack for PushItemFlag()/PopItemFlag() - inherited by Begin()
ImVector<ImGuiGroupData> GroupStack;Stack for BeginGroup()/EndGroup() - not inherited by Begin()
ImVector<ImGuiPopupData> OpenPopupStack;Which popups are open (persistent)
ImVector<ImGuiPopupData> BeginPopupStack;Which level of BeginPopup() we are in (reset every frame)
ImVector<ImGuiTreeNodeStackData>TreeNodeStack;Stack for TreeNode()
ImVector<ImGuiViewportP*> Viewports;Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData.
ImGuiViewportP* CurrentViewport;We track changes of viewport (happening in Begin) so we can call Platform_OnChangedViewport()
ImGuiViewportP* MouseViewport;
ImGuiViewportP* MouseLastHoveredViewport;Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + honoring the _NoInputs flag.
ImGuiID PlatformLastFocusedViewportId;
ImGuiPlatformMonitor FallbackMonitor;Virtual monitor used as fallback if backend doesn’t provide monitor information.
ImRect PlatformMonitorsFullWorkRect;Bounding box of all platform monitors
int ViewportCreatedCount;Unique sequential creation counter (mostly for testing/debugging)
int PlatformWindowsCreatedCount;Unique sequential creation counter (mostly for testing/debugging)
int ViewportFocusedStampCount;Every time the front-most window changes, we stamp its viewport with an incrementing counter
bool NavCursorVisible;Nav focus cursor/rectangle is visible? We hide it after a mouse click. We show it after a nav move.
bool NavHighlightItemUnderNav;Disable mouse hovering highlight. Highlight navigation focused item instead of mouse hovered item.
bool NavMousePosDirty;When set we will update mouse position if io.ConfigNavMoveSetMousePos is set (not enabled by default)
bool NavIdIsAlive;Nav widget has been seen this frame ~~ NavRectRel is valid
ImGuiID NavId;Focused item for navigation
ImGuiWindow* NavWindow;Focused window for navigation. Could be called ‘FocusedWindow’
ImGuiID NavFocusScopeId;Focused focus scope (e.g. selection code often wants to “clear other items” when landing on an item of the same scope)
ImGuiNavLayer NavLayer;Focused layer (main scrolling layer, or menu/title bar layer)
ImGuiItemFlags NavIdItemFlags;
ImGuiID NavActivateId;~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItemByID()
ImGuiID NavActivateDownId;~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0
ImGuiID NavActivatePressedId;~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat)
ImGuiActivateFlags NavActivateFlags;
ImVector<ImGuiFocusScopeData> NavFocusRoute;Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
ImGuiID NavHighlightActivatedId;
float NavHighlightActivatedTimer;
ImGuiID NavOpenContextMenuItemId;
ImGuiID NavOpenContextMenuWindowId;
ImGuiID NavNextActivateId;Set by ActivateItemByID(), queued until next frame.
ImGuiActivateFlags NavNextActivateFlags;
ImGuiInputSource NavInputSource;Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Gamepad
ImGuiSelectionUserData NavLastValidSelectionUserData;Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn’t have selection data.
ImS8 NavCursorHideFrames;
bool NavAnyRequest;~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd()
bool NavInitRequest;Init request for appearing window to select first item
bool NavInitRequestFromMove;
ImGuiNavItemData NavInitResult;Init request result (first item of the window, or one for which SetItemDefaultFocus() was called)
bool NavMoveSubmitted;Move request submitted, will process result on next NewFrame()
bool NavMoveScoringItems;Move request submitted, still scoring incoming items
bool NavMoveForwardToNextFrame;
ImGuiNavMoveFlags NavMoveFlags;
ImGuiScrollFlags NavMoveScrollFlags;
ImGuiKeyChord NavMoveKeyMods;
ImGuiDir NavMoveDir;Direction of the move request (left/right/up/down)
ImGuiDir NavMoveDirForDebug;
ImGuiDir NavMoveClipDir;FIXME-NAV: Describe the purpose of this better. Might want to rename?
ImRect NavScoringRect;Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
ImRect NavScoringNoClipRect;Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep submitted. Unset/invalid if inverted.
int NavScoringDebugCount;Metrics for debugging
int NavTabbingDir;Generally -1 or +1, 0 when tabbing without a nav id
int NavTabbingCounter;>0 when counting items for tabbing
ImGuiNavItemData NavMoveResultLocal;Best move request candidate within NavWindow
ImGuiNavItemData NavMoveResultLocalVisible;Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
ImGuiNavItemData NavMoveResultOther;Best move request candidate within NavWindow’s flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
ImGuiNavItemData NavTabbingResultFirst;First tabbing request candidate within NavWindow and flattened hierarchy
ImGuiID NavJustMovedFromFocusScopeId;Just navigated from this focus scope id (result of a successfully MoveRequest).
ImGuiID NavJustMovedToId;Just navigated to this id (result of a successfully MoveRequest).
ImGuiID NavJustMovedToFocusScopeId;Just navigated to this focus scope id (result of a successfully MoveRequest).
ImGuiKeyChord NavJustMovedToKeyMods;
bool NavJustMovedToIsTabbing;Copy of ImGuiNavMoveFlags_IsTabbing. Maybe we should store whole flags.
bool NavJustMovedToHasSelectionData;Copy of move result’s ItemFlags & ImGuiItemFlags_HasSelectionUserData). Maybe we should just store ImGuiNavItemData.
bool ConfigNavEnableTabbing;= True. Enable tabbing (Tab, Shift+Tab). PLEASE LET ME KNOW IF YOU USE THIS.
bool ConfigNavWindowingWithGamepad;= True. Enable Ctrl+Tab by holding ImGuiKey_GamepadFaceLeft (== ImGuiKey_NavGamepadMenu). When False, the button may still be used to toggle Menu layer.
ImGuiKeyChord ConfigNavWindowingKeyNext;= ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). Set to 0 to disable. For reconfiguration (see #4828)
ImGuiKeyChord ConfigNavWindowingKeyPrev;= ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS X)
ImGuiWindow* NavWindowingTarget;Target window when doing Ctrl+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed top-most!
ImGuiWindow* NavWindowingTargetAnim;Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0, so the fade-out can stay on it.
ImGuiWindow* NavWindowingListWindow;Internal window actually listing the Ctrl+Tab contents
float NavWindowingTimer;
float NavWindowingHighlightAlpha;
ImGuiInputSource NavWindowingInputSource;
bool NavWindowingToggleLayer;Set while Alt or GamepadMenu is held, may be cleared by other operations, and processed when releasing the key.
ImGuiKey NavWindowingToggleKey;Keyboard/gamepad key used when toggling to menu layer.
ImVec2 NavWindowingAccumDeltaPos;
ImVec2 NavWindowingAccumDeltaSize;
float DimBgRatio;0.0..1.0 animation when fading in a dimming background (for modal window and Ctrl+Tab list)
bool DragDropActive;
bool DragDropWithinSource;Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag source.
bool DragDropWithinTarget;Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag target.
ImGuiDragDropFlags DragDropSourceFlags;
int DragDropSourceFrameCount;
int DragDropMouseButton;
ImGuiPayload DragDropPayload;
ImRect DragDropTargetRect;Store rectangle of current target candidate (we favor small targets when overlapping)
ImRect DragDropTargetClipRect;Store ClipRect at the time of item’s drawing
ImGuiID DragDropTargetId;
ImGuiID DragDropTargetFullViewport;
ImGuiDragDropFlags DragDropAcceptFlagsCurr;
ImGuiDragDropFlags DragDropAcceptFlagsPrev;
float DragDropAcceptIdCurrRectSurface;Target item surface (we resolve overlapping targets by prioritizing the smaller surface)
ImGuiID DragDropAcceptIdCurr;Target item id (set at the time of accepting the payload)
ImGuiID DragDropAcceptIdPrev;Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets)
int DragDropAcceptFrameCount;Last time a target expressed a desire to accept the source
ImGuiID DragDropHoldJustPressedId;Set when holding a payload just made ButtonBehavior() return a press.
ImVector<uchar> DragDropPayloadBufHeap;We don’t expose the ImVector<> directly, ImGuiPayload only holds pointer+size
int ClipperTempDataStacked;
ImVector<ImGuiListClipperData> ClipperTempData;
ImGuiTable* CurrentTable;
ImGuiID DebugBreakInTable;Set to break in BeginTable() call.
int TablesTempDataStacked;Temporary table data size (because we leave previous instances undestructed, we generally don’t use TablesTempData.Size)
ImVector<ImGuiTableTempData> TablesTempData;Temporary table data (buffers reused/shared across instances, support nesting)
ImVector<float> TablesLastTimeActive;Last used timestamp of each tables (SOA, for efficient GC)
ImVector<ImDrawChannel> DrawChannelsTempMergeBuffer;
ImGuiTabBar* CurrentTabBar;
ImVector<ImGuiPtrOrIndex> CurrentTabBarStack;
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer;
ImGuiBoxSelectState BoxSelectState;
ImGuiMultiSelectTempData* CurrentMultiSelect;
int MultiSelectTempDataStacked;Temporary multi-select data size (because we leave previous instances undestructed, we generally don’t use MultiSelectTempData.Size)
ImVector<ImGuiMultiSelectTempData> MultiSelectTempData;
ImGuiID HoverItemDelayId;
ImGuiID HoverItemDelayIdPreviousFrame;
float HoverItemDelayTimer;Currently used by IsItemHovered()
float HoverItemDelayClearTimer;Currently used by IsItemHovered(): grace time before g.TooltipHoverTimer gets cleared.
ImGuiID HoverItemUnlockedStationaryId;Mouse has once been stationary on this item. Only reset after departing the item.
ImGuiID HoverWindowUnlockedStationaryId;Mouse has once been stationary on this window. Only reset after departing the window.
ImGuiMouseCursor MouseCursor;
float MouseStationaryTimer;Time the mouse has been stationary (with some loose heuristic)
ImVec2 MouseLastValidPos;
ImGuiInputTextState InputTextState;
ImGuiTextIndex InputTextLineIndex;Temporary storage
ImGuiInputTextDeactivatedState InputTextDeactivatedState;
ImFontBaked InputTextPasswordFontBackupBaked;
ImFontFlags InputTextPasswordFontBackupFlags;
ImGuiID InputTextReactivateId;ID of InputText to reactivate on next frame (for io.ConfigInputTextEnterKeepActive behavior)
ImGuiID TempInputId;Temporary text input when using Ctrl+Click on a slider, etc.
ImGuiDataTypeStorage DataTypeZeroValue;0 for all data types
int BeginMenuDepth;
int BeginComboDepth;
ImGuiID ColorEditCurrentID;Set temporarily while inside of the parent-most ColorEdit4/ColorPicker4 (because they call each others).
ImGuiID ColorEditSavedID;ID we are saving/restoring HS for
float ColorEditSavedHue;Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips
float ColorEditSavedSat;Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV round trips
ImU32 ColorEditSavedColor;RGB value with alpha set to 0.
ImVec4 ColorPickerRef;Initial/reference color at the time of opening the color picker.
ImGuiComboPreviewData ComboPreviewData;
ImRect WindowResizeBorderExpectedRect;Expected border rect, switch to relative edit if moving
bool WindowResizeRelativeMode;
short ScrollbarSeekMode;0: scroll to clicked location, -1/+1: prev/next page.
float ScrollbarClickDeltaToGrabCenter;When scrolling to mouse location: distance between mouse and center of grab box, normalized in parent space.
float SliderGrabClickOffset;
float SliderCurrentAccum;Accumulated slider delta when using navigation controls.
bool SliderCurrentAccumDirty;Has the accumulated slider delta changed since last time we tried to apply it?
bool DragCurrentAccumDirty;
float DragCurrentAccum;Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
float DragSpeedDefaultRatio;If speed == 0.0, uses (max-min) * DragSpeedDefaultRatio
float DisabledAlphaBackup;Backup for style.Alpha for BeginDisabled()
short DisabledStackSize;
short TooltipOverrideCount;
ImGuiWindow* TooltipPreviousWindow;Window of last tooltip submitted during the frame
ImVector<char> ClipboardHandlerData;If no custom clipboard handler is defined
ImVector<ImGuiID> MenusIdSubmittedThisFrame;A list of menu IDs that were rendered at least once
ImGuiTypingSelectState TypingSelectState;State for GetTypingSelectRequest()
ImGuiPlatformImeData PlatformImeData;Data updated by current frame. Will be applied at end of the frame. For some backends, this is required to have WantVisible=True in order to receive text message.
ImGuiPlatformImeData PlatformImeDataPrev;Previous frame data. When changed we call the platform_io.Platform_SetImeDataFn() handler.
ImVector<ImTextureData*> UserTextures;List of textures created/managed by user or third-party extension. Automatically appended into platform_io.Textures[].
ImGuiDockContext DockContext;
ImGuiPackedDate SessionDate;Packed copy of platform_io.Platform_SessionDate, when valid.
bool SettingsLoaded;
float SettingsDirtyTimer;Save .ini Settings to memory when time reaches zero
ImGuiTextBuffer SettingsIniData;In memory .ini settings
ImVector<ImGuiSettingsHandler> SettingsHandlers;List of .ini settings handlers
ImGuiID HookIdNext;Next available HookId
bool LogEnabled;Currently capturing
bool LogLineFirstItem;
ImGuiLogFlags LogFlags;Capture flags/type
ImGuiWindow* LogWindow;
ImGuiTextBuffer LogBuffer;Accumulation buffer when log to clipboard. This is pointer so our GImGui static constructor doesn’t call heap allocators.
const char* LogNextPrefix;See comment in LogSetNextTextDecoration(): doesn’t copy underlying data, use carefully! # (const)
const char* LogNextSuffix;(const)
float LogLinePosY;
int LogDepthRef;
int LogDepthToExpand;
int LogDepthToExpandDefault;Default/stored value for LogDepthMaxExpand if not specified in the LogXXX function call.
void* ErrorCallbackUserData;= None
ImVec2 ErrorTooltipLockedPos;
bool ErrorFirst;
int ErrorCountCurrentFrame;[Internal] Number of errors submitted this frame.
ImGuiErrorRecoveryState StackSizesInNewFrame;[Internal]
ImGuiErrorRecoveryState*StackSizesInBeginForCurrentWindow;[Internal]
int DebugDrawIdConflictsCount;Locked count (preserved when holding Ctrl)
ImGuiDebugLogFlags DebugLogFlags;
ImGuiTextBuffer DebugLogBuf;
ImGuiTextIndex DebugLogIndex;
int DebugLogSkippedErrors;
ImGuiDebugLogFlags DebugLogAutoDisableFlags;
ImU8 DebugLogAutoDisableFrames;
ImU8 DebugLocateFrames;For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot above.
bool DebugBreakInLocateId;Debug break in ItemAdd() call for g.DebugLocateId.
ImGuiKeyChord DebugBreakKeyChord;= ImGuiKey_Pause
ImS8 DebugBeginReturnValueCullDepth;Cycle between 0..9 then wrap around.
bool DebugItemPickerActive;Item picker is active (started with DebugStartItemPicker())
ImU8 DebugItemPickerMouseButton;
ImGuiID DebugItemPickerBreakId;Will call IM_DEBUG_BREAK() when encountering this ID
float DebugFlashStyleColorTime;
ImVec4 DebugFlashStyleColorBackup;
ImGuiMetricsConfig DebugMetricsConfig;
ImGuiDebugItemPathQuery DebugItemPathQuery;
ImGuiIDStackTool DebugIDStackTool;
ImGuiDebugAllocInfo DebugAllocInfo;
ImGuiDockNode* DebugHoveredDockNode;Hovered dock node.
float FramerateSecPerFrame[60];ndarray[type=float, size=60] # Calculate estimate of framerate for user over the last 60 frames..
int FramerateSecPerFrameIdx;
int FramerateSecPerFrameCount;
float FramerateSecPerFrameAccum;
int WantCaptureMouseNextFrame;Explicit capture override via SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard(). Default to -1.
int WantCaptureKeyboardNextFrame;"
int WantTextInputNextFrame;Copied in EndFrame() from g.PlatformImeData.WantTextInput. Needs to be set for some backends (SDL3) to emit character inputs.
ImVector<char> TempBuffer;Temporary text buffer
Context::ImGuiContext
ImGuiContext(ImFontAtlas* shared_font_atlas);

ImGuiWindowTempData, ImGuiWindow

WindowTempData (struct)

Transient per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the DC variable name in ImGuiWindow. (That’s theory, in practice the delimitation between ImGuiWindow and ImGuiWindowTempData is quite tenuous and could be reconsidered..) (This doesn’t need a constructor because we zero-clear it as part of ImGuiWindow and all frame-temporary data are setup on Begin)

Member
ImVec2 CursorPos;Current emitting position, in absolute coordinates.
ImVec2 CursorPosPrevLine;
ImVec2 CursorStartPos;Initial position after Begin(), generally ~ window position + WindowPadding.
ImVec2 CursorMaxPos;Used to implicitly calculate ContentSize at the beginning of next frame, for scrolling range and auto-resize. Always growing during the frame.
ImVec2 IdealMaxPos;Used to implicitly calculate ContentSizeIdeal at the beginning of next frame, for auto-resize only. Always growing during the frame.
ImVec2 CurrLineSize;
ImVec2 PrevLineSize;
float CurrLineTextBaseOffset;Baseline offset (0.0 by default on a new line, generally == style.FramePadding.y when a framed item has been added).
float PrevLineTextBaseOffset;
bool IsSameLine;
bool IsSetPos;
ImVec1 Indent;Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
ImVec1 ColumnsOffset;Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
ImVec1 GroupOffset;
ImVec2 CursorStartPosLossyness;Record the loss of precision of CursorStartPos due to really large scrolling amount. This is used by clipper to compensate and fix the most common use case of large scroll area.
ImGuiNavLayer NavLayerCurrent;Current layer, 0..31 (we currently only use 0..1)
short NavLayersActiveMask;Which layers have been written to (result from previous frame)
short NavLayersActiveMaskNext;Which layers have been written to (accumulator for current frame)
bool NavIsScrollPushableX;Set when current work location may be scrolled horizontally when moving left / right. This is generally always True UNLESS within a column.
bool NavHideHighlightOneFrame;
bool NavWindowHasScrollY;Set per window when scrolling can be used (== ScrollMax.y > 0.0)
bool MenuBarAppending;FIXME: Remove this
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.
ImGuiMenuColumns MenuColumns;Simplified columns storage for menu items measurement
int TreeDepth;Current tree depth.
ImU32 TreeHasStackDataDepthMask;Store whether given depth has ImGuiTreeNodeStackData data. Could be turned into a ImU64 if necessary. Sync any changes with TREE_NODE_MAX_DEPTH/TREE_NODE_GET_DEPTH_MASK!
ImU32 TreeRecordsClippedNodesY2Mask;Store whether we should keep recording Y2. Cleared when passing clip max. Equivalent TreeHasStackDataDepthMask value should always be set.
ImVector<ImGuiWindow*> ChildWindows;
ImGuiStorage* StateStorage;Current persistent per-window storage (store e.g. tree node open/close state)
ImGuiOldColumns* CurrentColumns;Current columns set
int CurrentTableIdx;Current table index (into g.Tables)
ImGuiLayoutType LayoutType;
ImGuiLayoutType ParentLayoutType;Layout type of parent window at the time of Begin()
ImU32 ModalDimBgColor;
ImGuiItemStatusFlags WindowItemStatusFlags;
ImGuiItemStatusFlags ChildItemStatusFlags;
ImGuiItemStatusFlags DockTabItemStatusFlags;
ImRect DockTabItemRect;
float ItemWidth;Current item width (>0.0: width in pixels, <0.0: align xx pixels to the right of window).
float ItemWidthDefault;
float TextWrapPos;Current text wrap pos.
ImVector<float> ItemWidthStack;Store item widths to restore (attention: .back() is not == ItemWidth)
ImVector<float> TextWrapPosStack;Store text wrap pos to restore (attention: .back() is not == TextWrapPos)

Window (struct)

Storage for one window

Member
ImGuiContext* Ctx;Parent UI context (needs to be set explicitly by parent).
char* Name;Window name, owned by the window. # (read-only)
ImGuiID ID;== ImHashStr(Name)
ImGuiWindowFlags Flags,See enum ImGuiWindowFlags_
FlagsPreviousFrame;See enum ImGuiWindowFlags_
ImGuiChildFlags ChildFlags;Set when window is a child window. See enum ImGuiChildFlags_
ImGuiWindowClass WindowClass;Advanced users only. Set with SetNextWindowClass()
ImGuiViewportP* Viewport;Always set in Begin(). Inactive windows may have a None value here if their viewport was discarded.
ImGuiID ViewportId;We backup the viewport id (since the viewport may disappear or never be created if the window is inactive)
ImVec2 ViewportPos;We backup the viewport position (since the viewport may disappear or never be created if the window is inactive)
int ViewportAllowPlatformMonitorExtend;Reset to -1 every frame (index is guaranteed to be valid between NewFrame..EndFrame), only used in the Appearing frame of a tooltip/popup to enforce clamping to a given monitor
ImVec2 Pos;Position (always rounded-up to nearest pixel)
ImVec2 Size;Current size (==SizeFull or collapsed title bar size)
ImVec2 SizeFull;Size when non collapsed
ImVec2 ContentSize;Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous frame. Does not include window decoration or window padding.
ImVec2 ContentSizeIdeal;
ImVec2 ContentSizeExplicit;Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize().
ImVec2 WindowPadding;Window padding at the time of Begin().
float WindowRounding;Window rounding at the time of Begin(). May be clamped lower to avoid rendering artifacts with title bar, menu bar etc.
float WindowBorderSize;Window border size at the time of Begin().
float TitleBarHeight,Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you can change it to TitleBarHeight.
MenuBarHeight;Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you can change it to TitleBarHeight.
float DecoOuterSizeX1,Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0. Y1 generally = TitleBarHeight + MenuBarHeight). Locked during Begin().
DecoOuterSizeY1;Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0. Y1 generally = TitleBarHeight + MenuBarHeight). Locked during Begin().
float DecoOuterSizeX2,Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y).
DecoOuterSizeY2;Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y).
float DecoInnerSizeX1,Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen rows/columns are inside InnerRect (and not part of regular decoration sizes).
DecoInnerSizeY1;Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen rows/columns are inside InnerRect (and not part of regular decoration sizes).
int NameBufLen;Size of buffer storing Name. May be larger than strlen(Name)!
ImGuiID MoveId;== window->GetID(“#MOVE”)
ImGuiID TabId;== window->GetID(“#TAB”)
ImGuiID ChildId;ID of corresponding item in parent window (for navigation to return from child window to parent window)
ImGuiID PopupId;ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
ImVec2 Scroll;
ImVec2 ScrollMax;
ImVec2 ScrollTarget;target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0. (FLT_MAX for no change)
ImVec2 ScrollTargetCenterRatio;0.0 = scroll so that target position is at top, 0.5 = scroll so that target position is centered
ImVec2 ScrollTargetEdgeSnapDist;0.0 = no snapping, >0.0 snapping threshold
ImVec2 ScrollbarSizes;Size taken by each scrollbars on their smaller axis. Pay attention! ScrollbarSizes.x == width of the vertical scrollbar, ScrollbarSizes.y = height of the horizontal scrollbar.
bool ScrollbarX,Are scrollbars visible?
ScrollbarY;Are scrollbars visible?
bool ScrollbarXStabilizeEnabled;Was ScrollbarX previously auto-stabilized?
ImU8 ScrollbarXStabilizeToggledHistory;Used to stabilize scrollbar visibility in case of feedback loops
bool ViewportOwned;
bool Active;Set to True on Begin(), unless Collapsed
bool WasActive;
bool WriteAccessed;Set to True when any widget access the current window
bool Collapsed;Set when collapsing window to become only title-bar
bool WantCollapseToggle;
bool SkipItems;Set when items can safely be all clipped (e.g. window not visible or collapsed)
bool SkipRefresh;[EXPERIMENTAL] Reuse previous frame drawn contents, Begin() returns False.
bool Appearing;Set during the frame where the window is appearing (or re-appearing)
bool Hidden;Do not display (== HiddenFrames*** > 0)
bool IsFallbackWindow;Set on the “Debug##Default” window.
bool IsExplicitChild;Set when passed _ChildWindow, left to False by BeginDocked()
bool HasCloseButton;Set when the window has a close button (p_open != None)
signed char ResizeBorderHovered;Current border being hovered for resize (-1: none, otherwise 0-3)
signed char ResizeBorderHeld;Current border being held for resize (-1: none, otherwise 0-3)
short BeginCount;Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
short BeginCountPreviousFrame;Number of Begin() during the previous frame
short BeginOrderWithinParent;Begin() order within immediate parent window, if we are a child window. Otherwise 0.
short BeginOrderWithinContext;Begin() order within entire imgui context. This is mostly used for debugging submission order related issues.
short FocusOrder;Order within WindowsFocusOrder[], altered when windows are focused.
ImGuiDir AutoPosLastDirection;
ImS8 AutoFitFramesX,
AutoFitFramesY;
bool AutoFitOnlyGrows;
ImS8 HiddenFramesCanSkipItems;Hide the window for N frames
ImS8 HiddenFramesCannotSkipItems;Hide the window for N frames while allowing items to be submitted so we can measure their size
ImS8 HiddenFramesForRenderOnly;Hide the window until frame N at Render() time only
ImS8 DisableInputsFrames;Disable window interactions for N frames
ImVec2 SetWindowPosVal;store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
ImVec2 SetWindowPosPivot;store window pivot for positioning. ImVec2(0, 0) when positioning from top-left corner; ImVec2(0.5, 0.5) for centering; ImVec2(1, 1) for bottom right.
ImVector<ImGuiID> IDStack;ID stack. ID are hashes seeded with the value at the top of the stack. (In theory this should be in the TempData structure)
ImGuiWindowTempData DC;Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the “DC” variable name.
ImRect OuterRectClipped;== Window->Rect() just after setup in Begin(). == window->Rect() for root window.
ImRect InnerRect;Inner rectangle (omit title bar, menu bar, scroll bar)
ImRect InnerClipRect;== InnerRect shrunk by WindowPadding*0.5 on each side, clipped within viewport or parent clip rect.
ImRect WorkRect;Initially covers the whole scrolling region. Reduced by containers e.g columns/tables when active. Shrunk by WindowPadding*1.0 on each side. This is meant to replace ContentRegionRect over time (from 1.71+ onward).
ImRect ParentWorkRect;Backup of WorkRect before entering a container such as columns/tables. Used by e.g. SpanAllColumns functions to easily access. Stacked containers are responsible for maintaining this. // FIXME-WORKRECT: Could be a stack?
ImRect ClipRect;Current clipping/scissoring rectangle, evolve as we are using PushClipRect(), etc. == DrawList->clip_rect_stack.back().
ImRect ContentRegionRect;FIXME: This is currently confusing/misleading. It is essentially WorkRect but not handling of scrolling. We currently rely on it as right/bottom aligned sizing operation need some size to rely on.
ImVec2ih HitTestHoleSize;Define an optional rectangular hole where mouse will pass-through the window.
ImVec2ih HitTestHoleOffset;
int LastFrameActive;Last frame number the window was Active.
int LastFrameJustFocused;Last frame number the window was made Focused.
float LastTimeActive;Last timestamp the window was Active (using float as we don’t need high precision there)
ImGuiStorage StateStorage;
ImVector<ImGuiOldColumns> ColumnsStorage;
float FontWindowScale;User scale multiplier per-window, via SetWindowFontScale()
float FontWindowScaleParents;
float FontRefSize;This is a copy of window->CalcFontSize() at the time of Begin(), trying to phase out CalcFontSize() especially as it may be called on non-current window.
int SettingsOffset;Offset into SettingsWindows[] (offsets are always valid as we only grow the array from the back)
ImDrawList* DrawList;== &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
ImDrawList DrawListInst;
ImGuiWindow* ParentWindow;If we are a child or popup or docked window, this is pointing to our parent. Otherwise None.
ImGuiWindow* ParentWindowInBeginStack;
ImGuiWindow* RootWindow;Point to ourself or first ancestor that is not a child window. Doesn’t cross through popups/dock nodes.
ImGuiWindow* RootWindowPopupTree;Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child.
ImGuiWindow* RootWindowDockTree;Point to ourself or first ancestor that is not a child window. Cross through dock nodes.
ImGuiWindow* RootWindowForTitleBarHighlight;Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
ImGuiWindow* RootWindowForNav;Point to ourself or first ancestor which doesn’t have the NavFlattened flag.
ImGuiWindow* ParentWindowForFocusRoute;Set to manual link a window to its logical parent so that Shortcut() chain are honored (e.g. Tool linked to Document)
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.)
ImGuiID NavRootFocusScopeId;Focus Scope ID at the time of Begin()
int MemoryDrawListIdxCapacity;Backup of last idx/vtx count, so when waking up the window we can preallocate and avoid iterative alloc/copy
int MemoryDrawListVtxCapacity;
bool MemoryCompacted;Set when window extraneous data have been garbage collected
short DockOrder;Order of the last time the window was visible within its DockNode. This is used to reorder windows that are reappearing on the same frame. Same value between windows that were active and windows that were none are possible.
ImGuiWindowDockStyle DockStyle;
ImGuiDockNode* DockNode;Which node are we docked into. Important: Prefer testing DockIsActive in many cases as this will still be set when the dock node is hidden.
ImGuiDockNode* DockNodeAsHost;Which node are we owning (for parent windows)
ImGuiID DockId;Backup of last valid DockNode->ID, so single window remember their dock node id even when they are not bound any more
Window::ImGuiWindow
ImGuiWindow(ImGuiContext* context, const char* name);
Window::GetID
ImGuiID GetID(const char* str, const char* str_end = NULL);
ImGuiID GetID(const void* ptr);
ImGuiID GetID(int n);

(private API)

Window::GetIDFromPos
ImGuiID GetIDFromPos(const ImVec2& p_abs);

(private API)

Window::GetIDFromRectangle
ImGuiID GetIDFromRectangle(const ImRect& r_abs);

(private API)

Window::Rect
ImRect Rect() const;

(private API)

We don’t use g.FontSize because the window may be != g.CurrentWindow.

Window::TitleBarRect
ImRect TitleBarRect() const;

(private API)

Window::MenuBarRect
ImRect MenuBarRect() const;

(private API)

TabBarFlagsPrivate_ (enum)

Extend ImGuiTabBarFlags_

MemberValue
ImGuiTabBarFlags_DockNode = 1 << 201 << 20Part of a dock node [we don’t use this in the master branch but it facilitate branch syncing to keep this around]
ImGuiTabBarFlags_IsFocused = 1 << 211 << 21
ImGuiTabBarFlags_SaveSettings = 1 << 221 << 22FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty when reordering tabs

TabItemFlagsPrivate_ (enum)

Extend ImGuiTabItemFlags_

MemberValue
ImGuiTabItemFlags_SectionMask_ = ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_TrailingTabItemFlags_Leading | TabItemFlags_Trailing
ImGuiTabItemFlags_NoCloseButton = 1 << 201 << 20Track whether p_open was set or not (we’ll need this info on the next frame to recompute ContentWidth during layout)
ImGuiTabItemFlags_Button = 1 << 211 << 21Used by TabItemButton, change the tab item behavior to mimic a button
ImGuiTabItemFlags_Invisible = 1 << 221 << 22To reserve space e.g. with ImGuiTabItemFlags_Leading
ImGuiTabItemFlags_Unsorted = 1 << 231 << 23[Docking] Trailing tabs with the _Unsorted flag will be sorted based on the DockOrder of their Window.

TabItem (struct)

Storage for one active tab item (sizeof() 48 bytes)

Member
ImGuiID ID;
ImGuiTabItemFlags Flags;
ImGuiWindow* Window;When TabItem is part of a DockNode’s TabBar, we hold on to a window.
int LastFrameVisible;
int LastFrameSelected;This allows us to infer an ordered list of the last activated tabs with little maintenance
float Offset;Position relative to beginning of tab bar
float Width;Width currently displayed
float ContentWidth;Width of label + padding, stored during BeginTabItem() call (misnamed as “Content” would normally imply width of label only)
float RequestedWidth;Width optionally requested by caller, -1.0 is unused
ImS32 NameOffset;When Window==None, offset to name within parent ImGuiTabBar::TabsNames
ImS16 BeginOrder;BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable
ImS16 IndexDuringLayout;Index only used during TabBarLayout(). Tabs gets reordered so ‘Tabs[n].IndexDuringLayout == n’ but may mismatch during additions.
bool WantClose;Marked as closed by SetTabItemClosed()
TabItem::ImGuiTabItem
ImGuiTabItem();

TabBar (struct)

Storage for a tab bar (sizeof() 160 bytes)

Member
ImGuiWindow* Window;
ImVector<ImGuiTabItem> Tabs;
ImGuiTabBarFlags Flags;
ImGuiID ID;Zero for tab-bars used by docking
ImGuiID SelectedTabId;Selected tab/window
ImGuiID NextSelectedTabId;Next selected tab/window. Will also trigger a scrolling animation
ImGuiID NextScrollToTabId;
ImGuiID VisibleTabId;Can occasionally be != SelectedTabId (e.g. when previewing contents for Ctrl+Tab preview)
int CurrFrameVisible;
int PrevFrameVisible;
ImRect BarRect;
float BarRectPrevWidth;Backup of previous width. When width change we enforce keep horizontal scroll on focused tab.
float CurrTabsContentsHeight;
float PrevTabsContentsHeight;Record the height of contents submitted below the tab bar
float WidthAllTabs;Actual width of all tabs (locked during layout)
float WidthAllTabsIdeal;Ideal width if all tabs were visible and not clipped
float ScrollingAnim;
float ScrollingTarget;
float ScrollingTargetDistToVisibility;
float ScrollingSpeed;
float ScrollingRectMinX;
float ScrollingRectMaxX;
float SeparatorMinX;
float SeparatorMaxX;
ImGuiID ReorderRequestTabId;
ImS16 ReorderRequestOffset;
ImS8 BeginCount;
bool WantLayout;
bool VisibleTabWasSubmitted;
bool TabsAddedNew;Set to True when a new tab item or button has been added to the tab bar during last frame
bool ScrollButtonEnabled;
ImS16 TabsActiveCount;Number of tabs submitted this frame.
ImS16 LastTabItemIdx;Index of last BeginTabItem() tab for use by EndTabItem()
float ItemSpacingY;
ImVec2 FramePadding;style.FramePadding locked at the time of BeginTabBar()
ImVec2 BackupCursorPos;
ImGuiTextBuffer TabsNames;For non-docking tab bar we re-append names in a contiguous buffer.
TabBar::ImGuiTabBar
ImGuiTabBar();

Table support + internal API

TableColumn (struct)

[Internal] sizeof() ~ 120
We use the terminology “Enabled” to refer to a column that is not Hidden by user/api.
We use the terminology “Clipped” to refer to a column that is out of sight because of scrolling/clipping.
This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use “Visible” to mean “not clipped”.

Member
ImGuiTableColumnFlags Flags;Flags after some patching (not directly same as provided by user). See ImGuiTableColumnFlags_
float WidthGiven;Final/actual width visible == (MaxX - MinX), locked in TableUpdateLayout(). May be > WidthRequest to honor minimum width, may be < WidthRequest to honor shrinking columns down in tight space.
float MinX;Absolute positions
float MaxX;
float WidthRequest;Master width absolute value when !(Flags & _WidthStretch). When Stretch this is derived every frame from StretchWeight in TableUpdateLayout()
float WidthAuto;Automatic width
float WidthMax;Maximum width (FIXME: overwritten by each instance)
float StretchWeight;Master width weight when (Flags & _WidthStretch). Often around ~1.0 initially.
float InitStretchWeightOrWidth;Value passed to TableSetupColumn(). For Width it is a content width (without padding).
ImRect ClipRect;Clipping rectangle for the column
ImGuiID ID;Hash of column name (ignoring top of ID stack), used for .ini persistence when available.
ImGuiID UserData;(Optional) User data value passed to TableSetupColumn()
float WorkMinX;Contents region min ~(MinX + CellPaddingX + CellSpacingX1) == cursor start position when entering column
float WorkMaxX;Contents region max ~(MaxX - CellPaddingX - CellSpacingX2)
float ItemWidth;Current item width for the column, preserved across rows
float ContentMaxXFrozen;Contents maximum position for frozen rows (apart from headers), from which we can infer content width.
float ContentMaxXUnfrozen;
float ContentMaxXHeadersUsed;Contents maximum position for headers rows (regardless of freezing). TableHeader() automatically softclip itself + report ideal desired size, to avoid creating extraneous draw calls
float ContentMaxXHeadersIdeal;
ImS16 NameOffset;Offset into parent ColumnsNames[]
ImGuiTableColumnIdx DisplayOrder;Index within Table’s IndexToDisplayOrder[] (column may be reordered by users)
ImGuiTableColumnIdx IndexWithinEnabledSet;Index within enabled/visible set (<= IndexToDisplayOrder)
ImGuiTableColumnIdx PrevEnabledColumn;Index of prev enabled/visible column within Columns[], -1 if first enabled/visible column
ImGuiTableColumnIdx NextEnabledColumn;Index of next enabled/visible column within Columns[], -1 if last enabled/visible column
ImGuiTableColumnIdx SortOrder;Index of this column within sort specs, -1 if not sorting on this column, 0 for single-sort, may be >0 on multi-sort
ImGuiTableDrawChannelIdx DrawChannelCurrent;Index within DrawSplitter.Channels[]
ImGuiTableDrawChannelIdx DrawChannelFrozen;Draw channels for frozen rows (often headers)
ImGuiTableDrawChannelIdx DrawChannelUnfrozen;Draw channels for unfrozen rows
bool IsEnabled;IsUserEnabled && (Flags & ImGuiTableColumnFlags_Disabled) == 0
bool IsUserEnabled;Is the column not marked Hidden by the user? (unrelated to being off view, e.g. clipped by scrolling).
bool IsUserEnabledNextFrame;
bool IsVisibleX;Is actually in view (e.g. overlapping the host window clipping rectangle, not scrolled).
bool IsVisibleY;
bool IsRequestOutput;Return value for TableSetColumnIndex() / TableNextColumn(): whether we request user to output contents or not.
bool IsSkipItems;Do we want item submissions to this column to be completely ignored (no layout will happen).
ImS8 NavLayerCurrent;ImGuiNavLayer in 1 byte
ImU8 SortDirectionsAvailList;Ordered list of available sort directions (2-bits each, total 8-bits)
TableColumn::ImGuiTableColumn
ImGuiTableColumn();

TableReconcileColumnData (struct)

Passed to TableSetupColumn() sizeof() ~ 24+120 bytes

Member
ImGuiID ID;
ImS16 NameOffset;
ImGuiTableColumnFlags Flags;
float InitWidthOrWeight;
ImGuiID UserData;
ImGuiTableColumnIdx ColumnNewIdx;Index in the current table.
ImGuiTableColumnIdx ColumnOldIdx;Index in the previous frame table.
ImGuiTableColumn ColumnOldData;Full backup of the column. Could be avoided by storing 1 of them and applying reconcile in the right order. Not worth bothering.

TableCellData (struct)

Transient cell data stored per row. sizeof() ~ 6 bytes

Member
ImU32 BgColor;Actual color
ImGuiTableColumnIdx Column;Column number

TableHeaderData (struct)

Parameters for TableAngledHeadersRowEx()
This may end up being refactored for more general purpose. sizeof() ~ 12 bytes

Member
ImGuiTableColumnIdx Index;Column index
ImU32 TextColor;
ImU32 BgColor0;
ImU32 BgColor1;

TableInstanceData (struct)

Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) sizeof() ~ 24 bytes

Member
ImGuiID TableInstanceID;
float LastOuterHeight;Outer height from last frame
float LastTopHeadersRowHeight;Height of first consecutive header rows from last frame (FIXME: this is used assuming consecutive headers are in same frozen set)
float LastFrozenHeight;Height of frozen section from last frame
int HoveredRowLast;Index of row which was hovered last frame.
int HoveredRowNext;Index of row hovered this frame, set after encountering it.
TableInstanceData::ImGuiTableInstanceData
ImGuiTableInstanceData();

Table (struct)

sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory()

Member
ImGuiID ID;
ImGuiTableFlags Flags;
void* RawData;Single allocation to hold Columns[], DisplayOrderToIndex[], and RowCellData[]
ImGuiTableTempData* TempData;Transient data while table is active. Point within g.CurrentTableStack[]
ImGuiTableFlags SettingsLoadedFlags;Which data were loaded from the .ini file (e.g. when order is not altered we won’t save order)
int SettingsOffset;Offset in g.SettingsTables
int LastFrameActive;
int ColumnsCount;Number of columns declared in BeginTable()
int CurrentRow;
int CurrentColumn;
ImS16 InstanceCurrent;Count of BeginTable() calls with same ID in the same frame (generally 0). This is a little bit similar to BeginCount for a window, but multiple tables with the same ID are multiple tables, they are just synced.
ImS16 InstanceInteracted;Mark which instance (generally 0) of the same ID is being interacted with
float RowPosY1;
float RowPosY2;
float RowMinHeight;Height submitted to TableNextRow()
float RowCellPaddingY;Top and bottom padding. Reloaded during row change.
float RowTextBaseline;
float RowIndentOffsetX;
int RowBgColorCounter;Counter for alternating background colors (can be fast-forwarded by e.g clipper), not same as CurrentRow because header rows typically don’t increase this.
ImU32 RowBgColor[2];ndarray[type=ImU32, size=2] # Background color override for current row.
ImU32 BorderColorStrong;
ImU32 BorderColorLight;
float BorderX1;
float BorderX2;
float HostIndentX;
float MinColumnWidth;
float OuterPaddingX;
float CellPaddingX;Padding from each borders. Locked in BeginTable()/Layout.
float CellSpacingX1;Spacing between non-bordered cells. Locked in BeginTable()/Layout.
float CellSpacingX2;
float InnerWidth;User value passed to BeginTable(), see comments at the top of BeginTable() for details.
float ColumnsGivenWidth;Sum of current column width
float ColumnsAutoFitWidth;Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width submission in outer window
float ColumnsStretchSumWeights;Sum of weight of all enabled stretching columns
float ResizedColumnNextWidth;
float ResizeLockMinContentsX2;Lock minimum contents width while resizing down in order to not create feedback loops. But we allow growing the table.
float RefScale;Reference scale to be able to rescale columns on font/dpi changes.
float AngledHeadersHeight;Set by TableAngledHeadersRow(), used in TableUpdateLayout()
float AngledHeadersSlope;Set by TableAngledHeadersRow(), used in TableUpdateLayout()
ImRect OuterRect;Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable().
ImRect InnerRect;InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is "
ImRect WorkRect;
ImRect InnerClipRect;
ImRect BgClipRect;We use this to cpu-clip cell background color fill, evolve during the frame as we cross frozen rows boundaries
ImRect Bg0ClipRectForDrawCmd;Actual ImDrawCmd clip rect for BG0/1 channel. This tends to be == OuterWindow->ClipRect at BeginTable() because output in BG0/BG1 is cpu-clipped
ImRect Bg2ClipRectForDrawCmd;Actual ImDrawCmd clip rect for BG2 channel. This tends to be a correct, tight-fit, because output to BG2 are done by widgets relying on regular ClipRect.
ImRect HostClipRect;This is used to check if we can eventually merge our columns draw calls into the current draw call of the current window.
ImRect HostBackupInnerClipRect;Backup of InnerWindow->ClipRect during PushTableBackground()/PopTableBackground()
ImGuiWindow* OuterWindow;Parent window for the table
ImGuiWindow* InnerWindow;Window holding the table data (== OuterWindow or a child window)
ImGuiTextBuffer ColumnsNames;Contiguous buffer holding columns names
ImDrawListSplitter* DrawSplitter;Shortcut to TempData->DrawSplitter while in table. Isolate draw commands per columns to avoid switching clip rect constantly
ImGuiTableInstanceData InstanceDataFirst;
ImVector<ImGuiTableInstanceData> InstanceDataExtra;FIXME-OPT: Using a small-vector pattern would be good.
ImGuiTableColumnSortSpecs SortSpecsSingle;
ImVector<ImGuiTableColumnSortSpecs> SortSpecsMulti;FIXME-OPT: Using a small-vector pattern would be good.
ImGuiTableSortSpecs SortSpecs;Public facing sorts specs, this is what we return in TableGetSortSpecs()
ImGuiTableColumnIdx SortSpecsCount;
ImGuiTableColumnIdx ColumnsEnabledCount;Number of enabled columns (<= ColumnsCount)
ImGuiTableColumnIdx ColumnsEnabledFixedCount;Number of enabled columns using fixed width (<= ColumnsCount)
ImGuiTableColumnIdx DeclColumnsCount;Count calls to TableSetupColumn()
ImGuiTableColumnIdx AngledHeadersCount;Count columns with angled headers
ImGuiTableColumnIdx HoveredColumnBody;Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty region after the right-most column!
ImGuiTableColumnIdx HoveredColumnBorder;Index of column whose right-border is being hovered (for resizing).
ImGuiTableColumnIdx HighlightColumnHeader;Index of column which should be highlighted.
ImGuiTableColumnIdx AutoFitSingleColumn;Index of single column requesting auto-fit.
ImGuiTableColumnIdx ResizedColumn;Index of column being resized. Reset when InstanceCurrent==0.
ImGuiTableColumnIdx LastResizedColumn;Index of column being resized from previous frame.
ImGuiTableColumnIdx HeldHeaderColumn;Index of column header being held.
ImGuiTableColumnIdx LastHeldHeaderColumn;Index of column header being held from previous frame.
ImGuiTableColumnIdx ReorderColumn;Index of column being reordered. (not cleared)
ImGuiTableColumnIdx ReorderColumnDstOrder;Requested display order of column being reordered.
ImGuiTableColumnIdx LeftMostEnabledColumn;Index of left-most non-hidden column.
ImGuiTableColumnIdx RightMostEnabledColumn;Index of right-most non-hidden column.
ImGuiTableColumnIdx LeftMostStretchedColumn;Index of left-most stretched column.
ImGuiTableColumnIdx RightMostStretchedColumn;Index of right-most stretched column.
ImGuiTableColumnIdx ContextPopupColumn;Column right-clicked on, of -1 if opening context menu from a neutral/empty spot
ImGuiTableColumnIdx FreezeRowsRequest;Requested frozen rows count
ImGuiTableColumnIdx FreezeRowsCount;Actual frozen row count (== FreezeRowsRequest, or == 0 when no scrolling offset)
ImGuiTableColumnIdx FreezeColumnsRequest;Requested frozen columns count
ImGuiTableColumnIdx FreezeColumnsCount;Actual frozen columns count (== FreezeColumnsRequest, or == 0 when no scrolling offset)
ImGuiTableColumnIdx RowCellDataCurrent;Index of current RowCellData[] entry in current row
ImGuiTableDrawChannelIdx DummyDrawChannel;Redirect non-visible columns here.
ImGuiTableDrawChannelIdx Bg2DrawChannelCurrent;For Selectable() and other widgets drawing across columns after the freezing line. Index within DrawSplitter.Channels[]
ImGuiTableDrawChannelIdx Bg2DrawChannelUnfrozen;
ImS8 NavLayer;ImGuiNavLayer at the time of BeginTable().
bool IsLayoutLocked;Set by TableUpdateLayout() which is called when beginning the first row.
bool IsInsideRow;Set when inside TableBeginRow()/TableEndRow().
bool IsInitializing;
bool IsReconcileMode;
bool IsSortSpecsDirty;
bool IsUsingHeaders;Set when the first row had the ImGuiTableRowFlags_Headers flag.
bool IsContextPopupOpen;Set when default context menu is open (also see: ContextPopupColumn, InstanceInteracted).
bool DisableDefaultContextMenu;Disable default context menu. You may submit your own using TableBeginContextMenuPopup()/EndPopup()
bool IsSettingsRequestLoad;
bool IsSettingsDirty;Set when table settings have changed and needs to be reported into ImGuiTableSettings data.
bool IsDefaultDisplayOrder;Set when display order is unchanged from default (DisplayOrder contains 0...Count-1)
bool IsDefaultVisibility;Set when enabled/visibility is unchanged from default
bool IsResetAllRequest;Set to queue a call to TableResetSettings() in BeginTable()
bool IsResetDisplayOrderRequest;
bool IsResetVisibilityRequest;
bool IsUnfrozenRows;Set when we got past the frozen row.
bool IsDefaultSizingPolicy;Set if user didn’t explicitly set a sizing policy in BeginTable()
bool IsActiveIdAliveBeforeTable;
bool IsActiveIdInTable;
bool HasScrollbarYCurr;Whether ANY instance of this table had a vertical scrollbar during the current frame.
bool HasScrollbarYPrev;Whether ANY instance of this table had a vertical scrollbar during the previous.
bool MemoryCompacted;
bool HostSkipItems;Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis
Table::ImGuiTable
ImGuiTable();

TableTempData (struct)

Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table).

Member
ImGuiID WindowID;Shortcut to g.Tables[TableIndex]->OuterWindow->ID.
int TableIndex;Index in g.Tables.Buf[] pool
float LastTimeActive;Last timestamp this structure was used
float AngledHeadersExtraWidth;Used in EndTable()
ImVector<ImGuiTableHeaderData> AngledHeadersRequests;Used in TableAngledHeadersRow() // FIXME: Single instance is enough?
void* OldColumnsRawData;Used in BeginTable() -> TableUpdateLayout() when resizing.
ImVec2 UserOuterSize;outer_size.x passed to BeginTable()
ImDrawListSplitter DrawSplitter;
ImRect HostBackupWorkRect;Backup of InnerWindow->WorkRect at the end of BeginTable()
ImRect HostBackupParentWorkRect;Backup of InnerWindow->ParentWorkRect at the end of BeginTable()
ImVec2 HostBackupPrevLineSize;Backup of InnerWindow->DC.PrevLineSize at the end of BeginTable()
ImVec2 HostBackupCurrLineSize;Backup of InnerWindow->DC.CurrLineSize at the end of BeginTable()
ImVec2 HostBackupCursorMaxPos;Backup of InnerWindow->DC.CursorMaxPos at the end of BeginTable()
ImVec1 HostBackupColumnsOffset;Backup of OuterWindow->DC.ColumnsOffset at the end of BeginTable()
float HostBackupItemWidth;Backup of OuterWindow->DC.ItemWidth at the end of BeginTable()
int HostBackupItemWidthStackSize;Backup of OuterWindow->DC.ItemWidthStack.Size at the end of BeginTable()
TableTempData::ImGuiTableTempData
ImGuiTableTempData();

TableColumnSettings (struct)

sizeof() ~ 16

Member
float WidthOrWeight;
ImGuiID ID;
ImGuiTableColumnIdx Index;
ImGuiTableColumnIdx DisplayOrder;
ImGuiTableColumnIdx SortOrder;
TableColumnSettings::ImGuiTableColumnSettings
ImGuiTableColumnSettings();

TableSettings (struct)

This is designed to be stored in a single ImChunkStream (1 header followed by N ImGuiTableColumnSettings, etc.)

Member
ImGuiID ID;Set to 0 to invalidate/delete the setting
ImGuiTableFlags SaveFlags;Indicate data we want to save using the Resizable/Reorderable/Sortable/Hideable flags (could be using its own flags..)
float RefScale;Reference scale to be able to rescale columns on font/dpi changes.
ImGuiTableColumnIdx ColumnsCount;
ImGuiTableColumnIdx ColumnsCountMax;Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher
ImGuiPackedDate LastUsedDate;
TableSettings::ImGuiTableSettings
ImGuiTableSettings();
TableSettings::GetColumnSettings
ImGuiTableColumnSettings* GetColumnSettings();

(private API)

Tables: Candidates for public API

ImGui::TableOpenContextMenu

IMGUI_API void TableOpenContextMenu(int column_n = -1);

ImGui::TableSetColumnWidth

IMGUI_API void TableSetColumnWidth(int column_n, float width);

ImGui::TableSetColumnSortDirection

IMGUI_API void TableSetColumnSortDirection(int column_n, ImGuiSortDirection sort_direction, bool append_to_sort_specs);

ImGui::TableGetHoveredRow

IMGUI_API int TableGetHoveredRow();

Retrieve PREVIOUS FRAME hovered row. This difference with TableGetHoveredColumn() is the reason why this is not public yet.

ImGui::TableGetHeaderRowHeight

IMGUI_API float TableGetHeaderRowHeight();

ImGui::TableGetHeaderAngledMaxLabelWidth

IMGUI_API float TableGetHeaderAngledMaxLabelWidth();

ImGui::TablePushBackgroundChannel

IMGUI_API void TablePushBackgroundChannel();

ImGui::TablePopBackgroundChannel

IMGUI_API void TablePopBackgroundChannel();

ImGui::TablePushColumnChannel

IMGUI_API void TablePushColumnChannel(int column_n);

ImGui::TablePopColumnChannel

IMGUI_API void TablePopColumnChannel();

ImGui::TableAngledHeadersRowEx

IMGUI_API void TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label_width, const ImGuiTableHeaderData* data, int data_count);

ImGui::GetCurrentTable

inline ImGuiTable* GetCurrentTable();

Tables: Internals (private API)

ImGui::TableFindByID

IMGUI_API ImGuiTable* TableFindByID(ImGuiID id);

ImGui::BeginTableEx

IMGUI_API bool BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f);

ImGui::TableBeginInitMemory

IMGUI_API void TableBeginInitMemory(ImGuiTable* table, int columns_count);

ImGui::TableApplyQueuedRequests

IMGUI_API void TableApplyQueuedRequests(ImGuiTable* table);

ImGui::TableSetupDrawChannels

IMGUI_API void TableSetupDrawChannels(ImGuiTable* table);

ImGui::TableReconcileColumns

IMGUI_API void TableReconcileColumns(ImGuiTable* table);

ImGui::TableUpdateLayout

IMGUI_API void TableUpdateLayout(ImGuiTable* table);

ImGui::TableUpdateBorders

IMGUI_API void TableUpdateBorders(ImGuiTable* table);

ImGui::TableUpdateColumnsWeightFromWidth

IMGUI_API void TableUpdateColumnsWeightFromWidth(ImGuiTable* table);

ImGui::TableApplyExternalUnclipRect

IMGUI_API void TableApplyExternalUnclipRect(ImGuiTable* table, ImRect& rect);

ImGui::TableDrawBorders

IMGUI_API void TableDrawBorders(ImGuiTable* table);

ImGui::TableDrawDefaultContextMenu

IMGUI_API void TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display);

ImGui::TableBeginContextMenuPopup

IMGUI_API bool TableBeginContextMenuPopup(ImGuiTable* table);

ImGui::TableMergeDrawChannels

IMGUI_API void TableMergeDrawChannels(ImGuiTable* table);

ImGui::TableGetInstanceData

inline ImGuiTableInstanceData* TableGetInstanceData(ImGuiTable* table, int instance_no);

(private API)

ImGui::TableGetInstanceID

inline ImGuiID TableGetInstanceID(ImGuiTable* table, int instance_no);

(private API)

ImGui::TableFixDisplayOrder

IMGUI_API void TableFixDisplayOrder(ImGuiTable* table);

ImGui::TableSortSpecsSanitize

IMGUI_API void TableSortSpecsSanitize(ImGuiTable* table);

ImGui::TableSortSpecsBuild

IMGUI_API void TableSortSpecsBuild(ImGuiTable* table);

ImGui::TableInitColumnDefaults

IMGUI_API void TableInitColumnDefaults(ImGuiTable* table, ImGuiTableColumn* column, ImGuiTableColumnFlags init_mask);

ImGui::TableGetColumnNextSortDirection

IMGUI_API ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumn* column);

ImGui::TableFixColumnSortDirection

IMGUI_API void TableFixColumnSortDirection(ImGuiTable* table, ImGuiTableColumn* column);

ImGui::TableGetColumnWidthAuto

IMGUI_API float TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column);

ImGui::TableBeginRow

IMGUI_API void TableBeginRow(ImGuiTable* table);

ImGui::TableEndRow

IMGUI_API void TableEndRow(ImGuiTable* table);

ImGui::TableBeginCell

IMGUI_API void TableBeginCell(ImGuiTable* table, int column_n);

ImGui::TableEndCell

IMGUI_API void TableEndCell(ImGuiTable* table);

ImGui::TableGetCellBgRect

IMGUI_API ImRect TableGetCellBgRect(const ImGuiTable* table, int column_n);

ImGui::TableGetColumnName

IMGUI_API const char* TableGetColumnName(const ImGuiTable* table, int column_n);

ImGui::TableGetColumnResizeID

IMGUI_API ImGuiID TableGetColumnResizeID(ImGuiTable* table, int column_n, int instance_no = 0);

ImGui::TableCalcMaxColumnWidth

IMGUI_API float TableCalcMaxColumnWidth(const ImGuiTable* table, int column_n);

ImGui::TableSetColumnWidthAutoSingle

IMGUI_API void TableSetColumnWidthAutoSingle(ImGuiTable* table, int column_n);

ImGui::TableSetColumnWidthAutoAll

IMGUI_API void TableSetColumnWidthAutoAll(ImGuiTable* table);

ImGui::TableSetColumnDisplayOrder

IMGUI_API void TableSetColumnDisplayOrder(ImGuiTable* table, int column_n, int dst_order);

ImGui::TableQueueSetColumnDisplayOrder

IMGUI_API void TableQueueSetColumnDisplayOrder(ImGuiTable* table, int column_n, int dst_order);

ImGui::TableRemove

IMGUI_API void TableRemove(ImGuiTable* table);

ImGui::TableGcCompactTransientBuffers

IMGUI_API void TableGcCompactTransientBuffers(ImGuiTable* table);
IMGUI_API void TableGcCompactTransientBuffers(ImGuiTableTempData* table);

ImGui::TableGcCompactSettings

IMGUI_API void TableGcCompactSettings();

Tables: Settings

ImGui::TableLoadSettings

IMGUI_API void TableLoadSettings(ImGuiTable* table);

ImGui::TableLoadSettingsForColumns

IMGUI_API void TableLoadSettingsForColumns(ImGuiTable* table);

ImGui::TableLoadSettingsForColumn

IMGUI_API void TableLoadSettingsForColumn(ImGuiTableColumn* column, ImGuiTableColumnSettings* column_settings, ImGuiTableFlags load_flags);

ImGui::TableSaveSettings

IMGUI_API void TableSaveSettings(ImGuiTable* table);

ImGui::TableResetSettings

IMGUI_API void TableResetSettings(ImGuiTable* table);

ImGui::TableGetBoundSettings

IMGUI_API ImGuiTableSettings* TableGetBoundSettings(ImGuiTable* table);

ImGui::TableSettingsAddSettingsHandler

IMGUI_API void TableSettingsAddSettingsHandler();

ImGui::TableSettingsCreate

IMGUI_API ImGuiTableSettings* TableSettingsCreate(ImGuiID id, int columns_count);

ImGui::TableSettingsFindByID

IMGUI_API ImGuiTableSettings* TableSettingsFindByID(ImGuiID id);

ImGui::SetWindowClipRectBeforeSetChannel

IMGUI_API void SetWindowClipRectBeforeSetChannel(ImGuiWindow* window, const ImRect& clip_rect);

Legacy Columns API (this is not exposed because we will encourage transitioning to the Tables API)

ImGui::BeginColumns

IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiOldColumnFlags flags = 0);

setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().

ImGui::EndColumns

IMGUI_API void EndColumns();

close columns

ImGui::PushColumnClipRect

IMGUI_API void PushColumnClipRect(int column_index);

ImGui::PushColumnsBackground

IMGUI_API void PushColumnsBackground();

ImGui::PopColumnsBackground

IMGUI_API void PopColumnsBackground();

ImGui::GetColumnsID

IMGUI_API ImGuiID GetColumnsID(const char* str_id, int count);

ImGui::FindOrCreateColumns

IMGUI_API ImGuiOldColumns* FindOrCreateColumns(ImGuiWindow* window, ImGuiID id);

ImGui::GetColumnOffsetFromNorm

IMGUI_API float GetColumnOffsetFromNorm(const ImGuiOldColumns* columns, float offset_norm);

ImGui::GetColumnNormFromOffset

IMGUI_API float GetColumnNormFromOffset(const ImGuiOldColumns* columns, float offset);
}

ImGui internal API

No guarantee of forward compatibility here!

Windows
We should always have a CurrentWindow in the stack (there is an implicit “Debug” window)
If this ever crashes because g.CurrentWindow is None, it means that either:

ImGui::GetIO

IMGUI_API ImGuiIO& GetIO(ImGuiContext* ctx);

ImGui::GetPlatformIO

IMGUI_API ImGuiPlatformIO& GetPlatformIO(ImGuiContext* ctx);

ImGui::GetScale

inline float GetScale();

(private API)

FIXME-DPI: I don’t want to formalize this just yet. Because reasons. Please don’t use.

ImGui::GetCurrentWindowRead

inline ImGuiWindow* GetCurrentWindowRead();

(private API)

ImGui::FindWindowByID

IMGUI_API ImGuiWindow* FindWindowByID(ImGuiID id);

ImGui::FindWindowByName

IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
IMGUI_API void UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window);

ImGui::UpdateWindowSkipRefresh

IMGUI_API void UpdateWindowSkipRefresh(ImGuiWindow* window);

ImGui::CalcWindowNextAutoFitSize

IMGUI_API ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow* window);

ImGui::IsWindowChildOf

IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent, bool popup_hierarchy, bool dock_hierarchy);

ImGui::IsWindowInBeginStack

IMGUI_API bool IsWindowInBeginStack(ImGuiWindow* window);

ImGui::IsWindowWithinBeginStackOf

IMGUI_API bool IsWindowWithinBeginStackOf(ImGuiWindow* window, ImGuiWindow* potential_parent);

ImGui::IsWindowAbove

IMGUI_API bool IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below);

ImGui::IsWindowNavFocusable

IMGUI_API bool IsWindowNavFocusable(ImGuiWindow* window);

ImGui::SetWindowPos

IMGUI_API void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0);

ImGui::SetWindowSize

IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0);

ImGui::SetWindowCollapsed

IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0);

ImGui::SetWindowHitTestHole

IMGUI_API void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size);

ImGui::SetWindowHiddenAndSkipItemsForCurrentFrame

IMGUI_API void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window);

ImGui::SetWindowParentWindowForFocusRoute

inline void SetWindowParentWindowForFocusRoute(ImGuiWindow* window, ImGuiWindow* parent_window);

(private API)

You may also use SetNextWindowClass()'s FocusRouteParentWindowId field.

ImGui::WindowRectAbsToRel

inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r);

(private API)

ImGui::WindowRectRelToAbs

inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r);

(private API)

ImGui::WindowPosAbsToRel

inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p);

(private API)

ImGui::WindowPosRelToAbs

inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p);

(private API)

ImGui::SetNextWindowFlags

IMGUI_API void SetNextWindowFlags(ImGuiWindowFlags flags, bool enabled);

ImGui::SetNextWindowChildFlags

IMGUI_API void SetNextWindowChildFlags(ImGuiChildFlags flags, bool enabled);

Windows: Display Order and Focus Order

ImGui::FocusWindow

IMGUI_API void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0);

ImGui::FocusTopMostWindowUnderOne

IMGUI_API void FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window, ImGuiViewport* filter_viewport, ImGuiFocusRequestFlags flags);

ImGui::BringWindowToFocusFront

IMGUI_API void BringWindowToFocusFront(ImGuiWindow* window);

ImGui::BringWindowToDisplayFront

IMGUI_API void BringWindowToDisplayFront(ImGuiWindow* window);

ImGui::BringWindowToDisplayBack

IMGUI_API void BringWindowToDisplayBack(ImGuiWindow* window);

ImGui::BringWindowToDisplayBehind

IMGUI_API void BringWindowToDisplayBehind(ImGuiWindow* window, ImGuiWindow* above_window);

ImGui::FindWindowDisplayIndex

IMGUI_API int FindWindowDisplayIndex(ImGuiWindow* window);

ImGui::FindBottomMostVisibleWindowWithinBeginStack

IMGUI_API ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window);

ImGui::SetNextWindowRefreshPolicy

IMGUI_API void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags);

Windows: Idle, Refresh Policies [EXPERIMENTAL]

Fonts, drawing

ImGui::RegisterUserTexture

IMGUI_API void RegisterUserTexture(ImTextureData* tex);

Register external texture. EXPERIMENTAL.

ImGui::UnregisterUserTexture

IMGUI_API void UnregisterUserTexture(ImTextureData* tex);

ImGui::RegisterFontAtlas

IMGUI_API void RegisterFontAtlas(ImFontAtlas* atlas);

ImGui::UnregisterFontAtlas

IMGUI_API void UnregisterFontAtlas(ImFontAtlas* atlas);

ImGui::SetCurrentFont

IMGUI_API void SetCurrentFont(ImFont* font, float font_size_before_scaling, float font_size_after_scaling);

ImGui::UpdateCurrentFontSize

IMGUI_API void UpdateCurrentFontSize(float restore_font_size_after_scaling);

ImGui::SetPixelDensity

IMGUI_API void SetPixelDensity(float pixel_density);

was SetFontRasterizerDensity()

ImGui::GetPixelDensity

inline float GetPixelDensity();

(private API)

ImGui::GetRoundedFontSize

inline float GetRoundedFontSize(float size);

(private API)

ImGui::GetDefaultFont

IMGUI_API ImFont* GetDefaultFont();

ImGui::PushPasswordFont

IMGUI_API void PushPasswordFont();

ImGui::PopPasswordFont

IMGUI_API void PopPasswordFont();

ImGui::GetForegroundDrawList

inline ImDrawList* GetForegroundDrawList(ImGuiWindow* window);

(private API)

ImGui::AddDrawListToDrawDataEx

IMGUI_API void AddDrawListToDrawDataEx(ImDrawData* draw_data, ImVector<ImDrawList*>* out_list, ImDrawList* draw_list);

Init

ImGui::Initialize

IMGUI_API void Initialize();

ImGui::Shutdown

IMGUI_API void Shutdown();

Since 1.60 this is a private function. You can call DestroyContext() to destroy the context created by CreateContext().

Context name & generic context hooks

ImGui::SetContextName

IMGUI_API void SetContextName(ImGuiContext* ctx, const char* name);

ImGui::AddContextHook

IMGUI_API ImGuiID AddContextHook(ImGuiContext* ctx, const ImGuiContextHook* hook);

ImGui::RemoveContextHook

IMGUI_API void RemoveContextHook(ImGuiContext* ctx, ImGuiID hook_to_remove);

ImGui::CallContextHooks

IMGUI_API void CallContextHooks(ImGuiContext* ctx, ImGuiContextHookType type);

NewFrame

ImGui::UpdateInputEvents

IMGUI_API void UpdateInputEvents(bool trickle_fast_inputs);

ImGui::UpdateHoveredWindowAndCaptureFlags

IMGUI_API void UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos);

ImGui::StartMouseMovingWindow

IMGUI_API void StartMouseMovingWindow(ImGuiWindow* window);

ImGui::StartMouseMovingWindowOrNode

IMGUI_API void StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock);

ImGui::StopMouseMovingWindow

IMGUI_API void StopMouseMovingWindow();

ImGui::UpdateMouseMovingWindowNewFrame

IMGUI_API void UpdateMouseMovingWindowNewFrame();

ImGui::UpdateMouseMovingWindowEndFrame

IMGUI_API void UpdateMouseMovingWindowEndFrame();

Viewports

ImGui::TranslateWindowsInViewport

IMGUI_API void TranslateWindowsInViewport(ImGuiViewportP* viewport, const ImVec2& old_pos, const ImVec2& new_pos, const ImVec2& old_size, const ImVec2& new_size);

ImGui::ScaleWindowsInViewport

IMGUI_API void ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale);

ImGui::DestroyPlatformWindow

IMGUI_API void DestroyPlatformWindow(ImGuiViewportP* viewport);

ImGui::SetWindowViewport

IMGUI_API void SetWindowViewport(ImGuiWindow* window, ImGuiViewportP* viewport);

ImGui::SetCurrentViewport

IMGUI_API void SetCurrentViewport(ImGuiWindow* window, ImGuiViewportP* viewport);

ImGui::GetViewportPlatformMonitor

IMGUI_API const ImGuiPlatformMonitor* GetViewportPlatformMonitor(ImGuiViewport* viewport);

ImGui::FindHoveredViewportFromPlatformWindowStack

IMGUI_API ImGuiViewportP* FindHoveredViewportFromPlatformWindowStack(const ImVec2& mouse_platform_pos);

Settings

ImGui::MarkIniSettingsDirty

IMGUI_API void MarkIniSettingsDirty();
IMGUI_API void MarkIniSettingsDirty(ImGuiWindow* window);

ImGui::ClearIniSettings

IMGUI_API void ClearIniSettings();

ImGui::CleanupIniSettings

IMGUI_API void CleanupIniSettings(ImGuiSettingsCleanupArgs* args);

[BETA] Expected to turn into a public API. Please report if you are using this!

ImGui::AddSettingsHandler

IMGUI_API void AddSettingsHandler(const ImGuiSettingsHandler* handler);

ImGui::RemoveSettingsHandler

IMGUI_API void RemoveSettingsHandler(const char* type_name);

ImGui::FindSettingsHandler

IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name);

Settings - Windows

ImGui::CreateNewWindowSettings

IMGUI_API ImGuiWindowSettings* CreateNewWindowSettings(const char* name);

ImGui::FindWindowSettingsByID

IMGUI_API ImGuiWindowSettings* FindWindowSettingsByID(ImGuiID id);

ImGui::FindWindowSettingsByWindow

IMGUI_API ImGuiWindowSettings* FindWindowSettingsByWindow(ImGuiWindow* window);

ImGui::ClearWindowSettings

IMGUI_API void ClearWindowSettings(const char* name);

ImGui::LocalizeRegisterEntries

IMGUI_API void LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count);

Localization

ImGui::LocalizeGetMsg

inline const char* LocalizeGetMsg(ImGuiLocKey key);

(private API)

Scrolling

ImGui::SetScrollX

IMGUI_API void SetScrollX(ImGuiWindow* window, float scroll_x);

ImGui::SetScrollY

IMGUI_API void SetScrollY(ImGuiWindow* window, float scroll_y);

ImGui::SetScrollFromPosX

IMGUI_API void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio);

ImGui::SetScrollFromPosY

IMGUI_API void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio);

ImGui::ScrollToItem

IMGUI_API void ScrollToItem(ImGuiScrollFlags flags = 0);

Early work-in-progress API (ScrollToItem() will become public)

ImGui::ScrollToRect

IMGUI_API void ScrollToRect(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0);

ImGui::ScrollToRectEx

IMGUI_API ImVec2 ScrollToRectEx(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0);

ImGui::ScrollToBringRectIntoView

inline void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& rect);

#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS (private API)

Basic Accessors

ImGui::GetItemStatusFlags

inline ImGuiItemStatusFlags GetItemStatusFlags();

(private API)

ImGui::GetActiveID

inline ImGuiID GetActiveID();

(private API)

ImGui::GetFocusID

inline ImGuiID GetFocusID();

(private API)

ImGui::SetActiveID

IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window);

ImGui::SetFocusID

IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow* window);

ImGui::ClearActiveID

IMGUI_API void ClearActiveID();

ImGui::GetHoveredID

IMGUI_API ImGuiID GetHoveredID();

ImGui::SetHoveredID

IMGUI_API void SetHoveredID(ImGuiID id);

ImGui::KeepAliveID

IMGUI_API void KeepAliveID(ImGuiID id);

ImGui::MarkItemEdited

IMGUI_API void MarkItemEdited(ImGuiID id);

Mark data associated to given item as “edited”, used by IsItemDeactivatedAfterEdit() function.

ImGui::PushOverrideID

IMGUI_API void PushOverrideID(ImGuiID id);

Push given value as-is at the top of the ID stack (whereas PushID combines old and new hashes)

ImGui::GetIDWithSeed

IMGUI_API ImGuiID GetIDWithSeed(const char* str_id_begin, const char* str_id_end, ImGuiID seed);
IMGUI_API ImGuiID GetIDWithSeed(int n, ImGuiID seed);

ImGui::ItemSize

IMGUI_API void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f);
inline void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f);

Basic Helpers for widget code

ImGui::ItemAdd

IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0);

ImGui::ItemHoverable

IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flags);

ImGui::IsWindowContentHoverable

IMGUI_API bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flags = 0);

ImGui::IsClippedEx

IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id);

ImGui::SetLastItemData

IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect);

ImGui::CalcItemSize

IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);

ImGui::CalcWrapWidthForPos

IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);

ImGui::PushMultiItemsWidths

IMGUI_API void PushMultiItemsWidths(int components, float width_full);

ImGui::ShrinkWidths

IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess, float width_min);

ImGui::CalcClipRectVisibleItemsY

IMGUI_API void CalcClipRectVisibleItemsY(const ImRect& clip_rect, const ImVec2& pos, float items_height, int* out_visible_start, int* out_visible_end);

Parameter stacks (shared)

ImGui::GetStyleVarInfo

IMGUI_API const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx);

ImGui::BeginDisabledOverrideReenable

IMGUI_API void BeginDisabledOverrideReenable();

ImGui::EndDisabledOverrideReenable

IMGUI_API void EndDisabledOverrideReenable();

Logging/Capture

ImGui::LogBegin

IMGUI_API void LogBegin(ImGuiLogFlags flags, int auto_open_depth);

-> BeginCapture() when we design v2 api, for now stay under the radar by using the old name.

ImGui::LogToBuffer

IMGUI_API void LogToBuffer(int auto_open_depth = -1);

Start logging/capturing to internal buffer

ImGui::LogRenderedText

IMGUI_API void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL);

ImGui::LogSetNextTextDecoration

IMGUI_API void LogSetNextTextDecoration(const char* prefix, const char* suffix);

Childs

ImGui::BeginChildEx

IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags);

ImGui::FindFrontMostVisibleChildWindow

IMGUI_API ImGuiWindow* FindFrontMostVisibleChildWindow(ImGuiWindow* window);

Popups, Modals

ImGui::BeginPopupEx

IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_window_flags);

ImGui::BeginPopupMenuEx

IMGUI_API bool BeginPopupMenuEx(ImGuiID id, const char* label, ImGuiWindowFlags extra_window_flags);

ImGui::OpenPopupEx

IMGUI_API bool OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None);

ImGui::ClosePopupToLevel

IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup);

ImGui::ClosePopupsOverWindow

IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup);

ImGui::ClosePopupsExceptModals

IMGUI_API void ClosePopupsExceptModals();

ImGui::IsPopupOpen

IMGUI_API bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags);

ImGui::GetPopupAllowedExtentRect

IMGUI_API ImRect GetPopupAllowedExtentRect(ImGuiWindow* window);

ImGui::GetTopMostPopupModal

IMGUI_API ImGuiWindow* GetTopMostPopupModal();

ImGui::GetTopMostAndVisiblePopupModal

IMGUI_API ImGuiWindow* GetTopMostAndVisiblePopupModal();

ImGui::FindBlockingModal

IMGUI_API ImGuiWindow* FindBlockingModal(ImGuiWindow* window);

ImGui::FindBestWindowPosForPopup

IMGUI_API ImVec2 FindBestWindowPosForPopup(ImGuiWindow* window);

ImGui::FindBestWindowPosForPopupEx

IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy);

ImGui::GetMouseButtonFromPopupFlags

IMGUI_API ImGuiMouseButton GetMouseButtonFromPopupFlags(ImGuiPopupFlags flags);

ImGui::IsPopupOpenRequestForItem

IMGUI_API bool IsPopupOpenRequestForItem(ImGuiPopupFlags flags, ImGuiID id);

ImGui::IsPopupOpenRequestForWindow

IMGUI_API bool IsPopupOpenRequestForWindow(ImGuiPopupFlags flags);

Tooltips

ImGui::BeginTooltipEx

IMGUI_API bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags);

ImGui::BeginTooltipHidden

IMGUI_API bool BeginTooltipHidden();

ImGui::BeginViewportSideBar

IMGUI_API bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags);

ImGui::BeginMenuEx

IMGUI_API bool BeginMenuEx(const char* label, const char* icon, bool enabled = true);

ImGui::MenuItemEx

IMGUI_API bool MenuItemEx(const char* label, const char* icon, const char* shortcut = NULL, bool selected = false, bool enabled = true);

Combos

ImGui::BeginComboPopup

IMGUI_API bool BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags flags);

ImGui::BeginComboPreview

IMGUI_API bool BeginComboPreview();

Submit preview contents a combo. Call this after EndCombo() to display contents that’s more than just a text label.

ImGui::EndComboPreview

IMGUI_API void EndComboPreview();

Keyboard/Gamepad Navigation

ImGui::NavInitWindow

IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);

ImGui::NavInitRequestApplyResult

IMGUI_API void NavInitRequestApplyResult();

ImGui::NavMoveRequestButNoResultYet

IMGUI_API bool NavMoveRequestButNoResultYet();

ImGui::NavMoveRequestSubmit

IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);

ImGui::NavMoveRequestForward

IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);

ImGui::NavMoveRequestResolveWithLastItem

IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result);

ImGui::NavMoveRequestResolveWithPastTreeNode

IMGUI_API void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, const ImGuiTreeNodeStackData* tree_node_data);

ImGui::NavMoveRequestCancel

IMGUI_API void NavMoveRequestCancel();

ImGui::NavMoveRequestApplyResult

IMGUI_API void NavMoveRequestApplyResult();

ImGui::NavMoveRequestTryWrapping

IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags);

ImGui::NavHighlightActivated

IMGUI_API void NavHighlightActivated(ImGuiID id);

ImGui::NavClearPreferredPosForAxis

IMGUI_API void NavClearPreferredPosForAxis(ImGuiAxis axis);

ImGui::SetNavCursorVisibleAfterMove

IMGUI_API void SetNavCursorVisibleAfterMove();

ImGui::NavUpdateCurrentWindowIsScrollPushableX

IMGUI_API void NavUpdateCurrentWindowIsScrollPushableX();

ImGui::SetNavWindow

IMGUI_API void SetNavWindow(ImGuiWindow* window);

ImGui::SetNavID

IMGUI_API void SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id, const ImRect& rect_rel);

ImGui::SetNavFocusScope

IMGUI_API void SetNavFocusScope(ImGuiID focus_scope_id);

Focus/Activation

This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are much harder to design and implement than expected. I have a couple of private branches on this matter but it’s not simple. For now implementing the easy ones.

ImGui::FocusItem

IMGUI_API void FocusItem();

Focus last item (no selection/activation).

ImGui::ActivateItemByID

IMGUI_API void ActivateItemByID(ImGuiID id);

Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again. Was called ‘ActivateItem()’ before 1.89.7.

Inputs

FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions.

ImGui::IsNamedKey

inline bool IsNamedKey(ImGuiKey key);

(private API)

ImGui::IsNamedKeyOrMod

inline bool IsNamedKeyOrMod(ImGuiKey key);

(private API)

ImGui::IsLegacyKey

inline bool IsLegacyKey(ImGuiKey key);

(private API)

ImGui::IsKeyboardKey

inline bool IsKeyboardKey(ImGuiKey key);

(private API)

ImGui::IsGamepadKey

inline bool IsGamepadKey(ImGuiKey key);

(private API)

ImGui::IsMouseKey

inline bool IsMouseKey(ImGuiKey key);

(private API)

ImGui::IsAliasKey

inline bool IsAliasKey(ImGuiKey key);

(private API)

ImGui::IsLRModKey

inline bool IsLRModKey(ImGuiKey key);

(private API)

ImGui::FixupKeyChord

ImGuiKeyChord FixupKeyChord(ImGuiKeyChord key_chord);

(private API)

ImGui::ConvertSingleModFlagToKey

inline ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key);

(private API)

ImGui::GetKeyData

IMGUI_API ImGuiKeyData* GetKeyData(ImGuiContext* ctx, ImGuiKey key);
inline ImGuiKeyData* GetKeyData(ImGuiKey key);

(private API)

ImGui::MouseButtonToKey

inline ImGuiKey MouseButtonToKey(ImGuiMouseButton button);

(private API)

ImGui::IsMouseDragPastThreshold

IMGUI_API bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold = -1.0f);

ImGui::GetKeyMagnitude2d

IMGUI_API ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down);

ImGui::GetNavTweakPressedAmount

IMGUI_API float GetNavTweakPressedAmount(ImGuiAxis axis);

ImGui::CalcTypematicRepeatAmount

IMGUI_API int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate);

ImGui::GetTypematicRepeatRate

IMGUI_API void GetTypematicRepeatRate(ImGuiInputFlags flags, float* repeat_delay, float* repeat_rate);

ImGui::TeleportMousePos

IMGUI_API void TeleportMousePos(const ImVec2& pos);

ImGui::SetActiveIdUsingAllKeyboardKeys

IMGUI_API void SetActiveIdUsingAllKeyboardKeys();

ImGui::IsActiveIdUsingNavDir

inline bool IsActiveIdUsingNavDir(ImGuiDir dir);

(private API)

[EXPERIMENTAL] Low-Level: Key/Input Ownership

ImGui::GetKeyOwner

IMGUI_API ImGuiID GetKeyOwner(ImGuiKey key);

ImGui::SetKeyOwner

IMGUI_API void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0);

ImGui::SetKeyOwnersForKeyChord

IMGUI_API void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0);

ImGui::SetItemKeyOwner

IMGUI_API bool SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags);

ImGui::TestKeyOwner

IMGUI_API bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id);

Test that key is either not owned, either owned by ‘owner_id’

ImGui::GetKeyOwnerData

inline ImGuiKeyOwnerData* GetKeyOwnerData(ImGuiContext* ctx, ImGuiKey key);

(private API)

ImGui::IsKeyDown

IMGUI_API bool IsKeyDown(ImGuiKey key, ImGuiID owner_id);

[EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership

ImGui::IsKeyPressed

IMGUI_API bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0);

Important: when transitioning from old to new IsKeyPressed(): old API has “bool repeat = True”, so would default to repeat. New API requires explicit ImGuiInputFlags_Repeat.

ImGui::IsKeyReleased

IMGUI_API bool IsKeyReleased(ImGuiKey key, ImGuiID owner_id);

ImGui::IsKeyChordPressed

IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id = 0);

ImGui::IsMouseDown

IMGUI_API bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id);

ImGui::IsMouseClicked

IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0);

ImGui::IsMouseReleased

IMGUI_API bool IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id);

ImGui::IsMouseDoubleClicked

IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id);

Shortcut Testing & Routing

ImGui::Shortcut

IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id);

ImGui::SetShortcutRouting

IMGUI_API bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id);

owner_id needs to be explicit and cannot be 0

ImGui::TestShortcutRouting

IMGUI_API bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id);

ImGui::GetShortcutRoutingData

IMGUI_API ImGuiKeyRoutingData* GetShortcutRoutingData(ImGuiKeyChord key_chord);

Docking

(some functions are only declared in imgui.cpp, see Docking section)

ImGui::DockContextInitialize

IMGUI_API void DockContextInitialize(ImGuiContext* ctx);

ImGui::DockContextShutdown

IMGUI_API void DockContextShutdown(ImGuiContext* ctx);

ImGui::DockContextClearNodes

IMGUI_API void DockContextClearNodes(ImGuiContext* ctx, ImGuiID root_id, bool clear_settings_refs);

Use root_id==0 to clear all

ImGui::DockContextRebuildNodes

IMGUI_API void DockContextRebuildNodes(ImGuiContext* ctx);

ImGui::DockContextNewFrameUpdateUndocking

IMGUI_API void DockContextNewFrameUpdateUndocking(ImGuiContext* ctx);

ImGui::DockContextNewFrameUpdateDocking

IMGUI_API void DockContextNewFrameUpdateDocking(ImGuiContext* ctx);

ImGui::DockContextEndFrame

IMGUI_API void DockContextEndFrame(ImGuiContext* ctx);

ImGui::DockContextGenNodeID

IMGUI_API ImGuiID DockContextGenNodeID(ImGuiContext* ctx);

ImGui::DockContextQueueDock

IMGUI_API void DockContextQueueDock(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload, ImGuiDir split_dir, float split_ratio, bool split_outer);

ImGui::DockContextQueueUndockWindow

IMGUI_API void DockContextQueueUndockWindow(ImGuiContext* ctx, ImGuiWindow* window);

ImGui::DockContextQueueUndockNode

IMGUI_API void DockContextQueueUndockNode(ImGuiContext* ctx, ImGuiDockNode* node);

ImGui::DockContextProcessUndockWindow

IMGUI_API void DockContextProcessUndockWindow(ImGuiContext* ctx, ImGuiWindow* window, bool clear_persistent_docking_ref = true);

ImGui::DockContextProcessUndockNode

IMGUI_API void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node);

ImGui::DockContextCalcDropPosForDocking

IMGUI_API bool DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos);

ImGui::DockContextFindNodeByID

IMGUI_API ImGuiDockNode*DockContextFindNodeByID(ImGuiContext* ctx, ImGuiID id);

ImGui::DockNodeWindowMenuHandler_Default

IMGUI_API void DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar);

ImGui::DockNodeBeginAmendTabBar

IMGUI_API bool DockNodeBeginAmendTabBar(ImGuiDockNode* node);

ImGui::DockNodeEndAmendTabBar

IMGUI_API void DockNodeEndAmendTabBar();

ImGui::DockNodeGetRootNode

inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node);

(private API)

ImGui::DockNodeIsInHierarchyOf

inline bool DockNodeIsInHierarchyOf(ImGuiDockNode* node, ImGuiDockNode* parent);

(private API)

ImGui::DockNodeGetDepth

inline int DockNodeGetDepth(const ImGuiDockNode* node);

(private API)

ImGui::DockNodeGetWindowMenuButtonId

inline ImGuiID DockNodeGetWindowMenuButtonId(const ImGuiDockNode* node);

(private API)

ImGui::GetWindowDockNode

inline ImGuiDockNode* GetWindowDockNode();

(private API)

ImGui::GetWindowAlwaysWantOwnTabBar

IMGUI_API bool GetWindowAlwaysWantOwnTabBar(ImGuiWindow* window);

ImGui::BeginDocked

IMGUI_API void BeginDocked(ImGuiWindow* window, bool* p_open);

ImGui::BeginDockableDragDropSource

IMGUI_API void BeginDockableDragDropSource(ImGuiWindow* window);

ImGui::BeginDockableDragDropTarget

IMGUI_API void BeginDockableDragDropTarget(ImGuiWindow* window);

ImGui::SetWindowDock

IMGUI_API void SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond);

ImGui::DockBuilderDockWindow

IMGUI_API void DockBuilderDockWindow(const char* window_name, ImGuiID node_id);

Docking - Builder function needs to be generally called before the node is used/submitted.

ImGui::DockBuilderGetNode

IMGUI_API ImGuiDockNode*DockBuilderGetNode(ImGuiID node_id);

ImGui::DockBuilderGetCentralNode

inline ImGuiDockNode* DockBuilderGetCentralNode(ImGuiID node_id);

(private API)

ImGui::DockBuilderAddNode

IMGUI_API ImGuiID DockBuilderAddNode(ImGuiID node_id = 0, ImGuiDockNodeFlags flags = 0);

ImGui::DockBuilderRemoveNode

IMGUI_API void DockBuilderRemoveNode(ImGuiID node_id);

Remove node and all its child, undock all windows

ImGui::DockBuilderRemoveNodeDockedWindows

IMGUI_API void DockBuilderRemoveNodeDockedWindows(ImGuiID node_id, bool clear_settings_refs = true);

ImGui::DockBuilderRemoveNodeChildNodes

IMGUI_API void DockBuilderRemoveNodeChildNodes(ImGuiID node_id);

Remove all split/hierarchy. All remaining docked windows will be re-docked to the remaining root node (node_id).

ImGui::DockBuilderSetNodePos

IMGUI_API void DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos);

ImGui::DockBuilderSetNodeSize

IMGUI_API void DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size);

ImGui::DockBuilderCopyNode

IMGUI_API void DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id, ImVector<ImGuiID>* out_node_remap_pairs);

ImGui::DockBuilderCopyWindowSettings

IMGUI_API void DockBuilderCopyWindowSettings(const char* src_name, const char* dst_name);

ImGui::DockBuilderFinish

IMGUI_API void DockBuilderFinish(ImGuiID node_id);

[EXPERIMENTAL] Focus Scope

This is generally used to identify a unique input location (for e.g. a selection set)
There is one per window (automatically set in Begin), but:

ImGui::PushFocusScope

IMGUI_API void PushFocusScope(ImGuiID id);

ImGui::PopFocusScope

IMGUI_API void PopFocusScope();

ImGui::IsInNavFocusRoute

IMGUI_API bool IsInNavFocusRoute(ImGuiID focus_scope_id);

ImGui::GetCurrentFocusScope

inline ImGuiID GetCurrentFocusScope();

(private API)

Focus scope we are outputting into, set by PushFocusScope()

Drag and Drop

ImGui::IsDragDropActive

IMGUI_API bool IsDragDropActive();

ImGui::BeginDragDropTargetCustom

IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id);

ImGui::BeginDragDropTargetViewport

IMGUI_API bool BeginDragDropTargetViewport(ImGuiViewport* viewport, const ImRect* p_bb = NULL);

ImGui::ClearDragDrop

IMGUI_API void ClearDragDrop();

ImGui::IsDragDropPayloadBeingAccepted

IMGUI_API bool IsDragDropPayloadBeingAccepted();

ImGui::RenderDragDropTargetRectForItem

IMGUI_API void RenderDragDropTargetRectForItem(const ImRect& bb);

ImGui::RenderDragDropTargetRectEx

IMGUI_API void RenderDragDropTargetRectEx(ImDrawList* draw_list, const ImRect& bb, float rounding);

Typing-Select API

(provide Windows Explorer style “select items by typing partial name” + “cycle through items by typing same letter” feature) (this is currently not documented nor used by main library, but should work. See “widgets_typingselect” in imgui_test_suite for usage code. Please let us know if you use this!)

ImGui::GetTypingSelectRequest

IMGUI_API ImGuiTypingSelectRequest* GetTypingSelectRequest(ImGuiTypingSelectFlags flags = ImGuiTypingSelectFlags_None);

Box-Select API

ImGui::BeginBoxSelect

IMGUI_API bool BeginBoxSelect(const ImRect& scope_rect, ImGuiWindow* window, ImGuiID box_select_id, ImGuiMultiSelectFlags ms_flags);

ImGui::EndBoxSelect

IMGUI_API void EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flags);

Multi-Select API

ImGui::MultiSelectItemHeader

IMGUI_API void MultiSelectItemHeader(ImGuiID id, bool* p_selected, ImGuiButtonFlags* p_button_flags);

ImGui::MultiSelectItemFooter

IMGUI_API void MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed, ImGuiMultiSelectFlags extra_flags = 0);

ImGui::MultiSelectAddSetAll

IMGUI_API void MultiSelectAddSetAll(ImGuiMultiSelectTempData* ms, bool selected);

ImGui::MultiSelectAddSetRange

IMGUI_API void MultiSelectAddSetRange(ImGuiMultiSelectTempData* ms, bool selected, int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item);

ImGui::GetBoxSelectState

inline ImGuiBoxSelectState* GetBoxSelectState(ImGuiID id);

(private API)

ImGui::GetMultiSelectState

inline ImGuiMultiSelectState* GetMultiSelectState(ImGuiID id);

(private API)

ImGui::GetCurrentTabBar

inline ImGuiTabBar* GetCurrentTabBar();

Tab Bars (private API)

ImGui::TabBarFindByID

IMGUI_API ImGuiTabBar* TabBarFindByID(ImGuiID id);

ImGui::TabBarRemove

IMGUI_API void TabBarRemove(ImGuiTabBar* tab_bar);

ImGui::BeginTabBarEx

IMGUI_API bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags);

ImGui::TabBarFindTabByID

IMGUI_API ImGuiTabItem* TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id);

ImGui::TabBarFindTabByOrder

IMGUI_API ImGuiTabItem* TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order);

ImGui::TabBarFindMostRecentlySelectedTabForActiveWindow

IMGUI_API ImGuiTabItem* TabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBar* tab_bar);

ImGui::TabBarGetCurrentTab

IMGUI_API ImGuiTabItem* TabBarGetCurrentTab(ImGuiTabBar* tab_bar);

ImGui::TabBarGetTabOrder

inline int TabBarGetTabOrder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab);

(private API)

ImGui::TabBarGetTabName

IMGUI_API const char* TabBarGetTabName(ImGuiTabBar* tab_bar, ImGuiTabItem* tab);

ImGui::TabBarAddTab

IMGUI_API void TabBarAddTab(ImGuiTabBar* tab_bar, ImGuiTabItemFlags tab_flags, ImGuiWindow* window);

ImGui::TabBarRemoveTab

IMGUI_API void TabBarRemoveTab(ImGuiTabBar* tab_bar, ImGuiID tab_id);

ImGui::TabBarCloseTab

IMGUI_API void TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab);

ImGui::TabBarQueueFocus

IMGUI_API void TabBarQueueFocus(ImGuiTabBar* tab_bar, ImGuiTabItem* tab);
IMGUI_API void TabBarQueueFocus(ImGuiTabBar* tab_bar, const char* tab_name);

ImGui::TabBarQueueReorder

IMGUI_API void TabBarQueueReorder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, int offset);

ImGui::TabBarQueueReorderFromMousePos

IMGUI_API void TabBarQueueReorderFromMousePos(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, ImVec2 mouse_pos);

ImGui::TabBarProcessReorder

IMGUI_API bool TabBarProcessReorder(ImGuiTabBar* tab_bar);

ImGui::TabItemEx

IMGUI_API bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window);

ImGui::TabItemSpacing

IMGUI_API void TabItemSpacing(const char* str_id, ImGuiTabItemFlags flags, float width);

ImGui::TabItemCalcSize

IMGUI_API ImVec2 TabItemCalcSize(const char* label, bool has_close_button_or_unsaved_marker);
IMGUI_API ImVec2 TabItemCalcSize(ImGuiWindow* window);

ImGui::TabItemBackground

IMGUI_API void TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col);

ImGui::TabItemLabelAndCloseButton

IMGUI_API void TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id, bool is_contents_visible, bool* out_just_closed, bool* out_text_clipped);

Render helpers

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.
NB: All position are in absolute pixels coordinates (we are never using window coordinates internally)

ImGui::RenderText

IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true);

ImGui::RenderTextWrapped

IMGUI_API void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width);

ImGui::RenderTextClipped

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);

ImGui::RenderTextClippedEx

IMGUI_API void RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL);

ImGui::RenderTextEllipsis

IMGUI_API void RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, float ellipsis_max_x, const char* text, const char* text_end, const ImVec2* text_size_if_known);

ImGui::RenderFrame

IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool borders = true, float rounding = 0.0f);

ImGui::RenderFrameBorder

IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f);

ImGui::RenderColorComponentMarker

IMGUI_API void RenderColorComponentMarker(const ImRect& bb, ImU32 col, float rounding);

ImGui::RenderColorRectWithAlphaCheckerboard

IMGUI_API void RenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list, ImVec2 p_min, ImVec2 p_max, ImU32 col, float alpha, float grid_step, ImVec2 grid_off, float rounding = 0.0f, ImDrawFlags flags = 0);

ImGui::RenderNavCursor

IMGUI_API void RenderNavCursor(const ImRect& bb, ImGuiID id, ImGuiNavRenderCursorFlags flags = ImGuiNavRenderCursorFlags_None, float rounding = -1.0f);

Navigation highlight

ImGui::FindRenderedTextEnd

IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL);

Find the optional ## from which we stop displaying text.

ImGui::RenderMouseCursor

IMGUI_API void RenderMouseCursor(ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow);

ImGui::RenderArrow

IMGUI_API void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale = 1.0f);

Render helpers (those functions don’t access any ImGui state!)

ImGui::RenderBullet

IMGUI_API void RenderBullet(ImDrawList* draw_list, ImVec2 pos, ImU32 col);

ImGui::RenderCheckMark

IMGUI_API void RenderCheckMark(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz);

ImGui::RenderArrowPointingAt

IMGUI_API void RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col);

ImGui::RenderArrowDockMenu

IMGUI_API void RenderArrowDockMenu(ImDrawList* draw_list, ImVec2 p_min, float sz, ImU32 col);

ImGui::RenderRectFilledInRangeH

IMGUI_API void RenderRectFilledInRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float fill_x0, float fill_x1, float rounding);

ImGui::RenderRectFilledWithHole

IMGUI_API void RenderRectFilledWithHole(ImDrawList* draw_list, const ImRect& outer, const ImRect& inner, ImU32 col, float rounding);

ImGui::CalcRoundingFlagsForRectInRect

IMGUI_API ImDrawFlags CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold);

Widgets: Text

ImGui::TextEx

IMGUI_API void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0);

ImGui::TextAligned

IMGUI_API void TextAligned(float align_x, float width, const char* fmt, ...) ;

FIXME-WIP: Works but API is likely to be reworked.

Widgets

ImGui::ButtonEx

IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);

ImGui::ArrowButtonEx

IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0);

ImGui::ImageButtonEx

IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0);

ImGui::SeparatorEx

IMGUI_API void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1.0f);

ImGui::SeparatorTextEx

IMGUI_API void SeparatorTextEx(ImGuiID id, const char* label, const char* label_end, float extra_width);

ImGui::CheckboxFlags

IMGUI_API bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value);
IMGUI_API bool CheckboxFlags(const char* label, ImU64* flags, ImU64 flags_value);

Widgets: Window Decorations

ImGui::CloseButton

IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos);

ImGui::CollapseButton

IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_node);

ImGui::Scrollbar

IMGUI_API void Scrollbar(ImGuiAxis axis);

ImGui::ScrollbarEx

IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags draw_rounding_flags = 0);

ImGui::GetWindowScrollbarRect

IMGUI_API ImRect GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis);

ImGui::GetWindowScrollbarID

IMGUI_API ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis);

ImGui::GetWindowResizeCornerID

IMGUI_API ImGuiID GetWindowResizeCornerID(ImGuiWindow* window, int n);

0..3: corners

ImGui::GetWindowResizeBorderID

IMGUI_API ImGuiID GetWindowResizeBorderID(ImGuiWindow* window, ImGuiDir dir);

ImGui::ExtendHitBoxWhenNearViewportEdge

IMGUI_API void ExtendHitBoxWhenNearViewportEdge(ImGuiWindow* window, ImRect* bb, float threshold, ImGuiAxis axis);

Widgets low-level behaviors

ImGui::ButtonBehavior

IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);

ImGui::DragBehavior

IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags);

ImGui::SliderBehavior

IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb);

ImGui::SplitterBehavior

IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0);

Widgets: Tree Nodes

ImGui::TreeNodeBehavior

IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);

ImGui::TreeNodeDrawLineToChildNode

IMGUI_API void TreeNodeDrawLineToChildNode(const ImVec2& target_pos);

ImGui::TreeNodeDrawLineToTreePop

IMGUI_API void TreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data);

ImGui::TreePushOverrideID

IMGUI_API void TreePushOverrideID(ImGuiID id);

ImGui::TreeNodeSetOpen

IMGUI_API void TreeNodeSetOpen(ImGuiID storage_id, bool open);

ImGui::TreeNodeUpdateNextOpen

IMGUI_API bool TreeNodeUpdateNextOpen(ImGuiID storage_id, ImGuiTreeNodeFlags flags);

Return open state. Consume previous SetNextItemOpen() data, if any. May return True when logging.

InputText

ImGui::InputTextDeactivateHook

IMGUI_API void InputTextDeactivateHook(ImGuiID id);

ImGui::TempInputIsActive

inline bool TempInputIsActive(ImGuiID id);

(private API)

ImGui::GetInputTextState

inline ImGuiInputTextState* GetInputTextState(ImGuiID id);

(private API)

Get input text state if active

ImGui::SetNextItemRefVal

IMGUI_API void SetNextItemRefVal(ImGuiDataType data_type, void* p_data);

ImGui::IsItemActiveAsInputText

inline bool IsItemActiveAsInputText();

(private API)

This may be useful to apply workaround that a based on distinguish whenever an item is active as a text input field.

Color

ImGui::ColorTooltip

IMGUI_API void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags);

ImGui::ColorEditOptionsPopup

IMGUI_API void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags);

ImGui::ColorPickerOptionsPopup

IMGUI_API void ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags);

ImGui::SetNextItemColorMarker

inline void SetNextItemColorMarker(ImU32 col);

(private API)

Shade functions (write over already created vertices)

ImGui::ShadeVertsLinearColorGradientKeepAlpha

IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1);

ImGui::ShadeVertsLinearUV

IMGUI_API void ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp);

ImGui::ShadeVertsTransformPos

IMGUI_API void ShadeVertsTransformPos(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& pivot_in, float cos_a, float sin_a, const ImVec2& pivot_out);

Garbage collection

ImGui::GcCompactTransientMiscBuffers

IMGUI_API void GcCompactTransientMiscBuffers();

ImGui::GcCompactTransientWindowBuffers

IMGUI_API void GcCompactTransientWindowBuffers(ImGuiWindow* window);

ImGui::GcAwakeTransientWindowBuffers

IMGUI_API void GcAwakeTransientWindowBuffers(ImGuiWindow* window);

ImGui::ErrorLog

IMGUI_API bool ErrorLog(const char* msg);

Error handling, State Recovery

ImGui::ErrorRecoveryStoreState

IMGUI_API void ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out);

ImGui::ErrorRecoveryTryToRecoverState

IMGUI_API void ErrorRecoveryTryToRecoverState(const ImGuiErrorRecoveryState* state_in);

ImGui::ErrorRecoveryTryToRecoverWindowState

IMGUI_API void ErrorRecoveryTryToRecoverWindowState(const ImGuiErrorRecoveryState* state_in);

ImGui::ErrorCheckUsingSetCursorPosToExtendParentBoundaries

IMGUI_API void ErrorCheckUsingSetCursorPosToExtendParentBoundaries();

ImGui::ErrorCheckEndFrameFinalizeErrorTooltip

IMGUI_API void ErrorCheckEndFrameFinalizeErrorTooltip();

ImGui::BeginErrorTooltip

IMGUI_API bool BeginErrorTooltip();

ImGui::EndErrorTooltip

IMGUI_API void EndErrorTooltip();

ImGui::DemoMarker

IMGUI_API void DemoMarker(const char* file, int line, const char* section);

Demo Doc Marker for e.g. imgui_explorer

Debug Tools

ImGui::DebugAllocHook

IMGUI_API void DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size);

size >= 0 : alloc, size = -1 : free

ImGui::DebugDrawCursorPos

IMGUI_API void DebugDrawCursorPos(ImU32 col = IM_COL32(255, 0, 0, 255));

ImGui::DebugDrawLineExtents

IMGUI_API void DebugDrawLineExtents(ImU32 col = IM_COL32(255, 0, 0, 255));

ImGui::DebugDrawItemRect

IMGUI_API void DebugDrawItemRect(ImU32 col = IM_COL32(255, 0, 0, 255));

ImGui::DebugTextUnformattedWithLocateItem

IMGUI_API void DebugTextUnformattedWithLocateItem(const char* line_begin, const char* line_end);

ImGui::DebugLocateItem

IMGUI_API void DebugLocateItem(ImGuiID target_id);

Call sparingly: only 1 at the same time!

ImGui::DebugLocateItemOnHover

IMGUI_API void DebugLocateItemOnHover(ImGuiID target_id);

Only call on reaction to a mouse Hover: because only 1 at the same time!

ImGui::DebugLocateItemResolveWithLastItem

IMGUI_API void DebugLocateItemResolveWithLastItem();

ImGui::DebugBreakClearData

IMGUI_API void DebugBreakClearData();

ImGui::DebugBreakButton

IMGUI_API bool DebugBreakButton(const char* label, const char* description_of_location);

ImGui::DebugBreakButtonTooltip

IMGUI_API void DebugBreakButtonTooltip(bool keyboard_only, const char* description_of_location);

ImGui::ShowFontAtlas

IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas);

ImGui::DebugTextureIDToU64

IMGUI_API ImU64 DebugTextureIDToU64(ImTextureID tex_id);

ImGui::DebugHookIdInfo

IMGUI_API void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end);

ImGui::DebugNodeColumns

IMGUI_API void DebugNodeColumns(ImGuiOldColumns* columns);

ImGui::DebugNodeDockNode

IMGUI_API void DebugNodeDockNode(ImGuiDockNode* node, const char* label);

ImGui::DebugNodeDrawList

IMGUI_API void DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label);

ImGui::DebugNodeDrawCmdShowMeshAndBoundingBox

IMGUI_API void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, const ImDrawList* draw_list, const ImDrawCmd* draw_cmd, bool show_mesh, bool show_aabb);

ImGui::DebugNodeFont

IMGUI_API void DebugNodeFont(ImFont* font);

ImGui::DebugNodeFontGlyphsForSrcMask

IMGUI_API void DebugNodeFontGlyphsForSrcMask(ImFont* font, ImFontBaked* baked, int src_mask);

ImGui::DebugNodeFontGlyph

IMGUI_API void DebugNodeFontGlyph(ImFont* font, const ImFontGlyph* glyph);

ImGui::DebugNodeTexture

IMGUI_API void DebugNodeTexture(ImTextureData* tex, int int_id, const ImFontAtlasRect* highlight_rect = NULL);

ID used to facilitate persisting the “current” texture.

ImGui::DebugNodeStorage

IMGUI_API void DebugNodeStorage(ImGuiStorage* storage, const char* label);

ImGui::DebugNodeTabBar

IMGUI_API void DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label);

ImGui::DebugNodeTable

IMGUI_API void DebugNodeTable(ImGuiTable* table);

ImGui::DebugNodeTableSettings

IMGUI_API void DebugNodeTableSettings(ImGuiTableSettings* settings, ImGuiTable* table);

ImGui::DebugNodeInputTextState

IMGUI_API void DebugNodeInputTextState(ImGuiInputTextState* state);

ImGui::DebugNodeTypingSelectState

IMGUI_API void DebugNodeTypingSelectState(ImGuiTypingSelectState* state);

ImGui::DebugNodeMultiSelectState

IMGUI_API void DebugNodeMultiSelectState(ImGuiMultiSelectState* state);

ImGui::DebugNodeWindow

IMGUI_API void DebugNodeWindow(ImGuiWindow* window, const char* label);

ImGui::DebugNodeWindowSettings

IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings* settings);

ImGui::DebugNodeWindowsList

IMGUI_API void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label);

ImGui::DebugNodeViewport

IMGUI_API void DebugNodeViewport(ImGuiViewportP* viewport);

ImGui::DebugNodePlatformMonitor

IMGUI_API void DebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor, const char* label, int idx);

ImGui::DebugRenderKeyboardPreview

IMGUI_API void DebugRenderKeyboardPreview(ImDrawList* draw_list);

ImGui::DebugRenderViewportThumbnail

IMGUI_API void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb);

Obsolete functions

ImFontLoader

ImFontLoader (struct)

Hooks and storage for a given font backend.
This structure is likely to evolve as we add support for incremental atlas updates.
Conceptually this could be public, but API is still going to be evolve.

Member
const char* Name;(const)
size_t FontBakedSrcLoaderDataSize;
ImFontLoader::ImFontLoader
ImFontLoader();

ImFontAtlas internal API

ImGui::ImFontAtlasRectId_GetIndex

inline int ImFontAtlasRectId_GetIndex(ImFontAtlasRectId id);

(private API)

Helpers: ImTextureRef ==/!= operators provided as convenience (note that _TexID and _TexData are never set simultaneously)
Refer to ImFontAtlasPackGetRect() to better understand how this works.

ImGui::ImFontAtlasRectId_GetGeneration

inline unsigned int ImFontAtlasRectId_GetGeneration(ImFontAtlasRectId id);

(private API)

ImGui::ImFontAtlasRectId_Make

inline ImFontAtlasRectId ImFontAtlasRectId_Make(int index_idx, int gen_idx);

(private API)

ImFontAtlasRectEntry (struct)

Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
User are returned ImFontAtlasRectId values which are meant to be persistent.
We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
Having this also makes it easier to e.g. sort rectangles during repack.

ImFontAtlasPostProcessData (struct)

Data available to potential texture post-processing functions

Member
ImFontAtlas* FontAtlas;
ImFont* Font;
ImFontConfig* FontSrc;
ImFontBaked* FontBaked;
ImFontGlyph* Glyph;
void* Pixels;
ImTextureFormat Format;
int Pitch;
int Width;
int Height;

stbrp_context_opaque (struct)

ImFontAtlasBuilder (struct)

Internal storage for incrementally packing and building a ImFontAtlas

Member
stbrp_context_opaque PackContext;Actually ‘stbrp_context’ but we don’t want to define this in the header file.
ImVector<ImTextureRect> Rects;
ImVector<uchar> TempBuffer;Misc scratch buffer
int RectsIndexFreeListStart;First unused entry
int RectsPackedCount;Number of packed rectangles.
int RectsPackedSurface;Number of packed pixels. Used when compacting to heuristically find the ideal texture size.
int RectsDiscardedCount;
int RectsDiscardedSurface;
int FrameCount;Current frame count
ImVec2i MaxRectSize;Largest rectangle to pack (de-facto used as a “minimum texture size”)
ImVec2i MaxRectBounds;Bottom-right most used pixels
bool LockDisableResize;Disable resizing texture
bool PreloadedAllGlyphsRanges;Set when missing ImGuiBackendFlags_RendererHasTextures features forces atlas to preload everything.
ImGuiStorage BakedMap;BakedId --> ImFontBaked*
int BakedDiscardedCount;
ImFontAtlasRectId PackIdMouseCursors;White pixel + mouse cursors. Also happen to be fallback in case of packing failure.
ImFontAtlasRectId PackIdLinesTexData;

ImGui::ImFontAtlasTextureAdd

IMGUI_API ImTextureData* ImFontAtlasTextureAdd(ImFontAtlas* atlas, int w, int h);

ImGui::ImFontAtlasTextureMakeSpace

IMGUI_API void ImFontAtlasTextureMakeSpace(ImFontAtlas* atlas);

ImGui::ImFontAtlasTextureRepack

IMGUI_API void ImFontAtlasTextureRepack(ImFontAtlas* atlas, int w, int h);

ImGui::ImFontAtlasTextureGrow

IMGUI_API void ImFontAtlasTextureGrow(ImFontAtlas* atlas, int old_w = -1, int old_h = -1);

ImGui::ImFontAtlasTextureCompact

IMGUI_API void ImFontAtlasTextureCompact(ImFontAtlas* atlas);

ImGui::ImFontAtlasTextureGetSizeEstimate

IMGUI_API ImVec2i ImFontAtlasTextureGetSizeEstimate(ImFontAtlas* atlas);

ImGui::ImFontAtlasFontSourceInit

IMGUI_API bool ImFontAtlasFontSourceInit(ImFontAtlas* atlas, ImFontConfig* src);

ImGui::ImFontAtlasFontSourceAddToFont

IMGUI_API void ImFontAtlasFontSourceAddToFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* src);

ImGui::ImFontAtlasFontDestroySourceData

IMGUI_API void ImFontAtlasFontDestroySourceData(ImFontAtlas* atlas, ImFontConfig* src);

ImGui::ImFontAtlasFontInitOutput

IMGUI_API bool ImFontAtlasFontInitOutput(ImFontAtlas* atlas, ImFont* font);

Using FontDestroyOutput/FontInitOutput sequence useful notably if font loader params have changed

ImGui::ImFontAtlasFontDestroyOutput

IMGUI_API void ImFontAtlasFontDestroyOutput(ImFontAtlas* atlas, ImFont* font);

ImGui::ImFontAtlasFontRebuildOutput

IMGUI_API void ImFontAtlasFontRebuildOutput(ImFontAtlas* atlas, ImFont* font);

ImGui::ImFontAtlasFontDiscardBakes

IMGUI_API void ImFontAtlasFontDiscardBakes(ImFontAtlas* atlas, ImFont* font, int unused_frames);

ImGui::ImFontAtlasBakedGetId

IMGUI_API ImGuiID ImFontAtlasBakedGetId(ImGuiID font_id, float baked_size, float rasterizer_density);

ImGui::ImFontAtlasBakedGetOrAdd

IMGUI_API ImFontBaked* ImFontAtlasBakedGetOrAdd(ImFontAtlas* atlas, ImFont* font, float font_size, float font_rasterizer_density);

ImGui::ImFontAtlasBakedGetClosestMatch

IMGUI_API ImFontBaked* ImFontAtlasBakedGetClosestMatch(ImFontAtlas* atlas, ImFont* font, float font_size, float font_rasterizer_density);

ImGui::ImFontAtlasBakedAdd

IMGUI_API ImFontBaked* ImFontAtlasBakedAdd(ImFontAtlas* atlas, ImFont* font, float font_size, float font_rasterizer_density, ImGuiID baked_id);

ImGui::ImFontAtlasBakedDiscard

IMGUI_API void ImFontAtlasBakedDiscard(ImFontAtlas* atlas, ImFont* font, ImFontBaked* baked);

ImGui::ImFontAtlasBakedAddFontGlyph

IMGUI_API ImFontGlyph* ImFontAtlasBakedAddFontGlyph(ImFontAtlas* atlas, ImFontBaked* baked, ImFontConfig* src, const ImFontGlyph* in_glyph);

ImGui::ImFontAtlasBakedAddFontGlyphAdvancedX

IMGUI_API void ImFontAtlasBakedAddFontGlyphAdvancedX(ImFontAtlas* atlas, ImFontBaked* baked, ImFontConfig* src, ImWchar codepoint, float advance_x);

ImGui::ImFontAtlasBakedDiscardFontGlyph

IMGUI_API void ImFontAtlasBakedDiscardFontGlyph(ImFontAtlas* atlas, ImFont* font, ImFontBaked* baked, ImFontGlyph* glyph);

ImGui::ImFontAtlasBakedSetFontGlyphBitmap

IMGUI_API void ImFontAtlasBakedSetFontGlyphBitmap(ImFontAtlas* atlas, ImFontBaked* baked, ImFontConfig* src, ImFontGlyph* glyph, ImTextureRect* r, const uchar* src_pixels, ImTextureFormat src_fmt, int src_pitch);

ImGui::ImFontAtlasPackInit

IMGUI_API void ImFontAtlasPackInit(ImFontAtlas* atlas);

ImGui::ImFontAtlasPackAddRect

IMGUI_API ImFontAtlasRectId ImFontAtlasPackAddRect(ImFontAtlas* atlas, int w, int h, ImFontAtlasRectEntry* overwrite_entry = NULL);

ImGui::ImFontAtlasPackGetRect

IMGUI_API ImTextureRect* ImFontAtlasPackGetRect(ImFontAtlas* atlas, ImFontAtlasRectId id);

ImGui::ImFontAtlasPackGetRectSafe

IMGUI_API ImTextureRect* ImFontAtlasPackGetRectSafe(ImFontAtlas* atlas, ImFontAtlasRectId id);

ImGui::ImFontAtlasPackDiscardRect

IMGUI_API void ImFontAtlasPackDiscardRect(ImFontAtlas* atlas, ImFontAtlasRectId id);

ImGui::ImFontAtlasUpdateNewFrame

IMGUI_API void ImFontAtlasUpdateNewFrame(ImFontAtlas* atlas, int frame_count, bool renderer_has_textures);

ImGui::ImFontAtlasAddDrawListSharedData

IMGUI_API void ImFontAtlasAddDrawListSharedData(ImFontAtlas* atlas, ImDrawListSharedData* data);

ImGui::ImFontAtlasRemoveDrawListSharedData

IMGUI_API void ImFontAtlasRemoveDrawListSharedData(ImFontAtlas* atlas, ImDrawListSharedData* data);

ImGui::ImFontAtlasUpdateDrawListsTextures

IMGUI_API void ImFontAtlasUpdateDrawListsTextures(ImFontAtlas* atlas, ImTextureRef old_tex, ImTextureRef new_tex);

ImGui::ImFontAtlasUpdateDrawListsSharedData

IMGUI_API void ImFontAtlasUpdateDrawListsSharedData(ImFontAtlas* atlas);

ImGui::ImFontAtlasTextureBlockConvert

IMGUI_API void ImFontAtlasTextureBlockConvert(const uchar* src_pixels, ImTextureFormat src_fmt, int src_pitch, uchar* dst_pixels, ImTextureFormat dst_fmt, int dst_pitch, int w, int h);

ImGui::ImFontAtlasTextureBlockPostProcess

IMGUI_API void ImFontAtlasTextureBlockPostProcess(ImFontAtlasPostProcessData* data);

ImGui::ImFontAtlasTextureBlockPostProcessMultiply

IMGUI_API void ImFontAtlasTextureBlockPostProcessMultiply(ImFontAtlasPostProcessData* data, float multiply_factor);

ImGui::ImFontAtlasTextureBlockFill

IMGUI_API void ImFontAtlasTextureBlockFill(ImTextureData* dst_tex, int dst_x, int dst_y, int w, int h, ImU32 col);

ImGui::ImFontAtlasTextureBlockCopy

IMGUI_API void ImFontAtlasTextureBlockCopy(ImTextureData* src_tex, int src_x, int src_y, ImTextureData* dst_tex, int dst_x, int dst_y, int w, int h);

ImGui::ImFontAtlasTextureBlockQueueUpload

IMGUI_API void ImFontAtlasTextureBlockQueueUpload(ImFontAtlas* atlas, ImTextureData* tex, int x, int y, int w, int h);

ImGui::ImTextureDataUpdateNewFrame

IMGUI_API bool ImTextureDataUpdateNewFrame(ImTextureData* tex);

ImGui::ImTextureDataQueueUpload

IMGUI_API void ImTextureDataQueueUpload(ImTextureData* tex, int x, int y, int w, int h);

ImGui::ImTextureDataGetFormatBytesPerPixel

IMGUI_API int ImTextureDataGetFormatBytesPerPixel(ImTextureFormat format);

ImGui::ImTextureDataGetStatusName

IMGUI_API const char* ImTextureDataGetStatusName(ImTextureStatus status);

ImGui::ImTextureDataGetFormatName

IMGUI_API const char* ImTextureDataGetFormatName(ImTextureFormat format);

ImGui::ImFontAtlasGetMouseCursorTexData

IMGUI_API bool ImFontAtlasGetMouseCursorTexData(ImFontAtlas* atlas, ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]);

Test Engine specific hooks

Docking: Internal Types

DockRequestType (enum)

MemberValue
ImGuiDockRequestType_None = 00
ImGuiDockRequestType_Dock1
ImGuiDockRequestType_Undock2
ImGuiDockRequestType_Split3Split is the same as Dock but without a DockPayload

DockRequest (struct)

Member
ImGuiDockRequestType Type;
ImGuiWindow* DockTargetWindow;Destination/Target Window to dock into (may be a loose window or a DockNode, might be None in which case DockTargetNode cannot be None)
ImGuiDockNode* DockTargetNode;Destination/Target Node to dock into
ImGuiWindow* DockPayload;Source/Payload window to dock (may be a loose window or a DockNode), [Optional]
ImGuiDir DockSplitDir;
float DockSplitRatio;
bool DockSplitOuter;
ImGuiWindow* UndockTargetWindow;
ImGuiDockNode* UndockTargetNode;
DockRequest::ImGuiDockRequest
ImGuiDockRequest();

DockPreviewData (struct)

Member
ImGuiDockNode FutureNode;
bool IsDropAllowed;
bool IsCenterAvailable;
bool IsSidesAvailable;Hold your breath, grammar freaks..
bool IsSplitDirExplicit;Set when hovered the drop rect (vs. implicit SplitDir==None when hovered the window)
ImGuiDockNode* SplitNode;
ImGuiDir SplitDir;
float SplitRatio;
DockPreviewData::ImGuiDockPreviewData
ImGuiDockPreviewData() : FutureNode(0);

DockNodeSettings (struct)

Persistent Settings data, stored contiguously in SettingsNodes (sizeof() ~32 bytes)

Member
ImGuiID ID;
ImGuiID ParentNodeId;
ImGuiID ParentWindowId;
ImGuiID SelectedTabId;
signed char SplitAxis;
char Depth;
ImGuiDockNodeFlags Flags;NB: We save individual flags one by one in ascii format (ImGuiDockNodeFlags_SavedFlagsMask_)
ImVec2ih Pos;
ImVec2ih Size;
ImVec2ih SizeRef;
DockNodeSettings::ImGuiDockNodeSettings
ImGuiDockNodeSettings();

Submodule im_stb

im_stb (struct)

ImGui::get_current_window