goatw

package
v0.0.0-...-1e8f297 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axis

type Axis int
const (
	AxisVertical Axis = iota
	AxisHorizontal
)

type Background

type Background struct {
	Widget

	Child      Widget
	Background Color
}

func (Background) Layout

func (w Background) Layout(context LayoutContext) (Size, error)

func (Background) Paint

func (w Background) Paint(context PaintContext) error

type Button

type Button struct {
	Widget

	Label         string
	Padding       EdgeInserts
	OnActivate    func()
	KeyActivators []string
}

func (Button) Build

func (w Button) Build() (Widget, error)

type ButtonState

type ButtonState int
const (
	ButtonStateIdle ButtonState = iota
	ButtonStateHover
	ButtonStateActive
)

type Center

type Center struct {
	Widget

	Child        Widget
	WidthFactor  float64
	HeightFactor float64
}

func (Center) Layout

func (w Center) Layout(context LayoutContext) (Size, error)

func (Center) Paint

func (w Center) Paint(context PaintContext) error

type Column

type Column struct {
	Widget

	Children           []Widget
	MainAxisAlignment  MainAxisAlignment
	MainAxisShrinkWrap bool
	CrossAxisAlignment CrossAxisAlignment
}

func (Column) Build

func (w Column) Build() (Widget, error)

type CrossAxisAlignment

type CrossAxisAlignment int
const (
	CrossAxisAlignmentStart CrossAxisAlignment = iota
	CrossAxisAlignmentEnd
	CrossAxisAlignmentCenter
	CrossAxisAlignmentStretch
)

type Flex

type Flex struct {
	Widget

	Children           []Widget
	Direction          Axis
	MainAxisAlignment  MainAxisAlignment
	MainAxisShrinkWrap bool
	CrossAxisAlignment CrossAxisAlignment
}

func (Flex) Layout

func (w Flex) Layout(context LayoutContext) (Size, error)

func (Flex) Paint

func (w Flex) Paint(context PaintContext) error

type Image

type Image struct {
	Widget
	// contains filtered or unexported fields
}

func (Image) Layout

func (w Image) Layout(context LayoutContext) (Size, error)

func (Image) Paint

func (w Image) Paint(context PaintContext) error

type ImageNetwork

type ImageNetwork struct {
	Widget

	Url            string
	LoadingBuilder func() Widget
	ErrorBuilder   func(err error) Widget
}

func (ImageNetwork) Build

func (w ImageNetwork) Build() (Widget, error)

type MainAxisAlignment

type MainAxisAlignment int
const (
	MainAxisAlignmentStart MainAxisAlignment = iota
	MainAxisAlignmentEnd
	MainAxisAlignmentCenter
	MainAxisAlignmentSpaceBetween
	MainAxisAlignmentSpaceAround
	MainAxisAlignmentSpaceEvenly
)

type Padding

type Padding struct {
	Widget

	Child   Widget
	Padding EdgeInserts
}

func (Padding) Layout

func (w Padding) Layout(context LayoutContext) (Size, error)

func (Padding) Paint

func (w Padding) Paint(context PaintContext) error

type Row

type Row struct {
	Widget

	Children           []Widget
	MainAxisAlignment  MainAxisAlignment
	MainAxisShrinkWrap bool
	CrossAxisAlignment CrossAxisAlignment
}

func (Row) Build

func (w Row) Build() (Widget, error)

type SizedBox

type SizedBox struct {
	Widget

	Width  int
	Height int
}

func (SizedBox) Layout

func (w SizedBox) Layout(context LayoutContext) (Size, error)

func (SizedBox) Paint

func (w SizedBox) Paint(context PaintContext) error

type Text

type Text struct {
	Widget

	Text string
}

func (Text) Layout

func (w Text) Layout(context LayoutContext) (Size, error)

func (Text) Paint

func (w Text) Paint(context PaintContext) error

Jump to

Keyboard shortcuts

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