1
// TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2011, 2015-2017, 2019-2020, 2023 - TortoiseGit
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #include "GitRevLoglist.h"
24 #include "GestureEnabledControl.h"
25 #include "DockablePaneUnscaledStoredState.h"
27 class CPropertiesToolBar
: public CMFCToolBar
30 virtual void OnUpdateCmdUI(CFrameWnd
* /*pTarget*/, BOOL bDisableIfNoHndler
) override
32 CMFCToolBar::OnUpdateCmdUI(static_cast<CFrameWnd
*>(GetOwner()), bDisableIfNoHndler
);
35 virtual BOOL
AllowShowOnList() const override
{ return FALSE
; }
38 class CPropertiesWnd
: public CDockablePaneUnscaledStoredState
48 void SetVSDotNetLook(BOOL bSet
)
50 m_wndPropList
.SetVSDotNetLook(bSet
);
51 m_wndPropList
.SetGroupNameFullWidth(bSet
);
54 // rev=nullptr, means clear properties info;
55 void UpdateProperties(GitRevLoglist
* rev
= nullptr);
59 CGestureEnabledControlTmpl
<CMFCPropertyGridCtrl
> m_wndPropList
;
64 virtual ~CPropertiesWnd();
67 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct
);
68 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
69 afx_msg
void OnSetFocus(CWnd
* pOldWnd
);
70 afx_msg
void OnSettingChange(UINT uFlags
, LPCWSTR lpszSection
);
71 afx_msg
void OnContextMenu(CWnd
* pWnd
, CPoint point
);
76 void SetPropListFont();
78 CMFCPropertyGridProperty
* m_CommitHash
= nullptr;
79 CMFCPropertyGridProperty
* m_AuthorName
= nullptr;
80 CMFCPropertyGridProperty
* m_AuthorDate
= nullptr;
81 CMFCPropertyGridProperty
* m_AuthorEmail
= nullptr;
83 CMFCPropertyGridProperty
* m_CommitterName
= nullptr;
84 CMFCPropertyGridProperty
* m_CommitterEmail
= nullptr;
85 CMFCPropertyGridProperty
* m_CommitterDate
= nullptr;
87 CMFCPropertyGridProperty
* m_Subject
= nullptr;
88 CMFCPropertyGridProperty
* m_Body
= nullptr;
90 CMFCPropertyGridProperty
* m_ParentGroup
= nullptr;
91 CMFCPropertyGridProperty
* m_BaseInfoGroup
= nullptr;
93 std::vector
<CMFCPropertyGridProperty
*> m_ParentHash
;
94 std::vector
<CMFCPropertyGridProperty
*> m_ParentSubject
;
96 void SetTheme(bool bDark
);
97 int m_themeCallbackId
= 0;