4 * @brief Declaration file for CDirColsDlg
6 * @date Created: 2003-08-19
8 // RCS ID line follows -- this is updated by CVS
12 #if !defined(AFX_DIRCOLSDLG_H__2FCB576C_C609_4623_8C55_F3870F22CA0B__INCLUDED_)
13 #define AFX_DIRCOLSDLG_H__2FCB576C_C609_4623_8C55_F3870F22CA0B__INCLUDED_
17 /////////////////////////////////////////////////////////////////////////////
21 * @brief Dialog to choose & order columns to be shown in dirview of differing files
23 class CDirColsDlg : public CDialog
32 column() : log_col(-1), phy_col(-1) { } /**< default constructor for use in CArray */
33 column(LPCTSTR sz, LPCTSTR dsc, int log, int phy) : name(sz), desc(dsc), log_col(log), phy_col(phy) { }
35 typedef CArray<column, column> ColumnArray;
39 CDirColsDlg(CWnd* pParent = NULL); // standard constructor
40 void AddColumn(CString name, CString desc, int log, int phy=-1)
41 { column c(name, desc, log, phy); m_cols.Add(c); }
42 void AddDefColumn(CString name, int log, int phy=-1)
43 { column c(name, _T(""), log, phy); m_defCols.Add(c); }
44 const ColumnArray & GetColumns() const { return m_cols; }
47 //{{AFX_DATA(CDirColsDlg)
48 enum { IDD = IDD_DIRCOLS };
56 // ClassWizard generated virtual function overrides
57 //{{AFX_VIRTUAL(CDirColsDlg)
59 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
62 // Implementation methods
66 void MoveItems(CListBox * list1, CListBox * list2, bool top);
68 void SortArrayToLogicalOrder();
69 static int cmpcols(const void * el1, const void * el2);
71 // Implementation data
74 ColumnArray m_defCols;
76 // Generated message map functions
77 //{{AFX_MSG(CDirColsDlg)
78 virtual BOOL OnInitDialog();
80 afx_msg void OnDown();
82 afx_msg void OnRemove();
84 afx_msg void OnDefaults();
85 afx_msg void OnLbnSelchangeListShow();
86 afx_msg void OnLbnSelchangeListHide();
91 //{{AFX_INSERT_LOCATION}}
92 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
94 #endif // !defined(AFX_DIRCOLSDLG_H__2FCB576C_C609_4623_8C55_F3870F22CA0B__INCLUDED_)