Class: GtcDialogs
Utility class for opening GTC dialogs.
Constructors
constructor
• new GtcDialogs(): GtcDialogs
Returns
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
Name | Type |
---|---|
Steps | extends readonly GtcDialogChainStep <any >[] |
Parameters
Name | Type | Description |
---|---|---|
gtcService | GtcService | The GTC service. |
steps | Steps | An 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
Name | Type | Default value | Description |
---|---|---|---|
gtcService | GtcService | undefined | The GtcService. |
message | string | VNode | undefined | The message to display. |
showRejectButton | boolean | true | Whether to show the reject button. Defaults to true. |
acceptButtonLabel | string | 'OK' | The label to display for the accept button. Defaults to 'OK'. |
rejectButtonLabel | string | '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