widget

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Range

type Range struct {
	Values []float32
	// contains filtered or unexported fields
}

Range is for selecting a range.

func (*Range) Changed

func (f *Range) Changed() (changed bool)

Changed returns whether any of min/max values were changed since the last method invocation.

func (*Range) Layout

func (f *Range) Layout(gtx layout.Context, thumbRadius, fingerSize int, min, max float32) layout.Dimensions

Layout updates the range accordingly to gestures.

type SliderStyle

type SliderStyle struct {
	Shaper text.Shaper
	Font   text.Font

	ThumbRadius unit.Value
	TrackWidth  unit.Value
	FingerSize  unit.Value

	TrackColor func(int) color.NRGBA
	ThumbColor func(int) color.NRGBA

	Min, Max float32

	Range *Range
}

SliderStyle is a multi-slider widget.

func (SliderStyle) Layout

func (ss SliderStyle) Layout(gtx layout.Context) layout.Dimensions

Jump to

Keyboard shortcuts

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