1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
25 #if !defined(AFX_FAILINGRULESDIALOG_H__E264B972_8875_11D2_BF54_00A0C949ADAC__INCLUDED_)
26 #define AFX_FAILINGRULESDIALOG_H__E264B972_8875_11D2_BF54_00A0C949ADAC__INCLUDED_
30 #endif // _MSC_VER >= 1000
31 // FailingRulesDialog.h : header file
35 #include "RulesList.h"
36 #include "eCosDialog.h"
37 #include "TTListCtrl.h"
39 /////////////////////////////////////////////////////////////////////////////
40 // CFailingRulesDialog dialog
42 class CdlConflictBody;
43 class CdlTransactionBody;
44 class CFailingRulesDialog : public CeCosDialog
48 CFailingRulesDialog (std::list<CdlConflict> conflicts,CdlTransaction=NULL,CPtrArray *parConflictsOfInterest=NULL);
49 virtual ~CFailingRulesDialog();
50 bool IsSelected (int nIndex);
52 //{{AFX_DATA(CFailingRulesDialog)
53 enum { IDD = IDD_RESOLVE_CONFLICTS_DIALOG };
55 CRulesList m_RulesList;
60 // ClassWizard generated virtual function overrides
61 //{{AFX_VIRTUAL(CFailingRulesDialog)
64 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
72 enum {CHECKED=-1,UNCHECKED=-2};
73 int arItem[1]; // real size==nCount.
74 // Each element of nItem==item index (if selected) or accept bool (if not)
76 SolutionInfo & Info (const CdlConflict conflict);
78 void SetAll (bool bOnOff);
79 CMapPtrToPtr m_Map; // maps conficts to bool array representing fixes
80 void AddConflictSolutions (CdlConflict conflict);
81 void RemoveConflictSolutions (CdlConflict conflict);
82 CStringArray m_arValues;
83 const std::list<CdlConflict> m_conflicts;
84 CdlTransactionBody *m_Transaction;
85 CPtrArray *m_parConflictsOfInterest;
89 BOOL OnNotify( WPARAM wParam, LPARAM lParam, LRESULT* pResult );
91 // Generated message map functions
92 //{{AFX_MSG(CFailingRulesDialog)
93 virtual BOOL OnInitDialog();
95 virtual void OnCancel();
96 afx_msg void OnReset();
97 afx_msg BOOL OnItemChanged(UINT, LPNMLISTVIEW pnmv, LRESULT* pResult);
98 afx_msg BOOL OnClick(UINT,LPNMLISTVIEW pnmv, LRESULT* pResult);
99 afx_msg BOOL OnSolutionItemChanged(UINT,LPNMLISTVIEW pnmv, LRESULT* pResult);
100 afx_msg void OnConflictsNone();
101 afx_msg BOOL OnRClick(UINT,LPNMITEMACTIVATE pnmv, LRESULT* pResult);
103 DECLARE_MESSAGE_MAP()
106 //{{AFX_INSERT_LOCATION}}
107 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
109 #endif // !defined(AFX_FAILINGRULESDIALOG_H__E264B972_8875_11D2_BF54_00A0C949ADAC__INCLUDED_)