Skip to main content

Class: CharInputSlot

Defined in: workingtitle-instruments-g3000/html_ui/GTC/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: sdk/components/FSComponent.ts:73

Creates an instance of a DisplayComponent.

Parameters

ParameterTypeDescription
propsCharInputSlotPropsThe propertis of the component.

Returns

CharInputSlot

Inherited from

DisplayComponent<CharInputSlotProps>.constructor

Properties

context?

optional context: [] = undefined

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

The context on this component, if any.

Inherited from

DisplayComponent.context


contextType?

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from

DisplayComponent.contextType


props

props: CharInputSlotProps & ComponentProps

Defined in: sdk/components/FSComponent.ts:61

The properties of the component.

Inherited from

DisplayComponent.props

Accessors

value

Get Signature

get value(): Subscribable<string>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:74

The value bound to this slot.

Returns

Subscribable<string>

Methods

decrementValue()

decrementValue(): boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:123

Decrements this slot's value.

Returns

boolean

Whether the decrement operation was accepted.


destroy()

destroy(): void

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:258

Returns

void

Inherit Doc

Overrides

DisplayComponent.destroy


getContext()

protected getContext(context): never

Defined in: sdk/components/FSComponent.ts:106

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: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:115

Increments this slot's value.

Returns

boolean

Whether the increment operation was accepted.


onAfterRender()

onAfterRender(): void

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:83

Returns

void

Inherit Doc

Overrides

DisplayComponent.onAfterRender


onBeforeRender()

onBeforeRender(): void

Defined in: sdk/components/FSComponent.ts:80

A callback that is called before the component is rendered.

Returns

void

Inherited from

DisplayComponent.onBeforeRender


render()

render(): VNode

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:219

Returns

VNode

Inherit Doc

Overrides

DisplayComponent.render


setAllowEmptyValue()

setAllowEmptyValue(allow): void

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:96

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: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:133

Sets the value of this slot's character.

Parameters

ParameterTypeDescription
charnull | stringThe 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: workingtitle-instruments-g3000/html_ui/GTC/Components/CharInput/CharInputSlot.tsx:107

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.