FLImaging 6.10.1.1
GUIPropertyItemRadioButton.h
1
7#pragma once
8#include "GUIPropertyItemBase.h"
9
11namespace FLImaging
12{
14 namespace GUI
15 {
16 class CGUIPropertyGridPropertyRadioButton;
18
41 class FL_EXPORT CGUIPropertyItemRadioButton : public CGUIPropertyItemBase
42 {
43 friend class CGUIPropertyItemRadioButtonGroup;
44
45 public:
54
64 virtual CMFCPropertyGridProperty* CreateGridProperty() override;
65
76 virtual void SetRadioButtonOnRight(bool bSet);
77
87 virtual bool IsRadioButtonOnRight() const;
88
98 virtual Base::CFLString<wchar_t> GetValue() const override;
99
109 virtual bool IsSelected() const;
110
128 [[deprecated("Cannot set a callback on an individual radio button. "
129 "Set the callback on CGUIPropertyItemRadioButtonGroup.")]]
130 virtual bool SetPropertyCallback(CPropertyCallback* pFunc, bool bAutoDestroy = true) override;
131
143 [[deprecated("Individual radio buttons do not have callbacks; this always returns nullptr. "
144 "Use the group's callback.")]]
145 virtual CPropertyCallback* GetPropertyCallback() const override;
146
147 protected:
148 CGUIPropertyItemRadioButton();
149
150 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
151 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback, bool bRedraw);
152 virtual bool SetBufferValue(Base::CFLString<wchar_t> strValue) override;
153 virtual bool SetOrigValue(const Base::CFLString<wchar_t>& strValue) override;
154 virtual void SetDefaultValue(const Base::CFLString<wchar_t>& strDefaultValue) override;
155
156 virtual bool Load(const Base::CFLString<wchar_t>& strFilePath = L"") override;
157 virtual bool Load(const Base::CFLArray<Base::CFLString<wchar_t>>& flaData) override;
158 virtual bool Save(const Base::CFLString<wchar_t>& strFilePath = L"") const override;
159 virtual bool Save(Base::CFLArray<Base::CFLString<wchar_t>>& flaData) const override;
160
161 virtual void Select(bool bSelect);
162
163 protected:
164 bool m_bIsRadioButtonOnRight;
165 bool m_bInProcSetValue;
166 CGUIPropertyItemRadioButtonGroup* m_pParentGroup;
167
168 friend class CGUIPropertyGridPropertyRadioButton;
169 };
170 }
171}
172
Template type array class.
Definition FLArray.h:53
Template type string class.
Definition FLString.h:34
CGUIPropertyItemBase()
Default constructor.
Property item representing a group of mutually exclusive radio buttons in a property grid.
Definition GUIPropertyItemRadioButtonGroup.h:33
virtual CMFCPropertyGridProperty * CreateGridProperty() override
Create and return the MFC grid property node for this radio item.
virtual bool SetPropertyCallback(CPropertyCallback *pFunc, bool bAutoDestroy=true) override
virtual bool Save(const Base::CFLString< wchar_t > &strFilePath=L"") const override
Saves the value of this to an ini file.
virtual bool IsSelected() const
Check whether this radio item is currently selected.
virtual bool IsRadioButtonOnRight() const
Query whether the radio control is placed in the right "Value" column.
virtual bool Load(const Base::CFLArray< Base::CFLString< wchar_t > > &flaData) override
Loads the value of this from a string array.
virtual CPropertyCallback * GetPropertyCallback() const override
virtual bool SetValue(Base::CFLString< wchar_t > strValue, bool bInvokeCallback=true) override
Sets the value for this.
virtual bool SetBufferValue(Base::CFLString< wchar_t > strValue) override
Sets the buffer value of this.
virtual ~CGUIPropertyItemRadioButton()
Virtual destructor.
virtual Base::CFLString< wchar_t > GetValue() const override
Get the textual value associated with this radio item.
virtual void SetRadioButtonOnRight(bool bSet)
Place the radio control in the right "Value" column or the left "Name" column.
virtual bool SetOrigValue(const Base::CFLString< wchar_t > &strValue) override
Sets the original value of this.
virtual bool Save(Base::CFLArray< Base::CFLString< wchar_t > > &flaData) const override
Function to record the value of this in INI data array.
virtual bool Load(const Base::CFLString< wchar_t > &strFilePath=L"") override
Loads the value of this from an ini file.
virtual void SetDefaultValue(const Base::CFLString< wchar_t > &strDefaultValue) override
Sets the default value of this.
Definition D2DObject.h:12
std::function< void(CGUIPropertyItemBase *, Base::CFLString< wchar_t > &, const Base::CFLString< wchar_t > &)> CPropertyCallback
Value-change callback invoked from within SetValue().
Definition GUIPropertyItemBase.h:191