OverlayElement* OverlayContainer::clone(const String& instanceName) { OverlayContainer *newContainer; newContainer = static_cast<OverlayContainer*>(OverlayElement::clone(instanceName)); ChildIterator it = getChildIterator(); while (it.hasMoreElements()) { OverlayElement* oldChildElement = it.getNext(); if (oldChildElement->isCloneable()) { OverlayElement* newChildElement = oldChildElement->clone(instanceName); newContainer->_addChild(newChildElement); } } return newContainer; }
//--------------------------------------------------------------------- OverlayElement* OverlayManager::cloneOverlayElementFromTemplate(const String& templateName, const String& instanceName) { OverlayElement* templateGui = getOverlayElement(templateName, true); return templateGui->clone(instanceName); }