Top |
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 |
gchar * | visible-child-name | Read / Write |
GEnum ╰── HdyDeckTransitionType GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── HdyDeck
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.
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 wether 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
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
This enumeration value describes the possible transitions between children in a HdyDeck widget.
New values may be added to this enumeration over time.
No transition |
||
Slide from left, right, up or down according to the orientation, text direction and the children order |
||
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 |
Since: 1.0
“can-swipe-back”
property“can-swipe-back” gboolean
Whether or not self
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 self
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_NONE
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