Python Script Engine  7.2
GL Studio Editor Python Script API
Document Class Reference

Public Types

enum  CodeGenerationMode {
  CODE_GENERATION_MODE_STANDALONE,
  CODE_GENERATION_MODE_COMPONENT
}
 
enum  FrameBufferType {
  FRAME_BUFFER_TYPE_SINGLE_BUFFERED,
  FRAME_BUFFER_TYPE_DOUBLE_BUFFERED
}
 
enum  ProjectionMode {
  PROJECTION_MODE_ORTHOGRAPHIC,
  PROJECTION_MODE_PERSPECTIVE,
  PROJECTION_MODE_EYEPOINT
}
 
enum  RedrawMode {
  REDRAW_MODE_CONDITIONAL,
  REDRAW_MODE_CONSTANT,
  REDRAW_MODE_CONTINUOUS
}
 
enum  RuntimeAttributesFlags {
  RUNTIME_ATTRIBUTES_BASIC,
  RUNTIME_ATTRIBUTES_DYNAMIC,
  RUNTIME_ATTRIBUTES_APPEARANCE,
  RUNTIME_ATTRIBUTES_GEOMETRY,
  RUNTIME_ATTRIBUTES_SPECIALIZED,
  RUNTIME_ATTRIBUTES_ALL,
  RUNTIME_ATTRIBUTES_NONE
}
 

Public Member Functions

bool isNULL (void)
 
bool isEqual (Document *rhs)
 
String GetFilename (void)
 
String GetDirname (void)
 
void Close (void)
 
void MakeCurrentDocument (void)
 
void Save (void)
 
void SaveAs (String fileName)
 
void SetDirtyFlag (void)
 
void SetDocumentSaved ()
 
void UndoAction (void)
 
void RedoAction (void)
 
void ClearRedoAndRebuildHistory ()
 
void BeginUndoGroup (void)
 
void EndUndoGroup (String undoGroupDescription)
 
void InsertObject (DisplayObject *obj, bool renameName=false)
 
void DeleteObject (DisplayObject *obj)
 
DisplayObjectArrayGetSelectedObjects ()
 
void SelectAll (void)
 
void ClearSelections (void)
 
void SelectObject (DisplayObject *obj)
 
void SelectObjects (DisplayObjectArray *objs)
 
void SelectObjects (std::vector< String > objectNames, bool addToCurrentSelection=false)
 
void UnselectObject (DisplayObject *obj)
 
void UnselectObjects (DisplayObjectArray *objs)
 
void SetCodeGenerationFillInFromRoot (bool fillInFromRoot)
 
bool IsCodeGenerationFillInFromRoot (void)
 
void SetDocumentRootName (String rootName)
 
String GetDocumentRootName (void)
 
void SetDerivedClass (String derivedClass)
 
String GetDerivedClass (void)
 
void SetIdlFileUserCode (String idlFileUserCode)
 
String GetIdlFileUserCode (void)
 
void SetIdlDeclarationUserCode (String idlDeclarationUserCode)
 
String GetIdlDeclarationUserCode (void)
 
void SetCodeOutputPath (String codeOutputPath)
 
String GetCodeOutputPath (void)
 
void SetGenerateSourceComments (bool generateSourceComments)
 
bool IsGenerateSourceComments (void)
 
void SetCodeGenerationMode (CodeGenerationMode codeGenerationMode)
 
CodeGenerationMode GetCodeGenerationMode (void)
 
void SetStandaloneInstanceName (String instanceName)
 
String GetStandaloneInstanceName (void)
 
void SetStandaloneHeaderFile (String headerFile)
 
String GetStandaloneHeaderFile (void)
 
void SetStandaloneSourceFile (String sourceFile)
 
String GetStandaloneSourceFile (void)
 
void SetGenerateMainInSeparateFile (bool separateFile)
 
bool IsGenerateMainInSeparateFile (void)
 
void SetStandaloneMainFile (String mainFile)
 
String GetStandaloneMainFile (void)
 
void SetComponentHeaderFile (String headerFile)
 
String GetComponentHeaderFile (void)
 
void SetComponentSourceFile (String sourceFile)
 
String GetComponentSourceFile (void)
 
void SetUserDefinedBaseClass (String userDefinedBaseClass)
 
String GetUserDefinedBaseClass (void)
 
void EnableUserDefinedBaseClass (bool enableUserDefinedBaseClass)
 
bool IsUserDefinedBaseClassEnabled (void)
 
void SetUserDefinedBaseClassConstructorInit (String ctorInit)
 
String GetUserDefinedBaseClassConstructorInit (void)
 
void SetApplicationWindowTitle (String title)
 
String GetApplicationWindowTitle (void)
 
void SetInitialPositionX (int x)
 
int GetInitialPositionX (void)
 
void SetInitialPositionY (int y)
 
int GetInitialPositionY (void)
 
void SetInitialWidth (int width)
 
int GetInitialWidth (void)
 
void SetInitialHeight (int height)
 
int GetInitialHeight (void)
 
void SetMaximumWidth (int width)
 
int GetMaximumWidth (void)
 
void SetMaximumHeight (int height)
 
int GetMaximumHeight (void)
 
void SetMinimumWidth (int width)
 
int GetMinimumWidth (void)
 
void SetMinimumHeight (int height)
 
int GetMinimumHeight (void)
 
void SetFrameBufferType (FrameBufferType frameBufferType)
 
FrameBufferType GetFrameBufferType (void)
 
void SetHasBorder (bool hasBorder)
 
bool HasBorder (void)
 
void SetResizable (bool resizable)
 
bool IsResizable (void)
 
void SetStencilBuffer (bool stencilBuffer)
 
bool HasStencilBuffer (void)
 
void SetDepthBuffer (bool depthBuffer)
 
bool HasDepthBuffer (void)
 
void SetMultisampleBuffer (bool multisampleBuffer)
 
bool HasMultisampleBuffer (void)
 
