Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	*widget.Clickable
	Label string
	Fg    color.NRGBA
	Bg    color.NRGBA
	Float Float
}

type C

type C = layout.Context

type Card

type Card struct {
	// Media    image.Image
	Title    string
	Subtitle string
	Body     layout.Widget
	Actions  []Action
}

Card implements "https://material.io/components/cards".

func (Card) Layout

func (c Card) Layout(gtx C, th *material.Theme) D

type D

type D = layout.Dimensions

type Float

type Float int
const (
	FloatLeft Float = iota
	FloatRight
)

type Panel

type Panel struct {
	Label        string
	Color        color.NRGBA
	Thickness    unit.Value
	CreateTicket widget.Clickable

	layout.List
}

Panel can hold cards. One panel per stage in the kanban pipeline. Has a title and action bar.

func (*Panel) Layout

func (p *Panel) Layout(gtx C, th *material.Theme, tickets ...layout.ListElement) D

type Rail

type Rail struct {
	layout.List
	Map state.Map
}

Rail is an interactive side rail with a list of widget items that can be selected.

Typically used as navigation or contextual actions.

Rail is stateful.

func (*Rail) Layout

func (r *Rail) Layout(gtx C, action layout.Widget, items ...RailChild) D

Layout the rail with the given items.

func (*Rail) Selected

func (r *Rail) Selected() (string, bool)

Selected reports which rail child was selected, if any. Reports the first click encountered.

type RailChild

type RailChild struct {
	Name string
	W    layout.Widget
}

RailChild is an item that renders in a rail.

func Destination

func Destination(name string, w layout.Widget) RailChild

Destination is a rail item that represents a navigatable object. Destinations are padded by default.