1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2003-2008 - TortoiseSVN
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
20 #include "StandAloneDlg.h"
\r
21 #include "RevisionGraph/AllGraphOptions.h"
\r
22 #include "ProgressDlg.h"
\r
24 #include "RevisionGraphWnd.h"
\r
25 #include "StandAloneDlg.h"
\r
28 * \ingroup TortoiseProc
\r
29 * Helper class extending CToolBar, needed only to have the toolbar include
\r
32 class CRevGraphToolBar : public CToolBar
\r
35 CComboBoxEx m_ZoomCombo;
\r
39 * \ingroup TortoiseProc
\r
40 * A dialog showing a revision graph.
\r
42 * The analyzation of the log data is done in the child class CRevisionGraph,
\r
43 * the drawing is done in the member class CRevisionGraphWnd
\r
44 * Here, we handle window messages.
\r
46 class CRevisionGraphDlg : public CResizableStandAloneDialog
\r
48 DECLARE_DYNAMIC(CRevisionGraphDlg)
\r
50 CRevisionGraphDlg(CWnd* pParent = NULL); // standard constructor
\r
51 virtual ~CRevisionGraphDlg();
\r
52 enum { IDD = IDD_REVISIONGRAPH };
\r
55 void SetPath(const CString& sPath) {m_Graph.m_sPath = sPath;}
\r
56 void SetPegRevision(SVNRev revision) {m_Graph.m_pegRev = revision;}
\r
57 void DoZoom (float factor);
\r
59 void UpdateFullHistory();
\r
60 void StartWorkerThread();
\r
64 char m_szTip[MAX_TT_LENGTH+1];
\r
65 wchar_t m_wszTip[MAX_TT_LENGTH+1];
\r
71 BOOL InitializeToolbar();
\r
73 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
\r
74 virtual BOOL OnInitDialog();
\r
75 virtual void OnCancel();
\r
76 virtual void OnOK();
\r
77 virtual BOOL PreTranslateMessage(MSG* pMsg);
\r
78 afx_msg void OnSize(UINT nType, int cx, int cy);
\r
79 afx_msg void OnViewFilter();
\r
80 afx_msg void OnViewZoomin();
\r
81 afx_msg void OnViewZoomout();
\r
82 afx_msg void OnViewZoom100();
\r
83 afx_msg void OnViewZoomHeight();
\r
84 afx_msg void OnViewZoomWidth();
\r
85 afx_msg void OnViewZoomAll();
\r
86 afx_msg void OnViewCompareheadrevisions();
\r
87 afx_msg void OnViewComparerevisions();
\r
88 afx_msg void OnViewUnifieddiff();
\r
89 afx_msg void OnViewUnifieddiffofheadrevisions();
\r
90 afx_msg void OnViewShowoverview();
\r
91 afx_msg void OnFileSavegraphas();
\r
92 afx_msg void OnMenuexit();
\r
93 afx_msg void OnMenuhelp();
\r
94 afx_msg void OnChangeZoom();
\r
95 afx_msg BOOL OnToggleOption (UINT controlID);
\r
96 afx_msg BOOL OnToggleReloadOption (UINT controlID);
\r
97 afx_msg BOOL OnToggleRedrawOption (UINT controlID);
\r
98 afx_msg BOOL OnToolTipNotify (UINT id, NMHDR *pNMHDR, LRESULT *pResult);
\r
100 DECLARE_MESSAGE_MAP()
\r
102 BOOL ToggleOption (UINT controlID);
\r
103 void SetOption (UINT controlID);
\r
105 CRect GetGraphRect();
\r
106 void UpdateStatusBar();
\r
109 void UpdateZoomBox();
\r
110 void UpdateOptionAvailability (UINT id, bool available);
\r
111 void UpdateOptionAvailability();
\r
113 static UINT WorkerThread(LPVOID pVoid);
\r
115 float m_fZoomFactor;
\r
116 CRevisionGraphWnd m_Graph;
\r
117 CStatusBarCtrl m_StatusBar;
\r
118 CRevGraphToolBar m_ToolBar;
\r
119 ULONG_PTR m_gdiPlusToken;
\r