BeginBreadcrumb#
func BeginBreadcrumb(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect) BreadcrumbBeginBreadcrumb starts a compact breadcrumb row.
API 文档由 Go 源码生成,内容为英文。
type Breadcrumb struct {
// font size; zero selects the theme's body size
}Breadcrumb incrementally paints one breadcrumb row without collecting items in a slice. Each Add call emits its commands immediately and advances the insertion point, keeping the paint path allocation-free after warm-up.
BeginBreadcrumb#func BeginBreadcrumb(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect) BreadcrumbBeginBreadcrumb starts a compact breadcrumb row.
AddCurrent#func (breadcrumb *Breadcrumb) AddCurrent(label string)AddCurrent paints the current destination with stronger emphasis.
AddDisabled#func (breadcrumb *Breadcrumb) AddDisabled(label string)AddDisabled paints an unavailable destination without a hit region.
AddEllipsis#func (breadcrumb *Breadcrumb) AddEllipsis(id ui.ID)AddEllipsis paints the overflow item: three dots in a 20px box. A non-zero id makes it a button, typically opening a menu of the omitted levels; a zero id leaves it presentational.
AddLink#func (breadcrumb *Breadcrumb) AddLink(id ui.ID, label string)AddLink paints an enabled destination and declares its hit region. ID 0 is useful for a non-interactive preview and emits no hit.
FontSize#func (breadcrumb Breadcrumb) FontSize(size float32) BreadcrumbFontSize sets the size of every item and separator. The default is the theme's body size (text-sm); a denser path, say in a toolbar, can pass the small size.