FLImaging 6.5.8.1
GUIEditBase.h
1#pragma once
2
11#include <afxwin.h>
12
14namespace FLImaging
15{
17 namespace GUI
18 {
26 class FL_EXPORT CGUIEditBase : public CEdit
27 {
28 public:
39 {
47 EInputType_All = 0x0000,
48
56 EInputType_Int = 0x0001,
57
65 EInputType_Float = 0x0002,
66
74 EInputType_FileName = 0x0004,
75
83 EInputType_Number = 0x0008,
84
92 EInputType_Alphabet = 0x0010,
93
101 EInputType_UserDefined = 0x1000,
102 };
103
104 public:
112
119 virtual ~CGUIEditBase();
120
132
143 virtual const CResult SetValue(const Base::CFLString<wchar_t>& flstrValue);
144
153 virtual int32_t GetValueAsInt32() const;
154
163 virtual int64_t GetValueAsInt64() const;
164
173 virtual double GetValueAsDouble() const;
174
175 DECLARE_MESSAGE_MAP()
176 public:
183 virtual void OnEditPaste();
184
191 virtual void OnEditCut();
192
193 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
194 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
195 afx_msg void OnDestroy();
196 afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
197
198
209 virtual void SetInputType(EInputType eInputType);
210
221 virtual EInputType GetInputType() const;
222
239 virtual void SetUserDefinedInput(Base::CFLString<wchar_t> cstrInvalidCharSet, Base::CFLString<wchar_t> cstrValidCharSet);
240
251 virtual void SetToolTipText(Base::CFLString<wchar_t> cstrToolTipText);
252
253 static void SetBackgroundColor(COLORREF clr);
254 static COLORREF GetBackgroundColor();
255
256 static void SetBackgroundColorReadOnly(COLORREF clr);
257 static COLORREF GetBackgroundColorReadOnly();
258
259 static void SetBorderColorActive(COLORREF clr);
260 static COLORREF GetBorderColorActive();
261
262 static void SetTextColor(COLORREF clr);
263 static COLORREF GetTextColor();
264
265 static void SetTextColorReadOnly(COLORREF clr);
266 static COLORREF GetTextColorReadOnly();
267
268 protected:
269 virtual BOOL PreTranslateMessage(MSG* pMsg);
270
271 virtual BOOL CopyToClipboard(Base::CFLString<wchar_t> str);
272 virtual Base::CFLString<wchar_t> PasteFromClipboard();
273 virtual bool CheckValidInput(UINT nNewChar, int32_t i32Index, Base::CFLString<wchar_t> strExist) const;
274
275 protected:
276 EInputType m_eInputType;
277 Base::CFLString<wchar_t> m_cstrInvalidCharSet;
278 Base::CFLString<wchar_t> m_cstrValidCharSet;
279 CToolTipCtrl m_ToolTip;
280 Base::CFLString<wchar_t> m_cstrToolTipText;
281 CBrush m_brBackground;
282 CBrush m_brBackgroundReadOnly;
283 int32_t m_i32SelStart;
284 int32_t m_i32SelEnd;
285
286 static COLORREF m_clrBk;
287 static COLORREF m_clrBkReadOnly;
288 static COLORREF m_clrBorderActive;
289 static COLORREF m_clrText;
290 static COLORREF m_clrTextReadOnly;
291
292};
293
295 {
296 return static_cast<CGUIEditBase::EInputType>(static_cast<int32_t>(a) | static_cast<int32_t>(b));
297 }
298
300 {
301 return static_cast<CGUIEditBase::EInputType>(static_cast<int32_t>(a) & static_cast<int32_t>(b));
302 }
303
304 inline CGUIEditBase::EInputType operator~(CGUIEditBase::EInputType a)
305 {
306 return static_cast<CGUIEditBase::EInputType>(~static_cast<int32_t>(a));
307 }
308
309 inline bool operator!(CGUIEditBase::EInputType a)
310 {
311 return static_cast<bool>(!static_cast<int32_t>(a));
312 }
313 }
314}
Template type 의 문자열 클래스
Definition INIUtilities.h:20
FLImaging 모듈의 수행 결과 객체
Definition ResultsDef.h:1514
문자열 편집 창 클래스
Definition GUIEditBase.h:27
virtual ~CGUIEditBase()
기본 소멸자
virtual int32_t GetValueAsInt32() const
입력 값을 정수형으로 변환하여 얻어 오는 함수
virtual Base::CFLString< wchar_t > GetValue() const
입력 값을 얻어 오는 함수
virtual double GetValueAsDouble() const
입력 값을 double 형으로 변환하여 얻어 오는 함수
virtual const CResult SetValue(const Base::CFLString< wchar_t > &flstrValue)
입력 값을 설정하는 함수로, 설정한 Input Type 에 맞게 값이 편집되어 저장됩니다.
virtual int64_t GetValueAsInt64() const
입력 값을 정수형으로 변환하여 얻어 오는 함수
EInputType
입력 값의 형식
Definition GUIEditBase.h:39
CGUIEditBase()
기본 생성자