Skip to main content

Class: ChecklistPaneStateManager

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:20

A manager for the state of a checklist pane view. The manager tracks the view's selected checklist group, checklist, and checklist item and publishes the information to the event bus topics defined in ChecklistPaneStateEvents. The view's selections can be changed through the manager using either the event bus topics defined in ChecklistPaneStateControlEvents or the methods defined on the manager itself.

Constructors

Constructor

new ChecklistPaneStateManager(displayPaneIndex, bus, checklistStateProvider): ChecklistPaneStateManager

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:55

Creates a new instance of ChecklistPaneStateManager.

Parameters

ParameterTypeDescription
displayPaneIndexDisplayPaneIndexThe index of the parent display pane of the manager's view.
busEventBusThe event bus.
checklistStateProviderG3000ChecklistStateProviderA provider of checklist state.

Returns

ChecklistPaneStateManager

Properties

selectedBranch

readonly selectedBranch: Subscribable<null | ChecklistBranch<GarminChecklistItemTypeDefMap, unknown>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:41


selectedBranchIndex

readonly selectedBranchIndex: MappedSubscribable<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:38


selectedBranchStack

readonly selectedBranchStack: Subscribable<readonly Readonly<ChecklistPaneStateBranchStackEntry>[]>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:36


selectedGroup

readonly selectedGroup: Subscribable<null | ChecklistGroup<GarminChecklistItemTypeDefMap, unknown, unknown, unknown>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:27


selectedGroupIndex

readonly selectedGroupIndex: Subscribable<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:24


selectedItem

readonly selectedItem: Subscribable<null | SelectableChecklistItemDef>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:47


selectedItemIndex

readonly selectedItemIndex: Subscribable<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:44


selectedList

readonly selectedList: Subscribable<null | ChecklistList<GarminChecklistItemTypeDefMap, unknown, unknown>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:33


selectedListIndex

readonly selectedListIndex: Subscribable<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:30

Methods

deselect()

deselect(item, branch, list, group): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:73

Deselects zero or more selections tracked by this manager.

Parameters

ParameterTypeDefault valueDescription
itembooleanundefinedWhether to deselect the currently selected checklist item.
branchbooleanfalseWhether to deselect the currently selected checklist branch. Defaults to false.
listbooleanfalseWhether to deselect the currently selected checklist. Defaults to false.
groupbooleanfalseWhether to deselect the currently selected checklist group. Defaults to false.

Returns

void


prevBranch()

prevBranch(): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:226

Returns to the previous branch in the selected checklist branch stack. This method does nothing if there is no currently selected checklist or if the base checklist is selected.

Returns

void


selectBranch()

selectBranch(branchIndex, returnItemIndex?, itemIndex?): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:184

Selects a checklist branch in the currently selected checklist. This method does nothing if there is no currently selected checklist.

Parameters

ParameterTypeDescription
branchIndexnumberThe index of the checklist branch to select, or -1 to select the base checklist. If the base checklist is selected, then all entries in the selected checklist branch stack will be popped.
returnItemIndex?numberThe index of the checklist item to select when returning from the branch to select to the previously selected branch or base checklist. Ignored if the base checklist is selected.
itemIndex?numberThe index of the checklist item to select after the checklist branch is selected. If not defined, then the first selectable item in the branch will be selected, if one exists.

Returns

void


selectFirstItem()

selectFirstItem(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:304

Selects the first selectable checklist item in the currently selected checklist branch. This method does nothing if there is no currently selected checklist or if there are no selectable items in the currently selected branch.

Returns

boolean

Whether a checklist item was successfully selected.


selectGroup()

selectGroup(groupIndex, listIndex?, branchIndex?, returnItemIndex?, itemIndex?): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:119

Selects a checklist group.

Parameters

ParameterTypeDescription
groupIndexnumberThe index of the group to select.
listIndex?numberThe index of the checklist to select after the group is selected. If not defined, then the first checklist in the group will be selected, if one exists. Ignored if a group is not selected.
branchIndex?numberThe index of the checklist branch to select, or -1 to select the base checklist.
returnItemIndex?numberThe index of the checklist item to select when returning from the branch to select to the previously selected branch or base checklist. Ignored if no checklist or the base checklist is selected.
itemIndex?numberThe index of the checklist item to select after the group's checklist is selected. If not defined, then the first selectable item in the checklist will be selected, if one exists. Ignored if a checklist is not selected.

Returns

void


selectItem()

selectItem(itemIndex): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:267

Selects an item in the currently selected checklist. This method does nothing if there is no currently selected checklist.

Parameters

ParameterTypeDescription
itemIndexnumberThe index of the item to select. If the item at the specified index is not selectable, then the current item selection will be retained.

Returns

void


selectList()

selectList(listIndex, branchIndex, returnItemIndex?, itemIndex?): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:149

Selects a checklist in the currently selected group. This method does nothing if there is no currently selected group.

Parameters

ParameterTypeDescription
listIndexnumberThe index of the checklist to select.
branchIndexnumberThe index of the checklist branch to select, or -1 to select the base checklist.
returnItemIndex?numberThe index of the checklist item to select when returning from the branch to select to the previously selected branch or base checklist. Ignored if no checklist or the base checklist is selected.
itemIndex?numberThe index of the checklist item to select after the checklist is selected. If not defined, then the first selectable item in the checklist will be selected, if one exists. Ignored if a checklist is not selected.

Returns

void


selectNextGroup()

selectNextGroup(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:451

Selects the next checklist group. If there is no currently selected group, then the first group will be selected. This method does nothing if there are no groups after the currently selected group.

Returns

boolean

Whether a new checklist group was successfully selected.


selectNextItem()

selectNextItem(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:335

Selects the next selectable checklist item in the currently selected checklist branch. If there is no currently selected item, then the first selectable item in the branch will be selected. This method does nothing if there is no currently selected checklist or if there are no selectable items after the currently selected item.

Returns

boolean

Whether a new checklist item was successfully selected.


selectNextList()

selectNextList(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:405

Selects the next checklist in the currently selected checklist group. If there is no currently selected checklist, then the first checklist in the group will be selected. This method does nothing if there is no currently selected group or if there are no checklists after the currently selected checklist.

Returns

boolean

Whether a new checklist was successfully selected.


selectPrevGroup()

selectPrevGroup(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:467

Selects the previous checklist group. If there is no currently selected group, then the last group will be selected. This method does nothing if there are no groups before the currently selected group.

Returns

boolean

Whether a new checklist group was successfully selected.


selectPrevItem()

selectPrevItem(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:370

Selects the previous selectable checklist item in the currently selected checklist branch. If there is no currently selected item, then the last selectable item in the branch will be selected. This method does nothing if there is no currently selected checklist or if there are no selectable items before the currently selected item.

Returns

boolean

Whether a new checklist item was successfully selected.


selectPrevList()

selectPrevList(): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/ChecklistPane/ChecklistPaneStateManager.ts:428

Selects the previous checklist in the currently selected checklist group. If there is no currently selected checklist, then the last checklist in the group will be selected. This method does nothing if there is no currently selected group or if there are no checklists before the currently selected checklist.

Returns

boolean

Whether a new checklist was successfully selected.