MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ClearWindowSettings

Method ClearWindowSettings

imgui_tiny_app/imgui/imgui.cpp:16387–16401  ·  view source on GitHub ↗

This will revert window to its initial state, including enabling the ImGuiCond_FirstUseEver/ImGuiCond_Once conditions once more.

Source from the content-addressed store, hash-verified

16385
16386// This will revert window to its initial state, including enabling the ImGuiCond_FirstUseEver/ImGuiCond_Once conditions once more.
16387void ImGui::ClearWindowSettings(const char* name)
16388{
16389 //IMGUI_DEBUG_LOG("ClearWindowSettings('%s')\n", name);
16390 ImGuiContext& g = *GImGui;
16391 ImGuiWindow* window = FindWindowByName(name);
16392 if (window != NULL)
16393 {
16394 window->Flags |= ImGuiWindowFlags_NoSavedSettings;
16395 InitOrLoadWindowSettings(window, NULL);
16396 if (window->DockId != 0)
16397 DockContextProcessUndockWindow(&g, window, true);
16398 }
16399 if (ImGuiWindowSettings* settings = window ? FindWindowSettingsByWindow(window) : FindWindowSettingsByID(ImHashStr(name)))
16400 settings->WantDelete = true;
16401}
16402
16403static void WindowSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
16404{

Callers

nothing calls this directly

Calls 2

InitOrLoadWindowSettingsFunction · 0.85
ImHashStrFunction · 0.85

Tested by

no test coverage detected