Index: trunk/src/helpers/cctl_splitwin.c
===================================================================
--- trunk/src/helpers/cctl_splitwin.c	(revision 213)
+++ trunk/src/helpers/cctl_splitwin.c	(revision 214)
@@ -95,58 +95,86 @@
  *
  *@@added V0.9.1 (2000-02-05) [umoeller]
+ *@@changed V0.9.21 (2002-08-24) [umoeller]: added SBCF_3DEXPLORERSTYLE
  */
 
 static VOID PaintSplitWindow(HWND hwndSplit)
 {
-    HPS     hps = WinBeginPaint(hwndSplit, (HPS)0, NULL);
-    HWND    hwndSplitBar = WinWindowFromID(hwndSplit, ID_SPLITBAR);
-    PSPLITBARDATA pData = (PSPLITBARDATA)WinQueryWindowULong(hwndSplitBar,
-                                                             QWL_USER);
-
-    if ((pData->hwndLinked1) && (pData->hwndLinked2))
+    HPS hps;
+
+    if (hps = WinBeginPaint(hwndSplit, (HPS)0, NULL))
     {
-        // "3D-sunk" style?
-        if (pData->sbcd.ulCreateFlags & SBCF_3DSUNK)
-        {
-            // yes: draw sunk frame around split windows
-            POINTL  ptl1;
+        HWND    hwndSplitBar = WinWindowFromID(hwndSplit, ID_SPLITBAR);
+        PSPLITBARDATA pData = (PSPLITBARDATA)WinQueryWindowULong(hwndSplitBar,
+                                                                 QWL_USER);
+
+        if ((pData->hwndLinked1) && (pData->hwndLinked2))
+        {
             SWP     swp;
 
             // switch to RGB mode
-            GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
-
-            WinQueryWindowPos(pData->hwndLinked1, &swp);
-            GpiSetColor(hps, WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONDARK, 0));
-            ptl1.x = swp.x - 1;
-            ptl1.y = swp.y - 1;
-            GpiMove(hps, &ptl1);
-            ptl1.y = swp.y + swp.cy;
-            GpiLine(hps, &ptl1);
-            ptl1.x = swp.x + swp.cx;
-            GpiLine(hps, &ptl1);
-            GpiSetColor(hps, WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONLIGHT, 0));
-            ptl1.y = swp.y - 1;
-            GpiLine(hps, &ptl1);
-            ptl1.x = swp.x - 1;
-            GpiLine(hps, &ptl1);
-
-            WinQueryWindowPos(pData->hwndLinked2, &swp);
-            GpiSetColor(hps, WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONDARK, 0));
-            ptl1.x = swp.x - 1;
-            ptl1.y = swp.y - 1;
-            GpiMove(hps, &ptl1);
-            ptl1.y = swp.y + swp.cy;
-            GpiLine(hps, &ptl1);
-            ptl1.x = swp.x + swp.cx;
-            GpiLine(hps, &ptl1);
-            GpiSetColor(hps, WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONLIGHT, 0));
-            ptl1.y = swp.y - 1;
-            GpiLine(hps, &ptl1);
-            ptl1.x = swp.x - 1;
-            GpiLine(hps, &ptl1);
-        }
+            gpihSwitchToRGB(hps);
+
+            // "3D-sunk" style?
+            if (pData->sbcd.ulCreateFlags & SBCF_3DEXPLORERSTYLE)
+            {
+                // this style is new with V0.9.21 (2002-08-24) [umoeller];
+                // simulate the Warp 4 entry field margins around the
+                // right control only, but leave the left control flat.
+                RECTL rcl;
+                WinQueryWindowPos(pData->hwndLinked2, &swp);
+                rcl.xLeft = swp.x - 2;
+                rcl.yBottom = swp.y - 2;
+                rcl.xRight = swp.x + swp.cx + 1;
+                rcl.yTop = swp.y + swp.cy + 1;
+                gpihDraw3DFrame2(hps,
+                                 &rcl,
+                                 1,
+                                 RGBCOL_BLACK,
+                                 pData->lcol3DLight);
+                gpihDraw3DFrame2(hps,
+                                 &rcl,
+                                 1,
+                                 RGBCOL_BLACK,
+                                 pData->lcolInactiveBorder);
+            }
+            else if (pData->sbcd.ulCreateFlags & SBCF_3DSUNK)
+            {
+                // yes: draw sunk frame around split windows
+                POINTL  ptl1;
+
+                WinQueryWindowPos(pData->hwndLinked1, &swp);
+                GpiSetColor(hps, pData->lcol3DDark);
+                ptl1.x = swp.x - 1;
+                ptl1.y = swp.y - 1;
+                GpiMove(hps, &ptl1);
+                ptl1.y = swp.y + swp.cy;
+                GpiLine(hps, &ptl1);
+                ptl1.x = swp.x + swp.cx;
+                GpiLine(hps, &ptl1);
+                GpiSetColor(hps, pData->lcol3DLight);
+                ptl1.y = swp.y - 1;
+                GpiLine(hps, &ptl1);
+                ptl1.x = swp.x - 1;
+                GpiLine(hps, &ptl1);
+
+                WinQueryWindowPos(pData->hwndLinked2, &swp);
+                GpiSetColor(hps, pData->lcol3DDark);
+                ptl1.x = swp.x - 1;
+                ptl1.y = swp.y - 1;
+                GpiMove(hps, &ptl1);
+                ptl1.y = swp.y + swp.cy;
+                GpiLine(hps, &ptl1);
+                ptl1.x = swp.x + swp.cx;
+                GpiLine(hps, &ptl1);
+                GpiSetColor(hps, pData->lcol3DLight);
+                ptl1.y = swp.y - 1;
+                GpiLine(hps, &ptl1);
+                ptl1.x = swp.x - 1;
+                GpiLine(hps, &ptl1);
+            }
+        }
+
+        WinEndPaint(hps);
     }
