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"
30 * \ingroup TortoiseProc
31 * Helper class extending CToolBar, needed only to have the toolbar include
34 class CRevGraphToolBar
: public CToolBar
37 CComboBoxEx m_ZoomCombo
;
41 * \ingroup TortoiseProc
42 * A dialog showing a revision graph.
44 * The analyzation of the log data is done in the child class CRevisionGraph,
45 * the drawing is done in the member class CRevisionGraphWnd
46 * Here, we handle window messages.
48 class CRevisionGraphDlg
: public CResizableStandAloneDialog
50 DECLARE_DYNAMIC(CRevisionGraphDlg
)
52 CRevisionGraphDlg(CWnd
* pParent
= NULL
); // standard constructor
53 virtual ~CRevisionGraphDlg();
54 enum { IDD
= IDD_REVISIONGRAPH
};
57 void SetPath(const CString
& sPath
) {m_Graph
.m_sPath
= sPath
;}
58 // void SetPegRevision(SVNRev revision) {m_Graph.m_pegRev = revision;}
59 void DoZoom (float factor
);
61 void UpdateFullHistory();
62 void StartWorkerThread();
64 void StartHidden() { m_bVisible
= false; }
65 void SetOutputFile(const CString
& path
) { m_outputPath
= path
; }
66 CString
GetOutputFile() const { return m_outputPath
; }
67 // void SetOptions(DWORD options) { m_Graph.m_state.GetOptions()->SetRegistryFlags(options, 0x407fbf); }
71 char m_szTip
[MAX_TT_LENGTH
+1];
72 wchar_t m_wszTip
[MAX_TT_LENGTH
+1];
78 BOOL
InitializeToolbar();
80 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
81 virtual BOOL
OnInitDialog();
82 virtual void OnCancel();
84 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
85 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
86 afx_msg
void OnViewFilter();
87 afx_msg
void OnViewZoomin();
88 afx_msg
void OnViewZoomout();
89 afx_msg
void OnViewZoom100();
90 afx_msg
void OnViewZoomHeight();
91 afx_msg
void OnViewZoomWidth();
92 afx_msg
void OnViewZoomAll();
93 afx_msg
void OnViewCompareheadrevisions();
94 afx_msg
void OnViewComparerevisions();
95 afx_msg
void OnViewUnifieddiff();
96 afx_msg
void OnViewUnifieddiffofheadrevisions();
97 afx_msg
void OnViewShowoverview();
98 afx_msg
void OnFileSavegraphas();
99 afx_msg
void OnMenuexit();
100 afx_msg
void OnMenuhelp();
101 afx_msg
void OnChangeZoom();
102 afx_msg BOOL
OnToggleOption (UINT controlID
);
103 afx_msg BOOL
OnToggleReloadOption (UINT controlID
);
104 afx_msg BOOL
OnToggleRedrawOption (UINT controlID
);
105 afx_msg BOOL
OnToolTipNotify (UINT id
, NMHDR
*pNMHDR
, LRESULT
*pResult
);
106 afx_msg
void OnWindowPosChanging(WINDOWPOS
* lpwndpos
);
108 DECLARE_MESSAGE_MAP()
110 BOOL
ToggleOption (UINT controlID
);
111 void SetOption (UINT controlID
);
113 CRect
GetGraphRect();
114 void UpdateStatusBar();
117 void UpdateZoomBox();
118 void UpdateOptionAvailability (UINT id
, bool available
);
119 void UpdateOptionAvailability();
124 CRevisionGraphWnd m_Graph
;
125 CStatusBarCtrl m_StatusBar
;
126 CRevGraphToolBar m_ToolBar
;
128 CString m_outputPath
;
129 ULONG_PTR m_gdiPlusToken
;
130 CComPtr
<ITaskbarList3
> m_pTaskbarList
;