OSDN Git Service

Add WinMergePluginBase.h (2)
[winmerge-jp/winmerge-jp.git] / Src / OpenDoc.cpp
1 // OpenDoc.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "OpenDoc.h"
6 #include "OpenView.h"
7 #include "OptionsDef.h"
8 #include "OptionsMgr.h"
9 #include "MergeApp.h"
10
11 // COpenDoc
12
13 IMPLEMENT_DYNCREATE(COpenDoc, CDocument)
14
15 COpenDoc::COpenDoc() :
16         m_bRecurse(false)
17 ,       m_dwFlags()
18 ,       m_infoHandler{}
19 {
20 }
21
22 BOOL COpenDoc::OnNewDocument()
23 {
24         if (!CDocument::OnNewDocument())
25                 return FALSE;
26         return TRUE;
27 }
28
29 COpenDoc::~COpenDoc()
30 {
31 }
32
33 void COpenDoc::RefreshOptions()
34 {
35         m_bRecurse = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
36         UpdateAllViews(nullptr);
37 }
38
39 /**
40  * @brief Update any resources necessary after a GUI language change
41  */
42 void COpenDoc::UpdateResources()
43 {
44         SetTitle(_("Select Files or Folders").c_str());
45         POSITION pos = GetFirstViewPosition();
46         COpenView *pView = static_cast<COpenView *>(GetNextView(pos));
47         pView->UpdateResources();
48 }
49
50 BEGIN_MESSAGE_MAP(COpenDoc, CDocument)
51 END_MESSAGE_MAP()