Documentation
¶
Overview ¶
Package outlay provides extra layouts for gio.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animation ¶
Animation holds state for an Animation between two states that is not invertible.
func (*Animation) Progress ¶
Progress returns the current progress through the animation as a value in the range [0,1]
func (*Animation) SetDuration ¶
type Cell ¶
type Cell func(gtx layout.Context, x, y int) layout.Dimensions
Cell lays out the Table cell located at column x and row y.
type Fan ¶
type Fan struct { Animation // The width, in radians, of the full arc that items should occupy. // If zero, math.Pi/2 will be used (1/4 of a full circle). WidthRadians float32 // The offset, in radians, above the X axis to apply before rendering the // arc. This can be used with a value of Pi/4 to center an arc of width // Pi/2. If zero, math.Pi/4 will be used (1/8 of a full circle). To get the // equivalent of specifying zero, specify a value of 2*math.Pi. OffsetRadians float32 // The radius of the hollow circle at the center of the fan. Leave nil to // use the default heuristic of half the width of the widest item. HollowRadius *unit.Value // contains filtered or unexported fields }
type Grid ¶
type Grid struct { Num int Axis layout.Axis Alignment layout.Alignment // contains filtered or unexported fields }
Grid lays out at most Num elements along the main axis. The number of cross axis elements depend on the total number of elements.
func (*Grid) Layout ¶
func (g *Grid) Layout(gtx layout.Context, num int, el GridElement) layout.Dimensions
type GridElement ¶
type GridElement func(gtx layout.Context, i int) layout.Dimensions
GridElement lays out the ith element of a Grid.
type GridWrap ¶
GridWrap lays out as many elements as possible along the main axis before wrapping to the cross axis.
func (GridWrap) Layout ¶
func (g GridWrap) Layout(gtx layout.Context, num int, el GridElement) layout.Dimensions
type Table ¶
type Table struct { // CellSize returns the size for the cell located at column x and row y. CellSize func(m unit.Metric, x, y int) image.Point // contains filtered or unexported fields }
Table lays out cells by their coordinates. All cells within a column have the same width, and the same height within a row.