listmodels

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backward

func Backward(list gio.ListModeller) iter.Seq2[uint, *glib.Object]

func BindListBox

func BindListBox[T any](lb *gtk.ListBox, m gio.ListModeller, f func(T) gtk.Widgetter)

func Convert

func Convert[T any](obj *glib.Object) T

func Index

func Index[T any](m gio.ListModeller, f func(T) bool) (uint, bool)

func Objects

func Objects(list gio.ListModeller) iter.Seq2[uint, *glib.Object]

func StringsBackward

func StringsBackward(m *gtk.StringList) iter.Seq2[uint, string]

func Update

func Update[T comparable](m *gioutil.ListModel[T], s iter.Seq[T])

func UpdateStrings

func UpdateStrings(m *gtk.StringList, s iter.Seq[string])

func Values

func Values[T any](list gio.ListModeller) iter.Seq2[uint, T]

func ValuesBackward

func ValuesBackward[T any](list gio.ListModeller) iter.Seq2[uint, T]

Types

type Binding

type Binding[V any] struct {
	// contains filtered or unexported fields
}

func Bind

func Bind[T, V any](
	m gio.ListModeller,
	f func(T) V,
	remove func(uint, V),
	add func(uint, V),
) *Binding[V]

func (*Binding[V]) SignalHandle

func (b *Binding[V]) SignalHandle() glib.SignalHandle

func (*Binding[V]) Vals

func (b *Binding[V]) Vals() []V

Jump to

Keyboard shortcuts

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