OSDN Git Service

85d955d131f2288d5fcfda7904c6e5d1d8ac1dba
[winmerge-jp/winmerge-jp.git] / Src / MergeEditFrm.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  MergeEditFrm.h
8  *
9  * @brief interface of the CMergeEditFrame class
10  *
11  */
12 #pragma once
13
14 #include "SplitterWndEx.h"
15 #include "MergeEditSplitterView.h"
16 #include "MergeStatusBar.h"
17 #include "EditorFilepathBar.h"
18 #include "DiffViewBar.h"
19 #include "LocationBar.h"
20 #include "MergeFrameCommon.h"
21
22 class CMergeDoc;
23
24 /** 
25  * @brief Frame class for file compare, handles panes, statusbar etc.
26  */
27 class CMergeEditFrame : public CMergeFrameCommon
28 {
29         DECLARE_DYNCREATE(CMergeEditFrame)
30 public:
31         CMergeEditFrame();
32
33 // Operations
34 public:
35         void UpdateResources();
36         void CloseNow();
37         IHeaderBar * GetHeaderInterface();
38         CMergeDoc * GetMergeDoc() { return m_pMergeDoc; }
39
40         void UpdateAutoPaneResize();
41         void UpdateSplitter();
42         CSplitterWndEx& GetSplitter() { return m_wndSplitter; };
43
44 // Attributes
45 protected:
46         CSplitterWndEx m_wndSplitter;
47         CEditorFilePathBar m_wndFilePathBar;
48         CDiffViewBar m_wndDetailBar;
49         CMergeEditSplitterView *m_pwndDetailMergeEditSplitterView;
50         CMergeStatusBar m_wndStatusBar;
51         CLocationBar m_wndLocationBar;
52
53 // Overrides
54 public:
55         // ClassWizard generated virtual function overrides
56         //{{AFX_VIRTUAL(CMergeEditFrame)
57         public:
58         virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
59         virtual void ActivateFrame(int nCmdShow = -1);
60         virtual BOOL DestroyWindow();
61         protected:
62         //}}AFX_VIRTUAL
63
64 // Implementation
65 private:
66         bool EnsureValidDockState(CDockState& state);
67         void SavePosition();
68         void SaveActivePane();
69         virtual ~CMergeEditFrame();
70         CSplitterWndEx& GetMergeEditSplitterWnd(int iRow)
71         { return static_cast<CMergeEditSplitterView *>(m_wndSplitter.GetPane(iRow, 0))->m_wndSplitter; }
72
73 // Generated message map functions
74 private:
75         void UpdateHeaderSizes();
76         CMergeDoc * m_pMergeDoc;
77
78         //{{AFX_MSG(CMergeEditFrame)
79         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
80         afx_msg void OnClose();
81         afx_msg void OnTimer(UINT_PTR nIDEvent);
82         afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
83         afx_msg void OnViewSplitVertically();
84         afx_msg void OnUpdateViewSplitVertically(CCmdUI* pCmdUI);
85         afx_msg LRESULT OnStorePaneSizes(WPARAM wParam, LPARAM lParam);
86         afx_msg void OnSize(UINT nType, int cx, int cy);
87         afx_msg void OnIdleUpdateCmdUI();
88         //}}AFX_MSG
89         DECLARE_MESSAGE_MAP()
90 };