Add missing docs for Get/SetParent
MODIFY
tview/box.go
tview/box.go
@@ -590,11 +590,15 @@ func (b *Box) SetIndicateOverflow(indicateOverflow bool) *Box {
return b
}
+// SetParent defines which component this primitive is currently being
+// treated as a child of. This should never be called manually.
func (b *Box) SetParent(parent Primitive) {
//Reparenting is possible!
b.parent = parent
}
+// GetParent returns the current parent or nil if the parent hasn't been
+// set yet.
func (b *Box) GetParent() Primitive {
return b.parent
}

MODIFY
tview/primitive.go
tview/primitive.go
@@ -22,8 +22,12 @@ type Primitive interface {
// SetRect sets a new position of the primitive.
SetRect(x, y, width, height int)
+ // SetParent defines which component this primitive is currently being
+ // treated as a child of. This should never be called manually.
SetParent(Primitive)
+ // GetParent returns the current parent or nil if the parent hasn't been
+ // set yet.
GetParent() Primitive
// InputHandler returns a handler which receives key events when it has focus.

Add missing docs for Get/SetParent