Provide (experimental) clang-format file
[TortoiseGit.git] / src / TortoiseShell / GITPropertyPage.h
blobeabbcc64264b6fd60f06f7f69890b4d469bb3301
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2006, 2014 - TortoiseSVN
4 // Copyright (C) 2008-2014, 2018 - TortoiseGit
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
21 #include "ShellUpdater.h"
23 /**
24 * \ingroup TortoiseShell
25 * Displays and updates all controls on the property page. The property
26 * page itself is shown by explorer.
28 class CGitPropertyPage
30 public:
31 CGitPropertyPage(const std::vector<std::wstring>& filenames, CString projectTopDir, bool bIsSubmodule);
32 virtual ~CGitPropertyPage();
34 /**
35 * Sets the window handle.
36 * \param hwnd the handle.
38 virtual void SetHwnd(HWND hwnd);
39 /**
40 * Callback function which receives the window messages of the
41 * property page. See the Win32 API for PropertySheets for details.
43 virtual BOOL PageProc(HWND hwnd, UINT uMessage, WPARAM wParam, LPARAM lParam);
45 const static UINT m_UpdateLastCommit;
47 protected:
48 /**
49 * Initializes the property page.
51 virtual void InitWorkfileView();
52 void DisplayCommit(const git_commit* commit, UINT hashLabel, UINT subjectLabel, UINT authorLabel, UINT dateLabel);
53 static void LogThreadEntry(void *param);
54 int LogThread();
55 void Time64ToTimeString(__time64_t time, TCHAR * buf, size_t buflen) const;
56 void PageProcOnCommand(WPARAM wParam);
57 void RunCommand(const tstring& command);
59 HWND m_hwnd;
60 std::vector<std::wstring> filenames;
61 CString m_ProjectTopDir;
62 int m_iStripLength;
63 bool m_bIsSubmodule;
64 struct
66 bool allAreVersionedItems = false;
67 size_t assumevalid = 0;
68 size_t skipworktree = 0;
69 size_t executable = 0;
70 size_t symlink = 0;
71 size_t submodule = 0;
72 } m_fileStats;
73 /**
74 * Were executable, assumeValid or skip-worktree flags changes
76 bool m_bChanged;