//--------------------------------------------------------------------- void OverlayContainer::_addChild(OverlayElement* elem) { if (elem->isContainer()) { addChildImpl(static_cast<OverlayContainer*>(elem)); } else { addChildImpl(elem); } }
//--------------------------------------------------------------------- void OverlayContainer::addChildImpl(OverlayContainer* cont) { // Add to main map first // This will pick up duplicates OverlayElement* pElem = cont; addChildImpl(pElem); /* cont->_notifyParent(this, mOverlay); cont->_notifyZOrder(mZOrder + 1); cont->_notifyWorldTransforms(mXForm); // tell children of new container the current overlay ChildIterator it = cont->getChildIterator(); while (it.hasMoreElements()) { // Give children Z-order 1 higher than this GuiElement* pElemChild = it.getNext(); pElemChild->_notifyParent(cont, mOverlay); pElemChild->_notifyZOrder(cont->getZOrder() + 1); pElemChild->_notifyWorldTransforms(mXForm); } */ // Now add to specific map too mChildContainers.insert(ChildContainerMap::value_type(cont->getName(), cont)); }
int NativeScrollViewObject::initialize() { contentViewProxy_ = new NativeScrollViewContentObject(tiObject_, this); contentView_ = (bb::cascades::Container*)contentViewProxy_->getNativeHandle(); scrollView_ = bb::cascades::ScrollView::create(); nativeContentView_ = bb::cascades::Container::create(); setControl(scrollView_); addChildImpl(contentViewProxy_); nativeContentView_->add(contentView_); scrollView_->setContent(nativeContentView_); scrollViewProperties_ = scrollView_->scrollViewProperties(); ScrollViewEventHandler *eventHandler_ = new ScrollViewEventHandler(this); bb::cascades::LayoutUpdateHandler::create(nativeContentView_).onLayoutFrameChanged(eventHandler_, SLOT(onContainerLayoutChange(QRectF))); contentSize_ = QSize(0,0); scrollViewSize_ = QSize(0,0); return NATIVE_ERROR_OK; }