public clampScrollOffsetFor(totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Void:
Clamps the current scroll offset to the valid range.