• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drag image questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag image questions


  • Subject: Re: Drag image questions
  • From: Keith Renz <email@hidden>
  • Date: Tue, 9 Sep 2003 09:43:59 -0400

Remember to sleeping power of the doc!

Yes, I've read the docs very thoroughly; programming topic, AppKit doc and header files.

(1) Is there a way to manipulate a drag image after the drag has begun;
move it, redraw it, etc.? I've searched the archives and can't find
very much other than it's not possible. I want to snap the image to
locations in the destination view during the drag and make minor
changes to the image.

Look at NSDraggingInfo protocol for:
slideDraggedImageTo:

- (void) slideDraggedImageTo: (NSPoint) aPoint
Slides the image to aPoint , a specified location in the screen coordinate system. This method can be used to snap the image down to a particular location. It should only be invoked from within the destination's implementation of prepareForDragOperation: -in other words, after the user has released the image but before it is removed from the screen.

This only applies in prepareForDragOperation: (immediately after the image is released) and does nothing while dragging, which is what I'm trying to do.

(2) Is there a way to programmatically cancel a drag and make the drag
image disappear after the drag has begun? If I can't do (1) above, I'd
like to cancel the drag after receiving dragEntered: and take over
manually.


It is not mac-like to do such a thing... the image should slide back to it original position if not accepted by to receiver view. It must be release (mouse up) to do so.

Assuming I can't manipulate the drag image, if a drag is accepted after dragEntered:, I want to take over the continuation of the drag process manually. This doesn't mean I won't provide correct feedback. Besides, if the drag is accepted, image slide back is not correct.

Keith
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: cocoa-dev digest, Vol 2 #2903 - 15 msgs (From: Julien Guimont <email@hidden>)

  • Prev by Date: From String to NSImage via JavaBridge
  • Next by Date: refreshing the table of content
  • Previous by thread: Re: cocoa-dev digest, Vol 2 #2903 - 15 msgs
  • Next by thread: MiscKit
  • Index(es):
    • Date
    • Thread