void LLNotifyBoxView::showOnly(LLView * view) { if(view) { // assumes that the argument is actually a child LLNotifyBox * shown = dynamic_cast<LLNotifyBox*>(view); if(!shown) { return ; } // make every other notification invisible for(child_list_const_iter_t iter = getChildList()->begin(); iter != getChildList()->end(); iter++) { if(isGroupNotifyBox(*iter)) { continue; } LLNotifyBox * box = (LLNotifyBox*)(*iter); if(box != view && box->getVisible() && !box->isTip()) { box->setVisible(FALSE); } } shown->setVisible(TRUE); sendChildToFront(shown); } }
LLNotifyBox* LLNotifyBoxView::getFirstNontipBox() const { // *TODO: Don't make assumptions like this! // assumes every child is a notify box for(child_list_const_iter_t iter = getChildList()->begin(); iter != getChildList()->end(); iter++) { // hack! *TODO: Integrate llnotify and llgroupnotify if (isGroupNotifyBox(*iter)) continue; LLNotifyBox* box = static_cast<LLNotifyBox*>(*iter); if (!box->isTip() && !box->isDead()) return box; } return NULL; }
void LLNotifyBoxView::purgeMessagesMatching(const Matcher& matcher) { // Make a *copy* of the child list to iterate over // since we'll be removing items from the real list as we go. LLView::child_list_t notification_queue(*getChildList()); for(LLView::child_list_iter_t iter = notification_queue.begin(); iter != notification_queue.end(); iter++) { if (isGroupNotifyBox(*iter)) continue; LLNotifyBox* notification = static_cast<LLNotifyBox*>(*iter); if (matcher.matches(notification->getNotification())) { removeChild(notification); } } }
void LLNotifyBoxView::showOnly(LLView* view) { // assumes that the argument is actually a child if (!dynamic_cast<LLNotifyBox*>(view)) return; // make every other notification invisible for(child_list_const_iter_t iter = getChildList()->begin(); iter != getChildList()->end(); iter++) { if (view == (*iter)) continue; LLView* view(*iter); if (isGroupNotifyBox(view) || !view->getVisible()) continue; if (!static_cast<LLNotifyBox*>(view)->isTip()) view->setVisible(false); } view->setVisible(true); sendChildToFront(view); }