void SetAccumulationBuffer (bool accumulationBuffer)
 
bool HasAccumulationBuffer (void)
 
void SetAlphaInColorBuffer (bool alphaInColorBuffer)
 
bool HasAlphaInColorBuffer (void)
 
void SetFullScreen (bool fullScreen)
 
bool IsFullScreen (void)
 
void SetViewCulling (bool viewCulling)
 
bool IsViewCulling (void)
 
void SetProjectionMode (ProjectionMode projectionMode)
 
ProjectionMode GetProjectionMode (void)
 
void SetInitialEyePointName (String eyePointName)
 
String GetInitialEyePointName (void)
 
void SetRedrawMode (RedrawMode redrawMode)
 
RedrawMode GetRedrawMode (void)
 
void SetFrameRate (int frameRateHz)
 
int GetFrameRate (void)
 
GlsColor GetBackgroundColor (void)
 
void SetBackgroundColor (GlsColor color)
 
void SetBackgroundColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
void SetRuntimeAttributes (RuntimeAttributesFlags flags)
 
RuntimeAttributesFlags GetRuntimeAttributes (void)
 
TexturePalette GetTexturePalette (void)
 
SoundList GetSoundList (void)
 
FontPalette GetFontPalette (void)
 
DocumentInfo GetDocumentInfo (void)
 
void FindInDocument (String objectName, String className, String attributeName, String propertyValue, int comparitorType, bool matchCase, bool matchEntireWord, bool searchSelectionOnly)
 
void CodeGenerate (void)
 
void CodeGenerateChildren (void)
 
void CodeGenerateAll (void)
 
void CodeGenerateClean (void)
 
void CodeGenerateCleanChildren (void)
 
void CodeGenerateCleanAll (void)
 
void SetEditorGenerationMode (String str)
 
String GetEditorGenerationMode ()
 
void SetDocumentHeaderString (String str)
 
String GetDocumentHeaderString ()
 
void SetDocumentSourceString (String str)
 
String GetDocumentSourceString ()
 
void SetDocumentClassDeclarationString (String str)
 
String GetDocumentClassDeclarationString ()
 
void SetDocumentMainLoopString (String str)
 
String GetDocumentMainLoopString ()
 
void SetDocumentMainInitString (String str)
 
String GetDocumentMainInitString ()
 
void SetDocumentInitializeString (String str)
 
String GetDocumentInitializeString ()
 
String GetDocumentInitializeCommentString ()
 
void SetDocumentCalculateString (String str)
 
String GetDocumentCalculateString ()
 
String GetDocumentCalculateCommentString ()
 
int AddNewProperty (Property &newProperty)
 
int GetNumProperties ()
 
Property GetProperty (int propertyIndex)
 
void DeleteProperty (int propertyIndex)
 
int AddNewMethod (Method &newMethod)
 
unsigned int GetNumMethods ()
 
Method GetMethod (int methodIndex)
 
void DeleteMethod (int methodIndex)
 
int AddNewVariable (Variable &newVariable)
 
int GetNumVariables ()
 
Variable GetVariable (int variableIndex)
 
void DeleteVariable (int variableIndex)
 
int AddNewMaterial (Material &newMaterial)
 
int GetNumMaterials ()
 
Material GetMaterial (unsigned int materialIndex)
 
void UpdateMaterial (unsigned int materialIndex, Material matUpdates)
 
void DeleteMaterial (unsigned int materialIndex)
 
unsigned int GetNumObjects (void)
 
DisplayObjectGetObjectByName (String name)
 
GroupGetObjectList ()
 
ComponentRefInsertComponent (String filename)
 
void InsertComponent (ComponentRef &comp)
 
void CutSelectedObjects (void)
 
void DeleteSelectedObjects (void)
 
void CopySelectedObjects (void)
 
void PasteClipboardObjects (bool keepNames, bool keepPositions)
 
void PasteClipboardObjects (bool keepPositions)
 
void DuplicateSelectedObjects (void)
 
void CopySelectedCodeItem (void)
 
void PasteClipboardCodeItem (void)
 
void DuplicateSelectedCodeItem (void)
 
void DeleteSelectedCodeItem (void)
 
void ConvertSelectedToMesh (void)
 
GlsColor LineColor (void)
 
void LineColor (GlsColor color)
 
GlsColor FillColor (void)
 
void FillColor (GlsColor color)
 
void AddUserDefinedAttribute (UserDefinedAttribute attrib)
 
int GetNumUserDefinedAttributes (void)
 
UserDefinedAttribute GetUserDefinedAttributeByIndex (int index)
 
void DeleteUserDefinedAttributeByIndex (int index)
 
void DeleteUserDefinedAttributeByName (String name)
 
void UpdateUserDefinedAttribute (UserDefinedAttribute attrib)
 
void LoadUserDefinedAttributes (String filename)
 
void SaveUserDefinedAttributes (String filename)
 
String GetResources (void)
 
bool HasVisibleTab ()
 
void HideTab ()
 

Module Methods

Methods that can be called on the module.

Document GetCurrentDocument ()
 
Document GetDocumentByName (String docName)
 
Document NewDocument (String fileName="")
 
Document OpenDocument (String fileName, bool showTab=true) throw ( CEIException&, std::exception )
 
void SaveAllDocuments ()
 
void CloseAllDocuments ()
 

Detailed Description

common editor interface document

Member Enumeration Documentation

Code generation modes.

Enumerator
CODE_GENERATION_MODE_STANDALONE 
CODE_GENERATION_MODE_COMPONENT 

Frame buffer types.

Enumerator
FRAME_BUFFER_TYPE_SINGLE_BUFFERED 
FRAME_BUFFER_TYPE_DOUBLE_BUFFERED 

Projection modes.

Enumerator
PROJECTION_MODE_ORTHOGRAPHIC 
PROJECTION_MODE_PERSPECTIVE 
PROJECTION_MODE_EYEPOINT 

Redraw modes.

