Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | hdy_deck_new () |
GtkWidget * | hdy_deck_get_visible_child () |
void | hdy_deck_set_visible_child () |
const gchar * | hdy_deck_get_visible_child_name () |
void | hdy_deck_set_visible_child_name () |
gboolean | hdy_deck_get_homogeneous () |
void | hdy_deck_set_homogeneous () |
HdyDeckTransitionType | hdy_deck_get_transition_type () |
void | hdy_deck_set_transition_type () |
guint | hdy_deck_get_transition_duration () |
void | hdy_deck_set_transition_duration () |
gboolean | hdy_deck_get_transition_running () |
gboolean | hdy_deck_get_interpolate_size () |
void | hdy_deck_set_interpolate_size () |
gboolean | hdy_deck_get_can_swipe_back () |
void | hdy_deck_set_can_swipe_back () |
gboolean | hdy_deck_get_can_swipe_forward () |
void | hdy_deck_set_can_swipe_forward () |
GtkWidget * | hdy_deck_get_adjacent_child () |
gboolean | hdy_deck_navigate () |
GtkWidget * | hdy_deck_get_child_by_name () |
void | hdy_deck_prepend () |
void | hdy_deck_insert_child_after () |
void | hdy_deck_reorder_child_after () |
gboolean | can-swipe-back | Read / Write |
gboolean | can-swipe-forward | Read / Write |
gboolean | hhomogeneous | Read / Write |
gboolean | interpolate-size | Read / Write |
guint | transition-duration | Read / Write |
gboolean | transition-running | Read |
HdyDeckTransitionType | transition-type | Read / Write |
gboolean | vhomogeneous | Read / Write |
GtkWidget * | visible-child | Read / Write |
char * | visible-child-name | Read / Write |
HdyDeck implements AtkImplementorIface, GtkBuildable, GtkOrientable and HdySwipeable.
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.
GtkWidget *
hdy_deck_get_visible_child (HdyDeck *self
);
Gets the visible child widget.
Since: 1.0
void hdy_deck_set_visible_child (HdyDeck *self
,GtkWidget *visible_child
);
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.
Since: 1.0
const gchar *
hdy_deck_get_visible_child_name (HdyDeck *self
);
Gets the name of the currently visible child widget.
Since: 1.0
void hdy_deck_set_visible_child_name (HdyDeck *self
,const gchar *name
);
Makes the child with the name name
visible.
See hdy_deck_set_visible_child()
for more details.
Since: 1.0
gboolean hdy_deck_get_homogeneous (HdyDeck *self
,GtkOrientation orientation
);
Gets whether self
is homogeneous for the given orientation.
See hdy_deck_set_homogeneous()
.
Since: 1.0
void hdy_deck_set_homogeneous (HdyDeck *self
,GtkOrientation orientation
,gboolean 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.
Since: 1.0
HdyDeckTransitionType
hdy_deck_get_transition_type (HdyDeck *self
);
Gets the type of animation that will be used
for transitions between children in self
.
Since: 1.0
void hdy_deck_set_transition_type (HdyDeck *self
,HdyDeckTransitionType transition
);
Sets the type of animation that will be used for transitions between children
in self
.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.
Since: 1.0
guint
hdy_deck_get_transition_duration (HdyDeck *self
);
Returns the amount of time (in milliseconds) that
transitions between children in self
will take.
Since: 1.0
void hdy_deck_set_transition_duration (HdyDeck *self
,guint duration
);
Sets the duration that transitions between children in self
will take.
Since: 1.0
gboolean
hdy_deck_get_transition_running (HdyDeck *self
);
Returns whether self
is currently in a transition from one page to
another.
Since: 1.0
gboolean
hdy_deck_get_interpolate_size (HdyDeck *self
);
Returns whether the HdyDeck is set up to interpolate between the sizes of children on page switch.
Since: 1.0
void hdy_deck_set_interpolate_size (HdyDeck *self
,gboolean interpolate_size
);
Sets whether or not self
will interpolate its size when
changing the visible child. If the “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.
Since: 1.0
gboolean
hdy_deck_get_can_swipe_back (HdyDeck *self
);
Returns whether the HdyDeck allows swiping to the previous child.
Since: 1.0
void hdy_deck_set_can_swipe_back (HdyDeck *self
,gboolean can_swipe_back
);
Sets whether or not self
allows switching to the previous child via a swipe
gesture.
Since: 1.0
gboolean
hdy_deck_get_can_swipe_forward (HdyDeck *self
);
Returns whether the HdyDeck allows swiping to the next child.
Since: 1.0
void hdy_deck_set_can_swipe_forward (HdyDeck *self
,gboolean can_swipe_forward
);
Sets whether or not self
allows switching to the next child via a swipe
gesture.
Since: 1.0
GtkWidget * hdy_deck_get_adjacent_child (HdyDeck *self
,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.
Since: 1.0
gboolean hdy_deck_navigate (HdyDeck *self
,HdyNavigationDirection direction
);
Switches to the previous or next child, similar to performing a swipe
gesture to go in direction
.
Since: 1.0
GtkWidget * hdy_deck_get_child_by_name (HdyDeck *self
,const gchar *name
);
Finds the child of self
with the name given as the argument. Returns NULL
if there is no child with this name.
Since: 1.0
void hdy_deck_prepend (HdyDeck *self
,GtkWidget *child
);
Inserts child
at the first position in self
.
Since: 1.2
void hdy_deck_insert_child_after (HdyDeck *self
,GtkWidget *child
,GtkWidget *sibling
);
Inserts child
in the position after sibling
in the list of children.
If sibling
is NULL
, insert child
at the first position.
self |
a HdyDeck |
|
child |
the GtkWidget to insert |
|
sibling |
the sibling after which to insert |
[nullable] |
Since: 1.2
void hdy_deck_reorder_child_after (HdyDeck *self
,GtkWidget *child
,GtkWidget *sibling
);
Moves child
to the position after sibling
in the list of children.
If sibling
is NULL
, move child
to the first position.
self |
a HdyDeck |
|
child |
the GtkWidget to move, must be a child of |
|
sibling |
the sibling to move |
[nullable] |
Since: 1.2
This enumeration value describes the possible transitions between children in a HdyDeck widget.
New values may be added to this enumeration over time.
Cover the old page or uncover the new page, sliding from or towards the end according to orientation, text direction and children order |
||
Uncover the new page or cover the old page, sliding from or towards the start according to orientation, text direction and children order |
||
Slide from left, right, up or down according to the orientation, text direction and the children order |
Since: 1.0
“can-swipe-back”
property “can-swipe-back” gboolean
Whether or not the deck allows switching to the previous child via a swipe gesture.
Owner: HdyDeck
Flags: Read / Write
Default value: FALSE
Since: 1.0
“can-swipe-forward”
property “can-swipe-forward” gboolean
Whether or not the deck allows switching to the next child via a swipe gesture.
Owner: HdyDeck
Flags: Read / Write
Default value: FALSE
Since: 1.0
“hhomogeneous”
property “hhomogeneous” gboolean
Horizontally homogeneous sizing.
Owner: HdyDeck
Flags: Read / Write
Default value: TRUE
Since: 1.0
“interpolate-size”
property “interpolate-size” gboolean
Whether or not the size should smoothly change when changing between differently sized children.
Owner: HdyDeck
Flags: Read / Write
Default value: FALSE
Since: 1.0
“transition-duration”
property “transition-duration” guint
The transition animation duration, in milliseconds.
Owner: HdyDeck
Flags: Read / Write
Default value: 200
Since: 1.0
“transition-running”
property “transition-running” gboolean
Whether or not the transition is currently running.
Owner: HdyDeck
Flags: Read
Default value: FALSE
Since: 1.0
“transition-type”
property“transition-type” HdyDeckTransitionType
The type of animation that will be used for transitions between children.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.
Owner: HdyDeck
Flags: Read / Write
Default value: HDY_DECK_TRANSITION_TYPE_OVER
Since: 1.0
“vhomogeneous”
property “vhomogeneous” gboolean
Vertically homogeneous sizing.
Owner: HdyDeck
Flags: Read / Write
Default value: TRUE
Since: 1.0
“visible-child”
property “visible-child” GtkWidget *
The widget currently visible.
Owner: HdyDeck
Flags: Read / Write
Since: 1.0
“visible-child-name”
property “visible-child-name” char *
The name of the widget currently visible.
Owner: HdyDeck
Flags: Read / Write
Default value: NULL
Since: 1.0