-
-    WinEndPaint(hps);
 }
 
@@ -407,67 +435,56 @@
             rclBar;
     POINTL  ptl1;
-    hps = WinBeginPaint(hwndBar, NULLHANDLE, &rcl);
-    WinQueryWindowRect(hwndBar, &rclBar);
-    // switch to RGB mode
-    GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
-
-    // inflate top and right, because WinFillRect
-    // considers this inclusive
-    /* rclBar.xRight++;
-    rclBar.yTop++; */
-
-    WinFillRect(hps,
-                &rclBar,
-                WinQuerySysColor(HWND_DESKTOP,
-                                 SYSCLR_INACTIVEBORDER,
-                                 0));
-
-    if ((pData->sbcd.ulCreateFlags & SBCF_3DSUNK) == 0)
+    if (hps = WinBeginPaint(hwndBar, NULLHANDLE, &rcl))
     {
-        GpiSetColor(hps,
-                    WinQuerySysColor(HWND_DESKTOP,
-                                     SYSCLR_BUTTONLIGHT,
-                                     0));
-        // draw left border (bottom to up)
-        ptl1.x = 0;
-        ptl1.y = 0;
-        GpiMove(hps, &ptl1);
-        ptl1.y = (rclBar.yTop - rclBar.yBottom) - 1;
-        if (pData->sbcd.ulCreateFlags & SBCF_VERTICAL)
-            // vertical:
-            GpiLine(hps, &ptl1);
-        else
+        WinQueryWindowRect(hwndBar, &rclBar);
+        // switch to RGB mode
+        GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
+
+        WinFillRect(hps,
+                    &rclBar,
+                    pData->lcolInactiveBorder);
+
+        if ((pData->sbcd.ulCreateFlags & SBCF_3DSUNK) == 0)
+        {
+            GpiSetColor(hps, pData->lcol3DLight);
+            // draw left border (bottom to up)
+            ptl1.x = 0;
+            ptl1.y = 0;
             GpiMove(hps, &ptl1);
-
-        // draw top border (to right)
-        ptl1.x = (rclBar.xRight - rclBar.xLeft) - 1;
-        if (pData->sbcd.ulCreateFlags & SBCF_VERTICAL)
-            // vertical:
-            GpiMove(hps, &ptl1);
-        else
-            GpiLine(hps, &ptl1);
-
-        GpiSetColor(hps,
-                    WinQuerySysColor(HWND_DESKTOP,
-                                     SYSCLR_BUTTONDARK,
-                                     0));
-        // draw right border (to bottom)
-        ptl1.y = 0;
-        if (pData->sbcd.ulCreateFlags & SBCF_VERTICAL)
-            // vertical:
-            GpiLine(hps, &ptl1);
-        else
-            GpiMove(hps, &ptl1);
-
-        if (!(pData->sbcd.ulCreateFlags & SBCF_VERTICAL))
-        {
-            // horizontal:
-            // draw bottom border
-            ptl1.x = 0;
-            GpiLine(hps, &ptl1);
-        }
+            ptl1.y = (rclBar.yTop - rclBar.yBottom) - 1;
+            if (pData->sbcd.ulCreateFlags & SBCF_VERTICAL)
+                // vertical:
+                GpiLine(hps, &ptl1);
+            else
+                GpiMove(hps, &ptl1);
+
+            // draw top border (to right)
+            ptl1.x = (rclBar.xRight - rclBar.xLeft) - 1;
+            if (pData->sbcd.ulCreateFlags & SBCF_VERTICAL)
+                // vertical:
+                GpiMove(hps, &ptl1);
+            else
+                GpiLine(hps, &ptl1);
+
+            GpiSetColor(hps, pData->lcol3DDark);
+            // draw right border (to bottom)
+            ptl1.y = 0;
+            if (pData->sbcd.ulCreateFlags & SBCF_VERTICAL)
+                // vertical:
+                GpiLine(hps, &ptl1);
+            else
+                GpiMove(hps, &ptl1);
+
+            if (!(pData->sbcd.ulCreateFlags & SBCF_VERTICAL))
+            {
+                // horizontal:
+                // draw bottom border
+                ptl1.x = 0;
+                GpiLine(hps, &ptl1);
+            }
+        }
+
+        WinEndPaint(hps);
     }
