Documentation ¶
Index ¶
- Variables
- func New(ctx context.Context, settings ...Setting) *taro.Program
- func WithReverse(ctx context.Context, t *Text)
- type AcceptedEvent
- type Setting
- func WithAnimation(image image.Image, creator anim.Creator) Setting
- func WithInline(location, size geom.Vec2) Setting
- func WithParams(params *params.Parameters) Setting
- func WithPlaceholder(placeholder string) Setting
- func WithPreset(preset string) Setting
- func WithPrompt(prompt string) Setting
- func WithResult(result chan<- interface{}) Setting
- type Text
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, WithInline(location, geom.DEFAULT_SIZE), ), nil }
View Source
var FullBottom stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, ) return f, nil }
View Source
var FullTop stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, ) return f, nil }
View Source
var Placeholder stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, WithPlaceholder("placeholder"), WithPrompt("placeholder example"), ) return f, nil }
View Source
var Preset stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { f := New( ctx, WithPreset("preset text"), WithPrompt("preset example"), ) return f, nil }
View Source
var TopLeft stories.InitFunc = func(ctx context.Context) (mux.Screen, error) { return New( ctx, WithInline(geom.Size{}, geom.DEFAULT_SIZE), ), nil }
Functions ¶
func WithReverse ¶ added in v0.2.9
Types ¶
type AcceptedEvent ¶
type AcceptedEvent struct {
Text string
}
type Setting ¶
func WithInline ¶
WithInline displays Text as a small window at the provided location on the screen.
func WithParams ¶ added in v0.12.0
func WithParams(params *params.Parameters) Setting
WithParams provides parameters this Text will use for rendering.
func WithPlaceholder ¶
WithPlaceholder controls the string that is shown when the input is empty.
func WithPreset ¶
WithPreset prefills the text input with a string.
func WithPrompt ¶
WithPrompt controls the prompt text shown below (or above) the text input.
func WithResult ¶
func WithResult(result chan<- interface{}) Setting
Click to show internal directories.
Click to hide internal directories.