home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / drag.h < prev    next >
Text File  |  1992-06-19  |  2KB  |  67 lines

  1. /*
  2.     drag.h
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #ifndef DRAG_H
  8. #define DRAG_H
  9.  
  10. #import "NXImage.h"
  11. #import "Pasteboard.h"
  12.  
  13. typedef enum _NXDragOperation {
  14.     NX_DragOperationNone = 0,    /* no operation == rejection */
  15.     NX_DragOperationCopy = 1,
  16.     NX_DragOperationLink = 2,
  17.     NX_DragOperationGeneric = 4,
  18.     NX_DragOperationPrivate = 8,    /* system leaves the cursor alone until exit */
  19. UFDragOperationAll = 15
  20. } NXDragOperation;
  21.  
  22.  
  23. /* protocol for the sender of messages to a drag destination.  The view or
  24.    window that registered dragging types sends these messages as dragging is
  25.    happening to find out details about that session of dragging.
  26.  */
  27. @protocol NXDraggingInfo
  28. - draggingDestinationWindow;
  29. - (NXDragOperation)draggingSourceOperationMask;
  30. - (NXPoint)draggingLocation;
  31. - (NXPoint)draggedImageLocation;
  32. - (NXImage *)draggedImage;
  33. - (NXImage *)draggedImageCopy;
  34. - (Pasteboard *)draggingPasteboard;
  35. - (BOOL)isDraggingSourceLocal;
  36. - draggingSource;
  37. - (int)draggingSequenceNumber;
  38. - slideDraggedImageTo:(NXPoint *)screenPoint;
  39. @end
  40.  
  41.  
  42. /* Methods implemented by an object that receives dragged images.  The
  43.    destination view or window is sent these messages during dragging if it
  44.    responds to them.
  45.  */
  46. @interface Object(NXDraggingDestination)
  47. - (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
  48. - (NXDragOperation)draggingUpdated:(id <NXDraggingInfo>)sender;
  49. - draggingExited:(id <NXDraggingInfo>)sender;
  50. - (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
  51. - (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
  52. - concludeDragOperation:(id <NXDraggingInfo>)sender;
  53. @end
  54.  
  55.  
  56. /* Methods implemented by an object that initiates a drag session.  The
  57.    source app is sent these messages during dragging.  The first must be
  58.    implemented, the others are sent if the source responds to them.
  59.  */
  60. @interface Object(NXDraggingSource)
  61. - (NXDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag;
  62. - draggedImage:(NXImage *)image beganAt:(NXPoint *)screenPoint;
  63. - draggedImage:(NXImage *)image endedAt:(NXPoint *)screenPoint deposited:(BOOL)flag;
  64. @end
  65.  
  66. #endif DRAG_H
  67.