mirror of https://github.com/rivo/tview.git
This commit is contained in:
parent
a4acb08f51
commit
0c92c2a810
13
flex.go
13
flex.go
|
@ -105,6 +105,19 @@ func (f *Flex) RemoveItem(p Primitive) *Flex {
|
|||
return f
|
||||
}
|
||||
|
||||
// GetItemCount returns the number of items in this container.
|
||||
func (f *Flex) GetItemCount() int {
|
||||
return len(f.items)
|
||||
}
|
||||
|
||||
// GetItem returns the primitive at the given index, starting with 0 for the
|
||||
// first primitive in this container.
|
||||
//
|
||||
// This function will panic for out of range indices.
|
||||
func (f *Flex) GetItem(index int) Primitive {
|
||||
return f.items[index].Item
|
||||
}
|
||||
|
||||
// Clear removes all items from the container.
|
||||
func (f *Flex) Clear() *Flex {
|
||||
f.items = nil
|
||||
|
|
Loading…
Reference in New Issue