void nuiScrollView::OnChildAdded(const nuiEvent& rEvent) { const nuiTreeEvent<nuiWidget>* pTreeEvent = dynamic_cast<const nuiTreeEvent<nuiWidget>*>(&rEvent); nuiWidgetPtr pNode = dynamic_cast<nuiWidgetPtr>(pTreeEvent->mpChild); if (pNode) { mSVSink.Connect(pNode->HotRectChanged, &nuiScrollView::OnHotRectChanged, pNode); } // The scroll bar must be the first to get mouse events, so let's put them on top of the list: if (!mHorizontalIsExternal && mpHorizontal) { RaiseChildToFront(mpHorizontal); } if (!mVerticalIsExternal && mpVertical) { RaiseChildToFront(mpVertical); } }
bool nuiWindowManager::ActivateWindow(nuiWindow* pWin) { nuiTopLevel* pRoot = GetTopLevel(); NGL_ASSERT(pRoot != NULL); pRoot->CancelGrab(); pRoot->SetFocus(NULL); mWindows.remove(pWin); mWindows.push_back(pWin); RaiseChildToFront(pWin); pWin->Invalidate(); Invalidate(); return true; }