Browse Source

Added links to Wiki to documentation. Also replaced screenshot with GIF screencast.

tablepad
Oliver 5 years ago
parent
commit
e4f97a6436
  1. 2
      README.md
  2. 2
      box.go
  3. 2
      button.go
  4. 6
      checkbox.go
  5. 2
      dropdown.go
  6. 4
      flex.go
  7. 2
      form.go
  8. 2
      frame.go
  9. 2
      inputfield.go
  10. 2
      list.go
  11. 2
      modal.go
  12. 2
      pages.go
  13. BIN
      screenshot.jpg
  14. 2
      table.go
  15. 2
      textview.go
  16. BIN
      tview.gif

2
README.md

@ -5,7 +5,7 @@
This Go package provides commonly needed components for terminal based user interfaces.
![Screenshot](screenshot.jpg)
![Screenshot](tview.gif)
Among these components are:

2
box.go

@ -7,6 +7,8 @@ import (
// Box implements Primitive with a background and optional elements such as a
// border and a title. Most subclasses keep their content contained in the box
// but don't necessarily have to.
//
// See https://github.com/rivo/tview/wiki/Box for an example.
type Box struct {
// The position of the rect.
x, y, width, height int

2
button.go

@ -5,6 +5,8 @@ import (
)
// Button is labeled box that triggers an action when selected.
//
// See https://github.com/rivo/tview/wiki/Button for an example.
type Button struct {
*Box

6
checkbox.go

@ -4,8 +4,10 @@ import (
"github.com/gdamore/tcell"
)
// Checkbox is a one-line box (three lines if there is a title) where the
// user can enter text.
// Checkbox implements a simple box for boolean values which can be checked and
// unchecked.
//
// See https://github.com/rivo/tview/wiki/Checkbox for an example.
type Checkbox struct {
*Box

2
dropdown.go

@ -12,6 +12,8 @@ type dropDownOption struct {
// DropDown is a one-line box (three lines if there is a title) where the
// user can enter text.
//
// See https://github.com/rivo/tview/wiki/DropDown for an example.
type DropDown struct {
*Box

4
flex.go

@ -18,7 +18,9 @@ type flexItem struct {
Focus bool // Whether or not this item attracts the layout's focus.
}
// Flex is a basic implementation of a flexbox layout.
// Flex is a basic implementation of the Flexbox layout.
//
// See https://github.com/rivo/tview/wiki/Flex for an example.
type Flex struct {
*Box

2
form.go

@ -25,6 +25,8 @@ type FormItem interface {
}
// Form is a Box which contains multiple input fields, one per row.
//
// See https://github.com/rivo/tview/wiki/Form for an example.
type Form struct {
*Box

2
frame.go

@ -14,6 +14,8 @@ type frameText struct {
// Frame is a wrapper which adds a border around another primitive. The top area
// (header) and the bottom area (footer) may also contain text.
//
// See https://github.com/rivo/tview/wiki/Frame for an example.
type Frame struct {
*Box

2
inputfield.go

@ -9,6 +9,8 @@ import (
// InputField is a one-line box (three lines if there is a title) where the
// user can enter text.
//
// See https://github.com/rivo/tview/wiki/InputField for an example.
type InputField struct {
*Box

2
list.go

@ -15,6 +15,8 @@ type listItem struct {
}
// List displays rows of items, each of which can be selected.
//
// See https://github.com/rivo/tview/wiki/List for an example.
type List struct {
*Box

2
modal.go

@ -7,6 +7,8 @@ import (
// Modal is a centered message window used to inform the user or prompt them
// for an immediate decision. It needs to have at least one button (added via
// AddButtons()) or it will never disappear.
//
// See https://github.com/rivo/tview/wiki/Modal for an example.
type Modal struct {
*Box

2
pages.go

@ -15,6 +15,8 @@ type page struct {
// Pages is a container for other primitives often used as the application's
// root primitive. It allows to easily switch the visibility of the contained
// primitives.
//
// See https://github.com/rivo/tview/wiki/Pages for an example.
type Pages struct {
*Box

BIN
screenshot.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

2
table.go

@ -84,6 +84,8 @@ func (c *TableCell) GetLastPosition() (x, y, width int) {
// When there is no selection, this affects the entire table (except for fixed
// rows and columns). When there is a selection, the user moves the selection.
// The class will attempt to keep the selection from moving out of the screen.
//
// See https://github.com/rivo/tview/wiki/Table for an example.
type Table struct {
*Box

2
textview.go

@ -94,6 +94,8 @@ type textViewIndex struct {
//
// The ScrollToHighlight() function can be used to jump to the currently
// highlighted region once when the text view is drawn the next time.
//
// See https://github.com/rivo/tview/wiki/TextView for an example.
type TextView struct {
sync.Mutex
*Box

BIN
tview.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Loading…
Cancel
Save