TextSelectionState

data class TextSelectionState(val selection: TextRange? = null, val draggedHandle: DragHandle = DragHandle.NONE, val selectedText: String = "")

Current text selection and dragged handle state.

Constructors

Link copied to clipboard
constructor(selection: TextRange? = null, draggedHandle: DragHandle = DragHandle.NONE, selectedText: String = "")

Properties

Link copied to clipboard

The handle that is currently being dragged.

Link copied to clipboard

Returns true if a drag handle is currently being dragged.

Link copied to clipboard

Returns true if the left drag handle is currently being dragged.

Link copied to clipboard

Returns true if the right drag handle is currently being dragged.

Link copied to clipboard

Returns true if there is no text selected.

Link copied to clipboard

position for the popupmenu (in pdf coordinates) For the x coordinate we calculate the horizontal middle of all selected text blocks. For the y coordinate we take the highest top of all selected text blocks.

Link copied to clipboard

The text that is currently selected.

Link copied to clipboard

Selected text range on the page. null means no selection.