| 873 | */ |
| 874 | template <typename Tcontainer> |
| 875 | auto GetVisibleRangeIterators(Tcontainer &container) const |
| 876 | { |
| 877 | assert(static_cast<size_t>(this->GetCount()) == container.size()); // Scrollbar and container size must match. |
| 878 | auto first = std::next(std::begin(container), this->GetPosition()); |
| 879 | auto last = std::next(first, std::min<size_t>(this->GetCapacity(), this->GetCount() - this->GetPosition())); |
| 880 | return std::make_pair(first, last); |
| 881 | } |
| 882 | |
| 883 | /** |
| 884 | * Return an iterator pointing to the element of a scrolled widget that a user clicked in. |
no test coverage detected