Fix typos
[TortoiseGit.git] / src / TortoiseProc / SubmoduleDiffDlg.h
blob4387cc4fa753357809004ae6b0d6ec0c853e5998
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012, 2014, 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.
19 #pragma once
20 #include "HorizontalResizableStandAloneDialog.h"
21 #include "resource.h"
22 #include "MenuButton.h"
23 #include "GitDiff.h"
25 class CSubmoduleDiffDlg : public CHorizontalResizableStandAloneDialog
27 DECLARE_DYNAMIC(CSubmoduleDiffDlg)
29 public:
30 CSubmoduleDiffDlg(CWnd* pParent = nullptr);
31 virtual ~CSubmoduleDiffDlg();
33 enum { IDD = IDD_DIFFSUBMODULE };
35 void SetDiff(CString path, bool toIsWorkingCopy, const CGitHash& fromHash, CString fromSubject, bool fromOK, const CGitHash& toHash, CString toSubject, bool toOK, bool dirty, CGitDiff::ChangeType changeType);
36 bool IsRefresh() const { return m_bRefresh; }
38 static HBRUSH GetInvalidBrush(CDC* pDC);
39 static HBRUSH GetChangeTypeBrush(CDC* pDC, const CGitDiff::ChangeType& changeType);
41 protected:
42 void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support
43 BOOL OnInitDialog() override;
44 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
45 BOOL PreTranslateMessage(MSG* pMsg) override;
47 afx_msg void OnBnClickedLog();
48 afx_msg void OnBnClickedLog2();
49 afx_msg void OnBnClickedShowDiff();
50 afx_msg void OnBnClickedButtonUpdate();
51 void ShowLog(CString hash);
52 CMenuButton m_ctrlShowDiffBtn;
54 DECLARE_MESSAGE_MAP()
56 bool m_bToIsWorkingCopy;
57 CString m_sPath;
59 CGitHash m_sFromHash;
60 CString m_sFromSubject;
61 bool m_bFromOK;
62 CGitHash m_sToHash;
63 CString m_sToSubject;
64 bool m_bToOK;
65 bool m_bDirty;
66 CGitDiff::ChangeType m_nChangeType;
67 bool m_bRefresh;