1
0
mirror of https://github.com/taigrr/wtf synced 2026-04-02 02:28:55 -07:00

Close #204. Add Trello dependency to /vendor

This commit is contained in:
Chris Cummer
2018-06-19 12:40:27 -07:00
parent 3aec59b150
commit 16d56bb0d8
73 changed files with 23988 additions and 853 deletions

17
vendor/github.com/rivo/tview/flex.go generated vendored
View File

@@ -28,7 +28,7 @@ type Flex struct {
*Box
// The items to be positioned.
items []flexItem
items []*flexItem
// FlexRow or FlexColumn.
direction int
@@ -86,7 +86,7 @@ func (f *Flex) SetFullScreen(fullScreen bool) *Flex {
// You can provide a nil value for the primitive. This will still consume screen
// space but nothing will be drawn.
func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex {
f.items = append(f.items, flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
f.items = append(f.items, &flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
return f
}
@@ -101,6 +101,19 @@ func (f *Flex) RemoveItem(p Primitive) *Flex {
return f
}
// ResizeItem sets a new size for the item(s) with the given primitive. If there
// are multiple Flex items with the same primitive, they will all receive the
// same size. For details regarding the size parameters, see AddItem().
func (f *Flex) ResizeItem(p Primitive, fixedSize, proportion int) *Flex {
for _, item := range f.items {
if item.Item == p {
item.FixedSize = fixedSize
item.Proportion = proportion
}
}
return f
}
// Draw draws this primitive onto the screen.
func (f *Flex) Draw(screen tcell.Screen) {
f.Box.Draw(screen)