Flap

class Flap(val adwFlapPointer: <Error class: unknown class><<Error class: unknown class>>) : Swipeable(source)

⚠️ Deprecated ⚠️

This is deprecated since version 1.4.

See migrating-to-breakpoints.html#replace-adwflap

---

An adaptive container acting like a box or an overlay.

flap-wide flap-narrow

The AdwFlap widget can display its children like a class@Gtk.Box does or like a class@Gtk.Overlay does, according to the property@Flap:fold-policy value.

AdwFlap has at most three children: property@Flap:content, property@Flap:flap and property@Flap:separator. Content is the primary child, flap is displayed next to it when unfolded, or overlays it when folded. Flap can be shown or hidden by changing the property@Flap:reveal-flap value, as well as via swipe gestures if property@Flap:swipe-to-open and/or property@Flap:swipe-to-close are set to TRUE.

Optionally, a separator can be provided, which would be displayed between the content and the flap when there's no shadow to separate them, depending on the transition type.

property@Flap:flap is transparent by default; add the style-classes.html#background style class to it if this is unwanted.

If property@Flap:modal is set to TRUE, content becomes completely inaccessible when the flap is revealed while folded.

The position of the flap and separator children relative to the content is determined by orientation, as well as the property@Flap:flap-position value.

Folding the flap will automatically hide the flap widget, and unfolding it will automatically reveal it. If this behavior is not desired, the property@Flap:locked property can be used to override it.

Common use cases include sidebars, header bars that need to be able to overlap the window content (for example, in fullscreen mode) and bottom sheets.

AdwFlap as GtkBuildable

The AdwFlap implementation of the iface@Gtk.Buildable interface supports setting the flap child by specifying “flap” as the “type” attribute of a <child> element, and separator by specifying “separator”. Specifying “content” child type or omitting it results in setting the content child.

CSS nodes

AdwFlap has a single CSS node with name flap. The node will get the style classes .folded when it is folded, and .unfolded when it's not.

Constructors

Link copied to clipboard
constructor()

This is deprecated since version 1.4.

constructor(adwFlapPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adwFlapPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val adwSwipeablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var content: <Error class: unknown class>?

This is deprecated since version 1.4.

Link copied to clipboard
var flap: <Error class: unknown class>?

This is deprecated since version 1.4.

Link copied to clipboard
var flapPosition: <Error class: unknown class>

This is deprecated since version 1.4.

Link copied to clipboard
var foldDuration: <Error class: unknown class>

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard
open val gtkAccessiblePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkConstraintTargetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkOrientablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard
val revealProgress: <Error class: unknown class>

This is deprecated since version 1.4.

Link copied to clipboard
var separator: <Error class: unknown class>?

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Link copied to clipboard

This is deprecated since version 1.4.

Functions

Link copied to clipboard
open fun getCancelProgress(): <Error class: unknown class>

Gets the progress @self will snap back to after the gesture is canceled.

Link copied to clipboard
open fun getDistance(): <Error class: unknown class>

Gets the swipe distance of @self.

Link copied to clipboard
open fun getProgress(): <Error class: unknown class>

Gets the current progress of @self.

Link copied to clipboard
open fun getSwipeArea(navigationDirection: NavigationDirection, isDrag: Boolean, rect: <Error class: unknown class>)

Gets the area @self can start a swipe from for the given direction and gesture type.