| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Types | Public Member Functions | List of all members
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 ()
DisplayObject * | GetObjectByIndex (unsigned int index)
DisplayObject * | TessellateObjects (DisplayObject::TessellateType_e tessType)
void | AlignObjects (AlignType_e alignType)
void | StretchToTallest ()
void | StretchToShortest ()
void | StretchToWidest ()
void | StretchToNarrowest ()

## Detailed Description

Common editor interface DisplayObjectArray.

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

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

## Member Enumeration Documentation

## ◆ AlignType_e

enum DisplayObjectArray::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 constructor.

Parameters

  initialSize | the 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()

void DisplayObjectArray::AlignObjects | ( | AlignType_e | alignType | ) |

Aligns an array of objects.

Parameters

  alignType | type of alignment to be performed

## ◆ GetCount()

unsigned int DisplayObjectArray::GetCount | ( |  | ) |

get the number of elements in the array

Returns
  the number of elements in the array

## ◆ GetObjectByIndex()

DisplayObject * DisplayObjectArray::GetObjectByIndex | ( | unsigned int | index | ) |

Returns an item based on index.

Parameters

  index | the index of the item to be returned

Returns
  DisplayObject the item at the given index

## ◆ Insert()

void DisplayObjectArray::Insert | ( | DisplayObject & | obj | ) |

insert the given object at the end of the array

Parameters

  obj | object to insert

## ◆ StretchToNarrowest()

void DisplayObjectArray::StretchToNarrowest | ( |  | ) |

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

## ◆ StretchToShortest()

void DisplayObjectArray::StretchToShortest | ( |  | ) |

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

## ◆ StretchToTallest()

void DisplayObjectArray::StretchToTallest | ( |  | ) |

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

## ◆ StretchToWidest()

void 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

  tessType | Type of tessellation to perform

Returns
  DisplayObject * pointer to the new tessellated object

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

- DisplayObjectArray.i