Enumerator
REDRAW_MODE_CONDITIONAL 
REDRAW_MODE_CONSTANT 
REDRAW_MODE_CONTINUOUS 

Runtime attributes flags.

Enumerator
RUNTIME_ATTRIBUTES_BASIC 
RUNTIME_ATTRIBUTES_DYNAMIC 
RUNTIME_ATTRIBUTES_APPEARANCE 
RUNTIME_ATTRIBUTES_GEOMETRY 
RUNTIME_ATTRIBUTES_SPECIALIZED 
RUNTIME_ATTRIBUTES_ALL 
RUNTIME_ATTRIBUTES_NONE 

Member Function Documentation

int Document::AddNewMaterial ( Material newMaterial)

Adds a given material to a given document.

Parameters
newMaterialMaterial to be added to the document
Returns
-1 if an error occurred while adding the material; otherwise 0 if material is successfully added
Exceptions
CEIException
int Document::AddNewMethod ( Method newMethod)

Adds a given method to a given document.

Parameters
newMethodMethod to be added to the document
Returns
-1 if an error occurred while adding the method; otherwise 0 if method is successfully added
Exceptions
CEIException
int Document::AddNewProperty ( Property newProperty)

Adds a given property to a given document.

Parameters
newPropertyProperty to be added to the document
Returns
-1 if an error occurred while adding the property; otherwise 0 if property is successfully added
Exceptions
CEIException
int Document::AddNewVariable ( Variable newVariable)

Adds a given variable to a given document.

Parameters
newVariableVariable to be added to the document
Returns
-1 if an error occurred while adding the variable; otherwise 0 if variable is successfully added
Exceptions
CEIException
void Document::AddUserDefinedAttribute ( UserDefinedAttribute  attrib)

Add a user defined attribute to the document.

Parameters
attribthe user defined attribute to be added to the document
void Document::BeginUndoGroup ( void  )

Begins an undo group on this document.

void Document::ClearRedoAndRebuildHistory ( )

Clears all undo items ahead of the current action.

Precondition
!isNULL()
Exceptions
CEIException
void Document::ClearSelections ( void  )

Clears selections of the objects within the document.

Precondition
!isNULL()
void Document::Close ( void  )

Closes this document.

Precondition
!isNULL()
Exceptions
CEIException
Note
current document is set to a different document if this doc is the current doc
Postcondition
isNULL will return true for this document after calling Close()
void Document::CloseAllDocuments ( )

Closes all open documents.

Exceptions
CEIException
Deprecated:
Use Editor.CloseAllDocuments() instead.
void Document::CodeGenerate ( void  )

Generates the code for a given document.

Returns
0 is code is successfully generated; otherwise -1
Exceptions
CEIException
Deprecated:
Use Editor.GenerateCurrentDocument() instead.
void Document::CodeGenerateAll ( void  )

Generates all of the code for a given document.

Returns
0 is code is successfully generated; otherwise -1
Exceptions
CEIException
Deprecated:
Use Editor.GenerateAllDocuments() instead.
void Document::CodeGenerateChildren ( void  )

Generates all of the code for a given document and any referenced children.

Returns
0 is code is successfully generated; otherwise -1
Exceptions
CEIException
Deprecated:
Use Editor.GenerateCurrentDocumentAndChildren() instead.
void Document::CodeGenerateClean ( void  )

Cleans the code for a given document.

Returns
0 is code is successfully cleaned; otherwise -1
Exceptions
CEIException
Deprecated:
Use Editor.CleanCurrentDocument() instead.
void Document::CodeGenerateCleanAll ( void  )

Cleans all of the code for a given document.

Returns
0 is code is successfully cleaned; otherwise -1
Exceptions
CEIException
Deprecated:
Use Editor.CleanAllDocuments() instead.
void Document::CodeGenerateCleanChildren ( void  )

Cleans the code for a given document and any referenced children.

Returns
0 is code is successfully cleaned; otherwise -1
Exceptions
CEIException
Deprecated:
Use Editor.CleanCurrentDocumentAndChildren() instead.
void Document::ConvertSelectedToMesh ( void  )

Converts the selected objects into a GLTriMesh.

Exceptions
CEIException
void Document::CopySelectedCodeItem ( void  )

Copies the selected code item to the clipboard.

Exceptions
CEIException
void Document::CopySelectedObjects ( void  )

Copies the selected objects to the clipboard.

Exceptions
CEIException
void Document::CutSelectedObjects ( void  )

Cuts the selected objects to the clipboard.

Exceptions
CEIException
void Document::DeleteMaterial ( unsigned int  materialIndex)

Deletes a specific material from a given document.

Parameters
materialIndexindex of the material to be deleted
Exceptions
CEIException
void Document::DeleteMethod ( int  methodIndex)

Deletes a specific method from a given document.

Parameters
methodIndexindex of the method to be deleted
Exceptions
CEIException
void Document::DeleteObject ( DisplayObject obj)

Delete the given object from the document.

Once the object is deleted, all references to the object will be NULL.

Parameters
objobject to delete
Precondition
!isNULL()
void Document::DeleteProperty ( int  propertyIndex)

Deletes a specific property from a given document.

Parameters
propertyIndexindex of the property to be deleted
Exceptions
CEIException
void Document::DeleteSelectedCodeItem ( void  )

Deletes the selected code item.

Exceptions
CEIException
Since
GL Studio 6.0.1
void Document::DeleteSelectedObjects ( void  )

Deletes the selected objects.

Exceptions
CEIException
void Document::DeleteUserDefinedAttributeByIndex ( int  index)

Deletes a user defined attribute from the document at a given index.

Parameters
indexindex of the user defined attribute to be deleted
void Document::DeleteUserDefinedAttributeByName ( String  name)

Deletes a user defined attribute from the document with a given name.

Parameters
namename of the user defined attribute to delete
void Document::DeleteVariable ( int  variableIndex)

Deletes a specific variable from a given document.

