ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
| 4570 | |
| 4571 | // ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods |
| 4572 | ImGuiWindow::ImGuiWindow(ImGuiContext* ctx, const char* name) : DrawListInst(NULL) |
| 4573 | { |
| 4574 | memset((void*)this, 0, sizeof(*this)); |
| 4575 | Ctx = ctx; |
| 4576 | Name = ImStrdup(name); |
| 4577 | NameBufLen = (int)ImStrlen(name) + 1; |
| 4578 | ID = ImHashStr(name); |
| 4579 | IDStack.push_back(ID); |
| 4580 | MoveId = GetID("#MOVE"); |
| 4581 | ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); |
| 4582 | ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); |
| 4583 | AutoPosLastDirection = ImGuiDir_None; |
| 4584 | AutoFitFramesX = AutoFitFramesY = -1; |
| 4585 | SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = 0; |
| 4586 | SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); |
| 4587 | LastFrameActive = -1; |
| 4588 | LastTimeActive = -1.0f; |
| 4589 | FontRefSize = 0.0f; |
| 4590 | FontWindowScale = FontWindowScaleParents = 1.0f; |
| 4591 | SettingsOffset = -1; |
| 4592 | DrawList = &DrawListInst; |
| 4593 | DrawList->_OwnerName = Name; |
| 4594 | DrawList->_SetDrawListSharedData(&Ctx->DrawListSharedData); |
| 4595 | NavPreferredScoringPosRel[0] = NavPreferredScoringPosRel[1] = ImVec2(FLT_MAX, FLT_MAX); |
| 4596 | } |
| 4597 | |
| 4598 | ImGuiWindow::~ImGuiWindow() |
| 4599 | { |