类型 PopoverOptions

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

type PopoverOptions struct {
	Layer uint16
	Scope ui.ID
	// DismissID, when set, makes the popover dismiss on Escape and on a primary
	// or secondary press outside its surface. The outside press is passed on to
	// the control beneath, as a non-modal web popover's is. The surface itself is
	// opaque, so presses on its padding or header do not reach the trigger.
	DismissID ui.ID
	// AnchorDismiss consumes a primary press on the anchor as a dismiss action,
	// rather than passing it through to a trigger that would reopen the popover.
	AnchorDismiss bool
	// ConsumeOutsidePress keeps the dismiss press from activating the page or
	// an enclosing dialog. Useful for a staged picker with confirmation actions.
	ConsumeOutsidePress bool
	Side                PopoverSide
	Align               PopoverAlign
	SideOffset          float32
	AlignOffset         float32
	// ContentSize.Width defaults to 288 (`w-72`). A zero ContentSize.Height sizes
	// the popover to its parts: the header (its description wraps to the width)
	// and, under it, BodyHeight, so no guessed height leaves a gap or cuts the
	// body off.
	ContentSize ui.Size
	BodyHeight  float32
	// TitleWeight defaults to WeightMedium; set it to emphasize this heading.
	TitleWeight float32
	// InitialFocusID, when set, takes keyboard focus when the popover opens.
	// A non-modal popover asks the runtime directly (Canvas.RequestFocus); the
	// request is honored once, so it does not steal focus back afterwards.
	InitialFocusID ui.ID
}

PopoverOptions contains stable overlay identities and positioning values.