Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List holds a collection of items that can be displayed with an N number of visible items. The list can be moved up, down by one item of time or an entire page (ie: visible size). It keeps track of the current selected item.
func New ¶
New creates and initializes a list. Items must be a slice type and size must be greater than 0.
func (*List) CanPageDown ¶
CanPageDown returns whether a list can still PageDown().
func (*List) Items ¶
Items returns a slice equal to the size of the list with the current visible items and the index of the active item in this list.
func (*List) Next ¶
func (l *List) Next()
Next moves the visible list forward one item. If the selected item is out of view, the new select item becomes the first visible item. If the list is already at the bottom, nothing happens.
func (*List) PageDown ¶
func (l *List) PageDown()
PageDown moves the visible list forward by x items. Where x is the size of the visible items on the list. The selected item becomes the first visible item.