Deck

Constructors

this
this(HdyDeck* hdyDeck, bool ownedRef)

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

this
this()

Members

Functions

getAdjacentChild
Widget getAdjacentChild(HdyNavigationDirection direction)

Gets the previous or next child, or %NULL if it doesn't exist. This will be the same widget hdy_deck_navigate() will navigate to.

getCanSwipeBack
bool getCanSwipeBack()

Returns whether the #HdyDeck allows swiping to the previous child.

getCanSwipeForward
bool getCanSwipeForward()

Returns whether the #HdyDeck allows swiping to the next child.

getChildByName
Widget getChildByName(string name)

Finds the child of @self with the name given as the argument. Returns %NULL if there is no child with this name.

getDeckStruct
HdyDeck* getDeckStruct(bool transferOwnership)

Get the main Gtk struct

getHomogeneous
bool getHomogeneous(GtkOrientation orientation)

Gets whether @self is homogeneous for the given orientation. See hdy_deck_set_homogeneous().

getInterpolateSize
bool getInterpolateSize()

Returns whether the #HdyDeck is set up to interpolate between the sizes of children on page switch.

getStruct
void* getStruct()

the main Gtk struct as a void*

getTransitionDuration
uint getTransitionDuration()

Returns the amount of time (in milliseconds) that transitions between children in @self will take.

getTransitionRunning
bool getTransitionRunning()

Returns whether @self is currently in a transition from one page to another.

getTransitionType
HdyDeckTransitionType getTransitionType()

Gets the type of animation that will be used for transitions between children in @self.

getVisibleChild
Widget getVisibleChild()

Gets the visible child widget.

getVisibleChildName
string getVisibleChildName()

Gets the name of the currently visible child widget.

navigate
bool navigate(HdyNavigationDirection direction)

Switches to the previous or next child, similar to performing a swipe gesture to go in @direction.

setCanSwipeBack
void setCanSwipeBack(bool canSwipeBack)

Sets whether or not @self allows switching to the previous child via a swipe gesture.

setCanSwipeForward
void setCanSwipeForward(bool canSwipeForward)

Sets whether or not @self allows switching to the next child via a swipe gesture.

setHomogeneous
void setHomogeneous(GtkOrientation orientation, bool homogeneous)

Sets the #HdyDeck to be homogeneous or not for the given orientation. If it is homogeneous, the #HdyDeck will request the same width or height for all its children depending on the orientation. If it isn't, the deck may change width or height when a different child becomes visible.

setInterpolateSize
void setInterpolateSize(bool interpolateSize)

Sets whether or not @self will interpolate its size when changing the visible child. If the #HdyDeck:interpolate-size property is set to %TRUE, @self will interpolate its size between the current one and the one it'll take after changing the visible child, according to the set transition duration.

setTransitionDuration
void setTransitionDuration(uint duration)

Sets the duration that transitions between children in @self will take.

setTransitionType
void setTransitionType(HdyDeckTransitionType transition)

Sets the type of animation that will be used for transitions between children in @self.

setVisibleChild
void setVisibleChild(Widget visibleChild)

Makes @visible_child visible using a transition determined by HdyDeck:transition-type and HdyDeck:transition-duration. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

setVisibleChildName
void setVisibleChildName(string name)

Makes the child with the name @name visible.

Mixins

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

Static functions

getType
GType getType()

Variables

hdyDeck
HdyDeck* hdyDeck;

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