OSDN Git Service

84d8bf9952a4abb32580c54e2ed187834b60ffec
[winmerge-jp/winmerge-jp.git] / Src / SelectUnpackerDlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 //    WinMerge:  an interactive diff/merge utility
3 //    Copyright (C) 1997-2000  Thingamahoochie Software
4 //    Author: Dean Grimm
5 //    SPDX-License-Identifier: GPL-2.0-or-later
6 /////////////////////////////////////////////////////////////////////////////
7 /**
8  *  @file SelectUnpackerDlg.h : 
9  *
10  *  @brief Declaration file for the dialog SelectUnpacker
11  */ 
12 #pragma once
13
14 #include <vector>
15 #include <memory>
16 #include "TrDialogs.h"
17 #include "UnicodeString.h"
18
19 /////////////////////////////////////////////////////////////////////////////
20 // CSelectUnpackerDlgDlg dialog
21
22 class PackingInfo;
23 class PluginInfo;
24
25 class CSelectUnpackerDlg : public CTrDialog
26 {
27 private:
28 // Construction
29         void Initialize();
30
31 public:
32 // Construction
33         CSelectUnpackerDlg(const String& filename, CWnd* pParent /*= nullptr*/);
34         CSelectUnpackerDlg(const String& filename1, const String& filename2, CWnd* pParent /*= nullptr*/);
35         ~CSelectUnpackerDlg();
36
37         void SetInitialInfoHandler(PackingInfo * infoHandler);
38         const PackingInfo GetInfoHandler();
39
40 // Dialog Data
41         //{{AFX_DATA(CSelectUnpackerDlg)
42         enum { IDD = IDD_PLUGINS_SELECTUNPACKER };
43         CComboBox       m_cboUnpackerName;
44         bool    m_bNoExtensionCheck;
45         String  m_strDescription;
46         String  m_strExtensions;
47         //}}AFX_DATA
48
49
50 // Overrides
51         // ClassWizard generated virtual function overrides
52         //{{AFX_VIRTUAL(CSelectUnpackerDlg)
53         protected:
54         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
55         //}}AFX_VIRTUAL
56
57 // Implementation
58 protected:
59         /// arrays for string describing the available plugins
60         CPtrArray  m_UnpackerPlugins;
61
62         // const data "no plugin"
63         std::unique_ptr<PluginInfo> noPlugin;
64         // const data "automatic plugin"
65         std::unique_ptr<PluginInfo> automaticPlugin;
66
67         // input value
68         String m_filteredFilenames;
69
70         /// current plugin choice
71         PluginInfo * m_pPlugin;
72         /// current plugin choice
73         String m_strPluginName;
74
75         void prepareListbox();
76
77         // Generated message map functions
78         //{{AFX_MSG(CSelectUnpackerDlg)
79         virtual void OnOK();
80         virtual BOOL OnInitDialog() override;
81         afx_msg void OnUnpackerAllowAll();
82         afx_msg void OnSelchangeUnpackerName();
83         //}}AFX_MSG
84         DECLARE_MESSAGE_MAP()
85 };