Class
HandyDeck
Description [src]
class Handy.Deck : Gtk.Container {
parent_instance: GtkContainer
}
A swipeable widget showing one of the visible children at a time.
The HdyDeck
widget displays one of the visible children, similar to a
GtkStack
. The children are strictly ordered and can be navigated
using swipe gestures.
The “over” and “under” stack the children one on top of the other, while the “slide” transition puts the children side by side. While navigating to a child on the side or below can be performed by swiping the current child away, navigating to an upper child requires dragging it from the edge where it resides. This doesn’t affect non-dragging swipes.
The “over” and “under” transitions can draw their shadow on top of the
window’s transparent areas, like the rounded corners. This is a side-effect
of allowing shadows to be drawn on top of OpenGL areas. It can be mitigated
by using HdyWindow
or HdyApplicationWindow
as they will crop
anything drawn beyond the rounded corners.
The child property navigatable
can be set on HdyDeck
children to
determine whether they can be navigated to when folded. If FALSE
, the child
will be ignored by hdy_deck_get_adjacent_child()
, hdy_deck_navigate()
,
and swipe gestures. This can be used used to prevent switching to widgets
like separators.
CSS nodes
HdyDeck
has a single CSS node with name deck
.
Available since: | 1.0 |
Implements
- AtkImplementorIface
- GtkBuildable
- GtkOrientable
- HdySwipeable
Instance methods
hdy_deck_get_can_swipe_back
Gets whether swipe gestures for navigating backward are enabled.
Available since: 1.0
hdy_deck_get_can_swipe_forward
Gets whether swipe gestures for navigating forward enabled.
Available since: 1.0
hdy_deck_get_homogeneous
Gets whether self
is homogeneous for the given orientation.
Available since: 1.0
hdy_deck_get_interpolate_size
Gets whether self
will interpolate its size when changing the visible child.
Available since: 1.0
hdy_deck_get_transition_duration
Gets the mode transition animation duration for self
.
Available since: 1.0
hdy_deck_get_transition_running
Gets whether a transition is currently running for self
.
Available since: 1.0
hdy_deck_get_transition_type
Gets the type of animation used for transitions between children.
Available since: 1.0
hdy_deck_get_visible_child_name
Gets the name of the currently visible child widget.
Available since: 1.0
hdy_deck_insert_child_after
Inserts child
in the position after sibling
in the list of children.
Available since: 1.2
hdy_deck_reorder_child_after
Moves child
to the position after sibling
in the list of children.
Available since: 1.2
hdy_deck_set_can_swipe_back
Sets whether swipe gestures for navigating backward are enabled.
Available since: 1.0
hdy_deck_set_can_swipe_forward
Sets whether swipe gestures for navigating forward are enabled.
Available since: 1.0
hdy_deck_set_homogeneous
Sets whether self
is homogeneous for a given orientation.
Available since: 1.0
hdy_deck_set_interpolate_size
Sets whether self
will interpolate its size when changing the visible child.
Available since: 1.0
hdy_deck_set_transition_duration
Sets the mode transition animation duration for self
.
Available since: 1.0
hdy_deck_set_transition_type
Sets the type of animation used for transitions between children.
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.Deck:can-swipe-back
Whether swipe gestures allow switching to the previous child.
Available since: 1.0
Handy.Deck:can-swipe-forward
Whether swipe gestures allow switching to the next child.
Available since: 1.0
Handy.Deck:interpolate-size
Whether or not the size should smoothly change when changing between differently sized children.
Available since: 1.0
Handy.Deck:transition-duration
The transition animation duration, in milliseconds.
Available since: 1.0
Handy.Deck:transition-running
Whether or not the transition is currently running.
Available since: 1.0
Handy.Deck:transition-type
The type of animation that will be used for transitions between children.
Available since: 1.0