InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextEditorShell.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
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 __ITextEditorShell__
25 #define __ITextEditorShell__
26 
27 #include "IPMUnknown.h"
28 
29 //----------------------------------------------------------------------------------------
30 // Interface ITextEditorShell
31 //----------------------------------------------------------------------------------------
32 
37 {
38 public:
39  // activation
40  virtual void Activate() = 0; // called from the EventHandler
41  virtual void Deactivate() = 0; // called from the EventHandler
42 
43  // transactions
44  virtual void FirstAction() = 0;
45  virtual void LastAction() = 0;
46 
47  // shell chain
48  virtual ITextEditorShell * QueryNextShell() = 0;
49 };
50 
51 
52 //----------------------------------------------------------------------------------------
53 // usefull macros
54 //----------------------------------------------------------------------------------------
55 
56 #define ENSURE_INTERFACE( Class, nIID ) \
57  { \
58  IPMUnknown *pUnknown = this->QueryInterface( (nIID) ); \
59  if( pUnknown ) \
60  pUnknown->Release(); \
61  else \
62  ASSERT_MSG( kFalse, #Class " - missing interface: " #nIID ); \
63  }
64 
65 #endif