OSDN Git Service

Update CWindowsManagerDialog - check some pointers for null and made … (#824) (2)
[winmerge-jp/winmerge-jp.git] / Src / HexMergeFrm.h
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 /////////////////////////////////////////////////////////////////////////////
6 /** 
7  * @file  HexMergeFrm.h
8  *
9  * @brief interface of the CHexMergeFrame class
10  *
11  */
12 #pragma once
13
14 #include "SplitterWndEx.h"
15 #include "EditorFilepathBar.h"
16 #include "MergeFrameCommon.h"
17
18 #define HEKSEDIT_INTERFACE_VERSION 2
19 #include "heksedit.h"
20
21 class CHexMergeDoc;
22
23 /** 
24  * @brief Frame class for file compare, handles panes, statusbar etc.
25  */
26 class CHexMergeFrame : public CMergeFrameCommon
27 {
28         DECLARE_DYNCREATE(CHexMergeFrame)
29 public:
30         CHexMergeFrame();
31
32 // Operations
33 public:
34         void UpdateResources();
35         void CloseNow();
36         IHeaderBar * GetHeaderInterface();
37         CHexMergeDoc * GetMergeDoc() { return m_pMergeDoc; }
38
39         void UpdateAutoPaneResize();
40         void UpdateSplitter();
41         int GetActivePane();
42         void SetActivePane(int nPane);
43
44 // Attributes
45 protected:
46         CSplitterWndEx m_wndSplitter;
47         CEditorFilePathBar m_wndFilePathBar;
48         CStatusBar m_wndStatusBar[3];
49         SCROLLINFO m_HScrollInfo[3];
50         SCROLLINFO m_VScrollInfo[3];
51 // Overrides
52 public:
53         // ClassWizard generated virtual function overrides
54         //{{AFX_VIRTUAL(CHexMergeFrame)
55         public:
56         virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
57         virtual void ActivateFrame(int nCmdShow = -1);
58         virtual BOOL DestroyWindow();
59         protected:
60         //}}AFX_VIRTUAL
61
62 // Implementation
63 private:
64         void SavePosition();
65         void SaveActivePane();
66         virtual ~CHexMergeFrame();
67         void CreateHexWndStatusBar(CStatusBar &, CWnd *);
68 // Generated message map functions
69 private:
70         void UpdateHeaderSizes();
71         CHexMergeDoc * m_pMergeDoc;
72
73         //{{AFX_MSG(CHexMergeFrame)
74         afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
75         afx_msg void OnSize(UINT nType, int cx, int cy);
76         afx_msg void OnIdleUpdateCmdUI();
77         afx_msg LRESULT OnStorePaneSizes(WPARAM wParam, LPARAM lParam);
78         //}}AFX_MSG
79         DECLARE_MESSAGE_MAP()
80 };
81
82 inline IHeaderBar *CHexMergeFrame::GetHeaderInterface()
83 {
84         return &m_wndFilePathBar;
85 }
86