InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDragDropTextUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Paul Sorrick
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 // Purpose:
24 // Utilities for use for dealing with drag and drop of text.
25 //
26 //========================================================================================
27 
28 #ifndef __IDragDropTextUtils__
29 #define __IDragDropTextUtils__
30 
31 #include "Utils.h"
32 #include "TextEditorID.h"
33 #include "DragDropConstants.h"
34 
37 class IEvent;
38 class UIDRef;
39 class RangeData;
40 class IDragDropSource;
41 class IParcel;
42 class ILayoutControlData;
43 
47 {
48  public:
49  enum {kDefaultIID = IID_IDRAGDROPTEXTUTILS};
50 
57  virtual bool16 StartTextDrag(IControlView* view, IDragDropSource* dragSource, IEvent* theEvent) = 0;
58 
75  virtual IParcel* QueryTextParcelAtPoint(IControlView* view, const SysPoint mousePt, const IPMUnknown* hitObj, const IParcel* previousParcel, UIDRef& storyUIDRef, RangeData& range, PMReal* hitIndex = nil, PMReal* adjustedHitIndex = nil) = 0;
76 
85  virtual void DrawCaretAtDropLocation(IControlView* view, UIDRef& storyUIDRef, RangeData& range, bool16 flushDrawing = kTrue) = 0;
86 
96  virtual ErrorCode ProcessDragDropTextCommand(IControlView* view, IDragDropController* controller, const UIDRef& storyUIDRef, RangeData& range, DragDrop::eCommandType type,bool16 ignoreAttributes = kFalse) = 0;
97 
105  virtual ErrorCode PrepareForTextFrameDrop(IControlView* view, IDragDropController* controller, PMPoint& dropPoint, UIDRef& parent) = 0;
106 
115  virtual ErrorCode MakeFrame(const PBPMPoint& location, const UIDRef& parent, const UIDRef& storyUIDRef, UIDRef& createdFrame) = 0;
116 
142  virtual ErrorCode SendDragDropTextSignal(ServiceID id,
143  IControlView* sourceView,
144  IControlView* destinationView,
145  const UIDRef& sourceStoryRef,
146  RangeData& sourceRange,
147  const UIDRef& destinationStoryRef,
148  RangeData& destinationRange,
149  RangeData& droppedRange,
151  IDataExchangeHandler* handler) = 0;
152 
159  virtual ICommand* MakeNewTextFrameCmdForDrop(ILayoutControlData* layoutData, IDataExchangeHandler* texthandler, const bool16 ignoreAttributes ) = 0;
160 
161 };
162 
163 #endif // __IDragDropTextUtils__