Skip to main content

Class: GtcDialogs

Utility class for opening GTC dialogs.

Constructors

constructor

new GtcDialogs(): GtcDialogs

Returns

GtcDialogs

Methods

openDialogChain

openDialogChain<Steps>(gtcService, steps): Promise<GtcDialogChainResult<Steps>>

Opens a chain of dialogs. Each dialog in the chain is opened sequentially until the chain is cancelled or there are no more dialogs left to open. By default, if a user cancels any dialog request in the chain, the entire chain is cancelled. This behavior can be overridden by the definitions of the individual steps in the chain. Additionally, if the GTC's active view at the beginning of any step is different from the active view when the chain was started, the chain will be immediately cancelled.

Type parameters

NameType
Stepsextends readonly GtcDialogChainStep<any>[]

Parameters

NameTypeDescription
gtcServiceGtcServiceThe GTC service.
stepsStepsAn array of steps defining the actions to take with each dialog opened in the chain.

Returns

Promise<GtcDialogChainResult<Steps>>

A Promise which is fulfilled with the result of the chain when the chain is completed or cancelled.

Defined in

workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Dialog/GtcDialogs.tsx:120


openMessageDialog

openMessageDialog(gtcService, message, showRejectButton?, acceptButtonLabel?, rejectButtonLabel?): Promise<boolean>

Opens a message dialog.

Parameters

NameTypeDefault valueDescription
gtcServiceGtcServiceundefinedThe GtcService.
messagestring | VNodeundefinedThe message to display.
showRejectButtonbooleantrueWhether to show the reject button. Defaults to true.
acceptButtonLabelstring'OK'The label to display for the accept button. Defaults to 'OK'.
rejectButtonLabelstring'Cancel'The label to display for the reject button. Defaults to 'Cancel'.

Returns

Promise<boolean>

True if user hit the accept button, otherwise false.

Defined in

workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/GTC/Dialog/GtcDialogs.tsx:88