Skip to main content

Interface: GenericCursorInputSlotProps<T>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:163

Component props for GenericCursorInputSlot.

Extends​

  • ComponentProps

Type Parameters​

Type Parameter
T

Properties​

allowBackfill​

allowBackfill: boolean | Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:165

Whether the slot supports backfill operations.


canSetChar()​

canSetChar: (characters, index, charToSet, force) => boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:244

A function which checks if a slot character can accept a value.

Parameters​

ParameterType
charactersreadonly (null | string)[]
indexnumber
charToSetnull | string
forceboolean

Returns​

boolean


characterCount​

characterCount: number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:168

The number of characters contained in the slot.


children?​

optional children: DisplayChildren[]

Defined in: src/sdk/components/FSComponent.ts:122

The children of the display component.

Inherited from​

ComponentProps.children


class?​

optional class: string | ToggleableClassNameRecord | SubscribableSet<string>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:247

CSS class(es) to apply to the component's root element.


decrementValue()​

decrementValue: (value, setValue, characters, setCharacters) => boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:229

A function which decrements the slot value.

Parameters​

ParameterTypeDescription
valueTThe slot's current value.
setValue(value) => voidA function which sets the slot's value.
charactersreadonly (null | string)[]An array containing the slot's current character values. The order of the values is the same as the order of the characters in the slot (from left to right).
setCharactersreadonly (char) => void[]An array of functions which set the values of the slot's character values. The order of the functions is the same as order of their associated characters in the slot (from left to right).

Returns​

boolean

Whether the operation was accepted.


digitizeValue()​

digitizeValue: (value, setCharacters, characters) => void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:186

A function which assigns values to individual characters from a slot value.

Parameters​

ParameterTypeDescription
valueTA slot value.
setCharactersreadonly (char) => void[]An array of functions which set the values of the slot's character values. The order of the functions is the same as order of their associated characters in the slot (from left to right).
charactersreadonly (null | string)[]An array containing the slot's current character values. The order of the values is the same as the order of the characters in the slot (from left to right).

Returns​

void


incrementValue()​

incrementValue: (value, setValue, characters, setCharacters) => boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:212

A function which increments the slot value.

Parameters​

ParameterTypeDescription
valueTThe slot's current value.
setValue(value) => voidA function which sets the slot's value.
charactersreadonly (null | string)[]An array containing the slot's current character values. The order of the values is the same as the order of the characters in the slot (from left to right).
setCharactersreadonly (char) => void[]An array of functions which set the values of the slot's character values. The order of the functions is the same as order of their associated characters in the slot (from left to right).

Returns​

boolean

Whether the operation was accepted.


parseValue()​

parseValue: (characters) => T

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:176

A function which parses a slot value from individual character values.

Parameters​

ParameterTypeDescription
charactersreadonly (null | string)[]An array of character values. The order of the values is the same as the order of the characters in the slot (from left to right).

Returns​

T

The slot value parsed from the specified character values.


ref?​

optional ref: NodeReference<any>

Defined in: src/sdk/components/FSComponent.ts:125

A reference to the display component.

Inherited from​

ComponentProps.ref


renderChar()​

renderChar: (charToRender, index, characters) => string

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:200

A function which renders a character value into a string.

Parameters​

ParameterTypeDescription
charToRendernull | stringThe character to render.
indexnumberThe index of the character to render.
charactersreadonly (null | string)[]An array of the slot's character values.

Returns​

string


setChar()​

setChar: (characters, index, charToSet, force) => boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:239

A function which sets the value of a slot character, and returns whether the operation was accepted.

Parameters​

ParameterType
charactersreadonly MutableSubscribable<null | string, null | string>[]
indexnumber
charToSetnull | string
forceboolean

Returns​

boolean


valueEquals()?​

optional valueEquals: (a, b) => boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInputSlot.tsx:192

A function which checks if two slot values are equal. If not defined, equality is checked using the strict equality operator (===).

Parameters​

ParameterType
aT
bT

Returns​

boolean