Listview K7

Dimitrie O. Paun dpaun at rogers.com
Fri Oct 4 11:35:08 CDT 2002


ChangeLogs
  Documentation updates, marking places which need work.

--- dlls/comctl32/listview.c.K6	Fri Oct  4 11:38:22 2002
+++ dlls/comctl32/listview.c	Fri Oct  4 12:29:48 2002
@@ -3839,7 +3839,6 @@
 
     LISTVIEW_UpdateScroll(infoPtr);
 
-    /* invalidate client area (optimization needed) */
     LISTVIEW_InvalidateList(infoPtr);
   }
 
@@ -3983,7 +3982,7 @@
   if (lStyle & LVS_OWNERDATA)
   {
     infoPtr->hdpaItems->nItemCount --;
-    LISTVIEW_InvalidateList(infoPtr);
+    LISTVIEW_InvalidateList(infoPtr); /*FIXME: optimize */
     return TRUE;
   }
 
@@ -4036,8 +4035,7 @@
 
     LISTVIEW_UpdateScroll(infoPtr);
 
-    /* FIXME: optimizartion refresh client area */
-    LISTVIEW_InvalidateList(infoPtr);
+    LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
   }
 
   return bResult;
@@ -5986,8 +5984,7 @@
 
     LISTVIEW_UpdateScroll(infoPtr);
     
-    /* FIXME: refresh client area */
-    LISTVIEW_InvalidateList(infoPtr);
+    LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
 
     TRACE("    <- %d\n", nItem);
     return nItem;
@@ -6286,7 +6283,7 @@
     /* resize all columns if in LVS_LIST mode */
     if(uView == LVS_LIST) {
       infoPtr->nItemWidth = cx;
-      LISTVIEW_InvalidateList(infoPtr);
+      LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
       return TRUE;
     }
 
@@ -6399,7 +6396,7 @@
   hdi.cxy = cx;
   lret = Header_SetItemW(infoPtr->hwndHeader, (WPARAM)iCol, (LPARAM)&hdi);
 
-  LISTVIEW_InvalidateList(infoPtr);
+  LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
 
   return lret;
 }
@@ -6637,6 +6634,7 @@
 
       /*
        * Internally remove all the selections.
+       * FIXME: why not RemoveAllSelections
        */
       do
       {
@@ -6664,7 +6662,7 @@
       LISTVIEW_UpdateScroll(infoPtr);
 
       if (min(precount,infoPtr->hdpaItems->nItemCount)<topvisible)
-        LISTVIEW_InvalidateList(infoPtr);
+        LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
   }
   else
   {
@@ -7010,7 +7008,7 @@
     LISTVIEW_AlignTop(infoPtr);
 
     /* refresh the display */
-    LISTVIEW_InvalidateList(infoPtr);
+    LISTVIEW_InvalidateList(infoPtr); /* FIXME: display should not change for [SMALL]ICON view */
 
     return TRUE;
 }
@@ -7849,7 +7847,7 @@
     if (lpnmh->code == HDN_ENDTRACKW)
     {
       infoPtr->nItemWidth = LISTVIEW_GetItemWidth(infoPtr);
-      LISTVIEW_InvalidateList(infoPtr);
+      LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
     }
     else if(lpnmh->code ==  HDN_ITEMCLICKW || lpnmh->code ==  HDN_ITEMCLICKA)
     {
@@ -7871,7 +7869,7 @@
        */
       infoPtr->nItemWidth = LISTVIEW_GetItemWidth(infoPtr);
       LISTVIEW_UpdateScroll(infoPtr);
-      LISTVIEW_InvalidateList(infoPtr);
+      LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
     }
 
   }
@@ -8128,9 +8126,13 @@
  */
 static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedraw)
 {
+    HFONT oldFont = infoPtr->hFont;
+
     TRACE("(hfont=%x,redraw=%hu)\n", hFont, fRedraw);
 
     infoPtr->hFont = hFont ? hFont : infoPtr->hDefaultFont;
+    if (infoPtr->hFont == oldFont) return 0;
+    
     LISTVIEW_SaveTextMetrics(infoPtr);
 
     if (LISTVIEW_GetType(infoPtr) == LVS_REPORT)
@@ -8195,8 +8197,7 @@
 
     LISTVIEW_UpdateScroll(infoPtr);
 
-    /* FIXME: be smarter here */
-    LISTVIEW_InvalidateList(infoPtr);
+    LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
   }
 
   return 0;
@@ -8385,7 +8386,7 @@
     LISTVIEW_UpdateScroll(infoPtr);
 
     /* invalidate client area + erase background */
-    LISTVIEW_InvalidateList(infoPtr);
+    LISTVIEW_InvalidateList(infoPtr); /* FIXME: optimize */
 
     /* print the list of unsupported window styles */
     LISTVIEW_UnsupportedStyles(lpss->styleNew);




More information about the wine-patches mailing list