style

package
v0.0.0-...-124f97e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlignStart        = Align(flex.AlignFlexStart)
	AlignCenter       = Align(flex.AlignCenter)
	AlignEnd          = Align(flex.AlignFlexEnd)
	AlignStretch      = Align(flex.AlignStretch)
	AlignSpaceAround  = Align(flex.AlignSpaceAround)
	AlignSpaceBetween = Align(flex.AlignSpaceBetween)
)
View Source
const (
	JustifyStart        = Justify(flex.JustifyFlexStart)
	JustifyCenter       = Justify(flex.JustifyCenter)
	JustifyEnd          = Justify(flex.JustifyFlexEnd)
	JustifySpaceAround  = Justify(flex.JustifySpaceAround)
	JustifySpaceBetween = Justify(flex.JustifySpaceBetween)
)

Variables

This section is empty.

Functions

func RGB

func RGB(r, g, b float32) color.T

func RGBA

func RGBA(r, g, b, a float32) color.T

Types

type Absolute

type Absolute struct {
	Left, Right PositionValueProp
	Top, Bottom PositionValueProp
}

func (Absolute) ApplyPosition

func (a Absolute) ApplyPosition(fw FlexWidget)

type Align

type Align flex.Align

func (Align) ApplyAlignContent

func (a Align) ApplyAlignContent(fw FlexWidget)

func (Align) ApplyAlignItems

func (a Align) ApplyAlignItems(fw FlexWidget)

type AlignContentProp

type AlignContentProp interface{ ApplyAlignContent(fw FlexWidget) }

type AlignItemsProp

type AlignItemsProp interface{ ApplyAlignItems(fw FlexWidget) }

type Auto

type Auto struct{}

func (Auto) ApplyHeight

func (a Auto) ApplyHeight(fw FlexWidget)

func (Auto) ApplyWidth

func (a Auto) ApplyWidth(fw FlexWidget)

type BasisProp

type BasisProp interface{ ApplyBasis(fw FlexWidget) }

type Border

type Border struct {
	Width Px
	Color ColorProp
}

func (Border) ApplyBorder

func (b Border) ApplyBorder(w BorderWidget)

type BorderProp

type BorderProp interface {
	ApplyBorder(BorderWidget)
}

type BorderWidget

type BorderWidget interface {
	FlexWidget
	SetBorderColor(color.T)
}

type ColorProp

type ColorProp interface {
	RGBA() icolor.RGBA
	Vec4() vec4.T
}

type Colorizable

type Colorizable interface {
	SetColor(color.T)
}

type Column

type Column struct{}

func (Column) ApplyFlexDirection

func (c Column) ApplyFlexDirection(fw FlexWidget)

type FlexDirectionProp

type FlexDirectionProp interface{ ApplyFlexDirection(fw FlexWidget) }

type FlexGrowProp

type FlexGrowProp interface{ ApplyFlexGrow(fw FlexWidget) }

type FlexShrinkProp

type FlexShrinkProp interface{ ApplyFlexShrink(fw FlexWidget) }

type FlexWidget

type FlexWidget interface {
	Flex() *flex.Node
}

type Font

type Font struct {
	Name string
	Size int
}

func (Font) ApplyFont

func (f Font) ApplyFont(fw FontWidget)

type FontColorProp

type FontColorProp interface{ ApplyFontColor(fw FontWidget) }

type FontProp

type FontProp interface{ ApplyFont(fw FontWidget) }

type FontWidget

type FontWidget interface {
	SetFont(Font)
	SetFontColor(color.T)
	SetLineHeight(float32)
}

type Grow

type Grow float32

func (Grow) ApplyFlexGrow

func (g Grow) ApplyFlexGrow(fw FlexWidget)

type HeightProp

type HeightProp interface{ ApplyHeight(fw FlexWidget) }

type Justify

type Justify flex.Justify

func (Justify) ApplyJustifyContent

func (j Justify) ApplyJustifyContent(fw FlexWidget)

type JustifyContentProp

type JustifyContentProp interface{ ApplyJustifyContent(fw FlexWidget) }

type LineHeightProp

type LineHeightProp interface{ ApplyLineHeight(fw FontWidget) }

type MarginProp

type MarginProp interface{ ApplyMargin(fw FlexWidget) }

type MaxHeightProp

type MaxHeightProp interface{ ApplyMaxHeight(fw FlexWidget) }

type MaxWidthProp

type MaxWidthProp interface{ ApplyMaxWidth(fw FlexWidget) }

type MinHeightProp

type MinHeightProp interface{ ApplyMinHeight(fw FlexWidget) }

type MinWidthProp

type MinWidthProp interface{ ApplyMinWidth(fw FlexWidget) }

type None

type None struct{}

None implements all Prop interfaces but does nothing It's a cool idea but is it worth setting it everywhere?

