# TextSelection

Artifact: [androidx.pdf:pdf-core](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/selection/model/TextSelection.kt+class:androidx.pdf.selection.model.TextSelection) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
class TextSelection : Selection
```

<br />

*** ** * ** ***

Represents text content that has been selected.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/pdf/selection/model/TextSelection#TextSelection(kotlin.CharSequence,kotlin.collections.List)(text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html, bounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/pdf/PdfRect>)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/model/TextSelection#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/model/TextSelection#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/model/TextSelection#toString()()` |

| ### Public properties |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/pdf/PdfRect>` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/model/TextSelection#bounds()` The bounding rectangles of the selected text. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/selection/model/TextSelection#text()` The selected text. |

## Public constructors

### TextSelection

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
TextSelection(text: CharSequence, bounds: List<PdfRect>)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### bounds

```
open val bounds: List<PdfRect>
```

The bounding rectangles of the selected text.

### text

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
val text: CharSequence
```

The selected text.