forked from tslocum/cview
Add code.rocketnine.space migration notice
This commit is contained in:
parent
bb362496b2
commit
41e35f8d69
47 changed files with 80 additions and 94 deletions
|
@ -1,20 +0,0 @@
|
|||
image: golang:latest
|
||||
|
||||
stages:
|
||||
- validate
|
||||
- build
|
||||
|
||||
fmt:
|
||||
stage: validate
|
||||
script:
|
||||
- make check-fmt
|
||||
|
||||
vet:
|
||||
stage: validate
|
||||
script:
|
||||
- make vet
|
||||
|
||||
test:
|
||||
stage: validate
|
||||
script:
|
||||
- make test
|
|
@ -5,11 +5,11 @@ suggestions and patches.
|
|||
|
||||
Please include as much relevant information as possible.
|
||||
|
||||
Review project [documentation](https://docs.rocketnine.space/gitlab.com/tslocum/cview)
|
||||
Review project [documentation](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview)
|
||||
before submitting an issue.
|
||||
|
||||
Share issues and suggestions on the [issue tracker](https://gitlab.com/tslocum/cview/issues).
|
||||
Share issues and suggestions on the [issue tracker](https://code.rocketnine.space/tslocum/cview/issues).
|
||||
|
||||
# Patches (pull requests)
|
||||
|
||||
Submit patches as [pull requests](https://gitlab.com/tslocum/cview/merge_requests).
|
||||
Submit patches as [pull requests](https://code.rocketnine.space/tslocum/cview/pulls).
|
||||
|
|
|
@ -3,8 +3,8 @@ This document lists architectural details of cview.
|
|||
# Focus-related style attributes are unset by default
|
||||
|
||||
This applies to all widgets except Button and TabbedPanels, which require a
|
||||
style change to indicate focus. See [ColorUnset](https://docs.rocketnine.space/gitlab.com/tslocum/cview#pkg-variables).
|
||||
style change to indicate focus. See [ColorUnset](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview#pkg-variables).
|
||||
|
||||
# Widgets always use `sync.RWMutex`
|
||||
|
||||
See [#30](https://gitlab.com/tslocum/cview/-/issues/30).
|
||||
See [#30](https://code.rocketnine.space/tslocum/cview/issues/30).
|
||||
|
|
18
FORK.md
18
FORK.md
|
@ -1,5 +1,5 @@
|
|||
This document explains why [tview](https://github.com/rivo/tview) was forked to
|
||||
create [cview](https://gitlab.com/tslocum/cview). It also explains any
|
||||
create [cview](https://code.rocketnine.space/tslocum/cview). It also explains any
|
||||
differences between the projects and tracks which tview pull requests have been
|
||||
merged into cview.
|
||||
|
||||
|
@ -33,11 +33,11 @@ might accidentally end the chain with a different return type than the first
|
|||
method call. This could result in unexpected return types. For example, ending
|
||||
a chain with `SetTitle` would result in a `Box` rather than the original primitive.
|
||||
|
||||
## cview is [thread-safe](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#hdr-Concurrency)
|
||||
## cview is [thread-safe](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#hdr-Concurrency)
|
||||
|
||||
tview [is not thread-safe](https://godoc.org/github.com/rivo/tview#hdr-Concurrency).
|
||||
|
||||
## [Application.QueueUpdate](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#Application.QueueUpdate) and [Application.QueueUpdateDraw](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#Application.QueueUpdateDraw) do not block
|
||||
## [Application.QueueUpdate](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#Application.QueueUpdate) and [Application.QueueUpdateDraw](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#Application.QueueUpdateDraw) do not block
|
||||
|
||||
tview [blocks until the queued function returns](https://github.com/rivo/tview/blob/fe3052019536251fd145835dbaa225b33b7d3088/application.go#L510).
|
||||
|
||||
|
@ -58,16 +58,16 @@ func (w *Widget) Draw(screen tcell.Screen) {
|
|||
|
||||
## Setting a primitive's background color to `tcell.ColorDefault` does not result in transparency
|
||||
|
||||
Call [Box.SetBackgroundTransparent](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#Box.SetBackgroundTransparent)
|
||||
Call [Box.SetBackgroundTransparent](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#Box.SetBackgroundTransparent)
|
||||
to enable background transparency.
|
||||
|
||||
## Double clicks are not handled by default
|
||||
|
||||
All clicks are handled as single clicks until an interval is set with [Application.SetDoubleClickInterval](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#Application.SetDoubleClickInterval).
|
||||
All clicks are handled as single clicks until an interval is set with [Application.SetDoubleClickInterval](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#Application.SetDoubleClickInterval).
|
||||
|
||||
## Tables are sorted when a fixed row is clicked by default
|
||||
|
||||
Call [Table.SetSortClicked](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#Table.SetSortClicked)
|
||||
Call [Table.SetSortClicked](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#Table.SetSortClicked)
|
||||
to disable this behavior.
|
||||
|
||||
## Lists and Forms do not wrap around by default
|
||||
|
@ -81,8 +81,8 @@ remaining unchanged.
|
|||
|
||||
## TextViews store their text as []byte instead of string
|
||||
|
||||
This greatly improves buffer efficiency. [TextView.Write](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#TextView.Write)
|
||||
is 90% faster and [TextView.Draw](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#TextView.Draw)
|
||||
This greatly improves buffer efficiency. [TextView.Write](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#TextView.Write)
|
||||
is 90% faster and [TextView.Draw](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#TextView.Draw)
|
||||
is 50% faster.
|
||||
|
||||
## `Pages` has been renamed as `Panels`
|
||||
|
@ -95,7 +95,7 @@ tview moves the updated panel to the end.
|
|||
|
||||
## `Application.ForceDraw` has been removed
|
||||
|
||||
Because cview is [thread-safe](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#hdr-Concurrency),
|
||||
Because cview is [thread-safe](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview/#hdr-Concurrency),
|
||||
application draws must be queued. Call `Application.QueueUpdateDraw` to queue
|
||||
an update that requires the application to be drawn when completed.
|
||||
|
||||
|
|
28
README.md
28
README.md
|
@ -1,16 +1,22 @@
|
|||
!!! cview has moved to [code.rocketnine.space](https://code.rocketnine.space/tslocum/cview) !!!
|
||||
====
|
||||
|
||||
Please visit https://code.rocketnine.space/tslocum/cview
|
||||
|
||||
------------
|
||||
|
||||
# cview - Terminal-based user interface toolkit
|
||||
[![GoDoc](https://gitlab.com/tslocum/godoc-static/-/raw/master/badge.svg)](https://docs.rocketnine.space/gitlab.com/tslocum/cview)
|
||||
[![CI status](https://gitlab.com/tslocum/cview/badges/master/pipeline.svg)](https://gitlab.com/tslocum/cview/commits/master)
|
||||
[![GoDoc](https://code.rocketnine.space/tslocum/godoc-static/raw/branch/master/badge.svg)](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview)
|
||||
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
|
||||
|
||||
This package is a fork of [tview](https://github.com/rivo/tview).
|
||||
See [FORK.md](https://gitlab.com/tslocum/cview/blob/master/FORK.md) for more information.
|
||||
See [FORK.md](https://code.rocketnine.space/tslocum/cview/src/branch/master/FORK.md) for more information.
|
||||
|
||||
## Demo
|
||||
|
||||
`ssh cview.rocketnine.space -p 20000`
|
||||
|
||||
[![Recording of presentation demo](https://gitlab.com/tslocum/cview/-/raw/master/cview.svg)](https://gitlab.com/tslocum/cview/tree/master/demos/presentation)
|
||||
[![Recording of presentation demo](https://code.rocketnine.space/tslocum/cview/raw/branch/master/cview.svg)](https://code.rocketnine.space/tslocum/cview/src/branch/master/demos/presentation)
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -29,16 +35,16 @@ Available widgets:
|
|||
|
||||
Widgets may be customized and extended to suit any application.
|
||||
|
||||
[Mouse support](https://docs.rocketnine.space/gitlab.com/tslocum/cview#hdr-Mouse_Support) is available.
|
||||
[Mouse support](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview#hdr-Mouse_Support) is available.
|
||||
|
||||
## Applications
|
||||
|
||||
A list of applications powered by cview is available via [pkg.go.dev](https://pkg.go.dev/gitlab.com/tslocum/cview?tab=importedby).
|
||||
A list of applications powered by cview is available via [pkg.go.dev](https://pkg.go.dev/code.rocketnine.space/tslocum/cview?tab=importedby).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
go get gitlab.com/tslocum/cview
|
||||
go get code.rocketnine.space/tslocum/cview
|
||||
```
|
||||
|
||||
## Hello World
|
||||
|
@ -49,7 +55,7 @@ This basic example creates a TextView titled "Hello, World!" and displays it in
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -67,7 +73,7 @@ func main() {
|
|||
}
|
||||
```
|
||||
|
||||
Examples are available via [godoc](https://docs.rocketnine.space/gitlab.com/tslocum/cview#pkg-examples)
|
||||
Examples are available via [godoc](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview#pkg-examples)
|
||||
and in the "demos" subdirectory.
|
||||
|
||||
For a presentation highlighting the features of this package, compile and run
|
||||
|
@ -75,7 +81,7 @@ the program in the "demos/presentation" subdirectory.
|
|||
|
||||
## Documentation
|
||||
|
||||
Package documentation is available via [godoc](https://docs.rocketnine.space/gitlab.com/tslocum/cview).
|
||||
Package documentation is available via [godoc](https://docs.rocketnine.space/code.rocketnine.space/tslocum/cview).
|
||||
|
||||
An [introduction tutorial](https://rocketnine.space/post/tview-and-you/) is also available.
|
||||
|
||||
|
@ -86,5 +92,5 @@ This package is based on [github.com/gdamore/tcell](https://github.com/gdamore/t
|
|||
|
||||
## Support
|
||||
|
||||
[CONTRIBUTING.md](https://gitlab.com/tslocum/cview/blob/master/CONTRIBUTING.md) describes how to share
|
||||
[CONTRIBUTING.md](https://code.rocketnine.space/tslocum/cview/src/branch/master/CONTRIBUTING.md) describes how to share
|
||||
issues, suggestions and patches (pull requests).
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Demo code for the Button primitive.
|
||||
package main
|
||||
|
||||
import "gitlab.com/tslocum/cview"
|
||||
import "code.rocketnine.space/tslocum/cview"
|
||||
|
||||
func main() {
|
||||
app := cview.NewApplication()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Demo code for the DropDown primitive.
|
||||
package main
|
||||
|
||||
import "gitlab.com/tslocum/cview"
|
||||
import "code.rocketnine.space/tslocum/cview"
|
||||
|
||||
func main() {
|
||||
app := cview.NewApplication()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func demoBox(title string) *cview.Box {
|
||||
|
|
|
@ -4,9 +4,9 @@ package main
|
|||
import (
|
||||
"log"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"code.rocketnine.space/tslocum/cbind"
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
func wrap(f func()) func(ev *tcell.EventKey) *tcell.EventKey {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
// 1,000 most common English words.
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
type company struct {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
const panelCount = 5
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
import "gitlab.com/tslocum/cview"
|
||||
import "code.rocketnine.space/tslocum/cview"
|
||||
|
||||
// Center returns a new primitive which shows the provided primitive in its
|
||||
// center, given the provided primitive's size.
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
// The width of the code window.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const colorsText = `You can use color tags almost everywhere to partially change the color of a string.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const logo = `
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
// End shows the final slide.
|
||||
|
@ -13,7 +13,7 @@ func End(nextSlide func()) (title string, content cview.Primitive) {
|
|||
textView.SetDoneFunc(func(key tcell.Key) {
|
||||
nextSlide()
|
||||
})
|
||||
url := "https://gitlab.com/tslocum/cview"
|
||||
url := "https://code.rocketnine.space/tslocum/cview"
|
||||
fmt.Fprint(textView, url)
|
||||
return "End", Center(len(url), 1, textView)
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
func demoBox(title string) *cview.Box {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
const form = `[green]package[white] main
|
||||
|
||||
[green]import[white] (
|
||||
[red]"gitlab.com/tslocum/cview"[white]
|
||||
[red]"code.rocketnine.space/tslocum/cview"[white]
|
||||
)
|
||||
|
||||
[green]func[white] [yellow]main[white]() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
// Grid demonstrates the grid layout.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const inputField = `[green]package[white] main
|
||||
|
@ -11,7 +11,7 @@ const inputField = `[green]package[white] main
|
|||
[red]"strconv"[white]
|
||||
|
||||
[red]"github.com/gdamore/tcell/v2"[white]
|
||||
[red]"gitlab.com/tslocum/cview"[white]
|
||||
[red]"code.rocketnine.space/tslocum/cview"[white]
|
||||
)
|
||||
|
||||
[green]func[white] [yellow]main[white]() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
import "gitlab.com/tslocum/cview"
|
||||
import "code.rocketnine.space/tslocum/cview"
|
||||
|
||||
// Introduction returns a cview.List with the highlights of the cview package.
|
||||
func Introduction(nextSlide func()) (title string, content cview.Primitive) {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
_ "net/http/pprof"
|
||||
"strconv"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
// Slide is a function which returns the slide's main primitive and its title.
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const sliderCode = `[green]package[white] main
|
||||
|
@ -13,7 +13,7 @@ const sliderCode = `[green]package[white] main
|
|||
[red]"fmt"[white]
|
||||
|
||||
[red]"github.com/gdamore/tcell/v2"[white]
|
||||
[red]"gitlab.com/tslocum/cview"[white]
|
||||
[red]"code.rocketnine.space/tslocum/cview"[white]
|
||||
)
|
||||
|
||||
[green]func[white] [yellow]main[white]() {
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const tableData = `OrderDate|Region|Rep|Item|Units|UnitCost|Total
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const textView1 = `[green]func[white] [yellow]main[white]() {
|
||||
|
@ -66,7 +66,7 @@ const textView2 = `[green]package[white] main
|
|||
[red]"strconv"[white]
|
||||
|
||||
[red]"github.com/gdamore/tcell/v2"[white]
|
||||
[red]"gitlab.com/tslocum/cview"[white]
|
||||
[red]"code.rocketnine.space/tslocum/cview"[white]
|
||||
)
|
||||
|
||||
[green]func[white] [yellow]main[white]() {
|
||||
|
|
|
@ -3,13 +3,13 @@ package main
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const treeAllCode = `[green]package[white] main
|
||||
|
||||
[green]import[white] [red]"gitlab.com/tslocum/cview"[white]
|
||||
[green]import[white] [red]"code.rocketnine.space/tslocum/cview"[white]
|
||||
|
||||
[green]func[white] [yellow]main[white]() {
|
||||
$$$
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
const loremIpsumText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||
|
|
|
@ -4,8 +4,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
// RadioButtons implements a simple primitive for radio button selections.
|
||||
|
|
|
@ -4,7 +4,7 @@ package main
|
|||
import (
|
||||
"time"
|
||||
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
const panelCount = 5
|
||||
|
|
|
@ -4,8 +4,8 @@ package main
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const loremIpsumText = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
const corporate = `Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"io/ioutil"
|
||||
"path/filepath"
|
||||
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gitlab.com/tslocum/cview"
|
||||
)
|
||||
|
||||
// Show a navigable tree view of the current directory.
|
||||
|
|
|
@ -4,7 +4,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
2
doc.go
2
doc.go
|
@ -194,7 +194,7 @@ containing the text "Hello, world!":
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/tslocum/cview"
|
||||
"code.rocketnine.space/tslocum/cview"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -28,7 +28,7 @@ func ExampleNewApplication() {
|
|||
// Create about layout using Grid.
|
||||
aboutTextView := NewTextView()
|
||||
aboutTextView.SetTextAlign(AlignCenter)
|
||||
aboutTextView.SetText("cview muti-layout application example\n\nhttps://gitlab.com/tslocum/cview")
|
||||
aboutTextView.SetText("cview muti-layout application example\n\nhttps://code.rocketnine.space/tslocum/cview")
|
||||
|
||||
aboutLayout := NewGrid()
|
||||
aboutLayout.AddItem(aboutTextView, 0, 0, 1, 1, 0, 0, false)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/tslocum/cview
|
||||
module code.rocketnine.space/tslocum/cview
|
||||
|
||||
go 1.12
|
||||
|
||||
|
|
2
keys.go
2
keys.go
|
@ -1,8 +1,8 @@
|
|||
package cview
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"code.rocketnine.space/tslocum/cbind"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Key defines the keyboard shortcuts of an application.
|
||||
|
|
Loading…
Reference in a new issue