InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICommandInterceptor.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Roey Horns
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 // Reviewed: 10/06/98
24 //
25 //========================================================================================
26 
27 #ifndef __ICOMMANDINTERCEPTOR__
28 #define __ICOMMANDINTERCEPTOR__
29 
30 #include "CommandID.h"
31 #include "IPMUnknown.h"
32 
33 class ICommand;
34 class ICommandSequence;
35 
44 {
45  public:
46  enum { kDefaultIID = IID_ICOMMANDINTERCEPTOR };
47 
48  // Each interception method should return one of the following values.
49  typedef enum
50  {
51  kCmdNotHandled, // command should get passed on to other interceptors
52  // they will decide whether to process it
53  kCmdNotHandledSkipInterceptors,
54  // command should get processed, other interceptors
55  // should get skipped
56  kCmdHandled // command should not get processed, other interceptors
57  // should get skipped
58  } InterceptResult;
59 
60  virtual InterceptResult InterceptProcessCommand(ICommand *cmd) = 0;
61  virtual InterceptResult InterceptScheduleCommand(ICommand *cmd) = 0;
62 
66  virtual InterceptResult InterceptExecuteDynamic(ICommand * cmd) = 0;
67 
68  // install/deinstall itself as command interceptor
69  virtual void InstallSelf() = 0;
70  virtual void DeinstallSelf() = 0;
71 
72  // these will eventually go away
73  virtual InterceptResult InterceptExecuteImmediate(ICommand * cmd) = 0;
74 };
75 
76 #endif // __ICOMMANDINTERCEPTOR__