From 5c8358fc4a981b8a78814db20c15b14307a9d2a9 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 11 Jun 2024 16:46:04 -0400 Subject: [PATCH] Add blank vars to ensure layouts satisfy tomo.Layout --- layouts/contract.go | 2 ++ layouts/cut.go | 2 ++ layouts/flow.go | 2 ++ layouts/grid.go | 2 ++ 4 files changed, 8 insertions(+) diff --git a/layouts/contract.go b/layouts/contract.go index f92b74c..8550882 100644 --- a/layouts/contract.go +++ b/layouts/contract.go @@ -3,6 +3,8 @@ package layouts import "image" import "git.tebibyte.media/tomo/tomo" +var _ tomo.Layout = ContractVertical + // Contract is a layout that arranges boxes in a simple row or column according // to their minimum sizes. type Contract bool diff --git a/layouts/cut.go b/layouts/cut.go index 3ee9d73..4ecd09b 100644 --- a/layouts/cut.go +++ b/layouts/cut.go @@ -3,6 +3,8 @@ package layouts import "image" import "git.tebibyte.media/tomo/tomo" +var _ tomo.Layout = new(cut) + // Cut is a layout that can be divided into smaller and smaller sections. type Cut struct { branches []*Cut diff --git a/layouts/flow.go b/layouts/flow.go index 3790dd3..e6acd27 100644 --- a/layouts/flow.go +++ b/layouts/flow.go @@ -3,6 +3,8 @@ package layouts import "image" import "git.tebibyte.media/tomo/tomo" +var _ tomo.Layout = FlowVertical + // Flow is a grid layout where the number of rows and columns changes depending // on the size of the container. It is designed to be used with an overflowing // container. If the container does not overflow in the correct direction, the diff --git a/layouts/grid.go b/layouts/grid.go index d09d6aa..80f7ee9 100644 --- a/layouts/grid.go +++ b/layouts/grid.go @@ -4,6 +4,8 @@ import "math" import "image" import "git.tebibyte.media/tomo/tomo" +var _ tomo.Layout = Grid { } + // Grid is a layout that arranges boxes in a grid formation with distinct rows // and columns. It is great for creating forms. type Grid struct {