CFx SDK Documentation  2023 SP0
AECDispCompEnt.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef __AECDISPCOMPENT_H__
25 #define __AECDISPCOMPENT_H__
26 
28 #include <CmColor.h>
29 
35 class AECBASE_API AECDispCompEnt : public AECDispComp
36 {
38 
39  public:
41  // Display Component specific method.
42  // Assigns default layer linetype and similar properties.
43  virtual void SetDbProperties( const OdDbDatabase* pDb );
44 
45  public:
49  enum XPosition
50  {
51  exLeft = 0,
52  exCenter = 1,
53  exRight = 2
54  };
55 
59  enum YPosition
60  {
61  eyFront = 0,
62  eyCenter = 1,
63  eyBack = 2
64  };
65 
69  enum ZPosition
70  {
71  ezBottom = 0,
72  ezCenter = 1,
73  ezTop = 2
74  };
75 
76  public:
80  bool IsVisible() const;
81 
85  void SetIsVisible( bool bVisible );
86 
90  const OdCmColor& GetColor() const;
91 
95  void SetColor( const OdCmColor& cColor );
96 
101 
105  void SetLayer( const OdDbObjectId& idLayer );
106 
111 
115  void SetLinetype( const OdDbObjectId& idLinetype );
116 
121 
125  void SetLineWeight( OdDb::LineWeight eLineWeight );
126 
130  double GetLtScale() const;
131 
135  void SetLtScale( double dScale );
136 
141 
146 
151 
155  void SetPlotStyle( const OdDbObjectId& idPlotStyle );
156 
161  bool MayBeByMaterial() const;
162 
170  void SetMayBeByMaterial( bool bMayBeByMaterial );
171 
175  bool IsByMaterial() const;
176 
180  void SetIsByMaterial( bool bByMaterial );
181 
182  public:
184  // Common flags structure.
185  // Used by opening blocks and structural member blocks.
187  {
189  struct
190  {
191 
192 #ifdef ODA_BIGENDIAN
193  OdUInt16 eFitType : 2;
194  OdUInt16 bRepeatBlockDisplay : 1;
195  OdUInt16 bScaleToFitLockXYRatio : 1;
196  OdUInt16 eZPosition : 2;
197  OdUInt16 eYPosition : 2;
198  OdUInt16 eXPosition : 2;
199  OdUInt16 bMirrorZ : 1;
200  OdUInt16 bMirrorY : 1;
201  OdUInt16 bMirrorX : 1;
202  OdUInt16 bScaleToFitHeight : 1;
203  OdUInt16 bScaleToFitDepth : 1;
204  OdUInt16 bScaleToFitWidth : 1;
205 #else
218 #endif
219  } m_bBits;
220  };
221 
222  protected:
225  {
227  struct
228  {
229 
230 #ifdef ODA_BIGENDIAN
231  OdUInt16 uReserved : 14;
232  OdUInt16 bByMaterial : 1;
233  OdUInt16 bMayBeByMaterial : 1;
234 #else
238 #endif
239  } m_bBits;
240  };
241 
242  protected:
243  // Visibility flag
245 
246  // Display component's layer.
248 
249  // Display component's color.
252 
253  // Display component's linetype.
255 
256  // This member stores line weight in .01 mm. There are special cases:
257  // o Value -3 means "Default"
258  // o Value -2 means "ByBlock"
259  // o Value -1 means "ByLayer"
261 
262  // This member stores line-type scaling factor.
263  double m_dLtScale;
264 
265  // Plot style name type.
267 
268  // Plot style.// (OdDbPlaceHolder)
270 
271  // Material flags.
273 
276 
279 
282 };
283 
286 
287 #endif //__AECDISPCOMPENT_H__
AECSubPtr< AECDispCompEnt > AECDispCompEntSubPtr
OdSmartPtr< AECDispCompEnt > AECDispCompEntPtr
#define AEC_DECLARE_MEMBERS(ClassName)
Definition: AECMacros.h:54
unsigned int OdUInt32
unsigned short OdUInt16
int OdInt32
OdDb::LineWeight GetLineWeight() const
OdDb::PlotStyleNameType GetPlotStyleNameType() const
void SetPlotStyle(const OdDbObjectId &idPlotStyle)
OdDb::PlotStyleNameType m_ePlotStyleName
bool IsVisible() const
OdDbObjectId GetPlotStyle() const
void SetLineWeight(OdDb::LineWeight eLineWeight)
void SetPlotStyleNameType(OdDb::PlotStyleNameType eType)
const OdCmColor & GetColor() const
virtual void SetDbProperties(const OdDbDatabase *pDb)
DOM.
bool IsByMaterial() const
OdDbHardPointerId m_hpidDbLineTypeTableRecord
void SetIsByMaterial(bool bByMaterial)
void SetMayBeByMaterial(bool bMayBeByMaterial)
OdUInt32 m_unknSmartStrID
DOM.
bool MayBeByMaterial() const
void SetIsVisible(bool bVisible)
MaterialFlags m_iMaterialFlags
double GetLtScale() const
void SetLayer(const OdDbObjectId &idLayer)
OdDbHardPointerId m_hpidPlotStyle
OdString m_unknSmartStrValue
DOM.
OdDb::LineWeight m_eLineWeight
OdInt32 m_iUnknown1
DOM.
OdCmColor m_cColor
void SetColor(const OdCmColor &cColor)
OdDbObjectId GetLayer() const
OdDbObjectId GetLinetype() const
OdDbHardPointerId m_hpidDbLayerTableRecord
void SetLinetype(const OdDbObjectId &idLinetype)
void SetLtScale(double dScale)
PlotStyleNameType
Definition: OdaDefs.h:415
LineWeight
Definition: OdaDefs.h:384