1 /////////////////////////////////////////////////////////////////////////////
2 // WinMerge: an interactive diff/merge utility
3 // Copyright (C) 1997 Dean P. Grimm
4 // SPDX-License-Identifier: GPL-2.0-or-later
5 /////////////////////////////////////////////////////////////////////////////
7 * @file MergeStatusBar.h
9 * @brief Interface of the CMergeStatusBar class.
14 #include "MergeEditStatus.h"
15 #include "OptionsDiffColors.h"
16 #include "UnicodeString.h"
18 class CMergeStatusBar : public CStatusBar
24 BOOL Create(CWnd* pParentWnd);
25 void Resize(int widths[]);
26 void SetPaneCount(int nPanes) { m_nPanes = nPanes; }
27 void UpdateResources();
28 IMergeEditStatus* GetIMergeEditStatus(int nPane) { return &m_status[nPane]; }
29 void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
32 DECLARE_MESSAGE_MAP();
35 // this dialog uses custom edit boxes
37 COLORSETTINGS m_cachedColors;
39 unsigned m_dispFlags[4];
42 // Object that displays status line info for one side of a merge view
43 class MergeStatus : public IMergeEditStatus
48 // Implement MergeEditStatus
49 void SetLineInfo(LPCTSTR szLine, int nColumn, int nColumns,
50 int nChar, int nChars, int nSelectedLines, int nSelectedChars, LPCTSTR szEol, int nCodepage, bool bHasBom) override;
51 void UpdateResources();
55 CMergeStatusBar* m_pWndStatusBar;
56 int m_base; /**< 0 for left, 1 for right */
59 int m_nColumn; /**< Current column, tab-expanded */
60 int m_nColumns; /**< Amount of columns, tab-expanded */
61 int m_nChar; /**< Current char */
62 int m_nChars; /**< Amount of chars in line */
69 String m_sCodepageName;
71 friend class MergeStatus; // MergeStatus accesses status bar
72 MergeStatus m_status[3];