OSDN Git Service

Improve plugin system (#797)
[winmerge-jp/winmerge-jp.git] / Src / HexMergeFrm.h
index fb7d4a1..d7dcc81 100644 (file)
@@ -1,35 +1,21 @@
 /////////////////////////////////////////////////////////////////////////////
 //    WinMerge:  an interactive diff/merge utility
 //    Copyright (C) 1997  Dean P. Grimm
-//
-//    This program is free software; you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation; either version 2 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program; if not, write to the Free Software
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
+//    SPDX-License-Identifier: GPL-2.0-or-later
 /////////////////////////////////////////////////////////////////////////////
 /** 
- * @file  ChildFrm.h
+ * @file  HexMergeFrm.h
  *
  * @brief interface of the CHexMergeFrame class
  *
  */
-// ID line follows -- this is updated by SVN
-// $Id: HexMergeFrm.h 7166 2010-05-16 12:05:13Z jtuc $
+#pragma once
 
 #include "SplitterWndEx.h"
 #include "EditorFilepathBar.h"
+#include "MergeFrameCommon.h"
 
-#define HEKSEDIT_INTERFACE_VERSION 1
+#define HEKSEDIT_INTERFACE_VERSION 2
 #include "heksedit.h"
 
 class CHexMergeDoc;
@@ -37,7 +23,7 @@ class CHexMergeDoc;
 /** 
  * @brief Frame class for file compare, handles panes, statusbar etc.
  */
-class CHexMergeFrame : public CMDIChildWnd
+class CHexMergeFrame : public CMergeFrameCommon
 {
        DECLARE_DYNCREATE(CHexMergeFrame)
 public:
@@ -46,24 +32,23 @@ public:
 // Operations
 public:
        void UpdateResources();
-       void CloseNow();
        IHeaderBar * GetHeaderInterface();
-       void SetSharedMenu(HMENU hMenu) { m_hMenuShared = hMenu; };
        CHexMergeDoc * GetMergeDoc() { return m_pMergeDoc; }
-       void SetLastCompareResult(int nResult);
 
        void UpdateAutoPaneResize();
        void UpdateSplitter();
-
+       int GetActivePane();
+       void SetActivePane(int nPane);
 
 // Attributes
 protected:
        CSplitterWndEx m_wndSplitter;
        CEditorFilePathBar m_wndFilePathBar;
        CStatusBar m_wndStatusBar[3];
+       SCROLLINFO m_HScrollInfo[3];
+       SCROLLINFO m_VScrollInfo[3];
 // Overrides
 public:
-       virtual void GetMessageString(UINT nID, CString& rMessage) const;
        // ClassWizard generated virtual function overrides
        //{{AFX_VIRTUAL(CHexMergeFrame)
        public:
@@ -76,17 +61,16 @@ public:
 // Implementation
 private:
        void SavePosition();
+       void SaveActivePane();
        virtual ~CHexMergeFrame();
        void CreateHexWndStatusBar(CStatusBar &, CWnd *);
 // Generated message map functions
 private:
-       int m_nLastSplitPos;
        void UpdateHeaderSizes();
        CHexMergeDoc * m_pMergeDoc;
-       HICON m_hIdentical;
-       HICON m_hDifferent;
 
        //{{AFX_MSG(CHexMergeFrame)
+       afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
        afx_msg void OnSize(UINT nType, int cx, int cy);
        afx_msg void OnIdleUpdateCmdUI();
        afx_msg LRESULT OnStorePaneSizes(WPARAM wParam, LPARAM lParam);
@@ -94,7 +78,8 @@ private:
        DECLARE_MESSAGE_MAP()
 };
 
-/////////////////////////////////////////////////////////////////////////////
+inline IHeaderBar *CHexMergeFrame::GetHeaderInterface()
+{
+       return &m_wndFilePathBar;
+}
 
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Developer Studio will insert additional declarations immediately before the previous line.