container.Navigation
import "fyne.io/fyne/v2/container"Usage
type Navigation
type Navigation struct {
widget.BaseWidget
Root fyne.CanvasObject
Title string
OnBack func()
OnForward func()
}Navigation container is used to provide your application with a control bar and an area for content objects. Objects can be any CanvasObject, and only the most recent one will be visible.
2.7func NewNavigation
func NewNavigation(root fyne.CanvasObject) *NavigationNewNavigation creates a new navigation container with a given root object.
2.7func NewNavigationWithTitle
func NewNavigationWithTitle(root fyne.CanvasObject, s string) *NavigationNewNavigationWithTitle creates a new navigation container with a given root object and a default title.
2.7func (*Navigation) Back
func (nav *Navigation) Back() fyne.CanvasObjectBack returns the top level CanvasObject, adjusts the title accordingly, and disabled the back button when no more objects are left to go back to.
2.7func (*Navigation) CreateRenderer
func (nav *Navigation) CreateRenderer() fyne.WidgetRendererfunc (*Navigation) Forward
func (nav *Navigation) Forward() fyne.CanvasObjectForward shows the next object in the stack again.
2.7func (*Navigation) Push
func (nav *Navigation) Push(obj fyne.CanvasObject)Push puts the given object on top of the navigation stack and hides the object below.
2.7func (*Navigation) PushWithTitle
func (nav *Navigation) PushWithTitle(obj fyne.CanvasObject, s string)PushWithTitle puts the given CanvasObject on top, hides the object below, and uses the given title as label text.
2.7func (*Navigation) SetCurrentTitle
func (nav *Navigation) SetCurrentTitle(s string)SetCurrentTitle changes the navigation title for the current level.
2.7func (*Navigation) SetTitle
func (nav *Navigation) SetTitle(s string)SetTitle changes the root navigation title shown by default.
2.7