1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2009, 2011 - TortoiseSVN
4 // Copyright (C) 2012 - 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.
21 #include "StandAloneDlg.h"
22 //#include "RevisionGraph/AllGraphOptions.h"
23 #include "ProgressDlg.h"
25 #include "RevisionGraphWnd.h"
26 #include "StandAloneDlg.h"
29 * \ingroup TortoiseProc
30 * Helper class extending CToolBar, needed only to have the toolbar include
33 class CRevGraphToolBar
: public CToolBar
36 CComboBoxEx m_ZoomCombo
;
40 * \ingroup TortoiseProc
41 * A dialog showing a revision graph.
43 * The analyzation of the log data is done in the child class CRevisionGraph,
44 * the drawing is done in the member class CRevisionGraphWnd
45 * Here, we handle window messages.
47 class CRevisionGraphDlg
: public CResizableStandAloneDialog
49 DECLARE_DYNAMIC(CRevisionGraphDlg
)
51 CRevisionGraphDlg(CWnd
* pParent
= NULL
); // standard constructor
52 virtual ~CRevisionGraphDlg();
53 enum { IDD
= IDD_REVISIONGRAPH
};
56 void SetPath(const CString
& sPath
) {m_Graph
.m_sPath
= sPath
;}
57 // void SetPegRevision(SVNRev revision) {m_Graph.m_pegRev = revision;}
58 void DoZoom (float factor
);
60 void UpdateFullHistory();
61 void StartWorkerThread();
63 void StartHidden() { m_bVisible
= false; }
64 void SetOutputFile(const CString
& path
) { m_outputPath
= path
; }
65 CString
GetOutputFile() const { return m_outputPath
; }
66 // void SetOptions(DWORD options) { m_Graph.m_state.GetOptions()->SetRegistryFlags(options, 0x407fbf); }
70 char m_szTip
[MAX_TT_LENGTH
+1];
71 wchar_t m_wszTip
[MAX_TT_LENGTH
+1];
77 BOOL
InitializeToolbar();
79 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
80 virtual BOOL
OnInitDialog();
81 virtual void OnCancel();
83 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
84 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
85 afx_msg
void OnViewFilter();
86 afx_msg
void OnViewZoomin();
87 afx_msg
void OnViewZoomout();
88 afx_msg
void OnViewZoom100();
89 afx_msg
void OnViewZoomHeight();
90 afx_msg
void OnViewZoomWidth();
91 afx_msg
void OnViewZoomAll();
92 afx_msg
void OnViewCompareheadrevisions();
93 afx_msg
void OnViewComparerevisions();
94 afx_msg
void OnViewUnifieddiff();
95 afx_msg
void OnViewUnifieddiffofheadrevisions();
96 afx_msg
void OnViewShowoverview();
97 afx_msg
void OnFileSavegraphas();
98 afx_msg
void OnMenuexit();
99 afx_msg
void OnMenuhelp();
100 afx_msg
void OnChangeZoom();
101 afx_msg BOOL
OnToggleOption (UINT controlID
);
102 afx_msg BOOL
OnToggleReloadOption (UINT controlID
);
103 afx_msg BOOL
OnToggleRedrawOption (UINT controlID
);
104 afx_msg BOOL
OnToolTipNotify (UINT id
, NMHDR
*pNMHDR
, LRESULT
*pResult
);
105 afx_msg
void OnWindowPosChanging(WINDOWPOS
* lpwndpos
);
107 DECLARE_MESSAGE_MAP()
109 BOOL
ToggleOption (UINT controlID
);
110 void SetOption (UINT controlID
);
112 CRect
GetGraphRect();
113 void UpdateStatusBar();
116 void UpdateZoomBox();
117 void UpdateOptionAvailability (UINT id
, bool available
);
118 void UpdateOptionAvailability();
123 CRevisionGraphWnd m_Graph
;
124 CStatusBarCtrl m_StatusBar
;
125 CRevGraphToolBar m_ToolBar
;
127 CString m_outputPath
;
128 ULONG_PTR m_gdiPlusToken
;
129 CComPtr
<ITaskbarList3
> m_pTaskbarList
;