model_server/gala/src/view.cxx
// remove - Removes the view from the view tree.
//    Updates the view and prunes parent if this is the last view in a group.
Removes the view from the view tree.
Updates the view and prunes parent if this is the last view in a group.
Removes the view from the view tree . Updates the view and prunes parent if this is the last view in a group .
void View::remove() {
    if (ViewerOnlyView()) {
        myViewer->DisplayMessage ((unsigned char *)"Cannot remove the last application view in a viewer!");
    } 
    else {
        View* parent = ParentView;
        Viewer* tmpViewer = myViewer;
            delete this;
                View *newView = parent;
        if (!newView) newView = tmpViewer->layerViews;    
        while (newView && !newView->hasBorder_) {
            if (newView->ChildView)
                newView = newView->ChildView;
            else if (newView != tmpViewer->layerViews && newView->RightView) 
                newView = newView->RightView;
            else
                newView = NULL;
        }
        if (newView) newView->MakeCurrent();
        if (parent && parent->ChildView &&
            !parent->ChildView->RightView &&
                (tmpViewer->layerViews != parent)) {
            parent = parent->ChildView->RemoveParentView();
        }
    }    
}
void View :: remove ( ) { if ( ViewerOnlyView ( ) ) { myViewer -> DisplayMessage ( ( unsigned char * ) " " ) ; } else { View * parent = ParentView ; Viewer * tmpViewer = myViewer ; delete this ; View * newView = parent ; if ( ! newView ) newView = tmpViewer -> layerViews ; while ( newView && ! newView -> hasBorder_ ) { if ( newView -> ChildView ) newView = newView -> ChildView ; else if ( newView != tmpViewer -> layerViews && newView -> RightView ) newView = newView -> RightView ; else newView = NULL ; } if ( newView ) newView -> MakeCurrent ( ) ; if ( parent && parent -> ChildView && ! parent -> ChildView -> RightView && ( tmpViewer -> layerViews != parent ) ) { parent = parent -> ChildView -> RemoveParentView ( ) ; } } }
remove - Removes the view from the view tree.
remove - Removes the view from the view tree .
// Make sure I am not the only view in the viewer. // Else, delete the View. // Save a pointer to my grandparent and my Viewer. //    (They are needed to set the Current view.) // Don't call delete later because it will cause too much of a delay before the window refreshes. // Delete the view immediately. //this->DeleteLater(); // Find a new view to make Current. // Use the first view. // but don't use the Viewers layerview's right view as that is the message area. // See if this left an only child.