Documentation
¶
Index ¶
- type Application
- type ApplicationOption
- type Container
- func (c *Container) ContentHeight() int
- func (c *Container) ContentWidth() int
- func (c *Container) CurrentView() View
- func (c *Container) HandleError(err error)
- func (c *Container) Height() int
- func (c *Container) Init() tea.Cmd
- func (c *Container) NextView() View
- func (c *Container) PreviousView() View
- func (c *Container) Program() *Program
- func (c *Container) Ready() bool
- func (c *Container) RenderState() *types.RenderState
- func (c *Container) Send(msg tea.Msg, delay time.Duration)
- func (c *Container) SetNextView(v View)
- func (c *Container) SetNotice(notice string, lvl themes.OutputLevel)
- func (c *Container) SetSendFunc(f func(msg tea.Msg))
- func (c *Container) SetState(key, val string)
- func (c *Container) SetStateValue(val string)
- func (c *Container) SetView(v View) error
- func (c *Container) Shutdown(finalizers ...func())
- func (c *Container) SizeSet() bool
- func (c *Container) Start() error
- func (c *Container) State() (string, string)
- func (c *Container) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (c *Container) View() string
- func (c *Container) WaitForExit()
- func (c *Container) Width() int
- type ContainerOptions
- type Program
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
Name string
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(name string, opts ...ApplicationOption) *Application
type ApplicationOption ¶
type ApplicationOption func(*Application)
func WithLoadingMsg ¶
func WithLoadingMsg(msg string) ApplicationOption
func WithNotice ¶
func WithNotice(notice string) ApplicationOption
func WithState ¶
func WithState(key, val string) ApplicationOption
func WithStateKey ¶
func WithStateKey(key string) ApplicationOption
func WithStateVal ¶
func WithStateVal(val string) ApplicationOption
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
func NewContainer( ctx context.Context, app *Application, opts ...ContainerOptions, ) (*Container, error)
func (*Container) ContentHeight ¶
func (*Container) ContentWidth ¶
func (*Container) CurrentView ¶
func (*Container) HandleError ¶
func (*Container) PreviousView ¶
func (*Container) RenderState ¶
func (c *Container) RenderState() *types.RenderState
func (*Container) SetNextView ¶
func (*Container) SetSendFunc ¶
func (*Container) SetStateValue ¶
func (*Container) WaitForExit ¶
func (c *Container) WaitForExit()
type ContainerOptions ¶
type ContainerOptions func(*Container)
func WithInitialTermSize ¶
func WithInitialTermSize(width, height int) ContainerOptions
func WithInput ¶
func WithInput(in io.Reader) ContainerOptions
func WithOutput ¶
func WithOutput(out io.Writer) ContainerOptions
func WithTheme ¶
func WithTheme(theme themes.Theme) ContainerOptions
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
func NewProgram ¶
func (*Program) SetTeaProgram ¶ added in v0.2.3
Click to show internal directories.
Click to hide internal directories.