display

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App = cview.NewApplication().EnableMouse(false).SetRoot(layout, true)

Functions

func CloseTab

func CloseTab()

CloseTab closes the current tab and switches to the one to its left.

func Error

func Error(title, text string)

Error displays an error on the screen in a modal.

func Help

func Help()

Help displays the help and keybindings.

func Info

func Info(s string)

Info displays some info on the screen in a modal.

func Init

func Init()

func Input

func Input(prompt string) (string, bool)

Input pulls up a modal that asks for input, and returns the user's input. It returns an bool indicating if the user chose to send input or not.

func NewTab

func NewTab()

NewTab opens a new tab and switches to it, displaying the the default empty content because there's no URL.

func NumTabs

func NumTabs() int

func Reload

func Reload()

func Stop

func Stop()

Stop stops the app gracefully. In the future it will handle things like ongoing downloads, etc

func SwitchTab

func SwitchTab(tab int)

SwitchTab switches to a specific tab, using its number, 0-indexed. The tab numbers are clamped to the end, so for example numbers like -5 and 1000 are still valid. This means that calling something like SwitchTab(curTab - 1) will never cause an error.

func URL

func URL(u string)

URL loads and handles the provided URL for the current tab. It should be an absolute URL.

func YesNo

func YesNo(prompt string) bool

YesNo displays a modal asking a yes-or-no question.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL