Public Member Functions | Static Public Member Functions | List of all members
DisplayHandler Struct Referenceabstract

Base class for handlers that control the display of graphic (visible) elements. More...

#include <DisplayHandler.h>

Inheritance diagram for DisplayHandler:
Handler NonCopyableClass ComplexHeaderDisplayHandler ConeHandler CurveHandler DimensionHandler EllipticArcBaseHandler ExtendedElementHandler LineHandler LineStringBaseHandler MeshHeaderHandler MultilineHandler PointCloudHandler PointStringHandler RasterFrameHandler RasterHdrHandler SectionClipElementHandler SharedCellHandler TagElementHandler TextHandlerBase

Public Member Functions

void GetPathDescription (ElementHandleCR el, WStringR string, DisplayPathCP path, WCharCP levelStr, WCharCP modelStr, WCharCP groupStr, WCharCP delimiterStr)
 Return a full description of the path to be used to inform the user which element is under consideration. More...
 
void GetTransformOrigin (ElementHandleCR el, DPoint3dR origin)
 Get the Transform Origin for this element. More...
 
void GetSnapOrigin (ElementHandleCR el, DPoint3dR origin)
 Get the snap origin for this element. More...
 
void GetOrientation (ElementHandleCR el, RotMatrixR orientation)
 Get an "orientation" RotMatrix for this element. More...
 
bool GetBasisTransform (ElementHandleCR eh, TransformR transform)
 Get an "basis" Transform for this element. More...
 
bool GetBasisRange (ElementHandleCR eh, DRange3dR range)
 Get an basis Range for this element. More...
 
void SetBasisRange (EditElementHandleR eh, DRange3dCR range)
 Set an basis Range for this element. More...
 
void SetBasisTransform (EditElementHandleR eh, TransformCR transform)
 Set an basis Transform for this element. More...
 
bool IsRenderable (ElementHandleCR el)
 Determine whether this element is renderable (i.e., subject to lighting). More...
 
bool IsPlanar (ElementHandleCR el, DVec3dP normal, DPoint3dP point, DVec3dCP inputDefaultNormal)
 Test whether this element is planar. More...
 
bool IsVisible (ElementHandleCR el, ViewContextR context, bool testRange, bool testLevel, bool testClass)
 Determine whether this element is visible in the supplied context. More...
 
StatusInt Drop (ElementHandleCR eh, ElementAgendaR dropGeom, DropGeometryCR geometry)
 Drop this element to a group of (simpler) primitive elements. More...
 
- Public Member Functions inherited from Handler
void GetDescription (ElementHandleCR el, WStringR string, UInt32 desiredLength)
 Get a brief string describing the element. More...
 
void GetTypeName (WStringR string, UInt32 desiredLength)
 Get the type name for this handler. More...
 
DisplayHandlerP GetDisplayHandler ()
 Use this method instead of dynamic_cast<DisplayHandlerP> (handler) More...
 
ITransactionHandlerP GetITransactionHandler ()
 Use this method instead of dynamic_cast<ITransactionHandlerP> (handler) More...
 
IDependencyHandlerP GetIDependencyHandler ()
 Use this method instead of dynamic_cast<IDependencyHandlerP> (handler) More...
 
StatusInt ApplyTransform (EditElementHandleR element, TransformInfoCR transform)
 Transform the element. More...
 
StatusInt FenceStretch (EditElementHandleR element, TransformInfoCR transform, FenceParamsP fp, FenceStretchFlags options)
 The handler is requested to "stretch" the specified element, that is, to transform the portions of the element that meet the clip criteria. More...
 
StatusInt FenceClip (ElementAgendaP inside, ElementAgendaP outside, ElementHandleCR element, FenceParamsP fp, FenceClipFlags options)
 The handler is requested to clip the specified element, that is, to return the portions of the element that are inside/outside the clip criteria. More...
 
void ConvertTo3d (EditElementHandleR eeh, double elevation)
 Convert a 2d element to it's 3d form. More...
 
void ConvertTo2d (EditElementHandleR eeh, TransformCR flattenTrans, DVec3dCR flattenDir)
 Convert a 3d element to it's 2d form. More...
 
void QueryProperties (ElementHandleCR eh, PropertyContextR context)
 Method for enummerating the common properties of elements such as color and level. More...
 
void EditProperties (EditElementHandleR eeh, PropertyContextR context)
 Method for changing the common properties of elements such as color and level. More...
 
bool ExposeChildren (ElementHandleCR el, ExposeChildrenReason reason)
 Determine whether the children of this element should be exposed to the caller for the intended purpose. More...
 

Static Public Member Functions

static DisplayHandlerGetInstance ()
 
static void InitializeBasis (EditElementHandleR eh, TransformCR transform, DRange3dCP range)
 Initialize basis for an element - In most cases this should be done only once at creation. More...
 

Detailed Description

Base class for handlers that control the display of graphic (visible) elements.

Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib

Member Function Documentation

StatusInt Drop ( ElementHandleCR  eh,
ElementAgendaR  dropGeom,
DropGeometryCR  geometry 
)

