Added getters for common Box attributes. Resolves #427

This commit is contained in:
Oliver 2020-04-14 13:29:54 +02:00
parent ca37f83cb2
commit 285468943b
1 changed files with 15 additions and 0 deletions

15
box.go
View File

@ -280,6 +280,21 @@ func (b *Box) SetBorderAttributes(attr tcell.AttrMask) *Box {
return b 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. // SetTitle sets the box's title.
func (b *Box) SetTitle(title string) *Box { func (b *Box) SetTitle(title string) *Box {
b.title = title b.title = title