Mobile API Reference  MicroStrategy 2019
RectangleObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : RectangleObject.h
3 // AUTHOR : Fangyao Ma
4 // CREATION : 2008-05-21
5 // Copyright (C) MicroStrategy Incorporated 2008
6 // All Rights Reserved
7 //==============================================================================================
8 
9 #ifndef MsiChart_RectangleObject_h
10 #define MsiChart_RectangleObject_h 1
11 
12 #include "ShapeObject.h"
13 
14 #ifdef _VE_CE
15 #else
16 #include "RectangleObjectHelper.h"
17 #endif
18 
19 #include "../Common.h"
20 
21 namespace MsiChart
22 {
23  typedef enum
24  {
31 
32  typedef enum
33  {
41 
46  {
47  public:
49 
58  RectangleObject(const TripleId& irTripleId,
59  GraphObjectManager* ipManager,
60  const Rect2D& irRect,
61  GraphCollectionObject* ipParentObject = NULL,
62  bool iIsOnlyForToolTip = false, bool iIsVirtualMarker = false, bool iIsVertical = true, double iDataPointXPos = 0.5, double iDataPointYPos = 0.5);
63 
64  virtual ~RectangleObject();
65 
70  // void SetRect(const Rect2D& irRect);
71 
76  // void GetRect(Rect2D& orRect);
77 
78  //virtual functions from GraphObject
79  virtual void Draw() const;
80  virtual void GenerateView();
81  virtual void DrawInnerOutLine(); //as per spec, we need to draw 1 px inner stroke when hovered.
82  virtual void DrawOutLine();
83  virtual bool PointInObject(const Point2D& irPoint);
84  virtual bool ObjectInRectangle(const Rect2D& irRect);
85  virtual void GenerateImageMap(ImageMap& iorImageMap);
86  virtual bool IsVirtual() const;
87 
89  virtual void GetBoundingRect(Rect2D& orBoundingRect) const;
90 #ifndef _VE_CE
91  void DrawWithContext(CGContextRef ipCGContext, const CGRect& irRect);
92 #endif
93 
98  virtual void SetDataPointPosition(double iX, double iY);
99 
100  virtual Point2D GetDataPoint();
101 
102  //virtual void SetProgress(double iProgress);
103  virtual float GetMemoryUsageEstimation() const;
104 
105  //this is used only in bar chart, to decide if the bottom/left side is open for bar riser in vertical/horizontal chart.
106  virtual void SetOpen(Int32 iOpenType);
107 
109 
111  void SetSeriesInfoIndex(Int32 iSeriesInfo);
112 
113  bool IsOnlyForToolTip();
114  bool IsAnimationEnabled();
115  Rect2D GetRect();
118  float GetPreviousScale();
119 
120  //change protect to public
121  virtual void DoDraw() const;
122  virtual void SetRect(const Rect2D& irRect);
123 
124  protected:
126  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
127 
128  //virtual void SetRect(const Rect2D& irRect);
129 #ifndef _VE_CE
130  CGRect hPickStartAnimationFrame(void* ipBarView); //const;
131 #endif
132 
133  virtual void hGetBorder(Polygon2D& orBorder) const;
134 
137  Int32 mSeriesInfo; //SeriesInfoIndex of line virtual marker!
138 
141 
144 
147 
149 
150  mutable float mPreviousScale;
151 #ifdef _VE_CE
152 #else
153  private:
154  RectangleObjectHelper * mpRectangleObjectHelper;
155 #endif
156 
157 
158  };
159 
160  inline bool RectangleObject::IsVirtual() const
161  {
162  return mIsVirtualMarker;
163  }
164 
166  {
167  return mSeriesInfo;
168  }
169 
171  {
172  mSeriesInfo = iSieresInfo;
173  }
174  //=================================================
175  //method added for code seperation
177  {
178  return mIsOnlyForToolTip;
179  }
181  {
182  return mIsAnimationEnabled;
183  }
185  {
186  return mRect;
187  }
189  {
190  return mFormatLinePtr;
191  }
193  {
194  return mStartPostion;
195  }
197  {
198  return mPreviousScale;
199  }
200 }
201 
202 
203 #endif
Definition: RectangleObject.h:45
bool mIsOnlyForToolTip
Indicate whether current RectangleObject is only used for tool tip.
Definition: RectangleObject.h:139
bool IsOnlyForToolTip()
Definition: RectangleObject.h:176
bool mIsAnimationEnabled
Definition: GraphObject.h:283
Definition: RectangleObject.h:27
virtual void SetRect(const Rect2D &irRect)
MSynch::SmartPtr< RectangleObject > Ptr
Definition: RectangleObject.h:48
Int32 mSeriesInfo
Definition: RectangleObject.h:137
Definition: RectangleObject.h:35
EnumAnimationStartPositon
Definition: RectangleObject.h:23
virtual bool PointInObject(const Point2D &irPoint)
virtual void SetDataPointPosition(double iX, double iY)
FormatLine::Ptr mFormatLinePtr
Definition: GraphObject.h:273
virtual void DoDraw() const
virtual void GenerateView()
Definition: GraphCollectionObject.h:19
Rect2D GetRect()
Definition: RectangleObject.h:184
Definition: RectangleObject.h:38
virtual void GenerateImageMap(ImageMap &iorImageMap)
float GetPreviousScale()
Definition: RectangleObject.h:196
Int32 mBorderOpenType
Indicate the border open type RectangleObject.
Definition: RectangleObject.h:140
virtual bool IsVirtual() const
Definition: RectangleObject.h:160
Definition: RectangleObject.h:29
bool mIsVirtualMarker
Definition: RectangleObject.h:142
Rect2D mFinalRect
Definition: RectangleObject.h:136
Definition: ShapeObject.h:20
virtual void hGetBorder(Polygon2D &orBorder) const
RectangleObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const Rect2D &irRect, GraphCollectionObject *ipParentObject=NULL, bool iIsOnlyForToolTip=false, bool iIsVirtualMarker=false, bool iIsVertical=true, double iDataPointXPos=0.5, double iDataPointYPos=0.5)
EnumAnimationStartPositon GetStartPosition()
Definition: RectangleObject.h:192
Definition: RectangleObject.h:37
Definition: RectangleObject.h:25
std::vector< Point2D > Polygon2D
Definition: GraphObject.h:25
Definition: RectangleObject.h:34
Definition: RectangleObject.h:36
Int32 GetSeriesInfoIndex()
Definition: RectangleObject.h:165
#define Int32
Definition: BasicTypes.h:20
void DrawWithContext(CGContextRef ipCGContext, const CGRect &irRect)
Definition: RectangleObjectHelper.h:6
EnumAnimationStartPositon mStartPostion
Definition: RectangleObject.h:148
void SetAnimationStartPositon(EnumAnimationStartPositon iStart)
EnumBarBorderOpenType
Definition: RectangleObject.h:32
virtual void DrawInnerOutLine()
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
Get the clockwise polygon that surrounding the object.
virtual bool ObjectInRectangle(const Rect2D &irRect)
Definition: SmartPtr.h:38
virtual void SetOpen(Int32 iOpenType)
Rect2D mRect
Rectangle area occupied.
Definition: RectangleObject.h:135
double mDataPointYPos
Definition: RectangleObject.h:146
Definition: RectangleObject.h:28
virtual void Draw() const
Definition: ABLPlot.h:21
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
Definition: RectangleObject.h:39
virtual void GetBoundingRect(Rect2D &orBoundingRect) const
Get the bounding rectangle area of the rect.
bool IsAnimationEnabled()
Definition: RectangleObject.h:180
void SetSeriesInfoIndex(Int32 iSeriesInfo)
Definition: RectangleObject.h:170
virtual Point2D GetDataPoint()
bool mIsVertical
Definition: RectangleObject.h:143
double mDataPointXPos
Definition: RectangleObject.h:145
float mPreviousScale
Definition: RectangleObject.h:150
virtual float GetMemoryUsageEstimation() const
CGRect hPickStartAnimationFrame(void *ipBarView)
#define NULL
Definition: Null.h:10
virtual void DrawOutLine()
Definition: GraphObjectManager.h:37
Definition: RectangleObject.h:26
FormatLine::Ptr GetFormatLinePtr()
Definition: RectangleObject.h:188
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397