* set the scroll depth. * @param scroll set the scroll depth to this. */
| 1128 | * @param scroll set the scroll depth to this. |
| 1129 | */ |
| 1130 | void TextList::scrollTo(size_t scroll) |
| 1131 | { |
| 1132 | if (!_scrolling) |
| 1133 | return; |
| 1134 | _scroll = std::max((size_t)(0), std::min(_rows.size() - _visibleRows, scroll)); |
| 1135 | draw(); // can't just set _redraw here because reasons |
| 1136 | updateArrows(); |
| 1137 | } |
| 1138 | |
| 1139 | /** |
| 1140 | * Hooks up the button to work as part of an existing combobox, |