MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ImGuiWindow

Method ImGuiWindow

imgui_tiny_app/imgui/imgui.cpp:4668–4698  ·  view source on GitHub ↗

ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods

Source from the content-addressed store, hash-verified

4666
4667// ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
4668ImGuiWindow::ImGuiWindow(ImGuiContext* ctx, const char* name) : DrawListInst(NULL)
4669{
4670 memset((void*)this, 0, sizeof(*this));
4671 Ctx = ctx;
4672 Name = ImStrdup(name);
4673 NameBufLen = (int)ImStrlen(name) + 1;
4674 ID = ImHashStr(name);
4675 IDStack.push_back(ID);
4676 ViewportAllowPlatformMonitorExtend = -1;
4677 ViewportPos = ImVec2(FLT_MAX, FLT_MAX);
4678 MoveId = GetID("#MOVE");
4679 TabId = GetID("#TAB");
4680 ScrollTarget = ImVec2(FLT_MAX, FLT_MAX);
4681 ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f);
4682 AutoPosLastDirection = ImGuiDir_None;
4683 AutoFitFramesX = AutoFitFramesY = -1;
4684 SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = SetWindowDockAllowFlags = 0;
4685 SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX);
4686 LastFrameActive = -1;
4687 LastFrameJustFocused = -1;
4688 LastTimeActive = -1.0f;
4689 FontRefSize = 0.0f;
4690 FontWindowScale = FontWindowScaleParents = 1.0f;
4691 SettingsOffset = -1;
4692 DockOrder = -1;
4693 DrawList = &DrawListInst;
4694 DrawList->_OwnerName = Name;
4695 DrawList->_SetDrawListSharedData(&Ctx->DrawListSharedData);
4696 NavPreferredScoringPosRel[0] = NavPreferredScoringPosRel[1] = ImVec2(FLT_MAX, FLT_MAX);
4697 IM_PLACEMENT_NEW(&WindowClass) ImGuiWindowClass();
4698}
4699
4700ImGuiWindow::~ImGuiWindow()
4701{

Callers

nothing calls this directly

Calls 6

ImStrdupFunction · 0.85
ImHashStrFunction · 0.85
ImVec2Function · 0.85
ImGuiWindowClassClass · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected