-
Notifications
You must be signed in to change notification settings - Fork 0
/
PropertiesWnd.h
82 lines (69 loc) · 2.38 KB
/
PropertiesWnd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
// (the "Fluent UI") and is provided only as referential material to supplement the
// Microsoft Foundation Classes Reference and related electronic documentation
// included with the MFC C++ library software.
// License terms to copy, use or distribute the Fluent UI are available separately.
// To learn more about our Fluent UI licensing program, please visit
// http://msdn.microsoft.com/officeui.
//
// Copyright (C) Microsoft Corporation
// All rights reserved.
#pragma once
#include "Element.h"
class CPropertiesToolBar : public CMFCToolBar
{
public:
virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
{
CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
}
virtual BOOL AllowShowOnList() const { return FALSE; }
};
class CPropertiesWnd : public CDockablePane
{
// Construction
public:
CPropertiesWnd();
void AdjustLayout();
// Attributes
public:
void SetVSDotNetLook(BOOL bSet)
{
m_wndPropList.SetVSDotNetLook(bSet);
m_wndPropList.SetGroupNameFullWidth(bSet);
}
CElementManager * m_pManager;
CElementManager * GetManager() const
{
return m_pManager;
}
protected:
CFont m_fntPropList;
CComboBox m_wndObjectCombo;
CPropertiesToolBar m_wndToolBar;
CMFCPropertyGridCtrl m_wndPropList;
// Implementation
public:
virtual ~CPropertiesWnd();
void SetManager(CElementManager * pManager);
void UpdateProperties(std::shared_ptr<CElement> pObj);
void UpdateProperty(std::wstring strNameToFind, COleVariant vNewValue);
BOOL GetProperty(std::wstring name, std::wstring & value);
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnExpandAllProperties();
afx_msg void OnUpdateExpandAllProperties(CCmdUI* pCmdUI);
afx_msg void OnSortProperties();
afx_msg void OnUpdateSortProperties(CCmdUI* pCmdUI);
afx_msg void OnProperties1();
afx_msg void OnUpdateProperties1(CCmdUI* pCmdUI);
afx_msg void OnProperties2();
afx_msg void OnUpdateProperties2(CCmdUI* pCmdUI);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
afx_msg LRESULT OnPropertyChanged(WPARAM,LPARAM);
DECLARE_MESSAGE_MAP()
void InitPropList();
void SetPropListFont();
};