view

package
v0.0.0-...-b8644d8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Unlicense Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlackColor = color.NRGBA{A: 255}
View Source
var Theme = css.NewTheme(materialTheme, css.CSS{
	"boxed": boxingStyler,
	"spaced": insetter(layout.Inset{
		Top:    unit.Dp(5),
		Right:  unit.Dp(10),
		Bottom: unit.Dp(5),
		Left:   unit.Dp(10),
	}),
})

Functions

func Button

func Button() _Button

func Div

func Div() _Div

func Glue

func Glue(w, h int) layout.Widget

func HFill

func HFill() layout.Widget

func Hr

func Hr() layout.Widget

func P

func P() _P

func TextInput

func TextInput() _TextInput

func VFill

func VFill() layout.Widget

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

func DrawRect

func DrawRect(gtx C, background color.NRGBA, size f32.Point, radius float32) D

DrawRect creates a rectangle of the provided background color with Dimensions specified by size and a corner radius (on all corners) specified by radii.

type DOMLayout

type DOMLayout struct {
	// contains filtered or unexported fields
}

func NewDOM

func NewDOM() *DOMLayout

func (*DOMLayout) Body

func (dom *DOMLayout) Body() *DOMLayout

func (*DOMLayout) Content

func (dom *DOMLayout) Content(elements ...layout.Widget)

func (*DOMLayout) ForEvent

func (dom *DOMLayout) ForEvent(ev event.Event) *DOMLayout

func (*DOMLayout) Handle

func (dom *DOMLayout) Handle(targets ...components.EventTarget) *DOMLayout

type HeadingStyler

type HeadingStyler struct {
	css.Stylable
	// contains filtered or unexported fields
}

func H1

func H1() HeadingStyler

func H2

func H2() HeadingStyler

func H3

func H3() HeadingStyler

func Title

func Title() HeadingStyler

func (HeadingStyler) Class

func (h HeadingStyler) Class(cssClass string) HeadingStyler

func (HeadingStyler) Text

func (h HeadingStyler) Text(txt string) layout.Widget

type PanelStyle

type PanelStyle struct {
	css.Styles

	Alignment layout.Alignment
	Content   layout.Widget
	// contains filtered or unexported fields
}

func (*PanelStyle) Layout

func (p *PanelStyle) Layout(gtx C, w layout.Widget) D

func (PanelStyle) WithStyles

func (panelStyle PanelStyle) WithStyles(styles css.Styles) PanelStyle

func (PanelStyle) Wrap

func (panelStyle PanelStyle) Wrap(w layout.Widget) layout.Widget

type Rect

type Rect struct {
	Color  color.NRGBA
	Size   f32.Point
	Radius float32
}

Rect creates a rectangle of the provided background color with Dimensions specified by size and a corner radius (on all corners) specified by radii.

func (Rect) Layout

func (r Rect) Layout(gtx C) D

Layout renders the Rect into the provided context

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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