Drop this element to a group of (simpler) primitive elements.

Parameters
[in]ehElement to drop
[out]dropGeomElement agenda holding the result of the drop operation.
[in]geometryOptions to determine how drop should be handled
Returns
SUCCESS if element was dropped and dropGeom is valid
bool GetBasisRange ( ElementHandleCR  eh,
DRange3dR  range 
)

Get an basis Range for this element.

Note
Returns false (and the standard element range) if no basis range/transform is available.
bool GetBasisTransform ( ElementHandleCR  eh,
TransformR  transform 
)

Get an "basis" Transform for this element.

Note
Returns false (and identity transform) if no basis transform is available.
static DisplayHandler& GetInstance ( )
static
void GetOrientation ( ElementHandleCR  el,
RotMatrixR  orientation 
)

Get an "orientation" RotMatrix for this element.

The orientation matrix will be the "natural" orientation of the element. Often this matrix is used in combination with the GetTransformOrigin for relating this element to others or for visible feedback.

Note
If the element has no natural orientation, it will return the identity matrix.
void GetPathDescription ( ElementHandleCR  el,
WStringR  string,
DisplayPathCP  path,
WCharCP  levelStr,
WCharCP  modelStr,
WCharCP  groupStr,
WCharCP  delimiterStr 
)

Return a full description of the path to be used to inform the user which element is under consideration.

Parameters
[in]elThe element
[out]stringThe string to be filled with the description of the path.
[in]pathThe DisplayPath to describe.
[in]levelStrA character string describing the level of the element. This can be used to form the description.
[in]modelStrA character string describing the model of the element.
[in]groupStrA character string describing the groups holding the element.
[in]delimiterStrA character string used to delimit the components of the description (examples: ", " or "\n")
void GetSnapOrigin ( ElementHandleCR  el,
DPoint3dR  origin 
)

Get the snap origin for this element.

Parameters
[in]elElement for origin
[out]originThe snap origin (the point that the user will discover using snap-mode-origin on this element.)
Remarks
see discussion of origins in GetTransformOrigin.
void GetTransformOrigin ( ElementHandleCR  el,
DPoint3dR  origin 
)

Get the Transform Origin for this element.

p> The concept of an "origin" of a displayable element does not have a mathematical definition. Instead, every displayable element defines what its "origin" means. It is important to realize that the elements' "origins" are not necessarily geometrically significant points. In fact, while in general the origin(s) of an element have some meaning significant to the element, the origin point may not be on or even near the element. p> There are two general intended purposes for the concept of an origin. First, tools and applications sometimes wish to find the "beginning" of the element, if there is such a point. This is generally the intent of the "origin" snap mode, and applications can find that point by calling the GetSnapOrigin method. The second intended purpose for "origin" is a point that can be used as the invariant point for geometric transformations. That point can be found via this method. p> For example, MicroStation Arc elements return the start point of the arc for GetSnapOrigin and the center of the arc for GetTransformOrigin. MicroStation elements that define a curve generally return the first point on the curve for GetSnapOrigin and the path centroid for GetTransformOrigin. MicroStation Text elements return the "user" origin for both GetSnapOrigin and GetTransfromOrigin.

Parameters
[in]elElement for origin
[out]originThe transform origin.
static void InitializeBasis ( EditElementHandleR  eh,
TransformCR  transform,
DRange3dCP  range 
)
static

Initialize basis for an element - In most cases this should be done only once at creation.

bool IsPlanar ( ElementHandleCR  el,
DVec3dP  normal,
DPoint3dP  point,
DVec3dCP  inputDefaultNormal 
)

Test whether this element is planar.

Callers should be aware that the answer may be expensive to determine.

Parameters
[in]elElement to test
[out]normalThe normal bvector. Only valid if the method returns true. May be NULL.
[out]pointA point on the plane. Only valid if the method returns true. May be NULL.
[in]inputDefaultNormalA normal bvector to be used in the case where the element does not define a plane (a line, for example).
bool IsRenderable ( ElementHandleCR  el)

Determine whether this element is renderable (i.e., subject to lighting).

This test also determines whether the element is subject to black/white reversal against the view backgound color.

Parameters
[in]elElement to test
Returns
true if the element is renderable
bool IsVisible ( ElementHandleCR  el,
ViewContextR  context,
bool  testRange,
bool  testLevel,
bool  testClass 
)

Determine whether this element is visible in the supplied context.

Parameters
[in]elElement to test
[in]contextContext for visibility testing
[in]testRangeIf true, test the element for visibility on range criteria. If false, do not reject element on range criteria
[in]testLevelIf true, test the element for visibility on level criteria. If false, do not reject element on level criteria
[in]testClassIf true, test the element for visibility on element class criteria. If false, do not reject element on class criteria
Returns
true if the element is visible in the context, false if it is invisible.
void SetBasisRange ( EditElementHandleR  eh,
DRange3dCR  range 
)

Set an basis Range for this element.

void SetBasisTransform ( EditElementHandleR  eh,
TransformCR  transform 
)

Set an basis Transform for this element.


The documentation for this struct was generated from the following file:

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