InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICursorUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Dave Stephens
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 
24 #ifndef __ICursorUtils__
25 #define __ICursorUtils__
26 
27 #include "IPMUnknown.h"
28 
29 #include "CursorSpec.h"
30 #include "PMString.h"
31 
32 #include "Utils.h"
33 
34 #include "AppUIID.h"
35 
36 class IControlView;
39 class IGraphicsPort;
40 
46 class ICursorUtils : public IPMUnknown
47 {
48 public:
49  enum { kDefaultIID = IID_ICURSORUTILS };
50 
51  enum CursorOptions
52  {
53  kDefaultCursor = 0, // do not modify the cursor
54  kShowWidthHeight, // Add width/height information to cursor
55  kShowXPosition, // Add X Position information to cursor (useful for vertical guides)
56  kShowYPosition, // Add Y Position information to cursor (useful for horizontal guides)
57  kShowXYPosition, // Add X,Y Position information to cursor
58  kShowLineLength, // Add Line length information to cursor
59  kShowScale, // Add Scale information to cursor
60  kShowRotation, // Rotation in degrees
61  kShowLiveCornerRadius, // Add live corner radius info to cursor
62  kShowWidth, // Width only -- no height (for Gap Tool)
63  kShowHeight, // Height only -- no width (for Gap Tool)
64  kShowZoomFactor //show current layout zoom factor
65  };
66 
70  virtual void InitCursor(const CursorOptions option) = 0;
71 
72 
77  virtual void UpdateCursor(CursorSpec& adjustedCursorSpec) const = 0;
78 
81  virtual void ReleaseCursor() = 0;
82 
91  virtual IGraphicsPort* QueryGraphicsPortForBitmap(uchar* bitmapBuffer, uint32 bitmapWidth, uint32 bitmapHeight, bool16 hasAlpha, bool16 hiRes) const = 0;
92 
101  virtual IGraphicsPort* QueryGraphicsPortForBitmap(uchar* bitmapBuffer, uint32 bitmapWidth, uint32 bitmapHeight, bool16 hasAlpha, bool16 hiRes, float scaleFactor) const = 0;
102 };
103 
104 
105 #endif // __ICursorUtils__