Python Script Engine  1.0
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)
 
void Insert (DisplayObject &obj)
 
unsigned int GetCount (void)
 
DisplayObjectGetObjectByIndex (unsigned int index)
 
DisplayObjectTessellateObjects (DisplayObject::TessellateType_e tessType)
 
void AlignObjects (AlignType_e alignType)
 
void StretchToTallest (void)
 
void StretchToShortest (void)
 
void StretchToWidest (void)
 
void StretchToNarrowest (void)
 

Detailed Description

Common editor interface DisplayObjectArray.

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

1 # Python:
2 import DisplayObjectArray
4 if objArray: # Will be False
5  pass
6 objArray.Insert( someObject )
7 if objArray: # Will be True
8  pass

Member Enumeration Documentation

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 ( int  initialSize = 2)

Default constructor.

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

void DisplayObjectArray::AlignObjects ( AlignType_e  alignType)

Aligns an array of objects.

Parameters
alignTypetype of alignment to be performed
unsigned int DisplayObjectArray::GetCount ( void  )

get the number of elements in the array

Returns
the number of elements in the array
DisplayObject* DisplayObjectArray::GetObjectByIndex ( unsigned 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
void DisplayObjectArray::Insert ( DisplayObject obj)

insert the given object at the end of the array

Parameters
objobject to insert
void DisplayObjectArray::StretchToNarrowest ( void  )

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

void DisplayObjectArray::StretchToShortest ( void  )

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

void DisplayObjectArray::StretchToTallest ( void  )

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

void DisplayObjectArray::StretchToWidest ( void  )

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

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: