values

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderUnifiedCheckboxCombo added in v0.4.0

func RenderUnifiedCheckboxCombo(readOnly, multiple bool, label string, unifier Unifier, changeHandler func(bool))

RenderUnifiedCheckboxCombo renders a control for a unified boolean value.

func RenderUnifiedCombo added in v0.4.0

func RenderUnifiedCombo(readOnly, multiple bool, label string, unifier Unifier,
	intConverter func(Unifier) int, formatter func(int) string, count int, changeHandler func(int))

RenderUnifiedCombo renders a control for a unified enumeration value.

func RenderUnifiedSliderInt added in v0.4.0

func RenderUnifiedSliderInt(readOnly, multiple bool, label string, unifier Unifier,
	intConverter func(Unifier) int, formatter func(int) string, min, max int, changeHandler func(int))

RenderUnifiedSliderInt renders a control for an unified integer value.

func StandardSimplifier added in v1.3.0

func StandardSimplifier(readOnly bool, multiple bool, fullKey string, unifier Unifier,
	updater func(func(uint32) uint32), objTypeRenderer ObjectTypeControlRenderer) *interpreters.Simplifier

StandardSimplifier returns a simplifier with common property controls.

Types

type ObjectTypeControlRenderer added in v1.3.0

type ObjectTypeControlRenderer struct {
	// Meta describes the layout of classes, subclasses, and types.
	Meta object.PropertiesTable
	// TextCache is used to retrieve the name of a type.
	TextCache *text.Cache
}

ObjectTypeControlRenderer renders a control to select an object.

func (ObjectTypeControlRenderer) Render added in v1.3.0

func (renderer ObjectTypeControlRenderer) Render(readOnly, multiple bool, label string,
	classUnifier Unifier, typeUnifier Unifier,
	tripleResolver func(Unifier) object.Triple,
	changeHandler func(object.Triple))

Render creates the controls according to the given parameters.

type Unifier

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

Unifier can be used to verify whether a list of values has equal entries.

func NewUnifier

func NewUnifier() Unifier

NewUnifier returns a new instance.

func UnifierFor added in v1.5.0

func UnifierFor(value interface{}) Unifier

UnifierFor returns a unifier for a single value.

func (*Unifier) Add

func (u *Unifier) Add(value interface{})

Add unifies the given value to the current state. The given value must be comparable.

func (Unifier) IsUnique

func (u Unifier) IsUnique() bool

IsUnique returns true if the unifier has received only equal values.

func (*Unifier) Unified

func (u *Unifier) Unified() interface{}

Unified returns the result of the unification. If all values that were added to the unifier were equal, then the first added value will be returned. Otherwise, nil will be returned.

Jump to

Keyboard shortcuts

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