类型 DialogOptions

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

type DialogOptions struct {
	Layer     uint16
	Scope     ui.ID
	DismissID ui.ID
	CloseID   ui.ID
	// InitialFocusID is the hit that takes keyboard focus when the dialog
	// opens. Leave it zero to keep focus where it was.
	InitialFocusID ui.ID
	ContentSize    ui.Size
	// FitBody sizes the dialog to its parts instead of to ContentSize.Height: the
	// height becomes the header, BodyHeight, the footer and the dialog's own
	// spacing, so the body is exactly as tall as the caller paints it and no
	// guessed height leaves a gap above the footer. ContentSize.Width still
	// applies. The header depends on whether Begin is given a description.
	FitBody    bool
	BodyHeight float32
	// ButtonSize sizes the footer's buttons, and the footer with them. The zero
	// value is ButtonSizeDefault; ButtonSizeSmall makes them as tall as a field.
	ButtonSize ButtonSize
}

DialogOptions carries the stable identities and requested content size for one modal dialog. The application owns every ID and the open state.