InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDrawInterruptContext.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Chris Jones
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 // This is the handle shape interface for page item adornments. This interface can
25 // return trackers just like a normal handle shape. Keep in mind, however, that
26 // it is the page item which is in the selection, not the adornment.
27 //
28 //========================================================================================
29 
30 #ifndef __IDrawInterruptContext__
31 #define __IDrawInterruptContext__
32 
33 #include "IPMUnknown.h"
34 #include "DocFrameworkID.h"
35 
36 class IWindow;
37 
38 #define kSecondsOfEasyInterrupt 2
39 
41 {
42 public:
43  enum { kDefaultIID = IID_IDRAWINTERRUPTCONTEXT };
44 
45  enum DrawType
46  {
47  kDocDrawForeground,
48  kDocDrawBackground,
49  kDocNotDrawing,
50  kGraphicPreviewDrawing,
51  kImportingInDesignPage
52  };
53 
54  enum InterruptEventType
55  {
56  kInterruptCommandPeriod,
57  kInterruptCommandSomething,
58  kInterruptOtherKeystroke,
59  kInterruptMouseClick
60  };
61 
62 public:
68  virtual DrawType GetCurrentDrawType() = 0;
69 
75  virtual time_t GetCurrentDrawStart() = 0;
76 
83  virtual int32 GetRepeatedDrawInterruptCount() = 0;
84 
94  virtual bool16 ShouldCancelDrawIf( InterruptEventType nType ) = 0;
95 
100  virtual void StartCurrentDraw( DrawType nDraw, IWindow* pWindow ) = 0;
101 
106  virtual IWindow* GetCurrentWindow() = 0;
107 
112  virtual void IncrementCurrentDrawInterruptCount() = 0;
113  virtual void ClearCurrentDrawInterruptCount() = 0;
114 
119  virtual void FinishCurrentDraw(bool16 bAborted) = 0;
120 };
121 
122 #endif