Documentation
¶
Index ¶
- func NewMessageTracker() *messageTracker
- type AsyncMessageMsg
- type ColorStyle
- type DevTUI
- func (h *DevTUI) ContentView() string
- func (h *DevTUI) HandleKeyboard(msg tea.KeyMsg) (bool, tea.Cmd)
- func (h *DevTUI) Init() tea.Cmd
- func (h *DevTUI) InitTUI(args ...any)
- func (t *DevTUI) NewTabSection(title string, fhAdapters ...fieldHandlerAdapter) *tabSection
- func (h *DevTUI) Print(messages ...any)
- func (h *DevTUI) ProcessFieldValueChange(field *fieldHandler, newValue string)
- func (t *DevTUI) ReturnFocus() error
- func (h *DevTUI) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (h *DevTUI) View() string
- type IDGenerator
- type MessageID
- type MessageUpdate
- type TuiConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMessageTracker ¶ added in v0.0.43
func NewMessageTracker() *messageTracker
NewMessageTracker creates a new message tracker
Types ¶
type AsyncMessageMsg ¶ added in v0.0.38
type AsyncMessageMsg tuiMessage
AsyncMessageMsg is a message from an async field handler
type ColorStyle ¶
type DevTUI ¶
type DevTUI struct {
*TuiConfig
// contains filtered or unexported fields
}
DevTUI mantiene el estado de la aplicación
func DefaultTUIForTest ¶ added in v0.0.10
NewDefaultTUI creates a DevTUI instance with basic default configuration useful for unit tests and for quick initialization in real applications
func (*DevTUI) ContentView ¶
ContentView renderiza los mensajes para una sección de contenido
func (*DevTUI) HandleKeyboard ¶ added in v0.0.10
HandleKeyboard processes keyboard input and updates the model state returns whether the update function should continue processing or return early
func (*DevTUI) InitTUI ¶ added in v0.0.5
InitTUI initializes and runs the terminal UI application.
It accepts optional variadic arguments of any type. If a *sync.WaitGroup is provided among these arguments, InitTUI will call its Done() method before returning.
The method runs the UI using the internal tea engine, and handles any errors that may occur during execution. If an error occurs, it will be displayed on the console and the application will wait for user input before exiting.
Parameters:
- args ...any: Optional arguments. Can include a *sync.WaitGroup for synchronization.
func (*DevTUI) NewTabSection ¶ added in v0.0.43
NewTabSection creates a new tab section
func (*DevTUI) ProcessFieldValueChange ¶ added in v0.0.38
ProcessFieldValueChange handles field value changes
func (*DevTUI) ReturnFocus ¶
type IDGenerator ¶ added in v0.0.43
type IDGenerator interface {
GetNewID() string
}
IDGenerator represents a unique ID generator
func NewIDGenerator ¶ added in v0.0.43
func NewIDGenerator() IDGenerator
Use the existing UnixID as an IDGenerator implementation
type MessageUpdate ¶ added in v0.0.43
type MessageUpdate struct {
Content string
Type messagetype.Type
}
Actualización de estado para mensajes