DetailingSymbolHandlers.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 <ECObjects/ECObjectsAPI.h>
11 #include "DetailingSymbol.h"
12 
14 
15 //=======================================================================================
22 //=======================================================================================
23 
24 /*=================================================================================**/
31 struct INamedViewCreateHelper : public RefCounted <IRefCounted>
32 {
33 protected:
38 virtual WString _GetViewNamePrefix () = 0;
39 
44 virtual WString _GetViewType () = 0;
45 
50 virtual bool _GetViewBaseName(WStringR baseName) { return false; }
51 
52 public:
55  DGNPLATFORM_EXPORT WString GetViewNamePrefix ();
56 
59  DGNPLATFORM_EXPORT WString GetViewType ();
60 
63  DGNPLATFORM_EXPORT bool GetViewBaseName (WStringR baseName);
64 
65 };
66 
67 //=======================================================================================
69 //=======================================================================================
71 
72 /*=================================================================================**/
78  ITextEdit,
81 
82 {
84 
85 protected:
86 
90 virtual IDependencyHandler* _GetIDependencyHandler () override = 0;
91 
98 virtual void _OnRootsChanged (ElementHandleR dependent, bvector<RootChange> const& rootsChanged, bvector<XAttributeHandle> const& xAttrsAffected) override = 0;
99 protected:
102 virtual void _GetImageName (WStringR name) = 0;
103 }; // DetailingSymbolBaseHandler
104 
105 //=======================================================================================
108 //=======================================================================================
110  {
111  Generated,
112  Associated,
113  Both,
114 
115  }; // CalloutViewRelationCriteria
116 
117 //=======================================================================================
119 //=======================================================================================
121  {
122  Success = 0,
123  Error = 1,
124  NoChange = 2,
125 
126  }; // UpdateCalloutStatus
127 
128 /*=================================================================================**/
134 {
136 
137 protected:
143 virtual StatusInt _OnPreprocessCopy (EditElementHandleR symbolEH, ElementCopyContextP ccP) override;
144 
151 virtual void _OnRootsChanged (ElementHandleR dependent, bvector<RootChange> const& rootsChanged, bvector<XAttributeHandle> const& xAttrsAffected) override;
152 
157 virtual void _Draw (ElementHandleCR thisElm, ViewContextR context) override;
158 
162 virtual void _OnAdded (ElementHandleP element) override;
163 
169 virtual void _GetDescription (ElementHandleCR el, WString& descr, UInt32 desiredLength) override;
170 public:
171 
175  DGNPLATFORM_EXPORT static bool IsCalloutDependantOnAttachment (ElementHandleCR calloutEH);
176 
181  DGNPLATFORM_EXPORT static DgnAttachmentCP GetDgnAttachment (ElementHandleCR calloutEH);
182 
188  DGNPLATFORM_EXPORT static StatusInt GetGeneratedViewName (WStringR viewName, ElementHandleCR calloutEH, int index = 0);
189 
195  DGNPLATFORM_EXPORT static StatusInt CopyGeneratedView (EditElementHandleR viewEEH, EditElementHandleR calloutEEH);
196 
201  DGNPLATFORM_EXPORT static StatusInt CopyAllGeneratedViews (EditElementHandleR calloutEEH);
202 
207  DGNPLATFORM_EXPORT static bool IsGeneratedView (ElementHandleCR calloutEH, ElementHandleCR viewEH);
208 
213  DGNPLATFORM_EXPORT static bool IsAssociatedView (ElementHandleCR calloutEH, ElementHandleCR viewEH);
214 
219  DGNPLATFORM_EXPORT static int GetNumViews (ElementHandleCR calloutEH, CalloutViewRelationCriteria relation);
220 
228  DGNPLATFORM_EXPORT static StatusInt GetView (EditElementHandleP viewEEH, ElementHandleCR calloutEH, size_t index, CalloutViewRelationCriteria relation, bool makeNamedViewModelReadWrite);
229 
235  DGNPLATFORM_EXPORT static bool GetViewNamedGroupFromCallout (NamedGroupPtr* group, ElementHandleCR calloutEH);
236 
237 }; // CalloutBaseHandler
238 /*=================================================================================**/
244 {
247 }; // SectionCalloutHandler
248 /*=================================================================================**/
254 {
257 }; // ElevationCalloutHandler
258 /*=================================================================================**/
264 {
267 
268 
269 }; // InteriorElevationCalloutHandler
270 /*=================================================================================**/
276 {
279 }; //
280 /*=================================================================================**/
286 {
289 };
290 /*=================================================================================**/
296 {
299 
300 }; // DetailCallout3DViewHandler
301 /*=================================================================================**/
307 {
310 }; // DrawingBoundaryHandler
311 /*=================================================================================**/
317 {
320 }; // TitleTextHandler
321 /*=================================================================================**/
327 {
328 public:
334 
340  DGNPLATFORM_EXPORT DrawingBoundaryBuilder(WStringCR name, DgnAttachmentCP attachment, DgnModelP rootModel, WStringCR viewType);
341 
348  DGNPLATFORM_EXPORT DrawingBoundaryBuilder (WStringCR name, WStringCR type, DPoint3dCP titleOrigin, ElementHandleCR boundaryEH, DgnModelP rootModel);
349 
357  DGNPLATFORM_EXPORT DrawingBoundaryBuilder (WStringCR name, WStringCR type, DPoint3dCP titleOrigin, DPoint3dCR origin, DPoint3dCR size, DgnModelP rootModel);
358 
361  DGNPLATFORM_EXPORT void SetBubbleOnLeft (bool flag) {m_bubbleOnLeft = flag;}
362 
365 DGNPLATFORM_EXPORT void SetDetailScale(double scale);
366 
367 
370  DGNPLATFORM_EXPORT StatusInt CreateAndWrite ();
371 
372 }; // DrawingBoundaryBuilder
373 
375 
377 
Plan Callout Element Handler.
Definition: DetailingSymbolHandlers.h:275
A readonly "handle" to an element.
Definition: ElementHandle.h:113
Definition: ViewContext.h:358
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
struct DPoint3d const * DPoint3dCP
Definition: msgeomstructs_typedefs.h:79
Detail Callout Element Handler.
Definition: DetailingSymbolHandlers.h:285
Base class for application defined cells that want to be treated as a single object.
Definition: CellHeaderHandler.h:82
Interior Elevation Marker Element Handler.
Definition: DetailingSymbolHandlers.h:263
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
Callout and named view control each other's boundary (position, orientation, scale, range). If named view is deleted, callout will be deleted.
#define ELEMENTHANDLER_DECLARE_MEMBERS(__classname__, __exporter__)
Definition: Handler.h:86
An element Handler should implement this interface if it wants to know when elements referenced by it...
Definition: XAttributeHandler.h:56
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
Interface for Named View Creator Helper Class.
Definition: DetailingSymbolHandlers.h:31
If named view is deleted, callout will be deleted.
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
3d Detail Callout Element Handler
Definition: DetailingSymbolHandlers.h:295
Template to simplify the task of writing a class that implements the reference-counting pattern...
Definition: RefCounted.h:90
Drawing View Callout Handler Class.
Definition: DetailingSymbolHandlers.h:306
uint32_t UInt32
Definition: Bentley.r.h:128
CalloutViewRelationCriteria
This enum describes the search criteria for callouts based on types of relationship that a callout an...
Definition: DetailingSymbolHandlers.h:109
Detailing Symbol Element Handler Base Class.
Definition: DetailingSymbolHandlers.h:77
Interface for handlers that support annotation behavior.
Definition: IAnnotationHandler.h:20
A DgnModel represents a DgnModel in memory.
Definition: DgnModel.h:236
virtual bool _GetViewBaseName(WStringR baseName)
Classes that implement INamedViewCreateHelper interface should implement this method to return the st...
Definition: DetailingSymbolHandlers.h:50
Definition: ITextEdit.h:144
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
Callout Element Handler base class.
Definition: DetailingSymbolHandlers.h:133
Elevation Callout Element Handler.
Definition: DetailingSymbolHandlers.h:253
#define DEFINE_T_SUPER(B)
Definition: Bentley.h:167
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Use the ElementCopyContext class to copy elements.
Definition: ElementCopyContext.h:241
int StatusInt
Definition: Bentley.h:222
Creates a DrawingBoundary object.
Definition: DetailingSymbolHandlers.h:326
Section Callout Element Handler.
Definition: DetailingSymbolHandlers.h:243
UpdateCalloutStatus
This enum describes the return status of updating callout from named view.
Definition: DetailingSymbolHandlers.h:120
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
Title Text Handler Class.
Definition: DetailingSymbolHandlers.h:316
RefCountedPtr< INamedViewCreateHelper > INamedViewCreateHelperPtr
Ref-counted smart pointer object to handle INamedViewCreateHelper.
Definition: DetailingSymbolHandlers.h:70
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
DGNPLATFORM_EXPORT void SetBubbleOnLeft(bool flag)
Set drawing title's bubble on left side.
Definition: DetailingSymbolHandlers.h:361
struct DgnPlatform::DgnAttachment const * DgnAttachmentCP
Definition: DgnPlatform.h:185
size_type size() const
Definition: stdcxx/bstdmap.h:214
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51

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