1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-24 13:48:56 +08:00

Clarifying the role of the Box class better. Resolves #373

This commit is contained in:
Oliver 2020-02-19 21:46:40 +01:00
parent 640e03d648
commit a177a82b6c

11
box.go
View File

@ -4,12 +4,13 @@ import (
"github.com/gdamore/tcell" "github.com/gdamore/tcell"
) )
// Box implements Primitive with a background and optional elements such as a // Box implements the Primitive interface with an empty background and optional
// border and a title. Most subclasses keep their content contained in the box // elements such as a border and a title. Box itself does not hold any content
// but don't necessarily have to. // but serves as the superclass of all other primitives. Subclasses add their
// own content, typically (but not necessarily) keeping their content within the
// box's rectangle.
// //
// Note that all classes which subclass from Box will also have access to its // Box provides a number of utility functions available to all primitives.
// functions.
// //
// See https://github.com/rivo/tview/wiki/Box for an example. // See https://github.com/rivo/tview/wiki/Box for an example.
type Box struct { type Box struct {