BListView: Add ScrollTo(index) method, auto-scroll on drag

Multi-select lists may also auto-scroll on drag now as well.

Document ScrollTo(index). Give Scrolling its own section.

Change-Id: I36284a28376a01bafd23ddb30162fc786fb41521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7213
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
John Scipione
2023-12-24 02:45:59 +00:00
committed by waddlesplash
parent 8d024b7062
commit 82bfaa954d
3 changed files with 69 additions and 21 deletions
+32 -8
View File
@@ -461,6 +461,14 @@
*/
/*!
\name Scrolling
*/
//! @{
/*!
\fn void BListView::ScrollTo(BPoint point)
\brief Scroll the view to the specified \a point.
@@ -473,6 +481,30 @@
*/
/*!
\fn void BListView::ScrollTo(int32 index)
\brief Scrolls to list item at \a index.
If above top scroll to first item, if below bottom
scroll to last item otherwise scroll to item at \a index.
\see IndexOf(), MouseMoved(), ScrollToSelection()
\since Haiku R1
*/
/*!
\fn void BListView::ScrollToSelection()
\brief Scrolls to selected list item.
\since BeOS R3
*/
//! @}
/*!
\name Adding/Removing Items
*/
@@ -844,14 +876,6 @@
//! @{
/*!
\fn void BListView::ScrollToSelection()
\brief Scrolls to selected list item.
\since BeOS R3
*/
/*!
\fn void BListView::Select(int32 index, bool extend)
\brief Selects the list item at the specified \a index.