model_server/gala/src/viewer.cxx
//our own current view implimentation underneath Galaxy's
our own current view implimentation underneath Galaxy's
our own current view implimentation underneath Galaxy ' s
void Viewer::SetCurrentView (int newViewCode)
{
    gInit (Viewer::SetCurrentView);
    if (layerViews)  {
        View* oldView = layerViews->find_view(currentView);
        View* newView = layerViews->find_view(newViewCode);
        if (newView)  {
            currentView = newViewCode;
            if (menuBar_)
                menuBar_->PropagateState(newView->GetState());
            if (toolBar_)
                toolBar_->SetViewerState((const vchar *)newView->GetState());
            if (newView->GetPane())    
                newView->GetPane()->DrawBorder();
        }
        if (oldView)
            if (oldView->GetPane())    
                oldView->GetPane()->DrawBorder();
        if (newView) {    
            Layer * vLayer = newView->GetLayer();
            if (vLayer && !Y2K_FLAG)
                rcall_dis_set_layer(Application::findApplication("DISmain"),
                                    vLayer->getId());
        }
    }
}
void Viewer :: SetCurrentView ( int newViewCode ) { gInit ( Viewer :: SetCurrentView ) ; if ( layerViews ) { View * oldView = layerViews -> find_view ( currentView ) ; View * newView = layerViews -> find_view ( newViewCode ) ; if ( newView ) { currentView = newViewCode ; if ( menuBar_ ) menuBar_ -> PropagateState ( newView -> GetState ( ) ) ; if ( toolBar_ ) toolBar_ -> SetViewerState ( ( const vchar * ) newView -> GetState ( ) ) ; if ( newView -> GetPane ( ) ) newView -> GetPane ( ) -> DrawBorder ( ) ; } if ( oldView ) if ( oldView -> GetPane ( ) ) oldView -> GetPane ( ) -> DrawBorder ( ) ; if ( newView ) { Layer * vLayer = newView -> GetLayer ( ) ; if ( vLayer && ! Y2K_FLAG ) rcall_dis_set_layer ( Application :: findApplication ( " " ) , vLayer -> getId ( ) ) ; } } }
our own current view implimentation underneath Galaxy's
our own current view implimentation underneath Galaxy ' s
// Highlight the new view. // Unhighlight the old view. // Make the layer the current layer.