mirror of https://github.com/rivo/tview.git
Updated Flex documentation.
This commit is contained in:
parent
37a7254a64
commit
f6602e7eb1
11
flex.go
11
flex.go
|
@ -18,7 +18,10 @@ type flexItem struct {
|
||||||
Focus bool // Whether or not this item attracts the layout's focus.
|
Focus bool // Whether or not this item attracts the layout's focus.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flex is a basic implementation of the Flexbox layout.
|
// Flex is a basic implementation of the Flexbox layout. The contained
|
||||||
|
// primitives are arranged horizontally or vertically. The way they are
|
||||||
|
// distributed along that dimension depends on their layout settings, which is
|
||||||
|
// either a fixed length or a proportional length. See AddItem() for details.
|
||||||
//
|
//
|
||||||
// See https://github.com/rivo/tview/wiki/Flex for an example.
|
// See https://github.com/rivo/tview/wiki/Flex for an example.
|
||||||
type Flex struct {
|
type Flex struct {
|
||||||
|
@ -35,9 +38,9 @@ type Flex struct {
|
||||||
fullScreen bool
|
fullScreen bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFlex returns a new flexbox layout container with the given primitives.
|
// NewFlex returns a new flexbox layout container with no primitives and its
|
||||||
// The items all have no fixed size. If more control is needed, call AddItem().
|
// direction set to FlexColumn. To add primitives to this layout, see AddItem().
|
||||||
// The direction argument must be FlexRow or FlexColumn.
|
// To change the direction, see SetDirection().
|
||||||
func NewFlex() *Flex {
|
func NewFlex() *Flex {
|
||||||
f := &Flex{
|
f := &Flex{
|
||||||
Box: NewBox(),
|
Box: NewBox(),
|
||||||
|
|
Loading…
Reference in New Issue