// removes all toasts from a channel virtual void removeToastsFromChannel() { for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { LLToast* toast = (*it); toast->setVisible(FALSE); toast->stopTimer(); m_toast_pool.push_back(toast); } m_active_toasts.clear(); };
void LLNearbyChatScreenChannel::showToastsBottom() { if(mStopProcessing) return; LLRect toast_rect; S32 bottom = getRect().mBottom; S32 margin = gSavedSettings.getS32("ToastGap"); for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { LLToast* toast = (*it); S32 toast_top = bottom + toast->getRect().getHeight() + margin; if(toast_top > gFloaterView->getRect().getHeight()) { while(it!=m_active_toasts.end()) { toast->setVisible(FALSE); toast->stopTimer(); m_toast_pool.push_back(toast); it=m_active_toasts.erase(it); } break; } bottom = toast_top - toast->getTopPad(); } // use reverse order to provide correct z-order and avoid toast blinking for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it) { LLToast* toast = (*it); S32 toast_top = bottom + toast->getTopPad(); toast_rect = toast->getRect(); toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); toast->setIsHidden(false); toast->setVisible(TRUE); bottom = toast->getRect().mBottom - margin; } }