ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
| 3717 | |
| 3718 | // ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods |
| 3719 | ImGuiWindow::ImGuiWindow(ImGuiContext* ctx, const char* name) : DrawListInst(NULL) |
| 3720 | { |
| 3721 | memset(this, 0, sizeof(*this)); |
| 3722 | Ctx = ctx; |
| 3723 | Name = ImStrdup(name); |
| 3724 | NameBufLen = (int)strlen(name) + 1; |
| 3725 | ID = ImHashStr(name); |
| 3726 | IDStack.push_back(ID); |
| 3727 | MoveId = GetID("#MOVE"); |
| 3728 | ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); |
| 3729 | ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); |
| 3730 | AutoFitFramesX = AutoFitFramesY = -1; |
| 3731 | AutoPosLastDirection = ImGuiDir_None; |
| 3732 | SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = 0; |
| 3733 | SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); |
| 3734 | LastFrameActive = -1; |
| 3735 | LastTimeActive = -1.0f; |
| 3736 | FontWindowScale = 1.0f; |
| 3737 | SettingsOffset = -1; |
| 3738 | DrawList = &DrawListInst; |
| 3739 | DrawList->_Data = &Ctx->DrawListSharedData; |
| 3740 | DrawList->_OwnerName = Name; |
| 3741 | NavPreferredScoringPosRel[0] = NavPreferredScoringPosRel[1] = ImVec2(FLT_MAX, FLT_MAX); |
| 3742 | } |
| 3743 | |
| 3744 | ImGuiWindow::~ImGuiWindow() |
| 3745 | { |