FLImaging 6.10.23.2
GUIPropertyItemBase.h
1
8#pragma once
9
10#include "DefinitionsGUI.h"
11#include <functional>
12
14namespace FLImaging
15{
17 namespace GUI
18 {
19 class CInternalPermissionManager;
23
189 typedef std::function<void(CGUIPropertyItemBase*,
190 Base::CFLString<wchar_t>&,
192
229 #define MakePropertyCallback [=](CGUIPropertyItemBase* pItem, Base::CFLString<wchar_t>& strValue, const Base::CFLString<wchar_t>& strOrig) -> void
230
314 typedef std::function<void(CGUIPropertyItemBase*,
315 bool&,
317
334 #define MakePropertyAdditionalCheckBoxCallback [=](CGUIPropertyItemBase* pItem, bool& bCheckValue, const bool& bCheckValueOrig) -> void
335
336
344 class FL_EXPORT CGUIPropertyItemBase : public Base::CFLBase
345 {
346 public:
355
364
378 virtual bool SetPath(const Base::CFLString<wchar_t>& strPath);
379
392
406 virtual bool SetName(const Base::CFLString<wchar_t>& strName);
407
420
433
447 virtual bool Load(const Base::CFLString<wchar_t>& strFilePath = L"");
448
462 virtual bool Load(const Base::CFLArray<Base::CFLString<wchar_t>>& flaData);
463
477 virtual bool Save(const Base::CFLString<wchar_t>& strFilePath = L"") const;
478
494 virtual bool Save(Base::CFLArray<Base::CFLString<wchar_t>>& flaData) const;
495
505 virtual void SetReadOnly(bool bReadOnly);
506
516 virtual bool IsReadOnly() const;
517
525 virtual void Invalidate();
526
540 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true);
541
554
587
598
609
621 virtual bool SetOrigValue(const Base::CFLString<wchar_t>& strValue);
622
632 virtual void SetDefaultValue(const Base::CFLString<wchar_t>& strDefaultValue);
633
644
655 virtual void EnableAutoLoad(bool bAutoLoad = true);
656
666 virtual bool IsAutoLoadEnabled() const;
667
678 virtual void EnableAutoSave(bool bAutoSave = true);
679
689 virtual bool IsAutoSaveEnabled() const;
690
700 virtual void SetDescription(const Base::CFLString<wchar_t>& strDescription);
701
712
722 virtual CMFCPropertyGridProperty* GetGridProperty() const;
723
733 virtual CMFCPropertyGridProperty* CreateGridProperty() = 0;
734
744 virtual uint32_t GetHash() const;
745
755 virtual uint32_t GetParentHash() const;
756
772 virtual bool SetPropertyCallback(CPropertyCallback* pFunc, bool bAutoDestroy = true);
773
786
798 virtual void SetGUIMenuItemProperty(CGUIMenuItemProperty* pMIP);
799
809 virtual CGUIMenuItemProperty* GetGUIMenuItemProperty() const;
810
822 virtual void SetVisible(BOOL bShow, BOOL bAdjustLayout = FALSE);
823
833 virtual bool IsVisible() const;
834
844 virtual bool GetVisibleValue() const;
845
858
868 virtual bool IsInitialized() const;
869
879 virtual void SetInitialized(bool bInit);
880
890 virtual int32_t GetSubItemsCount() const;
891
903 virtual CGUIPropertyItemBase* GetSubItem(int32_t i32Index) const;
904
914 virtual void Enable(bool bEnable);
915
925 virtual bool IsEnabled() const;
926
936 virtual bool IsEffectivelyEnabled() const;
937
947 virtual void EnableInheritanceOfEnablement(bool bEnable = true);
948
959
969 virtual void EnableInheritanceOfVisibility(bool bEnable = true);
970
981
991 virtual void EnableGrayWhileDisabled(bool bGray = true);
992
1002 virtual bool IsGrayWhileDisabled() const;
1003
1019 virtual void SetMinimalAuthorityLevel(Base::EAuthorityLevel eAuthorityLevel, GUI::EPermission ePermission);
1036
1049
1057 virtual void SetModifiedFlag();
1058
1078 virtual void AddCheckBox(ECheckBoxLocation eLocation = ECheckBoxLocation_LeftOfName, bool bAdditionalCheckBoxValue = false);
1079
1089 virtual bool IsCheckBoxAdded() const;
1090
1099
1112
1125
1146
1157
1167 virtual void SetAdditionalCheckBoxValue(bool bCheck);
1168
1178 virtual bool GetAdditionalCheckBoxValue() const;
1179
1189 virtual bool Update();
1190
1200 virtual bool IsInsideCallback() const;
1201
1202 virtual void SetParentWndList(CMFCPropertyGridCtrl* pPGC);
1203 DeclareGetClassType();
1204
1205 protected:
1206 virtual void InvokeCallback(Base::CFLString<wchar_t>& strValue);
1207 virtual void InternalSetValue(const COleVariant& varValue, bool bRedrawImmediately);
1208 virtual void InternalSetOrigValue(const COleVariant& varValue);
1209
1210 virtual bool IsSNAPPropertyItem() const;
1211 virtual Base::CFLString<wchar_t> GetSNAPFilePath() const;
1212
1213 virtual const CResult ConvertAbsolutePathToRelativePath(const Base::CFLString<wchar_t>& flsAbsolutePath, Base::CFLString<wchar_t>& flsResultRelativePath) const;
1214 virtual const CResult ConvertRelativePathToAbsolutePath(const Base::CFLString<wchar_t>& flsRelativePath, Base::CFLString<wchar_t>& flsResultAbsolutePath) const;
1215
1216 protected:
1217 Base::CFLString<wchar_t> m_strPath;
1218 Base::CFLString<wchar_t> m_strName;
1219
1220 Base::CFLString<wchar_t> m_strDefaultValue;
1221 Base::CFLString<wchar_t> m_strDescription;
1222
1223 Base::CFLString<wchar_t> m_strInitialValue;
1224
1225 Base::CFLString<wchar_t> m_strBufferValue;
1226 Base::CFLString<wchar_t> m_strPrevBufferValue;
1227
1228 CMFCPropertyGridProperty* m_pGridProperty;
1229 mutable CGUIPropertyGridCtrl* m_pParentPropertyGridCtrl;
1230
1231 CPropertyCallback* m_pPropertyCallback;
1232 CPropertyAdditionalCheckBoxCallback* m_pPropertyAdditionalCheckBoxCallback;
1233 bool m_bPropertyCallbackAutoDestroy;
1234 bool m_bPropertyAdditionalCheckBoxCallbackAutoDestroy;
1235
1236 CGUIMenuItemProperty* m_pGUIMenuItemProperty;
1237
1238 CInternalPermissionManager* m_pInternalPM;
1239
1240 bool m_bInit;
1241 BOOL m_bShow;
1242 bool m_bEnable;
1243 bool m_bAutoLoad;
1244 bool m_bAutoSave;
1245 bool m_bReadOnly;
1246 bool m_bInCallback;
1247
1248 bool m_bInheritanceOfEnablement;
1249 bool m_bInheritanceOfVisibility;
1250 bool m_bEnableGrayWhileDisabled;
1251
1252 bool m_bCheckBoxAdded;
1253 bool m_bAdditionalCheckBoxValue;
1254 ECheckBoxLocation m_eAdditionalCheckBoxLocation;
1255
1256 EPropertyItemType m_ePropertyItemType;
1257
1258 friend class CGUIPaneProperties;
1259 friend class CGUIMenuItemProperty;
1260 friend class CInternalPermissionManager;
1261 friend class CGUIPropertyGridPropertyInterface;
1262 friend class CGUIPropertyGridPropertyBase;
1263 friend class CGUIPropertyGridPropertyColor;
1264 friend class CGUIPropertyGridPropertyDraggableSpin;
1265 friend class CGUIDialogPropertyImageFigureDrawingAttribute;
1266 friend class CGUIDialogProperty;
1267 friend class CGUIDialogPropertyObjectFigure;
1268 friend class CGUIDialogPropertyObjectFigureTransform;
1269 friend class CGUIDialogPropertyView3DToolROI;
1270 };
1271 }
1272}
Template type 의 배열 클래스.
Definition FLArray.h:53
FLImaging의 최상위 기저 클래스
Definition FLBase.h:36
Template type 의 문자열 클래스
Definition FLString.h:34
FLImaging 모듈의 수행 결과 객체
Definition ResultsDef.h:1631
프로퍼티 창에 연결된 메뉴 아이템 클래스
Definition GUIMenuItemProperty.h:48
속성 그리드 컨트롤 클래스
Definition GUIPropertyGridCtrl.h:51
프로퍼티 아이템 베이스 클래스
Definition GUIPropertyItemBase.h:345
virtual FLImaging::GUI::CGUIPropertyGridCtrl * GetParentWndList() const
이 아이템이 속한 그리드 컨트롤에 대한 포인터를 리턴합니다.
virtual void Invalidate()
this에 해당하는 영역을 화면상에서 무효화합니다.
virtual bool SetName(const Base::CFLString< wchar_t > &strName)
this의 이름을 설정합니다.
virtual Base::EAuthorityLevel GetMinimalAuthorityLevel(GUI::EPermission ePermission) const
이 프로퍼티 아이템을 보기, 실행, 수정 등 이용할 수 있는 최소 권한을 반환합니다.
virtual bool SetPath(const Base::CFLString< wchar_t > &strPath)
this의 부모 경로를 설정합니다. "Grandparent@Parent" 와 같이 설정합니다.
virtual uint32_t GetHash() const
this의 해시 값을 반환합니다.
virtual ECheckBoxLocation GetAdditionalCheckBoxLocation() const
추가 체크박스의 현재 위치를 반환합니다.
virtual bool IsEffectivelyEnabled() const
부모 아이템의 활성화 상태와 사용자 권한 수준을 고려하여 객체가 실질적으로 활성화되었는지 확인합니다. m_bEnable 값이 true일 경우에도 부모 아이템의 활성화 상태가 fals...
virtual void SetDescription(const Base::CFLString< wchar_t > &strDescription)
this의 설명을 설정합니다.
virtual bool SetPropertyCallback(CPropertyCallback *pFunc, bool bAutoDestroy=true)
프로퍼티에 대한 콜백 함수를 설정합니다.
virtual void EnableInheritanceOfEnablement(bool bEnable=true)
객체의 활성화 상태 상속을 활성화 또는 비활성화합니다.
virtual Base::CFLString< wchar_t > GetValue() const
이 프로퍼티 항목의 현재 값을 반환합니다.
virtual void SetAdditionalCheckBoxValue(bool bCheck)
추가 체크박스의 체크 상태를 설정합니다.
virtual bool Save(const Base::CFLString< wchar_t > &strFilePath=L"") const
ini 파일에 this의 값을 저장합니다.
virtual void EnableAutoSave(bool bAutoSave=true)
this에 대한 자동 저장 기능을 활성화 또는 비활성화합니다. 자동 저장이란, 프로퍼티 아이템에 값을 입력하거나 SetValue() 를 호출했을 때 설정 값이 자동으로 ini 파일에...
virtual CPropertyAdditionalCheckBoxCallback * GetPropertyAdditionalCheckBoxCallback() const
현재 설정된 추가 체크박스 콜백을 반환합니다.
virtual Base::CFLString< wchar_t > GetName() const
this의 이름을 리턴합니다.
virtual bool GetAdditionalCheckBoxValue() const
추가 체크박스의 체크 상태를 반환합니다.
virtual CMFCPropertyGridProperty * CreateGridProperty()=0
이 아이템에 대한 MFC 그리드 프로퍼티를 생성 후 리턴합니다. 만약 이미 생성된 객체가 있다면 그 객체를 리턴합니다.
virtual bool IsAutoLoadEnabled() const
this에 대해 자동 로드 기능이 활성화되어 있는지 확인합니다.
virtual void SetMinimalAuthorityLevel(Base::EAuthorityLevel eAuthorityLevel, GUI::EPermission ePermission)
this를 보기, 실행, 수정 등 이용할 수 있는 최소 권한을 설정합니다.
virtual CPropertyCallback * GetPropertyCallback() const
프로퍼티와 연결된 콜백 함수를 가져옵니다.
virtual bool GetVisibleValue() const
SetVisible() 로 설정한 값(m_bShow)을 리턴합니다. SetVisible(true) 로 설정하였더라도, authority level 에 따라 hide 상태일 수도 있지...
virtual bool Load(const Base::CFLString< wchar_t > &strFilePath=L"")
ini 파일로부터 this의 값을 로드합니다.
virtual void SetDefaultValue(const Base::CFLString< wchar_t > &strDefaultValue)
this의 기본값을 설정합니다.
virtual Base::CFLString< wchar_t > GetBufferValue() const
this의 현재 버퍼 값을 반환합니다.
virtual bool IsGrayWhileDisabled() const
비활성(disable) 상태의 프로퍼티 아이템이 회색조로 표시되는지 여부를 리턴합니다. true 일 경우 비활성 상태의 프로퍼티 아이템이 회색조로 표시,...
virtual bool SetValue(Base::CFLString< wchar_t > strValue, bool bInvokeCallback=true)
this에 값을 설정합니다.
virtual int32_t GetSubItemsCount() const
객체에 포함된 하위 항목의 개수를 가져옵니다.
virtual Base::CFLString< wchar_t > GetDefaultValue() const
this의 기본값을 반환합니다.
virtual bool SetBufferValue(Base::CFLString< wchar_t > strValue)
this의 버퍼 값을 설정합니다.
virtual void AddCheckBox(ECheckBoxLocation eLocation=ECheckBoxLocation_LeftOfName, bool bAdditionalCheckBoxValue=false)
프로퍼티 아이템에 추가 체크박스를 추가합니다. 이 체크박스는 기존 프로퍼티 아이템(텍스트, 드롭다운, 체크박스 등) 옆에 표시되는 보조적인 컨트롤입니다....
virtual bool IsInheritanceOfEnablementEnabled() const
활성화 상태의 상속이 활성화되어 있는지 확인합니다.
virtual CMFCPropertyGridProperty * GetGridProperty() const
this와 연결된 그리드 프로퍼티에 대한 포인터를 반환합니다.
virtual bool IsInheritanceOfVisibilityEnabled() const
가시성 상태의 상속이 활성화되어 있는지 확인합니다.
virtual Base::CFLString< wchar_t > GetPrevBufferValue() const
this의 이전 버퍼 값을 반환합니다.
virtual bool IsCheckBoxAdded() const
추가 체크박스가 이 프로퍼티 아이템에 추가되어 있는지 확인합니다.
virtual void RemoveAdditionalCheckBoxAdded()
프로퍼티 아이템에 추가된 체크박스를 제거합니다.
virtual bool SetPropertyAdditionalCheckBoxCallback(CPropertyAdditionalCheckBoxCallback *pFunc, bool bAutoDestroy=true)
추가 체크박스의 동작에 대한 콜백 함수를 설정합니다.
virtual ~CGUIPropertyItemBase()
CGUIPropertyItemBase 클래스의 소멸자
virtual void EnableInheritanceOfVisibility(bool bEnable=true)
객체의 가시성 상태 상속을 활성화 또는 비활성화합니다.
virtual void SetVisible(BOOL bShow, BOOL bAdjustLayout=FALSE)
this를 PropertyGridCtrl 에서 디스플레이 하거나 숨기기 처리 합니다. bAdjustLayout = FALSE 일 경우, GetParentWndList()->Adjus...
virtual void EnableAutoLoad(bool bAutoLoad=true)
this에 대한 자동 로드 기능을 활성화 또는 비활성화합니다. 자동 로드란, 프로퍼티 창을 열거나, 모델 매니저에서 모델을 변경 시(=레시피 변경 시) ini 파일로부터 값을 로드하...
virtual bool Load(const Base::CFLArray< Base::CFLString< wchar_t > > &flaData)
문자열 배열로부터 this의 값을 로드합니다.
virtual bool SetOrigValue(const Base::CFLString< wchar_t > &strValue)
this의 원래 값을 설정합니다.
virtual bool IsInitialized() const
객체가 초기화되었는지 확인합니다.
virtual void SetGUIMenuItemProperty(CGUIMenuItemProperty *pMIP)
객체와 연결된 GUI 메뉴 항목 프로퍼티를 설정합니다.
virtual CGUIPropertyItemBase * GetSubItem(int32_t i32Index) const
인덱스를 통해 특정 하위 항목을 가져옵니다.
virtual bool Update()
내부 상태 또는 UI를 갱신하고 성공 여부를 반환합니다.
virtual Base::CFLString< wchar_t > GetFullPath() const
this의 전체 경로를 리턴합니다. "Grandparent@Parent@MyName" 과 같이 문자열이 리턴됩니다.
virtual void SetInitialized(bool bInit)
객체의 초기화 상태를 설정합니다.
virtual bool IsReadOnly() const
ReadOnly(읽기 전용) 속성 여부를 반환합니다. true 이면 읽기 전용으로 설정하고, false 이면 편집 가능합니다.
virtual bool IsVisible() const
this의 가시성 여부를 리턴합니다. SetVisible(true) 로 설정하였더라도, authority level 에 따라 hide 상태일 수도 있으며 이 경우 화면 상에서 나타나...
virtual bool IsInsideCallback() const
현재 컨텍스트가 프로퍼티 콜백 프로시저 내부인지 여부를 반환합니다.
virtual bool IsEnabled() const
객체가 활성화되었는지 여부를 리턴합니다. Enable(bool) 로 설정한 값(m_bEnable)을 리턴합니다.
virtual uint32_t GetParentHash() const
this의 부모의 해시 값을 반환합니다.
virtual void EnableGrayWhileDisabled(bool bGray=true)
비활성(disable) 상태의 프로퍼티 아이템을 회색조로 표시할지 여부를 설정합니다. true 일 경우 비활성 상태의 프로퍼티 아이템을 회색조로 표시,...
virtual void SetModifiedFlag()
프로퍼티 아이템이 수정되었음을 표시합니다.
virtual bool Save(Base::CFLArray< Base::CFLString< wchar_t > > &flaData) const
INI 데이터 배열에 this의 값을 기록하는 함수
virtual void SetReadOnly(bool bReadOnly)
읽기 전용 여부를 설정합니다.true 이면 편집 불가능한 아이템이 되고 false 이면 편집이 가능합니다.
virtual void Enable(bool bEnable)
객체를 활성화 또는 비활성화합니다.
virtual CGUIMenuItemProperty * GetGUIMenuItemProperty() const
객체와 연결된 GUI 메뉴 항목 프로퍼티를 가져옵니다.
virtual EPropertyItemType GetItemType() const
프로퍼티 아이템의 타입을 반환합니다.
virtual void SetAdditionalCheckBoxLocation(ECheckBoxLocation eLocation=ECheckBoxLocation_LeftOfName)
추가 체크박스의 위치를 설정합니다.
virtual Base::CFLString< wchar_t > GetDescription() const
this의 설명을 반환합니다.
virtual bool IsAutoSaveEnabled() const
this에 대해 자동 저장이 활성화되어 있는지 확인합니다.
virtual Base::CFLString< wchar_t > GetPath() const
this의 부모 경로를 리턴합니다.
EAuthorityLevel
권한 레벨
Definition AuthorityManager.h:29
Definition D2DObject.h:12
ECheckBoxLocation
체크박스 위치
Definition DefinitionsGUI.h:10346
@ ECheckBoxLocation_LeftOfName
이름의 왼쪽
Definition DefinitionsGUI.h:10353
EPermission
권한
Definition DefinitionsGUI.h:9840
std::function< void(CGUIPropertyItemBase *, bool &, const bool &)> CPropertyAdditionalCheckBoxCallback
프로퍼티 아이템의 *추가 체크박스*가 토글될 때 호출되는 콜백입니다.
Definition GUIPropertyItemBase.h:316
EPropertyItemType
Definition DefinitionsGUI.h:10862
std::function< void(CGUIPropertyItemBase *, Base::CFLString< wchar_t > &, const Base::CFLString< wchar_t > &)> CPropertyCallback
SetValue() 내부에서 호출되는 값 변경 콜백입니다.
Definition GUIPropertyItemBase.h:191