Deck
Object Hierarchy:
Hdy.Deck
Hdy.Deck
Hdy.Deck
Gtk.Container
Gtk.Container
Gtk.Container->Hdy.Deck
Gtk.Widget
Gtk.Widget
Gtk.Widget->Gtk.Container
GLib.InitiallyUnowned
GLib.InitiallyUnowned
GLib.InitiallyUnowned->Gtk.Widget
GLib.Object
GLib.Object
GLib.Object->GLib.InitiallyUnowned
Atk.Implementor
Atk.Implementor
Atk.Implementor->Hdy.Deck
Atk.Implementor->Gtk.Container
Atk.Implementor->Gtk.Widget
Gtk.Buildable
Gtk.Buildable
Gtk.Buildable->Hdy.Deck
Gtk.Buildable->Gtk.Container
Gtk.Buildable->Gtk.Widget
Gtk.Orientable
Gtk.Orientable
Gtk.Orientable->Hdy.Deck
Hdy.Swipeable
Hdy.Swipeable
Hdy.Swipeable->Hdy.Deck
Description:
[
CCode ( type_id =
"hdy_deck_get_type ()" ) ]
[
Version ( since =
"1.0" ) ]
public class Deck :
Container ,
Implementor ,
Buildable ,
Orientable ,
Swipeable
A swipeable widget showing one of the visible children at a time.
The `HdyDeck` widget displays one of the visible children, similar to a [[email protected] ]. 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 [class@Window] or [
class@ApplicationWindow] as they will crop anything drawn beyond the rounded corners.
CSS nodes
`HdyDeck` has a single CSS node with name `deck`.
Content:
Properties:
public bool can_swipe_back { get ; set ; }
Whether swipe gestures allow switching to the previous child.
public bool can_swipe_forward { get ; set ; }
Whether swipe gestures allow switching to the next child.
public bool hhomogeneous { get ; set ; }
Horizontally homogeneous sizing.
public bool interpolate_size { get ; set ; }
Whether or not the size should smoothly change when changing between
differently sized children.
public uint transition_duration { get ; set ; }
The transition animation duration, in milliseconds.
public bool transition_running { get ; }
Whether or not the transition is currently running.
public DeckTransitionType transition_type { get ; set ; }
The type of animation that will be used for transitions between
children.
public bool vhomogeneous { get ; set ; }
Vertically homogeneous sizing.
public Widget visible_child { get ; set ; }
The widget currently visible.
public string visible_child_name { get ; set ; }
The name of the widget currently visible.
Creation methods:
public Deck ()
Creates a new `HdyDeck`.
Methods:
public unowned Widget ? get_adjacent_child (NavigationDirection direction)
Finds the previous or next navigatable child.
public bool get_can_swipe_back ()
Gets whether swipe gestures for navigating backward are enabled.
public bool get_can_swipe_forward ()
Gets whether swipe gestures for navigating forward enabled.
public unowned Widget ? get_child_by_name (string name)
Finds the child of this with
name
.
public bool get_homogeneous (Orientation orientation)
Gets whether this is homogeneous for
the given orientation.
public bool get_interpolate_size ()
Gets whether this will interpolate
its size when changing the visible child.
public uint get_transition_duration ()
Gets the mode transition animation duration for
this .
public bool get_transition_running ()
Gets whether a transition is currently running for
this .
public DeckTransitionType get_transition_type ()
Gets the type of animation used for transitions between children.
public unowned Widget get_visible_child ()
Gets the visible child widget.
public unowned string get_visible_child_name ()
Gets the name of the currently visible child widget.
public void insert_child_after (Widget child, Widget ? sibling)
Inserts child
in the position after sibling
in the list of children.
public bool navigate (NavigationDirection direction)
Navigates to the previous or next child.
public void prepend (Widget child)
Inserts child
at the first position in
this .
public void reorder_child_after (Widget child, Widget ? sibling)
Moves child
to the position after sibling
in
the list of children.
public void set_can_swipe_back (bool can_swipe_back)
Sets whether swipe gestures for navigating backward are enabled.
public void set_can_swipe_forward (bool can_swipe_forward)
Sets whether swipe gestures for navigating forward are enabled.
public void set_homogeneous (Orientation orientation, bool homogeneous)
Sets whether this is homogeneous for
a given orientation.
public void set_interpolate_size (bool interpolate_size)
Sets whether this will interpolate
its size when changing the visible child.
public void set_transition_duration (uint duration)
Sets the mode transition animation duration for
this .
public void set_transition_type (DeckTransitionType transition)
Sets the type of animation used for transitions between children.
public void set_visible_child (Widget visible_child)
Sets the currently visible widget.
public void set_visible_child_name (string name)
Makes the child with the name name
visible.
Inherited Members:
All known members inherited from class Gtk.Container
@foreach
add
add_with_properties
border_width
check_resize
child
child_get
child_get_property
child_get_valist
child_notify
child_notify_by_pspec
child_set
child_set_property
child_set_valist
child_type
class_find_child_property
class_list_child_properties
composite_name
find_child_property
forall
forall_internal
get_border_width
get_child_property
get_children
get_focus_chain
get_focus_child
get_focus_hadjustment
get_focus_vadjustment
get_path_for_child
get_resize_mode
handle_border_width
install_child_properties
install_child_property
list_child_properties
propagate_draw
remove
resize_children
resize_mode
set_border_width
set_child_property
set_focus_chain
set_focus_child
set_focus_hadjustment
set_focus_vadjustment
set_reallocate_redraws
set_resize_mode
unset_focus_chain
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
add_child
construct_child
custom_finished
custom_tag_end
custom_tag_start
get_internal_child
get_name
parser_finished
set_buildable_property
set_name
All known members inherited from interface Gtk.Orientable
All known members inherited from interface Hdy.Swipeable