InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IItemContextUtils.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 __IItemContextUtils__
25 #define __IItemContextUtils__
26 
27 #include "GenericID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 
31 #include "PMRect.h"
32 
33 class IHierarchy;
34 class IControlView;
35 class IItemContext;
36 class ISnapTo;
37 
38 
43 {
44 public:
45  enum { kDefaultIID = IID_IITEMCONTEXTUTILS };
46 
47  virtual IItemContext* QueryItemContext1(IHierarchy* item /*, bool16 includeItem*/) const = 0;
48  // Returns the nearest enclosing item in the hierarchy which implements IItemContext
49  // Includes the item itself in the search, if includeItem is true.
50 
51 
52  virtual IItemContext* QueryCreationContext(IControlView* layoutView, const PBPMPoint& where) const = 0;
53  // Find the context for a creation tracker. The search for an IItemContext implementation
54  // begins with the hit-detected item rather than its parent
55 
56 
57  virtual IItemContext* QueryItemContext3(IControlView* layoutView, const PBPMPoint& where /*, bool16 includeItem*/) const = 0;
58  // Find the itemcontext of a hit-detected item at the given location.
59  // If includeItem is true, the hit-detected item itself is included in the search,
60  // otherwise it begins with its parent.
61 
62 
63  virtual ISnapTo* QuerySnapTo(IItemContext* context) const = 0;
64  // Searches the ItemContext parent chain for an implementation of ISnapTo
65 };
66 
67 
68 #endif // __IItemContextUtils__