model_server/gala/src/view.cxx
// SetLeft - Resizes the view to have the left side at the given location.
//    If the new left is beyond the old right
//        This view's size is reduced to zero.
//        Adjust the Right neighbor's Sash.
Resizes the view to have the left side at the given location.
If the new left is beyond the old right
This view's size is reduced to zero.
Adjust the Right neighbor's Sash.
Resizes the view to have the left side at the given location . If the new left is beyond the old right This view ' s size is reduced to zero . Adjust the Right neighbor ' s Sash .
void View::SetLeft (const int newLeft)
{
    int oldRight = myRect.x + myRect.w;
    if (newLeft > oldRight) {
        if (ParentView &&
            (ParentView->view_type == HorizontalGroupView) &&
            RightView && RightView->GetSash() ) {
                RightView->GetSash()->SetX(newLeft + SASH_SIZE +
                                           ParentView->GetAbsoluteX(), gside_left);
            }
        MoveView(newLeft, myRect.y, 0, myRect.h);
    } else {
        int newWidth = myRect.w - (newLeft - myRect.x);
        MoveView(newLeft, myRect.y, newWidth, myRect.h);
    }
}
void View :: SetLeft ( const int newLeft ) { int oldRight = myRect . x + myRect . w ; if ( newLeft > oldRight ) { if ( ParentView && ( ParentView -> view_type == HorizontalGroupView ) && RightView && RightView -> GetSash ( ) ) { RightView -> GetSash ( ) -> SetX ( newLeft + SASH_SIZE + ParentView -> GetAbsoluteX ( ) , gside_left ) ; } MoveView ( newLeft , myRect . y , 0 , myRect . h ) ; } else { int newWidth = myRect . w - ( newLeft - myRect . x ) ; MoveView ( newLeft , myRect . y , newWidth , myRect . h ) ; } }
SetLeft - Resizes the view to have the left side at the given location.
SetLeft - Resizes the view to have the left side at the given location .
// If the new left side is beyond the old right side, ... // ... Set our width to 0 and see if our right neighber needs to move. // If this is a Horizontal Group and ... //  ... our right neighbor has a sash, move it too. // We move our left side and set our width to zero. // Else, Resize to the new left side and width.