Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Commit a6bbe74

Browse files
committed
Tview application now has a GetRoot function
1 parent 85d0125 commit a6bbe74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tview/application.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,12 @@ func (a *Application) SetRoot(root Primitive, fullscreen bool) *Application {
515515
return a
516516
}
517517

518+
// GetRoot returns the current root Primitive of the application or nil if
519+
// there currently is not root.
520+
func (a *Application) GetRoot() Primitive {
521+
return a.root
522+
}
523+
518524
// ResizeToFullScreen resizes the given primitive such that it fills the entire
519525
// screen.
520526
func (a *Application) ResizeToFullScreen(p Primitive) *Application {

0 commit comments

Comments
 (0)