barutils

package
v2.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeStackableBar

func MakeStackableBar(bar barbuilder.TouchBar, scope func(switcher Switcher) []barbuilder.Item) barbuilder.Configuration

MakeStackableBar must be used to wrap a bar that will use a `VirtualPopover`

func VirtualPopover

func VirtualPopover(popover barbuilder.Popover, switcher Switcher) barbuilder.Item

VirtualPopover is useful if you need to nest more than 1 popover Currently the Touch Bar only supports one level of popovers and cannot nest them at all Using this function you can easily transform a popover into a other components which allow infinite nesting.

Types

type Switcher

type Switcher interface {
	Update() error
	Replace(newItems []barbuilder.Item) error

	Pop() error
	Push(newItems []barbuilder.Item) error
}

Switcher is used to manipulate the internal state of a stackable bar created with `MakeStackableBar`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL