Apply backgroundcolors.patch
[TortoiseGit.git] / src / TortoiseMerge / LineDiffBar.h
blob4c4b27030eae759aba087bdec5a663573ec837b6
1 // TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2023 - TortoiseGit
4 // Copyright (C) 2006, 2008 - 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.
20 #pragma once
22 class CMainFrame;
24 /**
25 * \ingroup TortoiseMerge
27 * A Toolbar showing the differences in the views. The Toolbar
28 * is best attached to the left of the mainframe. The Toolbar
29 * also scrolls the views to the location the user clicks
30 * on the bar.
32 class CLineDiffBar : public CPaneDialog
34 DECLARE_DYNAMIC(CLineDiffBar)
36 public:
37 CLineDiffBar();
38 virtual ~CLineDiffBar();
39 BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)
41 BOOL bRet = CPaneDialog::Create(pParentWnd, nIDTemplate, nStyle, nID);
42 m_dwControlBarStyle = 0; // can't float, resize, close, slide
43 return bRet;
46 CSize CalcFixedLayout(BOOL, BOOL)
48 return CSize(32767, 2*m_nLineHeight);
51 void ShowLines(int nLineIndex);
52 void DocumentUpdated();
54 protected:
55 afx_msg void OnPaint();
56 afx_msg void OnSize(UINT nType, int cx, int cy);
57 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
59 CBitmap* m_pCacheBitmap = nullptr;
61 int m_nLineIndex = -1;
62 int m_nLineHeight = 0;
65 DECLARE_MESSAGE_MAP()
66 public:
67 CMainFrame* m_pMainFrm = nullptr;