model_server/gala/src/view.cxx
/*  This method draws the 3-d border around the pane.  After first checking that
    this pane is actually supposed to have a border and that it hasn't been shrunk
    down to zero width or zero height (squashed between two sashes), it will look to
    see what sort of border it should have.  If it is the current or target view, it
    will load the color from the .vr, shading it to produce a second color for 3-d 
    effect.  Otherwise, it will just pick colors based on the colors of the pane.
    It then creates a rectangle that defines the actual border and calls the 3d
    routines to draw the rectangle on it.  Note: the built-in galaxy 3d border
    commands were not used because they were found to generate garbage all over the
    screen.
 */
This method draws the 3-d border around the pane.  After first checking that
this pane is actually supposed to have a border and that it hasn't been shrunk
down to zero width or zero height (squashed between two sashes), it will look to
see what sort of border it should have.  If it is the current or target view, it
will load the color from the .vr, shading it to produce a second color for 3-d
effect.  Otherwise, it will just pick colors based on the colors of the pane.
It then creates a rectangle that defines the actual border and calls the 3d
routines to draw the rectangle on it.  Note: the built-in galaxy 3d border
commands were not used because they were found to generate garbage all over the
screen.
This method draws the 3 - d border around the pane . After first checking that this pane is actually supposed to have a border and that it hasn ' t been shrunk down to zero width or zero height ( squashed between two sashes ) it will look to see what sort of border it should have . If it is the current or target view it will load the color from the . vr shading it to produce a second color for 3 - d effect . Otherwise it will just pick colors based on the colors of the pane . It then creates a rectangle that defines the actual border and calls the 3d routines to draw the rectangle on it . Note : the built - in galaxy 3d border commands were not used because they were found to generate garbage all over the screen .
void Pane::DrawBorder()
{
    if (myOwner && (myOwner->hasBorder_) && GetWidth() &&
        GetHeight() && !myOwner->Unsplitable_) {
        vdraw::GSave();
        DrawDevice();
        vcolor* topColor;
        vcolor* bottomColor = NULL;
        vcolor* colors[2];
        if ((myOwner->id == myOwner->myViewer->GetViewCode()) ||
            (myOwner->targ)) {
            vcolorSpec * newcolorspec = new vcolorSpec;
            if (myOwner->targ) 
                bottomColor = Viewer::GetCurrentPaneBorder();
            else 
                bottomColor = Viewer::GetTargetPaneBorder();
            if (bottomColor) {
                unsigned int hue, light, sat, newLight;
                newcolorspec->Copy(bottomColor->GetSpec());
                newcolorspec->GetHLS(&hue, &light, &sat);
                if (light < MAX_LIGHT)
                    newLight = (unsigned int)((float)light * LIGHTNESS);
                else
                    newLight = (unsigned int)((float)light * DARKNESS);
                newcolorspec->SetHLS(hue, newLight, sat);
                topColor = vcolor::Intern(newcolorspec);
                if (newLight < MAX_LIGHT) {
                    vcolor* temp = topColor;
                    topColor = bottomColor;
                    bottomColor = temp;
                }
            }
            if (newcolorspec)
                 delete newcolorspec;
        }
        if (!bottomColor) {    
            static int colorIDs[2] = { vdrawCOLOR_SHADOW_TOP,
                                       vdrawCOLOR_SHADOW_BOTTOM };
            if (myOwner->myViewer->GetDialog() )
                myOwner->myViewer->GetDialog()->DetermineColors(colorIDs, 2, colors);
            topColor = colors[1];
            bottomColor = colors[0];
        }
        Draw3DBottomRight(&invalRect_, BORDER, bottomColor);
        Draw3DTopLeft(&invalRect_, BORDER, bottomColor);
        vdraw::GRestore();
    }
}
void Pane :: DrawBorder ( ) { if ( myOwner && ( myOwner -> hasBorder_ ) && GetWidth ( ) && GetHeight ( ) && ! myOwner -> Unsplitable_ ) { vdraw :: GSave ( ) ; DrawDevice ( ) ; vcolor * topColor ; vcolor * bottomColor = NULL ; vcolor * colors [ 2 ] ; if ( ( myOwner -> id == myOwner -> myViewer -> GetViewCode ( ) ) || ( myOwner -> targ ) ) { vcolorSpec * newcolorspec = new vcolorSpec ; if ( myOwner -> targ ) bottomColor = Viewer :: GetCurrentPaneBorder ( ) ; else bottomColor = Viewer :: GetTargetPaneBorder ( ) ; if ( bottomColor ) { unsigned int hue , light , sat , newLight ; newcolorspec -> Copy ( bottomColor -> GetSpec ( ) ) ; newcolorspec -> GetHLS ( & hue , & light , & sat ) ; if ( light < MAX_LIGHT ) newLight = ( unsigned int ) ( ( float ) light * LIGHTNESS ) ; else newLight = ( unsigned int ) ( ( float ) light * DARKNESS ) ; newcolorspec -> SetHLS ( hue , newLight , sat ) ; topColor = vcolor :: Intern ( newcolorspec ) ; if ( newLight < MAX_LIGHT ) { vcolor * temp = topColor ; topColor = bottomColor ; bottomColor = temp ; } } if ( newcolorspec ) delete newcolorspec ; } if ( ! bottomColor ) { static int colorIDs [ 2 ] = { vdrawCOLOR_SHADOW_TOP , vdrawCOLOR_SHADOW_BOTTOM } ; if ( myOwner -> myViewer -> GetDialog ( ) ) myOwner -> myViewer -> GetDialog ( ) -> DetermineColors ( colorIDs , 2 , colors ) ; topColor = colors [ 1 ] ; bottomColor = colors [ 0 ] ; } Draw3DBottomRight ( & invalRect_ , BORDER , bottomColor ) ; Draw3DTopLeft ( & invalRect_ , BORDER , bottomColor ) ; vdraw :: GRestore ( ) ; } }
This method draws the 3-d border around the pane.
This method draws the 3 - d border around the pane .
// No colors found. // Just load in the colors for the 3d border