Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Provide simple dialog creation methods. More...
Public Types | |
enum | ChoiceRepresentationMode { RadioButtons = 0 , ComboBox = 1 } |
The representation. More... | |
enum | EMessageSeverity { Info = 0 , Warning = 1 , Error = 2 , Success = 3 , Instruction = 4 } |
The severity of the message. More... | |
Public Member Functions | |
Object | AddAngle (Object params) |
Add a new line for angle to the Dialog. More... | |
Object | AddBoolean (Object params) |
Add a new line for boolean to the Dialog. More... | |
Object | AddChoices (Object params) |
Add a new line for choices to the Dialog. More... | |
Object | AddFloat (Object params) |
Add a new line for float number to the Dialog. More... | |
boolean | AddImage (string imgPath, number width=-1, number height=-1, boolean keepRatio=true) |
Adds a new image to the Dialog. More... | |
Object | AddInt (Object params) |
Add a new line for integer to the Dialog. More... | |
Object | AddLength (Object params) |
Add a new line for length to the Dialog. More... | |
AddLine (string label, boolean isInput, Object labParams={}, number defaultInput=0) | |
Adds a new line to the Dialog. More... | |
AddLine (string label, boolean isInput, Object labParams={}, number defaultInput=0) | |
Adds a new line to the Dialog. More... | |
AddLine (string label, boolean isInput, Object labParams={}, string defaultInput="") | |
Adds a new line to the Dialog. More... | |
AddOutput (string label, string output, Object labParams={}, Object outParams={}) | |
Adds a new output line to the Dialog. More... | |
Object | AddPoint (Object params) |
Add a new line for SPoint to the Dialog. More... | |
AddText (string message, EMessageSeverity severity=SDialog.Instruction) | |
Add a new text line in the Dialog. More... | |
Object | AddTextField (Object params) |
Add a new line for text field to the Dialog. More... | |
Object | AddVector (Object params) |
Add a new line for SVector to the Dialog. More... | |
BeginGroup (string groupName) | |
Start a new group in the Dialog. More... | |
Object | Execute () |
Executes the dialog box. More... | |
Object | Run () |
Executes the dialog box. More... | |
SDialog (string title="Dialog") | |
Dialog constructor. More... | |
SetButtons (Array< string > values) | |
Set buttons at the end of the Dialog. More... | |
SetHeader (string description, string imagePath="", number maxHeight=150) | |
Add a description and a logo at the beginning of the Dialog. More... | |
string | toString () |
Get the type of the variable. More... | |
Static Public Member Functions | |
static Object | Message (string message, Array< string > buttons, EMessageSeverity severity=SDialog.Instruction, string title="Dialog") |
Create a dialog to display a message with custom buttons. More... | |
static | Message (string message, EMessageSeverity severity=SDialog.Instruction, string title="Dialog") |
Create a dialog to display a message. More... | |
static SDialog | New (string title="Dialog") |
Dialog constructor. More... | |
static boolean | Question (string question, string title="Dialog") |
Create a dialog to ask a question. More... | |
Provide simple dialog creation methods.
See also Creating Custom Form page for details on how to use this class.
SDialog::SDialog | ( | string | title = "Dialog" | ) |
Dialog constructor.
title | (string) Window title |
Object SDialog::AddAngle | ( | Object | params | ) |
Add a new line for angle to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
Object SDialog::AddBoolean | ( | Object | params | ) |
Add a new line for boolean to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
Object SDialog::AddChoices | ( | Object | params | ) |
Add a new line for choices to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
Object SDialog::AddFloat | ( | Object | params | ) |
Add a new line for float number to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
boolean SDialog::AddImage | ( | string | imgPath, |
number | width = -1 , |
||
number | height = -1 , |
||
boolean | keepRatio = true |
||
) |
Adds a new image to the Dialog.
Supported formats include PNG, JPG, JPEG, BMP and more.
imgPath | (string) Image path |
width | (number) Image width. Negative to ignore. |
height | (number) Image height. Negative to ignore. |
keepRatio | (boolean) Should the original size ratio be respected? |
Object SDialog::AddInt | ( | Object | params | ) |
Add a new line for integer to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
Object SDialog::AddLength | ( | Object | params | ) |
Add a new line for length to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
SDialog::AddLine | ( | string | label, |
boolean | isInput, | ||
Object | labParams = {} , |
||
number | defaultInput = 0 |
||
) |
Adds a new line to the Dialog.
Either a simple line with a single label, or also with a text input field. The resulting inputs are then returned by the Execute() method
label | (string) Label text |
isInput | (boolean) Should the line include a text input field? |
labParams | (Object) Label text parameters, as associative array. Available key parameters:
|
defaultInput | (number) Default text if input field |
SDialog::AddLine | ( | string | label, |
boolean | isInput, | ||
Object | labParams = {} , |
||
number | defaultInput = 0 |
||
) |
Adds a new line to the Dialog.
Either a simple line with a single label, or also with a text input field. The resulting inputs are then returned by the Execute() method
label | (string) Label text |
isInput | (boolean) Should the line include a text input field? |
labParams | (Object) Label text parameters, as associative array. Available key parameters:
|
defaultInput | (number) Default text if input field |
SDialog::AddLine | ( | string | label, |
boolean | isInput, | ||
Object | labParams = {} , |
||
string | defaultInput = "" |
||
) |
Adds a new line to the Dialog.
Either a simple line with a single label, or also with a text input field. The resulting inputs are then returned by the Execute() method
label | (string) Label text |
isInput | (boolean) Should the line include a text input field? |
labParams | (Object) Label text parameters, as associative array. Available key parameters:
|
defaultInput | (string) Default text if input field |
SDialog::AddOutput | ( | string | label, |
string | output, | ||
Object | labParams = {} , |
||
Object | outParams = {} |
||
) |
Adds a new output line to the Dialog.
label | (string) Label text |
output | (string) Output text |
labParams | (Object) Label text parameters, as associative array. Available key parameters:
|
outParams | (Object) Output text parameters (same usage as with labParams)
|
Object SDialog::AddPoint | ( | Object | params | ) |
Add a new line for SPoint to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
SDialog::AddText | ( | string | message, |
EMessageSeverity | severity = SDialog.Instruction |
||
) |
Add a new text line in the Dialog.
message | (string) The message to display |
severity | (EMessageSeverity) The severity of the message
|
Object SDialog::AddTextField | ( | Object | params | ) |
Add a new line for text field to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
Object SDialog::AddVector | ( | Object | params | ) |
Add a new line for SVector to the Dialog.
params | (Object) Parameters as associative array. Available key parameters:
|
ret.ErrorCode | (number) The error code
|
SDialog::BeginGroup | ( | string | groupName | ) |
Start a new group in the Dialog.
groupName | (string) The title of the group |
Object SDialog::Execute | ( | ) |
Executes the dialog box.
ret.ErrorCode | (number) The error code
|
ret.InputTbl | (Array<string>) The resulting user input strings (in the same order as the input lines) |
|
static |
Create a dialog to display a message with custom buttons.
message | (string) The message to display |
buttons | (Array<string>) The buttons to add |
severity | (EMessageSeverity) The severity of the message
|
title | (string) Window title |
ret.ErrorCode | (number) The index of the clicked button.
|
|
static |
Create a dialog to display a message.
message | (string) The message to display |
severity | (EMessageSeverity) The severity of the message
|
title | (string) Window title |
|
static |
|
static |
Create a dialog to ask a question.
question | (string) The question to display |
title | (string) Window title |
Object SDialog::Run | ( | ) |
Executes the dialog box.
ret.ErrorCode | (number) The index of the clicked button. By default if SDialog.SetButtons is not used:
|
SDialog::SetButtons | ( | Array< string > | values | ) |
Set buttons at the end of the Dialog.
values | (Array<string>) The list of name to use as button |
SDialog::SetHeader | ( | string | description, |
string | imagePath = "" , |
||
number | maxHeight = 150 |
||
) |
Add a description and a logo at the beginning of the Dialog.
description | (string) The description of the script |
imagePath | (string) The path to the image to use |
maxHeight | (number) Max height of the image |
string SDialog::toString | ( | ) |
Get the type of the variable.