func (None) ApplyBasis

func (n None) ApplyBasis(fw FlexWidget)

func (None) ApplyHeight

func (n None) ApplyHeight(fw FlexWidget)

func (None) ApplyMargin

func (n None) ApplyMargin(fw FlexWidget)

func (None) ApplyMaxHeight

func (n None) ApplyMaxHeight(fw FlexWidget)

func (None) ApplyMaxWidth

func (n None) ApplyMaxWidth(fw FlexWidget)

func (None) ApplyPadding

func (n None) ApplyPadding(fw FlexWidget)

func (None) ApplyPosition

func (n None) ApplyPosition(fw FlexWidget, edge flex.Edge)

func (None) ApplyWidth

func (n None) ApplyWidth(fw FlexWidget)

type PaddingProp

type PaddingProp interface{ ApplyPadding(fw FlexWidget) }

type Pct

type Pct float32

Pct is a percentage value

func (Pct) ApplyBasis

func (p Pct) ApplyBasis(fw FlexWidget)

func (Pct) ApplyHeight

func (p Pct) ApplyHeight(fw FlexWidget)

func (Pct) ApplyLineHeight

func (p Pct) ApplyLineHeight(fw FontWidget)

func (Pct) ApplyMargin

func (p Pct) ApplyMargin(fw FlexWidget)

func (Pct) ApplyMaxHeight

func (p Pct) ApplyMaxHeight(fw FlexWidget)

func (Pct) ApplyMaxWidth

func (p Pct) ApplyMaxWidth(fw FlexWidget)

func (Pct) ApplyMinHeight

func (p Pct) ApplyMinHeight(fw FlexWidget)

func (Pct) ApplyMinWidth

func (p Pct) ApplyMinWidth(fw FlexWidget)

func (Pct) ApplyPadding

func (p Pct) ApplyPadding(fw FlexWidget)

func (Pct) ApplyPosition

func (p Pct) ApplyPosition(fw FlexWidget, edge flex.Edge)

func (Pct) ApplyWidth

func (p Pct) ApplyWidth(fw FlexWidget)

type PositionProp

type PositionProp interface{ ApplyPosition(fw FlexWidget) }

type PositionValueProp

type PositionValueProp interface {
	ApplyPosition(fw FlexWidget, edge flex.Edge)
}

type Px

type Px float32

Px is a pixel value

func (Px) ApplyBasis

func (p Px) ApplyBasis(fw FlexWidget)

func (Px) ApplyHeight

func (p Px) ApplyHeight(fw FlexWidget)

func (Px) ApplyMargin

func (p Px) ApplyMargin(fw FlexWidget)

func (Px) ApplyMaxHeight

func (p Px) ApplyMaxHeight(fw FlexWidget)

func (Px) ApplyMaxWidth

func (p Px) ApplyMaxWidth(fw FlexWidget)

func (Px) ApplyMinHeight

func (p Px) ApplyMinHeight(fw FlexWidget)

func (Px) ApplyMinWidth

func (p Px) ApplyMinWidth(fw FlexWidget)

func (Px) ApplyPadding

func (p Px) ApplyPadding(fw FlexWidget)

func (Px) ApplyPosition

func (p Px) ApplyPosition(fw FlexWidget, edge flex.Edge)

func (Px) ApplyRadius

func (p Px) ApplyRadius(w RadiusWidget)

func (Px) ApplyWidth

func (p Px) ApplyWidth(fw FlexWidget)

type RadiusProp

type RadiusProp interface {
	ApplyRadius(RadiusWidget)
}

type RadiusWidget

type RadiusWidget interface {
	SetRadius(px float32)
}

type Rect

type Rect struct {
	Left   float32
	Right  float32
	Top    float32
	Bottom float32
}

func RectAll

func RectAll(v float32) Rect

func RectX

func RectX(v float32) Rect

func RectXY

func RectXY(x, y float32) Rect

func RectY

func RectY(v float32) Rect

func (Rect) ApplyMargin

func (p Rect) ApplyMargin(fw FlexWidget)

func (Rect) ApplyPadding

func (p Rect) ApplyPadding(fw FlexWidget)

type Relative

type Relative struct{}

func (Relative) ApplyPosition

func (r Relative) ApplyPosition(fw FlexWidget)

type Row

type Row struct{}

func (Row) ApplyFlexDirection

func (r Row) ApplyFlexDirection(fw FlexWidget)

type Shrink

type Shrink float32

func (Shrink) ApplyFlexShrink

func (s Shrink) ApplyFlexShrink(fw FlexWidget)

type State

type State struct {
	Focused bool
	Hovered bool
	Pressed bool
}

type WidthProp

type WidthProp interface{ ApplyWidth(fw FlexWidget) }

Jump to

Keyboard shortcuts

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