Python Script Engine  8.3
GL Studio Editor Python Script API
DisplayObjectArray Class Reference

Public Types

enum  AlignType_e {
  ALIGN_TOP ,
  ALIGN_BOTTOM ,
  ALIGN_MIDDLE ,
  ALIGN_LEFT ,
  ALIGN_RIGHT ,
  ALIGN_CENTER
}
 

Public Member Functions

 DisplayObjectArray (int initialSize=2)
 
None Insert (DisplayObject &obj)
 
int GetCount ()
 
DisplayObjectGetObjectByIndex (int index)
 
DisplayObjectTessellateObjects (DisplayObject::TessellateType_e tessType)
 
None AlignObjects (AlignType_e alignType)
 
None StretchToTallest ()
 
None StretchToShortest ()
 
None StretchToWidest ()
 
None StretchToNarrowest ()
 

Detailed Description

Common editor interface DisplayObjectArray.

If the DisplayObjectArray instance is empty, it will return 'False' in comparison checks.

# Python:
import DisplayObjectArray
if objArray: # Will be False
pass
objArray.Insert( someObject )
if objArray: # Will be True
pass
DisplayObjectArray(int initialSize=2)
Default ructor.

Member Enumeration Documentation

◆ AlignType_e

Alignment enumeration.

Passed into alignment calls

Enumerator
ALIGN_TOP 

Align objects to the top of the highest object.

ALIGN_BOTTOM 

Align objects to the bottom of the lowest object.

ALIGN_MIDDLE 

Align objects to the vertical center of all the objects.

ALIGN_LEFT 

Align objects to the left of the left-most object.

ALIGN_RIGHT 

Align objects to the right of the right-most object.

ALIGN_CENTER 

Align objects to the horizontal center of all the objects.

Constructor & Destructor Documentation

◆ DisplayObjectArray()

DisplayObjectArray::DisplayObjectArray ( int  initialSize = 2)

Default ructor.

Parameters
initialSizethe initial size of the array. If you know the size of your array ahead of time, this will speed up insertion into the array.

Member Function Documentation

◆ AlignObjects()

None DisplayObjectArray::AlignObjects ( AlignType_e  alignType)

Aligns an array of objects.

Parameters
alignTypetype of alignment to be performed

◆ GetCount()

int DisplayObjectArray::GetCount ( )

get the number of elements in the array

Returns
the number of elements in the array

◆ GetObjectByIndex()

DisplayObject * DisplayObjectArray::GetObjectByIndex ( int  index)

Returns an item based on index.

Parameters
indexthe index of the item to be returned
Returns
DisplayObject the item at the given index

◆ Insert()

None DisplayObjectArray::Insert ( DisplayObject obj)

insert the given object at the end of the array

Parameters
objobject to insert

◆ StretchToNarrowest()

None DisplayObjectArray::StretchToNarrowest ( )

Stretches the objects within an array to the same width as the narrowest object.

◆ StretchToShortest()

None DisplayObjectArray::StretchToShortest ( )

Stretches the objects within an array to the same height as the shortest object.

◆ StretchToTallest()

None DisplayObjectArray::StretchToTallest ( )

Stretches the objects within an array to the same height as the tallest object.

◆ StretchToWidest()

None DisplayObjectArray::StretchToWidest ( )

Stretches the objects within an array to the same width as the widest object.

◆ TessellateObjects()

DisplayObject * DisplayObjectArray::TessellateObjects ( DisplayObject::TessellateType_e  tessType)

Tessellates the objects.

Parameters
tessTypeType of tessellation to perform
Returns
DisplayObject * pointer to the new tessellated object

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