4#include <unordered_map>
5#include "GUIDefinitions.h"
7#define AFX_STRETCH_DELTA 2
14 class CGUIPaneProperties;
17 class CGUIPropertyGridPropertyDropdownList;
18 class CGUIPropertyGridPropertyViewGraphList;
19 class CGUIPropertyGridPropertyViewImageList;
20 class CGUIPropertyGridPropertyView3DList;
21 class CGUIPropertyGridPropertyBase;
22 class CGUIPropertyGridToolTipCtrl;
23 class CGUIPropertyGridPropertyCategory;
24 class CGUIPropertyGridPropertyRadioButtonGroup;
25 class CGUIPropertyGridPropertyRadioButton;
26 class CGUIScrollBarOwnerDrawn;
28 class FL_EXPORT CGUIPropertyGridCtrl :
public CMFCPropertyGridCtrl,
public Base::CFLBase
30 friend class CGUIPropertyGridPropertySliderDualHandle;
31 friend class CGUIPropertyGridPropertySlider;
32 friend class CGUIPropertyGridPropertyDraggableSpin;
33 friend class CGUIDialogPropertyImageFigureDrawingAttribute;
35 CGUIPropertyGridCtrl();
36 virtual ~CGUIPropertyGridCtrl();
38 void SetFontBold(HFONT hfont);
39 void SetFont(HFONT hfont);
40 virtual void AdjustLayout()
override;
42 void GetPropertyByVisibleOrder(std::vector<CMFCPropertyGridProperty*>& vctProps, CMFCPropertyGridProperty* pParent =
nullptr)
const;
44 virtual void SetParentPane(CGUIPaneProperties* pParentPane);
45 virtual CGUIPaneProperties* GetParentPane()
const;
47 virtual void SetParentMainFrame(CGUIMainFrame* pMainFrame);
48 virtual CGUIMainFrame* GetParentMainFrame()
const;
50 virtual const CGUIScrollBarOwnerDrawn* GetOwnerDrawScrollBar(EOrientation eOrientation = EOrientation_Vertical)
const;
52 virtual void SetLeftColumnWidth(int32_t i32LeftColumnWidth);
54 virtual COLORREF GetCustomColorGroupText()
const;
55 virtual void SetCustomColorGroupText(COLORREF color);
57 virtual COLORREF GetCustomColorGroupBackground()
const;
58 virtual void SetCustomColorGroupBackground(COLORREF color);
60 virtual CFont* GetFontBold();
62 virtual void AddToUpdateBuffer(CMFCPropertyGridProperty* pPGP,
const COleVariant& var);
64 virtual CMFCPropertyGridProperty* HitTest(CPoint pt, CMFCPropertyGridProperty::ClickArea* pnArea = NULL, BOOL bPropsOnly = FALSE)
const;
65 virtual void SetAlphabeticMode(BOOL bSet = TRUE);
66 virtual BOOL DeleteProperty(CMFCPropertyGridProperty*& pProp, BOOL bRedraw = TRUE, BOOL bAdjustLayout = TRUE);
68 void EnsureVisible(CMFCPropertyGridProperty* pProp, BOOL bExpandParents = FALSE);
70 virtual void OnClickButton(CPoint point);
72 virtual int GetTotalItemsWithExtraRows(BOOL bIncludeHidden = TRUE)
const;
73 DeclareGetClassType();
77 virtual int OnDrawProperty(CDC* pDC, CMFCPropertyGridProperty* pProp)
const override;
78 virtual int OnDrawProperty(CDC* pDC, CGUIPropertyGridPropertyCategory* pPropCat)
const;
79 virtual int OnDrawProperty(CDC* pDC, CGUIPropertyGridPropertyRadioButtonGroup* pPropRBG)
const;
80 virtual int OnDrawProperty(CDC* pDC, CGUIPropertyGridPropertyRadioButton* pPropRB)
const;
81 static void OnDrawComboDropButton(CDC* pDC, CRect rect, BOOL bDisabled, BOOL bDropped, BOOL bHighlighted, CMFCToolBarComboBoxButton* pButton);
82 static void OnDrawButtonBorder(CDC* pDC, CMFCToolBarButton* pButton, CRect rect, CMFCVisualManager::AFX_BUTTON_STATE state);
83 virtual void OnReceiveBroadcast(
const Base::CBroadcastMessage* pMessage)
override;
84 virtual CList<CMFCPropertyGridProperty*, CMFCPropertyGridProperty*>* GetTopLevelProperties();
86 virtual void SetScrollSizes();
87 virtual void ReposProperties();
90 void RecursivelySetPropertySliderWidth(CMFCPropertyGridProperty* pParent =
nullptr);
93 CMFCPropertyGridProperty* m_pPropLButtonDown;
94 Base::TPoint<int32_t> m_tpPrev;
95 CGUIPaneProperties* m_pParentPane;
96 CGUIMainFrame* m_pParentMainFrame;
97 CGUIPropertyGridPropertyBase* m_pPropertyPrevHit;
98 CGUIPropertyGridToolTipCtrl* m_pIPToolTip;
99 CGUIScrollBarOwnerDrawn* m_pOwnerDrawScrollBarVert;
100 CGUIScrollBarOwnerDrawn* m_pOwnerDrawScrollBarHorz;
101 std::unordered_map<CMFCPropertyGridProperty*, COleVariant>& m_mapUpdateBuffer;
105 friend class CGUIPropertyGridPropertyDropdownList;
106 friend class CGUIPropertyGridPropertyViewListBase;
107 friend class CGUIMenuItemProperty;
108 friend class CGUIPropertyGridPropertyBase;
109 friend class CGUIPropertyGridPropertyColor;
111 DECLARE_MESSAGE_MAP()
112 afx_msg
void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
113 afx_msg BOOL OnMouseWheel(UINT nFlags,
short zDelta, CPoint pt);
114 afx_msg
void OnMouseHWheel(UINT nFlags,
short zDelta, CPoint pt);
115 afx_msg
void OnMouseMove(UINT nFlags, CPoint point);
116 afx_msg
void OnLButtonUp(UINT nFlags, CPoint point);
117 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
118 afx_msg
void OnSetFocus(CWnd* pOldWnd);
119 afx_msg
void OnKillFocus(CWnd* pNewWnd);
120 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
121 afx_msg
void OnRButtonDblClk(UINT nFlags, CPoint point);
122 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
123 virtual
void PreSubclassWindow();
124 virtual BOOL PreTranslateMessage(MSG* pMsg);
125 afx_msg
void OnEnable(BOOL bEnable);
126 afx_msg
void OnCancelMode();
127 afx_msg
void OnDestroy();
128 virtual
void Init()override;
129 virtual
void OnDraw(CDC* pDC) override;
130 LRESULT OnScrollBarPosChanged(WPARAM wParam, LPARAM lParam);
131 LRESULT OnSliderOwnerDrawnPosChanged(WPARAM wParam, LPARAM lParam);
132 LRESULT OnSliderOwnerDrawnRedraw(WPARAM wParam, LPARAM lParam);
133 void TrackToolTip(CPoint pt);
134 afx_msg BOOL OnNeedTipText(UINT
id, NMHDR* pNMH, LRESULT* pResult);
135 afx_msg
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
136 afx_msg
void OnLButtonDown(UINT nFlags, CPoint point);
137 afx_msg
void OnRButtonDown(UINT nFlags, CPoint point);
138 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
139 afx_msg
void OnHeaderItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
140 afx_msg
void OnLButtonDblClk(UINT nFlags, CPoint point);
프로퍼티 아이템 베이스 클래스
Definition GUIPropertyItemBase.h:37
Definition D2DObject.h:12