#pragma once #include "akSTL/akRect.h" class AFX_EXT_CLASS CMaker { public: CMaker() { m_nShape = 0; }; ~CMaker(){}; public: int m_nShape; }; class AFX_EXT_CLASS CMouseMoveInfo { public: CMouseMoveInfo() { m_bEnable = true; m_font.CreatePointFont(90, _T("Tahoma")); m_fontColor = RGB(255,255,255); m_fontAlign = TA_RIGHT|TA_BASELINE; m_nTypeNum = 2; m_nType = 1; m_nPositionType = 1; m_nPositionX = -10; m_nPositionY = -10; }; ~CMouseMoveInfo(){}; public: bool m_bEnable; int m_nType; //0¸¶¿ì½º À§Ä¡°ª Ç¥½Ã, 1¸¶¿ì½º À§Ä¡¿¡ µû¸¥ µ¥ÀÌÅÍ °ª Ç¥½Ã int m_nTypeNum; CFont m_font; COLORREF m_fontColor; int m_nPositionType; //0À϶§ ¾Æ·¡ À§Ä¡·Î Ç¥½Ã, 1À϶§ ¿ìÃø ÇÏ´Ü unsigned int m_fontAlign; //Á¤·Ä int m_nPositionX;//±×¸®´Â À§Ä¡(³ªÁß¿¡...) int m_nPositionY;//±×¸®´Â À§Ä¡(³ªÁß¿¡...) }; class AFX_EXT_CLASS CLegendOption { public: CLegendOption() { m_bEnable = false; m_font.CreatePointFont(90, _T("Tahoma")); m_fontColor = RGB(0,0,0); m_nType = 1; }; ~CLegendOption(){}; public: bool m_bEnable; int m_nType; //-1:±×¸®´Â ¸ð¾ç¿¡ µû¶ó¼­ ´Ù¸£°Ô, 0:¼±Å¸ÀÔ, 1:»ç°¢Çü, 2:µ¿±×¶ó¹Ì CFont m_font; COLORREF m_fontColor; int m_nPosition;//±×¸®´Â À§Ä¡(³ªÁß¿¡...) }; class AFX_EXT_CLASS CSeries { public: CSeries() { m_nType = 1; for(int i=0; i<5; i++) { m_Color[i] = RGB(0,0,255); m_nLineWidth[i] = 1; } memset(m_strLegend, 0, sizeof(char)*32); }; ~CSeries(){}; public: int m_nType; //1:¼±Å¸ÀÔ, 2:¹ÙŸÀÔ, 3:¹Í½º, 0:hide int m_nLineWidth[5]; COLORREF m_Color[5]; char m_strLegend[32]; //Á¦¸ñ }; class AFX_EXT_CLASS CScroll { public: CScroll() { m_nEnable = 0; m_nSize = 25; //m_bruScrollRect.CreateSolidBrush() m_bSelected = false; }; public: int m_nEnable; //0Àº ºñ»ç¿ë, 1Ç×»ó »ç¿ë, 2ÇÊ¿äÇÒ¶§¸¸ Ç¥½Ã int m_nSize; //Ç¥½Ã Å©±â public: public: double m_nScrollMin; double m_nScrollMax; public: CakRect m_rectScroll; CakRect m_rectThumb; bool m_bSelected;//¸¶¿ì½º·Î ¼±ÅÃÀÌ µÇ¾ú´ÂÁö üũ ÅÂÇö[2016/5/2] }; class AFX_EXT_CLASS CAxis { public: CAxis() { m_RangeValueMin = 0; m_RangeValueMax = 10; m_Size = 50; m_TickGabPixel = 50; m_TickGabStep = -1; m_MinorTickNum = 3; m_FontTick.CreatePointFont(90, _T("Tahoma")); m_strTitle = "Axis"; m_Font.CreatePointFont(90, _T("Tahoma")); m_FontColor = RGB(0,0,0); m_TickColor = RGB(0,0,0); m_LabelColor = RGB(0,0,0); } void SetVerticalFont() { LOGFONT logfont; m_Font.GetLogFont(&logfont); //logfont.lfHeight = 20; logfont.lfEscapement = 900; m_Font.DeleteObject(); m_Font.CreateFontIndirect(&logfont); }; //¼³Á¤µÈ ÆùÆ®¸¦ ¼¼·Î·Î ¹Ù²Û´Ù. void SetRotateFont(CFont* pFont, int nDeg) { LOGFONT logfont; pFont->GetLogFont(&logfont); //logfont.lfHeight = 20; logfont.lfEscapement = nDeg*10; pFont->DeleteObject(); pFont->CreateFontIndirect(&logfont); }; //¼³Á¤µÈ ÆùÆ®¸¦ ¼¼·Î·Î ¹Ù²Û´Ù. inline double GetRangeValue() { return m_RangeValueMax - m_RangeValueMin; } inline void SetRangeMove(double dValue)//dValue¸¸Å­ ¿òÁ÷ÀÓ { m_RangeValueMin += dValue; m_RangeValueMax += dValue; } inline void SetRangePos(double dValue)//ÇØ´ç À§Ä¡ÀÇ °¡¿îµ¥·Î À̵¿ { double dRangeHalf = GetRangeValue()/2.0; m_RangeValueMin = dValue-dRangeHalf; m_RangeValueMax = dValue+dRangeHalf; } public: double m_RangeValueMin; //µ¥ÀÌÅÍ ¹üÀ§ double m_RangeValueMax; //µ¥ÀÌÅÍ ¹üÀ§ int m_Size; //Ãà Å©±â(xÃàÀº ¼¼·ÎÅ©±â, yÃàÀº °¡·Î Å©±â) int m_TickGabPixel; //¶óº§ & ƽÀÌ Ç¥½ÃµÇ´Â ÃÖ¼Ò Çȼ¿ °£°Ý(¶óº§ÀÇ Ç¥½Ã´Â ÀÚµ¿¿¬»êÀ¸·Î) double m_TickGabStep; //¶óº§°ú ƽÀÌ Ç¥½ÃµÇ´Â °ªÀÇ °£°Ý COLORREF m_TickColor; int m_MinorTickNum; //ƽ°ú ƽ»çÀÌÀÇ ÀÛÀº ƽ °¹¼ö CFont m_FontTick; //ÆùÆ® CString m_strTitle; //Á¦¸ñ CFont m_Font; //ÆùÆ® COLORREF m_FontColor; COLORREF m_LabelColor; CScroll m_Scroll; }; class AFX_EXT_CLASS CTitle { public: CTitle() { m_Size = 60; m_strTitle = "Advance Kim Graph 2015"; m_Font.CreatePointFont(150, _T("¸¼Àº °íµñ")); m_FontColor = RGB(0,0,0); } public: CString m_strTitle; int m_Size; CFont m_Font; //ÆùÆ® COLORREF m_FontColor; }; class AFX_EXT_CLASS CakMouseState { public: CakMouseState() { bDragState = 0; apply = false; Point.SetPoint(0,0); memset(MouseButtonState,0,sizeof(MouseButtonState)); } inline void setPoint(CPoint pos) { //if(apply == true) { prePoint = Point; Point = pos; apply = false; } /*else { Point = pos; }*/ } bool apply; CPoint Point; //ÇöÁ¦ ¸¶¿ì½º Æ÷ÀÎÆ® CPoint prePoint; //ÀÌÀü ¸¶¿ì½º Æ÷ÀÎÆ® CPoint stPointDrag; bool MouseButtonState[10]; //¸¶¿ì½º µå·¹±× °ü¸® º¯¼ö int bDragState;//0:²¨Áü 1:¿Â 2:¿Â->¿ÀÇÁ CPoint ClickPointL; CPoint ClickPointR; CPoint DragEndPoint;//»ç°¢ÇüÀÌ ±×·ÁÁø ºÎºÐ Å©±â }; enum akMouseEvent { MouseNone, MouseMove, MouseLeftButtonDown, MouseLeftButtonUp, MouseLeftButtonDoubleClick, MouseMiddleButtonDown, MouseMiddleButtonUp, MouseMiddleButtonDoubleClick, MouseRightButtonDown, MouseRightButtonUp, MouseRightButtonDoubleClick, MouseWheelDown, MouseWheelUp, MouseLeftButtonDrag, MouseRightButtonDrag }; enum khMousetButtonState { LEFTBUTTONDOWN, RIGHTBUTTONDOWN, WHEELUP, WHEELDOWN }; enum akDragStyle { DS_None, //¾øÀ½ DS_All, //¸ðµÎ DS_All_VER, //¼¼·Î±âÁØ DS_All_HOR, //°¡·Î±âÁØ DS_Vertical, //¼¼·Î DS_Horizontal, DS_MAX };