rect

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultStyle = &Style{
	Padding: None{},
	Margin:  None{},
}

Functions

func Create

func Create(key string, props Props) widget.T

func New

func New(key string, props Props) node.T

Types

type Hover

type Hover struct {
	Color ColorProp
}

func (Hover) Apply

func (s Hover) Apply(w T)

type Pressed

type Pressed struct {
	Color ColorProp
}

func (Pressed) Apply

func (s Pressed) Apply(w T)

type Props

type Props struct {
	Style        Style
	OnMouseUp    mouse.Callback
	OnMouseDown  mouse.Callback
	OnMouseEnter mouse.Callback
	OnMouseExit  mouse.Callback
	OnMouseMove  mouse.Callback
	OnMouseDrag  mouse.Callback
	Children     []node.T
}

type Style

type Style struct {
	Extends *Style
	Hover   Hover
	Pressed Pressed

	ZOffset  int
	Hidden   bool
	Color    ColorProp
	Position PositionProp
	Border   BorderProp
	Radius   RadiusProp

	Width     WidthProp
	MinWidth  MinWidthProp
	MaxWidth  MaxWidthProp
	Height    HeightProp
	MinHeight MinHeightProp
	MaxHeight MaxHeightProp
	Padding   PaddingProp
	Margin    MarginProp

	Basis          BasisProp
	Grow           FlexGrowProp
	Shrink         FlexShrinkProp
	Layout         FlexDirectionProp
	AlignItems     AlignItemsProp
	AlignContent   AlignContentProp
	JustifyContent JustifyContentProp
}

func (*Style) Apply

func (style *Style) Apply(w T, state State)

func (*Style) Extend

func (s *Style) Extend(e Style) Style

Jump to

Keyboard shortcuts

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