Mobile API Reference  MicroStrategy 2019
GridPlotManager.h
Go to the documentation of this file.
1 /*
2  * GridPlotManager.h
3  * SimpleChart
4  *
5  * Created by Liu Xin on 1/15/10.
6  * Copyright 2010 MSTR. All rights reserved.
7  *
8  */
9 
10 //====================================================================
11 // Filename: Kernel/SourceCode/IPhoneChartGrid/SimpleChart/CategoryPlotManager.h
12 // AUTHOR : Xin Liu
13 // CREATION : 12/18/08
14 // Copyright (C) MicroStrategy, Inc. 2010
15 //==============================================================================================
16 
17 
19 // //
20 // //
21 // //
22 // Warning : this class is obsolete. //
23 // //
24 // //
25 // //
27 
28 
29 
30 #ifndef MSICHART_GridPlotManager_H
31 #define MSICHART_GridPlotManager_H
32 
33 #include "PlotManager.h"
34 #include "ValueAxis.h"
35 #include "CategoryAxis.h"
36 
37 namespace MsiChart
38 {
39 
40  typedef enum EnumRowColumnScenario
41  {
46 
47  typedef struct ColumnTreeGenerationInfo
48  {
51  std::string mCurrentString;
53 
54  typedef struct ColumnTextsForEachLevel
55  {
56  std::vector<TextObject::Ptr> mTexts;
57  std::vector<Int32> mLeafCounts;
59 
60 
61  /*typedef struct
62  {
63  Int32 mItemCount; // store how many labels with the same text will be generated
64  Int32 mStartX; // store the start position of the next label
65  TextObject::Ptr mPreTextPtr; //store the text information
66  };*/
67 
68 
73  {
74  public:
76 
77  GridPlotManager(const TripleId& irTripleId, GraphObjectManager* ipManager, const Rect2D& irPlotArea);
78  virtual ~GridPlotManager();
79 
80  //Re-implemention the virtual functions inherited from GraphObjectManager
81  virtual GraphObject::Ptr OnPointDetection(const Point2D& irCursor) const;
82  virtual void Draw();
83  virtual void GenerateImageMap(ImageMap& iorImageMap);
84  virtual void GenerateMapAndList();
85 
86  virtual Int32 GetDataAreaSplitX() const;
87 
88  Int32 GetDataAreaSplitY() const;
89 
90  virtual void OnZooming(Int32 iOldStart, Int32 iOldEnd, Int32 iNewStart, Int32 iNewEnd, bool iIsVertical);
91 
92  virtual bool GetToolTipData(Int32 iSeriesID, Int32 iGroupID, double& orValue, double& orPercentValue, Int32 iOffset = 0);
93 
94  protected:
98  virtual void LoadProperties();
99 
100  private:
101  //private methods
102  void hGenerateHeadersAndGrids();
103  void hGenerateRowHeadersAndExtraColumn();
104  void hGenerateColumnHeadersAndGrids();
105  void hGenerateOneRisers(Int32 iRowIndex, Int32 iColIndex, double iMin, double iMax, Int32 iOriginalX, double iValue, const Rect2D& irGridRect);
106 
107  Int32 hGetColumnEstimateMaximumWidth(std::vector<TextObject::Ptr>& irTexts) const;
108  Int32 hGenerateExtraColumn(Int32& iorStartX);
109 
110 
111  protected:
112  //data members
117 
120 
121  Int32 mRowHeight; //currently we support only one height for all rows, decided by the font size
122  std::vector<Int32> mColumnWidth;
123  std::vector<Int32> mHeaderHeight; // we still need a vector to get all the head height to arrange the layout
124 
125 
128 
137 
139 
142 
145 
147 
149  };
150 }
151 
152 #endif
153 
bool mMergeColumnCells
Definition: GridPlotManager.h:130
EnumDSSGraphType mGraphType
Definition: GridPlotManager.h:113
struct MsiChart::ColumnTreeGenerationInfo ColumnTreeGenerationInfo
bool mShowRisers
Definition: GridPlotManager.h:148
virtual GraphObject::Ptr OnPointDetection(const Point2D &irCursor) const
GridPlotManager(const TripleId &irTripleId, GraphObjectManager *ipManager, const Rect2D &irPlotArea)
Int32 mDataAreaSplitY
Definition: GridPlotManager.h:115
Int32 mColTreeDepth
Definition: GridPlotManager.h:144
bool mIsShowExtraColumn
Definition: GridPlotManager.h:138
Int32 mColHeaderStartX
Definition: GridPlotManager.h:127
bool mTemplateShowColHeaders
Definition: GridPlotManager.h:133
bool mTemplateShowRowHeaders
Definition: GridPlotManager.h:132
virtual void GenerateImageMap(ImageMap &iorImageMap)
Int32 mRowHeaderStartY
Definition: GridPlotManager.h:126
bool mLockColumnHeaders
Definition: GridPlotManager.h:135
virtual void OnZooming(Int32 iOldStart, Int32 iOldEnd, Int32 iNewStart, Int32 iNewEnd, bool iIsVertical)
Int32 mDataAreaSplitX
Definition: GridPlotManager.h:114
Definition: GridPlotManager.h:54
Int32 GetDataAreaSplitY() const
Int32 mCurrentLeafCount
Definition: GridPlotManager.h:49
virtual void LoadProperties()
Definition: GridPlotManager.h:47
Int32 mRowCount
Definition: GridPlotManager.h:140
Int32 mRowTreeActualDepth
Definition: GridPlotManager.h:146
Int32 mRowTreeDepth
Definition: GridPlotManager.h:143
std::string mCurrentString
Definition: GridPlotManager.h:51
std::vector< Int32 > mColumnWidth
Definition: GridPlotManager.h:122
Definition: GridPlotManager.h:44
MSynch::SmartPtr< GridPlotManager > Ptr
Definition: GridPlotManager.h:75
#define Int32
Definition: BasicTypes.h:20
Rect2D mDataArea
Definition: GridPlotManager.h:116
virtual Int32 GetDataAreaSplitX() const
std::vector< TextObject::Ptr > mTexts
Definition: GridPlotManager.h:56
Int32 mCurrentStartX
Definition: GridPlotManager.h:50
Definition: GridPlotManager.h:72
Int32 mColumnCount
Definition: GridPlotManager.h:141
virtual void GenerateMapAndList()
std::vector< Int32 > mHeaderHeight
Definition: GridPlotManager.h:123
bool mLongNames
Definition: GridPlotManager.h:131
Definition: GridPlotManager.h:43
Definition: SmartPtr.h:38
EnumDSSGraphType
Definition: DSSIPhoneEnums.h:2431
Definition: ABLPlot.h:21
struct MsiChart::ColumnTextsForEachLevel ColumnTextsForEachLevel
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
EnumRowColumnScenario mRowScenario
Definition: GridPlotManager.h:118
bool mMergeCells
Definition: GridPlotManager.h:129
virtual bool GetToolTipData(Int32 iSeriesID, Int32 iGroupID, double &orValue, double &orPercentValue, Int32 iOffset=0)
EnumRowColumnScenario
Definition: GridPlotManager.h:40
Int32 mRowHeight
Definition: GridPlotManager.h:121
Definition: GraphObjectManager.h:37
std::vector< Int32 > mLeafCounts
Definition: GridPlotManager.h:57
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
EnumRowColumnScenario mColScenario
Definition: GridPlotManager.h:119
Definition: PlotManager.h:43
bool mTitleOverlapViewMode
Definition: GridPlotManager.h:136
bool mLockRowHeaders
Definition: GridPlotManager.h:134
Definition: GridPlotManager.h:42
Definition: Common.h:397