FLImaging 7.3.3.3
GUIPropertyItemButton.h
1
8#pragma once
9#include "GUIPropertyItemBase.h"
10
12namespace FLImaging
13{
15 namespace GUI
16 {
18
19 typedef std::function<void(CGUIPropertyItemButton*)> CPropertyItemButtonClickProcedure;
20 #define MakePropertyItemButtonClickProcedure [=](CGUIPropertyItemButton* pPropertyButton) -> void
21
30 {
31 public:
40
49
59 virtual CMFCPropertyGridProperty* CreateGridProperty() override;
60
70 virtual void SetButtonName(Base::CFLString<wchar_t> strButtonName);
71
82
96 virtual bool SetPropertyItemButtonClickProcedure(CPropertyItemButtonClickProcedure* pFunc, bool bAutoDestroy = true);
97
98 // obsolete
99 virtual bool SetPropertyButtonClickProcedure(CPropertyItemButtonClickProcedure* pFunc, bool bAutoDestroy = true);
100
110 virtual CPropertyItemButtonClickProcedure* GetPropertyButtonClickProcedure() const;
111
112 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
113
114 DeclareGetClassType();
115
116 protected:
125
133 CPropertyItemButtonClickProcedure* m_pButtonClickProcedure;
134
143
144 // Friends that may access internal state for grid/property integration.
145 // 그리드/프로퍼티 연동을 위해 내부 상태에 접근하는 friend 선언입니다.
146 friend class CGUIPaneProperties;
147 friend class CGUIPropertyGridPropertyButton;
148 };
149 }
150}
151
Template type string class.
Definition FLString.h:34
CGUIPropertyItemBase()
Default constructor.
Property item that renders a clickable button in a property grid and invokes a user-defined click pro...
Definition GUIPropertyItemButton.h:30
virtual ~CGUIPropertyItemButton()
Destructor.
virtual void SetButtonName(Base::CFLString< wchar_t > strButtonName)
Sets the display name (caption) of the button.
virtual CPropertyItemButtonClickProcedure * GetPropertyButtonClickProcedure() const
Returns the currently registered click procedure.
virtual CMFCPropertyGridProperty * CreateGridProperty() override
Creates a property-grid node for this button item.
CGUIPropertyItemButton()
Default constructor.
Base::CFLString< wchar_t > m_strButtonName
Button display name (caption) stored internally.
Definition GUIPropertyItemButton.h:124
virtual Base::CFLString< wchar_t > GetButtonName() const
Returns the current button display name (caption).
bool m_bButtonClickProcedureAutoDestroy
If true, the click procedure is owned and auto-destroyed by this item.
Definition GUIPropertyItemButton.h:142
virtual bool SetValue(Base::CFLString< wchar_t > strValue, bool bInvokeCallback=true) override
Sets the value for this.
CPropertyItemButtonClickProcedure * m_pButtonClickProcedure
Pointer to the registered button click procedure (handler).
Definition GUIPropertyItemButton.h:133
virtual bool SetPropertyItemButtonClickProcedure(CPropertyItemButtonClickProcedure *pFunc, bool bAutoDestroy=true)
Registers a click procedure that will be invoked when the button is pressed.
Definition D2DObject.h:12