tui

package
v0.0.0-...-4d7706c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tiny   = unit.Dp(2)
	Small  = unit.Dp(4)
	Medium = unit.Dp(6)
	Large  = unit.Dp(10)
)

Functions

This section is empty.

Types

type BoxStyle

type BoxStyle struct {
	Background color.NRGBA

	Gap Gap
}

func Box

func Box(col color.NRGBA) BoxStyle

func (BoxStyle) Layout

func (box BoxStyle) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions

type ButtonStyle

type ButtonStyle struct {
	Text         string
	Color        color.NRGBA
	Font         text.Font
	TextSize     unit.Sp
	Background   color.NRGBA
	CornerRadius unit.Dp
	Inset        layout.Inset
	Button       *widget.Clickable
	// contains filtered or unexported fields
}

func Button

func Button(th *material.Theme, button *widget.Clickable, txt string) ButtonStyle

func (ButtonStyle) Layout

func (b ButtonStyle) Layout(gtx layout.Context) layout.Dimensions

type ContentWidthStyle

type ContentWidthStyle struct {
	MaxWidth unit.Dp
}

func ContentWidth

func ContentWidth(th *material.Theme) ContentWidthStyle

func (ContentWidthStyle) Layout

func (maxWidth ContentWidthStyle) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions

type Duration

type Duration struct {
	Value time.Duration
	// contains filtered or unexported fields
}

func (*Duration) SetValue

func (dur *Duration) SetValue(value time.Duration)

type DurationEditorStyle

type DurationEditorStyle struct {
	Caption material.LabelStyle
	Value   *Duration
	Editor  material.EditorStyle

	Min time.Duration
	Max time.Duration
}

func DurationEditor

func DurationEditor(theme *material.Theme, value *Duration, caption string, min, max time.Duration) DurationEditorStyle

func (DurationEditorStyle) Layout

type Gap

type Gap = unit.Dp

type PanelStyle

type PanelStyle struct {
	Caption material.LabelStyle
}

func Panel

func Panel(th *material.Theme, caption string) PanelStyle

func (PanelStyle) Layout

func (p PanelStyle) Layout(gtx layout.Context, ws ...layout.Widget) layout.Dimensions

type Px

type Px struct {
	Value float32
	// contains filtered or unexported fields
}

func (*Px) SetValue

func (px *Px) SetValue(value float32)

type PxEditorStyle

type PxEditorStyle struct {
	Caption material.LabelStyle
	Value   *Px
	Editor  material.EditorStyle

	Min float32
	Max float32
}

func PxEditor

func PxEditor(theme *material.Theme, value *Px, caption string, min, max float32) PxEditorStyle

func (PxEditorStyle) Layout

func (edit PxEditorStyle) Layout(gtx layout.Context) layout.Dimensions

type RoundBoxStyle

type RoundBoxStyle struct {
	Background   color.NRGBA
	CornerRadius unit.Dp
	Padding      Gap
}

func RoundBox

func RoundBox(bg color.NRGBA) RoundBoxStyle

func (RoundBoxStyle) Layout

type SidePanelStyle

type SidePanelStyle struct {
	ContentWidth ContentWidthStyle
}

func SidePanel

func SidePanel(th *material.Theme) SidePanelStyle

func (SidePanelStyle) Layout

type Spin

type Spin struct {
	Axis  layout.Axis
	Delta float32
	// contains filtered or unexported fields
}

func (*Spin) Dragging

func (spin *Spin) Dragging() bool

func (*Spin) Layout

func (spin *Spin) Layout(gtx layout.Context) layout.Dimensions

type SpinnerStyle

type SpinnerStyle struct {
	Color  color.NRGBA
	Active color.NRGBA
	Spin   *Spin
}

func Spinner

func Spinner(col, active color.NRGBA, spin *Spin) SpinnerStyle

func (SpinnerStyle) Layout

func (spin SpinnerStyle) Layout(gtx layout.Context) layout.Dimensions

type StackStyle

type StackStyle struct {
	Gap Gap
}

func Stack

func Stack(gap Gap) StackStyle

func (StackStyle) Layout

func (stack StackStyle) Layout(gtx layout.Context, ws ...layout.Widget) layout.Dimensions

Jump to

Keyboard shortcuts

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