WIP - doesn't quite work yet
This commit is contained in:
@@ -25,6 +25,10 @@ type FocusListRow interface {
|
||||
fyne.Focusable
|
||||
ItemID() widget.ListItemID
|
||||
SetItemID(widget.ListItemID)
|
||||
|
||||
SetOnTapped(func())
|
||||
SetOnDoubleTapped(func())
|
||||
SetOnFocusNeighbor(func(up bool))
|
||||
}
|
||||
|
||||
func NewFocusList(len func() int, create func() fyne.CanvasObject, update func(widget.GridWrapItemID, fyne.CanvasObject)) *FocusList {
|
||||
@@ -102,6 +106,18 @@ type FocusListRowBase struct {
|
||||
selectionRect *canvas.Rectangle
|
||||
}
|
||||
|
||||
func (l *FocusListRowBase) SetOnTapped(f func()) {
|
||||
l.OnTapped = f
|
||||
}
|
||||
|
||||
func (l *FocusListRowBase) SetOnDoubleTapped(f func()) {
|
||||
l.OnDoubleTapped = f
|
||||
}
|
||||
|
||||
func (l *FocusListRowBase) SetOnFocusNeighbor(f func(up bool)) {
|
||||
l.OnFocusNeighbor = f
|
||||
}
|
||||
|
||||
func (l *FocusListRowBase) ItemID() widget.ListItemID {
|
||||
return l.ListItemID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user