-
-    WinEndPaint(hps);
 }
 
@@ -769,8 +786,5 @@
                 // copy control data
                 memcpy(&(pData->sbcd), psbcd, sizeof(SPLITBARCDATA));
-                // set other data
-                /* WinQueryWindowRect(hwndBar, &(pData->rclBar));
-                (pData->rclBar.xRight)--;
-                (pData->rclBar.yTop)--; */
+
                 // subclass static control to make it a split bar
                 pData->OldStaticProc = WinSubclassWindow(hwndBar, ctl_fnwpSplitBar);
@@ -785,4 +799,9 @@
                 pData->hwndLinked2 = NULLHANDLE;
 
+                // caching these colors now V0.9.21 (2002-08-21) [umoeller]
+                pData->lcol3DDark = WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONDARK, 0);
+                pData->lcol3DLight = WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONLIGHT, 0);
+                pData->lcolInactiveBorder = WinQuerySysColor(HWND_DESKTOP, SYSCLR_INACTIVEBORDER, 0);
+
                 WinSetWindowULong(hwndBar, QWL_USER, (ULONG)pData);
             }
@@ -806,4 +825,5 @@
  *
  *@@added V0.9.0 [umoeller]
+ *@@changed V0.9.21 (2002-08-24) [umoeller]: added support for SBCF_3DEXPLORERSTYLE
  */
 
