类型 DrawerOptions

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

type DrawerOptions struct {
	Layer         uint16
	Scope         ui.ID
	DismissID     ui.ID
	CloseID       ui.ID
	Side          DrawerSide
	ContentExtent float32
	// BodyHeight sizes a top or bottom drawer that has no ContentExtent to its
	// parts: the handle, the header, a body this tall, the footer and the gaps
	// between them, as `h-auto` fits a drawer to its content (never more than
	// 80% of the window). A side drawer fills the window's height and ignores it.
	BodyHeight float32
	// ButtonSize sizes the footer's buttons and the footer with them; the zero
	// value is ButtonSizeDefault.
	ButtonSize ButtonSize
	// InitialFocusID names the control that takes focus when the drawer opens.
	// Zero leaves focus where the runtime puts it, which is nowhere when the
	// opener is outside the new scope.
	InitialFocusID ui.ID
}

DrawerOptions contains caller-owned modal identities and side geometry.