Class InFocusAbstract

Input focus aspect.

This is a value tracker of element focus flag. Or null when InElement aspect is absent.

Hierarchy

  • ValueTracker<boolean>
    • InFocus

Constructors

  • Returns InFocus

Properties

it: boolean

The tracked value.

on: OnEvent<[boolean, boolean]>

OnEvent sender of value changes.

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

Returns

Value changes sender.

read: AfterEvent<[boolean]>

AfterEvent keeper of current value.

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

Returns

Current value keeper.

supply: Supply

An event supply of this value tracker.

Accessors

Methods

  • Returns AfterEvent<[boolean]>

  • Returns OnEvent<[boolean, boolean]>

  • 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<[boolean]>

      The source value sender or keeper.

    Returns InFocus

    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<[boolean]>)

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

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

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

          Returns undefined | EventSupplier<[boolean]>

    Returns InFocus

    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 InFocus

    this instance.

Generated using TypeDoc