Carousel

class Carousel(pointer: <Error class: unknown class><<Error class: unknown class>>) : Swipeable

A paginated scrolling widget.

carousel

The AdwCarousel widget can be used to display a set of pages with swipe-based navigation between them.

class@CarouselIndicatorDots and class@CarouselIndicatorLines can be used to provide page indicators for AdwCarousel.

CSS nodes

AdwCarousel has a single CSS node with name carousel.

Constructors

Link copied to clipboard
constructor()

Creates a new AdwCarousel.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adwCarouselPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val adwSwipeablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether to allow swiping for more than one page at a time.

Link copied to clipboard

Sets whether the AdwCarousel can be dragged with mouse pointer.

Link copied to clipboard

Whether the widget will respond to scroll wheel events.

Link copied to clipboard
open val gtkAccessiblePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkConstraintTargetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkOrientablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether the carousel can be navigated.

Link copied to clipboard
val nPages: <Error class: unknown class>

The number of pages in a AdwCarousel.

Link copied to clipboard

Current scrolling position, unitless.

Link copied to clipboard
var revealDuration: <Error class: unknown class>

Page reveal duration, in milliseconds.

Link copied to clipboard

Scroll animation spring parameters.

Link copied to clipboard
var spacing: <Error class: unknown class>

Spacing between pages in pixels.

Functions

Link copied to clipboard
fun append(child: <Error class: unknown class>)

Appends @child to @self.

Link copied to clipboard
fun connectPageChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>) -> Unit): <Error class: unknown class>

This signal is emitted after a page has been changed.

Link copied to clipboard

Gets whether to allow swiping for more than one page at a time.

Link copied to clipboard

Sets whether @self can be dragged with mouse pointer.

Link copied to clipboard

Gets whether @self will respond to scroll wheel events.

Link copied to clipboard

Gets the progress @self will snap back to after the gesture is canceled.

Link copied to clipboard
open fun getDistance(): Double

Gets the swipe distance of @self.

Link copied to clipboard

Gets whether @self can be navigated.

Link copied to clipboard
fun getNPages(): <Error class: unknown class>

Gets the number of pages in @self.

Link copied to clipboard
fun getNthPage(n: <Error class: unknown class>): <Error class: unknown class>

Gets the page at position @n.

Link copied to clipboard

Gets current scroll position in @self, unitless.

Link copied to clipboard
open fun getProgress(): Double

Gets the current progress of @self.

Link copied to clipboard
fun getRevealDuration(): <Error class: unknown class>

Gets the page reveal duration, in milliseconds.

Link copied to clipboard

Gets the scroll animation spring parameters for @self.

Link copied to clipboard
fun getSpacing(): <Error class: unknown class>

Gets spacing between pages in pixels.

Link copied to clipboard
open fun getSwipeArea(navigationDirection: NavigationDirection, isDrag: Boolean, rect: <Error class: unknown class>)

Gets the area @self can start a swipe from for the given direction and gesture type.

Link copied to clipboard
fun insert(child: <Error class: unknown class>, position: Int)

Inserts @child into @self at position @position.

Link copied to clipboard
fun prepend(child: <Error class: unknown class>)

Prepends @child to @self.

Link copied to clipboard
fun remove(child: <Error class: unknown class>)

Removes @child from @self.

Link copied to clipboard
fun reorder(child: <Error class: unknown class>, position: Int)

Moves @child into position @position.

Link copied to clipboard
fun scrollTo(widget: <Error class: unknown class>, animate: Boolean)

Scrolls to @widget.

Link copied to clipboard
fun setAllowLongSwipes(allowLongSwipes: Boolean)

Sets whether to allow swiping for more than one page at a time.

Link copied to clipboard
fun setAllowMouseDrag(allowMouseDrag: Boolean)

Sets whether @self can be dragged with mouse pointer.

Link copied to clipboard
fun setAllowScrollWheel(allowScrollWheel: Boolean)

Sets whether @self will respond to scroll wheel events.

Link copied to clipboard
fun setInteractive(interactive: Boolean)

Sets whether @self can be navigated.

Link copied to clipboard
fun setRevealDuration(revealDuration: <Error class: unknown class>)

Sets the page reveal duration, in milliseconds.

Link copied to clipboard

Sets the scroll animation spring parameters for @self.

Link copied to clipboard
fun setSpacing(spacing: <Error class: unknown class>)

Sets spacing between pages in pixels.