BeginAttachmentGroup#
func BeginAttachmentGroup(theme ui.Theme, bounds ui.Rect) AttachmentGroupBeginAttachmentGroup starts a row of attachments at the left of bounds.
type AttachmentGroup struct {
// contains filtered or unexported fields
}AttachmentGroup lays attachments out in a row, the official AttachmentGroup: gap-3 between them and py-1 above and below. It only places; scrolling the row (the official one scrolls and snaps) is the caller's, by shifting the bounds it begins with inside a clip, and Extent is how far there is to scroll.
BeginAttachmentGroup#func BeginAttachmentGroup(theme ui.Theme, bounds ui.Rect) AttachmentGroupBeginAttachmentGroup starts a row of attachments at the left of bounds.
Extent#func (group AttachmentGroup) Extent() float32Extent is the width of the attachments placed so far with their gaps.
Fits#func (group AttachmentGroup) Fits(size ui.Size) boolFits reports whether a slot of the given size would end inside the group's width, for a caller that wraps or truncates the row instead of scrolling it.
Height#func (group AttachmentGroup) Height(attachmentHeight float32) float32Height is the group's height for attachments up to the given height: they and the padding above and below.
Next#func (group *AttachmentGroup) Next(size ui.Size) ui.RectNext reserves a slot of the given size, vertically at the group's top padding, and returns its bounds.