Carousel

Constructors

this
this(HdyCarousel* hdyCarousel, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Create a new #HdyCarousel widget.

Members

Functions

addOnPageChanged
gulong addOnPageChanged(void delegate(uint, Carousel) dlg, ConnectFlags connectFlags)

This signal is emitted after a page has been changed. This can be used to implement "infinite scrolling" by connecting to this signal and amending the pages.

getAllowMouseDrag
bool getAllowMouseDrag()

Sets whether @self can be dragged with mouse pointer

getAnimationDuration
uint getAnimationDuration()

Gets animation duration used by hdy_carousel_scroll_to().

getCarouselStruct
HdyCarousel* getCarouselStruct(bool transferOwnership)

Get the main Gtk struct

getInteractive
bool getInteractive()

Gets whether @self can be navigated.

getNPages
uint getNPages()

Gets the number of pages in @self.

getPosition
double getPosition()

Gets current scroll position in @self. It's unitless, 1 matches 1 page.

getRevealDuration
uint getRevealDuration()

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

getSpacing
uint getSpacing()

Gets spacing between pages in pixels.

getStruct
void* getStruct()

the main Gtk struct as a void*

insert
void insert(Widget child, int position)

Inserts @child into @self at position @position.

prepend
void prepend(Widget child)

Prepends @child to @self

reorder
void reorder(Widget child, int position)

Moves @child into position @position.

scrollTo
void scrollTo(Widget widget)

Scrolls to @widget position with an animation. #HdyCarousel:animation-duration property can be used for controlling the duration.

scrollToFull
void scrollToFull(Widget widget, long duration)

Scrolls to @widget position with an animation.

setAllowMouseDrag
void setAllowMouseDrag(bool allowMouseDrag)

Sets whether @self can be dragged with mouse pointer. If @allow_mouse_drag is %FALSE, dragging is only available on touch.

setAnimationDuration
void setAnimationDuration(uint duration)

Sets animation duration used by hdy_carousel_scroll_to().

setInteractive
void setInteractive(bool interactive)

Sets whether @self can be navigated. This can be used to temporarily disable a #HdyCarousel to only allow swiping in a certain state.

setRevealDuration
void setRevealDuration(uint revealDuration)

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

setSpacing
void setSpacing(uint spacing)

Sets spacing between pages in pixels.

Mixins

__anonymous
mixin OrientableT!(HdyCarousel)
Undocumented in source.
__anonymous
mixin SwipeableT!(HdyCarousel)
Undocumented in source.

Static functions

getType
GType getType()

Variables

hdyCarousel
HdyCarousel* hdyCarousel;

the main Gtk struct

Inherited Members

From SwipeableIF

getSwipeableStruct
HdySwipeable* getSwipeableStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
emitChildSwitched
void emitChildSwitched(uint index, long duration)

Emits HdySwipeable::child-switched signal. This should be called when the widget switches visible child widget.

getCancelProgress
double getCancelProgress()

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

getDistance
double getDistance()

Gets the swipe distance of @self. This corresponds to how many pixels 1 unit represents.

getProgress
double getProgress()

Gets the current progress of @self

getSnapPoints
double[] getSnapPoints()

Gets the snap points of @self. Each snap point represents a progress value that is considered acceptable to end the swipe on.

getSwipeArea
void getSwipeArea(HdyNavigationDirection navigationDirection, bool isDrag, GdkRectangle rect)

Gets the area @self can start a swipe from for the given direction and gesture type. This can be used to restrict swipes to only be possible from a certain area, for example, to only allow edge swipes, or to have a draggable element and ignore swipes elsewhere.

getSwipeTracker
SwipeTracker getSwipeTracker()

Gets the #HdySwipeTracker used by this swipeable widget.

switchChild
void switchChild(uint index, long duration)

See HdySwipeable::child-switched.

addOnChildSwitched
gulong addOnChildSwitched(void delegate(uint, long, SwipeableIF) dlg, ConnectFlags connectFlags)

This signal should be emitted when the widget's visible child is changed.

Meta