#include <DisplayObjectContainer.h>
Public Member Functions | |
| DisplayObjectContainer (as_object *object, DisplayObject *parent) | |
| virtual | ~DisplayObjectContainer () |
| DisplayObject * | removeChildAt (int index) |
| Remove the DisplayObject at the specified depth. | |
| DisplayObject * | removeChild (DisplayObject *obj) |
| Remove the specified child DisplayObject. | |
| DisplayObject * | addChild (DisplayObject *obj) |
| Add a child DisplayObject at the next suitable index (AS2: depth). | |
| DisplayObject * | addChildAt (DisplayObject *obj, int index) |
| Add a child DisplayObject at the specified index (AS2: depth). | |
| size_t | numChildren () const |
Protected Attributes | |
| DisplayList | _displayList |
| gnash::DisplayObjectContainer::DisplayObjectContainer | ( | as_object * | object, | |
| DisplayObject * | parent | |||
| ) | [inline] |
| gnash::DisplayObjectContainer::~DisplayObjectContainer | ( | ) | [virtual] |
| DisplayObject * gnash::DisplayObjectContainer::addChild | ( | DisplayObject * | obj | ) |
Add a child DisplayObject at the next suitable index (AS2: depth).
TODO: should be a function of DisplayObjectContainer This is the implementation of the AS3-only method DisplayObjectContainer.addChild(), but can also be used for AS2.
| obj | The DisplayObject to add. |
References _displayList, gnash::DisplayList::addDisplayObject(), gnash::DisplayObject::get_parent(), removeChild(), and gnash::DisplayObject::set_parent().
| DisplayObject * gnash::DisplayObjectContainer::addChildAt | ( | DisplayObject * | obj, | |
| int | index | |||
| ) |
Add a child DisplayObject at the specified index (AS2: depth).
TODO: should be a function of DisplayObjectContainer This is the implementation of the AS3-only method DisplayObjectContainer.addChild(), but can also be used for AS2.
| obj | The DisplayObject to add. | |
| index | The index (depth) at which to add the DisplayObject. |
References _displayList, gnash::DisplayObject::get_parent(), gnash::DisplayList::insertDisplayObject(), removeChild(), and gnash::DisplayObject::set_parent().
| size_t gnash::DisplayObjectContainer::numChildren | ( | ) | const [inline] |
References _displayList, and gnash::DisplayList::size().
| DisplayObject * gnash::DisplayObjectContainer::removeChild | ( | DisplayObject * | obj | ) |
Remove the specified child DisplayObject.
TODO: should be a function of DisplayObjectContainer This is the implementation of the AS3-only method DisplayObjectContainer.removeChild(), but can also be used for AS2.
| obj | The DisplayObject to remove. |
References _displayList, gnash::DisplayList::removeDisplayObject(), and gnash::DisplayObject::set_parent().
Referenced by addChild(), and addChildAt().
| DisplayObject * gnash::DisplayObjectContainer::removeChildAt | ( | int | index | ) |
Remove the DisplayObject at the specified depth.
This is the implementation of the AS3-only method DisplayObjectContainer.removeChildAt().
| index | The depth from which to remove a DisplayObject. |
References _displayList, gnash::DisplayList::removeDisplayObjectAt(), and gnash::DisplayObject::set_parent().
1.7.1