Skip to main content

Interface: CursorInputSlot<T>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:16

A slot for a scrolling cursor input.

Type Parameters

Type Parameter
T

Properties

allowBackfill

readonly allowBackfill: boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:21

Whether this slot supports backfill operations.


characterCount

readonly characterCount: number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:24

The number of characters contained in this slot.


characters

readonly characters: Subscribable<readonly (null | string)[]>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:27

The value of this slot's characters, in order.


isCursorInputSlot

readonly isCursorInputSlot: true

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:18

Flags this object as a CursorInputSlot.


value

readonly value: Subscribable<T>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:30

The current value of this slot.

Methods

canSetChar()

canSetChar(index, char, force?): boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:71

Checks if one of this slot's characters can accept a value.

Parameters

ParameterTypeDescription
indexnumberThe index of the character to query.
charnull | stringThe value to query.
force?booleanWhether the character should be forced to accept a value that would normally be invalid. Defaults to false.

Returns

boolean

Whether the character can accept the specified value.

Throws

RangeError if index is out of bounds.


decrementValue()

decrementValue(): boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:50

Decrements this slot's value.

Returns

boolean

Whether the operation was accepted.


getBottom()

getBottom(): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:123

Gets the y coordinate, in pixels, of the bottom edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The y coordinate, in pixels, of the bottom edge of this slot's border box, relative to its nearest positioned ancestor.


getCharLeft()

getCharLeft(index): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:139

Gets the x coordinate, in pixels, of the left edge of the border box of one of this slot's characters, relative to this slot's nearest positioned ancestor.

Parameters

ParameterTypeDescription
indexnumberThe index of the character to query.

Returns

number

The x coordinate, in pixels, of the left edge of the border box of one of the specified character, relative to this slot's nearest positioned ancestor.

Throws

RangeError if index is out of bounds.


getCharRight()

getCharRight(index): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:149

Gets the x coordinate, in pixels, of the right edge of the border box of one of this slot's characters, relative to this slot's nearest positioned ancestor.

Parameters

ParameterTypeDescription
indexnumberThe index of the character to query.

Returns

number

The x coordinate, in pixels, of the right edge of the border box of one of the specified character, relative to this slot's nearest positioned ancestor.

Throws

RangeError if index is out of bounds.


getCharWidth()

getCharWidth(index): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:157

Gets the width, in pixels, of one of this slot's characters.

Parameters

ParameterTypeDescription
indexnumberThe index of the character to query.

Returns

number

The width, in pixels, of one of the specified character.

Throws

RangeError if index is out of bounds.


getHeight()

getHeight(): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:129

Gets the height, in pixels, of this slot's border box.

Returns

number

The height, in pixels, of this slot's border box.


getLeft()

getLeft(): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:93

Gets the x coordinate, in pixels, of the left edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The x coordinate, in pixels, of the left edge of this slot's border box, relative to its nearest positioned ancestor.


getRight()

getRight(): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:101

Gets the x coordinate, in pixels, of the right edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The x coordinate, in pixels, of the right edge of this slot's border box, relative to its nearest positioned ancestor.


getTop()

getTop(): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:115

Gets the y coordinate, in pixels, of the top edge of this slot's border box, relative to its nearest positioned ancestor.

Returns

number

The y coordinate, in pixels, of the top edge of this slot's border box, relative to its nearest positioned ancestor.


getWidth()

getWidth(): number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:107

Gets the width, in pixels, of this slot's border box.

Returns

number

The width, in pixels, of this slot's border box.


incrementValue()

incrementValue(): boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:44

Increments this slot's value.

Returns

boolean

Whether the operation was accepted.


populateCharsFromValue()

populateCharsFromValue(): void

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:85

Populates all of this slot's characters with non-empty values, if possible, using this slot's current value as a template.

Returns

void


setChar()

setChar(index, char, force?): boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:60

Sets the value of one of this slot's characters.

Parameters

ParameterTypeDescription
indexnumberThe index of the character to set.
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.

Throws

RangeError if index is out of bounds.


setCharSelected()

setCharSelected(index, mode): void

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:79

Sets the selection mode for one of this slot's characters.

Parameters

ParameterTypeDescription
indexnumberThe index of the character for which to set a selection mode.
modeCursorInputCharSelectionModeA character selection mode.

Returns

void

Throws

RangeError if index is out of bounds.


setValue()

setValue(value): T

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/CursorInput/CursorInputSlot.tsx:38

Sets the value of this slot. The value of this slot after the operation is complete may be different from the requested value, depending on whether this slot can accurately represent the requested value.

Parameters

ParameterTypeDescription
valueTThe new value.

Returns

T

The value of this slot after the operation is complete.