类型 Sheet

API 文档由 Go 源码生成,内容为英文。

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

Sheet is a modal edge panel matching the Vega sheet recipe.

构造函数

BeginSheet#

func BeginSheet(canvas *ui.Canvas, theme ui.Theme, viewport ui.Rect, options SheetOptions) Sheet

BeginSheet creates a sheet declaration.

方法

Actions#

func (sheet Sheet) Actions(layout SheetLayout, actions ...ButtonAction)

Actions paints the footer's buttons against its right edge, in the order given, so the last one sits at the corner (see ButtonRow). A disabled sheet makes every action inert. Call it between Begin and End.

Begin#

func (sheet Sheet) Begin(title, description string) SheetLayout

Begin paints the edge panel and leaves its layer/scope active for body UI.

Disabled#

func (sheet Sheet) Disabled() Sheet

Disabled keeps dismiss and close semantics visible while making them inert.

End#

func (sheet Sheet) End()

End closes the layer and installs modal focus and Escape routing. It also ends what the sheet animates in and out.

Paint#

func (sheet Sheet) Paint(title, description string) SheetLayout

Paint paints a complete sheet and closes its modal layer.

WithoutCloseButton#

func (sheet Sheet) WithoutCloseButton() Sheet

WithoutCloseButton hides the standard close action.