OSDN Git Service

Merge with stable
[winmerge-jp/winmerge-jp.git] / Src / HexMergeFrm.h
1 /////////////////////////////////////////////////////////////////////////////
2 //    WinMerge:  an interactive diff/merge utility
3 //    Copyright (C) 1997  Dean P. Grimm
4 //
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.
9 //
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.
14 //
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.
18 //
19 /////////////////////////////////////////////////////////////////////////////
20 /** 
21  * @file  ChildFrm.h
22  *
23  * @brief interface of the CHexMergeFrame class
24  *
25  */
26 #pragma once
27
28 #include "SplitterWndEx.h"
29 #include "EditorFilepathBar.h"
30
31 #define HEKSEDIT_INTERFACE_VERSION 1
32 #include "heksedit.h"
33
34 class CHexMergeDoc;
35
36 /** 
37  * @brief Frame class for file compare, handles panes, statusbar etc.
38  */
39 class CHexMergeFrame : public CMDIChildWnd
40 {
41         DECLARE_DYNCREATE(CHexMergeFrame)
42 public:
43         CHexMergeFrame();
44
45 // Operations
46 public:
47         void UpdateResources();
48         void CloseNow();
49         IHeaderBar * GetHeaderInterface();
50         void SetSharedMenu(HMENU hMenu) { m_hMenuShared = hMenu; };
51         CHexMergeDoc * GetMergeDoc() { return m_pMergeDoc; }
52         void SetLastCompareResult(int nResult);
53
54         void UpdateAutoPaneResize();
55         void UpdateSplitter();
56
57
58 // Attributes
59 protected:
60         CSplitterWndEx m_wndSplitter;
61         CEditorFilePathBar m_wndFilePathBar;
62         CStatusBar m_wndStatusBar[3];
63 // Overrides
64 public:
65         // ClassWizard generated virtual function overrides
66         //{{AFX_VIRTUAL(CHexMergeFrame)
67         public:
68         virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
69         virtual void ActivateFrame(int nCmdShow = -1);
70         virtual BOOL DestroyWindow();
71         protected:
72         //}}AFX_VIRTUAL
73
74 // Implementation
75 private:
76         void SavePosition();
77         virtual ~CHexMergeFrame();
78         void CreateHexWndStatusBar(CStatusBar &, CWnd *);
79 // Generated message map functions
80 private:
81         int m_nLastSplitPos;
82         void UpdateHeaderSizes();
83         CHexMergeDoc * m_pMergeDoc;
84         HICON m_hIdentical;
85         HICON m_hDifferent;
86
87         //{{AFX_MSG(CHexMergeFrame)
88         afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
89         afx_msg void OnSize(UINT nType, int cx, int cy);
90         afx_msg void OnIdleUpdateCmdUI();
91         afx_msg LRESULT OnStorePaneSizes(WPARAM wParam, LPARAM lParam);
92         afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
93         //}}AFX_MSG
94         DECLARE_MESSAGE_MAP()
95 };
96
97 /////////////////////////////////////////////////////////////////////////////
98
99 //{{AFX_INSERT_LOCATION}}
100 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.