SDC C-Project CF Review 프로그램
KEJ
2023-11-24 9020bfb6f86ff853d5d5b3cee882132a244232da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
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
};