Documentation ¶
Index ¶
- Variables
- func New(ctx context.Context, options []Option, settings ...Setting) *taro.Program
- func WithReverse(ctx context.Context, f *Fuzzy)
- func WithSticky(ctx context.Context, f *Fuzzy)
- type Fuzzy
- type Match
- type Option
- type SelectedEvent
- type Setting
- func WithAnimation(initial image.Image, creator anim.Creator) Setting
- func WithCaseSensitive(value bool) Setting
- func WithHeaders(headers ...string) Setting
- func WithInitial(initial image.Image) Setting
- func WithInline(location, size geom.Vec2) Setting
- func WithNodes(tree *tree.Tree, server *server.Server) Setting
- func WithPrompt(prompt string) Setting
- func WithResult(result chan<- interface{}) Setting
- func WithSize(size geom.Size) Setting
Constants ¶
This section is empty.
Variables ¶
View Source
var BottomRight stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { location := geom.DEFAULT_SIZE location.C -= 1 location.R -= 1 return New( ctx, pokemonText, WithInline(location, geom.DEFAULT_SIZE), ), nil }
View Source
var CommandTable stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { return New( ctx, []Option{ newColumnOption("ll", "/foo/bar"), newColumnOption("ll", "/foo/bar"), newColumnOption("longer command", "/foo/bar"), }, WithInline(geom.Size{}, geom.DEFAULT_SIZE), ), nil }
View Source
var FullBottom stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, pokemonText, ) return f, nil }
View Source
var FullBottomTable stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, pokemonTable, WithHeaders("Name", "#", "Type"), ) return f, nil }
View Source
var FullTop stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, pokemonText, WithReverse, ) return f, nil }
View Source
var FullTopTable stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, pokemonTable, WithReverse, WithHeaders("Name", "#", "Type"), ) return f, nil }
View Source
var Search stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, pokemonText, WithInline(geom.Size{}, geom.DEFAULT_SIZE), ) stories.Send(f, "Pid") return f, nil }
View Source
var TopLeft stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { return New( ctx, pokemonText, WithInline(geom.Size{}, geom.DEFAULT_SIZE), ), nil }
View Source
var TopLeftTable stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { return New( ctx, pokemonTable, WithHeaders("Name", "#", "Type"), WithInline(geom.Size{}, geom.DEFAULT_SIZE), ), nil }
Functions ¶
func WithReverse ¶
func WithSticky ¶
WithSticky makes it so Fuzzy cannot be quit by the user.
Types ¶
type Option ¶
type SelectedEvent ¶
type SelectedEvent struct {
Option Option
}
type Setting ¶
func WithAnimation ¶
WithAnimation provides a specific animation to render in the background.
func WithCaseSensitive ¶ added in v0.5.0
WithCaseSensitive determines whether the matching algorithm will be case-sensitive.
func WithHeaders ¶
func WithInitial ¶ added in v0.3.0
WithInitial provides the initial background image. Used independently of WithAnimation to still support animation previews even if animation is turned off.
func WithInline ¶
Displays Fuzzy as a small window at this location on the screen.
func WithPrompt ¶
func WithResult ¶
func WithResult(result chan<- interface{}) Setting
Click to show internal directories.
Click to hide internal directories.