|
static GO2SXYZ | GO2SDialogUtil::AskCoordinates () |
|
static String | GO2SDialogUtil::AskDirectory (String startingDir="c:\\") |
|
static Number | GO2SDialogUtil::AskDouble (String title, String label, Number min=-DBL_MAX, Number max=DBL_MAX, Number init=0.0) |
|
static Number | GO2SDialogUtil::AskInt (String title, String label, Number min=-INT_MAX, Number max=INT_MAX, Number init=0) |
|
static String | GO2SDialogUtil::AskOpenFileName (String startingDir="c:\\", Array< String > extensions={ "All Files (.)" }, String text="Open a file") |
|
static Boolean | GO2SDialogUtil::AskQuestion (String message, String title="") |
|
static String | GO2SDialogUtil::AskSaveFileName (String startingDir="c:\\", Array< String > extensions={ "All Files (.)" }, String text="Save a file") |
|
static String | GO2SDialogUtil::AskText (String title, String label, String init="") |
|
static void | GO2SDialogUtil::CreateMessageBox (String message, String title="", GO2SEnum::GO2SMessageType type=GO2SEnum::GO2SMessageType::info) |
|
Methods to generate predefined dialogs.
◆ AskCoordinates()
static GO2SXYZ GO2SDialogUtil::AskCoordinates |
( |
| ) |
|
|
static |
Display a dialog box for the user to enter XYZ coordinates
console.log('entered coordinates: ' + xyz)
Helper containing utility methods for dialog.
Definition GO2SDialogUtil.hpp:17
static GO2SXYZ AskCoordinates()
◆ AskDirectory()
static String GO2SDialogUtil::AskDirectory |
( |
String | startingDir = "c:\\" | ) |
|
|
static |
Open a dialog to select a directory
- Returns
- the directory path
- Parameters
-
[in] | startingDir | starting directory |
◆ AskDouble()
static Number GO2SDialogUtil::AskDouble |
( |
String | title, |
|
|
String | label, |
|
|
Number | min = -DBL_MAX, |
|
|
Number | max = DBL_MAX, |
|
|
Number | init = 0.0 ) |
|
static |
Generate a simple dialog box to get a Number value from the user
static Number AskDouble(String title, String label, Number min=-DBL_MAX, Number max=DBL_MAX, Number init=0.0)
- Parameters
-
[in] | title | title of the dialog box |
[in] | label | label of the value |
[in] | min | minimum value that can be set in the dialog |
[in] | max | maximum value that can be set in the dialog |
[in] | init | initialisation value |
◆ AskInt()
static Number GO2SDialogUtil::AskInt |
( |
String | title, |
|
|
String | label, |
|
|
Number | min = -INT_MAX, |
|
|
Number | max = INT_MAX, |
|
|
Number | init = 0 ) |
|
static |
Generate a simple dialog box to get an integer value from the user
- Parameters
-
[in] | title | title of the dialog box |
[in] | label | label of the value |
[in] | min | minimum value that can be set in the dialog |
[in] | max | maximum value that can be set in the dialog |
[in] | init | initialisation value |
◆ AskOpenFileName()
static String GO2SDialogUtil::AskOpenFileName |
( |
String | startingDir = "c:\\", |
|
|
Array< String > | extensions = { "All Files (.)" }, |
|
|
String | text = "Open a file" ) |
|
static |
Open a dialog to select a file path for opening
- Returns
- the complete file path
- Parameters
-
[in] | startingDir | the starting directory |
[in] | extensions | array of file extensions, ex: ['Text files (.txt)', 'Opelist files (.opl)'] |
[in] | text | text displayed in the dialog |
◆ AskQuestion()
static Boolean GO2SDialogUtil::AskQuestion |
( |
String | message, |
|
|
String | title = "" ) |
|
static |
Open a dialog box to ask a yes/no question to the user
static Boolean AskQuestion(String message, String title="")
- Parameters
-
[in] | message | the message |
[in] | title | title of the dialog box |
◆ AskSaveFileName()
static String GO2SDialogUtil::AskSaveFileName |
( |
String | startingDir = "c:\\", |
|
|
Array< String > | extensions = { "All Files (.)" }, |
|
|
String | text = "Save a file" ) |
|
static |
Open a dialog to select a file path for saving (the file does not have to exist)
- Returns
- the complete file path
- Parameters
-
[in] | startingDir | the starting directory of the window |
[in] | extensions | array of file extensions, ex: ['Text files (.txt)', 'Opelist files (.opl)'] |
[in] | text | text displayed in the dialog |
◆ AskText()
static String GO2SDialogUtil::AskText |
( |
String | title, |
|
|
String | label, |
|
|
String | init = "" ) |
|
static |
Generate a simple dialog box to get a text from the user
- Parameters
-
[in] | title | title of the dialog box |
[in] | label | label of the text input |
[in] | init | initialisation value |
◆ CreateMessageBox()
Open a dialog box to send a messgae to the user
static void CreateMessageBox(String message, String title="", GO2SEnum::GO2SMessageType type=GO2SEnum::GO2SMessageType::info)
- Parameters
-