Documentation
¶
Overview ¶
Package termfields creates updateable form fields at specified locations in the console.
Index ¶
Constants ¶
View Source
const ( BoxStyleNone boxStyle BoxStyleASCII BoxStyleUnicode )
Flags to style a box border around a field
View Source
const ( FieldShiftLeft shiftDir = iota FieldShiftRight FieldShiftUp FieldShiftDown )
Flags to Shift a field in a specified direction
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close()
Close Finalizes termbox library, should be called after successful initialization when termbox's functionality isn't required anymore.
func Init ¶
func Init() error
Init Initializes termfields library. This function should be called before any other functions. After successful initialization, the library must be finalized using 'Close' function.
Example usage:
err := termfields.Init()
if err != nil {
panic(err)
}
defer termfields.Close()
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field is the identifier for a specific form field on the screen.
func (*Field) DrawBox ¶
func (f *Field) DrawBox(boxType boxStyle) error
DrawBox draws or clears a box around a given field.
Click to show internal directories.
Click to hide internal directories.