Versions in this module Expand all Collapse all v0 v0.9.0 Oct 31, 2021 Changes in this version + const PLATFORM — js/wasm type Constraints + func LooseHeight(height Length) Constraints + func LooseWidth(width Length) Constraints + func Unconstrained() Constraints + func (bc Constraints) String() string + type Control struct — js/wasm + Handle js.Value type Element + func MountNil() Element + type NativeElement interface — js/wasm v0.8.0 May 1, 2020 Changes in this version + const PLATFORM — darwin/amd64, linux/amd64, windows/amd64 + var DPI image.Point + func CloseElements(children []Element) + type Constraints struct + Max Size + Min Size + func Expand() Constraints + func ExpandHeight(width Length) Constraints + func ExpandWidth(height Length) Constraints + func Loose(size Size) Constraints + func Tight(size Size) Constraints + func TightHeight(height Length) Constraints + func TightWidth(width Length) Constraints + func (bc Constraints) Constrain(size Size) Size + func (bc Constraints) ConstrainAndAttemptToPreserveAspectRatio(size Size) Size + func (bc Constraints) ConstrainHeight(height Length) Length + func (bc Constraints) ConstrainWidth(width Length) Length + func (bc Constraints) HasBoundedHeight() bool + func (bc Constraints) HasBoundedWidth() bool + func (bc Constraints) HasTightHeight() bool + func (bc Constraints) HasTightWidth() bool + func (bc Constraints) Inset(width Length, height Length) Constraints + func (bc Constraints) IsBounded() bool + func (bc Constraints) IsNormalized() bool + func (bc Constraints) IsSatisfiedBy(size Size) bool + func (bc Constraints) IsTight() bool + func (bc Constraints) IsZero() bool + func (bc Constraints) Loosen() Constraints + func (bc Constraints) LoosenHeight() Constraints + func (bc Constraints) LoosenWidth() Constraints + func (bc Constraints) Tighten(size Size) Constraints + func (bc Constraints) TightenHeight(height Length) Constraints + func (bc Constraints) TightenWidth(width Length) Constraints + type Control struct — darwin/amd64, linux/amd64, windows/amd64 + HWnd win.HWND + Handle *cocoa.View + Handle uintptr + type Element interface + Close func() + Kind func() *Kind + Layout func(Constraints) Size + MinIntrinsicHeight func(width Length) Length + MinIntrinsicWidth func(height Length) Length + SetBounds func(bounds Rectangle) + UpdateProps func(data Widget) error + func DiffChild(parent Control, lhs Element, rhs Widget) (Element, error) + func DiffChildren(parent Control, lhs []Element, rhs []Widget) ([]Element, error) + func Mount(parent Control, widget Widget) (Element, error) + type Kind struct + func NewKind(name string) Kind + func (k Kind) String() string + type Length fixed.Int26_6 + const DIP + const Inch + const Inf + const PC + const PT + func FromPixelsX(pixels int) Length + func FromPixelsY(pixels int) Length + func (v Length) Clamp(min, max Length) Length + func (v Length) DIP() float64 + func (v Length) Inch() float64 + func (v Length) PC() float64 + func (v Length) PT() float64 + func (v Length) PixelsX() int + func (v Length) PixelsY() int + func (v Length) Scale(num, den int) Length + func (v Length) String() string + type NativeElement interface — darwin/amd64, linux/amd64, windows/amd64 + SetOrder func(previous win.HWND) win.HWND + type Point struct + X Length + Y Length + func (p Point) Add(q Point) Point + func (p Point) Pixels() image.Point + func (p Point) String() string + func (p Point) Sub(q Point) Point + type Rectangle struct + Max Point + Min Point + func Rect(x0, y0, x1, y1 Length) Rectangle + func (r Rectangle) Add(p Point) Rectangle + func (r Rectangle) Dx() Length + func (r Rectangle) Dy() Length + func (r Rectangle) Pixels() image.Rectangle + func (r Rectangle) Size() Point + func (r Rectangle) String() string + type Size struct + Height Length + Width Length + func FromPixels(x, y int) Size + func (s *Size) IsZero() bool + func (s *Size) String() string + type Widget interface + Kind func() *Kind + Mount func(parent Control) (Element, error)