equal
deleted
inserted
replaced
417 dragObj := DropSpec for:selection specification:spec. |
417 dragObj := DropSpec for:selection specification:spec. |
418 self showSelected. |
418 self showSelected. |
419 DragAndDropManager startDrag:dragObj from:inputView. |
419 DragAndDropManager startDrag:dragObj from:inputView. |
420 ] |
420 ] |
421 |
421 |
|
422 ! |
|
423 |
|
424 startDragWithOffset:offs |
|
425 "start drag of selection |
|
426 " |
|
427 |dragObj spec name o| |
|
428 |
|
429 spec := self findSpecFor:selection. |
|
430 |
|
431 spec notNil ifTrue:[ |
|
432 spec := self buildSpecFrom:spec. |
|
433 name := spec className asString. |
|
434 name := name copyFrom:1 to:(name size - ('Spec' size) + 1). |
|
435 name at:1 put:(name at:1) asLowercase. |
|
436 name at:(name size) put:$1. |
|
437 spec name:name. |
|
438 |
|
439 self showUnselected. |
|
440 dragObj := DropSpec for:selection specification:spec. |
|
441 self showSelected. |
|
442 |
|
443 o := lastClickPoint - selection origin. |
|
444 |
|
445 DragAndDropManager |
|
446 startDrag:dragObj |
|
447 from:inputView |
|
448 offset:o. |
|
449 ] |
|
450 |
|
451 "Created: 11.8.1997 / 00:44:17 / cg" |
|
452 "Modified: 11.8.1997 / 00:48:35 / cg" |
422 ! ! |
453 ! ! |
423 |
454 |
424 !UIGalleryView::Canvas methodsFor:'event handling'! |
455 !UIGalleryView::Canvas methodsFor:'event handling'! |
425 |
456 |
426 buttonMotion:state x:x y:y |
457 buttonMotion:state x:x y:y |
430 |
461 |
431 (lastClickPoint notNil and:[selection notNil]) ifTrue:[ |
462 (lastClickPoint notNil and:[selection notNil]) ifTrue:[ |
432 sensor := self sensor. |
463 sensor := self sensor. |
433 sensor anyButtonPressed ifTrue:[ |
464 sensor anyButtonPressed ifTrue:[ |
434 (lastClickPoint dist:(x@y)) > 10.0 ifTrue:[ |
465 (lastClickPoint dist:(x@y)) > 10.0 ifTrue:[ |
435 ^ self startDrag |
466 ^ self startDragWithOffset:(x@y) - lastClickPoint |
436 ] |
467 ] |
437 ] |
468 ] |
438 ] |
469 ] |
439 |
470 |
440 |
471 "Modified: 11.8.1997 / 00:44:49 / cg" |
441 ! |
472 ! |
442 |
473 |
443 buttonPress:button x:x y:y |
474 buttonPress:button x:x y:y |
444 "change selection |
475 "change selection |
445 " |
476 " |