ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
| 2596 | |
| 2597 | // ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods |
| 2598 | ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) |
| 2599 | : DrawListInst(&context->DrawListSharedData) |
| 2600 | { |
| 2601 | Name = ImStrdup(name); |
| 2602 | ID = ImHashStr(name); |
| 2603 | IDStack.push_back(ID); |
| 2604 | Flags = ImGuiWindowFlags_None; |
| 2605 | Pos = ImVec2(0.0f, 0.0f); |
| 2606 | Size = SizeFull = ImVec2(0.0f, 0.0f); |
| 2607 | ContentSize = ContentSizeExplicit = ImVec2(0.0f, 0.0f); |
| 2608 | WindowPadding = ImVec2(0.0f, 0.0f); |
| 2609 | WindowRounding = 0.0f; |
| 2610 | WindowBorderSize = 0.0f; |
| 2611 | NameBufLen = (int)strlen(name) + 1; |
| 2612 | MoveId = GetID("#MOVE"); |
| 2613 | ChildId = 0; |
| 2614 | Scroll = ImVec2(0.0f, 0.0f); |
| 2615 | ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); |
| 2616 | ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); |
| 2617 | ScrollbarSizes = ImVec2(0.0f, 0.0f); |
| 2618 | ScrollbarX = ScrollbarY = false; |
| 2619 | Active = WasActive = false; |
| 2620 | WriteAccessed = false; |
| 2621 | Collapsed = false; |
| 2622 | WantCollapseToggle = false; |
| 2623 | SkipItems = false; |
| 2624 | Appearing = false; |
| 2625 | Hidden = false; |
| 2626 | IsFallbackWindow = false; |
| 2627 | HasCloseButton = false; |
| 2628 | ResizeBorderHeld = -1; |
| 2629 | BeginCount = 0; |
| 2630 | BeginOrderWithinParent = -1; |
| 2631 | BeginOrderWithinContext = -1; |
| 2632 | PopupId = 0; |
| 2633 | AutoFitFramesX = AutoFitFramesY = -1; |
| 2634 | AutoFitChildAxises = 0x00; |
| 2635 | AutoFitOnlyGrows = false; |
| 2636 | AutoPosLastDirection = ImGuiDir_None; |
| 2637 | HiddenFramesCanSkipItems = HiddenFramesCannotSkipItems = 0; |
| 2638 | SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiCond_Always | ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing; |
| 2639 | SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); |
| 2640 | |
| 2641 | InnerRect = ImRect(0.0f, 0.0f, 0.0f, 0.0f); // Clear so the InnerRect.GetSize() code in Begin() doesn't lead to overflow even if the result isn't used. |
| 2642 | |
| 2643 | LastFrameActive = -1; |
| 2644 | LastTimeActive = -1.0f; |
| 2645 | ItemWidthDefault = 0.0f; |
| 2646 | FontWindowScale = 1.0f; |
| 2647 | SettingsOffset = -1; |
| 2648 | |
| 2649 | DrawList = &DrawListInst; |
| 2650 | DrawList->_OwnerName = Name; |
| 2651 | ParentWindow = NULL; |
| 2652 | RootWindow = NULL; |
| 2653 | RootWindowForTitleBarHighlight = NULL; |
| 2654 | RootWindowForNav = NULL; |
| 2655 |