MCPcopy Create free account
hub / github.com/cinder/Cinder / CreateNewWindow

Function CreateNewWindow

src/imgui/imgui.cpp:6490–6512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6488}
6489
6490static ImGuiWindow* CreateNewWindow(const char* name, ImGuiWindowFlags flags)
6491{
6492 // Create window the first time
6493 //IMGUI_DEBUG_LOG("CreateNewWindow '%s', flags = 0x%08X\n", name, flags);
6494 ImGuiContext& g = *GImGui;
6495 ImGuiWindow* window = IM_NEW(ImGuiWindow)(&g, name);
6496 window->Flags = flags;
6497 g.WindowsById.SetVoidPtr(window->ID, window);
6498
6499 ImGuiWindowSettings* settings = NULL;
6500 if (!(flags & ImGuiWindowFlags_NoSavedSettings))
6501 if ((settings = ImGui::FindWindowSettingsByWindow(window)) != 0)
6502 window->SettingsOffset = g.SettingsWindows.offset_from_ptr(settings);
6503
6504 InitOrLoadWindowSettings(window, settings);
6505
6506 if (flags & ImGuiWindowFlags_NoBringToFrontOnFocus)
6507 g.Windows.push_front(window); // Quite slow but rare and only once
6508 else
6509 g.Windows.push_back(window);
6510
6511 return window;
6512}
6513
6514static inline ImVec2 CalcWindowMinSize(ImGuiWindow* window)
6515{

Callers 1

BeginMethod · 0.85

Calls 4

InitOrLoadWindowSettingsFunction · 0.85
SetVoidPtrMethod · 0.80
offset_from_ptrMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected