Changeset 246:fd9c62a2998e for dwt/dnd/DragSource.d
- Timestamp:
- 07/01/08 04:15:59 (6 months ago)
- Files:
-
- dwt/dnd/DragSource.d (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/dnd/DragSource.d
r213 r246 1 1 /******************************************************************************* 2 * Copyright (c) 2000, 200 7IBM Corporation and others.2 * Copyright (c) 2000, 2008 IBM Corporation and others. 3 3 * All rights reserved. This program and the accompanying materials 4 4 * are made available under the terms of the Eclipse Public License v1.0 … … 123 123 * <dt><b>Events</b></dt> <dd>DND.DragStart, DND.DragSetData, DND.DragEnd</dd> 124 124 * </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> 125 129 */ 126 130 public class DragSource : Widget { … … 318 322 * On XP if the shell is RTL, the image is not displayed. 319 323 */ 320 int offset = 0;324 int offset = event.x - dragEvent.x; 321 325 hwndDrag = topControl.handle; 322 326 if ((topControl.getStyle() & DWT.RIGHT_TO_LEFT) !is 0) { 323 offset = image.getBounds().width ;327 offset = image.getBounds().width - offset; 324 328 RECT rect; 325 329 OS.GetClientRect (topControl.handle, &rect); … … 337 341 OS.ShowWindow (hwndDrag, OS.SW_SHOW); 338 342 } 339 OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offset, 0);343 OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offset, event.y - dragEvent.y); 340 344 /* 341 345 * Feature in Windows. When ImageList_DragEnter() is called, … … 480 484 * the <code>DragSourceListener</code> interface. 481 485 * 486 * @return the listeners who will be notified when a drag and drop 487 * operation is in progress 488 * 482 489 * @exception DWTException <ul> 483 490 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> … … 659 666 * be notified when a drag and drop operation is in progress. 660 667 * 661 * @param listener the listener which should be notified668 * @param listener the listener which should no longer be notified 662 669 * 663 670 * @exception IllegalArgumentException <ul>
