Fixed issue #4126: Capitalize the first letter in the Push dialog
[TortoiseGit.git] / src / TortoiseProc / PatchListCtrl.h
blobe8ea1a22743da0b38e9db25dda92048ca9f65751
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2009-2011, 2015-2016, 2018, 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
22 // CPatchListCtrl
24 class CPatchListCtrl : public CListCtrl
26 DECLARE_DYNAMIC(CPatchListCtrl)
28 public:
29 CPatchListCtrl();
30 virtual ~CPatchListCtrl();
31 DWORD m_ContextMenuMask = DWORD_MAX;
32 enum
34 MENU_SENDMAIL=1,
35 MENU_VIEWPATCH,
36 MENU_VIEWWITHMERGE,
37 MENU_APPLY
40 enum
42 STATUS_NONE,
43 STATUS_APPLYING = 0x10000,
44 STATUS_APPLY_RETRY = 0x1,
45 STATUS_APPLY_FAIL = 0x2,
46 STATUS_APPLY_SUCCESS =0x4,
47 STATUS_APPLY_SKIP=0x8,
48 STATUS_MASK = 0xFFFF,
51 static constexpr DWORD GetMenuMask(int x) noexcept { return 1 << x; }
53 CFont m_boldFont;
55 protected:
56 DECLARE_MESSAGE_MAP()
57 void PreSubclassWindow() override;
59 public:
60 afx_msg void OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult);
61 afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);
62 int LaunchProc(const CString& cmd);
63 afx_msg void OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult);
64 afx_msg void OnDropFiles(HDROP hDropInfo);