1
// TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2023 - TortoiseGit
4 // Copyright (C) 2006-2010, 2012, 2015, 2020 - TortoiseSVN
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.
27 * \ingroup TortoiseMerge
29 * A Toolbar showing the differences in the views. The Toolbar
30 * is best attached to the left of the mainframe. The Toolbar
31 * also scrolls the views to the location the user clicks
34 class CLocatorBar
: public CPaneDialog
36 DECLARE_DYNAMIC(CLocatorBar
)
40 virtual ~CLocatorBar();
41 BOOL
Create(CWnd
* pParentWnd
, UINT nIDTemplate
, UINT nStyle
, UINT nID
)
43 BOOL bRet
= CPaneDialog::Create(pParentWnd
, nIDTemplate
, nStyle
, nID
);
44 m_dwControlBarStyle
= 0; // can't float, resize, close, slide
47 m_minWidth
= rc
.Width();
51 void DocumentUpdated();
54 virtual CSize
CalcFixedLayout(BOOL bStretch
, BOOL bHorz
);
55 afx_msg
void OnPaint();
56 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
57 afx_msg BOOL
OnEraseBkgnd(CDC
* pDC
);
58 afx_msg
void OnLButtonDown(UINT nFlags
, CPoint point
);
59 afx_msg
void OnMouseMove(UINT nFlags
, CPoint point
);
60 afx_msg
void OnLButtonUp(UINT nFlags
, CPoint point
);
61 afx_msg LRESULT
OnMouseLeave(WPARAM wParam
, LPARAM lParam
);
62 void ScrollOnMouseMove(const CPoint
& point
);
63 void ScrollViewToLine(CBaseView
* view
, int nLine
) const;
64 void PaintView(CDC
& cacheDC
, CBaseView
* view
, CDWordArray
& indents
, CDWordArray
& states
,
65 const CRect
& rect
, int stripeIndex
);
66 void DrawFishEye(CDC
& dc
, const CRect
& rect
);
67 void DocumentUpdated(CBaseView
* view
, CDWordArray
& indents
, CDWordArray
& states
);
68 void SetTheme(bool bDark
);
70 CBitmap
* m_pCacheBitmap
= nullptr;
75 CDWordArray m_arLeftIdent
;
76 CDWordArray m_arLeftState
;
77 CDWordArray m_arRightIdent
;
78 CDWordArray m_arRightState
;
79 CDWordArray m_arBottomIdent
;
80 CDWordArray m_arBottomState
;
82 CRegDWORD m_regUseFishEye
;
84 int m_themeCallbackId
= 0;
87 CMainFrame
* m_pMainFrm
= nullptr;