ISprite.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 <Bentley/RefCounted.h>
11 
13 
14 /*=================================================================================**/
46 /*=================================================================================**/
54 {
55 private:
56  virtual void MakeClassAbstract() = 0;
57 public:
58 public:
59 
63 DGNPLATFORM_EXPORT void GetHotSpot (Point2dP hotspot);
64 
67 DGNPLATFORM_EXPORT void GetSize (Point2dP size);
68 
72 DGNPLATFORM_EXPORT bool GetUseAlpha () const;
73 
74 }; // ISprite
75 
76 /*=================================================================================**/
86 {
87 private:
88  ViewportP m_viewport;
89  DPoint3d m_location;
90  int m_transparency;
91  ISpriteP m_sprite;
92 
93 public:
94 
96 
105 DGNPLATFORM_EXPORT void Activate (ISpriteP sprite, ViewportP viewport, DPoint3dCR location, int transparency);
106 
109 DGNPLATFORM_EXPORT void Deactivate();
110 
114 DGNPLATFORM_EXPORT void DecorateViewport (ViewportP);
115 
118 bool IsActive() const {return NULL != m_viewport;}
119 
121 DPoint3dR GetLocation() {return m_location;}
122 
124 ISpriteP GetSprite() {return m_sprite;}
125 };
126 
129 
130 
A Sprite Location.
Definition: ISprite.h:85
A Sprite, corresponding to a native Window manager icon.
Definition: ISprite.h:53
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
DPoint3dR GetLocation()
Get the sprite's location, if this SpriteLocation is active.
Definition: ISprite.h:121
#define NULL
Definition: Bentley.h:157
ISpriteP GetSprite()
Get the ISprite value, if this SpriteLocation is active.
Definition: ISprite.h:124
3d point coordinates.
Definition: dpoint3d.h:19
#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
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
Interface to be adopted by a class the implements the reference-counting pattern. ...
Definition: RefCounted.h:34
bool IsActive() const
Determine whether this Sprite Location is currently active.
Definition: ISprite.h:118
size_type size() const
Definition: stdcxx/bstdmap.h:214
Definition: DgnViewport.h:186

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