From 285468943bd91d6c4ee8bf6997b2cfb4efb9e713 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 14 Apr 2020 13:29:54 +0200 Subject: [PATCH] Added getters for common Box attributes. Resolves #427 --- box.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/box.go b/box.go index 1870597..6cc34b7 100644 --- a/box.go +++ b/box.go @@ -280,6 +280,21 @@ func (b *Box) SetBorderAttributes(attr tcell.AttrMask) *Box { return b } +// GetBorderAttributes returns the border's style attributes. +func (b *Box) GetBorderAttributes() tcell.AttrMask { + return b.borderAttributes +} + +// GetBorderColor returns the box's border color. +func (b *Box) GetBorderColor() tcell.Color { + return b.borderColor +} + +// GetBackgroundColor returns the box's background color. +func (b *Box) GetBackgroundColor() tcell.Color { + return b.backgroundColor +} + // SetTitle sets the box's title. func (b *Box) SetTitle(title string) *Box { b.title = title