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();
540 CGUIPropertyGridPropertyBase* GetSearchHitProperty()
const;
543 void RecursivelySetPropertySliderWidth(CMFCPropertyGridProperty* pParent =
nullptr);
563 void AddVisibleRows(CGUIPropertyGridPropertyBase* pProp, std::vector<CGUIPropertyGridPropertyBase*>& vctPPgpItems);
631 void SetTopRow(
const std::vector<CGUIPropertyGridPropertyBase*>& vctPPgpItems, int32_t i32Top);
653 bool IsDrodownList(
const CMFCPropertyGridProperty* pPgp)
const;
656 CMFCPropertyGridProperty* m_pPropLButtonDown;
658 CGUIPaneProperties* m_pParentPane;
659 CGUIMainFrame* m_pParentMainFrame;
660 CGUIPropertyGridPropertyBase* m_pPropertyPrevHit;
661 CGUIPropertyGridToolTipCtrl* m_pIPToolTip;
662 CGUIScrollBarOwnerDrawn* m_pOwnerDrawScrollBarVert;
663 CGUIScrollBarOwnerDrawn* m_pOwnerDrawScrollBarHorz;
664 std::unordered_map<CMFCPropertyGridProperty*, COleVariant>& m_mapPendingValue;
665 std::unordered_map<CGUIPropertyGridPropertySliderDualHandle*, COleVariant>& m_mapPendingValueMin;
666 std::unordered_map<CGUIPropertyGridPropertySliderDualHandle*, COleVariant>& m_mapPendingValueMax;
667 std::unordered_map<CMFCPropertyGridProperty*, bool>& m_mapPendingVisibility;
670 float m_f32LeftColWidthRatio;
671 int32_t m_i32LeftColWidth;
673 std::vector<CGUIPropertyGridPropertyBase*>& m_vctPPgpBlink;
674 COLORREF m_clrHighlight;
675 uint32_t m_u32NeedToBlinkCnt;
676 uint32_t m_u32CurrBlinkCnt;
678 bool m_bPropertySliderDeprecatedExists;
680 CGUIStyledCtrlBase m_scbCategory;
681 CGUIStyledCtrlBase m_scbRadioBtnGroup;
682 CGUIStyledCtrlBase m_scbPropBase;
684 CGUIManagerPropertyItem* m_pMgrRef;
688 friend class CGUIManagerPane;
689 friend class CGUIPaneProperties;
690 friend class CGUIMenuItemProperty;
691 friend class CGUIPropertyGridPropertyDropdownList;
692 friend class CGUIPropertyGridPropertyViewListBase;
693 friend class CGUIPropertyGridPropertyBase;
694 friend class CGUIPropertyGridPropertyColor;
695 friend class CGUIPropertyItemRadioButton;
696 friend class CGUIPropertyItemSliderDualHandle;
697 friend class CGUIPropertyItemCheckBox;
698 friend class CGUIPropertyItemCategory;
699 friend class CGUIPropertyItemText;
700 friend class CGUIPropertyItemFont;
701 friend class CGUIPropertyItemBase;
702 friend class CGUIPropertyItemRadioButtonGroup;
703 friend class CGUIPropertyGridPropertyRadioButtonGroup;
704 friend class CGUIPropertyItemCheckBox3State;
705 friend class CGUIDialogProperty;
706 friend class CGUIDialogLicenseFeatures;
707 friend class CGUIManagerPropertyItem;
710 DECLARE_MESSAGE_MAP()
711 afx_msg
void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
712 afx_msg BOOL OnMouseWheel(UINT nFlags,
short zDelta, CPoint pt);
713 afx_msg
void OnMouseHWheel(UINT nFlags,
short zDelta, CPoint pt);
714 afx_msg
void OnMouseMove(UINT nFlags, CPoint point);
715 afx_msg
void OnLButtonUp(UINT nFlags, CPoint point);
716 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
717 afx_msg
void OnSetFocus(CWnd* pOldWnd);
718 afx_msg
void OnKillFocus(CWnd* pNewWnd);
719 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
720 afx_msg
void OnRButtonDblClk(UINT nFlags, CPoint point);
721 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
722 virtual
void PreSubclassWindow();
723 virtual BOOL PreTranslateMessage(MSG* pMsg);
724 afx_msg
void OnEnable(BOOL bEnable);
725 afx_msg
void OnCancelMode();
726 afx_msg
void OnDestroy();
727 LRESULT OnScrollBarPosChanged(WPARAM wParam, LPARAM lParam);
728 LRESULT OnSliderOwnerDrawnPosChanged(WPARAM wParam, LPARAM lParam);
729 LRESULT OnSliderOwnerDrawnRedraw(WPARAM wParam, LPARAM lParam);
730 afx_msg BOOL OnNeedTipText(UINT
id, NMHDR* pNMH, LRESULT* pResult);
731 afx_msg
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
732 afx_msg
void OnLButtonDown(UINT nFlags, CPoint point);
733 afx_msg
void OnRButtonDown(UINT nFlags, CPoint point);
734 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
735 afx_msg
void OnHeaderItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
736 afx_msg
void OnLButtonDblClk(UINT nFlags, CPoint point);
737 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
738 afx_msg
void OnTimer(UINT_PTR nIDEvent);
739 afx_msg
void OnNMSheetCellChanged(NMHDR* pNMHDR, LRESULT* pResult);
741 void TrackToolTip(CPoint pt);
742 virtual
void Init() override;
743 virtual
void OnDraw(CDC* pDC) override;
744 virtual
void OnClickButton(CPoint point) override;
Broadcast message class.
Definition FLImagingBase/BroadcastMessage.h:27
Simplified class representing a point.
Definition FLImagingBase/TPoint.h:37
Simplified class representing a rectangle.
Definition FLImagingBase/TRect.h:37
FLImaging module execution result object.
Definition FLImagingBase/ResultsDef.h:1712
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 FLImagingGUI/DefinitionsGUI.h:15514
ESizeMode
Specifies how a UI element's size is determined.
Definition FLImagingGUI/DefinitionsGUI.h:16476
@ ESizeMode_Ratio
Ratio-based size.
Definition FLImagingGUI/DefinitionsGUI.h:16508
@ ESizeMode_Fixed
Fixed size (e.g., pixel-based).
Definition FLImagingGUI/DefinitionsGUI.h:16497
EOrientation
Direction.
Definition FLImagingGUI/DefinitionsGUI.h:9905
@ EOrientation_Vertical
a vertical direction
Definition FLImagingGUI/DefinitionsGUI.h:9912
EAppendPosition
Definition FLImagingGUI/DefinitionsGUI.h:15534
EGUIControlState
Enumeration for GUI control states.
Definition FLImagingGUI/DefinitionsGUI.h:16318