Documentation
¶
Index ¶
- Constants
- Variables
- func ApplySizeDataToConstraints(constraints layout.Constraints, sizeData SizeData) layout.Constraints
- func CompareSize(a, b SizeData) bool
- func FillMax() ui.Modifier
- func FillMaxHeight() ui.Modifier
- func FillMaxWidth() ui.Modifier
- func GetSizeConstraintsAndSizeData(constraints layout.Constraints, sizeData SizeData) image.Point
- func Height(height int, options ...SizeOption) ui.Modifier
- func MaxHeight(maxHeight int) ui.Modifier
- func MaxWidth(maxWidth int) ui.Modifier
- func MinHeight(minHeight int) ui.Modifier
- func MinWidth(minWidth int) ui.Modifier
- func Size(width, height int, options ...SizeOption) ui.Modifier
- func Width(width int, options ...SizeOption) ui.Modifier
- func WrapContentHeight(align ...Alignment) ui.Modifier
- func WrapContentSize(align ...Alignment) ui.Modifier
- func WrapContentWidth(align ...Alignment) ui.Modifier
- type Alignment
- type BiasAlignment
- type ChainNode
- type DrawModifierNode
- type Element
- type InspectableModifier
- type LayoutContext
- type LayoutModifierNode
- type LayoutWidget
- type ModifierInspectorInfo
- type Node
- type PointerModifierNode
- type SizeData
- type SizeElement
- type SizeNode
- type SizeOption
- type SizeOptions
- type TreeNode
Constants ¶
View Source
const NotSet = -1
Variables ¶
View Source
var ( TopStart = BiasAlignment{-1, -1} TopCenter = BiasAlignment{0, -1} TopEnd = BiasAlignment{1, -1} CenterStart = BiasAlignment{-1, 0} Center = BiasAlignment{0, 0} CenterEnd = BiasAlignment{1, 0} BottomStart = BiasAlignment{-1, 1} BottomCenter = BiasAlignment{0, 1} BottomEnd = BiasAlignment{1, 1} )
View Source
var Clamp = helpers.Clamp
Functions ¶
func ApplySizeDataToConstraints ¶
func ApplySizeDataToConstraints(constraints layout.Constraints, sizeData SizeData) layout.Constraints
func CompareSize ¶
func FillMaxHeight ¶
func FillMaxWidth ¶
func GetSizeConstraintsAndSizeData ¶
func GetSizeConstraintsAndSizeData(constraints layout.Constraints, sizeData SizeData) image.Point
func WrapContentHeight ¶
func WrapContentSize ¶
func WrapContentWidth ¶
Types ¶
type Alignment ¶
type Alignment interface {
Align(size image.Point, space image.Point, layoutDirection layoutnode.LayoutDirection) image.Point
}
Alignment is an interface that calculates the position of a child inside a parent container.
type BiasAlignment ¶
BiasAlignment implements Alignment using a horizontal and vertical bias. bias is between -1 (start/top) and 1 (end/bottom).
func (BiasAlignment) Align ¶
func (b BiasAlignment) Align(size image.Point, space image.Point, _ layoutnode.LayoutDirection) image.Point
type ChainNode ¶
func NewSizeNode ¶
NewSizeNode creates a new size node
type DrawModifierNode ¶
type DrawModifierNode = layoutnode.DrawModifierNode
type InspectableModifier ¶
type InspectableModifier = modifier.InspectableModifier
type LayoutContext ¶
type LayoutContext = layoutnode.LayoutContext
type LayoutModifierNode ¶
type LayoutModifierNode = layoutnode.LayoutModifierNode
type LayoutWidget ¶
type LayoutWidget = layoutnode.LayoutWidget
type ModifierInspectorInfo ¶
type ModifierInspectorInfo = modifier.InspectorInfo
type PointerModifierNode ¶
type PointerModifierNode = layoutnode.PointerInputModifierNode
type SizeElement ¶
type SizeElement struct {
// contains filtered or unexported fields
}
func (SizeElement) Create ¶
func (be SizeElement) Create() Node
Create creates a new Chain Node instance
func (SizeElement) Equals ¶
func (se SizeElement) Equals(other Element) bool
Equals checks if this element is equivalent to another used during filter operations like Modifier.Any
func (SizeElement) Size ¶
func (se SizeElement) Size() SizeData
func (SizeElement) Update ¶
func (be SizeElement) Update(node Node)
Update updates an existing Chain node for efficiency
type SizeOption ¶
type SizeOption func(options *SizeOptions)
func SizeRequired ¶
func SizeRequired() SizeOption
type SizeOptions ¶
type SizeOptions struct {
Required bool
}
func DefaultSizeOptions ¶
func DefaultSizeOptions() SizeOptions
Click to show internal directories.
Click to hide internal directories.