crtview - Terminal-based user interface toolkit
This project is a fork of cview,
which is also fork of original
tview. :-) See
docs/about-crtview.md
for more details.
Features
Available widgets:
- Input forms (including input/password fields, drop-down selections, checkboxes, and buttons)
- Navigable multi-color text views
- Selectable lists with context menus
- Modal dialogs
- Horizontal and vertical progress bars
- Grid, Flexbox and tabbed panel layouts
- Sophisticated navigable table views
- Flexible tree views
- Draggable and resizable windows
- An application wrapper
Widgets may be customized and extended to suit any application.
Installation
go get github.com/isbm/crtview
Hello World
This basic example creates a TextView titled "Hello, World!" and displays it in your terminal:
package main
import (
"github.com/isbm/crtview"
)
func main() {
app := crtview.NewApplication()
box := crtview.NewTextView()
.SetBorder(true)
.SetTitle("Hello, world!")
.SetText("Here is some meaning-less text for your app.")
app.SetRoot(box, true)
if err := app.Run(); err != nil {
panic(err)
}
}