Provide (experimental) clang-format file
[TortoiseGit.git] / src / TortoiseProc / GitTagCompareList.h
blob3f8f4e9003c9d8aadf5a81e840565946b42a1b95
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2015-2017 - 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 // GitLogList.cpp : implementation file
21 #pragma once
22 #include "HintCtrl.h"
23 #include "GitHash.h"
25 class CGitTagCompareList : public CHintCtrl<CListCtrl>
27 DECLARE_DYNAMIC(CGitTagCompareList);
29 struct TagEntry
31 CString name;
32 CString diffstate;
33 CGitHash myHash;
34 CString myMessage;
35 CGitHash theirHash;
36 CString theirMessage;
39 public:
40 CGitTagCompareList();
42 virtual ~CGitTagCompareList()
46 void Init();
48 int Fill(const CString& remote, CString& err);
50 protected:
51 afx_msg void OnHdnItemclick(NMHDR* pNMHDR, LRESULT* pResult);
52 afx_msg void OnContextMenu(CWnd *pWnd, CPoint point);
53 void OnContextMenuList(CWnd *pWnd, CPoint point);
54 void OnContextMenuHeader(CWnd *pWnd, CPoint point);
55 virtual ULONG GetGestureStatus(CPoint ptTouch) override;
57 DECLARE_MESSAGE_MAP()
59 void AddEntry(git_repository* repo, const CString& tag, const CGitHash* myHash, const CGitHash* theirHash);
60 void Show();
62 private:
63 std::vector<TagEntry> m_TagList;
64 BOOL m_bHideEqual;
65 static BOOL m_bSortLogical;
67 CString m_remote;
69 int colTag;
70 int colDiff;
71 int colMyHash;
72 int colMyMessage;
73 int colTheirHash;
74 int colTheirMessage;
76 bool m_bAscending; ///< sort direction
77 int m_nSortedColumn; ///< which column to sort