Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶ added in v0.12.0
type Contract bool
Contract is a layout that arranges boxes in a simple row or column according to their minimum sizes.
func (Contract) Arrange ¶ added in v0.12.0
func (contract Contract) Arrange(hints tomo.LayoutHints, boxes []tomo.Box)
func (Contract) MinimumSize ¶ added in v0.12.0
type Cut ¶
type Cut struct {
// contains filtered or unexported fields
}
Cut is a layout that can be divided into smaller and smaller sections.
func (*Cut) Horizontal ¶
Horizontal divides the layout horizontally. Sections are specified using booleans. If a section is true, it will expand. If false, it will contract.
func (*Cut) MinimumSize ¶
type Flow ¶ added in v0.12.0
type Flow bool
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 layout will behave like Contract.
func (Flow) Arrange ¶ added in v0.12.0
func (flow Flow) Arrange(hints tomo.LayoutHints, boxes []tomo.Box)
func (Flow) MinimumSize ¶ added in v0.12.0
type Grid ¶ added in v0.4.0
type Grid struct {
// contains filtered or unexported fields
}
Grid is a layout that arranges boxes in a grid formation with distinct rows and columns. It is great for creating forms.
func NewGrid ¶ added in v0.4.0
NewGrid creates a new grid layout. Rows and columns are specified as slices of booleans, where true means a row or column will expand and false means it will contract. Boxes are laid out left to right, then top to bottom. Boxes that go beyond the lengh of rows will be laid out according to columns, but they will not expand vertically.
func (*Grid) Arrange ¶ added in v0.4.0
func (this *Grid) Arrange(hints tomo.LayoutHints, boxes []tomo.Box)