DrawFrameControl update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog
  -- implement DFCS_TRANSPARENT
  -- fix indentation
  -- add remark about unimplemented DFC_POPUPMENU

Index: controls/uitools.c
===================================================================
RCS file: /var/cvs/wine/controls/uitools.c,v
retrieving revision 1.27
diff -u -r1.27 uitools.c
--- controls/uitools.c	31 May 2002 23:06:46 -0000	1.27
+++ controls/uitools.c	9 Sep 2002 14:26:57 -0000
@@ -682,18 +682,20 @@
         else
             UITOOLS95_DrawRectEdge(dc, &myr, edge, (uFlags&DFCS_FLAT)|BF_RECT|BF_SOFT|BF_ADJUST);
 
-	UITOOLS_DrawCheckedRect( dc, &myr );
-        }
-        else
-        {
+	if (!(uFlags & DFCS_TRANSPARENT))
+	    UITOOLS_DrawCheckedRect( dc, &myr );
+    }
+    else
+    {
         if(uFlags & DFCS_MONO)
         {
             UITOOLS95_DrawRectEdge(dc, &myr, edge, BF_MONO|BF_RECT|BF_ADJUST);
-            FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
+	    if (!(uFlags & DFCS_TRANSPARENT))
+                FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
         }
         else
         {
-            UITOOLS95_DrawRectEdge(dc, r, edge, (uFlags&DFCS_FLAT) | BF_MIDDLE | BF_RECT);
+            UITOOLS95_DrawRectEdge(dc, r, edge, (uFlags & DFCS_FLAT) | ((uFlags & DFCS_TRANSPARENT) ? 0 : BF_MIDDLE) | BF_RECT);
         }
     }
 
@@ -724,6 +726,7 @@
 {
     RECT myr, bar;
     UINT flags = BF_RECT | BF_ADJUST;
+
     UITOOLS_MakeSquareRect(r, &myr);
 
     if(uFlags & DFCS_FLAT) flags |= BF_FLAT;
@@ -731,13 +734,14 @@
 
     UITOOLS95_DrawRectEdge( dc, &myr, EDGE_SUNKEN, flags );
 
-    if(uFlags & (DFCS_INACTIVE|DFCS_PUSHED))
-        FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
-    else if( (uFlags & DFCS_BUTTON3STATE) && (uFlags & DFCS_CHECKED) )
-        UITOOLS_DrawCheckedRect( dc, &myr );
-    else
+    if (!(uFlags & DFCS_TRANSPARENT)) 
     {
-        FillRect(dc, &myr, GetSysColorBrush(COLOR_WINDOW));
+	if(uFlags & (DFCS_INACTIVE | DFCS_PUSHED))
+            FillRect(dc, &myr, GetSysColorBrush(COLOR_BTNFACE));
+	else if( (uFlags & DFCS_BUTTON3STATE) && (uFlags & DFCS_CHECKED) )
+            UITOOLS_DrawCheckedRect( dc, &myr );
+	else
+            FillRect(dc, &myr, GetSysColorBrush(COLOR_WINDOW));
     }
 
     if(uFlags & DFCS_CHECKED)
@@ -783,9 +787,7 @@
     if(BorderShrink < 1) BorderShrink = 1;
 
     if((uFlags & 0xff) == DFCS_BUTTONRADIOIMAGE)
-    {
         FillRect(dc, r, (HBRUSH)GetStockObject(BLACK_BRUSH));
-    }
 
     xc = myr.left + SmallDiam - SmallDiam/2;
     yc = myr.top  + SmallDiam - SmallDiam/2;
@@ -1414,6 +1416,9 @@
       return UITOOLS95_DrawFrameCaption(hdc, rc, uState);
     case DFC_MENU:
       return UITOOLS95_DrawFrameMenu(hdc, rc, uState);
+    /*case DFC_POPUPMENU:
+      FIXME("DFC_POPUPMENU: not implemented\n");
+      break;*/
     case DFC_SCROLL:
       return UITOOLS95_DrawFrameScroll(hdc, rc, uState);
     default:



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux