Leaflet

Constructors

this
this(HdyLeaflet* hdyLeaflet, 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 that doesn't have 'navigatable' child property set to %FALSE, or %NULL if it doesn't exist. This will be the same widget hdy_leaflet_navigate() will navigate to.

getCanSwipeBack
bool getCanSwipeBack()

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

getCanSwipeForward
bool getCanSwipeForward()

Returns whether the #HdyLeaflet 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.

getChildTransitionDuration
uint getChildTransitionDuration()

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

getChildTransitionRunning
bool getChildTransitionRunning()

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

getFolded
bool getFolded()

Gets whether @self is folded.

getHomogeneous
bool getHomogeneous(bool folded, GtkOrientation orientation)

Gets whether @self is homogeneous for the given fold and orientation. See hdy_leaflet_set_homogeneous().

getInterpolateSize
bool getInterpolateSize()

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

getLeafletStruct
HdyLeaflet* getLeafletStruct(bool transferOwnership)

Get the main Gtk struct

getModeTransitionDuration
uint getModeTransitionDuration()

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

getStruct
void* getStruct()

the main Gtk struct as a void*

getTransitionType
HdyLeafletTransitionType getTransitionType()

Gets the type of animation that will be used for transitions between modes and 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 that doesn't have 'navigatable' child property set to %FALSE, 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 that has 'navigatable' child property set to %TRUE via a swipe gesture

setCanSwipeForward
void setCanSwipeForward(bool canSwipeForward)

Sets whether or not @self allows switching to the next child that has 'navigatable' child property set to %TRUE via a swipe gesture.

setChildTransitionDuration
void setChildTransitionDuration(uint duration)

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

setHomogeneous
void setHomogeneous(bool folded, GtkOrientation orientation, bool homogeneous)

Sets the #HdyLeaflet to be homogeneous or not for the given fold and orientation. If it is homogeneous, the #HdyLeaflet will request the same width or height for all its children depending on the orientation. If it isn't and it is folded, the leaflet 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 #HdyLeaflet: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.

setModeTransitionDuration
void setModeTransitionDuration(uint duration)

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

setTransitionType
void setTransitionType(HdyLeafletTransitionType transition)

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

setVisibleChild
void setVisibleChild(Widget visibleChild)

Makes @visible_child visible using a transition determined by HdyLeaflet:transition-type and HdyLeaflet:child-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!(HdyLeaflet)
Undocumented in source.
__anonymous
mixin SwipeableT!(HdyLeaflet)
Undocumented in source.

Static functions

getType
GType getType()

Variables

hdyLeaflet
HdyLeaflet* hdyLeaflet;

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