Documentation
¶
Index ¶
Constants ¶
View Source
const ( AlignNoneV = 0 AlignLeftV = 1 AlignRightV = 2 AlignHCenterV = 3 AlignTopV = 4 AlignBottomV = 5 AlignVCenterV = 6 AlignCenterV = 7 )
Alignment constants for VStack/HStack
Variables ¶
This section is empty.
Functions ¶
func HasAnchorsOnChild ¶
func HasAnchorsOnChild(child interface{}) bool
func HasAnyAnchor ¶
Types ¶
type AlignItems ¶
type AlignItems string
const ( AlignStretch AlignItems = "stretch" AlignStart AlignItems = "start" AlignCenter AlignItems = "center" AlignEnd AlignItems = "end" )
type AnchorLayout ¶
type AnchorLayout struct{}
func NewAnchorLayout ¶
func NewAnchorLayout() *AnchorLayout
func (*AnchorLayout) Layout ¶
func (a *AnchorLayout) Layout(target interface{}, rect graphics.Rect)
func (*AnchorLayout) PreferredDimensions ¶
func (a *AnchorLayout) PreferredDimensions(target interface{}, w, h float32) (float32, float32)
type AnchorLine ¶
type AnchorLine struct {
Target Widget
Line AnchorLineType
}
type AnchorLineType ¶
type AnchorLineType int
const ( AnchorTop AnchorLineType = iota AnchorBottom AnchorLeft AnchorRight AnchorHCenter AnchorVCenter AnchorBaseline )
type Anchors ¶
type Anchors struct {
Left, Right, Top, Bottom *AnchorLine
HorizontalCenter, VerticalCenter *AnchorLine
Fill, CenterIn Widget
Margins float32
LeftMargin, RightMargin float32
TopMargin, BottomMargin float32
HCenterOffset, VCenterOffset float32
// Internal: parent object for QML-compliant resolution
ParentObj interface{} // *qml.Object, stored as interface{} to avoid import cycle
// Resolver function to get Widget from ParentObj (set by qml package)
ResolveParentWidget func(obj interface{}) Widget
}
func NewAnchors ¶
func NewAnchors() *Anchors
type Flex ¶
type Flex struct {
Direction FlexDirection
Justify JustifyContent
Align AlignItems
Spacing float32
Wrap bool
// contains filtered or unexported fields
}
type FlexDirection ¶
type FlexDirection string
const ( FlexRow FlexDirection = "row" FlexColumn FlexDirection = "column" )
type JustifyContent ¶
type JustifyContent string
const ( JustifyStart JustifyContent = "start" JustifyCenter JustifyContent = "center" JustifyEnd JustifyContent = "end" JustifySpaceBetween JustifyContent = "space-between" JustifySpaceAround JustifyContent = "space-around" )
type LayoutProps ¶
type LayoutProps struct {
FillWidth bool
FillHeight bool
PreferredWidth float32
PreferredHeight float32
MinimumWidth float32
MaximumWidth float32
MinimumHeight float32
MaximumHeight float32
LeftMargin float32
RightMargin float32
TopMargin float32
BottomMargin float32
Alignment int
}
func NewLayoutProps ¶
func NewLayoutProps() *LayoutProps
Click to show internal directories.
Click to hide internal directories.