OSDN Git Service

Improve plugin system (#797)
[winmerge-jp/winmerge-jp.git] / Src / MainFrm.h
index e30f9c8..8063201 100644 (file)
@@ -43,6 +43,7 @@ typedef CTypedPtrList<CPtrList, CDirDoc *> DirDocList;
 typedef CTypedPtrList<CPtrList, CHexMergeDoc *> HexMergeDocList;
 
 class PackingInfo;
+class PrediffingInfo;
 class CLanguageSelect;
 struct IMergeDoc;
 
@@ -85,15 +86,17 @@ public:
        HMENU NewImgMergeViewMenu();
        HMENU NewOpenViewMenu();
        HMENU NewDefaultMenu(int ID = 0);
-       HMENU GetScriptsSubmenu(HMENU mainMenu);
        HMENU GetPrediffersSubmenu(HMENU mainMenu);
        void UpdatePrediffersMenu();
 
        void FileNew(int nPanes, FRAMETYPE frameType, bool table);
        bool DoFileOpen(const PathContext *pFiles = nullptr,
-               const DWORD dwFlags[] = nullptr, const String strDesc[] = nullptr, const String& sReportFile = _T(""), bool bRecurse = false, CDirDoc *pDirDoc = nullptr, String prediffer = _T(""), const PackingInfo * infoUnpacker = nullptr);
-       bool DoFileOpen(UINT nID, const PathContext *pFiles = nullptr,
-               const DWORD dwFlags[] = nullptr, const String strDesc[] = nullptr);
+               const DWORD dwFlags[] = nullptr, const String strDesc[] = nullptr,
+               const String& sReportFile = _T(""), bool bRecurse = false, CDirDoc *pDirDoc = nullptr,
+               const PackingInfo * infoUnpacker = nullptr, const PrediffingInfo * infoPrediffer = nullptr);
+       bool DoFileOpen(UINT nID, const PathContext* pFiles = nullptr,
+               const DWORD dwFlags[] = nullptr, const String strDesc[] = nullptr,
+               const String& sReportFile = _T(""), const PackingInfo* infoUnpacker = nullptr);
        bool ShowAutoMergeDoc(CDirDoc * pDirDoc, int nFiles, const FileLocation fileloc[],
                const DWORD dwFlags[], const String strDesc[], const String& sReportFile = _T(""), const PackingInfo * infoUnpacker = nullptr);
        bool ShowMergeDoc(UINT nID, CDirDoc * pDirDoc, int nFiles, const FileLocation fileloc[],
@@ -118,10 +121,13 @@ public:
        void StartFlashing();
        bool AskCloseConfirmation();
        bool DoOpenConflict(const String& conflictFile, const String strDesc[] = nullptr, bool checked = false);
-       bool DoSelfCompare(UINT nID, const String& file, const String strDesc[] = nullptr);
+       bool DoSelfCompare(UINT nID, const String& file, const String strDesc[] = nullptr, const PackingInfo* infoUnpacker = nullptr);
        static FRAMETYPE GetFrameType(const CFrameWnd * pFrame);
        static void UpdateDocTitle();
        static void ReloadMenu();
+       static void AppendPluginMenus(CMenu* pMenu, const String& filteredFilenames,
+               const std::vector<std::wstring> events, bool addAllMenu, unsigned baseId);
+       static String GetPluginPipelineByMenuId(unsigned idSearch, const std::vector<std::wstring> events, unsigned baseId);
        DropHandler *GetDropHandler() const { return m_pDropHandler; }
        const CTypedPtrArray<CPtrArray, CMDIChildWnd*>* GetChildArray() const { return &m_arrChild; }
        IMergeDoc* GetActiveIMergeDoc();
@@ -256,7 +262,7 @@ protected:
        afx_msg void OnPluginUnpackMode(UINT nID);
        afx_msg void OnUpdatePluginPrediffMode(CCmdUI* pCmdUI);
        afx_msg void OnPluginPrediffMode(UINT nID);
-       afx_msg void OnUpdateReloadPlugins(CCmdUI* pCmdUI);
+       afx_msg void OnUpdatePluginRelatedMenu(CCmdUI* pCmdUI);
        afx_msg void OnReloadPlugins();
        afx_msg void OnSaveConfigData();
        template <int nFiles, FRAMETYPE frameType, bool table = false>
@@ -289,12 +295,16 @@ protected:
        afx_msg void OnToolbarButtonDropDown(NMHDR* pNMHDR, LRESULT* pResult);
        afx_msg void OnDiffWhitespace(UINT nID);
        afx_msg void OnUpdateDiffWhitespace(CCmdUI* pCmdUI);
+       afx_msg void OnDiffIgnoreBlankLines();
+       afx_msg void OnUpdateDiffIgnoreBlankLines(CCmdUI* pCmdUI);
        afx_msg void OnDiffIgnoreCase();
        afx_msg void OnUpdateDiffIgnoreCase(CCmdUI* pCmdUI);
        afx_msg void OnDiffIgnoreEOL();
        afx_msg void OnUpdateDiffIgnoreEOL(CCmdUI* pCmdUI);
        afx_msg void OnDiffIgnoreCP();
        afx_msg void OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI);
+       afx_msg void OnDiffIgnoreComments();
+       afx_msg void OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI);
        afx_msg void OnIncludeSubfolders();
        afx_msg void OnUpdateIncludeSubfolders(CCmdUI* pCmdUI);
        afx_msg void OnCompareMethod(UINT nID);