void ViewManager::eventOccured( ViewEvent ve, View * view ) //--------------------------------------------------------- // call kill on VEGettingFocus and VELosingFocus events // since under OS/2, these occur before the window is // destroyed!! { int i; // perform special actions on some events // switch( ve ) { case VEGettingFocus: if( view != _hasFocus ) { _hasFocus = view; sendEvent( ve, view ); } break; case VELosingFocus: if( view == _hasFocus ) { sendEvent( ve, view ); } _hasFocus = NULL; break; case VEBrowseFileChange: /* the loop has to be in reverse order since the aboutToClose * call removes the receiver from the array */ for( i = _detailViews->entries(); i > 0; i -= 1 ) { DetailView * dtv = (*_detailViews)[ i - 1 ]; dtv->aboutToClose(); } sendEvent( ve, view ); kill(); break; default: sendEvent( ve, view ); kill(); } }
void GlobalViewList::toggleDetail( WWindow * ) //-------------------------------------------- { WRect rect; int sel = selected(); Symbol * sym; DetailView * dtv; sym = getSymbol( sel ); if( sym ) { dtv = viewManager()->findDetailView( sym, DetailView::ViewDetail ); if( !dtv ) { popDetail( sym ); } else { dtv->aboutToClose(); viewManager()->kill(); } } }