Mobile API Reference  MicroStrategy 2019
Legend.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : Legend.h
3 // AUTHOR : Xin Liu
4 // CREATION : 5/20/08
5 // Copyright (C) MicroStrategy, Inc. 2008
6 //==============================================================================================
7 
8 
9 #ifndef MSICHART_LEGEND_H
10 #define MSICHART_LEGEND_H
11 
12 #include "GraphObjectManager.h"
13 #include "../Dataset.h"
14 #include "GraphCollectionObject.h"
15 #include "StraightLineObject.h"
16 
17 namespace MsiChart
18 {
23  {
28  };
29 
31  {
35  };
36 
37 
42  {
48  };
49 
50  typedef enum
51  {
59 
60 
64  class Legend: public GraphObjectManager
65  {
66  public:
68 
69  Legend(const TripleId& irTripleId, GraphObjectManager* ipManager, Dataset::Ptr iDatasetPtr, Rect2D iArea);
70  ~Legend();
71 
72  virtual void Draw();
73  virtual void GenerateMapAndList();
74  virtual void GetOptions(Int32 iPropertyId, CComVariant* opValue) const;
75  virtual void GetOptions(Int32 iSeriesId, Int32 iPropertyId, CComVariant* opValue) const;
76 
81  virtual bool SetFormatLineOfLegendMarkerLine(FormatLine::Ptr iFormatLine, Int32 iSeriesId, bool iIsLineVertical = false);
82 
87  const Rect2D& GetLegendArea();
88 
93  virtual bool IsByGroup() const; //For grid chart
94 
101  virtual void UpdateFormatForLegendMarker(Int32 iIndex, FormatFill::Ptr iFormatFill, FormatLine::Ptr iFormatLine, bool iIsLineAssignedToLegnedMarkerLine = false, bool iIsLineVertical = false);
102 
109  void CalculateFrame(Int32 iWidthMargin, Int32 iHeightMargin, Rect2D& orArea);
110 
115  virtual Int32 GetItemCount();
116 
118 
119 
120  protected:
125 
128  virtual Int32 hGetLegendPosition();
129  };
130 
132  {
133  return mType;
134  }
135 }
136 
137 #endif
virtual void Draw()
EnumLegendType
Definition: Legend.h:30
Definition: Legend.h:32
virtual bool IsByGroup() const
Definition: Legend.h:26
virtual void GetOptions(Int32 iPropertyId, CComVariant *opValue) const
virtual Int32 hGetLegendPosition()
Definition: Legend.h:45
virtual bool SetFormatLineOfLegendMarkerLine(FormatLine::Ptr iFormatLine, Int32 iSeriesId, bool iIsLineVertical=false)
Definition: Legend.h:25
EnumLegendType mType
Legend Type.
Definition: Legend.h:124
Definition: Dataset.h:198
virtual Int32 GetItemCount()
Definition: Legend.h:55
Definition: Legend.h:46
Definition: Legend.h:64
Definition: Legend.h:47
#define Int32
Definition: BasicTypes.h:20
Definition: Legend.h:54
Dataset::Ptr mDatasetPtr
Pointer to the dataset.
Definition: Legend.h:121
Definition: Legend.h:44
virtual void GenerateMapAndList()
const Rect2D & GetLegendArea()
EnumLegendType GetType()
Definition: Legend.h:131
Definition: Legend.h:56
void CalculateFrame(Int32 iWidthMargin, Int32 iHeightMargin, Rect2D &orArea)
Definition: Legend.h:24
EnumLegendDetails
Definition: Legend.h:50
Definition: ABLPlot.h:21
Definition: Legend.h:43
Legend(const TripleId &irTripleId, GraphObjectManager *ipManager, Dataset::Ptr iDatasetPtr, Rect2D iArea)
Rect2D mLegendArea
Indicates the legend area.
Definition: Legend.h:122
Definition: Legend.h:53
virtual void UpdateFormatForLegendMarker(Int32 iIndex, FormatFill::Ptr iFormatFill, FormatLine::Ptr iFormatLine, bool iIsLineAssignedToLegnedMarkerLine=false, bool iIsLineVertical=false)
Definition: Msi_ccomvariant.h:24
EnumLegendLayout
Definition: Legend.h:22
Rect2D mArea
Indicates the area excluding title, subtitle, footnote.
Definition: Legend.h:123
Definition: Legend.h:52
Definition: Legend.h:33
EnumLegendMarkersStyle
Definition: Legend.h:41
MSynch::SmartPtr< Legend > Ptr
Definition: Legend.h:67
Definition: GraphObjectManager.h:37
Definition: Legend.h:34
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397
Definition: Legend.h:27