view

package
v0.0.0-...-b4b5453 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PadRight

func PadRight(str string, length int, padChar string) string

Types

type Box

type Box struct {
	Width, Height int
}

type DetailView

type DetailView struct {
	Render
	Key   string
	Obj   *s3.GetObjectOutput
	Layer *Layer
}

func NewDetailView

func NewDetailView(x, y, width, height int) *DetailView

func (*DetailView) Down

func (v *DetailView) Down() int

func (*DetailView) Draw

func (v *DetailView) Draw()

func (*DetailView) HalfPageDown

func (v *DetailView) HalfPageDown() int

func (*DetailView) HalfPageUp

func (v *DetailView) HalfPageUp() int

func (*DetailView) Up

func (v *DetailView) Up() int

type DownloadView

type DownloadView struct {
	Render
	Layer   *Layer
	Objects []*model.DownloadItem
}

func NewDownloadView

func NewDownloadView(x, y, width, height int) *DownloadView

func (*DownloadView) Down

func (v *DownloadView) Down() int

func (*DownloadView) Draw

func (v *DownloadView) Draw()

func (*DownloadView) HalfPageDown

func (v *DownloadView) HalfPageDown() int

func (*DownloadView) HalfPageUp

func (v *DownloadView) HalfPageUp() int

func (*DownloadView) Up

func (v *DownloadView) Up() int

type Layer

type Layer struct {
	// contains filtered or unexported fields
}

func NewLayer

func NewLayer(x, y, width, height int) *Layer

func (*Layer) DownCursor

func (l *Layer) DownCursor(val int, contentNum int) int

func (*Layer) DrawBackGround

func (l *Layer) DrawBackGround(fg, bg termbox.Attribute)

func (*Layer) DrawContents

func (l *Layer) DrawContents(
	lines []string,
	cursorFG, cursorBG termbox.Attribute,
	defaultFG, defaultBG termbox.Attribute,
)

func (*Layer) HalfPageDownCursor

func (l *Layer) HalfPageDownCursor(contentNum int) int

func (*Layer) HalfPageUpCursor

func (l *Layer) HalfPageUpCursor() int

func (*Layer) Resize

func (l *Layer) Resize(x, y, width, height int)

func (*Layer) UpCursor

func (l *Layer) UpCursor(val int) int

type ListView

type ListView struct {
	Render
	Key string

	Objects []*model.S3Object
	Layer   *Layer
	// contains filtered or unexported fields
}

func NewListView

func NewListView(x, y, width, height int) *ListView

func (*ListView) Down

func (v *ListView) Down() int

func (*ListView) Draw

func (v *ListView) Draw()

func (*ListView) GetCursorObject

func (v *ListView) GetCursorObject() *model.S3Object

func (*ListView) HalfPageDown

func (v *ListView) HalfPageDown() int

func (*ListView) HalfPageUp

func (v *ListView) HalfPageUp() int

func (*ListView) Up

func (v *ListView) Up() int

func (*ListView) UpdateList

func (v *ListView) UpdateList(node *model.Node)
type MenuCommand int
const (
	CommandDownload MenuCommand = iota //0
	CommandOpen
	CommandEdit
)
type MenuItem struct {
	Command MenuCommand
	// contains filtered or unexported fields
}

func NewMenuItem

func NewMenuItem(name, shorthand, detail string, command MenuCommand) *MenuItem
type MenuView struct {
	Render

	Layer *Layer
	// contains filtered or unexported fields
}

func NewMenuView

func NewMenuView(x, y, width, height int) *MenuView
func (v *MenuView) Down() int
func (v *MenuView) Draw()
func (v *MenuView) GetCursorItem() *MenuItem
func (v *MenuView) Up() int
type NavigationView struct {
	Render

	Win *Window
	// contains filtered or unexported fields
}

func NewNavigationView

func NewNavigationView(x, y, width, height int) *NavigationView
func (v *NavigationView) Draw()
func (v *NavigationView) SetCurrentPath(bucket string, node *model.Node)

type Position

type Position struct {
	X, Y int
}

type Render

type Render interface {
	Draw()
}

type StatusView

type StatusView struct {
	Render
	Msg string
	Win *Window
}

func NewStatusView

func NewStatusView(x, y, width, height int) *StatusView

func (*StatusView) Draw

func (v *StatusView) Draw()

type Window

type Window struct {
	Pos *Position
	Box *Box
}

func (*Window) DrawX

func (w *Window) DrawX(x int) int

func (*Window) DrawY

func (w *Window) DrawY(y int) int

func (*Window) Resize

func (w *Window) Resize(x, y, width, height int)

Jump to

Keyboard shortcuts

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