Skip to main content

Class: ScrollController

The ScrollController for UI Elements.

Constructors

constructor

new ScrollController(): ScrollController

Returns

ScrollController

Methods

blur

blur(): void

Unfocus the focused control.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:152


getActivatedUiControl

getActivatedUiControl(): undefined | ScrollableControl

Method to get the UiControl highlighted by the control.

Returns

undefined | ScrollableControl

the selected UiControl or undefine

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:92


getControlsCount

getControlsCount(): number

Gets controls count

Returns

number

controls count

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:147


getFocusedUiControl

getFocusedUiControl(): undefined | ScrollableControl

Method to get the UiControl highlighted by the control.

Returns

undefined | ScrollableControl

the selected UiControl or undefine

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:84


getIsScrollEnabled

getIsScrollEnabled(): boolean

Gets a value indicating if scrolling is enabled

Returns

boolean

true if is scroll enabled

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:76


gotoFirst

gotoFirst(): boolean

Scrolls to the first suitable control.

Returns

boolean

Whether the operation was successful.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:100


gotoIndex

gotoIndex(index): boolean

Highlight the selected control on the page.

Parameters

NameTypeDescription
indexnumberis the index to highlight.

Returns

boolean

Whether the operation was successful.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:117


gotoLast

gotoLast(): boolean

Highlight the last suitable control.

Returns

boolean

Whether the operation was successful.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:108


gotoNext

gotoNext(): boolean

Scroll forward.

Returns

boolean

true if it was able to scroll into the given direction.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:131


gotoPrev

gotoPrev(): boolean

Scroll backwards.

Returns

boolean

true if it was able to scroll into the given direction.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:139


onScroll

onScroll(ctrl): void

Callback to override when a scroll event happens.

Parameters

NameTypeDescription
ctrlScrollableControlThe control now in focus.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:163


registerCtrl

registerCtrl(ctrl): void

Method to register a control.

Parameters

NameTypeDescription
ctrlScrollableControlThe control to register.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:17


registerScrollContainer

registerScrollContainer(scrollContainer): void

Registers a scroll container with this controller.

Parameters

NameTypeDescription
scrollContainerHTMLElementThe html block element to assign.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:25


resetCtrls

resetCtrls(): void

Method to reset this control.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:42


scrollTo

scrollTo(direction, activeIdx?): boolean

Highlights the next focusable control in the direction.

Parameters

NameTypeDescription
direction"next" | "prev"The direction to scroll to.
activeIdxnumberThe index to start the scroll from.

Returns

boolean

true if it was able to scroll into the given direction.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:176


toggleScrollEnabled

toggleScrollEnabled(): void

Toggles the scroll enabled state.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:49


unregisterCtrl

unregisterCtrl(ctrl): void

Method to unregister a control.

Parameters

NameTypeDescription
ctrlScrollableControlThe control to unregister.

Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/ScrollController.ts:37