adw.carousel

Module for [Carousel] class

Types 3

A paginated scrolling widget.

carousel

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

adw.carousel_indicator_dots.CarouselIndicatorDots and adw.carousel_indicator_lines.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
GType _getGType() static nothrow
GType _gType() @property nothrow
Carousel self() nothrowReturns `this`, for use in `with` statements.
CarouselGidBuilder builder() static nothrowGet builder for [adw.carousel.Carousel] Returns: New builder object
bool allowLongSwipes() @property nothrowGet `allowLongSwipes` property. Returns: Whether to allow swiping for more than one page at a time.
void allowLongSwipes(bool propval) @property nothrowSet `allowLongSwipes` property. Params: propval = Whether to allow swiping for more than one page at a time.
bool allowMouseDrag() @property nothrowGet `allowMouseDrag` property. Returns: Sets whether the [adw.carousel.Carousel] can be dragged with mouse pointer.
void allowMouseDrag(bool propval) @property nothrowSet `allowMouseDrag` property. Params: propval = Sets whether the [adw.carousel.Carousel] can be dragged with mouse pointer.
bool allowScrollWheel() @property nothrowGet `allowScrollWheel` property. Returns: Whether the widget will respond to scroll wheel events.
void allowScrollWheel(bool propval) @property nothrowSet `allowScrollWheel` property. Params: propval = Whether the widget will respond to scroll wheel events.
bool interactive() @property nothrowGet `interactive` property. Returns: Whether the carousel can be navigated.
void interactive(bool propval) @property nothrowSet `interactive` property. Params: propval = Whether the carousel can be navigated.
uint nPages() @property nothrowGet `nPages` property. Returns: The number of pages in a [adw.carousel.Carousel].
double position() @property nothrowGet `position` property. Returns: Current scrolling position, unitless.
uint revealDuration() @property nothrowGet `revealDuration` property. Returns: Page reveal duration, in milliseconds.
void revealDuration(uint propval) @property nothrowSet `revealDuration` property. Params: propval = Page reveal duration, in milliseconds.
adw.spring_params.SpringParams scrollParams() @property nothrowGet `scrollParams` property. Returns: Scroll animation spring parameters.
void scrollParams(adw.spring_params.SpringParams propval) @property nothrowSet `scrollParams` property. Params: propval = Scroll animation spring parameters.
uint spacing() @property nothrowGet `spacing` property. Returns: Spacing between pages in pixels.
void spacing(uint propval) @property nothrowSet `spacing` property. Params: propval = Spacing between pages in pixels.
void append(gtk.widget.Widget child) nothrowAppends child to self.
bool getAllowLongSwipes() nothrowGets whether to allow swiping for more than one page at a time. Returns: `TRUE` if long swipes are allowed
bool getAllowMouseDrag() nothrowSets whether self can be dragged with mouse pointer. Returns: whether self can be dragged with mouse pointer
bool getAllowScrollWheel() nothrowGets whether self will respond to scroll wheel events. Returns: `TRUE` if self will respond to scroll wheel events
bool getInteractive() nothrowGets whether self can be navigated. Returns: whether self can be navigated
uint getNPages() nothrowGets the number of pages in self. Returns: the number of pages in self
gtk.widget.Widget getNthPage(uint n) nothrowGets the page at position `n`.
double getPosition() nothrowGets current scroll position in self, unitless.
uint getRevealDuration() nothrowGets the page reveal duration, in milliseconds. Returns: the duration
adw.spring_params.SpringParams getScrollParams() nothrowGets the scroll animation spring parameters for self. Returns: the animation parameters
uint getSpacing() nothrowGets spacing between pages in pixels. Returns: spacing between pages
void insert(gtk.widget.Widget child, int position) nothrowInserts child into self at position position.
void prepend(gtk.widget.Widget child) nothrowPrepends child to self.
void remove(gtk.widget.Widget child) nothrowRemoves child from self.
void reorder(gtk.widget.Widget child, int position) nothrowMoves child into position position.
void scrollTo(gtk.widget.Widget widget, bool animate) nothrowScrolls to widget.
void setAllowLongSwipes(bool allowLongSwipes) nothrowSets whether to allow swiping for more than one page at a time.
void setAllowMouseDrag(bool allowMouseDrag) nothrowSets whether self can be dragged with mouse pointer.
void setAllowScrollWheel(bool allowScrollWheel) nothrowSets whether self will respond to scroll wheel events.
void setInteractive(bool interactive) nothrowSets whether self can be navigated.
void setRevealDuration(uint revealDuration) nothrowSets the page reveal duration, in milliseconds.
void setScrollParams(adw.spring_params.SpringParams params) nothrowSets the scroll animation spring parameters for self.
void setSpacing(uint spacing) nothrowSets 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) nothrowConnect to `PageChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [adw.carousel.Carousel]. Returns: the newly created [adw.carousel.Carousel]

Fluent builder implementation template for adw.carousel.Carousel

Methods
T allowLongSwipes(bool propval) nothrowSet `allowLongSwipes` property. Params: propval = Whether to allow swiping for more than one page at a time.
T allowMouseDrag(bool propval) nothrowSet `allowMouseDrag` property. Params: propval = Sets whether the [adw.carousel.Carousel] can be dragged with mouse pointer.
T allowScrollWheel(bool propval) nothrowSet `allowScrollWheel` property. Params: propval = Whether the widget will respond to scroll wheel events.
T interactive(bool propval) nothrowSet `interactive` property. Params: propval = Whether the carousel can be navigated.
T revealDuration(uint propval) nothrowSet `revealDuration` property. Params: propval = Page reveal duration, in milliseconds.
T scrollParams(adw.spring_params.SpringParams propval) nothrowSet `scrollParams` property. Params: propval = Scroll animation spring parameters.
T spacing(uint propval) nothrowSet `spacing` property. Params: propval = Spacing between pages in pixels. Returns: Builder instance for fluent chaining

Fluent builder for adw.carousel.Carousel

Methods
Carousel build() nothrowCreate object from builder. Returns: New object