Parameters
variableIndexindex of the variable to be deleted
Exceptions
CEIException
void Document::DuplicateSelectedCodeItem ( void  )

Duplicates the selected code item.

Exceptions
CEIException
void Document::DuplicateSelectedObjects ( void  )

Duplicates the selected objects.

Exceptions
CEIException
void Document::EnableUserDefinedBaseClass ( bool  enableUserDefinedBaseClass)

Enables/disables user defined base class.

Parameters
enableUserDefinedBaseClasstrue to enable
Precondition
!isNULL()
void Document::EndUndoGroup ( String  undoGroupDescription)

Ends an undo group on this document.

Parameters
undoGroupDescriptiondescription of undo group
Precondition
BeginUndoGroup was called
GlsColor Document::FillColor ( void  )

Gets the currently selected fill color of the document.

Returns
fill color of the Display Object
void Document::FillColor ( GlsColor  color)

Sets the document's current fill color, and applies it to any selected objects.

Parameters
colorfill color to be applied to the Display Object
void Document::FindInDocument ( String  objectName,
String  className,
String  attributeName,
String  propertyValue,
int  comparitorType,
bool  matchCase,
bool  matchEntireWord,
bool  searchSelectionOnly 
)

Searches the document for all objects which conform to the given parameters.

If the attributeName parameter is non-empty, the search is performed on each object's attributes. Otherwise, the search is performed on each object's object name and/or class name, depending on if either or both are specified. All objects that match the search criteria become selected; non-matching objects are deselected.

Parameters
objectNameThe object name for which to search, or None to not search by object name
classNameThe class name for which to search, or None to not search by class name
attributeNameThe attribute name for which to search, or None to not search by attribute name
propertyValueThe property value for which to search when searching by attribute
comparitorTypeThe property value comparison mode to use when searching by attribute (1 = equal, 2 = not-equal)
matchCaseThe match case flag (If False, case is ignored while searching)
matchEntireWordThe match entire word flag (If False, the specified object and/or class names will match substrings of the object name/class name)
searchSelectionOnlyThe search selection only flag (If True, only currently selected objects are searched)
Exceptions
CEIException
String Document::GetApplicationWindowTitle ( void  )

Gets the application tab 'window title' setting.

Returns
window title
Precondition
!isNULL()
GlsColor Document::GetBackgroundColor ( void  )

Gets the background color for this document.

Returns
the background color for this document
CodeGenerationMode Document::GetCodeGenerationMode ( void  )

Gets the code generation mode.

Returns
code generation mode
Precondition
!isNULL()
String Document::GetCodeOutputPath ( void  )

Gets the code generation code output path.

Returns
the code generation code output path
Precondition
!isNULL()
String Document::GetComponentHeaderFile ( void  )

Gets the code generation tab 'component header file' setting.

Returns
component header file
Precondition
!isNULL()
String Document::GetComponentSourceFile ( void  )

Gets the code generation tab 'component source file' setting.

Returns
standalone source file
Precondition
!isNULL()
Document Document::GetCurrentDocument ( )

Gets the current document.

Returns
current document ( isNULL on returned value returns true if there is no current doc )
Deprecated:
Use Editor.GetCurrentDocument() instead.
String Document::GetDerivedClass ( void  )

Gets the code generation tab 'Derived Class' setting.

Returns
derivedClass derived class name
Precondition
!isNULL()
String Document::GetDirname ( void  )

Gets the directory of this document without the filename.

Precondition
!isNULL()
Returns
The directory, or null if not set.
Document Document::GetDocumentByName ( String  docName)

Gets the document with the given name, if open.

Returns
desired document ( isNULL on returned value returns true if there is no document with the given name open )
Deprecated:
Use Editor.GetDocumentByName() instead.
String Document::GetDocumentCalculateCommentString ( )

Retrieves the comment for the Calculate method for a given document.

Returns
the Calculate method comment string
Exceptions
CEIException
Since
GL Studio 6.0.1
String Document::GetDocumentCalculateString ( )

Retrieves the body for the Calculate method for a given document.

Returns
the Calculate method body string
Exceptions
CEIException
String Document::GetDocumentClassDeclarationString ( )

Retrieves the code class declaration for a given document.

Returns
the class declaration string
Exceptions
CEIException
String Document::GetDocumentHeaderString ( )

Retrieves the code header for a given document.

Returns
the header string
Exceptions
CEIException
DocumentInfo Document::GetDocumentInfo ( void  )

Gets the document info for this document.

Returns
the document info for this document
Precondition
!isNULL()
String Document::GetDocumentInitializeCommentString ( )

Retrieves the comment for the Initialize method for a given document.

Returns
the Initialize method comment string
Exceptions
CEIException
Since
GL Studio 6.0.1
String Document::GetDocumentInitializeString ( )

Retrieves the body for the Initialize method for a given document.

Returns
the Initialize method body string
Exceptions
CEIException
String Document::GetDocumentMainInitString ( )

Retrieves the main init for a given document.

Returns
the main init string
Exceptions
CEIException
String Document::GetDocumentMainLoopString ( )

Retrieves the main loop for a given document.

Returns
the main loop string
Exceptions
CEIException
String Document::GetDocumentRootName ( void  )

Retrieves the document's root name.

Returns
root name
Exceptions
CEIException
Precondition
!isNULL()
String Document::GetDocumentSourceString ( )

Retrieves the code source for a given document.

Returns
the source string
Exceptions
CEIException
String Document::GetEditorGenerationMode ( )

Retrieves the current editor generation mode.

Returns
the generation mode
Exceptions
CEIException
Deprecated:
Use Editor.GetActiveCodeGenerator() instead.
String Document::GetFilename ( void  )

Gets the filename of this document without the directory.

Precondition
!isNULL()
Returns
The filename, or null if not set.
FontPalette Document::GetFontPalette ( void  )

Gets the font palette for this document.

Returns
the font palette for this document
Precondition
!isNULL()
FrameBufferType Document::GetFrameBufferType ( void  )

