Skip to main content

Class: CharInputSlot

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:40

A cursor input slot which allows the user to select a single arbitrary character.

Extends​

Constructors​

Constructor​

new CharInputSlot(props): CharInputSlot

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsCharInputSlotPropsThe propertis of the component.

Returns​

CharInputSlot

Inherited from​

DisplayComponent.constructor

Properties​

context?​

optional context: [] = undefined

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

The context on this component, if any.

Inherited from​

DisplayComponent.context


contextType?​

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from​

DisplayComponent.contextType


props​

props: CharInputSlotProps & ComponentProps

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

The properties of the component.

Inherited from​

DisplayComponent.props

Accessors​

value​

Get Signature​

get value(): Subscribable<string>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:70

The value bound to this slot.

Returns​

Subscribable<string>

Methods​

decrementValue()​

decrementValue(): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:119

Decrements this slot's value.

Returns​

boolean

Whether the decrement operation was accepted.


destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:254

Destroys this component.

Returns​

void

Overrides​

DisplayComponent.destroy


getContext()​

protected getContext(context): never

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

Gets a context data subscription from the context collection.

Parameters​

ParameterTypeDescription
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


incrementValue()​

incrementValue(): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:111

Increments this slot's value.

Returns​

boolean

Whether the increment operation was accepted.


onAfterRender()​

onAfterRender(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:79

A callback that is called after the component is rendered.

Returns​

void

Overrides​

DisplayComponent.onAfterRender


onBeforeRender()​

onBeforeRender(): void

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

A callback that is called before the component is rendered.

Returns​

void

Inherited from​

DisplayComponent.onBeforeRender


render()​

render(): VNode

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:215

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

DisplayComponent.render


setAllowEmptyValue()​

setAllowEmptyValue(allow): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:92

Sets whether this slot should allow its value to be set to the empty string. Disallowing empty string values will not cause this slot's current value to change, even if the current value is the empty string.

Parameters​

ParameterTypeDescription
allowbooleanWhether this slot should allow its value to be set to the empty string.

Returns​

void


setChar()​

setChar(char, force?): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:129

Sets the value of this slot's character.

Parameters​

ParameterTypeDescription
charstring | nullThe value to set.
force?booleanWhether to force the character to accept a value that would normally be invalid. Defaults to false.

Returns​

boolean

Whether the operation was accepted.


setValue()​

setValue(value): string

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CharInput/CharInputSlot.tsx:103

Sets the value of this slot. As part of the operation, this slot's character will be set to a non-null representation of the new value, if possible. The value of this slot after the operation is complete may differ from the requested value depending on whether the requested value can be accurately represented by this slot.

Parameters​

ParameterTypeDescription
valuestringThe new value.

Returns​

string

The value of this slot after the operation is complete.