TextSelectionActions

Interface for selecting text on a page.

Functions

Link copied to clipboard
abstract suspend fun clearTextSelection()

Clear the text selection.

Link copied to clipboard
abstract suspend fun onDragChanged(dragHandle: DragHandle)

To notify about text selection drag changes. It's only used to notify if a drag is being in progress or not (Some parts of the UI might need to know that).

Link copied to clipboard
abstract suspend fun selectWordAtPoint(pageIndex: Int, x: Float, y: Float, tolerance: Float)

Select the word at a given point with the given tolerance. Coordinates and tolerance are in PDF point units.

Link copied to clipboard
abstract suspend fun setSelection(pageIndex: Int, start: Int, end: Int)

Select text in a given range. The range being the index of the characters on the page usually in reading order.