Drop unused code
[TortoiseGit.git] / src / TortoiseProc / RevisionGraph / RevisionGraphDlg.h
blob4dc93b2f4a0b3c543dbb003d8b1d70948d8ccdfa
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2009, 2011 - TortoiseSVN
4 // Copyright (C) 2012, 2018 - 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.
20 #pragma once
21 #include "StandAloneDlg.h"
22 //#include "RevisionGraph/AllGraphOptions.h"
23 #include "ProgressDlg.h"
24 #include "Colors.h"
25 #include "RevisionGraphWnd.h"
26 #include "StandAloneDlg.h"
28 /**
29 * \ingroup TortoiseProc
30 * Helper class extending CToolBar, needed only to have the toolbar include
31 * a combobox.
33 class CRevGraphToolBar : public CToolBar
35 public:
36 CComboBoxEx m_ZoomCombo;
39 /**
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)
50 public:
51 CRevisionGraphDlg(CWnd* pParent = nullptr); // 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; }
67 protected:
68 bool m_bFetchLogs;
69 char m_szTip[MAX_TT_LENGTH+1];
70 wchar_t m_wszTip[MAX_TT_LENGTH+1];
72 CString m_sFilter;
74 HACCEL m_hAccel;
76 BOOL InitializeToolbar();
78 virtual void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support
79 virtual BOOL OnInitDialog() override;
80 virtual void OnCancel() override;
81 virtual void OnOK() override;
82 virtual BOOL PreTranslateMessage(MSG* pMsg) override;
83 afx_msg void OnSize(UINT nType, int cx, int cy);
84 afx_msg void OnViewFilter();
85 afx_msg void OnViewZoomin();
86 afx_msg void OnViewZoomout();
87 afx_msg void OnViewZoom100();
88 afx_msg void OnViewZoomHeight();
89 afx_msg void OnViewZoomWidth();
90 afx_msg void OnViewZoomAll();
91 afx_msg void OnViewCompareheadrevisions();
92 afx_msg void OnViewComparerevisions();
93 afx_msg void OnViewUnifieddiff();
94 afx_msg void OnViewUnifieddiffofheadrevisions();
95 afx_msg void OnViewShowoverview();
96 afx_msg void OnFileSavegraphas();
97 afx_msg void OnMenuexit();
98 afx_msg void OnMenuhelp();
99 afx_msg void OnChangeZoom();
100 afx_msg BOOL OnToolTipNotify (UINT id, NMHDR *pNMHDR, LRESULT *pResult);
101 afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
103 DECLARE_MESSAGE_MAP()
105 CRect GetGraphRect();
106 void UpdateStatusBar();
108 private:
109 void UpdateZoomBox();
111 bool UpdateData();
113 float m_fZoomFactor;
114 CRevisionGraphWnd m_Graph;
115 CStatusBarCtrl m_StatusBar;
116 CRevGraphToolBar m_ToolBar;
117 bool m_bVisible;
118 CString m_outputPath;
119 ULONG_PTR m_gdiPlusToken;
120 CComPtr<ITaskbarList3> m_pTaskbarList;