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

Method DockContextCalcDropPosForDocking

imgui_tiny_app/imgui/imgui.cpp:18499–18514  ·  view source on GitHub ↗

This is mostly used for automation.

Source from the content-addressed store, hash-verified

18497
18498// This is mostly used for automation.
18499bool ImGui::DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos)
18500{
18501 if (target != NULL && target_node == NULL)
18502 target_node = target->DockNode;
18503
18504 // In DockNodePreviewDockSetup() for a root central node instead of showing both "inner" and "outer" drop rects
18505 // (which would be functionally identical) we only show the outer one. Reflect this here.
18506 if (target_node && target_node->ParentNode == NULL && target_node->IsCentralNode() && split_dir != ImGuiDir_None)
18507 split_outer = true;
18508 ImGuiDockPreviewData split_data;
18509 DockNodePreviewDockSetup(target, target_node, payload_window, payload_node, &split_data, false, split_outer);
18510 if (split_data.DropRectsDraw[split_dir+1].IsInverted())
18511 return false;
18512 *out_pos = split_data.DropRectsDraw[split_dir+1].GetCenter();
18513 return true;
18514}
18515
18516//-----------------------------------------------------------------------------
18517// Docking: ImGuiDockNode

Callers

nothing calls this directly

Calls 1

GetCenterMethod · 0.80

Tested by

no test coverage detected