colorpicker

package module
v0.0.0-...-39d6b91 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 9 Imported by: 0

README

fyne-colorpicker

Color picker component for Fyne

Usage

picker := colorpicker.NewColorPicker(200 /* height */, colorpicker.StyleCircle /* Style */)
picker.SetOnChanged(func(c color.Color) {
    // called when the color is changed on the picker
    fmt.Println(c)
})

// you can use it just like any other Fyne widget
fyne.NewContainer(picker)

Example

fyne-colorpicker/cmd/colorpicker/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorPicker

type ColorPicker interface {
	fyne.CanvasObject

	SetOnChanged(func(color.Color))
}

ColorPicker represents color picker component.

func NewColorPicker

func NewColorPicker(size int, style PickerStyle) ColorPicker

NewColorPicker returns color picker conrainer.

type PickerStyle

type PickerStyle int

PickerStyle represents how the picker is displayed.

const (
	// StyleDefault is style to display vertical hue bar.
	StyleDefault PickerStyle = iota
	// StyleCircle is style to display circle hue bar.
	StyleCircle
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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