question()

This member function is a variation of the general() function and opens the question dialog panel. The differing default parameters produce a dialog panel to answer a question by selecting a specific button.

Synopsis

int DialogFramework::general( const mapping &options)

Parameter

Parameter Description
options: A mapping with the dialog properties. The following keys are supported:
text A text, which will be displayed in the dialog.
title

A text, which will be displayed as dialog header. There will be no title if NULL or an empty string is given.

Default value: "Question"

refFile

File name of the dialog sub panel. This is the relative path to the panel reference from the "panels" folder.

Default value: "objects/dialogFramework/dialog_subText.pnl"

buttonTextOk

A message catalogue key of general.cat or string used on the 1 (OK) button text. When NULL or an empty string is given, the button will be invisible.

Default value: "yes"

buttonTextNOk

A message catalogue key of general.cat or string used on the 0 (cancel) button text. When NULL or an empty string is given, the button will be invisible.

Default value: "no"

icon

A file name of an icon which will be shown in the dialog header. When NULL or an empty string is given, no icon will be shown. This is the relative path to the icon from the "pictures" folder.

Default value: "dialogFramework/dialogQuestion.svg"

titleColor

The color of the dialog header background. When NULL or an empty string is given, the title will have the default background color.

Default value: "SiemensNaturalYellowLight"

helpLink

The help page, which will be opened by pressing on the "Help" button. When NULL or an empty string is given, no help button is shown. This parameter is a file name. ( e.g.: "helpNote.txt" for the file <project_path>/help/<lang>/helpNote.txt).

Default value: ""

dollars An additional dyn_string of dollar parameters, which will be passed to the dialog sub panel.

Return Value

Returns the value associated with the selected button. This can be 0 when the "cancel" button is clicked, or 1 if the "ok" button is clicked.

Error

-

Description

This function opens the question dialog panel, adjusted with the parameters given in the mapping. For this dialog panel, the default dialog sub panel contains only a field to display text. The default setting adds both the "OK" and the "cancel" buttons. The return value shows which button was clicked.

The parameters inside the mapping can be used to include local panels, icons, colors or catalog texts as parts of the dialog panel.

Example

A detailed example can be found with the "dialogFramework.pnl" in the GEDI.

Assignment

Generic Dialog Framework

Availability

UI, CTRL