* @brief Declaration file for CMainFrame
*
*/
-// ID line follows -- this is updated by SVN
-// $Id: MainFrm.h 6940 2009-08-01 17:29:01Z kimmov $
-
-#if !defined(AFX_MAINFRM_H__BBCD4F8C_34E4_11D1_BAA6_00A024706EDC__INCLUDED_)
-#define AFX_MAINFRM_H__BBCD4F8C_34E4_11D1_BAA6_00A024706EDC__INCLUDED_
+#pragma once
#include <vector>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-#include "ToolBarXPThemes.h"
+#include <memory>
#include "MDITabBar.h"
#include "PathContext.h"
class LineFiltersList;
class TempFile;
struct FileLocation;
+class SourceControl;
+class DropHandler;
-typedef boost::shared_ptr<TempFile> TempFilePtr;
+typedef std::shared_ptr<TempFile> TempFilePtr;
// typed lists (homogenous pointer lists)
typedef CTypedPtrList<CPtrList, COpenDoc *> OpenDocList;
{
FRAME_FOLDER, /**< Folder compare frame. */
FRAME_FILE, /**< File compare frame. */
+ FRAME_HEXFILE, /**< Hex file compare frame. */
+ FRAME_IMGFILE, /**< Image file compare frame. */
FRAME_OTHER, /**< No frame? */
};
HMENU NewDirViewMenu();
HMENU NewMergeViewMenu();
HMENU NewHexMergeViewMenu();
+ HMENU NewImgMergeViewMenu();
HMENU NewOpenViewMenu();
HMENU NewDefaultMenu(int ID = 0);
HMENU GetScriptsSubmenu(HMENU mainMenu);
HMENU GetPrediffersSubmenu(HMENU mainMenu);
void UpdatePrediffersMenu();
- BOOL DoFileOpen(PathContext *pFiles = NULL,
- DWORD dwFlags[] = NULL, bool bRecurse = false, CDirDoc *pDirDoc = NULL, String prediffer = _T(""), PackingInfo * infoUnpacker = NULL);
+ BOOL DoFileOpen(const PathContext *pFiles = NULL,
+ const DWORD dwFlags[] = NULL, bool bRecurse = false, CDirDoc *pDirDoc = NULL, String prediffer = _T(""), const PackingInfo * infoUnpacker = NULL);
+ int ShowAutoMergeDoc(CDirDoc * pDirDoc, int nFiles, const FileLocation fileloc[],
+ const DWORD dwFlags[], const PackingInfo * infoUnpacker = NULL);
int ShowMergeDoc(CDirDoc * pDirDoc, int nFiles, const FileLocation fileloc[],
- DWORD dwFlags[], PackingInfo * infoUnpacker = NULL);
+ const DWORD dwFlags[], const PackingInfo * infoUnpacker = NULL);
void ShowHexMergeDoc(CDirDoc * pDirDoc,
- const PathContext &paths, bool bRO[]);
+ const PathContext &paths, const bool bRO[]);
+ int ShowImgMergeDoc(CDirDoc * pDirDoc, int nFiles, const FileLocation fileloc[],
+ const DWORD dwFlags[], const PackingInfo * infoUnpacker = NULL);
+
void UpdateResources();
CString SetStatus(LPCTSTR status);
void ClearStatusbarItemCount();
void ApplyDiffOptions();
- void ApplyViewWhitespace();
- void SetEOLMixed(BOOL bAllow);
void SelectFilter();
void StartFlashing();
bool AskCloseConfirmation();
BOOL DoOpenConflict(const String& conflictFile, bool checked = false);
FRAMETYPE GetFrameType(const CFrameWnd * pFrame) const;
+ void UpdateDocTitle();
+ void ReloadMenu();
// Overrides
virtual void GetMessageString(UINT nID, CString& rMessage) const;
protected:
virtual ~CMainFrame();
+
// Public implementation data
public:
BOOL m_bFirstTime; /**< If first time frame activated, get pos from reg */
// control bar embedded members
CStatusBar m_wndStatusBar;
CReBar m_wndReBar;
- ToolBarXPThemes m_wndToolBar;
- CComboBox m_ctlCompareMethod;
+ CToolBar m_wndToolBar;
CMDITabBar m_wndTabBar;
/** @brief Toolbar image table indexes. */
MENU_MERGEVIEW,
MENU_DIRVIEW,
MENU_HEXMERGEVIEW,
+ MENU_IMGMERGEVIEW,
MENU_OPENVIEW,
MENU_COUNT, // Add new items before this item
};
static const MENUITEM_ICON m_MenuIcons[];
- boost::scoped_ptr<BCMenu> m_pMenus[MENU_COUNT]; /**< Menus for different views */
+ std::unique_ptr<BCMenu> m_pMenus[MENU_COUNT]; /**< Menus for different views */
std::vector<TempFilePtr> m_tempFiles; /**< List of possibly needed temp files. */
+ DropHandler *m_pDropHandler;
// Generated message map functions
protected:
- virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//{{AFX_MSG(CMainFrame)
afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu) ;
afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
- afx_msg void OnOptionsShowDifferent();
- afx_msg void OnOptionsShowIdentical();
- afx_msg void OnOptionsShowUniqueLeft();
- afx_msg void OnOptionsShowUniqueRight();
- afx_msg void OnOptionsShowBinaries();
- afx_msg void OnOptionsShowSkipped();
- afx_msg void OnUpdateOptionsShowdifferent(CCmdUI* pCmdUI);
- afx_msg void OnUpdateOptionsShowidentical(CCmdUI* pCmdUI);
- afx_msg void OnUpdateOptionsShowuniqueleft(CCmdUI* pCmdUI);
- afx_msg void OnUpdateOptionsShowuniqueright(CCmdUI* pCmdUI);
- afx_msg void OnUpdateOptionsShowBinaries(CCmdUI* pCmdUI);
- afx_msg void OnUpdateOptionsShowSkipped(CCmdUI* pCmdUI);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnFileOpen();
afx_msg void OnHelpGnulicense();
afx_msg void OnHelpContents();
afx_msg void OnUpdateHelpContents(CCmdUI* pCmdUI);
afx_msg void OnClose();
- afx_msg void OnViewWhitespace();
- afx_msg void OnUpdateViewWhitespace(CCmdUI* pCmdUI);
afx_msg void OnToolsGeneratePatch();
- afx_msg void OnDropFiles(HDROP dropInfo);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
+ afx_msg void OnDropFiles(const std::vector<String>& files);
afx_msg void OnUpdatePluginUnpackMode(CCmdUI* pCmdUI);
afx_msg void OnPluginUnpackMode(UINT nID);
afx_msg void OnUpdatePluginPrediffMode(CCmdUI* pCmdUI);
afx_msg void OnFileNew();
afx_msg void OnFileNew3();
afx_msg void OnToolsFilters();
- afx_msg void OnHelpMerge7zmismatch();
- afx_msg void OnUpdateHelpMerge7zmismatch(CCmdUI* pCmdUI);
afx_msg void OnViewStatusBar();
afx_msg void OnViewToolbar();
afx_msg void OnUpdateViewTabBar(CCmdUI* pCmdUI);
afx_msg void OnToolbarBig();
afx_msg void OnUpdateToolbarBig(CCmdUI* pCmdUI);
afx_msg BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnHelpReleasenotes();
- afx_msg void OnHelpTranslations();
+ afx_msg void OnHelpCheckForUpdates();
afx_msg void OnFileOpenConflict();
afx_msg void OnPluginsList();
afx_msg void OnUpdatePluginName(CCmdUI* pCmdUI);
afx_msg void OnUpdateDiffCaseSensitive(CCmdUI* pCmdUI);
afx_msg void OnDiffIgnoreEOL();
afx_msg void OnUpdateDiffIgnoreEOL(CCmdUI* pCmdUI);
- afx_msg void OnSelectCompareMethod();
+ afx_msg void OnIncludeSubfolders();
+ afx_msg void OnUpdateIncludeSubfolders(CCmdUI* pCmdUI);
+ afx_msg void OnCompareMethod(UINT nID);
+ afx_msg void OnUpdateCompareMethod(CCmdUI* pCmdUI);
+ afx_msg void OnMRUs(UINT nID);
+ afx_msg void OnUpdateNoMRUs(CCmdUI* pCmdUI);
+ afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void addToMru(LPCTSTR szItem, LPCTSTR szRegSubKey, UINT nMaxItems = 20);
void FileNew(int nPanes);
- const OpenDocList &GetAllOpenDocs();
- const MergeDocList &GetAllMergeDocs();
- const DirDocList &GetAllDirDocs();
- const HexMergeDocList &GetAllHexMergeDocs();
- void RedisplayAllDirDocs();
- CMergeDoc * GetMergeDocToShow(int nFiles, CDirDoc * pDirDoc, BOOL * pNew);
- CHexMergeDoc * GetHexMergeDocToShow(int nDirs, CDirDoc * pDirDoc, BOOL * pNew);
- CDirDoc * GetDirDocToShow(int nDirs, BOOL * pNew);
+ OpenDocList &GetAllOpenDocs();
+ MergeDocList &GetAllMergeDocs();
+ DirDocList &GetAllDirDocs();
+ HexMergeDocList &GetAllHexMergeDocs();
void UpdateFont(FRAMETYPE frame);
BOOL CreateToolbar();
BOOL CreateComboBoxOnToolbar();
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_MAINFRM_H__BBCD4F8C_34E4_11D1_BAA6_00A024706EDC__INCLUDED_)