ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
| 2891 | |
| 2892 | // ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods |
| 2893 | ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) : DrawListInst(NULL) |
| 2894 | { |
| 2895 | memset(this, 0, sizeof(*this)); |
| 2896 | Name = ImStrdup(name); |
| 2897 | NameBufLen = (int)strlen(name) + 1; |
| 2898 | ID = ImHashStr(name); |
| 2899 | IDStack.push_back(ID); |
| 2900 | MoveId = GetID("#MOVE"); |
| 2901 | ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); |
| 2902 | ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); |
| 2903 | AutoFitFramesX = AutoFitFramesY = -1; |
| 2904 | AutoPosLastDirection = ImGuiDir_None; |
| 2905 | SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiCond_Always | ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing; |
| 2906 | SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); |
| 2907 | LastFrameActive = -1; |
| 2908 | LastTimeActive = -1.0f; |
| 2909 | FontWindowScale = 1.0f; |
| 2910 | SettingsOffset = -1; |
| 2911 | DrawList = &DrawListInst; |
| 2912 | DrawList->_Data = &context->DrawListSharedData; |
| 2913 | DrawList->_OwnerName = Name; |
| 2914 | } |
| 2915 | |
| 2916 | ImGuiWindow::~ImGuiWindow() |
| 2917 | { |