// static void LLModalDialog::onAppFocusLost() { if( !sModalStack.empty() ) { LLModalDialog* instance = LLModalDialog::sModalStack.front(); if( gFocusMgr.childHasMouseCapture( instance ) ) { gFocusMgr.setMouseCapture( NULL ); } instance->setFocus(FALSE); } }
// static void LLModalDialog::onAppFocusGained() { if( !sModalStack.empty() ) { LLModalDialog* instance = LLModalDialog::sModalStack.front(); // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( instance ); instance->setFocus(TRUE); gFocusMgr.setTopCtrl( instance ); instance->centerOnScreen(); } }
// virtual void LLModalDialog::onOpen(const LLSD& key) { if (mModal) { // If Modal, Hide the active modal dialog if (!sModalStack.empty()) { LLModalDialog* front = sModalStack.front(); front->setVisible(FALSE); } // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( this ); LLUI::addPopup(this); setFocus(TRUE); sModalStack.push_front( this ); } }
void LLModalDialog::startModal() { if (mModal) { // If Modal, Hide the active modal dialog if (!sModalStack.empty()) { LLModalDialog* front = sModalStack.front(); front->setVisible(FALSE); } // This is a modal dialog. It sucks up all mouse and keyboard operations. gFocusMgr.setMouseCapture( this ); gFocusMgr.setTopCtrl( this ); setFocus(TRUE); sModalStack.push_front( this ); } setVisible( TRUE ); }
void LLModalDialog::stopModal() { gFocusMgr.unlockFocus(); gFocusMgr.releaseFocusIfNeeded( this ); if (mModal) { std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); if (iter != sModalStack.end()) { sModalStack.erase(iter); } else { llwarns << "LLModalDialog::stopModal not in list!" << llendl; } } if (!sModalStack.empty()) { LLModalDialog* front = sModalStack.front(); front->setVisible(TRUE); } }