Haiku Book: reword BListView::CurrentSelection

Change-Id: I6e12c99fa4da43c333f3886ce5decf3f0919087e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10943
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
This commit is contained in:
Máximo Castañeda
2026-05-07 08:18:21 +00:00
committed by Adrien Destugues
parent 4904a48b45
commit d2e7876d92
+37 -8
View File
@@ -911,16 +911,45 @@
/*! /*!
\fn int32 BListView::CurrentSelection(int32 index) const \fn int32 BListView::CurrentSelection(int32 index) const
\brief Returns the index of a currently selected item relative to the passed \brief Returns the index in the list of the \a index'th selected item.
in \a index.
If the index of the selected item is lower than \a index the value returned A negative value is returned when there are not enough selected items.
is negative, if the index of the selected item is greater than \a index the
value returned is positive. If the index of the selected item is equal to
\a index then 0 is returned.
\param index The \a index of the item to get relative to the selected item's For example, a list containing the sorted letters of the English alphabet
index. with the vowels selected would return the following values:
<table>
<tr>
<th>\a index</th>
<th>value</th>
</tr>
<tr>
<td>0</td>
<td>0 (the list index of 'A')</td>
</tr>
<tr>
<td>1</td>
<td>4 (the list index of 'E')</td>
</tr>
<tr>
<td>2</td>
<td>8 (the list index of 'I')</td>
</tr>
<tr>
<td>3</td>
<td>14 (the list index of 'O')</td>
</tr>
<tr>
<td>4</td>
<td>20 (the list index of 'U')</td>
</tr>
<tr>
<td>5</td>
<td>-1 (no more items are selected)</td>
</tr>
</table>
\param index The \a index in the selection set of the item to get.
\since BeOS R3 \since BeOS R3
*/ */