sheet

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sheet is the sheet base's dialogs, menus and docks come up as: a panel from an edge of the window over a fading backdrop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer struct {
	Motion        *Motion
	Side          core.Placement
	Backdrop      parts.Part
	BackdropPress func()
	Panel         parts.Part
	Starting      parts.Part
	Ending        parts.Part
	// Swipe lets a finger drag the panel down, and Swiped hears a release
	// that asks it to close.
	Swipe  bool
	Swiped func()
	Cancel func()
	// Confirm, when set, is what Return does while the sheet is shown.
	Confirm                      func()
	Role                         core.Role
	Label                        string
	LabelFunc                    func() string
	AccessibilityDescription     string
	AccessibilityDescriptionFunc func() string
	TestID                       string
	Content                      []core.Node
	// Layer styles the overlay holding the backdrop and the panel.
	Layer parts.Part
}

Layer is what a sheet shows while its motion is shown: a backdrop over the whole root view whose presses backdropPress hears, fading with the motion, and the panel on side.

func (Layer) Node

func (l Layer) Node() core.Node

Node is the layer.

type Motion

type Motion struct {
	// contains filtered or unexported fields
}

Motion moves a panel in from an edge over a fading backdrop and back out, as NSH's SheetMotion: the platform runs both on animated values, and the parts stay in the tree until the motion out is over.

func NewMotion

func NewMotion(cx *core.Scope, open func() bool, side core.Placement) *Motion

NewMotion returns a motion following open, its panel on side.

func (*Motion) Shown

func (m *Motion) Shown() bool

Shown reports, tracked, whether the sheet is in the tree.

func (*Motion) There

func (m *Motion) There() bool

There reports, tracked, whether the sheet is there for its lifecycle: from when it came in until it is gone.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL