Documentation ¶
Index ¶
- type Bindable
- type BindableList
- type BindableStructValue
- type Binding
- type BindingWatcher
- type Context
- type ListBinding
- func (b ListBinding[T]) Get() []T
- func (b ListBinding[T]) GetAt(index int) (any, bool)
- func (b ListBinding) Name() string
- func (b *ListBinding[T]) Set(values []T)
- func (b ListBinding[T]) Size() int
- func (b ListBinding) Unwatch(watcher BindingWatcher)
- func (b ListBinding) Watch(watcher BindingWatcher)
- type SizeConstraint
- type SpacerSize
- type StructBinding
- type StructListBinding
- func (b StructListBinding[T]) Get() []T
- func (b StructListBinding[T]) GetAt(index int) (any, bool)
- func (b StructListBinding) Name() string
- func (b *StructListBinding[T]) Set(values []T)
- func (b StructListBinding[T]) Size() int
- func (b StructListBinding) Unwatch(watcher BindingWatcher)
- func (b StructListBinding) Watch(watcher BindingWatcher)
- type UIElement
- type View
- type ViewModel
- type Window
- type WindowSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bindable ¶
type Bindable interface { Name() string Watch(BindingWatcher) Unwatch(BindingWatcher) }
type BindableStructValue ¶
type BindableStructValue interface {
Less(BindableStructValue) bool
}
type Binding ¶
type Binding[T comparable] struct { // contains filtered or unexported fields }
func NewBinding ¶
func NewBinding[T comparable](name string, value T) *Binding[T]
func (Binding) Unwatch ¶
func (b Binding) Unwatch(watcher BindingWatcher)
func (Binding) Watch ¶
func (b Binding) Watch(watcher BindingWatcher)
type BindingWatcher ¶
type BindingWatcher interface {
BindingChanged(Bindable)
}
type ListBinding ¶
type ListBinding[T comparable] struct { // contains filtered or unexported fields }
func NewListBinding ¶
func NewListBinding[T comparable](name string, values []T) *ListBinding[T]
func (ListBinding[T]) Get ¶
func (b ListBinding[T]) Get() []T
func (*ListBinding[T]) Set ¶
func (b *ListBinding[T]) Set(values []T)
func (ListBinding[T]) Size ¶
func (b ListBinding[T]) Size() int
func (ListBinding) Unwatch ¶
func (b ListBinding) Unwatch(watcher BindingWatcher)
func (ListBinding) Watch ¶
func (b ListBinding) Watch(watcher BindingWatcher)
type SizeConstraint ¶
type SizeConstraint interface { unit.Dp | constraints.Float | constraints.Integer }
type SpacerSize ¶
type SpacerSize = sizeDP
func NewSpacerSize ¶
func NewSpacerSize[T SizeConstraint](w, h T) SpacerSize
NewSpacerSize creates a new SpacerSize struct with the given width and height.
Parameters: - w: the width of the spacer. - h: the height of the spacer.
Returns: - SpacerSize: a struct representing the spacer size with the given width and height.
type StructBinding ¶
type StructBinding[T BindableStructValue] struct { // contains filtered or unexported fields }
func NewStructBinding ¶
func NewStructBinding[T BindableStructValue](name string, value T) *StructBinding[T]
func (StructBinding[T]) Get ¶
func (b StructBinding[T]) Get() T
func (*StructBinding[T]) Set ¶
func (b *StructBinding[T]) Set(value T)
func (StructBinding) Unwatch ¶
func (b StructBinding) Unwatch(watcher BindingWatcher)
func (StructBinding) Watch ¶
func (b StructBinding) Watch(watcher BindingWatcher)
type StructListBinding ¶
type StructListBinding[T BindableStructValue] struct { // contains filtered or unexported fields }
func NewStructListBinding ¶
func NewStructListBinding[T BindableStructValue](name string, values []T) *StructListBinding[T]
func (StructListBinding[T]) Get ¶
func (b StructListBinding[T]) Get() []T
func (*StructListBinding[T]) Set ¶
func (b *StructListBinding[T]) Set(values []T)
func (StructListBinding[T]) Size ¶
func (b StructListBinding[T]) Size() int
func (StructListBinding) Unwatch ¶
func (b StructListBinding) Unwatch(watcher BindingWatcher)
func (StructListBinding) Watch ¶
func (b StructListBinding) Watch(watcher BindingWatcher)
type WindowSize ¶
type WindowSize = sizeDP
func NewWindowSize ¶
func NewWindowSize[T SizeConstraint](w, h T) WindowSize
NewWindowSize creates a new WindowSize struct with the given width and height.
Parameters: - w: the width of the window. - h: the height of the window.
Returns: - WindowSize: a struct representing the window size with the given width and height.
Click to show internal directories.
Click to hide internal directories.