FLImaging 6.10.1.1
GUIPropertyItemRadioButtonGroup.h
1
7#pragma once
8#include "GUIPropertyItemBase.h"
9
11namespace FLImaging
12{
14 namespace GUI
15 {
18
33 {
34 public:
43
52
62 virtual void SetExpand(bool bExpand);
63
73 virtual bool IsExpanded() const;
74
88 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
89 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback, bool bRedraw);
90
100 virtual Base::CFLString<wchar_t> GetValue() const override;
101
119 virtual bool AddRadioButton(const Base::CFLString<wchar_t>& strRadioButtonName,
120 bool bSelected = false,
121 const Base::CFLString<wchar_t>& strItemDescription = L"");
122
144 virtual bool InsertRadioButton(int32_t i32Index,
145 const Base::CFLString<wchar_t>& strRadioButtonName,
146 bool bSelected = false,
147 const Base::CFLString<wchar_t>& strItemDescription = L"",
148 bool bAdjustLayout = true);
149
159 virtual bool RemoveAllRadioButton();
160
174 virtual bool RemoveRadioButtonAt(int32_t i32Index, bool bAdjustLayout = true);
175
189 virtual CGUIPropertyItemRadioButton* GetRadioButtonAt(int32_t i32Index) const;
190
204 virtual bool AddItemDescription(int32_t i32Index, const Base::CFLString<wchar_t>& strItemDescription);
205
215 virtual int32_t GetItemCount() const;
216
228 virtual int32_t GetIndex(const Base::CFLString<wchar_t>& strName) const;
229
241 virtual Base::CFLString<wchar_t> GetItemDescriptionAt(int32_t i32Index) const;
242
243 virtual CMFCPropertyGridProperty* CreateGridProperty() override;
244
254 virtual void Enable(bool bEnable) override;
255
267 virtual bool Load(const Base::CFLArray<Base::CFLString<wchar_t>>& flaData) override;
268
269 protected:
270 virtual bool Update();
271 virtual void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
272 virtual void SetGUIMenuItemProperty(CGUIMenuItemProperty* pMIP) override;
273 virtual void NotifySelectedItemChanged(const CGUIPropertyItemRadioButton* pSelectedItem);
274
275 virtual void InvokeCallback(Base::CFLString<wchar_t>& strValue);
276 virtual void InternalSetValue(const COleVariant& varValue, bool bRedrawImmediately);
277 virtual void InternalSetOrigValue(const COleVariant& varValue);
278
294 virtual CGUIPropertyItemRadioButton* CreateNewRadioButton(const Base::CFLString<wchar_t>& strRadioButtonName,
295 bool bSelected = false,
296 const Base::CFLString<wchar_t>& strItemDescription = L"");
297
298 protected:
299 bool m_bExpand;
300 bool m_bExpandSet;
301 bool m_bInProcNotifySelectedItemChanged;
302 std::vector<CGUIPropertyItemRadioButton*>& m_vctRadioButtons;
303
304 friend class CGUIPropertyItemRadioButton;
305 };
306 }
307}
308
Broadcast message class.
Definition BroadcastMessage.h:27
Template type array class.
Definition FLArray.h:53
Template type string class.
Definition FLString.h:34
The menu item class associated with the property pane.
Definition GUIMenuItemProperty.h:48
CGUIPropertyItemBase()
Default constructor.
virtual bool IsExpanded() const
Query whether the group is currently expanded.
virtual bool RemoveAllRadioButton()
Remove all radio button items from the group.
virtual int32_t GetIndex(const Base::CFLString< wchar_t > &strName) const
Find the index of an item by its label.
virtual CGUIPropertyItemRadioButton * GetRadioButtonAt(int32_t i32Index) const
Get a pointer to the radio button at the given index.
virtual CGUIPropertyItemRadioButton * CreateNewRadioButton(const Base::CFLString< wchar_t > &strRadioButtonName, bool bSelected=false, const Base::CFLString< wchar_t > &strItemDescription=L"")
Factory method to create a new radio item instance.
virtual void Enable(bool bEnable) override
Enable or disable this group (editing/interaction).
virtual int32_t GetItemCount() const
Get the number of radio button items in the group.
virtual void SetExpand(bool bExpand)
Expand or collapse the group node in the property grid UI.
virtual Base::CFLString< wchar_t > GetItemDescriptionAt(int32_t i32Index) const
Get the description text of an item by index.
virtual Base::CFLString< wchar_t > GetValue() const override
Get the currently selected item's name (label).
virtual bool Update()
Updates internal state or UI and returns the success status.
virtual bool RemoveRadioButtonAt(int32_t i32Index, bool bAdjustLayout=true)
Remove a radio button by index.
virtual void OnReceiveBroadcast(const Base::CBroadcastMessage *pMessage) override
Callback function. A function that receives a BroadcastMessage.
virtual bool AddItemDescription(int32_t i32Index, const Base::CFLString< wchar_t > &strItemDescription)
Set/replace the description text of an item by index.
virtual bool InsertRadioButton(int32_t i32Index, const Base::CFLString< wchar_t > &strRadioButtonName, bool bSelected=false, const Base::CFLString< wchar_t > &strItemDescription=L"", bool bAdjustLayout=true)
Insert a radio button at a specific index.
virtual void SetGUIMenuItemProperty(CGUIMenuItemProperty *pMIP) override
Sets the GUI menu item property associated with the object.
virtual bool SetValue(Base::CFLString< wchar_t > strValue, bool bInvokeCallback=true) override
Set the selected radio by its item name (label).
virtual CMFCPropertyGridProperty * CreateGridProperty() override
Creates and returns a new grid property associated with this.
virtual bool AddRadioButton(const Base::CFLString< wchar_t > &strRadioButtonName, bool bSelected=false, const Base::CFLString< wchar_t > &strItemDescription=L"")
Append a radio button item (with optional selection and description).
virtual bool Load(const Base::CFLArray< Base::CFLString< wchar_t > > &flaData) override
Load group configuration/items from an array buffer.
Property-grid item representing a single radio button within a radio-button group.
Definition GUIPropertyItemRadioButton.h:42
Definition D2DObject.h:12