Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Menu ¶
type Menu struct {
W, H int
X, Y int
Items []string
Win goncurses.Window
Selected bool
// contains filtered or unexported fields
}
Menu represents a vertical panel menu of cellular entries taking up an entire row from X to W
Menu handles focus, scrolling and the managing of elements at each render.
This component is not thread safe and should only be modified directly one a single thread
func (*Menu) ChangeSelection ¶
ChangeSelection changes the selection to the index specified. If index is out of range, no action is taken.
func (*Menu) GetSelection ¶
GetSelection returns the text of the currently selected menu element. If there are no items selected, GetSelection returns an empty string.
func (*Menu) MoveSelection ¶
MoveSelection changes the selected item relative to the current position. If the new selection would be out of range, no action is taken.