tkbind

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package tkbind holds the MVVM binding adapters that are specific to the pixel toolkit (github.com/go-widgets/toolkit) — the widgets whose value/callback shape the generic mvvm adapters can't express, such as a two-handle range slider (a multi-argument OnChange). It is the ONLY MVVM package that imports toolkit; the core mvvm package stays backend-free.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindRange

func BindRange(low, high *mvvm.Observable[float64], rs *toolkit.RangeSlider, invalidate func()) (unbind func())

BindRange two-way-binds a RangeSlider's Low/High to a pair of observables. The slider fires OnChange(low, high) on every drag — a shape the generic single-value BindField can't take — so this adapter fans it out to both observables and pushes each back to the matching field. Loop-free: the field writes are silent and Observable.Set skips equal values. Returns an unbind that restores the prior OnChange and detaches both subscriptions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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