Skip to content

Commit

Permalink
Merge pull request fyne-io#1762 from toaster/feature/canvas_focus_tra…
Browse files Browse the repository at this point in the history
…versal

Feature/canvas focus traversal
  • Loading branch information
toaster committed Jan 11, 2021
2 parents 7e01210 + 3722d14 commit a92dd07
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 201 deletions.
12 changes: 12 additions & 0 deletions canvas.go
Expand Up @@ -13,6 +13,18 @@ type Canvas interface {
// Focus makes the provided item focused.
// The item has to be added to the contents of the canvas before calling this.
Focus(Focusable)
// FocusNext focuses the next focusable item.
// If no item is currently focused, the first focusable item is focused.
// If the last focusable item is currently focused, the first focusable item is focused.
//
// Since 2.0.0
FocusNext()
// FocusPrevious focuses the previous focusable item.
// If no item is currently focused, the last focusable item is focused.
// If the first focusable item is currently focused, the last focusable item is focused.
//
// Since 2.0.0
FocusPrevious()
Unfocus()
Focused() Focusable

Expand Down

0 comments on commit a92dd07

Please sign in to comment.