Class: NumberInput
An input with a scrolling cursor which allows users to select a numeric value. The composite numeric value bound to the input is derived from the sum of the values of all child DigitInputSlots, multiplied by the product of the values of all child SignInputSlots.
Hierarchy
DisplayComponent
<NumberInputProps
>↳
NumberInput
Constructors
constructor
• new NumberInput(props
): NumberInput
Creates an instance of a DisplayComponent.
Parameters
Name | Type | Description |
---|---|---|
props | NumberInputProps | The propertis of the component. |
Returns
Inherited from
DisplayComponent<NumberInputProps>.constructor
Defined in
sdk/components/FSComponent.ts:73
Properties
context
• Optional
context: [] = undefined
The context on this component, if any.
Inherited from
DisplayComponent.context
Defined in
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
sdk/components/FSComponent.ts:67
props
• props: NumberInputProps
& ComponentProps
The properties of the component.
Inherited from
DisplayComponent.props
Defined in
sdk/components/FSComponent.ts:61
Accessors
cursorPosition
• get
cursorPosition(): Subscribable
<number
>
The index of the character position currently selected by this input's cursor.
Returns
Subscribable
<number
>
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:105
isEditingActive
• get
isEditingActive(): Subscribable
<boolean
>
Whether editing is active for this input.
Returns
Subscribable
<boolean
>
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:111
isSelectionPerSlot
• get
isSelectionPerSlot(): Subscribable
<boolean
>
Whether this input's cursor selection mode is per-slot.
Returns
Subscribable
<boolean
>
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:117
Methods
activateEditing
▸ activateEditing(isSelectionPerSlot
): void
Activates editing for this input.
Parameters
Name | Type | Description |
---|---|---|
isSelectionPerSlot | boolean | Whether cursor selection should be initialized to per-slot mode. If false , cursor selection will be initialized to per-character mode instead. |
Returns
void
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:186
backspace
▸ backspace(selectionPerSlot?
): void
Removes the character at the cursor's current position. If backfill is allowed, this will also shift all non-empty characters to the left of the cursor's current position one position to the right. If backfill is not allowed, this will shift the cursor one position to the left after the character is removed.
Parameters
Name | Type | Description |
---|---|---|
selectionPerSlot? | boolean | The selection per slot state to apply before carrying out the backspace operation. If not defined, the selection per slot state will remain unchanged from its current value. |
Returns
void
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:274
changeSlotValue
▸ changeSlotValue(direction
): void
Increments or decrements the value of the slot currently selected by the cursor. If editing is not active, it will be activated instead of changing any slot value. If cursor selection is in per-character mode, it will be forced to per-slot mode. If the cursor is past the last slot, this method does nothing.
Parameters
Name | Type | Description |
---|---|---|
direction | 1 | -1 | The direction in which to change the slot value (1 = increment, -1 = decrement). |
Returns
void
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:242
deactivateEditing
▸ deactivateEditing(): void
Deactivates editing for this input.
Returns
void
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:198
destroy
▸ destroy(): void
Returns
void
Inherit Doc
Overrides
DisplayComponent.destroy
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:338
getContext
▸ getContext(context
): never
Gets a context data subscription from the context collection.
Parameters
Name | Type | Description |
---|---|---|
context | never | The 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
sdk/components/FSComponent.ts:106
isInitialized
▸ isInitialized(): boolean
Checks whether this input is initialized.
Returns
boolean
Whether this input is initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:158
moveCursor
▸ moveCursor(direction
, forceSelectionPerSlot
): void
Moves the cursor.
Parameters
Name | Type | Description |
---|---|---|
direction | 1 | -1 | The direction in which to move (1 = to the right, -1 = to the left). |
forceSelectionPerSlot | boolean | Whether to force cursor selection to per slot mode. |
Returns
void
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:212
onAfterRender
▸ onAfterRender(thisNode
): void
Parameters
Name | Type |
---|---|
thisNode | VNode |
Returns
void
Inherit Doc
Overrides
DisplayComponent.onAfterRender
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:126
onBeforeRender
▸ onBeforeRender(): void
A callback that is called before the component is rendered.
Returns
void
Inherited from
DisplayComponent.onBeforeRender
Defined in
sdk/components/FSComponent.ts:80
placeCursor
▸ placeCursor(index
, forceSelectionPerSlot
): void
Places the cursor at a specific character position.
Parameters
Name | Type | Description |
---|---|---|
index | number | The index of the character position at which to place the cursor. |
forceSelectionPerSlot | boolean | Whether to force cursor selection to per slot mode. |
Returns
void
Throws
Error if this input is not initialized.
Throws
RangeError if index
does not point to a valid character position.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:227
populateCharsFromValue
▸ populateCharsFromValue(): void
Populates all of this input's character positions with non-empty values, if possible, using this input's value digitizer function and the current composite value as a template.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:286
refresh
▸ refresh(): void
Refreshes this input, updating the size and position of the cursor.
Returns
void
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:293
render
▸ render(): VNode
Returns
VNode
Inherit Doc
Overrides
DisplayComponent.render
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:318
setSlotCharacterValue
▸ setSlotCharacterValue(value
): void
Sets the value of the slot character currently selected by the cursor. If editing is not active, it will be activated before setting the value. If cursor selection is in per-slot mode, it will be forced to per-character mode, and the first character of the slot will be selected before setting the value. If the cursor is past the last slot, this method does nothing.
Parameters
Name | Type | Description |
---|---|---|
value | string | The value to set. |
Returns
void
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:258
setValue
▸ setValue(value
): number
Sets the composite value of this input. As part of the operation, all of this input's child slots will have their values set according to this input's value digitizer, and all slot characters will be set to non-null representations of their slot's value, if possible. The composite value of this input after the operation is complete may differ from the requested value depending on whether the requested value can be accurately represented by this input.
Parameters
Name | Type | Description |
---|---|---|
value | number | The new composite value. |
Returns
number
The composite value of this input after the operation is complete.
Throws
Error if this input is not initialized.
Defined in
workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Components/NumberInput/NumberInput.tsx:172