Gets the application tab 'frame buffer type' setting.

Returns
frame buffer type
Precondition
!isNULL()
int Document::GetFrameRate ( void  )

Gets the application tab 'frame rate' setting.

Returns
frame rate in hz
Precondition
!isNULL()
String Document::GetIdlDeclarationUserCode ( void  )

Get the IDL declaration user code.

Returns
the IDL declaration user code
Precondition
!isNULL()
String Document::GetIdlFileUserCode ( void  )

Get the IDL file user code.

Returns
the IDL file user code
Precondition
!isNULL()
String Document::GetInitialEyePointName ( void  )

Gets the application tab 'inital eyepoint name' setting.

Returns
eye point name
Precondition
!isNULL()
int Document::GetInitialHeight ( void  )

Gets the application tab 'initial height' setting.

Returns
initial height
Precondition
!isNULL()
int Document::GetInitialPositionX ( void  )

Gets the application tab 'initial position x' setting.

Returns
initial position x
Precondition
!isNULL()
int Document::GetInitialPositionY ( void  )

Gets the application tab 'initial position y' setting.

Returns
initial position y
Precondition
!isNULL()
int Document::GetInitialWidth ( void  )

Gets the application tab 'initial width' setting.

Returns
initial width
Precondition
!isNULL()
Material Document::GetMaterial ( unsigned int  materialIndex)

Retrieves a specific material for a given document.

Parameters
materialIndexindex of the desired material
Returns
the requested material
Exceptions
CEIException
int Document::GetMaximumHeight ( void  )

Gets the application tab 'maximum height' setting.

Returns
max height
Precondition
!isNULL()
int Document::GetMaximumWidth ( void  )

Gets the application tab 'maximum width' setting.

Returns
max width
Precondition
!isNULL()
Method Document::GetMethod ( int  methodIndex)

Retrieves a specific method for a given document.

Parameters
methodIndexindex of the desired method
Returns
the requested method
Exceptions
CEIException
int Document::GetMinimumHeight ( void  )

Gets the application tab 'minimum height' setting.

Returns
min height
Precondition
!isNULL()
int Document::GetMinimumWidth ( void  )

Gets the application tab 'minimum width' setting.

Returns
min width
Precondition
!isNULL()
int Document::GetNumMaterials ( )

Retrieves the number of materials for a given document.

Returns
the number of materials
Exceptions
CEIException
unsigned int Document::GetNumMethods ( )

Retrieves the number of methods for a given document.

Returns
the number of methods
Exceptions
CEIException
unsigned int Document::GetNumObjects ( void  )

Gets the number of objects within a given document.

Returns
the number of objects within a given document
Exceptions
CEIException
int Document::GetNumProperties ( )

Retrieves the number of properties for a given document.

Returns
the number of properties
Exceptions
CEIException
int Document::GetNumUserDefinedAttributes ( void  )

Gets the number of user defined attributes in the document.

Returns
int the number of user defined attributes in the document
int Document::GetNumVariables ( )

Retrieves the number of variables for a given document.

Returns
the number of variables
Exceptions
CEIException
DisplayObject* Document::GetObjectByName ( String  name)

Finds an object within a document.

Parameters
namestring containing the name of the object to find
Returns
the object, if it exists
Exceptions
CEIException
Group* Document::GetObjectList ( )

Returns a group of all objects in the document hierarchy.

Returns
the group of objects
Exceptions
CEIException
ProjectionMode Document::GetProjectionMode ( void  )

Gets the application tab 'projection mode' setting.

Returns
projection mode setting
Precondition
!isNULL()
Property Document::GetProperty ( int  propertyIndex)

Retrieves a specific property for a given document.

Parameters
propertyIndexindex of the desired property
Returns
the requested property
Exceptions
CEIException
RedrawMode Document::GetRedrawMode ( void  )

Gets the application tab 'redraw mode' setting.

Returns
redraw mode
Precondition
!isNULL()
String Document::GetResources ( void  )

Gets all of the resources of all of the objects within this document.

RuntimeAttributesFlags Document::GetRuntimeAttributes ( void  )

Gets the resources tab 'runtime attributes' setting.

Returns
runtime attribute flags
Precondition
!isNULL()
DisplayObjectArray* Document::GetSelectedObjects ( )

Gets all selected objects in the document.

Returns
the array of selected objects
Precondition
!isNULL()
SoundList Document::GetSoundList ( void  )

Gets the sound list for this document.

Returns
the sound list for this document
Precondition
!isNull()
String Document::GetStandaloneHeaderFile ( void  )

Gets the code generation tab 'standalone header file' setting.

Returns
standalone header file
Precondition
!isNULL()
String Document::GetStandaloneInstanceName ( void  )

Gets the code generation tab 'standalone instance name' setting.

Returns
standalone instance name
Precondition
!isNULL()
String Document::GetStandaloneMainFile ( void  )

Get the code generation tab 'standalone main file' setting.

Returns
the code generation tab 'standalone main file' setting
Precondition
!isNULL()
String Document::GetStandaloneSourceFile ( void  )

Gets the code generation tab 'standalone source file' setting.

Returns
standalone source file
Precondition
!isNULL()
TexturePalette Document::GetTexturePalette ( void  )

Gets the texture palette for this document.

Returns
the texture palette for this document
Precondition
!isNULL()
UserDefinedAttribute Document::GetUserDefinedAttributeByIndex ( int  index)

Gets a user defined attribute within the document by index.

Parameters
indexindex of the user defined attribute to retrieve
Returns
the user defined attribute with the given index
String Document::GetUserDefinedBaseClass ( void  )

Gets the user defined base class used in component code generation mode if user defined base class is enabled.

Returns
user defined base class else "" for no user defined base class
Precondition
!isNULL()
String Document::GetUserDefinedBaseClassConstructorInit ( void  )

Gets the code generation tab 'user defined base class constructor init' setting.

