| 8113 | } |
| 8114 | |
| 8115 | void ImGui::SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data) |
| 8116 | { |
| 8117 | // Note that flags will be cleared by ItemAdd(), so it's only useful for Navigation code! |
| 8118 | // This designed so widgets can also cheaply set this before calling ItemAdd(), so we are not tied to MultiSelect api. |
| 8119 | ImGuiContext& g = *GImGui; |
| 8120 | g.NextItemData.SelectionUserData = selection_user_data; |
| 8121 | g.NextItemData.FocusScopeId = g.CurrentFocusScopeId; |
| 8122 | |
| 8123 | if (ImGuiMultiSelectTempData* ms = g.CurrentMultiSelect) |
| 8124 | { |
| 8125 | // Auto updating RangeSrcPassedBy for cases were clipper is not used (done before ItemAdd() clipping) |
| 8126 | g.NextItemData.ItemFlags |= ImGuiItemFlags_HasSelectionUserData | ImGuiItemFlags_IsMultiSelect; |
| 8127 | if (ms->IO.RangeSrcItem == selection_user_data) |
| 8128 | ms->RangeSrcPassedBy = true; |
| 8129 | } |
| 8130 | else |
| 8131 | { |
| 8132 | g.NextItemData.ItemFlags |= ImGuiItemFlags_HasSelectionUserData; |
| 8133 | } |
| 8134 | } |
| 8135 | |
| 8136 | // In charge of: |
| 8137 | // - Applying SetAll for submitted items. |
nothing calls this directly
no outgoing calls
no test coverage detected