Handy.Carousel
Description: Reference for Handy.Carousel

### Class

# HandyCarousel

#### Description [src]

    final class Handy.Carousel : Gtk.EventBox {
      /* No available fields */
    }

A paginated scrolling widget.

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

`HdyCarouselIndicatorDots` and `HdyCarouselIndicatorLines` can be used to provide page indicators for `HdyCarousel`.

## CSS nodes

`HdyCarousel` has a single CSS node with name `carousel`.

Available since: | 1.0

#### Ancestors

- GtkEventBox
- GtkBin
- GtkContainer
- GtkWidget
- GInitiallyUnowned
- GObject

#### Implements

- AtkImplementorIface
- GtkBuildable
- GtkOrientable
- HdySwipeable

#### Constructors

###### hdy_carousel_new

Creates a new `HdyCarousel`.

Available since: 1.0

#### Instance methods

###### hdy_carousel_get_allow_long_swipes

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

Available since: 1.2

###### hdy_carousel_get_allow_mouse_drag

Sets whether `self` can be dragged with mouse pointer.

Available since: 1.0

###### hdy_carousel_get_allow_scroll_wheel

Gets whether `self` will respond to scroll wheel events.

Available since: 1.4

###### hdy_carousel_get_animation_duration

Gets animation duration used by `hdy_carousel_scroll_to()`.

Available since: 1.0

###### hdy_carousel_get_interactive

Gets whether `self` can be navigated.

Available since: 1.0

###### hdy_carousel_get_n_pages

Gets the number of pages in `self`.

Available since: 1.0

###### hdy_carousel_get_position

Gets current scroll position in `self`. It’s unitless, 1 matches 1 page.

Available since: 1.0

###### hdy_carousel_get_reveal_duration

Gets duration of the animation used when adding or removing pages, in milliseconds.

Available since: 1.0

###### hdy_carousel_get_spacing

Gets spacing between pages in pixels.

Available since: 1.0

###### hdy_carousel_insert

Inserts `child` into `self` at position `position`.

Available since: 1.0

###### hdy_carousel_prepend

Prepends `child` to `self`.

Available since: 1.0

###### hdy_carousel_reorder

Moves `child` into position `position`.

Available since: 1.0

###### hdy_carousel_scroll_to

Scrolls to `widget` position with an animation.

Available since: 1.0

###### hdy_carousel_scroll_to_full

Scrolls to `widget` position with an animation.

Available since: 1.0

###### hdy_carousel_set_allow_long_swipes

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

Available since: 1.2

###### hdy_carousel_set_allow_mouse_drag

Sets whether `self` can be dragged with mouse pointer.

Available since: 1.0

###### hdy_carousel_set_allow_scroll_wheel

Sets whether `self` will respond to scroll wheel events.

Available since: 1.4

###### hdy_carousel_set_animation_duration

Sets animation duration used by `hdy_carousel_scroll_to()`.

Available since: 1.0

###### hdy_carousel_set_interactive

Sets whether `self` can be navigated.

Available since: 1.0

###### hdy_carousel_set_reveal_duration

Sets duration of the animation used when adding or removing pages, in milliseconds.

Available since: 1.0

###### hdy_carousel_set_spacing

Sets spacing between pages in pixels.

Available since: 1.0

##### Methods inherited from HdySwipeable (8)

###### hdy_swipeable_emit_child_switched

Emits `HdySwipeable::child-switched` signal.

Available since: 1.0

###### hdy_swipeable_get_cancel_progress

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

Available since: 1.0

###### hdy_swipeable_get_distance

Gets the swipe distance of `self`.

Available since: 1.0

###### hdy_swipeable_get_progress

Gets the current progress of `self`.

Available since: 1.0

###### hdy_swipeable_get_snap_points

Gets the snap points of `self`.

Available since: 1.0

###### hdy_swipeable_get_swipe_area

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

Available since: 1.0

###### hdy_swipeable_get_swipe_tracker

Gets the `HdySwipeTracker` used by this swipeable widget.

Available since: 1.0

###### hdy_swipeable_switch_child

Switches to child with index `index`.

Available since: 1.0

#### Properties

###### Handy.Carousel:allow-long-swipes

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

Available since: 1.2

###### Handy.Carousel:allow-mouse-drag

Sets whether the `HdyCarousel` can be dragged with mouse pointer.

Available since: 1.0

###### Handy.Carousel:allow-scroll-wheel

Whether the widget will respond to scroll wheel events.

Available since: 1.4

###### Handy.Carousel:animation-duration

Animation duration used by `hdy_carousel_scroll_to()`, in milliseconds.

Available since: 1.0

###### Handy.Carousel:interactive

Whether the carousel can be navigated.

Available since: 1.0

###### Handy.Carousel:n-pages

The number of pages in a `HdyCarousel`.

Available since: 1.0

###### Handy.Carousel:position

Current scrolling position, unitless.

Available since: 1.0

###### Handy.Carousel:reveal-duration

Page reveal duration, in milliseconds.

Available since: 1.0

###### Handy.Carousel:spacing

Spacing between pages in pixels.

Available since: 1.0

#### Signals

###### Handy.Carousel::page-changed

This signal is emitted after a page has been changed.

Available since: 1.0

##### Signals inherited from HdySwipeable (1)

###### Handy.Swipeable::child-switched

Emitted when the widget’s visible child is changed.

Available since: 1.0

#### Class structure

    struct HandyCarouselClass {
      GtkEventBoxClass parent_class;

    }

###### Class members

`parent_class` |
    GtkEventBoxClass
| No description available.