CFx SDK Documentation  2020SP3
DbVisualStyle.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 OD_DBVISUALSTYLE_H
25 #define OD_DBVISUALSTYLE_H
26 
27 #include "TD_PackPush.h"
28 
29 #include "DbObject.h"
30 #include "Gi/GiVisualStyle.h"
31 
36 namespace OdDb
37 {
38  // Legacy (shademode) styles
39  const wchar_t kszVSFlat[] = L"Flat";
40  const wchar_t kszVSFlatWithEdges[] = L"FlatWithEdges";
41  const wchar_t kszVSGouraud[] = L"Gouraud";
42  const wchar_t kszVSGouraudWithEdges[] = L"GouraudWithEdges";
43 
44  // Visual Styles
45  const wchar_t kszVS2DWireframe[] = L"2dWireframe";
46  const wchar_t kszVS3DWireframe[] = L"Wireframe"; // Was "3dWireframe" before (#11263)
47  const wchar_t kszVSBasic[] = L"Basic";
48  const wchar_t kszVSHidden[] = L"Hidden"; // Was "3D Hidden" before (#11263)
49  const wchar_t kszVSRealistic[] = L"Realistic";
50  const wchar_t kszVSConceptual[] = L"Conceptual";
51  const wchar_t kszVSCustom[] = L"Custom";
52  const wchar_t kszVSShadesOfGray[] = L"Shades of Gray";
53  const wchar_t kszVSSketchy[] = L"Sketchy";
54  const wchar_t kszVSXRay[] = L"X-Ray";
55 
56  // AirMax Visual Styles
57  const wchar_t kszVSShadedWithEdges[] = L"Shaded with edges";
58  const wchar_t kszVSShaded[] = L"Shaded";
59 
60  // Highlight Visual Styles (internal use only)
61  const wchar_t kszVSDim[] = L"Dim";
62  const wchar_t kszVSBrighten[] = L"Brighten";
63  const wchar_t kszVSThicken[] = L"Thicken";
64  const wchar_t kszVSTransparent[] = L"Transparent";
65  const wchar_t kszVSLinePattern[] = L"Linepattern";
66  const wchar_t kszVSFacePattern[] = L"Facepattern";
67  const wchar_t kszVSColorChange[] = L"ColorChange";
68 
69  // Edge Style Override Visual Styles (internal use only)
70  const wchar_t kszVSJitterOff[] = L"JitterOff";
71  const wchar_t kszVSOverhangOff[] = L"OverhangOff";
72  const wchar_t kszVSEdgeColorOff[] = L"EdgeColorOff";
73 }
80 {
81 public:
83 
88 
94  void setDescription(const OdString& pDescription);
95 
99  const OdString description () const;
100 
107 
112 
118  void setFaceStyle(const OdGiFaceStyle& faceStyle);
119 
123  const OdGiFaceStyle& faceStyle() const;
124 
130  void setEdgeStyle(const OdGiEdgeStyle& edgeStyle);
131 
135  const OdGiEdgeStyle& edgeStyle() const;
136 
142  void setDisplayStyle(const OdGiDisplayStyle& displayStyle);
143 
148 
156  bool isInternalUseOnly() const;
157 
163  void setInternalUseOnly(bool bInternalUseOnly);
164 
172 
180 
188 
196 
215 
225 
235 
245  void setTrait(OdGiVisualStyleProperties::Property prop, double red, double green, double blue,
247 
257 
267 
278 
286  void setTraitFlag(OdGiVisualStyleProperties::Property flagProp, OdUInt32 flagVal, bool bEnable = true);
287 
299 
305  void name(OdString &value) const;
306 
308  OdDbDwgFiler* pFiler);
309 
310  virtual void dwgOutFields(
311  OdDbDwgFiler* pFiler) const;
312 
314  OdDbDxfFiler* pFiler);
315 
316  virtual void dxfOutFields(
317  OdDbDxfFiler* pFiler) const;
318 
319  virtual OdGiDrawable* drawable();
320 
322  OdGiDrawableTraits* pTraits) const;
323 };
324 
329 
330 #include "TD_PackPop.h"
331 
332 #endif // OD_DBVISUALSTYLE_H
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, OdInt32 nVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
OdResult
OdResult
Definition: OdResult.h:29
OdDbVisualStyle::setTraitFlag
void setTraitFlag(OdGiVisualStyleProperties::Property flagProp, OdUInt32 flagVal, bool bEnable=true)
OdString
Definition: OdString.h:95
OdDbVisualStyle::createDisplayStyle
static OdGiDisplayStylePtr createDisplayStyle()
OdDb::kszVS3DWireframe
const wchar_t kszVS3DWireframe[]
Definition: DbVisualStyle.h:46
NULL
#define NULL
Definition: GsProperties.h:177
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, double dVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
OdDbVisualStyle::description
const OdString description() const
OdGiVisualStyleOperations::Operation
Operation
Definition: GiVisualStyle.h:980
OdDb::kszVSFlatWithEdges
const wchar_t kszVSFlatWithEdges[]
Definition: DbVisualStyle.h:40
OdGiFaceStyle
Definition: GiVisualStyle.h:41
OdDbVisualStyle::setDescription
void setDescription(const OdString &pDescription)
OdDb::kszVSLinePattern
const wchar_t kszVSLinePattern[]
Definition: DbVisualStyle.h:65
OdDbVisualStyle::edgeStyle
const OdGiEdgeStyle & edgeStyle() const
OdDbVisualStyle::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
DbObject.h
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
green
GLfloat green
Definition: gles2_ext.h:147
OdDbVisualStyle::trait
OdGiVariantPtr trait(OdGiVisualStyleProperties::Property prop, OdGiVisualStyleOperations::Operation *pOp=NULL) const
OdDb::kszVSEdgeColorOff
const wchar_t kszVSEdgeColorOff[]
Definition: DbVisualStyle.h:72
OdDbVisualStyle::type
OdGiVisualStyle::Type type() const
OdDb::kszVSShaded
const wchar_t kszVSShaded[]
Definition: DbVisualStyle.h:58
blue
GLfloat GLfloat blue
Definition: gles2_ext.h:147
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, const OdGiVariant *pVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
OdDb::kszVSDim
const wchar_t kszVSDim[]
Definition: DbVisualStyle.h:61
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, const OdCmColor *pColor, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
TD_PackPop.h
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, bool bVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
OdDbVisualStyle::createEdgeStyle
static OdGiEdgeStylePtr createEdgeStyle()
OdDbVisualStyle::setEdgeStyle
void setEdgeStyle(const OdGiEdgeStyle &edgeStyle)
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGiVisualStyleOperations::kSet
@ kSet
Definition: GiVisualStyle.h:983
OdGiVariant
Definition: GiVariant.h:47
OdDb::kszVSFlat
const wchar_t kszVSFlat[]
Definition: DbVisualStyle.h:39
OdDb::kszVSShadedWithEdges
const wchar_t kszVSShadedWithEdges[]
Definition: DbVisualStyle.h:57
OdDbVisualStyle
Definition: DbVisualStyle.h:80
OdDb::kszVSCustom
const wchar_t kszVSCustom[]
Definition: DbVisualStyle.h:51
OdDb::kszVSOverhangOff
const wchar_t kszVSOverhangOff[]
Definition: DbVisualStyle.h:71
OdDb::kszVS2DWireframe
const wchar_t kszVS2DWireframe[]
Definition: DbVisualStyle.h:45
OdDb::kszVSThicken
const wchar_t kszVSThicken[]
Definition: DbVisualStyle.h:63
OdSmartPtr
Definition: SmartPtr.h:58
OdDb::kszVSRealistic
const wchar_t kszVSRealistic[]
Definition: DbVisualStyle.h:49
OdDbVisualStyle::setDisplayStyle
void setDisplayStyle(const OdGiDisplayStyle &displayStyle)
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdDb::kszVSJitterOff
const wchar_t kszVSJitterOff[]
Definition: DbVisualStyle.h:70
OdDbVisualStyle::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbVisualStyle::createFaceStyle
static OdGiFaceStylePtr createFaceStyle()
OdGiDrawable
Definition: GiDrawable.h:49
OdDbVisualStyle::isInternalUseOnly
bool isInternalUseOnly() const
OdDb::kszVSGouraud
const wchar_t kszVSGouraud[]
Definition: DbVisualStyle.h:41
OdDbDxfFiler
Definition: DbFiler.h:194
OdDb::kszVSShadesOfGray
const wchar_t kszVSShadesOfGray[]
Definition: DbVisualStyle.h:52
OdGiVisualStyleProperties::Property
Property
Definition: GiVisualStyle.h:734
TD_PackPush.h
OdDbVisualStyle::setInternalUseOnly
void setInternalUseOnly(bool bInternalUseOnly)
OdDbVisualStyle::OdDbVisualStyle
OdDbVisualStyle()
OdDb::kszVSBrighten
const wchar_t kszVSBrighten[]
Definition: DbVisualStyle.h:62
GiVisualStyle.h
OdDbVisualStyle::setType
void setType(OdGiVisualStyle::Type type)
OdDbVisualStyle::faceStyle
const OdGiFaceStyle & faceStyle() const
OdDbVisualStyle::subSetAttributes
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
OdDb::kszVSHidden
const wchar_t kszVSHidden[]
Definition: DbVisualStyle.h:48
OdDb::kszVSGouraudWithEdges
const wchar_t kszVSGouraudWithEdges[]
Definition: DbVisualStyle.h:42
OdDb::kszVSBasic
const wchar_t kszVSBasic[]
Definition: DbVisualStyle.h:47
OdGiDrawableTraits
Definition: Gi.h:71
OdDb::kszVSSketchy
const wchar_t kszVSSketchy[]
Definition: DbVisualStyle.h:53
OdDb::kszVSConceptual
const wchar_t kszVSConceptual[]
Definition: DbVisualStyle.h:50
OdDbVisualStylePtr
OdSmartPtr< OdDbVisualStyle > OdDbVisualStylePtr
Definition: DbVisualStyle.h:328
OdDbVisualStyle::traitFlag
bool traitFlag(OdGiVisualStyleProperties::Property flagProp, OdUInt32 flagVal) const
OdDb
Definition: Db2dPolyline.h:50
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdDbVisualStyle::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdGiDisplayStyle
Definition: GiVisualStyle.h:630
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbVisualStyle::displayStyle
const OdGiDisplayStyle & displayStyle() const
OdGiVisualStyle::Type
Type
Definition: GiVisualStyle.h:1004
OdDb::kszVSXRay
const wchar_t kszVSXRay[]
Definition: DbVisualStyle.h:54
OdDbVisualStyle::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbVisualStyle)
OdDb::kszVSTransparent
const wchar_t kszVSTransparent[]
Definition: DbVisualStyle.h:64
OdCmColor
Definition: CmColor.h:59
OdDb::kszVSFacePattern
const wchar_t kszVSFacePattern[]
Definition: DbVisualStyle.h:66
OdDbVisualStyle::setFaceStyle
void setFaceStyle(const OdGiFaceStyle &faceStyle)
OdDb::kszVSColorChange
const wchar_t kszVSColorChange[]
Definition: DbVisualStyle.h:67
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, const OdString &strVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
OdDbVisualStyle::name
void name(OdString &value) const
OdDbObject
Definition: DbObject.h:211
OdDbVisualStyle::createVisualStyle
static OdGiVisualStylePtr createVisualStyle()
OdDbDwgFiler
Definition: DbFiler.h:1031
OdGiEdgeStyle
Definition: GiVisualStyle.h:220
OdDbVisualStyle::setTrait
void setTrait(OdGiVisualStyleProperties::Property prop, double red, double green, double blue, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
OdDbVisualStyle::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbVisualStyle::drawable
virtual OdGiDrawable * drawable()