SDC C-Project CF Review 프로그램
ReviewHistory/include/akGraph/akGraphStruct.h
»õ ÆÄÀÏ
@@ -0,0 +1,290 @@
#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
};