Documentation ¶
Index ¶
Constants ¶
View Source
const ( ROW = iota COLUMN )
Variables ¶
This section is empty.
Functions ¶
func ArrangeWindows ¶
func ArrangeWindows(root *Box, x0, y0, width, height int) map[string]Dimensions
Types ¶
type Box ¶
type Box struct { // Direction decides how the children boxes are laid out. ROW means the children will each form a row i.e. that they will be stacked on top of eachother. Direction int // ROW or COLUMN // function which takes the width and height assigned to the box and decides which orientation it will have ConditionalDirection func(width int, height int) int Children []*Box // function which takes the width and height assigned to the box and decides the layout of the children. ConditionalChildren func(width int, height int) []*Box // Window refers to the name of the window this box represents, if there is one Window string // static Size. If parent box's direction is ROW this refers to height, otherwise width Size int // dynamic size. Once all statically sized children have been considered, Weight decides how much of the remaining space will be taken up by the box // TODO: consider making there be one int and a type enum so we can't have size and Weight simultaneously defined Weight int }
Click to show internal directories.
Click to hide internal directories.