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.

Since: 2.7

func NewNavigation

  func NewNavigation(root fyne.CanvasObject) *Navigation
  

NewNavigation creates a new navigation container with a given root object.

Since: 2.7

func NewNavigationWithTitle

  func NewNavigationWithTitle(root fyne.CanvasObject, s string) *Navigation
  

NewNavigationWithTitle creates a new navigation container with a given root object and a default title.

Since: 2.7

func (*Navigation) Back

  func (nav *Navigation) Back() fyne.CanvasObject
  

Back returns the top level CanvasObject, adjusts the title accordingly, and disabled the back button when no more objects are left to go back to.

Since: 2.7

func (*Navigation) CreateRenderer

  func (nav *Navigation) CreateRenderer() fyne.WidgetRenderer
  

func (*Navigation) Forward

  func (nav *Navigation) Forward() fyne.CanvasObject
  

Forward shows the next object in the stack again.

Since: 2.7

func (*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.

Since: 2.7

func (*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.

Since: 2.7

func (*Navigation) SetCurrentTitle

  func (nav *Navigation) SetCurrentTitle(s string)
  

SetCurrentTitle changes the navigation title for the current level.

Since: 2.7

func (*Navigation) SetTitle

  func (nav *Navigation) SetTitle(s string)
  

SetTitle changes the root navigation title shown by default.

Since: 2.7