/***************************************************************************** * * Copyright (c) 1999, KL GROUP INC. All Rights Reserved. * http://www.klgroup.com * * This file is provided for demonstration and educational uses only. * Permission to use, copy, modify and distribute this file for * any purpose and without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies, and that the name of KL Group not be used in advertising * or publicity pertaining to this material without the specific, * prior written permission of an authorized representative of * KL Group. * * KL GROUP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT. KL GROUP SHALL NOT BE LIABLE FOR ANY * DAMAGES SUFFERED BY USERS AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */ // chlabelsView.h : interface of the CChartLabelsView class // ///////////////////////////////////////////////////////////////////////////// //{{AFX_INCLUDES() #include "chart2d.h" //}}AFX_INCLUDES #if !defined(AFX_CHLABELSVIEW_H__9A21627D_AC9F_11D2_9BE5_00105AE62ECE__INCLUDED_) #define AFX_CHLABELSVIEW_H__9A21627D_AC9F_11D2_9BE5_00105AE62ECE__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "chart2d.h" #include "interior.h" #include "StaticEx.h" class CChartLabelsView : public CFormView { protected: // create from serialization only CChartLabelsView(); DECLARE_DYNCREATE(CChartLabelsView) public: //{{AFX_DATA(CChartLabelsView) enum { IDD = IDD_CHLABELS_FORM }; CChart2D m_chart; //}}AFX_DATA // Attributes public: CChlabelsDoc* GetDocument(); // Globals used to keep track of which bar is being dragged long m_SaveSeries; // Value for which bar we are on long m_SavePoint; // Value for where we are along a bar CInterior m_Interior; // Set this up to allow us to make it easier to check the status of the interior of an object long m_SaveColor; // Holding tank for the background color of a region while it is highlighted CStaticEx m_MyLabel1; CStaticEx m_MyLabel2; CStaticEx m_MyLabel3; CStaticEx m_MyLabel4; // Globals for the colors of the different regions long m_HeaderColor; long m_FooterColor; long m_LegendColor; // Globals for the current region long m_Region; // Value for what region the mouse cursor is current in long m_OldRegion; // Holding tank for the region value bool m_ChartModify; // Don't do some events when this is true int m_LabelCount; int m_WhichLabel; // specifies which label (on top) has been clicked -- '0' if none. // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CChartLabelsView) public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual void OnInitialUpdate(); // called first time after construct //}}AFX_VIRTUAL // Implementation public: virtual ~CChartLabelsView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CChartLabelsView) afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnClearLabelsButton(); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnMouseMoveChart2d1(short Button, short Shift, long X, long Y); afx_msg void OnModifyStartChart2d1(BOOL FAR* IsOK); afx_msg void OnModifyEndChart2d1(); afx_msg void OnMouseDownChart2d1(short Button, short Shift, long X, long Y); afx_msg void OnMouseUpChart2d1(short Button, short Shift, long X, long Y); afx_msg void OnLabel1(); afx_msg void OnLabel2(); afx_msg void OnLabel4(); afx_msg void OnLabel3(); afx_msg void OnDestroy(); DECLARE_EVENTSINK_MAP() //}}AFX_MSG DECLARE_MESSAGE_MAP() private: void InitialChartSetup(void); void UpdateFooter (void); void AddHilite (long px, long py); long FindLabel(CString name); void RemoveLabel(CString name); void RemoveHilite(void); }; #ifndef _DEBUG // debug version in chlabelsView.cpp inline CChlabelsDoc* CChartLabelsView::GetDocument() { return (CChlabelsDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_CHLABELSVIEW_H__9A21627D_AC9F_11D2_9BE5_00105AE62ECE__INCLUDED_)