FLImaging 7.8.25.3
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
111 protected:
112 CGUIPropertyItemRadioButton();
113
114 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
115 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback, bool bRedraw);
116 virtual bool SetBufferValue(Base::CFLString<wchar_t> strValue) override;
117 virtual bool SetOrigValue(const Base::CFLString<wchar_t>& strValue) override;
118 virtual void SetDefaultValue(const Base::CFLString<wchar_t>& strDefaultValue) override;
119
120 virtual bool Load(const Base::CFLString<wchar_t>& strFilePath = L"") override;
121 virtual bool Load(const Base::CFLArray<Base::CFLString<wchar_t>>& flaData) override;
122 virtual bool Save(const Base::CFLString<wchar_t>& strFilePath = L"") const override;
123 virtual bool Save(Base::CFLArray<Base::CFLString<wchar_t>>& flaData) const override;
124
125 virtual void Select(bool bSelect);
126
127 virtual bool SetPropertyCallback(CPropertyCallback* pFunc, bool bAutoDestroy = true) override;
128 virtual CPropertyCallback* GetPropertyCallback() const override;
129
130 protected:
131 bool m_bIsRadioButtonOnRight;
132 bool m_bInProcSetValue;
133 CGUIPropertyItemRadioButtonGroup* m_pParentGroup;
134
135 friend class CGUIPropertyGridPropertyRadioButton;
136 };
137 }
138}
139
Template type array class.
Definition FLArray.h:71
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:34
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
Sets a callback function for the property.
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
Retrieves the callback function associated with the property.
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:193