ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
| 3395 | |
| 3396 | // ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods |
| 3397 | ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) : DrawListInst(NULL) |
| 3398 | { |
| 3399 | memset(this, 0, sizeof(*this)); |
| 3400 | Name = ImStrdup(name); |
| 3401 | NameBufLen = (int)strlen(name) + 1; |
| 3402 | ID = ImHashStr(name); |
| 3403 | IDStack.push_back(ID); |
| 3404 | MoveId = GetID("#MOVE"); |
| 3405 | ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); |
| 3406 | ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); |
| 3407 | AutoFitFramesX = AutoFitFramesY = -1; |
| 3408 | AutoPosLastDirection = ImGuiDir_None; |
| 3409 | SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiCond_Always | ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing; |
| 3410 | SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); |
| 3411 | LastFrameActive = -1; |
| 3412 | LastTimeActive = -1.0f; |
| 3413 | FontWindowScale = 1.0f; |
| 3414 | SettingsOffset = -1; |
| 3415 | DrawList = &DrawListInst; |
| 3416 | DrawList->_Data = &context->DrawListSharedData; |
| 3417 | DrawList->_OwnerName = Name; |
| 3418 | } |
| 3419 | |
| 3420 | ImGuiWindow::~ImGuiWindow() |
| 3421 | { |