input()
This member function opens the input dialog panel. This loads the "dialog_subInput.pnl" into the dialog panel. The associated value is written to and from a connected variable.
Synopsis
int DialogFramework::input( anytype &value, const mapping &options)
Parameter
Parameter | Description |
---|---|
value | Displayed value and return value |
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: "" |
units |
A text that is displayed after the value (e.g.: the unit for the value) Default value: "" |
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_subInput.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: "apply" |
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: "cancel" |
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/dialogEdit.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: "SiemensNaturalBlueLight" |
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: "" |
enableAllButtons |
An option to enable all Buttons. If this is not applied, the "ok" button is disabled untill the value is changed from the start value. Default value: "False" |
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 input dialog panel, adjusted with the parameters given in the mapping. For this dialog panel, the default dialog sub panel contains an editable text field, whose changed value is saved in the "value" variable.
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