Interface: GenericCursorInputSlotProps<T>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:163
Component props for GenericCursorInputSlot.
Extends
ComponentProps
Type Parameters
Type Parameter |
---|
T |
Properties
allowBackfill
allowBackfill:
boolean
|Subscribable
<boolean
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:165
Whether the slot supports backfill operations.
canSetChar()
canSetChar: (
characters
,index
,charToSet
,force
) =>boolean
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:244
A function which checks if a slot character can accept a value.
Parameters
Parameter | Type |
---|---|
characters | readonly (null | string )[] |
index | number |
charToSet | null | string |
force | boolean |
Returns
boolean
characterCount
characterCount:
number
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:168
The number of characters contained in the slot.
children?
optional
children:DisplayChildren
[]
Defined in: sdk/components/FSComponent.ts:122
The children of the display component.
Inherited from
ComponentProps.children
class?
optional
class:string
|ToggleableClassNameRecord
|SubscribableSet
<string
>
Defined in: workingtitle-instruments-g3000/html_ui/GTC/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: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:229
A function which decrements the slot value.
Parameters
Parameter | Type | Description |
---|---|---|
value | T | The slot's current value. |
setValue | (value ) => void | A function which sets the slot's value. |
characters | readonly (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). |
setCharacters | readonly (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: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:186
A function which assigns values to individual characters from a slot value.
Parameters
Parameter | Type | Description |
---|---|---|
value | T | A slot value. |
setCharacters | readonly (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). |
characters | readonly (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: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:212
A function which increments the slot value.
Parameters
Parameter | Type | Description |
---|---|---|
value | T | The slot's current value. |
setValue | (value ) => void | A function which sets the slot's value. |
characters | readonly (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). |
setCharacters | readonly (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: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:176
A function which parses a slot value from individual character values.
Parameters
Parameter | Type | Description |
---|---|---|
characters | readonly (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: sdk/components/FSComponent.ts:125
A reference to the display component.
Inherited from
ComponentProps.ref
renderChar()
renderChar: (
charToRender
,index
,characters
) =>string
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:200
A function which renders a character value into a string.
Parameters
Parameter | Type | Description |
---|---|---|
charToRender | null | string | The character to render. |
index | number | The index of the character to render. |
characters | readonly (null | string )[] | An array of the slot's character values. |
Returns
string
setChar()
setChar: (
characters
,index
,charToSet
,force
) =>boolean
Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:239
A function which sets the value of a slot character, and returns whether the operation was accepted.
Parameters
Parameter | Type |
---|---|
characters | readonly MutableSubscribable <null | string , null | string >[] |
index | number |
charToSet | null | string |
force | boolean |
Returns
boolean
valueEquals()?
optional
valueEquals: (a
,b
) =>boolean
Defined in: workingtitle-instruments-g3000/html_ui/GTC/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
Parameter | Type |
---|---|
a | T |
b | T |
Returns
boolean