9 #ifndef MSICHART_CHARTIMPL_H 10 #define MSICHART_CHARTIMPL_H 73 bool iSmartSelection,
TripleId*& orpSelectionList,
Int32 &oNum);
86 char*& oprMemory,
unsigned Int32& orSize);
88 Int32 iFormat,
const char* ipFilename);
90 bool SaveImageToString(
Int32 iWidth,
Int32 iHeight, std::string& orGraphDesc,
91 bool ibRowsHaveControls,
bool ibColumnsHaveControls,
bool ibHasMetricSelector,
92 std::vector<std::pair<Int32, Int32> >& iSelectedSeriesAndColumns,
93 bool ibSkipRendering =
true);
95 bool SaveImageToVEObjects(
Int32 iWidth,
Int32 iHeight,
96 std::vector<MVE::VEFormatList>& ioFormatList, std::vector<MVE::VEUnitList>& ioUnitList,
97 bool ibRowsHaveControls,
bool ibColumnsHaveControls,
bool ibHasMetricSelector,
98 std::vector<std::pair<Int32, Int32> >& iSelectedSeriesAndColumns,
99 bool ibSkipRendering =
true);
182 Int32 CreateTooltipByObject(
const std::vector<TripleId>& irSelectionList, std::vector<Tooltip*>& orTooltips,
bool iPersistent =
false);
228 void GetUniformAxisMargins(
short& orLeftMargin,
short& orRightMargin,
short& orTopMargin,
short& orBottomMargin,
bool iIsForSecondaryAxis =
false);
229 void SetUniformAxisMargins(
short iLeftMargin,
short iRightMargin,
short iTopMargin,
short iBottomMargin,
bool iIsForSecondaryAxis =
false);
263 void GetAllGraphObjectInfo(std::vector<CGRect> &iAllGraphObjectsBorder, std::vector<MsiChart::TripleId > &iAllGraphObjectsTripleId);
280 bool GetGroupSpace(std::vector<Int32>& orVect,
Int32 iGroupIndex,
bool iIsLegned =
false);
294 bool isSeriesHaveControls() {
return mSeriesHaveControls; }
295 bool isGroupsHaveControls() {
return mGroupsHaveControls; }
296 bool isHasMetricSelector() {
return mHasMetricSelector; }
309 bool hCreateDrawEnv(
Int32 iFormat);
316 bool hCreateWin32DrawEnv(
HDC iHdc);
334 void hLoadProperties();
344 void hGetDataGroupAndFlag(
Int32& orDataGroup,
bool& orFlag)
const;
360 void hUpdateDataset();
366 void hStringToFormat(
const wchar_t* lpFormatString,
ChartAdvFormat& orFormat);
370 void hClearTooltips();
375 bool hIsXAxisValueAxis();
380 bool hIsYAxisCategoryAxis();
424 bool hIsTooltipEnabled()
const;
426 bool hIsTooltipEnabled(
const TripleId& irId)
const;
432 bool hCanShowTooltipByObject(
GraphObject::Ptr iGraphObjectPtr,
bool iPersistent =
false)
const;
442 void hReplaceNewLineWithSpace(
char* ipString)
const;
446 int hMinGroupCountByGraphType(
Int32 iGraphType);
450 bool hIsSelected(
short iSID,
short iGID, std::vector<std::pair<Int32, Int32> >& iSelectedSeriesAndColumns);
454 std::string hGetResolvedGlobalMacro(
const std::string& irGlobalMacro,
bool& orIsResolved);
461 void hFilterDuplicationFromList(std::vector<GraphObject::Ptr>& orCandidateObjects,
const std::vector<GraphObject::Ptr>& irObjectList,
GraphObject::Ptr iObjectPtr,
const Point2D& irCursor);
466 void hPrepareTargetObjectIds(std::vector<Int32>& orObjectIds,
Int32 iType);
472 bool hIsInObjectIdList(
Int32 iObjectId,
const std::vector<Int32>& irObjectIdList);
476 void hUpdateHighlightObjectList();
480 Int32 hGetMarginCount();
502 bool hIsHistogramChart();
508 bool hFormatTooltipDataString(
Int32 iSeriesID,
Int32 iGroupID,
MBase::String& orDataString,
Int32 iOffset,
double iValue,
double iPercentValue,
bool isForPercentValue =
false,
Int32 iAngleId = -3,
Int32 iSliceId = -3);
510 Axis* hGetAxis(
bool iIsXAxis,
bool iIsUniformAxis,
bool iIsPrimary =
true);
513 std::vector<TripleId> mSelectionList;
521 std::vector<Tooltip*> mTooltips;
533 bool mIsShowHighLightedObj;
536 bool mSeriesHaveControls;
537 bool mGroupsHaveControls;
538 bool mHasMetricSelector;
542 std::vector<GraphObject::Ptr> mSelectedObjectsForLassoSelection;
void ResetAnimationState()
void SetFontScale(double iRatio=1.0)
Int32 GetMaxElementRadius(Int32 iWidth, Int32 iHeight, bool iIsPerfectPadding=false)
void SetGraphType(short iGraphType)
Definition: DSSRWTemplateNode.h:19
float GetMemoryUsageEstimation()
Get memory usage estimation before drawing.
void GetAllGraphObjectInfo(std::vector< CGRect > &iAllGraphObjectsBorder, std::vector< MsiChart::TripleId > &iAllGraphObjectsTripleId)
bool IsInitialized() const
bool GetToolTipDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String &orDataString, Int32 iOffset=0)
void SetStaggerLabelStartLevel(Int32 irLabelStartLevel)
void ExitGrayoutMode()
Exit gray out mode.
bool IsVerticalChart() const
void SetIsCategoryXAxisForPartialRendering(bool isForPartialRendering)
void DrawDataAreaForUniformAxis(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight)
Int32 GetDataAreaSplitX() const
void SetTextAsShape(bool iFlag)
bool GenerateImageMap(Int32 iWidth, Int32 iHeight, ImageMap &oImageMap)
void DrawUniformYAxis(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis=false)
void SetTemplateNode(DSSRWTemplateNode *ipTemplateNode)
Int32 GetDataAreaSplitY() const
bool IsInSelectionList(const TripleId &iObject)
bool IsIsolatedDotInLine(const TripleId &irId)
bool IsDuplicateMode() const
bool SaveImageToMemory(Int32 iWidth, Int32 iHeight, Int32 iFormat, char *&oprMemory, unsigned Int32 &orSize)
bool GetNearestObject(Int32 iX, Int32 iY, const std::vector< Int32 > &irObjectIds, Int32 iRadius, TripleId &orNearestTripleId, int *opNearestDistance=NULL)
bool OnHover(Int32 iX, Int32 iY)
bool GetOptions(Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId, Int32 iPropertyId, CComVariant *opValue)
bool GetNearestObjectForGMCombo(Int32 iX, Int32 iY, const std::vector< Int32 > &irObjectIds, Int32 iRadius, TripleId &orNearestTripleId, int *opNearestDistance=NULL)
void EnableVIDocument(bool iIsVIDocument)
Definition: ChartImpl.h:31
void hHandleHighLightObjects(const std::vector< TripleId > &irTripleIds)
bool ClearOneHighlightObject(MsiChart::TripleId iTripleId)
void SetChartOffset(Int32 iXOffset, Int32 iYOffset)
void OnSwipingInZoom(Int32 iX, Int32 iY)
void SetFormatManager(FormatManager::Ptr iFormatManagerPtr)
Set a new FormatManager to current chart.
Int32 GetUniformYAxisWidth(Int32 iYAxisLength, Int32 iMetricIndex=-1, bool iIsForSecondaryAxis=false)
Int32 GetDataGroup(bool &orIgnoreForNoSeriesOrGroup) const
Int32 GetAxisLabelRotaion(bool iIsXAxis)
void SetGMZoomScale(float iHeightScale, float iWidthScase)
Int32 LayoutAxis(bool iIsXAxis, bool iIsRotated, Int32 &orMaxLabelSpace)
Int32 GetCategoryAxisLabelInterval()
void hAddRedrawObjectsInHighLightView(const LayerObject::Ptr &iHighLightLayerObjectPtr, const TripleId &iTripleId)
void HighlightOrHideObjects(const std::vector< TripleId > &irTripleIds, bool iIsHide)
void GetStaggerLabelEndLevel(Int32 &orLabelEndLevel)
void DisableAnimationForZoom(bool iDisableAnimation)
double GetGroupIntervalInPixel()
void SetGridGraphViewer(void *ipGridGraphViewer)
void GetSOByLassoSelection(std::vector< std::pair< int, int > > &iObjects)
Get Selected Objects by Lasso Selections.
bool GetPrimaryDataStringForPie(Int32 iSeries, Int32 iGroupID, MBase::String &orDataString, bool iIsForColor, Int32 iColumnOffset=0, bool isPercentValue=false, Int32 iAngleIndex=-3, Int32 iSliceIndex=-3)
Int32 GetSeriesColorFromPalette(Int32 iIndex)
bool IsIsolatedDot(const TripleId &irId)
Definition: Dataset.h:198
void SetGMCEContext(void *iGMCEContext)
int ApplySelectedObjects(Int32 iX, Int32 iY, std::vector< Point2D > &iPoints, Point2D &ioPoint)
bool IsZeroBaseLineQualified(bool iIsXAxis, bool isSecondaryAxis)
bool AdjustingAxisPaddingForDataLabel(Rect2D &iorRect, Int32 iMetricIndex, bool iIsForXAxis, Int32 iAxisLength)
void SetCGContext(CGContext *ipCGContext)
virtual void DisposeSelectionList(TripleId *ipSelectionList)
bool GetToolTipData(Int32 iSeriesID, Int32 iGroupID, double &orValue, double &orPercentValue, Int32 iOffset=0)
bool GetPrimaryDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String &orDataString, bool iIsForColor, Int32 iSizebyIndex=0)
bool ShouldRotateDataLabel(Int32 iWidth, Int32 iHeight, bool iIsForPefectPadding=false)
void SetAnimationDuration(double iSeconds)
Int32 GetChartAreaId(const TripleId &iObject)
bool GetAllObjectsWithInDistance(Int32 iX, Int32 iY, const std::vector< Int32 > &irObjectIds, Int32 iRadius, std::vector< SelectedInfo > &orNearObjects, std::vector< Int32 > &orDistance)
Int32 GetGraphWidth() const
void EnableAnimation(bool iUseAnimation)
Int32 GetGraphHeight() const
void EnableMicroChart(bool iIsMicroChart)
void SetUniformAxisMargins(short iLeftMargin, short iRightMargin, short iTopMargin, short iBottomMargin, bool iIsForSecondaryAxis=false)
void SetTemplateNodeKey(const std::string &irKey)
#define Int32
Definition: BasicTypes.h:20
std::pair< int, std::pair< double, double > > GraphMatrixMinMaxInfo
Definition: Chart.h:48
bool SaveImageToFile(Int32 iWidth, Int32 iHeight, Int32 iFormat, const char *ipFilename)
void ResetGroupRangeAndAxesState(Int32 iBeginGroup, Int32 iEndGroup)
bool AddToSelectionList(const TripleId &iObject)
void SetEntireness(bool iIsEntireChart)
void ClearSelectionList()
bool GetGroupSpace(std::vector< Int32 > &orVect, Int32 iGroupIndex, bool iIsLegned=false)
Int32 CreateTooltipByObject(TripleId *ipSelectionList, Int32 iNum, std::vector< Tooltip *> &orTooltips, bool iPersistent=false)
bool GetPositionById(Int32 iSeriesId, Int32 iGroupId, Int32 &orX, Int32 &orY)
Int32 GetIntervalSpace(bool iIsXAxis)
void GetUniformAxisMargins(short &orLeftMargin, short &orRightMargin, short &orTopMargin, short &orBottomMargin, bool iIsForSecondaryAxis=false)
bool hAdjustingYAxisPadding(Rect2D &iorRect, std::vector< Int32 > iMetricIndexList, Int32 iYAxisLength)
bool hAdjustingXAxisPadding(Rect2D &iorRect, std::vector< Int32 > iMetricIndexList, Int32 iXAxisLength)
void SetTimeSeriesIntegrity(Int32 iIntegrity)
bool IsDrillableLabelAtCoords(int iX, int iY, std::string &orLinkURL)
void GetGroupLabel(Int32 iGroupId, MBase::String &orGroupLabel, const wchar_t iSeparator, bool iIsAbbreviated)
void DeviceToVirtualPoint(Int32 &iorX, Int32 &iorY) const
void hCalculateInnerStrokeForConsectivePieSlice(TripleId iTripleId, Int32 lBeginIndex, Int32 lEndIndex)
void HideAxisElements(bool iHide)
void GetSeriesLabel(Int32 iSeriesID, MBase::String &orSeriesLabel, bool iSubstitute, Int32 iColumnOffset, bool iIsForSlice)
General image usage.
Definition: Common.h:325
void EnableTimeSeriesChart(bool iIsTimeSeriesChart)
Definition: ChartContext.h:542
void OnZooming(Int32 iOldStart, Int32 iOldEnd, Int32 iNewStart, Int32 iNewEnd, bool iIsVertical)
void SetChartComponent(Int32 iChartComponent)
int GetDataPointForUIMenu(Int32 iX, Int32 iY, Tooltip &ioTooltip, bool iLSMode=false)
std::basic_string< WCHAR, std::char_traits< WCHAR >, Allocator< WCHAR > > String
Definition: BaseString.h:26
void SetXAxisLogicalRange(double iXLogicalStart, double iXLogicalEnd)
void HighlightOrHideOneObject(const TripleId irTripleId, bool iIsHide)
unsigned Int32 GetToolTipByCoords(Int32 iX, Int32 iY, std::vector< Tooltip *> &orTooltips, bool iPersistent=false)
int GetNumOfSelectedObjects()
double GetPositionAtTick(double iTickValue, bool iIsForXAxis, Int32 iGraphDimentionLength)
void EnableUniformAxis(GraphMatrixMinMaxInfo yMinMaxInfo, GraphMatrixMinMaxInfo xMinMaxInfo, GraphMatrixMinMaxInfo zMinMaxInfo, Int32 iGraphHeight, GraphMatrixMinMaxInfo y2MinMaxInfo=std::make_pair(-1, std::make_pair(0.0, 0.0)), GraphMatrixMinMaxInfo x2MinMaxInfo=std::make_pair(-1, std::make_pair(0.0, 0.0)))
Definition: CategoryAxis.h:82
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
ChartContext * GetChartContext(void)
Definition: ChartImpl.h:298
bool GetHoveredLineObject(TripleId &orHoveredLineObject, Int32 iIndex=0)
void GetShownNumericTicks(std::set< double > &orTicksSet, bool iIsForXAxis)
void HighlightSelectedInInit(std::vector< std::pair< Int32, Int32 > > &iSelectedSeriesAndColumns)
Highlight selected object when the graph document is opened.
bool SaveImageToCGContext(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight, bool iShowValueAxis=true, Int32 iImageUsage=IU_GENERAL)
void EnterGrayoutMode()
Enter gray out mode.
Tooltip * CreateToolTipBySeriesAndGroup(Int32 iSeriesID, Int32 iGroupID, bool iPersistent=false)
bool GetInterlacedBandingPosition(bool iIsXAxis, std::vector< double > &orPostions, bool iIsFromUniformAxis=true)
void DrawUniformXAxis(CGContext *ipCGContext, Int32 iWidth, Int32 iHeight, bool iIsForSecondaryAxis=false)
bool RefreshChart(const RefreshPack &irRefreshPack)
void OnZoomingByGroupRange(double iStartGroup, double iEndGroup)
bool OnPointDetection(Int32 iX, Int32 iY, bool iSmartSelection, TripleId &orSelectedObject)
virtual void AllocSelectionList(TripleId *&orpSelectionList, Int32 &oNum)
void GetHighlightObjects(std::vector< std::pair< Int32, Int32 > > &orHighlightObjects) const
void __RPC_FAR * HDC
Definition: PDCwtypes.h:459
TextObject::Ptr hCreateExtremeDataLabel(std::vector< Int32 > iMetricIndexList, bool iIsForXAxis)
bool SetOptions(Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId, Int32 iPropertyId, CComVariant *ipValue)
Definition: Msi_ccomvariant.h:24
bool GetPieSliceTooltipDataString(Int32 iSeriesID, Int32 iGroupID, Int32 iAngleID, Int32 iSliceID, Int32 iColumnOffset, MBase::String &orDataString)
void SetCategoryAxisLabelInterval(Int32 irLabelInterval)
Definition: ChartCanvas.h:39
void VirtualToDevicePoint(Int32 &iorX, Int32 &iorY) const
bool GetRowAndColumnIndexByCoords(int iX, int iY, int &orRowIndex, int &orColumnIndex, bool iIsDataCellOnly, int iDistance=-1)
bool GetHoveredObject(TripleId &orHoveredObject, Int32 iIndex=0)
void RefreshGraphMatrixContext()
void EnterDuplicateMode()
void SetShowNumbericTicks(std::set< double > &irTicksSet, bool iIsForXAxis)
bool ShouldAdjustValueAxis(Int32 iWidth, Int32 iHeight, double &irAdjustedValue, bool iIsForPefectPadding=false)
void SetData(Dataset::Ptr iDatasetPtr)
ChartImpl(Dataset::Ptr iDatasetPtr)
Int32 GetUniformXAxisHeight(Int32 iXAxisLength, Int32 iMetricIndex=-1, bool iIsForSecondaryAxis=false)
#define NULL
Definition: Null.h:10
Int32 GetCachedMaxElementSize()
void EnableVoiceOver(bool iIsVoiceOverMode)
bool IsGrayoutMode() const
is gray out mode
bool IsDataEnough()
Check whether the data is enough for selected graph type.
bool OnRectangleSelection(Int32 iLeft, Int32 iTop, Int32 iWidth, Int32 iHeight, bool iSmartSelection, TripleId *&orpSelectionList, Int32 &oNum)
bool PlainDraw(Int32 iWidth, Int32 iHeight)
void RefreshOnDataChange()
void GetGraphType(short &orGraphType)
void SetCurrentGraphFrame(Int32 iX, Int32 iY, Int32 iWidth, Int32 iHeight)
void HighlightSelectedObject(bool iHighlight, bool iIsForLassoSelction=false)
Highlight selected object.
bool CanShowTooltipById(TripleId &irId) const
void GetAxisNumberFormat(CComVariant *opValue) const
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
bool GetSpaceAt(std::vector< Int32 > &orVect, const TripleId &irObjectId)
bool RemoveFromSelectionList(const TripleId &iObject)
void SetAdvancedChartTypeSupport(bool iAdvancedChartTypeSupport)
bool GetDataAreaPadding(std::vector< double > &orPaddings)
void OnSwipingOutOfZoom(Int32 iOffset)
void hDeleteRedrawObjectsInHighLightView(const LayerObject::Ptr &iHighLightLayerObjectPtr, const TripleId &iTripleId)
void EnableGraphMatrix(bool iIsGraphMatrix)
void SetDataAreaSplitX(Int32 iXCoord)