| 2639 | // - Note that the PreferSortAscending flag is never checked, it is essentially the default and therefore a no-op. |
| 2640 | IM_STATIC_ASSERT(ImGuiSortDirection_None == 0 && ImGuiSortDirection_Ascending == 1 && ImGuiSortDirection_Descending == 2); |
| 2641 | ImGuiSortDirection ImGui::TableGetColumnNextSortDirection(ImGuiTableColumn* column) |
| 2642 | { |
| 2643 | IM_ASSERT(column->SortDirectionsAvailCount > 0); |
| 2644 | if (column->SortOrder == -1) |
| 2645 | return TableGetColumnAvailSortDirection(column, 0); |
| 2646 | for (int n = 0; n < 3; n++) |
| 2647 | if (column->SortDirection == TableGetColumnAvailSortDirection(column, n)) |
| 2648 | return TableGetColumnAvailSortDirection(column, (n + 1) % column->SortDirectionsAvailCount); |
| 2649 | IM_ASSERT(0); |
| 2650 | return ImGuiSortDirection_None; |
| 2651 | } |
| 2652 | |
| 2653 | // Note that the NoSortAscending/NoSortDescending flags are processed in TableSortSpecsSanitize(), and they may change/revert |
| 2654 | // the value of SortDirection. We could technically also do it here but it would be unnecessary and duplicate code. |
nothing calls this directly
no test coverage detected