1 |
786 |
skrzyp |
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####
|
2 |
|
|
// -------------------------------------------
|
3 |
|
|
// This file is part of the eCos host tools.
|
4 |
|
|
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
5 |
|
|
//
|
6 |
|
|
// This program is free software; you can redistribute it and/or modify
|
7 |
|
|
// it under the terms of the GNU General Public License as published by
|
8 |
|
|
// the Free Software Foundation; either version 2 or (at your option) any
|
9 |
|
|
// later version.
|
10 |
|
|
//
|
11 |
|
|
// This program is distributed in the hope that it will be useful, but
|
12 |
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 |
|
|
// General Public License for more details.
|
15 |
|
|
//
|
16 |
|
|
// You should have received a copy of the GNU General Public License
|
17 |
|
|
// along with this program; if not, write to the
|
18 |
|
|
// Free Software Foundation, Inc., 51 Franklin Street,
|
19 |
|
|
// Fifth Floor, Boston, MA 02110-1301, USA.
|
20 |
|
|
// -------------------------------------------
|
21 |
|
|
// ####ECOSHOSTGPLCOPYRIGHTEND####
|
22 |
|
|
#if !defined(AFX_RULESLIST_H__AEF48733_8D31_11D3_A535_00A0C949ADAC__INCLUDED_)
|
23 |
|
|
#define AFX_RULESLIST_H__AEF48733_8D31_11D3_A535_00A0C949ADAC__INCLUDED_
|
24 |
|
|
|
25 |
|
|
#if _MSC_VER > 1000
|
26 |
|
|
#pragma once
|
27 |
|
|
#endif // _MSC_VER > 1000
|
28 |
|
|
// PropertiesList.h : header file
|
29 |
|
|
//
|
30 |
|
|
|
31 |
|
|
#define INCLUDEFILE "cdl.hxx"
|
32 |
|
|
#include "IncludeSTL.h"
|
33 |
|
|
|
34 |
|
|
/////////////////////////////////////////////////////////////////////////////
|
35 |
|
|
// CPropertiesList window
|
36 |
|
|
class CConfigItem;
|
37 |
|
|
class CPropertiesList : public CListCtrl
|
38 |
|
|
{
|
39 |
|
|
// Construction
|
40 |
|
|
public:
|
41 |
|
|
CPropertiesList();
|
42 |
|
|
|
43 |
|
|
// Attributes
|
44 |
|
|
public:
|
45 |
|
|
|
46 |
|
|
// Operations
|
47 |
|
|
public:
|
48 |
|
|
|
49 |
|
|
// Overrides
|
50 |
|
|
// ClassWizard generated virtual function overrides
|
51 |
|
|
//{{AFX_VIRTUAL(CPropertiesList)
|
52 |
|
|
//}}AFX_VIRTUAL
|
53 |
|
|
|
54 |
|
|
// Implementation
|
55 |
|
|
public:
|
56 |
|
|
void Fill(CConfigItem *pti);
|
57 |
|
|
enum FieldType {Type, Value, DefaultValue, Macro, File, URL, Enabled, MAXFIELDTYPE};
|
58 |
|
|
int SetItem (FieldType f, LPCTSTR pszValue);
|
59 |
|
|
virtual ~CPropertiesList();
|
60 |
|
|
void RefreshValue();
|
61 |
|
|
// Generated message map functions
|
62 |
|
|
protected:
|
63 |
|
|
int m_nOnSizeRecursionCount;
|
64 |
|
|
int SetItem (LPCTSTR pszItem,LPCTSTR pszValue,int nInsertAs,int nRepeat=1);
|
65 |
|
|
int m_nMaxValueWidth;
|
66 |
|
|
int SetProperty (LPCTSTR pszValue, CdlProperty prop);
|
67 |
|
|
int m_nFirstProperty;
|
68 |
|
|
int SetItemTextGrow(int nItem, LPCTSTR lpszItem);
|
69 |
|
|
static bool PropertyInConflictsList (CdlProperty property, const std::list<CdlConflict> & conflicts);
|
70 |
|
|
static const LPCTSTR FieldTypeImage[MAXFIELDTYPE];
|
71 |
|
|
CPen m_GrayPen;
|
72 |
|
|
static const std::string CPropertiesList::visible_properties [];
|
73 |
|
|
static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) {
|
74 |
|
|
return ((CPropertiesList*)lParamSort)->CompareFunc(lParam1,lParam2);
|
75 |
|
|
}
|
76 |
|
|
int CompareFunc(LPARAM lParam1, LPARAM lParam2);
|
77 |
|
|
CConfigItem *m_pti;
|
78 |
|
|
double m_fWidth;
|
79 |
|
|
enum {NCOLS=2};
|
80 |
|
|
double m_f[NCOLS]; // relative proportions of columns
|
81 |
|
|
LPARAM m_nLastCol;
|
82 |
|
|
//{{AFX_MSG(CPropertiesList)
|
83 |
|
|
afx_msg void OnTrack(NMHEADER *pNMHeader, LRESULT* pResult) ;
|
84 |
|
|
afx_msg void OnEndTrack(NMHEADER *pNMHeader, LRESULT* pResult) ;
|
85 |
|
|
afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
|
86 |
|
|
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
87 |
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
88 |
|
|
afx_msg void OnPaint();
|
89 |
|
|
//}}AFX_MSG
|
90 |
|
|
|
91 |
|
|
DECLARE_MESSAGE_MAP()
|
92 |
|
|
};
|
93 |
|
|
|
94 |
|
|
/////////////////////////////////////////////////////////////////////////////
|
95 |
|
|
|
96 |
|
|
//{{AFX_INSERT_LOCATION}}
|
97 |
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
98 |
|
|
|
99 |
|
|
#endif // !defined(AFX_RULESLIST_H__AEF48733_8D31_11D3_A535_00A0C949ADAC__INCLUDED_)
|