Returns
the code generation tab 'user defined base class constructor init' setting
Precondition
!isNULL()
Variable Document::GetVariable ( int  variableIndex)

Retrieves a specific variable for a given document.

Parameters
variableIndexindex of the desired variable
Returns
the requested variable
Exceptions
CEIException
bool Document::HasAccumulationBuffer ( void  )

Gets the application tab 'accumulation buffer' setting.

Returns
accumulation buffer setting
Precondition
!isNULL()
bool Document::HasAlphaInColorBuffer ( void  )

Gets the application tab 'alpha in color buffer' setting.

Returns
alpha in color buffer setting
Precondition
!isNULL()
bool Document::HasBorder ( void  )

Gets the application tab 'has border' setting.

Returns
has border setting
Precondition
!isNULL()
bool Document::HasDepthBuffer ( void  )

Gets the application tab 'depth buffer' setting.

Returns
depth buffer setting
Precondition
!isNULL()
bool Document::HasMultisampleBuffer ( void  )

Gets the application tab 'multisample buffer' setting.

Returns
multisample buffer setting
Precondition
!isNULL()
bool Document::HasStencilBuffer ( void  )

Gets the application tab 'stencil buffer' setting.

Returns
stencil buffer setting
Precondition
!isNULL()
bool Document::HasVisibleTab ( )

Determines whether the given doc has a visible tab.

void Document::HideTab ( )

Hides this document's tab, and shows the next open document.

If there are no other open documents, does nothing.

ComponentRef* Document::InsertComponent ( String  filename)

Adds a file as a component to the document.

Parameters
filenamestring containing the filename of the component to insert into the document
Returns
ComponentRef the newly added component
Exceptions
CEIException
void Document::InsertComponent ( ComponentRef comp)

Adds a component to the document.

Parameters
comppointer to the component to be added to the document
Exceptions
CEIException
void Document::InsertObject ( DisplayObject obj,
bool  renameName = false 
)

Inserts the given object to the document.

Parameters
objobject to insert
renameNameallows the object's name to be renamed during insertion to maintain uniqueness. If a duplicate name is found in the document, the function will rename the object based on its current name. If flag is not set, then an exception is thrown when another object already has the same name. Default - False
Precondition
!isNULL()
bool Document::IsCodeGenerationFillInFromRoot ( void  )

Gets the code generation tab 'fill in from root' setting.

Returns
true if fill in from root is set
Precondition
!isNULL()
bool Document::isEqual ( Document rhs)

Determines if wrapped document is equal to another wrapped document.

Parameters
rhsThe document to compare to this
Precondition
!isNULL() && !rhs.isNULL()
Returns
true if wrapped document's point to the same editor document
bool Document::IsFullScreen ( void  )

Gets the application tab 'full screen' setting.

Returns
full screen setting
Precondition
!isNULL()
bool Document::IsGenerateMainInSeparateFile ( void  )

Determines whether the main is generated in a separate file.

Returns
true if main is generated in a seperate file
Precondition
!isNULL()
bool Document::IsGenerateSourceComments ( void  )

Gets the code generation tab 'generate source comments' setting.

Returns
true if generate source comments is set
Precondition
!isNULL()
bool Document::isNULL ( void  )

Determines if wrapped document does not exist.

Returns
True if this object represents a NULL document
Deprecated:
Refer to the Truth Value Checking page
bool Document::IsResizable ( void  )

Gets the application tab 'resizable' setting.

Returns
resizable setting
Precondition
!isNULL()
bool Document::IsUserDefinedBaseClassEnabled ( void  )

Determines if user defined base class is enabled.

Returns
true if enabled
Precondition
!isNULL()
bool Document::IsViewCulling ( void  )

Gets the application tab 'view culling' setting.

Returns
view culling setting
Precondition
!isNULL()
GlsColor Document::LineColor ( void  )

Gets the currently selected line color for the document.

Returns
line color of the Display Object
void Document::LineColor ( GlsColor  color)

Sets the document's current line color, and applies it to any selected objects.

Parameters
colorline color to be applied to the document
void Document::LoadUserDefinedAttributes ( String  filename)

Reads user defined attributes from a file.

Parameters
filenamename of the file from which the user defined attributes are to be read
void Document::MakeCurrentDocument ( void  )

Makes this document the current document.

Precondition
!isNULL()
Exceptions
CEIException
Document Document::NewDocument ( String  fileName = "")

Creates a new document and makes it the current document.

Parameters
fileNameoptional filename to give the new document
Returns
a new document that is the current document
Deprecated:
Use Editor.NewDocument() instead.
Document Document::OpenDocument ( String  fileName,
bool  showTab = true 
)
throw ( CEIException&,
std::exception
)

Opens a new document and makes it the current document.

Parameters
fileNamename of file to load
showTabwhether or not to show the file in a tab. If false, will open it in the background.
Returns
loaded document ( isNULL on returned value returns true if no doc loaded )
Deprecated:
Use Editor.OpenDocument() instead.
void Document::PasteClipboardCodeItem ( void  )

Pastes the code item from the clipboard.

Exceptions
CEIException
void Document::PasteClipboardObjects ( bool  keepNames,
bool  keepPositions 
)

Pastes the objects from the clipboard.

Parameters
keepNamestrue to keep object names (deprecated and ignored)
keepPositionstrue to keep object positions
Exceptions
CEIException
Deprecated:
Use PasteClipboardObjects( bool keepPositions ) instead.
void Document::PasteClipboardObjects ( bool  keepPositions)

Pastes the objects from the clipboard.

Parameters
keepPositionstrue to keep object positions
Exceptions
CEIException
Since
GL Studio 6.0.1
void Document::RedoAction ( void  )

Redo the previously undone action.

Precondition
!isNULL()
Exceptions
CEIException
void Document::Save ( void  )

Saves this document.

Precondition
!isNULL(), document has filename set
Exceptions
CEIException
void Document::SaveAllDocuments ( )

