ElementProperties.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include "DgnPlatform.h"
11 #include <Bentley/RefCounted.h>
12 #include "PropertyContext.h"
13 
15 
18 
21 
22 /*=================================================================================**/
46 {
47 private:
48  virtual void MakeClassAbstract() = 0;
49 public:
50 public:
51 
56 
58 DGNPLATFORM_EXPORT UInt32 GetColor () const;
59 
61 DGNPLATFORM_EXPORT Int32 GetLineStyle (LineStyleParams* lsParams = NULL) const;
62 
64 DGNPLATFORM_EXPORT UInt32 GetWeight () const;
65 
67 DGNPLATFORM_EXPORT LevelId GetLevel () const;
68 
70 DGNPLATFORM_EXPORT DgnElementClass GetElementClass () const;
71 
73 DGNPLATFORM_EXPORT Int32 GetDisplayPriority () const;
74 
76 DGNPLATFORM_EXPORT double GetTransparency () const;
77 
79 DGNPLATFORM_EXPORT DVec3dCP GetThickness (bool& isCapped) const;
80 
84 DGNPLATFORM_EXPORT static UInt32 GetGraphicGroup (ElementHandleCR eh);
85 
89 DGNPLATFORM_EXPORT static bool GetLocked (ElementHandleCR eh);
90 
91 }; // ElementPropertiesGetter
92 
93 /*=================================================================================**/
117 {
118 private:
119  virtual void MakeClassAbstract() = 0;
120 public:
121 public:
122 
127 
131 DGNPLATFORM_EXPORT bool Apply (EditElementHandleR eeh);
132 
138 DGNPLATFORM_EXPORT void SetColor (UInt32 color);
139 
145 DGNPLATFORM_EXPORT void SetFillColor (UInt32 fillColor);
146 
150 DGNPLATFORM_EXPORT void SetLinestyle (Int32 style, LineStyleParamsCP lsParams);
151 
154 DGNPLATFORM_EXPORT void SetWeight (UInt32 weight);
155 
158 DGNPLATFORM_EXPORT void SetLevel (LevelId level);
159 
162 DGNPLATFORM_EXPORT void SetElementClass (DgnElementClass elmClass);
163 
167 DGNPLATFORM_EXPORT void SetDisplayPriority (Int32 priority);
168 
171 DGNPLATFORM_EXPORT void SetTransparency (double transparency);
172 
181 DGNPLATFORM_EXPORT void SetThickness (double thickness, DVec3dCP direction, bool isCapped, bool alwaysUseDirection);
182 
186 DGNPLATFORM_EXPORT void SetFont (DgnFontCR font);
187 
194 DGNPLATFORM_EXPORT void SetChangeEntireElement (bool changeAll);
195 
199 DGNPLATFORM_EXPORT static void SetGraphicGroup (EditElementHandleR eeh, UInt32 gg);
200 
204 DGNPLATFORM_EXPORT static void SetLocked (EditElementHandleR eeh, bool locked);
205 
209 DGNPLATFORM_EXPORT static void ApplyElemDisplayParams (EditElementHandleR eeh, ElemDisplayParamsCR params);
210 
215 DGNPLATFORM_EXPORT static void ApplyTemplate (EditElementHandleR eeh, ElementHandleCR templateEh);
216 
217 }; // ElementPropertiesSetter
218 
220 
222 
struct DVec3d const * DVec3dCP
Definition: msgeomstructs_typedefs.h:89
struct DgnPlatform::DgnFont const & DgnFontCR
Definition: DgnFontManager.h:67
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
struct DgnPlatform::LineStyleParams const * LineStyleParamsCP
Definition: DgnPlatform.h:360
struct DgnPlatform::ElemDisplayParams const & ElemDisplayParamsCR
Definition: DgnPlatform.h:255
UInt32 LevelId
Definition: DgnPlatformBaseType.r.h:85
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
RefCountedPtr< ElementPropertiesGetter > ElementPropertiesGetterPtr
Definition: ElementProperties.h:19
uint32_t UInt32
Definition: Bentley.r.h:128
#define NULL
Definition: Bentley.h:157
#define CLRPUBLIC
Definition: DgnPlatform/ExportMacros.h:12
Parameters defining a line style.
Definition: IViewDraw.h:24
RefCountedPtr< ElementPropertiesSetter > ElementPropertiesSetterPtr
Definition: ElementProperties.h:20
int32_t Int32
Definition: Bentley.r.h:119
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
ElementPropertiesGetter is a helper class to query element symbology and properties.
Definition: ElementProperties.h:45
ElementPropertiesSetter is a helper class for changing element symbology and properties.
Definition: ElementProperties.h:116
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
DgnElementClass
Definition: DgnPlatform.r.h:1351
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.