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

A display style is a collection of view-related settings that can be applied to the whole or part of a view. More...

#include <DisplayStyleManager.h>

Inheritance diagram for DisplayStyle:
RefCountedBase RefCounted< IRefCounted > IRefCounted

Public Member Functions

DisplayStylePtr Clone () const
 Makes a deep copy of a display style. More...
 
DisplayStylePtr Clone (DgnFileR destinationDgnFile) const
 Makes a deep copy of a display style. More...
 
DisplayStylePtr Clone (DgnFileR destinationDgnFile, WCharCP newName) const
 Makes a deep copy of a display style. More...
 
bool Equals (DisplayStyleCR rhs) const
 Performs a deep equality check. More...
 
bool Equals (DisplayStyleCR rhs, bool testSettingsOnly) const
 Performs a deep equality check. More...
 
DgnFileR GetFileR () const
 Gets the file that this display style is based on; useful for resolving the effective value of internal IDs. More...
 
bool IsInFile (DgnFileR dgnFile) const
 Determines if this display style is based on the provided file. More...
 
int GetIndex () const
 Gets the ID of this display style. More...
 
WStringCR GetName () const
 Gets the name. More...
 
MSRenderMode GetDisplayMode () const
 Gets the display mode. More...
 
void SetDisplayMode (MSRenderMode newDisplayMode)
 Sets the display mode. More...
 
bool IsFromFile () const
 True if this display style originated from a file. More...
 
bool IsFromHardCodedDefault () const
 True if this display style originated from a hard-coded default. More...
 
DisplayStyleFlagsCR GetFlags () const
 
