Package-level declarations

Thumbnail bar (static and scrollable).

Types

Link copied to clipboard

A com.pspdfkit.ui.PdfThumbnailBar has two possible layout styles, depending on how it's planned to be used.

Link copied to clipboard
Thumbnail bar controller used to control properties and actions of scrollable and static thumbnail bar.
Link copied to clipboard
sealed interface ThumbnailBarEffect

One-time effects that should be handled by the UI layer. These are not part of the state and should be consumed once.

Link copied to clipboard
sealed interface ThumbnailBarEvent

Events that can be triggered by the UI. These represent user actions or system events that should modify state.

Link copied to clipboard

State manager for the thumbnail bar. This class is completely UI-independent and handles all business logic.

Link copied to clipboard
data class ThumbnailBarTheme(@ColorInt val backgroundColor: Int = 0xFFFFFFFF.toInt(), @ColorInt val borderColor: Int = 0xFFCCCCCC.toInt(), @ColorInt val thumbnailBorderColor: Int = 0xFF000000.toInt(), @ColorInt val thumbnailSelectedBorderColor: Int = 0xFF0066FF.toInt(), @IntRange(from = 1) val thumbnailWidth: Int = 20, @IntRange(from = 1) val thumbnailHeight: Int = 28, val usePageAspectRatio: Boolean = true, @IntRange(from = 0) val thumbnailPaddingPx: Int = 8, @IntRange(from = 0) val contentPaddingPx: Int = 16, @IntRange(from = 0) val borderSizePx: Int = 1, @IntRange(from = 0) val thumbnailBorderWidth: Int = 1, @IntRange(from = 0) val thumbnailSelectionBorderWidth: Int = 2, @IntRange(from = 0) val thumbnailMarginPx: Int = 0, val selectionBorderCornerRadiusPx: Float = 15.0f, @IntRange(from = 0) val viewPaddingPx: Int = 0, val thumbnailWidthDp: Float = 0.0f, val thumbnailHeightDp: Float = 0.0f, val selectionBorderWidthDp: Float = 0.0f, val thumbnailMarginDp: Float = 0.0f, val viewPaddingDp: Float = 0.0f, val thumbnailBorderWidthDp: Float = 0.0f, val selectionBorderCornerRadiusDp: Float = 0.0f, val floatingCornerRadiusDp: Float = 8.0f, val thumbnailCornerRadiusDp: Float = 2.0f)

Theme configuration for the thumbnail bar. Contains all visual customization properties.

Link copied to clipboard
data class ThumbnailBarUiState(val document: PdfDocument? = null, val configuration: PdfConfiguration? = null, val pageRenderConfiguration: PageRenderConfiguration? = null, val thumbnails: List<ThumbnailItem> = emptyList(), val selectedPageThumbnail: ThumbnailItem? = null, val selectedSiblingThumbnail: ThumbnailItem? = null, val layoutStyle: LayoutStyle = LayoutStyle.FLOATING, val theme: ThumbnailBarTheme = ThumbnailBarTheme(), val isDoublePageMode: Boolean = false, val isFirstPageSingle: Boolean = false, val isRTL: Boolean = false, val excludedAnnotationTypes: List<AnnotationType> = emptyList(), val isRedactionPreviewEnabled: Boolean = false, val drawableProviders: List<PdfDrawableProvider> = emptyList(), @IntRange(from = 0) val availableWidth: Int = 0, val isLoading: Boolean = false, val error: String? = null, val dirtyPages: Set<Int> = emptySet(), val scrollableThumbnails: Map<Int, ThumbnailBitmap> = emptyMap(), val isScrollableMode: Boolean = false, val scrollableSelectedPageIndex: Int = 0)

Represents the complete UI state of the thumbnail bar. Immutable data class ensuring safe state management.

Link copied to clipboard
class ThumbnailBitmap(bitmap: Bitmap) : BitmapHandle

Public thumbnail-bar bitmap type.

Link copied to clipboard
data class ThumbnailItem(@IntRange(from = 0) val pageIndex: Int, val position: ThumbnailPosition, val bitmap: ThumbnailBitmap? = null, val isSelected: Boolean = false, val isRendering: Boolean = false, val absolutePositionX: Float? = null, val absolutePositionY: Float? = null)

Represents a single thumbnail item with its rendering state.

Functions

Link copied to clipboard
fun PdfScrollableThumbnailBar(stateManager: ThumbnailBarStateManager, onPageChanged: (pageIndex: Int) -> Unit, modifier: Modifier = Modifier)

Composable function for the PDF Scrollable Thumbnail Bar.

Link copied to clipboard
fun PdfStaticThumbnailBar(stateManager: ThumbnailBarStateManager, onPageChanged: (pageIndex: Int) -> Unit, modifier: Modifier = Modifier)

Composable function for the PDF Static Thumbnail Bar.

Link copied to clipboard

Remember a ThumbnailBarStateManager across recompositions.

Link copied to clipboard

Convenience function to set a document on the thumbnail bar. This should be called from a LaunchedEffect when the document changes.

Link copied to clipboard

Convenience function to handle page changes from external sources.