Paginator

Constructors

this
this(HdyPaginator* hdyPaginator, bool ownedRef = false)

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

this
this()

Create a new #HdyPaginator widget.

Members

Functions

getAnimationDuration
uint getAnimationDuration()

Gets animation duration used by hdy_paginator_scroll_to().

getCenterContent
bool getCenterContent()

Sets whether @self is centering pages.

getIndicatorSpacing
uint getIndicatorSpacing()

Gets spacing between content and page indicators.

getIndicatorStyle
HdyPaginatorIndicatorStyle getIndicatorStyle()

Gets the current page indicator style.

getInteractive
bool getInteractive()

Gets whether @self can be navigated.

getNPages
uint getNPages()

Gets the number of pages in @self.

getPaginatorStruct
HdyPaginator* getPaginatorStruct(bool transferOwnership = false)

Get the main Gtk struct

getPosition
double getPosition()

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

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. #HdyPaginator:animation-duration property can be used for controlling the duration.

scrollToFull
void scrollToFull(Widget widget, long duration)

Scrolls to @widget position with an animation.

setAnimationDuration
void setAnimationDuration(uint duration)

Sets animation duration used by hdy_paginator_scroll_to().

setCenterContent
void setCenterContent(bool centerContent)

Sets whether @self is centering content. If #HdyPaginator:indicator-style is @HDY_PAGINATOR_INDICATOR_STYLE_NONE, centering does nothing, otherwise it adds whitespace to the left or above the pages to compensate for the indicators.

setIndicatorSpacing
void setIndicatorSpacing(uint spacing)

Sets spacing between content and page indicators. Does nothing if #HdyPaginator:indicator-style is @HDY_PAGINATOR_INDICATOR_STYLE_NONE.

setIndicatorStyle
void setIndicatorStyle(HdyPaginatorIndicatorStyle style)

Sets style of page indicators. Depending on orientation, they are displayed below or besides the pages. If the pages are meant to be centered, #HdyPaginator:center-content can be used to compensate for that.

setInteractive
void setInteractive(bool interactive)

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

setSpacing
void setSpacing(uint spacing)

Sets spacing between pages in pixels.

Static functions

getType
GType getType()

Variables

hdyPaginator
HdyPaginator* hdyPaginator;

the main Gtk struct

Meta