DisplayStyleFlagsR GetFlagsR ()
 Gets a read/write reference to the flags (. More...
 
void SetFlags (DisplayStyleFlagsCR newFlags)
 Sets the flags (. More...
 
ViewDisplayOverridesCR GetOverrides () const
 Gets a read-only reference to the overrides (. More...
 
ViewDisplayOverridesR GetOverridesR ()
 Gets a read/write reference to the overrides (. More...
 
void SetOverrides (ViewDisplayOverridesCR newOverrides, DgnFileR sourceDgnFile)
 Sets the overrides (. More...
 
WString GetIconName () const
 Gets the name of the icon to be associated with this display style. More...
 
bool IsUsableForViews () const
 True if this display style can be used for whole views. More...
 
void SetIsUsableForViews (bool isValid)
 Sets if this display style can be used for whole views. More...
 
bool IsUsableForClipVolumes () const
 True if this display style can be used for individual sections. More...
 
void SetIsUsableForClipVolumes (bool isValid)
 Sets if this display style can be used for individual sections. More...
 
bool MatchesViewInfoData (ViewInfoCR viewInfo) const
 True if this display style effectively matches the provided view data. More...
 
bool IsValidForViewport (ViewportCR viewport) const
 True if this display style can be applied to the provided Viewport. More...
 
bool IsValidForViewport (ViewportCR viewport, DisplayStyleApplyValidity *applyValidity) const
 True if this display style can be applied to the provided viewport. More...
 
void CopySettingsTo (ViewInfoR viewInfo, DgnFileR destinationDgnFile) const
 Pushes this display style's settings to the provided viewinfo, re-mapping indices to ensure that they are compatible with the provided file. More...
 
WStringCR GetEnvironmentName () const
 
void SetEnvironmentName (WCharCP environmentName)
 Changes the Environment name. More...
 
EnvironmentDisplay GetEnvironmentTypeDisplayed () const
 
void SetEnvironmentTypeDisplayed (EnvironmentDisplay typeDisplayed)
 Sets the Environment Type which will be displayed. More...
 
DisplayStyleGroundPlaneCR GetGroundPlane () const
 
DisplayStyleGroundPlaneP GetGroundPlaneP ()
 
StatusInt EnsureDisplayStyleHandler (DgnFileR) const
 Ensures that it has a handler. More...
 
- Public Member Functions inherited from RefCounted< IRefCounted >
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 
UInt32 AddRef () const
 
UInt32 Release () const
 
 RefCounted ()
 
 RefCounted (RefCounted const &rhs)
 
RefCountedoperator= (RefCounted const &rhs)
 
UInt32 GetRefCount () const
 

Static Public Member Functions

static DisplayStylePtr Create (DgnFileR dgnFile, WCharCP name)
 This is static method for creating the object of type DisplayStyle. More...
 

Additional Inherited Members

- Protected Member Functions inherited from RefCounted< IRefCounted >
virtual ~RefCounted ()
 
- Protected Member Functions inherited from IRefCounted
virtual ~IRefCounted ()
 
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 

Detailed Description

A display style is a collection of view-related settings that can be applied to the whole or part of a view.

Note
Please see additional documentation for the Display Styles module; it contains a lot of general background information and tips for display styles.
When writing a display style to a file, if you wish to then use its ID, you must re-read the display style from the file and get its ID. When writing to the file, the display style you provide is cloned and configured for the file internally; thus your copy remains unaltered, including its potentially unusable/invalid ID.
Some display style operations require DGN library support; these operations are only available on the PowerPlatform.
You must use one of the static Create factory methods to create instances of this class.
See also
DisplayStyleManager for managing display styles in files

Member Function Documentation

DisplayStylePtr Clone ( ) const

Makes a deep copy of a display style.

It will have the same name and ID, allowing you to save it to the file, replacing the existing one.

Note
This overload does not remap any IDs, and keeps the same file as the original.
Returns
DisplayStylePtr "smart pointer"
DisplayStylePtr Clone ( DgnFileR  destinationDgnFile) const

Makes a deep copy of a display style.

It will have the same name and ID, allowing you to save it to the file, replacing the existing one.

Note
This overload remaps internal IDs (but not the display style ID itself) into the destination file, creating new ID entries as necessary.
Parameters
destinationDgnFileIN the object of DgnFileR
Returns
DisplayStylePtr "smart pointer"
DisplayStylePtr Clone ( DgnFileR  destinationDgnFile,
WCharCP  newName 
) const

Makes a deep copy of a display style.

It will have the same ID but new name.

Note
This overload remaps internal IDs (but not the display style ID itself) into the destination file, creating new ID entries as necessary.
Parameters
destinationDgnFileIN the object of DgnFileR
newNameIN the object of WCharCR
Returns
DisplayStylePtr "smart pointer"
void CopySettingsTo ( ViewInfoR  viewInfo,
DgnFileR  destinationDgnFile 
) const

Pushes this display style's settings to the provided viewinfo, re-mapping indices to ensure that they are compatible with the provided file.

Note
This is a low-level method, and is only inteded to be used with DgnPlatform. Users of the PowerPlatform should use IViewManager::ApplyDisplayStyleToView instead.
The provided file should match the view's root.
Parameters
viewInfoIN on which it apply the setting from other
destinationDgnFileIN the object of dgn file
static DisplayStylePtr Create ( DgnFileR  dgnFile,
WCharCP  name 
)
static

This is static method for creating the object of type DisplayStyle.

Parameters
dgnFileIN the object of MSDgnFile
nameIN the MSWCharCR
Returns
DisplayStylePtr "smart pointer"
StatusInt EnsureDisplayStyleHandler ( DgnFileR  ) const

Ensures that it has a handler.

bool Equals ( DisplayStyleCR  rhs) const

Performs a deep equality check.

Note
This overload is equivalent to calling Equals(rhs, false), and is provided as a convenience.
Parameters
rhsIN the object to compare with
Returns
true if this object and the rhs parameter are equal by-value; false otherwise
bool Equals ( DisplayStyleCR  rhs,
bool  testSettingsOnly 
) const

Performs a deep equality check.

Note
Enable testSettingsOnly to ignore differences in display style ID, source, and file.
Parameters
rhsIN the object to compare with
testSettingsOnlyIN the bool parameter
Returns
true if this object and the rhs parameter are equal by-value; false otherwise
MSRenderMode GetDisplayMode ( ) const

Gets the display mode.

This is an intrinsic property, not an override.

Returns
UInt32 type.
WStringCR GetEnvironmentName ( ) const
Returns
the environment name WStringCR
EnvironmentDisplay GetEnvironmentTypeDisplayed ( ) const
Returns
Environment Type which will be displayed
DgnFileR GetFileR ( ) const

Gets the file that this display style is based on; useful for resolving the effective value of internal IDs.

Returns
A dgn file object, DgnFileR.
DisplayStyleFlagsCR GetFlags ( ) const
Returns
the object of DisplayStyleFlagsCR Gets a read-only reference to the flags (
See also
DisplayStyleFlags).
DisplayStyleFlagsR GetFlagsR ( )

Gets a read/write reference to the flags (.

See also
DisplayStyleFlags).
Returns
the object of DisplayStyleFlagsR
DisplayStyleGroundPlaneCR GetGroundPlane ( ) const
Returns
the reference to ground plane for this display style
DisplayStyleGroundPlaneP GetGroundPlaneP ( )
Returns
the pointer to ground plane for this display style
WString GetIconName ( ) const

Gets the name of the icon to be associated with this display style.

Note
This method is only valid from PowerPlatform; this icon name can be retrieved as a standard MicroStation icon.
Returns
string
Remarks
Required Library : mdlbltin.lib
int GetIndex ( ) const

Gets the ID of this display style.

Display styles do not have a valid ID until they are written to the file.

Note
When writing a display style to a file, make sure you re-read the display style (by-name) to get its persisted ID.
Returns
int
WStringCR GetName ( ) const

Gets the name.

See also
DisplayStyleManager to rename a DisplayStyle
Returns
name of the display style WStringCR
ViewDisplayOverridesCR GetOverrides ( ) const

Gets a read-only reference to the overrides (.

See also
ViewDisplayOverrides).
Returns
the object of ViewDisplayOverridesCR
ViewDisplayOverridesR GetOverridesR ( )

Gets a read/write reference to the overrides (.

See also
ViewDisplayOverrides).
Returns
the object of ViewDisplayOverridesR
bool IsFromFile ( ) const

True if this display style originated from a file.

Returns
true if it is from dgn file otherwise false
bool IsFromHardCodedDefault ( ) const

True if this display style originated from a hard-coded default.

Returns
true if it is a hard coded default.
bool IsInFile ( DgnFileR  dgnFile) const

Determines if this display style is based on the provided file.

Note
This method does not determine if the display style is actually persisted in the given file; see DisplayStyleManager.
Returns
true if it is found otherwise false
bool IsUsableForClipVolumes ( ) const

True if this display style can be used for individual sections.

Returns
true if it is usable for clip volumes
bool IsUsableForViews ( ) const

True if this display style can be used for whole views.

Returns
true if it is usable for views
bool IsValidForViewport ( ViewportCR  viewport) const

True if this display style can be applied to the provided Viewport.

Note
If you need more information about why a display style is not valid for a Viewport, use another overload of this method.
Returns
true if is valid for the viewport
bool IsValidForViewport ( ViewportCR  viewport,
DisplayStyleApplyValidity applyValidity 
) const

True if this display style can be applied to the provided viewport.

Parameters
viewportIN the object on which it will validate
applyValidityIN the object of DisplayStyleApplyValiditiy
Returns
true if is valid for the viewport
bool MatchesViewInfoData ( ViewInfoCR  viewInfo) const

True if this display style effectively matches the provided view data.

Parameters
viewInfoIN the object of ViewInfoCR
void SetDisplayMode ( MSRenderMode  newDisplayMode)

Sets the display mode.

See also
GetDisplayMode for additional notes
Parameters
newDisplayModeIN UInt32 type
void SetEnvironmentName ( WCharCP  environmentName)

Changes the Environment name.

Parameters
environmentNameIN WCharCP
void SetEnvironmentTypeDisplayed ( EnvironmentDisplay  typeDisplayed)

Sets the Environment Type which will be displayed.

Parameters
typeDisplayedIN UInt32 type parameter
void SetFlags ( DisplayStyleFlagsCR  newFlags)

Sets the flags (.

See also
DisplayStyleFlags).
Parameters
newFlagsIN the object of DisplayStyleFlagsCR
void SetIsUsableForClipVolumes ( bool  isValid)

Sets if this display style can be used for individual sections.

Parameters
isValidIN bool
void SetIsUsableForViews ( bool  isValid)

Sets if this display style can be used for whole views.

Parameters
isValidIN bool
void SetOverrides ( ViewDisplayOverridesCR  newOverrides,
DgnFileR  sourceDgnFile 
)

Sets the overrides (.

See also
ViewDisplayOverrides).
Note
You must provide the file that the overrides are based on, since they contain file-specific IDs that will be remapped to be stored in this display style.
Parameters
newOverridesIN the object of ViewDisplayOverridesCR
sourceDgnFileIN the source dgn file

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

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