Fix checkout failure when running clone with libgit2 without specifying local branch...
[TortoiseGit.git] / src / TortoiseMerge / LocatorBar.h
blob462249db40e2e6f64b5a17b73cc1ae0477a8d065
1 // TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2006-2010, 2012 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include "registry.h"
22 class CMainFrame;
23 class CBaseView;
25 /**
26 * \ingroup TortoiseMerge
28 * A Toolbar showing the differences in the views. The Toolbar
29 * is best attached to the left of the mainframe. The Toolbar
30 * also scrolls the views to the location the user clicks
31 * on the bar.
33 class CLocatorBar : public CPaneDialog
35 DECLARE_DYNAMIC(CLocatorBar)
37 public:
38 CLocatorBar();
39 virtual ~CLocatorBar();
40 BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)
42 BOOL bRet = CPaneDialog::Create(pParentWnd, nIDTemplate, nStyle, nID);
43 m_dwControlBarStyle = 0; // can't float, resize, close, slide
44 return bRet;
47 void DocumentUpdated();
49 protected:
50 afx_msg void OnPaint();
51 afx_msg void OnSize(UINT nType, int cx, int cy);
52 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
53 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
54 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
55 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
56 afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
57 void ScrollOnMouseMove(const CPoint& point );
58 void ScrollViewToLine(CBaseView* view, int nLine) const;
59 void PaintView(CDC& cacheDC, CBaseView* view, CDWordArray& indents, CDWordArray& states,
60 const CRect& rect, int stripeIndex);
61 void DrawFishEye(CDC& dc, const CRect& rect );
62 void DocumentUpdated(CBaseView* view, CDWordArray& indents, CDWordArray& states);
64 CBitmap * m_pCacheBitmap;
66 int m_nLines;
67 CPoint m_MousePos;
68 CDWordArray m_arLeftIdent;
69 CDWordArray m_arLeftState;
70 CDWordArray m_arRightIdent;
71 CDWordArray m_arRightState;
72 CDWordArray m_arBottomIdent;
73 CDWordArray m_arBottomState;
75 CRegDWORD m_regUseFishEye;
76 DECLARE_MESSAGE_MAP()
77 public:
78 CMainFrame * m_pMainFrm;