Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
ImGuiStackSizes Struct Reference

#include <src/imgui/imgui_internal.h>

Public Member Functions

 ImGuiStackSizes ()
 
void SetToCurrentState ()
 
void CompareWithCurrentState ()
 

Public Attributes

short SizeOfIDStack
 
short SizeOfColorStack
 
short SizeOfStyleVarStack
 
short SizeOfFontStack
 
short SizeOfFocusScopeStack
 
short SizeOfGroupStack
 
short SizeOfBeginPopupStack
 

Detailed Description

Constructor & Destructor Documentation

◆ ImGuiStackSizes()

ImGuiStackSizes::ImGuiStackSizes ( )
inline
1323{ memset(this, 0, sizeof(*this)); }

Member Function Documentation

◆ CompareWithCurrentState()

void ImGuiStackSizes::CompareWithCurrentState ( )
7293{
7294 ImGuiContext& g = *GImGui;
7295 ImGuiWindow* window = g.CurrentWindow;
7296 IM_UNUSED(window);
7297
7298 // Window stacks
7299 // NOT checking: DC.ItemWidth, DC.TextWrapPos (per window) to allow user to conveniently push once and not pop (they are cleared on Begin)
7300 IM_ASSERT(SizeOfIDStack == window->IDStack.Size && "PushID/PopID or TreeNode/TreePop Mismatch!");
7301
7302 // Global stacks
7303 // For color, style and font stacks there is an incentive to use Push/Begin/Pop/.../End patterns, so we relax our checks a little to allow them.
7304 IM_ASSERT(SizeOfGroupStack == g.GroupStack.Size && "BeginGroup/EndGroup Mismatch!");
7305 IM_ASSERT(SizeOfBeginPopupStack == g.BeginPopupStack.Size && "BeginPopup/EndPopup or BeginMenu/EndMenu Mismatch!");
7306 IM_ASSERT(SizeOfColorStack >= g.ColorStack.Size && "PushStyleColor/PopStyleColor Mismatch!");
7307 IM_ASSERT(SizeOfStyleVarStack >= g.StyleVarStack.Size && "PushStyleVar/PopStyleVar Mismatch!");
7308 IM_ASSERT(SizeOfFontStack >= g.FontStack.Size && "PushFont/PopFont Mismatch!");
7309 IM_ASSERT(SizeOfFocusScopeStack == g.FocusScopeStack.Size && "PushFocusScope/PopFocusScope Mismatch!");
7310}
#define IM_UNUSED(_VAR)
Definition imgui.h:84
#define IM_ASSERT(_EXPR)
Definition imgui.h:81
IMGUI_API ImGuiContext * GImGui
Definition imgui.cpp:960
Definition imgui_internal.h:1351
ImVector< ImGuiPopupData > BeginPopupStack
Definition imgui_internal.h:1434
ImVector< ImGuiID > FocusScopeStack
Definition imgui_internal.h:1430
ImVector< ImGuiGroupData > GroupStack
Definition imgui_internal.h:1432
ImVector< ImFont * > FontStack
Definition imgui_internal.h:1429
ImGuiWindow * CurrentWindow
Definition imgui_internal.h:1380
ImVector< ImGuiStyleMod > StyleVarStack
Definition imgui_internal.h:1428
ImVector< ImGuiColorMod > ColorStack
Definition imgui_internal.h:1427
short SizeOfStyleVarStack
Definition imgui_internal.h:1317
short SizeOfGroupStack
Definition imgui_internal.h:1320
short SizeOfFontStack
Definition imgui_internal.h:1318
short SizeOfBeginPopupStack
Definition imgui_internal.h:1321
short SizeOfFocusScopeStack
Definition imgui_internal.h:1319
short SizeOfIDStack
Definition imgui_internal.h:1315
short SizeOfColorStack
Definition imgui_internal.h:1316
Definition imgui_internal.h:1807
ImVector< ImGuiID > IDStack
Definition imgui_internal.h:1860
int Size
Definition imgui.h:1655

References ImGuiContext::BeginPopupStack, ImGuiContext::ColorStack, ImGuiContext::CurrentWindow, ImGuiContext::FocusScopeStack, ImGuiContext::FontStack, GImGui, ImGuiContext::GroupStack, ImGuiWindow::IDStack, IM_ASSERT, IM_UNUSED, ImVector< T >::Size, SizeOfBeginPopupStack, SizeOfColorStack, SizeOfFocusScopeStack, SizeOfFontStack, SizeOfGroupStack, SizeOfIDStack, SizeOfStyleVarStack, and ImGuiContext::StyleVarStack.

Referenced by ImGui::End().

+ Here is the caller graph for this function:

◆ SetToCurrentState()

void ImGuiStackSizes::SetToCurrentState ( )
7279{
7280 ImGuiContext& g = *GImGui;
7281 ImGuiWindow* window = g.CurrentWindow;
7282 SizeOfIDStack = (short)window->IDStack.Size;
7283 SizeOfColorStack = (short)g.ColorStack.Size;
7284 SizeOfStyleVarStack = (short)g.StyleVarStack.Size;
7285 SizeOfFontStack = (short)g.FontStack.Size;
7286 SizeOfFocusScopeStack = (short)g.FocusScopeStack.Size;
7287 SizeOfGroupStack = (short)g.GroupStack.Size;
7288 SizeOfBeginPopupStack = (short)g.BeginPopupStack.Size;
7289}

References ImGuiContext::BeginPopupStack, ImGuiContext::ColorStack, ImGuiContext::CurrentWindow, ImGuiContext::FocusScopeStack, ImGuiContext::FontStack, GImGui, ImGuiContext::GroupStack, ImGuiWindow::IDStack, ImVector< T >::Size, SizeOfBeginPopupStack, SizeOfColorStack, SizeOfFocusScopeStack, SizeOfFontStack, SizeOfGroupStack, SizeOfIDStack, SizeOfStyleVarStack, and ImGuiContext::StyleVarStack.

Referenced by ImGui::Begin().

+ Here is the caller graph for this function:

Member Data Documentation

◆ SizeOfBeginPopupStack

short ImGuiStackSizes::SizeOfBeginPopupStack

◆ SizeOfColorStack

short ImGuiStackSizes::SizeOfColorStack

◆ SizeOfFocusScopeStack

short ImGuiStackSizes::SizeOfFocusScopeStack

◆ SizeOfFontStack

short ImGuiStackSizes::SizeOfFontStack

◆ SizeOfGroupStack

short ImGuiStackSizes::SizeOfGroupStack

◆ SizeOfIDStack

short ImGuiStackSizes::SizeOfIDStack

◆ SizeOfStyleVarStack

short ImGuiStackSizes::SizeOfStyleVarStack

The documentation for this struct was generated from the following files: