Documentation ¶
Index ¶
- type Data
- func (f *Data) Apply(target layout.Layoutable)
- func (f *Data) HAlign(hAlign align.Alignment) *Data
- func (f *Data) HGrab(hGrab bool) *Data
- func (f *Data) HSpan(hSpan int) *Data
- func (f *Data) MinSize(minSize geom.Size) *Data
- func (f *Data) SizeHint(sizeHint geom.Size) *Data
- func (f *Data) VAlign(vAlign align.Alignment) *Data
- func (f *Data) VGrab(vGrab bool) *Data
- func (f *Data) VSpan(vSpan int) *Data
- type Flex
- func (f *Flex) Apply(target layout.Layoutable)
- func (f *Flex) Columns(columns int) *Flex
- func (f *Flex) EqualColumns(equalColumns bool) *Flex
- func (f *Flex) HAlign(hAlign align.Alignment) *Flex
- func (f *Flex) HSpacing(hSpacing float64) *Flex
- func (f *Flex) Layout()
- func (f *Flex) Sizes(hint geom.Size) (min, pref, max geom.Size)
- func (f *Flex) VAlign(vAlign align.Alignment) *Flex
- func (f *Flex) VSpacing(vSpacing float64) *Flex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data is used to control how an object is laid out by the Flex layout.
func (*Data) Apply ¶
func (f *Data) Apply(target layout.Layoutable)
Apply the layout data to the target. A copy is made of this data and that is applied to the target, so this data may be applied to other targets.
func (*Data) HAlign ¶
HAlign sets the horizontal alignment of the target within its available space. Defaults to Start.
func (*Data) HGrab ¶
HGrab sets whether excess horizontal space should be grabbed. Defaults to false.
func (*Data) MinSize ¶
MinSize overrides the minimum size of the target. Defaults to no override (0, 0).
func (*Data) SizeHint ¶
SizeHint sets a hint requesting a particular size for the target. Defaults to no hint (0, 0).
func (*Data) VAlign ¶
VAlign sets the vertical alignment of the target within its available space. Defaults to Middle.
type Flex ¶
type Flex struct {
// contains filtered or unexported fields
}
Flex lays out the children of its Layoutable based on the Data assigned to each child.
func (*Flex) Apply ¶
func (f *Flex) 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 (*Flex) EqualColumns ¶
EqualColumns sets whether each column should use the same amount of horizontal space. Defaults to false.
func (*Flex) HAlign ¶
HAlign sets the horizontal alignment of the target within its available space. Defaults to Start.