1 /////////////////////////////////////////////////////////////////////////////
2 // WinMerge: an interactive diff/merge utility
3 // Copyright (C) 1997 Dean P. Grimm
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /////////////////////////////////////////////////////////////////////////////
23 * @brief interface of the CChildFrame class
28 #include "SplitterWndEx.h"
29 #include "MergeEditSplitterView.h"
30 #include "MergeStatusBar.h"
31 #include "EditorFilepathBar.h"
32 #include "DiffViewBar.h"
33 #include "LocationBar.h"
38 * @brief Frame class for file compare, handles panes, statusbar etc.
40 class CChildFrame : public CMDIChildWnd
42 DECLARE_DYNCREATE(CChildFrame)
48 void UpdateResources();
50 IHeaderBar * GetHeaderInterface();
51 void SetSharedMenu(HMENU hMenu) { m_hMenuShared = hMenu; };
52 CMergeDoc * GetMergeDoc() { return m_pMergeDoc; }
53 void SetLastCompareResult(int nResult);
55 void UpdateAutoPaneResize();
56 void UpdateSplitter();
57 CSplitterWndEx& GetSplitter() { return m_wndSplitter; };
61 CSplitterWndEx m_wndSplitter;
62 CEditorFilePathBar m_wndFilePathBar;
63 CDiffViewBar m_wndDetailBar;
64 CMergeEditSplitterView *m_pwndDetailMergeEditSplitterView;
65 CMergeStatusBar m_wndStatusBar;
66 CLocationBar m_wndLocationBar;
70 // ClassWizard generated virtual function overrides
71 //{{AFX_VIRTUAL(CChildFrame)
73 virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
74 virtual void ActivateFrame(int nCmdShow = -1);
75 virtual BOOL DestroyWindow();
81 BOOL EnsureValidDockState(CDockState& state);
83 virtual ~CChildFrame();
84 CSplitterWndEx& GetMergeEditSplitterWnd(int iRow)
85 { return static_cast<CMergeEditSplitterView *>(m_wndSplitter.GetPane(iRow, 0))->m_wndSplitter; }
87 // Generated message map functions
89 int m_nLastSplitPos[2];
90 void UpdateHeaderSizes();
92 CMergeDoc * m_pMergeDoc;
96 //{{AFX_MSG(CChildFrame)
97 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
98 afx_msg void OnClose();
99 afx_msg void OnTimer(UINT_PTR nIDEvent);
100 afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
101 afx_msg void OnViewSplitVertically();
102 afx_msg void OnUpdateViewSplitVertically(CCmdUI* pCmdUI);
103 afx_msg LRESULT OnStorePaneSizes(WPARAM wParam, LPARAM lParam);
104 afx_msg void OnSize(UINT nType, int cx, int cy);
105 afx_msg void OnIdleUpdateCmdUI();
106 afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
108 DECLARE_MESSAGE_MAP()