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

Function BoxSelectPreStartDrag

src/imgui/imgui_widgets.cpp:7635–7646  ·  view source on GitHub ↗

Call on the initial click.

Source from the content-addressed store, hash-verified

7633
7634// Call on the initial click.
7635static void BoxSelectPreStartDrag(ImGuiID id, ImGuiSelectionUserData clicked_item)
7636{
7637 ImGuiContext& g = *GImGui;
7638 ImGuiBoxSelectState* bs = &g.BoxSelectState;
7639 bs->ID = id;
7640 bs->IsStarting = true; // Consider starting box-select.
7641 bs->IsStartedFromVoid = (clicked_item == ImGuiSelectionUserData_Invalid);
7642 bs->IsStartedSetNavIdOnce = bs->IsStartedFromVoid;
7643 bs->KeyMods = g.IO.KeyMods;
7644 bs->StartPosRel = bs->EndPosRel = ImGui::WindowPosAbsToRel(g.CurrentWindow, g.IO.MousePos);
7645 bs->ScrollAccum = ImVec2(0.0f, 0.0f);
7646}
7647
7648static void BoxSelectActivateDrag(ImGuiBoxSelectState* bs, ImGuiWindow* window)
7649{

Callers 2

EndMultiSelectMethod · 0.85
MultiSelectItemFooterMethod · 0.85

Calls 2

WindowPosAbsToRelFunction · 0.85
ImVec2Function · 0.85

Tested by

no test coverage detected