flow

package
v0.0.0-...-955f326 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2020 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	// contains filtered or unexported fields
}

Flow holds the flow layout information.

func New

func New() *Flow

New creates a new Flow layout. This layout arranges the children of its target left-to-right, then top-to-bottom at their preferred sizes, if possible. Each child of the target may have an Alignment set for its LayoutData to control vertical positioning within the row. If not present, Start is assumed.

func (*Flow) Apply

func (f *Flow) Apply(target layout.Layoutable)

Apply the layout to the target. A copy is made of this layout and that is applied to the target, so this layout may be applied to other targets.

func (*Flow) HSpacing

func (f *Flow) HSpacing(hSpacing float64) *Flow

HSpacing sets the spacing between columns. Defaults to DefaultHSpacing.

func (*Flow) Layout

func (f *Flow) Layout()

Layout implements Layout.

func (*Flow) Sizes

func (f *Flow) Sizes(hint geom.Size) (min, pref, max geom.Size)

Sizes implements Layout.

func (*Flow) VSpacing

func (f *Flow) VSpacing(vSpacing float64) *Flow

VSpacing sets the spacing between rows. Defaults to DefaultVSpacing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL