setContentSelection

abstract fun setContentSelection(locator: SimpleLocatorData, onSuccess: () -> Unit, onError: (ColibrioException) -> Unit)

Sets the current content selection in this VisiblePage to the range most closely matching the specified locator.

If the specified locator is a range that is partially before and/or after the VisiblePage, then locator is first clamped to be within this VisiblePage content before the selection is made.

If the specified locator is completely outside this VisiblePage, this method does nothing and onError is called.

onError is also returned if the VisiblePage is no longer visible, or if the selection cannot be changed for some other reason.


abstract suspend fun setContentSelection(locator: SimpleLocatorData): ColibrioResult<Unit>

Sets the current content selection in this VisiblePage to the range most closely matching the specified locator.

If the specified locator is a range that is partially before and/or after the VisiblePage, then locator is first clamped to be within this VisiblePage content before the selection is made.

If the specified locator is completely outside this VisiblePage, this method does nothing and returns an error result.

An error result is also returned if the VisiblePage is no longer visible, or if the selection cannot be changed for some other reason.