Saves all open documents.

Exceptions
CEIException
Deprecated:
Use Editor.SaveAllDocuments() instead.
void Document::SaveAs ( String  fileName)

save this document with a given filename.

If no filename is specified, a popup will appear.

Exceptions
CEIException
void Document::SaveUserDefinedAttributes ( String  filename)

Writes user defined attributes to a file.

Parameters
filenamename of the file to which the user defined attributes are to be written
void Document::SelectAll ( void  )

Selects all of the objects within the document.

Precondition
!isNULL()
void Document::SelectObject ( DisplayObject obj)

Selects the object within the editor.

Parameters
objthe object to be selected
Precondition
!isNULL()
void Document::SelectObjects ( DisplayObjectArray objs)

Selects the objects within the editor, adding to current selection.

Parameters
objsthe object array to be selected
Precondition
!isNULL()
void Document::SelectObjects ( std::vector< String >  objectNames,
bool  addToCurrentSelection = false 
)

Selects the specified objects.

Parameters
objectNamesthe list object names.
addToCurrentSelectionif true, adds the specified objects to the pre-existing selection. If false, it clears the pre-existing selection before selecting the specified objects.
void Document::SetAccumulationBuffer ( bool  accumulationBuffer)

Sets the application tab 'accumulation buffer' setting.

Parameters
accumulationBufferaccumulation buffer setting
Precondition
!isNULL()
void Document::SetAlphaInColorBuffer ( bool  alphaInColorBuffer)

Sets the application tab 'alpha in color buffer' setting.

Parameters
alphaInColorBufferalpha in color buffer setting
Precondition
!isNULL()
void Document::SetApplicationWindowTitle ( String  title)

Sets the application tab 'window title' setting.

Parameters
titlewindow title
Precondition
!isNULL()
void Document::SetBackgroundColor ( GlsColor  color)

Sets the document's background color.

Parameters
colorthe color for the background
void Document::SetBackgroundColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)

Sets the document's background color.

Parameters
rred color for the background
ggreen color for the background
bblue color for the background
aalpha color for the background
void Document::SetCodeGenerationFillInFromRoot ( bool  fillInFromRoot)

Sets the code generation tab 'fill in from root' setting.

Parameters
fillInFromRoottrue to fill in from root
Precondition
!isNULL()
void Document::SetCodeGenerationMode ( CodeGenerationMode  codeGenerationMode)

Sets the code generation mode.

Parameters
codeGenerationModecode generation mode
Precondition
!isNULL()
void Document::SetCodeOutputPath ( String  codeOutputPath)

Sets the code generation code output path.

Parameters
codeOutputPaththe code generation code output path
Precondition
!isNULL()
void Document::SetComponentHeaderFile ( String  headerFile)

Sets the code generation tab 'component header file' setting.

Parameters
headerFilecomponent header file
Precondition
!isNULL(), !IsCodeGenerationFillInFromRoot()
void Document::SetComponentSourceFile ( String  sourceFile)

Sets the code generation tab 'component source file' setting.

Parameters
sourceFilecomponent source file
Precondition
!isNULL(), !IsCodeGenerationFillInFromRoot()
void Document::SetDepthBuffer ( bool  depthBuffer)

Sets the application tab 'depth buffer' setting.

Parameters
depthBufferdepth buffer setting
Precondition
!isNULL()
void Document::SetDerivedClass ( String  derivedClass)

Sets the code generation tab 'Derived Class' setting.

Parameters
derivedClassderived class name
Precondition
!isNULL(), !IsCodeGenerationFillInFromRoot()
void Document::SetDirtyFlag ( void  )

Mark this document as dirty.

Exceptions
CEIException
void Document::SetDocumentCalculateString ( String  str)

Sets the body for the Calculate method for a given document.

Parameters
strString to be used in the body
Exceptions
CEIException
void Document::SetDocumentClassDeclarationString ( String  str)

Sets the code class declaration for a given document.

Parameters
strString to be added to the class declaration
Exceptions
CEIException
void Document::SetDocumentHeaderString ( String  str)

Sets the code header for a given document.

Parameters
strString to be added at the beginning of the code header
Exceptions
CEIException
void Document::SetDocumentInitializeString ( String  str)

Sets the body for the Initialize method for a given document.

Parameters
strString to be used in the body
Exceptions
CEIException
void Document::SetDocumentMainInitString ( String  str)

Sets the main init for a given document.

Parameters
strString to be used in the main init
Exceptions
CEIException
void Document::SetDocumentMainLoopString ( String  str)

Sets the main loop for a given document.

Parameters
strString to be used in the main loop
Exceptions
CEIException
void Document::SetDocumentRootName ( String  rootName)

Sets the document's root name.

Exceptions
CEIException
Precondition
!isNULL()
void Document::SetDocumentSaved ( )

Clears the dirty flag without updating the document.

Precondition
!isNULL()
Exceptions
CEIException
void Document::SetDocumentSourceString ( String  str)

Sets the code source for a given document.

Parameters
strString to be added at the beginning of the code source
Exceptions
CEIException
void Document::SetEditorGenerationMode ( String  str)

Sets the current editor generation mode.

Parameters
strString specifiying the new editor mode
Exceptions
CEIException
Deprecated:
Use Editor.SetActiveCodeGenerator() instead.
void Document::SetFrameBufferType ( FrameBufferType  frameBufferType)

Sets the application tab 'frame buffer type' setting.

Parameters
frameBufferTypeframe buffer type
Precondition
!isNULL()
void Document::SetFrameRate ( int  frameRateHz)

Sets the application tab 'frame rate' setting.

Parameters
frameRateHzframe rate in hz
Precondition
!isNULL()
void Document::SetFullScreen ( bool  fullScreen)

Sets the application tab 'full screen' setting.

Parameters
fullScreenfull screen setting
Precondition
!isNULL()
void Document::SetGenerateMainInSeparateFile ( bool  separateFile)

Sets whether the main is generated in a separate file.

