list

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT, Apache-2.0 Imports: 4 Imported by: 0 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 BuilderFunc

type BuilderFunc func(i uint, cursor uint) vxfw.Widget

BuilderFunc is a function which takes

type Dynamic

type Dynamic struct {
	// Builder is the function Dynamic calls to get a widget at a location
	Builder BuilderFunc
	// DrawCursor indicates if the view should draw it's own cursor
	DrawCursor bool
	// DisableEventHandlers prevents the widget from handling key or mouse
	// events. Set this to true to use custom event handlers
	DisableEventHandlers bool

	// Distance between each list item
	Gap int
	// contains filtered or unexported fields
}

Dynamic is a dynamic list. It does not contain a slice of Widgets, but instead obtains them from a BuilderFunc

func (*Dynamic) CaptureEvent

func (d *Dynamic) CaptureEvent(ev vaxis.Event) (vxfw.Command, error)

func (*Dynamic) Cursor

func (d *Dynamic) Cursor() uint

Cursor returns the index of the cursor

func (*Dynamic) Draw

func (d *Dynamic) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error)

func (*Dynamic) HandleEvent

func (d *Dynamic) HandleEvent(ev vaxis.Event, ph vxfw.EventPhase) (vxfw.Command, error)

func (*Dynamic) NextItem

func (d *Dynamic) NextItem() vxfw.Command

func (*Dynamic) Offset

func (d *Dynamic) Offset() int

Offset returns the rendered offset of the list

func (*Dynamic) PrevItem

func (d *Dynamic) PrevItem() vxfw.Command

func (*Dynamic) SetCursor

func (d *Dynamic) SetCursor(c uint)

func (*Dynamic) SetPendingScroll

func (d *Dynamic) SetPendingScroll(lines int)

SetPendingScroll sets a pending scroll amount, by lines. Positive numbers indicate a scroll down

Jump to

Keyboard shortcuts

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