Changeset 146:c605bf6c2f48

Show
Ignore:
Timestamp:
02/13/08 10:55:45 (7 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

TableDragSourceEffect?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dsss.conf

    r135 r146  
    44type=library 
    55debugflags+=-g -gc -debug 
    6 exclude=dwt/dnd 
    76 
    87 
  • dwt/dnd/TableDragSourceEffect.d

    r136 r146  
    2323import dwt.dnd.DragSourceEffect; 
    2424import dwt.dnd.DragSourceEvent; 
     25 
     26import dwt.dwthelper.utils; 
    2527 
    2628/** 
     
    9496            Rectangle bounds = selection[0].getBounds(0); 
    9597            for (int i = 1; i < count; i++) { 
    96                 bounds = bounds.union_(selection[i].getBounds(0)); 
     98                bounds = bounds.makeUnion(selection[i].getBounds(0)); 
    9799            } 
    98100            auto hDC = OS.GetDC(null); 
     
    100102            auto bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height); 
    101103            auto hOldBitmap = OS.SelectObject(hDC1, bitmap); 
    102             RECT rect = new RECT()
     104            RECT rect
    103105            rect.right = bounds.width; 
    104106            rect.bottom = bounds.height; 
    105             int hBrush = OS.GetStockObject(OS.WHITE_BRUSH); 
    106             OS.FillRect(hDC1, rect, hBrush); 
     107            auto hBrush = OS.GetStockObject(OS.WHITE_BRUSH); 
     108            OS.FillRect(hDC1, &rect, hBrush); 
    107109            for (int i = 0; i < count; i++) { 
    108110                TableItem selected = selection[i]; 
    109111                Rectangle cell = selected.getBounds(0); 
    110                 POINT pt = new POINT()
    111                 int imageList = OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), pt); 
     112                POINT pt
     113                HANDLE imageList = cast(HANDLE) OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), &pt); 
    112114                OS.ImageList_Draw(imageList, 0, hDC1, cell.x - bounds.x, cell.y - bounds.y, OS.ILD_SELECTED); 
    113115                OS.ImageList_Destroy(imageList);