3 #include "HintListCtrl.h"
\r
5 #include "resource.h"
\r
7 #include "ProjectProperties.h"
\r
8 #include "StandAloneDlg.h"
\r
9 #include "TGitPath.h"
\r
10 #include "registry.h"
\r
11 #include "SplitterControl.h"
\r
13 #include "MenuButton.h"
\r
14 #include "LogDlgHelper.h"
\r
15 #include "FilterEdit.h"
\r
17 #include "Tooltip.h"
\r
18 #include "HintListCtrl.h"
\r
19 #include "GitLogList.h"
\r
24 #if (NTDDI_VERSION < NTDDI_LONGHORN)
\r
26 enum LISTITEMSTATES_MINE {
\r
31 LISS_SELECTEDNOTFOCUS = 5,
\r
32 LISS_HOTSELECTED = 6,
\r
35 #define MCS_NOTRAILINGDATES 0x0040
\r
36 #define MCS_SHORTDAYSOFWEEK 0x0080
\r
37 #define MCS_NOSELCHANGEONNAV 0x0100
\r
39 #define DTM_SETMCSTYLE (DTM_FIRST + 11)
\r
43 #define ICONITEMBORDER 5
\r
45 #define GITLOG_START 0
\r
46 #define GITLOG_END 100
\r
48 typedef void CALLBACK_PROCESS(void * data, int progress);
\r
50 class CGitLogList : public CHintListCtrl
\r
52 DECLARE_DYNAMIC(CGitLogList)
\r
56 virtual ~CGitLogList();
\r
57 volatile LONG m_bNoDispUpdates;
\r
58 BOOL m_bStrictStopped;
\r
59 BOOL m_bShowBugtraqColumn;
\r
60 BOOL m_bSearchIndex;
\r
64 volatile LONG m_bThreadRunning;
\r
74 LOGLIST_MESSAGE_MAX=250
\r
79 // needs to start with 1, since 0 is the return value if *nothing* is clicked on in the context menu
\r
109 ID_COMPAREWITHPREVIOUS,
\r
110 ID_BLAMEWITHPREVIOUS,
\r
118 void InsertGitColumn();
\r
119 void ResizeAllListCtrlCols();
\r
120 void CopySelectionToClipBoard(bool hashonly=FALSE);
\r
121 void DiffSelectedRevWithPrevious();
\r
122 bool IsSelectionContinuous();
\r
124 inline int ShownCountWithStopped() const { return (int)m_arShownList.GetCount() + (m_bStrictStopped ? 1 : 0); }
\r
125 int FetchLogAsync(CALLBACK_PROCESS *proc=NULL, void * data=NULL);
\r
126 CPtrArray m_arShownList;
\r
129 DECLARE_MESSAGE_MAP()
\r
130 afx_msg void OnNMCustomdrawLoglist(NMHDR *pNMHDR, LRESULT *pResult);
\r
131 afx_msg void OnLvnGetdispinfoLoglist(NMHDR *pNMHDR, LRESULT *pResult);
\r
132 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
\r
133 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
\r
134 void OnNMDblclkLoglist(NMHDR * /*pNMHDR*/, LRESULT *pResult);
\r
135 afx_msg void OnLvnOdfinditemLoglist(NMHDR *pNMHDR, LRESULT *pResult);
\r
136 void PreSubclassWindow();
\r
137 virtual BOOL PreTranslateMessage(MSG* pMsg);
\r
138 static UINT LogThreadEntry(LPVOID pVoid);
\r
140 void FillBackGround(HDC hdc, int Index,CRect &rect);
\r
141 void DrawTagBranch(HDC,CRect &rect,INT_PTR index);
\r
142 void DrawGraph(HDC,CRect &rect,INT_PTR index);
\r
144 BOOL GetShortName(CString ref, CString &shortname,CString prefix);
\r
145 void paintGraphLane(HDC hdc,int laneHeight, int type, int x1, int x2,
\r
146 const COLORREF& col,int top) ;
\r
147 void DrawLine(HDC hdc, int x1, int y1, int x2, int y2){::MoveToEx(hdc,x1,y1,NULL);::LineTo(hdc,x2,y2);}
\r
152 HICON m_hModifiedIcon;
\r
153 HICON m_hReplacedIcon;
\r
154 HICON m_hAddedIcon;
\r
155 HICON m_hDeletedIcon;
\r
159 CRegDWORD m_regMaxBugIDColWidth;
\r
160 int m_nSearchIndex;
\r
161 CLogDataVector m_logEntries;
\r
162 CALLBACK_PROCESS *m_ProcCallBack;
\r
164 CStoreSelection* m_pStoreSelection;
\r
165 MAP_HASH_NAME m_HashMap;
\r