Add placeholder methods for recommended sizes
This commit is contained in:
@@ -42,6 +42,7 @@ func (contract Contract) MinimumSize (hints tomo.LayoutHints, boxes []tomo.Box)
|
||||
}
|
||||
|
||||
func (contract Contract) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
||||
// TODO if we overflow in a direction, respect the reccomended size
|
||||
if contract.v() {
|
||||
dot := hints.Bounds.Min
|
||||
for index, box := range boxes {
|
||||
@@ -93,5 +94,15 @@ func (contract Contract) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) {
|
||||
}
|
||||
}
|
||||
|
||||
func (contract Contract) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
|
||||
// TODO
|
||||
return 0
|
||||
}
|
||||
|
||||
func (contract Contract) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
|
||||
// TODO
|
||||
return 0
|
||||
}
|
||||
|
||||
func (contract Contract) v () bool { return contract == ContractVertical }
|
||||
func (contract Contract) h () bool { return contract == ContractHorizontal }
|
||||
|
||||
Reference in New Issue
Block a user