11#include <unordered_map>
12#include "DefinitionsGUI.h"
13#include "GUIStyledCtrlBase.h"
15#define AFX_STRETCH_DELTA 2
24 class CGUIPaneProperties;
27 class CGUIPropertyGridPropertyDropdownList;
28 class CGUIPropertyGridPropertyViewGraphList;
29 class CGUIPropertyGridPropertyViewImageList;
30 class CGUIPropertyGridPropertyView3DList;
31 class CGUIPropertyGridPropertyBase;
32 class CGUIPropertyGridToolTipCtrl;
33 class CGUIPropertyGridPropertyCategory;
34 class CGUIPropertyGridPropertyRadioButtonGroup;
35 class CGUIPropertyGridPropertyRadioButton;
36 class CGUIPropertyGridPropertySliderDualHandle;
37 class CGUIScrollBarOwnerDrawn;
54 friend class CGUIPropertyGridPropertySliderDualHandle;
55 friend class CGUIPropertyGridPropertySlider;
56 friend class CGUIPropertyGridPropertyDraggableSpin;
57 friend class CGUIDialogPropertyImageFigureDrawingAttribute;
58 friend class CGUIPropertyGridPropertyCategory;
59 friend class CGUIPropertyGridPropertyCheckBox;
60 friend class CGUIPropertyGridPropertySheet;
443 virtual void HighlightPropertyWithBlink(
const CGUIPropertyItemBase* pItem, COLORREF clrHighlight = Foundation::FLLOGOCOLOR, uint32_t u32BlinkCount = 3, uint32_t u32IntervalMs = 200);
462 virtual void HighlightPropertyWithBlink(
const CGUIPropertyItemBase* pItem1,
const CGUIPropertyItemBase* pItem2, COLORREF clrHighlight = Foundation::FLLOGOCOLOR, uint32_t u32BlinkCount = 3, uint32_t u32IntervalMs = 200);
479 virtual void HighlightPropertyWithBlink(
const std::vector<const CGUIPropertyItemBase*>& vctItems, COLORREF clrHighlight = Foundation::FLLOGOCOLOR, uint32_t u32BlinkCount = 3, uint32_t u32IntervalMs = 200);
481 virtual const CResult InsertItem(CGUIPropertyItemBase* pItem,
const CGUIPropertyItemBase* pItemNewParent,
EAppendPosition eAppendPosition,
bool bAdjustLayout,
bool bAutoLoad);
482 virtual const CResult InsertItem(CGUIPropertyItemBase* pItem,
EInsertPosition eInsertPosition,
const CGUIPropertyItemBase* pItemInsertPosition,
bool bAdjustLayout,
bool bAutoLoad);
483 virtual const CResult RemoveItem(CGUIPropertyItemBase* pItem,
bool bDeletePropertyGridProperty,
bool bAdjustLayout);
485 virtual const CResult PreDeleteProperty(CMFCPropertyGridProperty* pProperty);
487 DeclareGetClassType();
490 virtual CMFCPropertyGridProperty* HitTest(CPoint pt, CMFCPropertyGridProperty::ClickArea* pnArea = NULL, BOOL bPropsOnly = FALSE)
const;
492 virtual BOOL RemoveProperty(CMFCPropertyGridProperty*& pProp, BOOL bDelete, BOOL bRedraw, BOOL bAdjustLayout);
494 void EnsureVisible(CMFCPropertyGridProperty* pProp, BOOL bExpandParents = FALSE);
495 virtual void SetAlphabeticMode(BOOL bSet = TRUE);
497 virtual void SetParentMainFrame(CGUIMainFrame* pMainFrame);
498 virtual CGUIMainFrame* GetParentMainFrame()
const;
501 virtual int GetTotalItemsWithExtraRows(BOOL bIncludeHidden = TRUE)
const;
503 void SetFontBold(HFONT hfont);
504 void SetFont(HFONT hfont);
505 virtual CFont* GetFontBold();
507 virtual void SetManagerPropertyItem(CGUIManagerPropertyItem* pMgr);
508 virtual const CGUIManagerPropertyItem* GetManagerPropertyItem()
const;
511 virtual void AddPendingUpdateValue(
const CMFCPropertyGridProperty* pPGP,
const COleVariant& var);
512 virtual void AddPendingUpdateValueMin(
const CGUIPropertyGridPropertySliderDualHandle* pPGP,
const COleVariant& var);
513 virtual void AddPendingUpdateValueMax(
const CGUIPropertyGridPropertySliderDualHandle* pPGP,
const COleVariant& var);
514 virtual const CResult GetPendingUpdateValue(
const CMFCPropertyGridProperty* pPGP, COleVariant& varRes)
const;
515 virtual const CResult GetPendingUpdateValueMin(
const CGUIPropertyGridPropertySliderDualHandle* pPGP, COleVariant& varRes)
const;
516 virtual const CResult GetPendingUpdateValueMax(
const CGUIPropertyGridPropertySliderDualHandle* pPGP, COleVariant& varRes)
const;
517 virtual void AddPendingUpdateVisibility(
const CMFCPropertyGridProperty* pPGP,
bool bVisibility);
518 virtual const CResult GetPendingUpdateVisibility(
const CMFCPropertyGridProperty* pPGP,
bool& bVisibility)
const;
520 virtual void OnDrawList(CDC* pDC)
override;
521 virtual void DrawPropertyDefault(CDC* pDC, CGUIPropertyGridPropertyBase* pPgp)
const;
522 virtual void DrawRadioButtonGroupBox(CDC* pDC, CGUIPropertyGridPropertyRadioButtonGroup* pPropRGB)
const;
523 virtual int OnDrawProperty(CDC* pDC, CMFCPropertyGridProperty* pProp)
const override;
524 virtual int OnDrawProperty(CDC* pDC, CGUIPropertyGridPropertyCategory* pPropCat)
const;
525 static void OnDrawComboDropButton(CDC* pDC, CRect rect, BOOL bDisabled, BOOL bDropped, BOOL bHighlighted, CMFCToolBarComboBoxButton* pButton);
526 static void OnDrawButtonBorder(CDC* pDC, CMFCToolBarButton* pButton, CRect rect, CMFCVisualManager::AFX_BUTTON_STATE state);
528 virtual CList<CMFCPropertyGridProperty*, CMFCPropertyGridProperty*>* GetTopLevelProperties();
529 virtual BOOL EndEditItem(BOOL bUpdateData = TRUE)
override;
532 virtual void SetScrollSizes();
533 virtual void ReposProperties();
541 void RecursivelySetPropertySliderWidth(CMFCPropertyGridProperty* pParent =
nullptr);
561 void AddVisibleRows(CGUIPropertyGridPropertyBase* pProp, std::vector<CGUIPropertyGridPropertyBase*>& vctPPgpItems);
629 void SetTopRow(
const std::vector<CGUIPropertyGridPropertyBase*>& vctPPgpItems, int32_t i32Top);
653 CMFCPropertyGridProperty* m_pPropLButtonDown;
655 CGUIPaneProperties* m_pParentPane;
656 CGUIMainFrame* m_pParentMainFrame;
657 CGUIPropertyGridPropertyBase* m_pPropertyPrevHit;
658 CGUIPropertyGridToolTipCtrl* m_pIPToolTip;
659 CGUIScrollBarOwnerDrawn* m_pOwnerDrawScrollBarVert;
660 CGUIScrollBarOwnerDrawn* m_pOwnerDrawScrollBarHorz;
661 std::unordered_map<CMFCPropertyGridProperty*, COleVariant>& m_mapPendingValue;
662 std::unordered_map<CGUIPropertyGridPropertySliderDualHandle*, COleVariant>& m_mapPendingValueMin;
663 std::unordered_map<CGUIPropertyGridPropertySliderDualHandle*, COleVariant>& m_mapPendingValueMax;
664 std::unordered_map<CMFCPropertyGridProperty*, bool>& m_mapPendingVisibility;
667 float m_f32LeftColWidthRatio;
668 int32_t m_i32LeftColWidth;
670 std::vector<CGUIPropertyGridPropertyBase*>& m_vctPPgpBlink;
671 COLORREF m_clrHighlight;
672 uint32_t m_u32NeedToBlinkCnt;
673 uint32_t m_u32CurrBlinkCnt;
675 bool m_bPropertySliderDeprecatedExists;
677 CGUIStyledCtrlBase m_scbCategory;
678 CGUIStyledCtrlBase m_scbRadioBtnGroup;
679 CGUIStyledCtrlBase m_scbPropBase;
681 CGUIManagerPropertyItem* m_pMgrRef;
685 friend class CGUIManagerPane;
686 friend class CGUIPaneProperties;
687 friend class CGUIMenuItemProperty;
688 friend class CGUIPropertyGridPropertyDropdownList;
689 friend class CGUIPropertyGridPropertyViewListBase;
690 friend class CGUIPropertyGridPropertyBase;
691 friend class CGUIPropertyGridPropertyColor;
692 friend class CGUIPropertyItemRadioButton;
693 friend class CGUIPropertyItemSliderDualHandle;
694 friend class CGUIPropertyItemCheckBox;
695 friend class CGUIPropertyItemCategory;
696 friend class CGUIPropertyItemText;
697 friend class CGUIPropertyItemFont;
698 friend class CGUIPropertyItemBase;
699 friend class CGUIPropertyItemRadioButtonGroup;
700 friend class CGUIPropertyGridPropertyRadioButtonGroup;
701 friend class CGUIPropertyItemCheckBox3State;
702 friend class CGUIDialogProperty;
703 friend class CGUIDialogLicenseFeatures;
704 friend class CGUIManagerPropertyItem;
707 DECLARE_MESSAGE_MAP()
708 afx_msg
void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
709 afx_msg BOOL OnMouseWheel(UINT nFlags,
short zDelta, CPoint pt);
710 afx_msg
void OnMouseHWheel(UINT nFlags,
short zDelta, CPoint pt);
711 afx_msg
void OnMouseMove(UINT nFlags, CPoint point);
712 afx_msg
void OnLButtonUp(UINT nFlags, CPoint point);
713 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
714 afx_msg
void OnSetFocus(CWnd* pOldWnd);
715 afx_msg
void OnKillFocus(CWnd* pNewWnd);
716 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
717 afx_msg
void OnRButtonDblClk(UINT nFlags, CPoint point);
718 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
719 virtual
void PreSubclassWindow();
720 virtual BOOL PreTranslateMessage(MSG* pMsg);
721 afx_msg
void OnEnable(BOOL bEnable);
722 afx_msg
void OnCancelMode();
723 afx_msg
void OnDestroy();
724 LRESULT OnScrollBarPosChanged(WPARAM wParam, LPARAM lParam);
725 LRESULT OnSliderOwnerDrawnPosChanged(WPARAM wParam, LPARAM lParam);
726 LRESULT OnSliderOwnerDrawnRedraw(WPARAM wParam, LPARAM lParam);
727 afx_msg BOOL OnNeedTipText(UINT
id, NMHDR* pNMH, LRESULT* pResult);
728 afx_msg
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
729 afx_msg
void OnLButtonDown(UINT nFlags, CPoint point);
730 afx_msg
void OnRButtonDown(UINT nFlags, CPoint point);
731 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
732 afx_msg
void OnHeaderItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
733 afx_msg
void OnLButtonDblClk(UINT nFlags, CPoint point);
734 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
735 afx_msg
void OnTimer(UINT_PTR nIDEvent);
736 afx_msg
void OnNMSheetCellChanged(NMHDR* pNMHDR, LRESULT* pResult);
738 void TrackToolTip(CPoint pt);
739 virtual
void Init() override;
740 virtual
void OnDraw(CDC* pDC) override;
741 virtual
void OnClickButton(CPoint point) override;
Broadcast message class.
Definition BroadcastMessage.h:27
Simplified class representing a point.
Definition TPoint.h:37
Simplified class representing a rectangle.
Definition TRect.h:37
FLImaging module execution result object.
Definition ResultsDef.h:1704
Manager class responsible for handling CGUIPropertyItemBase objects and synchronizing them with CGUIP...
Definition GUIManagerPropertyItem.h:46
virtual void SetCustomColorGroupBackground(COLORREF color)
Set custom color for group background.
virtual CGUIPaneProperties * GetParentPane() const
Get parent pane.
void AddVisibleRows(CGUIPropertyGridPropertyBase *pProp, std::vector< CGUIPropertyGridPropertyBase * > &vctPPgpItems)
Recursively appends pProp and its currently displayed descendants to vctPPgpItems....
virtual void SetCustomColorGridLine(COLORREF color)
Set custom color for grid lines.
virtual const CResult SetLeftColumnWidthRatio(float f32Ratio=0.5f, ESizeMode eSizeMode=ESizeMode_Ratio)
Sets the width of the left column using a ratio.
virtual COLORREF GetCustomColorGridLine() const
Get custom color for grid lines.
virtual COLORREF GetCustomColorGroupSubItemBackground() const
Get custom color for group sub item background.
virtual void HighlightPropertyWithBlink(const CGUIPropertyItemBase *pItem, COLORREF clrHighlight=Foundation::FLLOGOCOLOR, uint32_t u32BlinkCount=3, uint32_t u32IntervalMs=200)
Highlights a property item with a blinking effect.
virtual bool IsGridLineVisible() const
Check whether the grid lines are visible.
virtual COLORREF GetCustomColorGroupText() const
Get custom color for group text.
virtual COLORREF GetCustomColorGroupLine() const
Get custom color for group line.
virtual void SetCustomColorGroupSubItemBackground(COLORREF color)
Set custom color for group sub item background.
virtual void SetParentPane(CGUIPaneProperties *pParentPane)
Set parent pane.
virtual void OnReceiveBroadcast(const Base::CBroadcastMessage *pMessage) override
Callback function. A function that receives a BroadcastMessage.
virtual void HighlightPropertyWithBlink(const std::vector< const CGUIPropertyItemBase * > &vctItems, COLORREF clrHighlight=Foundation::FLLOGOCOLOR, uint32_t u32BlinkCount=3, uint32_t u32IntervalMs=200)
Highlights multiple property items with a blinking effect.
virtual void AdjustLayoutAsync()
Adjusts the control's layout.(Asynchronous function) This function should be called only when there a...
virtual const CResult SetLeftColumnWidthSizeMode(ESizeMode eSizeMode=ESizeMode_Ratio)
Sets the size mode for the left column width.
virtual float GetLeftColumnWidthRatio() const
Gets the ratio used for the left column width.
virtual bool AdjustLayoutForVisibility()
Used to adjust the control's layout after calling CGUIPropertyItemBase::SetVisible()....
virtual void AdjustLayout() override
Adjusts the control's layout. This function should be called only when there are layout changes,...
virtual void HighlightPropertyWithBlink(const CGUIPropertyItemBase *pItem1, const CGUIPropertyItemBase *pItem2, COLORREF clrHighlight=Foundation::FLLOGOCOLOR, uint32_t u32BlinkCount=3, uint32_t u32IntervalMs=200)
Highlights two property items with a blinking effect.
int32_t GetPageRowCount() const
Returns the number of rows that fit in the visible list area at once.
virtual ESizeMode GetLeftColumnWidthSizeMode() const
Gets the size mode of the left column width.
virtual COLORREF GetCustomColorBackground() const
Get custom color for background.
virtual COLORREF GetCustomColorGroupBackground() const
Get custom color for group background.
virtual ~CGUIPropertyGridCtrl()
Destructor for the property grid control.
void InternalEnsureVisible(const std::vector< CGUIPropertyGridPropertyBase * > &vctPPgpItems)
Expands all ancestors of vctPPgpItems and scrolls the grid to bring them into view....
bool IsRowFullyVisible(const CGUIPropertyGridPropertyBase *pProp) const
Tests whether the row of pProp is entirely inside the visible list area.
virtual void ShowGridLine(bool bShow)
Set whether to display grid lines.
virtual void SetCustomColorGroupLine(COLORREF color)
Set custom color for group line.
virtual void SetCustomColorBackground(COLORREF color)
Set custom color for background.
CGUIPropertyGridCtrl()
Default constructor for the property grid control.
void SetTopRow(const std::vector< CGUIPropertyGridPropertyBase * > &vctPPgpItems, int32_t i32Top)
Scrolls the grid so that the row at index i32Top becomes the topmost visible row.
void GetVisibleRows(std::vector< CGUIPropertyGridPropertyBase * > &vctPPgpItems)
Builds the flattened list of every row currently displayed in the grid, ordered from top to bottom....
void GetPropertyByVisibleOrder(std::vector< CMFCPropertyGridProperty * > &vctProps, CMFCPropertyGridProperty *pParent=nullptr) const
Get properties by their visible order.
virtual const CResult SetLeftColumnWidth(int32_t i32LeftColumnWidth, ESizeMode eSizeMode=ESizeMode_Fixed)
Sets the width of the left column (name area).
virtual void SetCustomColorGroupText(COLORREF color)
Set custom color for group text.
void SetDescriptionHeight(int32_t i32Height, bool bAdjustLayout=true)
Sets the height of the description area.
Property item base class.
Definition GUIPropertyItemBase.h:319
Definition D2DObject.h:12
EInsertPosition
Definition DefinitionsGUI.h:15460
ESizeMode
Specifies how a UI element's size is determined.
Definition DefinitionsGUI.h:16422
@ ESizeMode_Ratio
Ratio-based size.
Definition DefinitionsGUI.h:16454
@ ESizeMode_Fixed
Fixed size (e.g., pixel-based).
Definition DefinitionsGUI.h:16443
EOrientation
Direction.
Definition DefinitionsGUI.h:9901
@ EOrientation_Vertical
a vertical direction
Definition DefinitionsGUI.h:9908
EAppendPosition
Definition DefinitionsGUI.h:15480
EGUIControlState
Enumeration for GUI control states.
Definition DefinitionsGUI.h:16264