listable

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListRenderer

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

ListRenderer make a List widget which includes multi-line texts look like scrolled

func NewListRenderer

func NewListRenderer(opt *ListRendererOption) (l *ListRenderer)

NewListRenderer constructs a ListWrapper

func (*ListRenderer) AddBody

func (l *ListRenderer) AddBody(line string)

AddBody add an another line of text to ListWrapper.body

func (*ListRenderer) Deactivate added in v0.9.6

func (l *ListRenderer) Deactivate() []string

Deactivate deactivates

func (*ListRenderer) GetCursor

func (l *ListRenderer) GetCursor() int

GetCursor returns ListWrapper.cursor

func (*ListRenderer) MoveCursor

func (l *ListRenderer) MoveCursor(direction string) (items []string)

MoveCursor moves cursor position to "direction" with no focuse

func (*ListRenderer) MoveCursorWithFocus

func (l *ListRenderer) MoveCursorWithFocus(direction string) (items []string)

MoveCursorWithFocus moves cursor position to "direction" with a highlightened focus

func (*ListRenderer) RenderActually

func (l *ListRenderer) RenderActually() []string

RenderActually renders list

func (*ListRenderer) SetBody

func (l *ListRenderer) SetBody(items []string)

SetBody replace strings on ListWrapper.body

type ListRendererOption

type ListRendererOption struct {
	MaxH          int
	Header        []string
	Body          []string
	LineHighLight bool
}

ListRendererOption is the option argument for NewListWrapper

type ListWrapper

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

ListWrapper make a List widget which includes multi-line texts look like scrolled

func NewListWrapper

func NewListWrapper(opt *ListWrapperOption) (l *ListWrapper)

NewListWrapper constructs a ListWrapper

func (*ListWrapper) Activate added in v0.9.6

func (l *ListWrapper) Activate()

Activate display current *ui.List.Items

func (*ListWrapper) AddBody

func (l *ListWrapper) AddBody(line string)

AddBody add an another line of textto ListWrapper.body

func (*ListWrapper) Deactivate added in v0.9.6

func (l *ListWrapper) Deactivate()

Deactivate deactivates widget

func (*ListWrapper) GetCursor

func (l *ListWrapper) GetCursor() int

GetCursor returns ListWrapper.cursor

func (*ListWrapper) GetHeight

func (l *ListWrapper) GetHeight() int

GetHeight is the implementation of widget.Activate

func (*ListWrapper) GetWidget

func (l *ListWrapper) GetWidget() ui.GridBufferer

GetWidget returns the instance of ui.List

func (*ListWrapper) GetWidth

func (l *ListWrapper) GetWidth() int

GetWidth is the implementation of widget.Activate

func (*ListWrapper) MmoveCursorWithFocus

func (l *ListWrapper) MmoveCursorWithFocus(direction string)

MmoveCursorWithFocus moves cursor and update ui

func (*ListWrapper) MoveCursor

func (l *ListWrapper) MoveCursor(direction string)

MoveCursor moves cursor

func (*ListWrapper) Render

func (l *ListWrapper) Render()

Render renders widgets

func (*ListWrapper) ResetRender

func (l *ListWrapper) ResetRender()

ResetRender returns a initial multi-line texts

func (*ListWrapper) SetBody

func (l *ListWrapper) SetBody(items []string)

SetBody replace strings on ListWrapper.body

type ListWrapperOption

type ListWrapperOption struct {
	Title         string
	RealHeight    int
	Header        []string
	Body          []string
	LineHighLight bool
}

ListWrapperOption is the option argument for NewListWrapper

Jump to

Keyboard shortcuts

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