Class

AdwLeaflet

deprecated: 1.4 

[]

Description [src]

final class Adw.Leaflet : Gtk.Widget
  implements Adw.Swipeable, Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable {
  /* No available fields */
}

An adaptive container acting like a box or a stack.

leaflet-wide leaflet-narrow

The AdwLeaflet widget can display its children like a GtkBox does or like a GtkStack does, adapting to size changes by switching between the two modes.

When there is enough space the children are displayed side by side, otherwise only one is displayed and the leaflet is said to be “folded”. The threshold is dictated by the preferred minimum sizes of the children. When a leaflet is folded, the children can be navigated using swipe gestures.

The “over” and “under” transition types 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.

CSS nodes

AdwLeaflet has a single CSS node with name leaflet. The node will get the style classes .folded when it is folded, .unfolded when it’s not, or none if it hasn’t computed its fold yet.

Deprecated since: 1.4

See the migration guide.

[]

Hierarchy

hierarchy this AdwLeaflet implements_0 AdwSwipeable this--implements_0 implements_1 GtkAccessible this--implements_1 implements_2 GtkBuildable this--implements_2 implements_3 GtkConstraintTarget this--implements_3 implements_4 GtkOrientable this--implements_4 ancestor_0 GtkWidget ancestor_0--this ancestor_1 GInitiallyUnowned ancestor_1--ancestor_0 ancestor_2 GObject ancestor_2--ancestor_1
[]

Constructors

adw_leaflet_new

Creates a new AdwLeaflet.

deprecated: 1.4 

[]

Instance methods

adw_leaflet_append

Adds a child to self.

deprecated: 1.4 

adw_leaflet_get_adjacent_child

Finds the previous or next navigatable child.

deprecated: 1.4 

adw_leaflet_get_can_navigate_back

Gets whether gestures and shortcuts for navigating backward are enabled.

deprecated: 1.4 

adw_leaflet_get_can_navigate_forward

Gets whether gestures and shortcuts for navigating forward are enabled.

deprecated: 1.4 

adw_leaflet_get_can_unfold

Gets whether self can unfold.

deprecated: 1.4 

adw_leaflet_get_child_by_name

Finds the child of self with name.

deprecated: 1.4 

adw_leaflet_get_child_transition_params

Gets the child transition spring parameters for self.

deprecated: 1.4 

adw_leaflet_get_child_transition_running

Gets whether a child transition is currently running for self.

deprecated: 1.4 

adw_leaflet_get_fold_threshold_policy

Gets the fold threshold policy for self.

deprecated: 1.4 

adw_leaflet_get_folded

Gets whether self is folded.

deprecated: 1.4 

adw_leaflet_get_homogeneous

Gets whether self is homogeneous.

deprecated: 1.4 

adw_leaflet_get_mode_transition_duration

Gets the mode transition animation duration for self.

deprecated: 1.4 

adw_leaflet_get_page

Returns the AdwLeafletPage object for child.

deprecated: 1.4 

adw_leaflet_get_pages

Returns a GListModel that contains the pages of the leaflet.

deprecated: 1.4 

adw_leaflet_get_transition_type

Gets the type of animation used for transitions between modes and children.

deprecated: 1.4 

adw_leaflet_get_visible_child

Gets the widget currently visible when the leaflet is folded.

deprecated: 1.4 

adw_leaflet_get_visible_child_name

Gets the name of the currently visible child widget.

deprecated: 1.4 

adw_leaflet_insert_child_after

Inserts child in the position after sibling in the list of children.

deprecated: 1.4 

adw_leaflet_navigate

Navigates to the previous or next child.

deprecated: 1.4 

adw_leaflet_prepend

Inserts child at the first position in self.

deprecated: 1.4 

adw_leaflet_remove

Removes a child widget from self.

deprecated: 1.4 

adw_leaflet_reorder_child_after

Moves child to the position after sibling in the list of children.

deprecated: 1.4 

adw_leaflet_set_can_navigate_back

Sets whether gestures and shortcuts for navigating backward are enabled.

deprecated: 1.4 

adw_leaflet_set_can_navigate_forward

Sets whether gestures and shortcuts for navigating forward are enabled.

deprecated: 1.4 

adw_leaflet_set_can_unfold

Sets whether self can unfold.

deprecated: 1.4 

adw_leaflet_set_child_transition_params

Sets the child transition spring parameters for self.

deprecated: 1.4 

adw_leaflet_set_fold_threshold_policy

Sets the fold threshold policy for self.

deprecated: 1.4 

adw_leaflet_set_homogeneous

Sets self to be homogeneous or not.

deprecated: 1.4 

adw_leaflet_set_mode_transition_duration

Sets the mode transition animation duration for self.

deprecated: 1.4 

adw_leaflet_set_transition_type

Sets the type of animation used for transitions between modes and children.

deprecated: 1.4 

adw_leaflet_set_visible_child

Sets the widget currently visible when the leaflet is folded.

deprecated: 1.4 

adw_leaflet_set_visible_child_name

Makes the child with the name name visible.

deprecated: 1.4 

Methods inherited from GtkWidget (164)
Methods inherited from GObject (43)
Methods inherited from AdwSwipeable (5)
Methods inherited from GtkAccessible (20)
Methods inherited from GtkBuildable (1)
Methods inherited from GtkOrientable (2)
[]

Properties

Adw.Leaflet:can-navigate-back

Whether gestures and shortcuts for navigating backward are enabled.

deprecated: 1.4 

Adw.Leaflet:can-navigate-forward

Whether gestures and shortcuts for navigating forward are enabled.

deprecated: 1.4 

Adw.Leaflet:can-unfold

Whether or not the leaflet can unfold.

deprecated: 1.4 

Adw.Leaflet:child-transition-params

The child transition spring parameters.

deprecated: 1.4 

Adw.Leaflet:child-transition-running

Whether a child transition is currently running.

deprecated: 1.4 

Adw.Leaflet:fold-threshold-policy

Determines when the leaflet will fold.

deprecated: 1.4 

Adw.Leaflet:folded

Whether the leaflet is folded.

deprecated: 1.4 

Adw.Leaflet:homogeneous

Whether the leaflet allocates the same size for all children when folded.

deprecated: 1.4 

Adw.Leaflet:mode-transition-duration

The mode transition animation duration, in milliseconds.

deprecated: 1.4 

Adw.Leaflet:pages

A selection model with the leaflet’s pages.

deprecated: 1.4 

Adw.Leaflet:transition-type

The type of animation used for transitions between modes and children.

deprecated: 1.4 

Adw.Leaflet:visible-child

The widget currently visible when the leaflet is folded.

deprecated: 1.4 

Adw.Leaflet:visible-child-name

The name of the widget currently visible when the leaflet is folded.

deprecated: 1.4 

Properties inherited from GtkWidget (35)
Properties inherited from GtkAccessible (1)
Properties inherited from GtkOrientable (1)
[]

Signals

Signals inherited from GtkWidget (13)
Signals inherited from GObject (1)

Class structure