FLImaging 7.4.14.3
GUIPropertyItemRadioButtonGroup.h
1
7#pragma once
8#include "GUIPropertyItemBase.h"
9
11namespace FLImaging
12{
14 namespace GUI
15 {
19
34 {
35 public:
44
53
63 virtual void SetExpand(bool bExpand);
64
74 virtual bool IsExpanded() const;
75
89 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
90 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback, bool bRedraw);
91
101 virtual Base::CFLString<wchar_t> GetValue() const override;
102
120 virtual bool AddRadioButton(const Base::CFLString<wchar_t>& strRadioButtonName,
121 bool bSelected = false,
122 const Base::CFLString<wchar_t>& strItemDescription = L"");
123
145 virtual bool InsertRadioButton(int32_t i32Index,
146 const Base::CFLString<wchar_t>& strRadioButtonName,
147 bool bSelected = false,
148 const Base::CFLString<wchar_t>& strItemDescription = L"",
149 bool bAdjustLayout = true);
150
160 virtual bool RemoveAllRadioButton();
161
175 virtual bool RemoveRadioButtonAt(int32_t i32Index, bool bAdjustLayout = true);
176
190 virtual CGUIPropertyItemRadioButton* GetRadioButtonAt(int32_t i32Index) const;
191
205 virtual bool AddItemDescription(int32_t i32Index, const Base::CFLString<wchar_t>& strItemDescription);
206
216 virtual int32_t GetItemCount() const;
217
229 virtual int32_t GetIndex(const Base::CFLString<wchar_t>& strName) const;
230
242 virtual Base::CFLString<wchar_t> GetItemDescriptionAt(int32_t i32Index) const;
243
244 virtual CMFCPropertyGridProperty* CreateGridProperty() override;
245
255 virtual void Enable(bool bEnable) override;
256
268 virtual bool Load(const Base::CFLArray<Base::CFLString<wchar_t>>& flaData) override;
269
270 virtual void SetManagerPropertyItem(CGUIManagerPropertyItem* pMgr);
271 protected:
272 virtual bool Update();
273 virtual void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
274 virtual void SetGUIMenuItemProperty(CGUIMenuItemProperty* pMIP) override;
275 virtual void NotifySelectedItemChanged(const CGUIPropertyItemRadioButton* pSelectedItem);
276
277 virtual void InvokeCallback(Base::CFLString<wchar_t>& strValue);
278 virtual void InternalSetValue(const COleVariant& varValue, bool bRedrawImmediately);
279 virtual void InternalSetOrigValue(const COleVariant& varValue);
280
296 virtual CGUIPropertyItemRadioButton* CreateNewRadioButton(const Base::CFLString<wchar_t>& strRadioButtonName,
297 bool bSelected = false,
298 const Base::CFLString<wchar_t>& strItemDescription = L"");
299
300 protected:
301 bool m_bExpand;
302 bool m_bExpandSet;
303 bool m_bInProcNotifySelectedItemChanged;
304 std::vector<CGUIPropertyItemRadioButton*>& m_vctRadioButtons;
305 CGUIManagerPropertyItem* m_pMgrRef;
306
307 friend class CGUIPropertyItemRadioButton;
308 };
309 }
310}
311
Broadcast message class.
Definition BroadcastMessage.h:27
Template type array class.
Definition FLArray.h:53
Template type string class.
Definition FLString.h:34
Manager class responsible for handling CGUIPropertyItemBase objects and synchronizing them with CGUIP...
Definition GUIManagerPropertyItem.h:46
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
It creates and returns the MFC grid property for this item. If an instance has already been created,...
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