Leaflet


Object Hierarchy:

Hdy.Leaflet Hdy.Leaflet Hdy.Leaflet Gtk.Container Gtk.Container Gtk.Container->Hdy.Leaflet 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.Leaflet Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Hdy.Leaflet Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Hdy.Leaflet Hdy.Swipeable Hdy.Swipeable Hdy.Swipeable->Hdy.Leaflet

Description:

[ CCode ( type_id = "hdy_leaflet_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public class Leaflet : Container, Implementor, Buildable, Orientable, Swipeable

An adaptive container acting like a box or a stack.

The `HdyLeaflet` widget can display its children like a [[email protected]] does or like a [[email protected]] 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.

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.

The child property `navigatable` can be set on `HdyLeaflet` children to determine whether they can be navigated to when folded. If `FALSE`, the child will be ignored by [[email protected]_adjacent_child], [[email protected]], and swipe gestures. This can be used used to prevent switching to widgets like separators.

CSS nodes

`HdyLeaflet` 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 didn't compute its fold yet.


Namespace: Hdy
Package: libhandy-1

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Container
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.Orientable



2022 vala-language.org