Skip to main content

Class: GenericCursorInputSlot<T, P>

A generic implementation of CursorInputSlot whose behavior is largely defined though props.

Type parameters

NameType
TT
Pextends GenericCursorInputSlotProps<T> = GenericCursorInputSlotProps<T>

Hierarchy

  • DisplayComponent<P>

    GenericCursorInputSlot

Implements

Constructors

constructor

new GenericCursorInputSlot<T, P>(props): GenericCursorInputSlot<T, P>

Creates an instance of a DisplayComponent.

Type parameters

NameType
TT
Pextends GenericCursorInputSlotProps<T> = GenericCursorInputSlotProps<T>

Parameters

NameTypeDescription
propsPThe propertis of the component.

Returns

GenericCursorInputSlot<T, P>

Inherited from

DisplayComponent<P>.constructor

Defined in

src/sdk/components/FSComponent.ts:73

Properties

_characters

Protected Readonly _characters: MappedSubject<(null | string)[], readonly (null | string)[]>

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:277


_value

Protected Readonly _value: MappedSubscribable<T>

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:287


characterArray

Protected Readonly characterArray: Subject<null | string>[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:274


characterCount

Readonly characterCount: number

The number of characters contained in this slot.

Implementation of

CursorInputSlot.characterCount

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:267


characterCssClasses

Protected Readonly characterCssClasses: SetSubject<string>[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:272


characterRefs

Protected Readonly characterRefs: NodeReference<HTMLDivElement>[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:270


characterSetFuncs

Protected Readonly characterSetFuncs: (value: null | string) => void[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:275


characters

Readonly characters: Subscribable<readonly (null | string)[]>

The value of this slot's characters, in order.

Implementation of

CursorInputSlot.characters

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:279


charactersText

Protected Readonly charactersText: MappedSubscribable<string>[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:281


context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

DisplayComponent.context

Defined in

src/sdk/components/FSComponent.ts:64


contextType

Optional Readonly contextType: readonly [] = undefined

The type of context for this component, if any.

Inherited from

DisplayComponent.contextType

Defined in

src/sdk/components/FSComponent.ts:67


isCursorInputSlot

Readonly isCursorInputSlot: true

Flags this object as a CursorInputSlot.

Implementation of

CursorInputSlot.isCursorInputSlot

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:259


isEmpty

Protected Readonly isEmpty: MappedSubscribable<boolean>[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:282


props

props: P & ComponentProps

The properties of the component.

Inherited from

DisplayComponent.props

Defined in

src/sdk/components/FSComponent.ts:61


rootRef

Protected Readonly rootRef: NodeReference<HTMLDivElement>

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:269


selectionMode

Protected Readonly selectionMode: Subject<CursorInputCharSelectionMode>[]

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:283


setValueFunc

Protected Readonly setValueFunc: (value: T) => T

Type declaration

▸ (value): T

Parameters
NameType
valueT
Returns

T

Inherit Doc

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:291


value

Readonly value: Subscribable<T>

The current value of this slot.

Implementation of

CursorInputSlot.value

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:289


valueEqualsFunc

Protected Readonly valueEqualsFunc: (a: T, b: T) => boolean

Type declaration

▸ (a, b): boolean

Parameters
NameType
aT
bT
Returns

boolean

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:285

Accessors

allowBackfill

get allowBackfill(): boolean

Whether this slot supports backfill operations.

Returns

boolean

Implementation of

CursorInputSlot.allowBackfill

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:262

Methods

canSetChar

canSetChar(index, char, force?): boolean

Checks if one of this slot's characters can accept a value.

Parameters

NameTypeDefault valueDescription
indexnumberundefinedThe index of the character to query.
charnull | stringundefinedThe value to query.
forcebooleanfalseWhether the character should be forced to accept a value that would normally be invalid. Defaults to false.

Returns

boolean

Whether the character can accept the specified value.

Throws

RangeError if index is out of bounds.

Implementation of

CursorInputSlot.canSetChar

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:352


decrementValue

decrementValue(): boolean

Decrements this slot's value.

Returns

boolean

Whether the operation was accepted.

Implementation of

CursorInputSlot.decrementValue

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:338


destroy

destroy(): void

Returns

void

Inherit Doc

Overrides

DisplayComponent.destroy

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:486


getBottom

getBottom(): number

Gets the y coordinate, in pixels, of the bottom edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The y coordinate, in pixels, of the bottom edge of this slot's border box, relative to its nearest positioned ancestor.

Implementation of

CursorInputSlot.getBottom

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:395


getCharLeft

getCharLeft(index): number

Gets the x coordinate, in pixels, of the left edge of the border box of one of this slot's characters, relative to this slot's nearest positioned ancestor.

Parameters

NameTypeDescription
indexnumberThe index of the character to query.

Returns

number

The x coordinate, in pixels, of the left edge of the border box of one of the specified character, relative to this slot's nearest positioned ancestor.

Throws

RangeError if index is out of bounds.

Implementation of

CursorInputSlot.getCharLeft

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:411


getCharRight

getCharRight(index): number

Gets the x coordinate, in pixels, of the right edge of the border box of one of this slot's characters, relative to this slot's nearest positioned ancestor.

Parameters

NameTypeDescription
indexnumberThe index of the character to query.

Returns

number

The x coordinate, in pixels, of the right edge of the border box of one of the specified character, relative to this slot's nearest positioned ancestor.

Throws

RangeError if index is out of bounds.

Implementation of

CursorInputSlot.getCharRight

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:420


getCharWidth

getCharWidth(index): number

Gets the width, in pixels, of one of this slot's characters.

Parameters

NameTypeDescription
indexnumberThe index of the character to query.

Returns

number

The width, in pixels, of one of the specified character.

Throws

RangeError if index is out of bounds.

Implementation of

CursorInputSlot.getCharWidth

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:435


getContext

getContext(context): never

Gets a context data subscription from the context collection.

Parameters

NameTypeDescription
contextneverThe context to get the subscription for.

Returns

never

The requested context.

Throws

An error if no data for the specified context type could be found.

Inherited from

DisplayComponent.getContext

Defined in

src/sdk/components/FSComponent.ts:106


getHeight

getHeight(): number

Gets the height, in pixels, of this slot's border box.

Returns

number

The height, in pixels, of this slot's border box.

Implementation of

CursorInputSlot.getHeight

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:406


getLeft

getLeft(): number

Gets the x coordinate, in pixels, of the left edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The x coordinate, in pixels, of the left edge of this slot's border box, relative to its nearest positioned ancestor.

Implementation of

CursorInputSlot.getLeft

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:375


getRight

getRight(): number

Gets the x coordinate, in pixels, of the right edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The x coordinate, in pixels, of the right edge of this slot's border box, relative to its nearest positioned ancestor.

Implementation of

CursorInputSlot.getRight

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:380


getTop

getTop(): number

Gets the y coordinate, in pixels, of the top edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The y coordinate, in pixels, of the top edge of this slot's border box, relative to its nearest positioned ancestor.

Implementation of

CursorInputSlot.getTop

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:390


getWidth

getWidth(): number

Gets the width, in pixels, of this slot's border box.

Returns

number

The width, in pixels, of this slot's border box.

Implementation of

CursorInputSlot.getWidth

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:385


incrementValue

incrementValue(): boolean

Increments this slot's value.

Returns

boolean

Whether the operation was accepted.

Implementation of

CursorInputSlot.incrementValue

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:333


onAfterRender

onAfterRender(): void

Returns

void

Inherit Doc

Overrides

DisplayComponent.onAfterRender

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:296


onBeforeRender

onBeforeRender(): void

A callback that is called before the component is rendered.

Returns

void

Inherited from

DisplayComponent.onBeforeRender

Defined in

src/sdk/components/FSComponent.ts:80


populateCharsFromValue

populateCharsFromValue(): void

Populates all of this slot's characters with non-empty values, if possible, using this slot's current value as a template.

Returns

void

Implementation of

CursorInputSlot.populateCharsFromValue

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:370


refreshFromChars

refreshFromChars(): void

Recomputes this slot's value from its characters and re-renders all characters.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:446


render

render(): VNode

Returns

VNode

Inherit Doc

Overrides

DisplayComponent.render

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:453


setChar

setChar(index, char, force?): boolean

Sets the value of one of this slot's characters.

Parameters

NameTypeDefault valueDescription
indexnumberundefinedThe index of the character to set.
charnull | stringundefinedThe value to set.
forcebooleanfalseWhether to force the character to accept a value that would normally be invalid. Defaults to false.

Returns

boolean

Whether the operation was accepted.

Throws

RangeError if index is out of bounds.

Implementation of

CursorInputSlot.setChar

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:343


setCharSelected

setCharSelected(index, mode): void

Sets the selection mode for one of this slot's characters.

Parameters

NameTypeDescription
indexnumberThe index of the character for which to set a selection mode.
modeCursorInputCharSelectionModeA character selection mode.

Returns

void

Throws

RangeError if index is out of bounds.

Implementation of

CursorInputSlot.setCharSelected

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:361


setValue

setValue(value): T

Sets the value of this slot. The value of this slot after the operation is complete may be different from the requested value, depending on whether this slot can accurately represent the requested value.

Parameters

NameTypeDescription
valueTThe new value.

Returns

T

The value of this slot after the operation is complete.

Implementation of

CursorInputSlot.setValue

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInputSlot.tsx:327