@@ -811,164 +831,160 @@
 {
     BOOL    brc = FALSE;
-    HWND    hwndSplitBar = WinWindowFromID(hwndSplit, ID_SPLITBAR);
-
-    if (hwndSplitBar)
+    HWND    hwndSplitBar;
+    PSPLITBARDATA psbd;
+
+    if (    (hwndSplitBar = WinWindowFromID(hwndSplit, ID_SPLITBAR))
+         && (psbd = (PSPLITBARDATA)WinQueryWindowPtr(hwndSplitBar, QWL_USER))
+       )
     {
-        PSPLITBARDATA psbd = (PSPLITBARDATA)WinQueryWindowULong(hwndSplitBar, QWL_USER);
-
-        if (psbd)
-        {
-            PSPLITBARCDATA  psbcd = &(psbd->sbcd);
-            RECTL           rclSplit,
-                            rclBar;
-            ULONG           ul3DOfs = 0;
-
-            // _Pmpf(("Entering ctlUpdateSplitWindow for hwndSplit 0x%lX", hwndSplit));
-
-            // query the rectangle of the split window's parent;
-            // this is either the client or another split window
-            WinQueryWindowRect(hwndSplit, &rclSplit);
-
-            /* _Pmpf(("  rect: %d, %d, %d, %d",
-                            rclSplit.xLeft,
-                            rclSplit.yBottom,
-                            rclSplit.xRight - rclSplit.xLeft,
-                            rclSplit.yTop - rclSplit.yBottom)); */
-
-            // set anti-recursion flag;
-            // this is neccessary, because ctl_fnwpSplitWindow
-            // calls this func again when
-            // WM_WINDOWPOSCHANGED comes in
-            // psbd->fNoAdjust = TRUE;
-            // set split window to the same
-            /* WinSetWindowPos(hwndSplit, HWND_TOP,
-                            rclSplit.xLeft,
-                            rclSplit.yBottom,
-                            rclSplit.xRight - rclSplit.xLeft,
-                            rclSplit.yTop - rclSplit.yBottom,
-                            SWP_MOVE | SWP_SIZE); */
-            // psbd->fNoAdjust = FALSE;
-
-            // update split bar
-            if (psbcd->ulCreateFlags & SBCF_HORIZONTAL)
-            {
-                // _Pmpf(("  Calc horizontal"));
-                // horizontal split bar:
-                if (psbcd->ulCreateFlags & SBCF_PERCENTAGE)
-                    // take height of client and apply percentage
+        PSPLITBARCDATA  psbcd = &(psbd->sbcd);
+        RECTL           rclSplit,
+                        rclBar;
+        LONG            l3DOfsLink1 = 0,
+                        l3DOfsLink2 = 0;
+
+        // _Pmpf(("Entering ctlUpdateSplitWindow for hwndSplit 0x%lX", hwndSplit));
+
+        // query the rectangle of the split window's parent;
+        // this is either the client or another split window
+        WinQueryWindowRect(hwndSplit, &rclSplit);
+
+        /* _Pmpf(("  rect: %d, %d, %d, %d",
+                        rclSplit.xLeft,
+                        rclSplit.yBottom,
+                        rclSplit.xRight - rclSplit.xLeft,
+                        rclSplit.yTop - rclSplit.yBottom)); */
+
+        // update split bar
+        if (psbcd->ulCreateFlags & SBCF_HORIZONTAL)
+        {
+            // _Pmpf(("  Calc horizontal"));
+            // horizontal split bar:
+            if (psbcd->ulCreateFlags & SBCF_PERCENTAGE)
+                // take height of client and apply percentage
+                rclBar.yBottom = (rclSplit.yTop - rclSplit.yBottom)
+                                * psbcd->lPos
+                                / 100;
+            else
+                if (psbcd->lPos > 0)
+                    // offset from bottom:
+                    rclBar.yBottom = psbcd->lPos;
+                else
+                    // offset from right:
                     rclBar.yBottom = (rclSplit.yTop - rclSplit.yBottom)
-                                    * psbcd->lPos
-                                    / 100;
+                                     + psbcd->lPos;  // which is negative
+
+            rclBar.yTop = rclBar.yBottom + WinQuerySysValue(HWND_DESKTOP,
+                                                            SV_CXSIZEBORDER);
+            rclBar.xLeft = 0;
+            // take width of client
+            rclBar.xRight = (rclSplit.xRight - rclSplit.xLeft);
+        }
+        else
+        {
+            // _Pmpf(("  Calc vertical"));
+            // vertical split bar:
+            if (psbcd->ulCreateFlags & SBCF_PERCENTAGE)
+                // take width of client and apply percentage
+                rclBar.xLeft = (rclSplit.xRight - rclSplit.xLeft)
+                                * psbcd->lPos
+                                / 100;
+            else
+                if (psbcd->lPos > 0)
+                    // offset from left:
+                    rclBar.xLeft = psbcd->lPos;
                 else
-                    if (psbcd->lPos > 0)
-                        // offset from bottom:
-                        rclBar.yBottom = psbcd->lPos;
-                    else
-                        // offset from right:
-                        rclBar.yBottom = (rclSplit.yTop - rclSplit.yBottom)
-                                         + psbcd->lPos;  // which is negative
-
-                rclBar.yTop = rclBar.yBottom + WinQuerySysValue(HWND_DESKTOP,
-                                                                SV_CXSIZEBORDER);
-                rclBar.xLeft = 0;
-                // take width of client
-                rclBar.xRight = (rclSplit.xRight - rclSplit.xLeft);
-            }
-            else
-            {
-                // _Pmpf(("  Calc vertical"));
-                // vertical split bar:
-                if (psbcd->ulCreateFlags & SBCF_PERCENTAGE)
-                    // take width of client and apply percentage
+                    // offset from right:
                     rclBar.xLeft = (rclSplit.xRight - rclSplit.xLeft)
-                                    * psbcd->lPos
-                                    / 100;
-                else
-                    if (psbcd->lPos > 0)
-                        // offset from left:
-                        rclBar.xLeft = psbcd->lPos;
-                    else
-                        // offset from right:
-                        rclBar.xLeft = (rclSplit.xRight - rclSplit.xLeft)
-                                       + psbcd->lPos;  // which is negative
-
-                rclBar.xRight = rclBar.xLeft + WinQuerySysValue(HWND_DESKTOP,
-                                                                SV_CXSIZEBORDER);
-                rclBar.yBottom = 0;
-                // take height of client
-                rclBar.yTop = (rclSplit.yTop - rclSplit.yBottom);
-            }
-
-            // reposition split bar
-            brc = WinSetWindowPos(hwndSplitBar,
-                                  HWND_TOP,
-                                  rclBar.xLeft,
-                                  rclBar.yBottom,
-                                  rclBar.xRight - rclBar.xLeft,
-                                  rclBar.yTop - rclBar.yBottom,
-                                  SWP_MOVE | SWP_SIZE);
-
-            /* _Pmpf(("  Set splitbar hwnd %lX to %d, %d, %d, %d; rc: %d",
-                            hwndSplitBar,
-                            rclBar.xLeft,
-                            rclBar.yBottom,
-                            rclBar.xRight - rclBar.xLeft,
-                            rclBar.yTop - rclBar.yBottom,
-                            brc)); */
-
-            // reposition left/bottom window of split bar
-            if (psbcd->ulCreateFlags & SBCF_3DSUNK)
-                ul3DOfs = 1;
-            // else 0
-
-            // now reposition the linked windows
-            if (psbcd->ulCreateFlags & SBCF_HORIZONTAL)
-            {
-                // horizontal:
-                // reposition bottom window of split bar
-                WinSetWindowPos(psbd->hwndLinked1,
-                                HWND_TOP,
-                                ul3DOfs,
-                                ul3DOfs,
-                                rclBar.xRight - rclBar.xLeft - ul3DOfs*2,
-                                rclBar.yBottom - ul3DOfs*2,       // the window rect is non-inclusive
-                                SWP_MOVE | SWP_SIZE);
-
-                // reposition top window of split bar
-                WinSetWindowPos(psbd->hwndLinked2,
-                                HWND_TOP,
-                                ul3DOfs,
-                                rclBar.yTop + ul3DOfs,    // the window rect is non-inclusive
-                                rclBar.xRight - rclBar.xLeft - ul3DOfs*2,
-                                rclSplit.yTop - rclBar.yTop - ul3DOfs*2,
-                                SWP_MOVE | SWP_SIZE);
-            }
-            else
-            {
-                // vertical:
-                // reposition left window of split bar
-                WinSetWindowPos(psbd->hwndLinked1,
-                                HWND_TOP,
-                                ul3DOfs,
-                                ul3DOfs,
-                                rclBar.xLeft - ul3DOfs*2,       // the window rect is non-inclusive
-                                rclBar.yTop - rclBar.yBottom - ul3DOfs*2,
-                                SWP_MOVE | SWP_SIZE);
-
-                // reposition right window of split bar
-                WinSetWindowPos(psbd->hwndLinked2,
-                                HWND_TOP,
-                                rclBar.xRight + ul3DOfs,    // the window rect is non-inclusive
-                                ul3DOfs,
-                                rclSplit.xRight - rclBar.xRight - ul3DOfs*2,
-                                rclBar.yTop - rclBar.yBottom - ul3DOfs*2,
-                                SWP_MOVE | SWP_SIZE);
-            }
-
-            // repaint split window (3D frame)
-            WinInvalidateRect(hwndSplit,
-                              NULL,         // all
-                              FALSE);       // don't repaint children
-        }
+                                   + psbcd->lPos;  // which is negative
+
+            rclBar.xRight = rclBar.xLeft + WinQuerySysValue(HWND_DESKTOP,
+                                                            SV_CXSIZEBORDER);
+            rclBar.yBottom = 0;
+            // take height of client
+            rclBar.yTop = (rclSplit.yTop - rclSplit.yBottom);
+        }
+
+        // reposition split bar
+        brc = WinSetWindowPos(hwndSplitBar,
+                              HWND_TOP,
+                              rclBar.xLeft,
+                              rclBar.yBottom,
+                              rclBar.xRight - rclBar.xLeft,
+                              rclBar.yTop - rclBar.yBottom,
+                              SWP_MOVE | SWP_SIZE);
+
+        /* _Pmpf(("  Set splitbar hwnd %lX to %d, %d, %d, %d; rc: %d",
+                        hwndSplitBar,
+                        rclBar.xLeft,
+                        rclBar.yBottom,
+                        rclBar.xRight - rclBar.xLeft,
+                        rclBar.yTop - rclBar.yBottom,
+                        brc)); */
+
+        // reposition left/bottom window of split bar
+        if (psbcd->ulCreateFlags & SBCF_3DEXPLORERSTYLE)
+        {
+            l3DOfsLink2 = 2;
+        }
+        else if (psbcd->ulCreateFlags & SBCF_3DSUNK)
+        {
+            l3DOfsLink1 = 1;
+            l3DOfsLink2 = 1;
+        }
+        // else 0
+
+        // now reposition the linked windows
+        if (psbcd->ulCreateFlags & SBCF_HORIZONTAL)
+        {
+            // horizontal:
+            // reposition bottom window of split bar
+            WinSetWindowPos(psbd->hwndLinked1,
+                            HWND_TOP,
+                            l3DOfsLink1,
+                            l3DOfsLink1,
+                            rclBar.xRight - rclBar.xLeft - 2 * l3DOfsLink1,
+                            rclBar.yBottom - 2 * l3DOfsLink1,
+                                    // the window rect is non-inclusive
+                            SWP_MOVE | SWP_SIZE);
+
+            // reposition top window of split bar
+            WinSetWindowPos(psbd->hwndLinked2,
+                            HWND_TOP,
+                            l3DOfsLink2,
+                            rclBar.yTop + l3DOfsLink2,
+                                    // the window rect is non-inclusive
+                            rclBar.xRight - rclBar.xLeft - 2 * l3DOfsLink2,
+                            rclSplit.yTop - rclBar.yTop - 2 * l3DOfsLink2,
+                            SWP_MOVE | SWP_SIZE);
+        }
+        else
+        {
+            // vertical:
+            // reposition left window of split bar
+            WinSetWindowPos(psbd->hwndLinked1,
+                            HWND_TOP,
+                            l3DOfsLink1,
+                            l3DOfsLink1,
+                            rclBar.xLeft - 2 * l3DOfsLink1,
+                                    // the window rect is non-inclusive
+                            rclBar.yTop - rclBar.yBottom - 2 * l3DOfsLink1,
+                            SWP_MOVE | SWP_SIZE);
+
+            // reposition right window of split bar
+            WinSetWindowPos(psbd->hwndLinked2,
+                            HWND_TOP,
+                            rclBar.xRight + l3DOfsLink2,
+                                    // the window rect is non-inclusive
+                            l3DOfsLink2,
+                            rclSplit.xRight - rclBar.xRight - 2 * l3DOfsLink2,
+                            rclBar.yTop - rclBar.yBottom - 2 * l3DOfsLink2,
+                            SWP_MOVE | SWP_SIZE);
+        }
+
+        // repaint split window (3D frame)
+        WinInvalidateRect(hwndSplit,
+                          NULL,         // all
+                          FALSE);       // don't repaint children
     }
 
Index: trunk/src/helpers/gpih.c
===================================================================
--- trunk/src/helpers/gpih.c	(revision 213)
+++ trunk/src/helpers/gpih.c	(revision 214)
@@ -468,5 +468,5 @@
 
 /*
- *@@ gpihDraw3DFrame:
+ *@@ gpihDraw3DFrame2:
  *      this draws a rectangle in 3D style with a given line width
  *      and the given colors.
@@ -481,15 +481,19 @@
  *      the bottom left and top right pixels to be drawn.
  *
+ *      Note: With V0.9.21, this now modifies prcl to be smaller towards
+ *      the center of the rectangle by usWidth so you can call this several
+ *      times with different colors.
+ *
  *@@changed V0.9.0 [umoeller]: changed function prototype to have colors specified
  *@@changed V0.9.7 (2000-12-20) [umoeller]: now really using inclusive rectangle...
- */
-
-VOID gpihDraw3DFrame(HPS hps,
-                     PRECTL prcl,       // in: rectangle (inclusive)
-                     USHORT usWidth,    // in: line width (>= 1)
-                     LONG lColorLeft,   // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT
-                     LONG lColorRight)  // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK
-{
-    RECTL rcl2 = *prcl;
+ *@@changed V0.9.21 (2002-08-24) [umoeller]: renamed, now modifying prcl on output
+ */
+
+VOID gpihDraw3DFrame2(HPS hps,
+                      PRECTL prcl,       // in: rectangle (inclusive)
+                      USHORT usWidth,    // in: line width (>= 1)
+                      LONG lColorLeft,   // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT
+                      LONG lColorRight)  // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK
+{
     USHORT us;
     POINTL ptl1;
@@ -501,25 +505,44 @@
         GpiSetColor(hps, lColorLeft);
         // draw left line
-        ptl1.x = rcl2.xLeft;
-        ptl1.y = rcl2.yBottom;
+        ptl1.x = prcl->xLeft;
+        ptl1.y = prcl->yBottom;
         GpiMove(hps, &ptl1);
-        ptl1.y = rcl2.yTop;     // V0.9.7 (2000-12-20) [umoeller]
+        ptl1.y = prcl->yTop;     // V0.9.7 (2000-12-20) [umoeller]
         GpiLine(hps, &ptl1);
         // go right -> draw top
-        ptl1.x = rcl2.xRight;   // V0.9.7 (2000-12-20) [umoeller]
+        ptl1.x = prcl->xRight;   // V0.9.7 (2000-12-20) [umoeller]
         GpiLine(hps, &ptl1);
         // go down -> draw right
         GpiSetColor(hps, lColorRight);
-        ptl1.y = rcl2.yBottom;
+        ptl1.y = prcl->yBottom;
         GpiLine(hps, &ptl1);
         // go left -> draw bottom
-        ptl1.x = rcl2.xLeft;
+        ptl1.x = prcl->xLeft;
         GpiLine(hps, &ptl1);
 
-        rcl2.xLeft++;
-        rcl2.yBottom++;
-        rcl2.xRight--;
-        rcl2.yTop--;
+        prcl->xLeft++;
+        prcl->yBottom++;
+        prcl->xRight--;
+        prcl->yTop--;
     }
+}
+
+/*
+ *@@ gpihDraw3DFrame:
+ *      compatibility function for those who used the
+ *      export. As opposed to gpihDraw3DFrame2, this
+ *      does not modify prcl.
+ *
+ *@@added V0.9.21 (2002-08-24) [umoeller]
+ */
+
+VOID gpihDraw3DFrame(HPS hps,
+                     PRECTL prcl,       // in: rectangle (inclusive)
+                     USHORT usWidth,    // in: line width (>= 1)
+                     LONG lColorLeft,   // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT
+                     LONG lColorRight)  // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK
+{
+    RECTL rcl2 = *prcl;
+    gpihDraw3DFrame2(hps, &rcl2, usWidth, lColorLeft, lColorRight);
 }
 
