InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDragDropTarget.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Dave Burnard
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Interface definition for Drag and Drop targets
24 //
25 //========================================================================================
26 
27 #ifndef __IDragDropTarget__
28 #define __IDragDropTarget__
29 
30 #include "DragDropID.h"
31 #include "DragDropConstants.h"
32 
33 #include "IPMUnknown.h"
34 
35 class IDragDropSource;
37 class ICommand;
38 class PMMatrix;
39 class DataObjectIterator;
40 class PMPoint;
41 class IDocument;
43 class ICommandSequence;
44 class IDataBase;
45 
52 {
53  public:
54  enum { kDefaultIID = IID_IDRAGDROPTARGET };
55 
56  public:
63  virtual SysWireframe DoMakeDropHiliteRegion() const = 0;
64 
69  HandleCouldAcceptTypes(DataObjectIterator*, const IDragDropSource*, const IDragDropController*) = 0;
72  virtual void HandleDoDragEnter() = 0;
75  virtual void HandleDoDragWithin(const PMPoint& localPt) = 0;
78  virtual void HandleDoDragLeave() = 0;
81  virtual ErrorCode HandleProcessDragDropCommand(IDragDropController*, DragDrop::eCommandType) = 0;
90  virtual IDataBase* GetTargetDataBase() const = 0;
91 
97  virtual bool16 SameAsDragSource(const IDragDropSource* dragSource) const = 0;
98 
105  virtual bool16 AffectsSameDataAsDragSource(const IDragDropSource* dragSource) const = 0;
106 
113  virtual bool16 HitTest_OutsideBounds(const SysPoint&) const = 0;
114 
126  virtual IDragDropTarget* QueryInternalDropTarget(const SysPoint& windowPoint,
127  PMPoint& localPoint,
129  const IDragDropSource*,
130  const IDragDropController*) = 0;
131 
136  virtual PMMatrix GetInternalTransform() const = 0;
140  virtual void SetInternalTransform( PMMatrix) = 0;
141 
146  virtual void RegisterTargetCallback(IDropTargetCallback*) = 0;
147 
152  virtual void ReleaseTargetCallback(IDropTargetCallback*) = 0;
153 
156  virtual void SetActiveContext() = 0;
158  virtual void ResetActiveContext() = 0;
167  virtual void SetDocument(IDocument*) = 0;
168 
173  virtual void DrawTargetOutline() = 0;
174 
178  virtual bool16 IsTargetModifiable() const = 0;
179 
180 protected:
195 
196  friend class CDragDropTargetFlavorHelper; // Used so it can inherit targets drag handling behavior
197 
203  virtual void DoDragEnter() = 0;
204 
209  virtual void DoDragWithin(const PMPoint& localPt) = 0;
210 
214  virtual void DoDragLeave() = 0;
215 
224 
225 };
226 
227 #endif