adw.carousel
Module for [Carousel] class
Types 3
A paginated scrolling widget.
The [adw.carousel.Carousel] 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 [adw.carousel.Carousel].
CSS nodes
[adw.carousel.Carousel] has a single CSS node with name carousel.
Methods
CarouselGidBuilder builder()Get builder for [adw.carousel.Carousel] Returns: New builder objectbool allowLongSwipes() @propertyGet `allowLongSwipes` property. Returns: Whether to allow swiping for more than one page at a time.void allowLongSwipes(bool propval) @propertySet `allowLongSwipes` property. Params: propval = Whether to allow swiping for more than one page at a time.bool allowMouseDrag() @propertyGet `allowMouseDrag` property. Returns: Sets whether the [adw.carousel.Carousel] can be dragged with mouse pointer.void allowMouseDrag(bool propval) @propertySet `allowMouseDrag` property. Params: propval = Sets whether the [adw.carousel.Carousel] can be dragged with mouse pointer.bool allowScrollWheel() @propertyGet `allowScrollWheel` property. Returns: Whether the widget will respond to scroll wheel events.void allowScrollWheel(bool propval) @propertySet `allowScrollWheel` property. Params: propval = Whether the widget will respond to scroll wheel events.bool interactive() @propertyGet `interactive` property. Returns: Whether the carousel can be navigated.void interactive(bool propval) @propertySet `interactive` property. Params: propval = Whether the carousel can be navigated.uint nPages() @propertyGet `nPages` property. Returns: The number of pages in a [adw.carousel.Carousel].uint revealDuration() @propertyGet `revealDuration` property. Returns: Page reveal duration, in milliseconds.void revealDuration(uint propval) @propertySet `revealDuration` property. Params: propval = Page reveal duration, in milliseconds.adw.spring_params.SpringParams scrollParams() @propertyGet `scrollParams` property. Returns: Scroll animation spring parameters.void scrollParams(adw.spring_params.SpringParams propval) @propertySet `scrollParams` property. Params: propval = Scroll animation spring parameters.void spacing(uint propval) @propertySet `spacing` property. Params: propval = Spacing between pages in pixels.void append(gtk.widget.Widget child)Appends child to self.bool getAllowLongSwipes()Gets whether to allow swiping for more than one page at a time. Returns: `TRUE` if long swipes are allowedbool getAllowMouseDrag()Sets whether self can be dragged with mouse pointer. Returns: whether self can be dragged with mouse pointerbool getAllowScrollWheel()Gets whether self will respond to scroll wheel events. Returns: `TRUE` if self will respond to scroll wheel eventsbool getInteractive()Gets whether self can be navigated. Returns: whether self can be navigateduint getNPages()Gets the number of pages in self. Returns: the number of pages in selfgtk.widget.Widget getNthPage(uint n)Gets the page at position `n`.double getPosition()Gets current scroll position in self, unitless.uint getRevealDuration()Gets the page reveal duration, in milliseconds. Returns: the durationadw.spring_params.SpringParams getScrollParams()Gets the scroll animation spring parameters for self. Returns: the animation parametersuint getSpacing()Gets spacing between pages in pixels. Returns: spacing between pagesvoid insert(gtk.widget.Widget child, int position)Inserts child into self at position position.void prepend(gtk.widget.Widget child)Prepends child to self.void remove(gtk.widget.Widget child)Removes child from self.void reorder(gtk.widget.Widget child, int position)Moves child into position position.void scrollTo(gtk.widget.Widget widget, bool animate)Scrolls to widget.void setAllowLongSwipes(bool allowLongSwipes)Sets whether to allow swiping for more than one page at a time.void setAllowMouseDrag(bool allowMouseDrag)Sets whether self can be dragged with mouse pointer.void setAllowScrollWheel(bool allowScrollWheel)Sets whether self will respond to scroll wheel events.void setInteractive(bool interactive)Sets whether self can be navigated.void setRevealDuration(uint revealDuration)Sets the page reveal duration, in milliseconds.void setScrollParams(adw.spring_params.SpringParams params)Sets the scroll animation spring parameters for self.void setSpacing(uint spacing)Sets spacing between pages in pixels.gulong connectPageChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == uint)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : adw.carousel.Carousel)))
&& Parameters!T.length < 3)Connect to `PageChanged` signal.classCarouselGidBuilderImpl(T) : gtk.widget.WidgetGidBuilderImpl!T, adw.swipeable.SwipeableGidBuilderImpl!T, gtk.orientable.OrientableGidBuilderImpl!T
Methods
T allowLongSwipes(bool propval)Set `allowLongSwipes` property. Params: propval = Whether to allow swiping for more than one page at a time.T allowMouseDrag(bool propval)Set `allowMouseDrag` property. Params: propval = Sets whether the [adw.carousel.Carousel] can be dragged with mouse pointer.T allowScrollWheel(bool propval)Set `allowScrollWheel` property. Params: propval = Whether the widget will respond to scroll wheel events.T interactive(bool propval)Set `interactive` property. Params: propval = Whether the carousel can be navigated.T revealDuration(uint propval)Set `revealDuration` property. Params: propval = Page reveal duration, in milliseconds.T scrollParams(adw.spring_params.SpringParams propval)Set `scrollParams` property. Params: propval = Scroll animation spring parameters.T spacing(uint propval)Set `spacing` property. Params: propval = Spacing between pages in pixels. Returns: Builder instance for fluent chaining