Browse Source

Add deprecation notice to SetBorderPadding, GetBorderPadding and Pages

tablepad
Trevor Slocum 2 years ago
parent
commit
62c7289449
  1. 14
      box.go
  2. 9
      panels.go

14
box.go

@ -579,16 +579,18 @@ func (b *Box) GetFocusable() Focusable { @@ -579,16 +579,18 @@ func (b *Box) GetFocusable() Focusable {
return b.focus
}
// GetBorderPadding returns the size of the padding around the box content. It
// is provided for backwards compatibility. Application developers should use
// GetPadding instead.
// GetBorderPadding returns the size of the padding around the box content.
//
// Deprecated: This function is provided for backwards compatibility.
// Developers should use GetPadding instead.
func (b *Box) GetBorderPadding() (top, bottom, left, right int) {
return b.GetPadding()
}
// SetBorderPadding sets the size of the padding around the box content. It
// is provided for backwards compatibility. Application developers should use
// SetPadding instead.
// SetBorderPadding sets the size of the padding around the box content.
//
// Deprecated: This function is provided for backwards compatibility.
// Developers should use SetPadding instead.
func (b *Box) SetBorderPadding(top, bottom, left, right int) {
b.SetPadding(top, bottom, left, right)
}

9
panels.go

@ -380,13 +380,18 @@ func (p *Panels) MouseHandler() func(action MouseAction, event *tcell.EventMouse @@ -380,13 +380,18 @@ func (p *Panels) MouseHandler() func(action MouseAction, event *tcell.EventMouse
// Support backwards compatibility with Pages.
type page = panel
// Pages is a wrapper around Panels. It is provided for backwards compatibility.
// Application developers should use Panels instead.
// Pages is a wrapper around Panels.
//
// Deprecated: This type is provided for backwards compatibility.
// Developers should use Panels instead.
type Pages struct {
*Panels
}
// NewPages returns a new Panels object.
//
// Deprecated: This function is provided for backwards compatibility.
// Developers should use NewPanels instead.
func NewPages() *Pages {
return &Pages{NewPanels()}
}

Loading…
Cancel
Save