Terminal-based user interface toolkit
Go to file
Trevor Slocum 741bac61c6 Update .gitignore 2020-10-06 13:26:47 -07:00
demos Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
.gitignore Update .gitignore 2020-10-06 13:26:47 -07:00
.gitlab-ci.yml chore: Add makefile and use in `gitlab-ci.yml` 2020-09-23 20:54:48 +02:00
CHANGELOG Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
CONTRIBUTING.md Migrate docs to docs.rocketnine.space 2020-02-06 16:06:47 -08:00
DESIGN.md Do not set focus-related style attributes by default 2020-09-29 13:24:12 -07:00
FORK.md Add TextView.SetReindexBuffer 2020-09-03 19:23:56 -07:00
LICENSE Document TextView.GetText and GetRegionText fix 2020-07-13 14:47:10 -07:00
Makefile chore: Add makefile and use in `gitlab-ci.yml` 2020-09-23 20:54:48 +02:00
README.md Add link to list of applications using cview 2020-09-29 13:34:38 -07:00
ansi.go Bugfixes in ANSI escape sequence handling as well as TextView, fixes #320, fixes #344 2020-06-09 14:52:59 -07:00
application.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
borders.go Fork tview as cview 2019-12-30 15:18:26 -08:00
box.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
box_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
button.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
button_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
checkbox.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
checkbox_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
contextmenu.go Remove wrapper methods 2020-10-02 16:28:32 -07:00
cview.gif Fork tview as cview 2019-12-30 15:18:26 -08:00
doc.go Add WindowManager requirement to Window docs 2020-09-24 08:35:12 -07:00
doc_test.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
dropdown.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
flex.go Document changes submitted by Andreas Bieber 2020-09-23 15:44:28 -07:00
focusable.go Fork tview as cview 2019-12-30 15:18:26 -08:00
form.go Panic when attempting to add an invalid FormItem 2020-10-02 16:31:31 -07:00
frame.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
go.mod Release lock on InputField while executing DoneFunc and FinishedFunc 2020-10-02 17:00:57 -07:00
go.sum Release lock on InputField while executing DoneFunc and FinishedFunc 2020-10-02 17:00:57 -07:00
grid.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
inputfield.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
keys.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
list.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
list_test.go feat(List): Expose `ListItem` 2020-09-23 20:46:36 +02:00
modal.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
mouse.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
pages.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
primitive.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
progressbar.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
progressbar_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
semigraphics.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
styles.go Add Window and WindowManager 2020-09-24 08:09:55 -07:00
table.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
textview.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
textview_test.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
treeview.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
treeview_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
util.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
util_test.go Upgrade tcell to v2 2020-08-30 08:37:17 -07:00
window.go Add WindowManager requirement to Window docs 2020-09-24 08:35:12 -07:00
windowmanager.go Add Window and WindowManager 2020-09-24 08:09:55 -07:00

README.md

cview - Terminal-based user interface toolkit

GoDoc CI status Donate

This package is a fork of tview. See FORK.md for more information.

Demo

ssh cview.rocketnine.space -p 20000

Recording of presentation demo

Additional examples are listed on pkg.go.dev.

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 page 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.

Mouse support is available.

Installation

go get gitlab.com/tslocum/cview

Hello World

This basic example creates a box titled "Hello, World!" and displays it in your terminal:

package main

import (
	"gitlab.com/tslocum/cview"
)

func main() {
	box := cview.NewBox().SetBorder(true).SetTitle("Hello, world!")
	if err := cview.NewApplication().SetRoot(box, true).Run(); err != nil {
		panic(err)
	}
}

Examples are available via godoc and in the "demos" subdirectory.

For a presentation highlighting the features of this package, compile and run the program in the "demos/presentation" subdirectory.

Documentation

Package documentation is available via godoc.

An introduction tutorial is also available.

Dependencies

This package is based on github.com/gdamore/tcell (and its dependencies) and github.com/rivo/uniseg.

Support

CONTRIBUTING.md describes how to share issues, suggestions and patches (pull requests).