Add Miss file
[TortoiseGit.git] / src / TortoiseShell / SVNPropertyPage.h
blob57e101b3bde06f33dbfc53a45f94f8f33556b0da
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2006 - Stefan Kueng
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 "ShellUpdater.h"
22 #define ListView_GetItemTextEx(hwndLV, i, iSubItem_, __buf) \
23 { \
24 int nLen = 1024;\
25 int nRes;\
26 LV_ITEM _ms_lvi;\
27 _ms_lvi.iSubItem = iSubItem_;\
28 do\
30 nLen += 2;\
31 _ms_lvi.cchTextMax = nLen;\
32 if (__buf)\
33 delete[] __buf;\
34 __buf = new TCHAR[nLen];\
35 _ms_lvi.pszText = __buf;\
36 nRes = (int)::SendMessage((hwndLV), LVM_GETITEMTEXT, (WPARAM)(i), (LPARAM)(LV_ITEM *)&_ms_lvi);\
37 } while (nRes == nLen-1);\
39 #define GetDlgItemTextEx(hwndDlg, _id, __buf) \
41 int nLen = 1024;\
42 int nRes;\
43 do\
45 nLen *= 2;\
46 if (__buf)\
47 delete [] __buf;\
48 __buf = new TCHAR[nLen];\
49 nRes = GetDlgItemText(hwndDlg, _id, __buf, nLen);\
50 } while (nRes == nLen-1);\
53 /**
54 * \ingroup TortoiseShell
55 * Displays and updates all controls on the property page. The property
56 * page itself is shown by explorer.
58 class CGitPropertyPage
60 public:
61 CGitPropertyPage(const std::vector<stdstring> &filenames);
62 virtual ~CGitPropertyPage();
64 /**
65 * Sets the window handle.
66 * \param hwnd the handle.
68 virtual void SetHwnd(HWND hwnd);
69 /**
70 * Callback function which receives the window messages of the
71 * property page. See the Win32 API for PropertySheets for details.
73 virtual BOOL PageProc(HWND hwnd, UINT uMessage, WPARAM wParam, LPARAM lParam);
75 protected:
76 /**
77 * Initializes the property page.
79 virtual void InitWorkfileView();
80 void Time64ToTimeString(__time64_t time, TCHAR * buf, size_t buflen);
82 struct listproperty
84 stdstring name;
85 std::string value;
86 int count;
88 HWND m_hwnd;
89 std::vector<stdstring> filenames;
90 std::map<stdstring, std::string> propmap;
91 TCHAR stringtablebuffer[255];