|
Methods that can be called on the module.
|
bool | RegisterDragAndDropHandlers (void *dragHandler, void *dropHandler) |
|
String | MakeValidObjectName (String inputStr) |
|
String | ResolvePath (String path) |
|
void | ClearDragAndDropHandlers () |
|
int | Choice (String button0, String button1, String button2, String text) |
|
int | ChoiceWithDefault (String button0, String button1, String button2, int defaultChoice, String text) |
|
bool | Question (String s) |
|
bool | QuestionDefault (String s, bool defaultAnswer) |
|
void | Error (String s) |
|
void | MsgBox (String s) |
|
String | SaveDialog (String caption, String directory, String filters, String defaultSuffix=String()) |
|
String | OpenDialog (String caption, String directory, String filters, bool isCreateFileAllowed=false) |
|
String | OpenDirectoryDialog (String caption, String directory) |
|
std::vector< String > | OpenMultiselectDialog (String caption, String directory, String filters) |
|
DocumentArray * | GetAllDocuments () |
|
void | ForceEditorRefresh () |
|
void | GenerateCurrentDocument () |
|
void | GenerateCurrentDocumentAndChildren () |
|
void | GenerateAllDocuments () |
|
void | CleanCurrentDocument () |
|
void | CleanCurrentDocumentAndChildren () |
|
void | CleanAllDocuments () |
|
std::vector< String > | GetAvailableCodeGenerators () |
|
String | GetActiveCodeGenerator () |
|
bool | SetActiveCodeGenerator (String codeGeneratorName) |
|
CodeGenerator | GetCodeGenerator (String codeGeneratorName) |
|
String | SetCodeGeneratorOptions (String codeGeneratorOptions) |
|
String | GetCodePathForCurrentGenerator (Document *doc=nullptr) |
|
String | GetResourcesPathForCurrentGenerator (void) |
|
String | GetCurrentProjectFileDirectory () |
|
Project * | GetCurrentProject () |
|
void | ForceRefreshCurrentProject () |
|
String | GetApplicationLanguage () |
|
void | GetVersionInfo (int *major, int *minor, int *build) |
|
void | RegisterAlternateClassPathChooser (PyObject *pyfunc) |
|
void | UnregisterAlternateClassPathChooser () |
|
void | RegisterCatalyzerScriptChooser (PyObject *pyfunc) |
|
void | UnregisterCatalyzerScriptChooser () |
|
void | Close () |
|
Document | GetCurrentDocument () |
|
Document | GetDocumentByName (String docName) |
|
Document | NewDocument (String filename="") |
|
Document | OpenDocument (String fileName) |
|
void | SaveAllDocuments () |
|
void | CloseAllDocuments () |
|
String | GetVersionInfoString () |
|
Editor module that contains methods to run on the Editor instance itself.
int Choice |
( |
String |
button0, |
|
|
String |
button1, |
|
|
String |
button2, |
|
|
String |
text |
|
) |
| |
Creates and shows a pop-up dialog box and displays a text string and up to (3) buttons labeled according to the first three input parameters.
To hide any of the buttons, pass an empty string to the corresponding param. A question icon is displayed. This is equivalent to the fltk "fl_choice" message type.
- Parameters
-
button0 | The label for button 0 (ESC is shortcut for this Right button) |
button1 | The label for button 1 (RET is shortcut for this Center button) |
button2 | The label for button 2 (left-most button) |
text | The text string to display |
- Returns
- Equals 0 if button0 pressed, 1 if button1 pressed, 2 if button2 pressed
- Since
- GL Studio 6.0.1
int ChoiceWithDefault |
( |
String |
button0, |
|
|
String |
button1, |
|
|
String |
button2, |
|
|
int |
defaultChoice, |
|
|
String |
text |
|
) |
| |
Creates and shows a pop-up dialog box and displays a text string and up to (3) buttons labeled according to the first three input parameters.
To hide any of the buttons, pass an empty string to the corresponding param. A question icon is displayed. This is equivalent to the fltk "fl_choice" message type.
- Parameters
-
button0 | The label for button 0 (ESC is shortcut for this Right button) |
button1 | The label for button 1 (RET is shortcut for this Center button) |
button2 | The label for button 2 (left-most button) |
defaultChoice | The value returned when in command-line mode |
text | The text string to display |
- Returns
- Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed
- Since
- GL Studio 6.0.1
void CleanAllDocuments |
( |
| ) |
|
Cleans all of the code for a given document.
- Exceptions
-
void CleanCurrentDocument |
( |
| ) |
|
Cleans the code for a given document.
- Exceptions
-
void CleanCurrentDocumentAndChildren |
( |
| ) |
|
Cleans the code for a given document and any referenced children.
- Exceptions
-
void ClearDragAndDropHandlers |
( |
| ) |
|
Clear all file drag and drop handlers currently added.
Close the editor.
- Since
- GL Studio 7.1.0
void CloseAllDocuments |
( |
| ) |
|
Closes all open documents.
- Exceptions
-
Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'.
An exclamation icon is displayed. This is equivalent to the fltk "fl_alert" message type.
- Parameters
-
s | The text string to display |
- Since
- GL Studio 6.0.1
void ForceEditorRefresh |
( |
| ) |
|
Force refresh of editor user interface.
void ForceRefreshCurrentProject |
( |
| ) |
|
To be called when we know we need to refresh the project and its packages.
- Since
- GL Studio 6.0.1
void GenerateAllDocuments |
( |
| ) |
|
Generates all of the code for a given document.
- Exceptions
-
void GenerateCurrentDocument |
( |
| ) |
|
Generates the code for a given document.
- Exceptions
-
void GenerateCurrentDocumentAndChildren |
( |
| ) |
|
Generates all of the code for a given document and any referenced children.
- Exceptions
-
String GetActiveCodeGenerator |
( |
| ) |
|
Get a list of all loaded documents.
- Returns
- List of loaded documents
String GetApplicationLanguage |
( |
| ) |
|
Returns the language code that is currently in use.
- Returns
- the 2-letter language code
- Since
- GL Studio 6.0.1
std::vector< String > GetAvailableCodeGenerators |
( |
| ) |
|
String GetCodePathForCurrentGenerator |
( |
Document * |
doc = nullptr | ) |
|
The the code generation output path for the currently active generator.
This can be different from the document specified path based on project settings.
- Parameters
-
doc | the document to use when cacluating the path |
- Returns
- the path
- Deprecated:
- Use Deployment::GetGeneratedCodeRoot() instead.
Gets the current document.
- Returns
- current document ( isNULL on returned value returns true if there is no current doc )
Returns the project object that is currently in use, or null if there is none.
- Since
- GL Studio 6.0.1
String GetCurrentProjectFileDirectory |
( |
| ) |
|
Returns the project directory that is currently in use.
- Returns
- the path to the project file, or empty string if there is none
- See also
- GetCurrentProject()
Document GetDocumentByName |
( |
String |
docName | ) |
|
Gets the document with the given name, if open.
- Parameters
-
docName | name of the document to get |
- Returns
- desired document ( isNULL on returned value returns true if there is no document with the given name open )
String GetResourcesPathForCurrentGenerator |
( |
void |
| ) |
|
The the resources output path for the currently active generator.
- Returns
- the path
- Deprecated:
- Use Deployment::GetGeneratedResourcesRoot() instead.
void GetVersionInfo |
( |
int * |
major, |
|
|
int * |
minor, |
|
|
int * |
build |
|
) |
| |
Returns a tuple of the version info in the form of (major, minor, build)
- Returns
- version info in tuple format (major, minor, build)
- Since
- GL Studio 6.0.1
String GetVersionInfoString |
( |
| ) |
|
Returns a string containing the version info a string concatination of GetVersionInfo()
- Returns
- a string containing the editor version info
- Since
- GL Studio 6.0.1
String MakeValidObjectName |
( |
String |
inputStr | ) |
|
Make a string a valid C++ identifier.
Invalid characters will be replaced with underscores. If the string starts with a number, a leading underscore is added.
- Parameters
-
inputStr | a string that will be converted to a valid C++ identifier. |
- Returns
- valid C++ identifier
- Exceptions
-
if | the inputStr could not be made into a valid C++ identifier. |
- Since
- GL Studio 6.0.1
Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'.
An 'i' (information) icon is displayed. This is equivalent to the fltk "fl_message" message type.
- Parameters
-
s | The text string to display |
- Since
- GL Studio 6.0.1
Document NewDocument |
( |
String |
filename = "" | ) |
|
Creates a new document and makes it the current document.
- Parameters
-
filename | optional filename to give the new document |
- Returns
- a new document that is the current document
String OpenDialog |
( |
String |
caption, |
|
|
String |
directory, |
|
|
String |
filters, |
|
|
bool |
isCreateFileAllowed = false |
|
) |
| |
Displays an open dialog.
- Parameters
-
| caption | The dialog box title |
[in,out] | directory | As input, the starting directory; as output, the returning the chosen directory. |
| filters | The filters of the form "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" |
| isCreateFileAllowed | If enabled, allows the file dialog to create new files |
- Returns
- The chosen filename to open (or empty if canceled)
- Since
- GL Studio 6.0.1
String OpenDirectoryDialog |
( |
String |
caption, |
|
|
String |
directory |
|
) |
| |
Displays an open directory dialog.
- Parameters
-
| caption | The dialog box title |
[in,out] | directory | As input, the starting directory; as output, the returning the chosen directory. |
- Returns
- The chosen filename to open (or empty if canceled)
- Since
- GL Studio 6.0.1
Document OpenDocument |
( |
String |
fileName | ) |
|
Opens a new document and makes it the current document.
- Parameters
-
fileName | name of file to load |
- Returns
- loaded document ( isNULL on returned value returns true if no doc loaded )
std::vector< String > OpenMultiselectDialog |
( |
String |
caption, |
|
|
String |
directory, |
|
|
String |
filters |
|
) |
| |
Displays an open dialog.
- Parameters
-
| caption | The dialog box title. |
[in,out] | directory | As input, the starting directory; as output, the returning the chosen directory. |
| filters | The filters of the form "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" |
- Returns
- The chosen filenames to open (or empty if canceled).
- Since
- GL Studio 6.0.1
bool Question |
( |
String |
s | ) |
|
Creates and shows a pop-up dialog box and displays a text string and (2) buttons labeled 'Yes' and 'No'.
A question mark icon is displayed. This is equivalent to the fltk "fl_choice" message type.
- Parameters
-
s | The text string to display |
- Returns
- Equals true if user pressed 'Yes', otherwise false
- Since
- GL Studio 6.0.1
bool QuestionDefault |
( |
String |
s, |
|
|
bool |
defaultAnswer |
|
) |
| |
Creates and shows a pop-up dialog box and displays a text string and (2) buttons labeled 'Yes' and 'No'.
A question mark icon is displayed. This is equivalent to the fltk "fl_choice" message type. This calls ChoiceWithDefault with buttons for "Yes" and "No.
- Parameters
-
s | The text string to display |
defaultAnswer | The value returned when in command-line mode |
- Returns
- Equals true if user pressed 'Yes', otherwise false
- Since
- GL Studio 6.0.1
void RegisterAlternateClassPathChooser |
( |
PyObject * |
pyfunc | ) |
|
Register a function that can provide a path to an alternate class header file.
Overwrites any previously registered alternate class path chooser
- Parameters
-
pyfunc | the python function to call. Should take no parameters and return a string which is a path to the alternate class header (either an absolute file path or a path relative to the gls file) |
- Since
- GL Studio 6.0.1
void RegisterCatalyzerScriptChooser |
( |
PyObject * |
pyfunc | ) |
|
Register a function that can provide a path to an Catalyzer Script.
Overwrites any previously registered catalyzer script chooser
- Parameters
-
pyfunc | the python function to call. Should take no parameters and return a string which is a path to catalyzer script (either an absolute file path or a path relative to the gls file) |
- Since
- GL Studio 6.0.1
bool RegisterDragAndDropHandlers |
( |
void * |
dragHandler, |
|
|
void * |
dropHandler |
|
) |
| |
Register file drag and drop handlers.
- Parameters
-
dragHandler | Python callable that takes a filename to see if the drop handler will accept it. |
dropHandler | Python callable that takes a filename to handle the drop |
- Returns
- true if the handlers were added.
String ResolvePath |
( |
String |
path | ) |
|
Resolves a path pointing at a referenced package to the path's actual location.
- Parameters
-
path | the path to be resolved |
- Returns
- The path of the file referenced if pointing to a referenced package, otherwise path returned as-is.
- Since
- GL Studio 6.3.1
void SaveAllDocuments |
( |
| ) |
|
Saves all open documents.
- Exceptions
-
String SaveDialog |
( |
String |
caption, |
|
|
String |
directory, |
|
|
String |
filters, |
|
|
String |
defaultSuffix = String () |
|
) |
| |
Displays a save dialog.
- Parameters
-
| caption | The dialog box title |
[in,out] | directory | As input, the starting directory; as output, the returning the chosen directory. |
| filters | The filters of the form "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" |
| defaultSuffix | the default extension to add if the user does not provide one. Can be NULL. |
- Returns
- The chosen filename for saving to (or empty if canceled)
- Since
- GL Studio 6.0.1
bool SetActiveCodeGenerator |
( |
String |
codeGeneratorName | ) |
|
String SetCodeGeneratorOptions |
( |
String |
codeGeneratorOptions | ) |
|
Pass some options to configure the current code generator.
- Parameters
-
codeGeneratorOptions | The options in KEY=VALUE pairs separated by spaces. |
- Returns
- String contains a list of failed configuration options. If empty, all applied successfully. If not empty, all that are not here were applied.
- Note
- This is an advanced function that may be deprecated later in favor of CEI interfaces for the code generators.
void UnregisterAlternateClassPathChooser |
( |
| ) |
|
Clears out any registered alternate class path chooser so that the default alternate class path chooser is used.
- Since
- GL Studio 6.0.1
void UnregisterCatalyzerScriptChooser |
( |
| ) |
|
Clears out any registered catalyzer script chooser so that the default catalyzer script chooser is used.
- Since
- GL Studio 6.0.1
The documentation for this class was generated from the following file: