Index: src/ch/CustomCopyDlg.h =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -r0d5b67ee96b435d63f7bf075dc8e28603793b187 --- src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) @@ -19,83 +19,51 @@ #ifndef __CUSTOMCOPYDLG_H__ #define __CUSTOMCOPYDLG_H__ -#include "DataBuffer.h" -#include "FileFilter.h" -#include "charvect.h" +#include "CDragDropListCtrl.h" +#include "CDragDropComboEx.h" +#include "../libchengine/TTaskDefinition.h" ///////////////////////////////////////////////////////////////////////////// // CCustomCopyDlg dialog +namespace chengine { + class TFileFilter; +} + class CCustomCopyDlg : public ictranslate::CLanguageDialog { // Construction public: CCustomCopyDlg(); // standard constructor + explicit CCustomCopyDlg(const chengine::TTaskDefinition& rTaskDefinition); - void SetBuffersizesString(); - - struct _CCDATA - { - CStringArray m_astrPaths; // source paths to copy/move - CString m_strDestPath; // currently selected destination path - char_vector m_vRecent; // recently selected paths - int m_iOperation; // copy || move - int m_iPriority; // operation priority - BYTE m_ucCount; // count of copys - BUFFERSIZES m_bsSizes; // buffer sizes selected for this task - - CFiltersArray m_afFilters; // list of filters to select from combos - - bool m_bIgnoreFolders; - bool m_bForceDirectories; - bool m_bCreateStructure; - } m_ccData; - - bool m_bActualisation; // is this dialog processing the combo text changing ? -// Dialog Data - //{{AFX_DATA(CCustomCopyDlg) - enum { IDD = IDD_CUSTOM_COPY_DIALOG }; - CComboBoxEx m_ctlDstPath; - CSpinButtonCtrl m_ctlCountSpin; - CListCtrl m_ctlFilters; - CListBox m_ctlBufferSizes; - CComboBox m_ctlOperation; - CComboBox m_ctlPriority; - CListCtrl m_ctlFiles; - BYTE m_ucCount; - BOOL m_bOnlyCreate; - BOOL m_bIgnoreFolders; - BOOL m_bForceDirectories; - BOOL m_bFilters; - BOOL m_bAdvanced; - //}}AFX_DATA - // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CCustomCopyDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL +protected: + void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support // Implementation protected: - virtual void OnLanguageChanged(); - void UpdateDialog(); + void OnLanguageChanged() override; + + void UpdateFilesListCtrlHeaderWidth(); + void UpdateComboIcon(); - void SetComboPath(LPCTSTR lpszText); void EnableControls(); - void AddFilter(const CFileFilter& rFilter, int iPos=-1); + void AddFilter(const chengine::TFileFilter& rFilter, int iPos=-1); void AddPath(CString strPath); - CImageList m_ilImages; + void SetBuffersizesString(); + + bool HasBasicTaskData(); + void UpdateInternalTaskDefinition(); + // Generated message map functions - //{{AFX_MSG(CCustomCopyDlg) - virtual BOOL OnInitDialog(); + BOOL OnInitDialog() override; afx_msg void OnAddDirectoryButton(); afx_msg void OnAddFilesButton(); afx_msg void OnRemoveButton(); afx_msg void OnBrowseButton(); - virtual void OnOK(); + void OnOK() override; afx_msg void OnChangebufferButton(); afx_msg void OnAddfilterButton(); afx_msg void OnRemovefilterButton(); @@ -109,11 +77,29 @@ afx_msg void OnImportButton(); afx_msg void OnIgnorefoldersCheck(); afx_msg void OnForcedirectoriesCheck(); - //}}AFX_MSG + afx_msg void OnExportButtonClicked(); + afx_msg void OnSize(UINT nType, int cx, int cy); + DECLARE_MESSAGE_MAP() -}; -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. +public: + chengine::TTaskDefinition m_tTaskDefinition; + std::vector m_vRecent; // recently selected paths + CDragDropComboEx m_ctlDstPath; + CListCtrl m_ctlFilters; + CListBox m_ctlBufferSizes; + CComboBox m_ctlOperation; + CComboBox m_ctlPriority; + CDragDropListCtrl m_ctlFiles; + CImageList m_ilImages; + + bool m_bActualisation = false; // is this dialog processing the combo text changing ? + BOOL m_bOnlyCreate = FALSE; + BOOL m_bIgnoreFolders = FALSE; + BOOL m_bForceDirectories = FALSE; + BOOL m_bFilters = FALSE; + BOOL m_bAdvanced = FALSE; +}; + #endif