views

package
v0.0.0-...-aaac02b Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawBorder

func DrawBorder(buf buffer.Buffer)

TODO(ym): make cleaner using mafs (slope to get the char and pythagorean theorem or something)

Types

type BorderView

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

func (BorderView) Handle

func (view BorderView) Handle(buf buffer.Buffer, event tcell.Event)

func (BorderView) UpdateAndRedraw

func (view BorderView) UpdateAndRedraw(buf buffer.Buffer)

type GalleriesView

type GalleriesView struct {
	SelectedHandler *KeyHandler
	// contains filtered or unexported fields
}

func NewGalleriesView

func NewGalleriesView(SelectedHandler KeyHandler, render Renderer) *GalleriesView

func (*GalleriesView) AddItem

func (view *GalleriesView) AddItem(item interface{})

func (*GalleriesView) CharHandler

func (view *GalleriesView) CharHandler(key rune, handler KeyHandler)

func (*GalleriesView) Clear

func (view *GalleriesView) Clear()

func (*GalleriesView) Handle

func (view *GalleriesView) Handle(buf buffer.Buffer, ev tcell.Event)

func (*GalleriesView) Length

func (view *GalleriesView) Length() int

func (*GalleriesView) OnEndReached

func (view *GalleriesView) OnEndReached(handler func(*GalleriesView))

func (*GalleriesView) OnSelectionChanged

func (view *GalleriesView) OnSelectionChanged(handler KeyHandler)

func (*GalleriesView) UpdateAndRedraw

func (view *GalleriesView) UpdateAndRedraw(buf buffer.Buffer)

type GalleryInfo

type GalleryInfo struct {
	Gallery *nhentai.Gallery
}

func (*GalleryInfo) Handle

func (view *GalleryInfo) Handle(buf buffer.Buffer, ev tcell.Event)

func (*GalleryInfo) SetGallery

func (view *GalleryInfo) SetGallery(gallery *nhentai.Gallery)

func (*GalleryInfo) UpdateAndRedraw

func (view *GalleryInfo) UpdateAndRedraw(buf buffer.Buffer)

type KeyHandler

type KeyHandler func(*GalleriesView, []interface{}, int)

type Renderer

type Renderer func(int, int, int, []interface{}) string

Jump to

Keyboard shortcuts

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