Show
Ignore:
Timestamp:
07/01/08 04:15:59 (6 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Updater SWT 3.4M7 to 3.4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/dnd/DragSource.d

    r213 r246  
    11/******************************************************************************* 
    2  * Copyright (c) 2000, 2007 IBM Corporation and others. 
     2 * Copyright (c) 2000, 2008 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
    44 * are made available under the terms of the Eclipse Public License v1.0 
     
    123123 *  <dt><b>Events</b></dt> <dd>DND.DragStart, DND.DragSetData, DND.DragEnd</dd> 
    124124 * </dl> 
     125 * 
     126 * @see <a href="http://www.eclipse.org/swt/snippets/#dnd">Drag and Drop snippets</a> 
     127 * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: DNDExample</a> 
     128 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> 
    125129 */ 
    126130public class DragSource : Widget { 
     
    318322         * On XP if the shell is RTL, the image is not displayed. 
    319323         */ 
    320         int offset = 0
     324        int offset = event.x - dragEvent.x
    321325        hwndDrag = topControl.handle; 
    322326        if ((topControl.getStyle() & DWT.RIGHT_TO_LEFT) !is 0) { 
    323             offset = image.getBounds().width
     327            offset = image.getBounds().width - offset
    324328            RECT rect; 
    325329            OS.GetClientRect (topControl.handle, &rect); 
     
    337341            OS.ShowWindow (hwndDrag, OS.SW_SHOW); 
    338342        } 
    339         OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offset, 0); 
     343        OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offset, event.y - dragEvent.y); 
    340344        /* 
    341345        * Feature in Windows. When ImageList_DragEnter() is called, 
     
    480484 * the <code>DragSourceListener</code> interface. 
    481485 * 
     486 * @return the listeners who will be notified when a drag and drop 
     487 * operation is in progress 
     488 * 
    482489 * @exception DWTException <ul> 
    483490 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    659666 * be notified when a drag and drop operation is in progress. 
    660667 * 
    661  * @param listener the listener which should be notified 
     668 * @param listener the listener which should no longer be notified 
    662669 * 
    663670 * @exception IllegalArgumentException <ul>