FLImaging 6.5.8.1
GUIPropertyItemText.h
1#pragma once
2
3#include "GUIPropertyItemBase.h"
4#include "GUIEditBase.h"
5
6namespace FLImaging
7{
8 namespace GUI
9 {
10 class FL_EXPORT CGUIPropertyItemText : public CGUIPropertyItemBase
11 {
12 public:
13 CGUIPropertyItemText();
14 virtual ~CGUIPropertyItemText();
15
16 virtual CMFCPropertyGridProperty* CreateGridProperty() override;
17
18 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
19 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback, bool bRedraw);
20 virtual bool SetOrigValue(const Base::CFLString<wchar_t>& strValue);
21
29 virtual void SetInputType(CGUIEditBase::EInputType eInputType);
30
38 virtual CGUIEditBase::EInputType GetInputType() const;
39
40 // Set the character set to deny or accept input.
41 // If you set an empty string to cstrValidCharSet, input of any string except the characters in cstrInvalidCharSet is accepted.
42 // If you set an empty string in cstrInvalidCharSet, only characters input from cstrValidCharSet is allowed.
43 virtual void SetUserDefinedInput(Base::CFLString<wchar_t> cstrInvalidCharSet, Base::CFLString<wchar_t> cstrValidCharSet);
44
52 virtual void SetToolTipText(Base::CFLString<wchar_t> cstrToolTipText);
53
63 virtual bool SetRealtimeEventCallback(CPropertyCallback* pCallback, bool bAutoDestroy = true);
64
72 virtual CPropertyCallback* GetRealtimeEventCallback() const;
73
74 virtual void Enable(bool bEnable) override;
75 protected:
76 CGUIEditBase::EInputType m_eInputType;
77 Base::CFLString<wchar_t> m_cstrInvalidCharSet;
78 Base::CFLString<wchar_t> m_cstrValidCharSet;
79 Base::CFLString<wchar_t> m_cstrToolTipText;
80
81 CPropertyCallback* m_pRealtimeCallback;
82 bool m_bRealtimeCallbackAutoDestroy;
83
84 friend class CGUIPropertyGridPropertyText;
85 };
86 }
87}
88