14.5 Dialogs & GUI commands
These commands are available for VEGA ZZ only.
COLORIDDLG (CHAR)Title
Show the predefined color dialog and return the VEGA color name.
Parameters: | ||
Title | The title of the dialog box. |
Return values:
The return value is the VEGA color name (see COLOR for the color
names). If the dialog aborts, NONE string is returned.
Example:
COLORIDDLG "Pick a color:"
See also:
COLOR,
COLORRGBDLG,
OPENDLG,
SAVEDLG,
mColorSel.
COLORRGBDLG
Show the RGB color table and return the selected color in RGB format.
Parameters:
None.
Return values:
If the dialog is closed without the color selection, it returns -1, otherwise it returns
the selected color in RGB format.
Example:
COLORRGBDLG
See also:
COLOR,
COLORIDDLG,
OPENDLG,
SAVEDLG,
mColorSel.
DIRDLG (CHAR)Message (CHAR)Path
Show the directory dialog box.
Parameters: | ||
Message | Message text shown in the main body of the dialog box. | |
Path | Starting directory path. |
Return values:
The return value is the full path of the selected directory. If the dialog aborts, a null
string is returned.
Example:
DIRDLG "Select a directory:" "C:\"
MESSAGEBOX (CHAR)Message (CHAR)Title
(INT)Type
This command creates and shows a message box, containing a title, a message and a
combination of predefined icons and buttons.
Parameters: | |||||||||||||||||||||||||||
Message | Text message shown in the main body of the box. | ||||||||||||||||||||||||||
Title | Title of the message box. | ||||||||||||||||||||||||||
Type | It's a combination of flags as the standard MessageBox() Windows function that can be combined by OR logical operator or sum: | ||||||||||||||||||||||||||
|
Return values:
The return value is reported in the Result variable and can be one of the
following:
Result | Value | Description |
IDYES | 6 | Yes button was selected. |
IDNO | 7 | No button was selected. |
Example:
MESSAGEBOX "Do you want continue ?"
"ERROR" 36
See also:
MULTISELDLG,
STRINGBOX,
TEXT.
MINIED
(CHAR)FileName (CHAR)Title (INT)Flags
Open the mini text editor included in VEGA ZZ.
Parameters: | |||||||||||||||||
FileName | Text file to open. If it's null ("") an empty edit window is opened. | ||||||||||||||||
Title | Title of the editor window. It can be null (""). | ||||||||||||||||
Flags | Control flags that can be combined by OR logical operator or sum: | ||||||||||||||||
|
Return values:
Error code if it fails.
Example:
MINIED "C:\My Documents\ReadMe.txt" "Read this
document" 12
See also:
None.
MULTISELDLG
(CHAR)Title (CHAR)Message (CHAR)Items
(CHAR)Button (UINT)Flags
Show the multi-selection dialog box and return one or more choices.
Parameters: | ||||||||
Title | Title of the window. If it's null (""), the default title is shown. | |||||||
Message | Message displayed at the window top. It can be null (""). | |||||||
Items | Items shown in the main list. It's a string in
which each item is separated by the pipe character (|). Example: "First line|Second line|Third line" |
|||||||
Button | It's the text shown in the button to confirm the operation. | |||||||
Flags | Control flags that can be combined by OR logical operator or sum: | |||||||
|
Return values:
This function return the selected items indicating their identification number (1 for the
first item, 2 for the second and so on ...). If it aborts, a null string ("") is
returned (e.g. clicking the Cancel button or closing the window).
Example:
MULTISELDLG "My title" "Select one item"
"First|Second|Third" "Go !" 0
MULTISELDLG "My title" "Select one or more items"
"First|Second|Third" "Go !" 1
See also:
MESSAGEBOX,
STRINGBOX.
OPENDLG
(CHAR)Title (CHAR)Path (CHAR)Filter
(INT)FilterIndex
Show the requester to open a file.
Parameters: | ||
Title | Dialog box title. | |
Path | Starting directory path. | |
Filter | String to filter the files that must be in the
following format: Description1|Extension1a;Extension1b| ... where Description is the filter description and Extensions are the filters (with wildcards) associated. Each field must be separated by the pipe character (|) and the semicolon (;) is required between the filter extensions. Examples:
If the filter if omitted ("") the default filter is used (All files (*.*)|*.*). |
|
FilterIndex | It's the predefined filter index used when the dialog is opened and it must be grater than 0. |
Return values:
This function return the selected file name with full path. If it aborts, a null string
("") is returned.
Example:
OPENDLG "Open file:" "C:\"
"Executables|*.com;*.exe|Batch files|*.bat" 2
SAVEDLG
(CHAR)Title (CHAR)Path (CHAR)Filter
(INT)FilterIndex
Show the requester to save a file.
Parameters: | ||
Title | Dialog box title. | |
Path | Starting directory path. | |
Filter | String to filter the files. See OPENDLG. | |
FilterIndex | It's the predefined filter index used when the dialog is opened and it must be grater than 0. |
Return values:
This function return the selected filter index (for the file format) and file name with
full path. If it aborts, a null string ("") is returned.
Example:
SAVEDLG "Save file:" "C:\" "PDB (*.pdb)|*.pdb|Biosym
(*.car)|*.car" 1
SAVEMOLDLG
(MCHAR)DefaultFormat
Show the requester to save a molecule.
Parameters: | ||
DefaultFormat | Default file format. The keywords are the same used to select the output file format (see -f command line option). |
Return values:
This function return the selected file format and file name with
full path. If it aborts, a null string ("") is returned.
Example:
SAVEMOLDLG IFF
See also:
DIRDLG,
OPENDLG, SAVEDLG.
STRINGBOX
(CHAR)Title (CHAR)Message (CHAR)Default
Open the string box dialog.
Parameters: | ||
Title | Dialog box title. If null, the default title is used. | |
Message | Message shown at the window top. It can be null (""). | |
Default | Default string placed in the edit box. |
Return values:
This function return the edited string. If it aborts, a null string ("") is
reported.
Example:
STRINGBOX "" "Put your name:" ""
See also:
MESSAGEBOX,
MULTISELBOX.
TEXT (CHAR)Message (BOOL)NewLine
Show a message in the console.
Parameters: | ||
Message | Message text. | |
NewLine | If this flag is true (1), a line feed is automatically added. Please remember that the console buffer is flushed only if a line feed is contained in the message string and thus, if you set NewLine to false (0), the message is shown when the next print operation contains a line feed. |
Return values:
Error code if it fails.
Example:
TEXT "Hello World" 1
See also:
MESSAGEBOX.