InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFlowFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Paul Sorrick
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 // Note:
24 //
25 //========================================================================================
26 
27 #ifndef __IFlowFacade__
28 #define __IFlowFacade__
29 
30 #include "MasterPageID.h"
31 #include "ILayoutObject.h"
32 #include "PMPageSize.h"
33 
34 class IGraphicFrameData;
35 class IDocument;
36 
37 namespace Flow
38 {
39  //Note the last call wins. So a 'Set' will clear a previous 'Flip' request,
40  //and a 'Flip' will clear a previous 'Set' request. Further a 'Flip' will
41  //clear a previous 'Flip' request thus leaving that constraint unchanged
42  //during the command.
43 
45  enum Constraint {
46  kFlexibleDimension = 0,
47  kFixedDimension = 1,
48  kFlipDimension = 2,
49  kSkipDimension = 3};
51  typedef K2Vector<Constraint> ConstraintList;
52 
59  enum ConstraintIndex
60  {
62  kLeftConstraint = 0,
63  kFirstConstraint = kLeftConstraint,
64  kFirstXConstraint = kLeftConstraint,
65 
67  kWidthConstraint = 1,
68 
70  kRightConstraint = 2,
71  kLastXConstraint = kRightConstraint,
72 
74  kTopConstraint = 3,
75  kFirstYConstraint = kTopConstraint,
76 
78  kHeightConstraint = 4,
79 
81  kBottomConstraint = 5,
82  kLastYConstraint = kBottomConstraint,
83  kLastConstraint = kBottomConstraint,
84  kNumConstraints = 6
85  };
86 }
87 
88 namespace Facade
89 {
90  class IFlowFacade : public IPMUnknown
91  {
92  public:
93  enum { kDefaultIID = IID_IFLOWFACADE };
94 
99  virtual UIDRef GetStoryFromSpline(const UIDRef& splineFlowFrameRef) const = 0;
100 
106  virtual bool16 CanSetPrimaryTextFlowSpline
107  (
108  const UIDRef& masterSpreadRef,
109  const UIDRef& splineFlowFrameRef
110  ) const = 0;
111 
117  virtual bool16 CanSetPrimaryTextFlowStory
118  (
119  const UIDRef& masterSpreadRef,
120  const UIDRef& storyRef
121  ) const = 0;
122 
128  virtual ErrorCode SetPrimaryTextFlowSpline
129  (
130  const UIDRef& masterSpreadRef,
131  const UIDRef& splineFlowFrameRef
132  ) = 0;
133 
140  virtual UIDRef GetPrimaryTextFlowStory(const UIDRef& masterSpreadRef, const bool16 bWalkUpMasters = kFalse) const = 0;
141 
147  virtual ErrorCode SetPrimaryTextFlowStory
148  (
149  const UIDRef& masterSpreadRef,
150  const UIDRef& storyRef
151  ) = 0;
152 
158  virtual UIDList GetPrimaryTextFlowSplineListForPage(const UIDRef& pageRef, const UIDRef& masterRef) = 0;
159 
164  virtual UIDList GetPrimaryTextFlowSplineListForMaster(const UIDRef& pageOrSpreadMasterRef) = 0;
165 
171  virtual bool16 IsInPrimaryTextFlowStory(const UIDRef& masterRef, const UIDRef& splineRef) const = 0;
172 
178  virtual bool16 IsAPrimaryTextFlowStory(const UIDRef& storyRef, UIDRef* fromThisMaster = nil) const = 0;
179  virtual bool16 IsAnOverriddenPrimaryTextFlowStory(const UIDRef& storyRef, UIDRef* fromThisMaster = nil) const = 0;
180 
185  virtual bool16 CanCreateAlternateLayout(const UIDList& spreadList) const = 0;
186 
197  virtual ErrorCode CreateAlternateLayout(const UIDList& spreadList,
198  const PMString& name,
199  const PMPageSize& pageSize,
200  const bool16 bCreateTextStyles,
201  const bool16 bLinkTextStories,
203  ) = 0;
204 
209  virtual bool16 CanDeleteAlternateLayout(const UIDRef& spreadRef) const = 0;
210 
217  virtual ErrorCode DeleteAlternateLayout(const UIDRef& spreadRef, bool16 bDeleteMasters = kTrue, bool16 bDeleteStyleGroups = kTrue) = 0;
218 
224  virtual ErrorCode DeletePrimaryTextFlowStory(const UIDRef& storyRef) = 0;
225 
236  virtual ErrorCode SetConstraints(const UIDList& itemList, const Flow::ConstraintList& list) = 0;
237 
242  virtual void GetConstraints(const UIDRef& oneItem, Flow::ConstraintList& outList) const = 0;
243 
249  virtual bool16 GetDuringCreateAlternateLayout(IDocument* document) const = 0;
250 
256  virtual void SetDuringCreateAlternateLayout(IDocument* document, const bool16 flag) = 0;
257 
258  };
259 }
260 
261 DECLARE_BASE_TYPE(Flow::Constraint);
262 
263 #endif // __IFlowFacade__