MCPcopy Create free account
hub / github.com/Raais/ImStudio / BringWindowToFocusFront

Method BringWindowToFocusFront

src/third-party/imgui/imgui.cpp:6648–6667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6646}
6647
6648void ImGui::BringWindowToFocusFront(ImGuiWindow* window)
6649{
6650 ImGuiContext& g = *GImGui;
6651 IM_ASSERT(window == window->RootWindow);
6652
6653 const int cur_order = window->FocusOrder;
6654 IM_ASSERT(g.WindowsFocusOrder[cur_order] == window);
6655 if (g.WindowsFocusOrder.back() == window)
6656 return;
6657
6658 const int new_order = g.WindowsFocusOrder.Size - 1;
6659 for (int n = cur_order; n < new_order; n++)
6660 {
6661 g.WindowsFocusOrder[n] = g.WindowsFocusOrder[n + 1];
6662 g.WindowsFocusOrder[n]->FocusOrder--;
6663 IM_ASSERT(g.WindowsFocusOrder[n]->FocusOrder == n);
6664 }
6665 g.WindowsFocusOrder[new_order] = window;
6666 window->FocusOrder = (short)new_order;
6667}
6668
6669void ImGui::BringWindowToDisplayFront(ImGuiWindow* window)
6670{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected