Add placeholder methods for recommended sizes

This commit is contained in:
2024-06-11 17:12:18 -04:00
parent 1069ae6455
commit 95d3dc3288
3 changed files with 32 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import "math"
import "image"
import "git.tebibyte.media/tomo/tomo"
var _ tomo.Layout = Grid { }
var _ tomo.Layout = new(Grid)
// Grid is a layout that arranges boxes in a grid formation with distinct rows
// and columns. It is great for creating forms.
@@ -108,3 +108,13 @@ func expand (hints tomo.LayoutHints, sizes []int, space int, expands func (int)
func ceilDiv (x, y int) int {
return int(math.Ceil(float64(x) / float64(y)))
}
func (this *Grid) RecommendedHeight (hints tomo.LayoutHints, boxes []tomo.Box, width int) int {
// TODO
return 0
}
func (this *Grid) RecommendedWidth (hints tomo.LayoutHints, boxes []tomo.Box, height int) int {
// TODO
return 0
}