Class InContainer<TValue>Abstract

An input control containing other controls.

Container is available as an aspect of itself and converted controls with the same value.

Type Parameters

  • TValue

    Input value type.

Hierarchy

Constructors

Properties

Controls of this input container.

it: TValue

Input value.

on: OnEvent<[TValue, TValue]>

OnEvent sender of value changes.

The [OnEvent__symbol] property is an alias of this one.

Returns

Value changes sender.

read: AfterEvent<[TValue]>

AfterEvent keeper of current value.

The [AfterEvent__symbol] property is an alias of this one.

Returns

Current value keeper.

Accessors

  • get supply(): Supply
  • This control's input supply.

    Releases all control resources when cut off.

    Each control has its own supply. An input supply of converted control depends on the input supply of control it is converted from.

    After this supply cut off the control should no longer be used.

    Returns Supply

Methods

  • Returns AfterEvent<[TValue]>

  • Returns OnEvent<[TValue, TValue]>

  • Updates the tracked value by the given value supplier.

    If the value is already updated by another supplier, then unbinds from the old one first.

    Call the byNone method to unbind the tracked value from the source.

    Note that explicitly updating the value would override the value received from the source.

    Parameters

    • supplier: EventSupplier<[TValue]>

      The source value sender or keeper.

    Returns InContainer<TValue>

    this instance.

  • Updates the tracked value by value suppliers extracted from events sent by the given supplier.

    If the value is already updated by another value supplier, then unbinds from the old one first.

    Call the byNone method to unbind the tracked value from the source.

    Note that explicitly updating the value would override the value received from the source.

    Type Parameters

    • TSrcEvent extends any[]

      Source event type.

    Parameters

    • supplier: EventSupplier<TSrcEvent>

      The event supplier to extract value suppliers from.

    • extract: ((this, ...event) => undefined | EventSupplier<[TValue]>)

      A function extracting value supplier from event received from supplier. May return undefined to suspend receiving values.

        • (this, ...event): undefined | EventSupplier<[TValue]>
        • Parameters

          • this: void
          • Rest ...event: TSrcEvent

          Returns undefined | EventSupplier<[TValue]>

    Returns InContainer<TValue>

    this instance.

  • Unbinds the tracked value from any value supplier this tracker is updated by.

    If the tracker is not bound then does nothing.

    Parameters

    • Optional reason: unknown

      Arbitrary reason of unbinding the value.

    Returns InContainer<TValue>

    this instance.

  • Performs additional setup of this control.

    Parameters

    • setup: ((this, control) => void)

      A function that accepts this control as its only parameter.

        • (this, control): void
        • Parameters

          Returns void

    Returns InContainer<TValue>

    this control instance.

  • Performs additional setup of this control's aspect.

    Type Parameters

    • TInstance

      Aspect instance type.

    • TKind extends keyof InAspect.Application.Map<unknown, unknown>

      Aspect application kind.

    Parameters

    • aspectKey: Key<TInstance, TKind>

      A key of aspect to set up.

    • setup: ((this, aspect, control) => void)

      A function that accepts an applied aspect instance and this control as parameters.

        • (this, aspect, control): void
        • Parameters

          Returns void

    Returns InContainer<TValue>

    this control instance.

Generated using TypeDoc