Parameters
separateFiletrue to generate main in a seperate file
Precondition
!isNULL()
void Document::SetGenerateSourceComments ( bool  generateSourceComments)

Sets the code generation tab 'generate source comments' setting.

Parameters
generateSourceCommentstrue to generate source comments
Precondition
!isNULL()
void Document::SetHasBorder ( bool  hasBorder)

Sets the application tab 'has border' setting.

Parameters
hasBorderhas border setting
Precondition
!isNULL()
void Document::SetIdlDeclarationUserCode ( String  idlDeclarationUserCode)

Set the IDL declaration user code.

Parameters
idlDeclarationUserCodethe IDL declaration user code
Precondition
!isNULL()
void Document::SetIdlFileUserCode ( String  idlFileUserCode)

Set the IDL file user code.

Parameters
idlFileUserCodethe IDL file user code
Precondition
!isNULL()
void Document::SetInitialEyePointName ( String  eyePointName)

Sets the application tab 'inital eyepoint name' setting.

Parameters
eyePointNameeye point name
Precondition
!isNULL()
void Document::SetInitialHeight ( int  height)

Sets the application tab 'initial height' setting.

Parameters
heightinitial height
Precondition
!isNULL()
void Document::SetInitialPositionX ( int  x)

Sets the application tab 'initial position x' setting.

Parameters
xinitial position x
Precondition
!isNULL()
void Document::SetInitialPositionY ( int  y)

Sets the application tab 'initial position y' setting.

Parameters
yinitial position y
Precondition
!isNULL()
void Document::SetInitialWidth ( int  width)

Sets the application tab 'initial width' setting.

Parameters
widthinitial width
Precondition
!isNULL()
void Document::SetMaximumHeight ( int  height)

Sets the application tab 'maximum height' setting.

Parameters
heightmax height
Precondition
!isNULL()
void Document::SetMaximumWidth ( int  width)

Sets the application tab 'maximum width' setting.

Parameters
widthmax width
Precondition
!isNULL()
void Document::SetMinimumHeight ( int  height)

Sets the application tab 'minimum height' setting.

Parameters
heightmin height
Precondition
!isNULL()
void Document::SetMinimumWidth ( int  width)

Sets the application tab 'minimum width' setting.

Parameters
widthmin width
Precondition
!isNULL()
void Document::SetMultisampleBuffer ( bool  multisampleBuffer)

Sets the application tab 'multisample buffer' setting.

Parameters
multisampleBuffermultisample buffer setting
Precondition
!isNULL()
void Document::SetProjectionMode ( ProjectionMode  projectionMode)

Sets the application tab 'projection mode' setting.

Parameters
projectionModeprojection mode
Precondition
!isNULL()
void Document::SetRedrawMode ( RedrawMode  redrawMode)

Sets the application tab 'redraw mode' setting.

Parameters
redrawModeredraw mode
Precondition
!isNULL()
void Document::SetResizable ( bool  resizable)

Sets the application tab 'resizable' setting.

Parameters
resizableresizable setting
Precondition
!isNULL()
void Document::SetRuntimeAttributes ( RuntimeAttributesFlags  flags)

Sets the resources tab 'runtime attributes' setting.

Parameters
flagsruntime attribute flags
Precondition
!isNULL()
void Document::SetStandaloneHeaderFile ( String  headerFile)

Sets the code generation tab 'standalone header file' setting.

Parameters
headerFilestandalone header file
Precondition
!isNULL(), !IsCodeGenerationFillInFromRoot()
void Document::SetStandaloneInstanceName ( String  instanceName)

Sets the code generation tab 'standalone instance name' setting.

Parameters
instanceNamestandalone instance name
Precondition
!isNULL(), !IsCodeGenerationFillInFromRoot()
void Document::SetStandaloneMainFile ( String  mainFile)

Set the code generation tab 'standalone main file' setting.

Parameters
mainFilemain file
Precondition
!isNULL()
void Document::SetStandaloneSourceFile ( String  sourceFile)

Sets the code generation tab 'standalone source file' setting.

Parameters
sourceFilestandalone source file
Precondition
!isNULL(), !IsCodeGenerationFillInFromRoot()
void Document::SetStencilBuffer ( bool  stencilBuffer)

Sets the application tab 'stencil buffer' setting.

Parameters
stencilBufferstencil buffer setting
Precondition
!isNULL()
void Document::SetUserDefinedBaseClass ( String  userDefinedBaseClass)

Sets the user defined base class used in component code generation mode if user defined base class is enabled.

Parameters
userDefinedBaseClassuser defined base class
Precondition
!isNULL()
void Document::SetUserDefinedBaseClassConstructorInit ( String  ctorInit)

Sets the code generation tab 'user defined base class constructor init' setting.

Parameters
ctorInitthe code generation tab 'user defined base class constructor init' setting
Precondition
!isNULL()
void Document::SetViewCulling ( bool  viewCulling)

Sets the application tab 'view culling' setting.

Parameters
viewCullingview culling setting
Precondition
!isNULL()
void Document::UndoAction ( void  )

Undo the previous action.

Precondition
!isNULL()
Exceptions
CEIException
void Document::UnselectObject ( DisplayObject obj)

Unselects the object within the editor.

Parameters
objthe object to be unselected
Precondition
!isNULL()
void Document::UnselectObjects ( DisplayObjectArray objs)

Unselects the objects within the editor.

Parameters
objsthe object array to be unselected
Precondition
!isNULL()
void Document::UpdateMaterial ( unsigned int  materialIndex,
Material  matUpdates 
)

Updates a specific material for a given document.

Parameters
materialIndexindex of the material to be updated
matUpdatesmaterial containing the updated material information
Exceptions
CEIException
void Document::UpdateUserDefinedAttribute ( UserDefinedAttribute  attrib)

Updates a user defined attribute within the document.

Parameters
attribthe user defined attribute to be updated

The documentation for this class was generated from the following file: