Skip to main content

Class: ScrollController

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

The ScrollController for UI Elements.

Constructors​

Constructor​

new ScrollController(): ScrollController

Returns​

ScrollController

Methods​

blur()​

blur(): void

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

Unfocus the focused control.

Returns​

void


getActivatedUiControl()​

getActivatedUiControl(): undefined | ScrollableControl

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

Method to get the UiControl highlighted by the control.

Returns​

undefined | ScrollableControl

the selected UiControl or undefine


getControlsCount()​

getControlsCount(): number

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

Gets controls count

Returns​

number

controls count


getFocusedUiControl()​

getFocusedUiControl(): undefined | ScrollableControl

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

Method to get the UiControl highlighted by the control.

Returns​

undefined | ScrollableControl

the selected UiControl or undefine


getIsScrollEnabled()​

getIsScrollEnabled(): boolean

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

Gets a value indicating if scrolling is enabled

Returns​

boolean

true if is scroll enabled


gotoFirst()​

gotoFirst(): boolean

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

Scrolls to the first suitable control.

Returns​

boolean

Whether the operation was successful.


gotoIndex()​

gotoIndex(index): boolean

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

Highlight the selected control on the page.

Parameters​

ParameterTypeDescription
indexnumberis the index to highlight.

Returns​

boolean

Whether the operation was successful.


gotoLast()​

gotoLast(): boolean

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

Highlight the last suitable control.

Returns​

boolean

Whether the operation was successful.


gotoNext()​

gotoNext(): boolean

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

Scroll forward.

Returns​

boolean

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


gotoPrev()​

gotoPrev(): boolean

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

Scroll backwards.

Returns​

boolean

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


onScroll()​

onScroll(ctrl): void

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

Callback to override when a scroll event happens.

Parameters​

ParameterTypeDescription
ctrlScrollableControlThe control now in focus.

Returns​

void


registerCtrl()​

registerCtrl(ctrl): void

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

Method to register a control.

Parameters​

ParameterTypeDescription
ctrlScrollableControlThe control to register.

Returns​

void


registerScrollContainer()​

registerScrollContainer(scrollContainer): void

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

Registers a scroll container with this controller.

Parameters​

ParameterTypeDescription
scrollContainerHTMLElementThe html block element to assign.

Returns​

void


resetCtrls()​

resetCtrls(): void

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

Method to reset this control.

Returns​

void


scrollTo()​

scrollTo(direction, activeIdx): boolean

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

Highlights the next focusable control in the direction.

Parameters​

ParameterTypeDescription
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.


toggleScrollEnabled()​

toggleScrollEnabled(): void

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

Toggles the scroll enabled state.

Returns​

void


unregisterCtrl()​

unregisterCtrl(ctrl): void

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

Method to unregister a control.

Parameters​

ParameterTypeDescription
ctrlScrollableControlThe control to unregister.

Returns​

void