InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITableLineType.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Joe Shankar
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: Data interface for table stroke type.
24 //
25 //========================================================================================
26 
27 #ifndef __ITableLineType__
28 #define __ITableLineType__
29 
30 #include "IPMUnknown.h"
31 #include "TablesID.h"
32 #include "InstStrokeFillID.h"
33 #include "ScotchRulesID.h"
34 #include "IDataBase.h"
35 
40  class ITableLineType : public IPMUnknown
41 {
42 public:
43  enum { kDefaultIID = IID_ITABLELINETYPE };
44 
48  struct SType {
49  typedef object_type data_type;
50 
59 
64  SType() {
66  uID = kInvalidUID;
67  }
68 
74  SType(ClassID c, UID u) {
75  classID = c;
76  uID = u;
77  }
78 /*
79  bool16 SType::IsValid() const {
80  return (IsMixed() || IsNone() ||
81  ((classID != kCustomStripedPathStrokerBoss || uID != kInvalidUID)));
82  }
83 */
88  bool16 IsMixed() const {
89  return ((classID == kInvalidClass) && (uID == kInvalidUID));
90  }
91 
96  bool16 IsNone() const {
97  return (classID == kNonePathStrokerBoss);
98  }
99 
104  bool16 IsSolid() const {
105  return (classID == kSolidPathStrokerBoss);
106  }
107 
113  bool16 IsStriped(IDataBase* db) const {
114  return (classID == kThinThinPathStrokerBoss ||
122  );
123  }
124 
130  bool16 IsDashed(IDataBase* db) const {
131  return (classID == kDashedPathStrokerBoss ||
135  );
136  }
137 
143  bool16 IsDotted(IDataBase* db) const {
144  return (classID == kCannedDotPathStrokerBoss ||
147  );
148  }
149 
155  bool16 IsHash() const {
159  );
160  }
161 
167  bool16 IsSpecial(IDataBase* db) const {
168  return !(this->IsNone() || this->IsMixed() ||
169  this->IsSolid() || this->IsStriped(db) || this->IsDashed(db));
170  }
171 
177  bool16 operator==(const SType& rhs) const {
178  return rhs.classID == classID &&
179  rhs.uID == uID;
180  }
181 
187  bool16 operator!=(const SType& rhs) const {
188  return !(this->operator==(rhs));
189  }
190  };
191 
196  virtual SType Get() const = 0;
201  virtual void Set(SType type) = 0;
202 
207  virtual int32 ConvertSTypeToEType(ITableLineType::SType type) const = 0;
212  virtual ITableLineType::SType ConvertETypeToSType(int32 eType) const = 0;
213 };
214 
215 #endif // __ITableLineType__