FLImaging 6.10.1.1
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 SetPropertyButtonClickProcedure(CPropertyItemButtonClickProcedure* pFunc, bool bAutoDestroy = true);
97
107 virtual CPropertyItemButtonClickProcedure* GetPropertyButtonClickProcedure() const;
108
109 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
110
111 DeclareGetClassType();
112
113 protected:
122
130 CPropertyItemButtonClickProcedure* m_pButtonClickProcedure;
131
140
141 // Friends that may access internal state for grid/property integration.
142 // 그리드/프로퍼티 연동을 위해 내부 상태에 접근하는 friend 선언입니다.
143 friend class CGUIPaneProperties;
144 friend class CGUIPropertyGridPropertyButton;
145 };
146 }
147}
148
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 bool SetPropertyButtonClickProcedure(CPropertyItemButtonClickProcedure *pFunc, bool bAutoDestroy=true)
Registers a click procedure that will be invoked when the button is pressed.
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:121
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:139
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:130
Definition D2DObject.h:12