MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / GetIDFromRectangle

Method GetIDFromRectangle

core/src/imgui/imgui.cpp:2997–3004  ·  view source on GitHub ↗

This is only used in rare/specific situations to manufacture an ID out of nowhere.

Source from the content-addressed store, hash-verified

2995
2996// This is only used in rare/specific situations to manufacture an ID out of nowhere.
2997ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
2998{
2999 ImGuiID seed = IDStack.back();
3000 const int r_rel[4] = { (int)(r_abs.Min.x - Pos.x), (int)(r_abs.Min.y - Pos.y), (int)(r_abs.Max.x - Pos.x), (int)(r_abs.Max.y - Pos.y) };
3001 ImGuiID id = ImHashData(&r_rel, sizeof(r_rel), seed);
3002 ImGui::KeepAliveID(id);
3003 return id;
3004}
3005
3006static void SetCurrentWindow(ImGuiWindow* window)
3007{

Callers 2

BeginDragDropSourceMethod · 0.80
BeginDragDropTargetMethod · 0.80

Calls 1

ImHashDataFunction · 0.85

Tested by

no test coverage detected