euiext

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	EntrySelectedEvent *event.Event
	// contains filtered or unexported fields
}

func NewList

func NewList(listOpts ...ListOpt) *List

func (*List) AddEntry

func (l *List) AddEntry(entry any)

Add a new entry to the end of the list Note: Duplicates will not be added

func (*List) AddFocus

func (l *List) AddFocus(direction widget.FocusDirection, focus widget.Focuser)

func (*List) Entries

func (l *List) Entries() []any

Return the current entries in the list

func (*List) Focus

func (l *List) Focus(focused bool)

func (*List) FocusNext

func (l *List) FocusNext()

func (*List) FocusPrevious

func (l *List) FocusPrevious()

func (*List) GetFocus

func (l *List) GetFocus(direction widget.FocusDirection) widget.Focuser

func (*List) GetWidget

func (l *List) GetWidget() *widget.Widget

func (*List) IsFocused

func (l *List) IsFocused() bool

func (*List) PreferredSize

func (l *List) PreferredSize() (int, int)

func (*List) RemoveEntry

func (l *List) RemoveEntry(entry any)

Remove the passed in entry from the list if it exists

func (*List) Render

func (l *List) Render(screen *ebiten.Image)

func (*List) RequestRelayout

func (l *List) RequestRelayout()

func (*List) SelectFocused

func (l *List) SelectFocused()

func (*List) SelectedEntry

func (l *List) SelectedEntry() any

Return the currently selected entry in the list

func (*List) SetEntries

func (l *List) SetEntries(newEntries []any)

Updates the entries in the list. Note: Duplicates will be removed.

func (*List) SetLocation

func (l *List) SetLocation(rect img.Rectangle)

func (*List) SetSelectedEntry

func (l *List) SetSelectedEntry(entry any)

Set the Selected Entry to e if it is found.

func (*List) SetupInputLayer

func (l *List) SetupInputLayer(def input.DeferredSetupInputLayerFunc)

func (*List) TabOrder

func (l *List) TabOrder() int

func (*List) Update

func (l *List) Update()

type ListEntryColor

type ListEntryColor struct {
	Unselected                 color.Color
	Selected                   color.Color
	DisabledUnselected         color.Color
	DisabledSelected           color.Color
	SelectingBackground        color.Color
	SelectedBackground         color.Color
	FocusedBackground          color.Color
	SelectingFocusedBackground color.Color
	SelectedFocusedBackground  color.Color
	DisabledSelectedBackground color.Color
}

type ListEntryEnterFunc

type ListEntryEnterFunc func(e any)

type ListEntryLabelFunc

type ListEntryLabelFunc func(e any) string

type ListEntrySelectedEventArgs

type ListEntrySelectedEventArgs struct {
	List          *List
	Entry         any
	PreviousEntry any
}

type ListEntrySelectedHandlerFunc

type ListEntrySelectedHandlerFunc func(args *ListEntrySelectedEventArgs)

type ListOpt

type ListOpt func(l *List)

type ListOptions

type ListOptions struct{}
var ListOpts ListOptions

func (ListOptions) AllowReselect

func (o ListOptions) AllowReselect() ListOpt

func (ListOptions) ContainerOpts

func (o ListOptions) ContainerOpts(opts ...widget.ContainerOpt) ListOpt

func (ListOptions) ControlWidgetSpacing

func (o ListOptions) ControlWidgetSpacing(s int) ListOpt

func (ListOptions) DisableDefaultKeys

func (o ListOptions) DisableDefaultKeys(val bool) ListOpt

func (ListOptions) Entries

func (o ListOptions) Entries(e []any) ListOpt

func (ListOptions) EntryButtonOpts added in v1.55.0

func (o ListOptions) EntryButtonOpts(opts ...widget.ButtonOpt) ListOpt

func (ListOptions) EntryColor

func (o ListOptions) EntryColor(c *ListEntryColor) ListOpt

func (ListOptions) EntryEnterFunc

func (o ListOptions) EntryEnterFunc(f ListEntryEnterFunc) ListOpt

func (ListOptions) EntryFontFace

func (o ListOptions) EntryFontFace(f text.Face) ListOpt

func (ListOptions) EntryLabelFunc

func (o ListOptions) EntryLabelFunc(f ListEntryLabelFunc) ListOpt

func (ListOptions) EntrySelectedHandler

func (o ListOptions) EntrySelectedHandler(f ListEntrySelectedHandlerFunc) ListOpt

func (ListOptions) EntryTextPadding

func (o ListOptions) EntryTextPadding(i widget.Insets) ListOpt

func (ListOptions) EntryTextPosition

func (o ListOptions) EntryTextPosition(h widget.TextPosition, v widget.TextPosition) ListOpt

EntryTextPosition sets the position of the text for entries. Defaults to both TextPositionCenter.

func (ListOptions) HideHorizontalSlider

func (o ListOptions) HideHorizontalSlider() ListOpt

func (ListOptions) HideVerticalSlider

func (o ListOptions) HideVerticalSlider() ListOpt

func (ListOptions) ScrollContainerOpts

func (o ListOptions) ScrollContainerOpts(opts ...widget.ScrollContainerOpt) ListOpt

func (ListOptions) SelectFocus

func (o ListOptions) SelectFocus() ListOpt

SelectFocus automatically selects each focused entry.

func (ListOptions) SliderOpts

func (o ListOptions) SliderOpts(opts ...widget.SliderOpt) ListOpt

func (ListOptions) TabOrder

func (o ListOptions) TabOrder(tabOrder int) ListOpt

Jump to

Keyboard shortcuts

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