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####
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
31 // Contact(s): julians
35 // Description: Header file for ecResolveConflictsDialog
42 //####DESCRIPTIONEND####
44 //===========================================================================
46 #ifndef _ECOS_CONFLICTSDLG_H_
47 #define _ECOS_CONFLICTSDLG_H_
50 #pragma interface "conflictsdlg.h"
54 #include "wx/listctrl.h"
58 // Forward declarations
59 class ecConflictListCtrl;
60 class ecSolutionListCtrl;
62 class ecResolveConflictsDialog : public ecDialog
66 ecResolveConflictsDialog(wxWindow* parent, std::list<CdlConflict> conflicts, CdlTransaction=NULL, wxList *parConflictsOfInterest=NULL);
67 ~ecResolveConflictsDialog();
71 void OnContinue(wxCommandEvent& event);
72 void OnAll(wxCommandEvent& event);
73 void OnNone(wxCommandEvent& event);
74 void OnInitDialog(wxInitDialogEvent& event);
75 void OnUpdateAll(wxUpdateUIEvent& event);
76 void OnUpdateNone(wxUpdateUIEvent& event);
77 void OnConflictSelected(wxListEvent& event) ;
78 void OnConflictDeselected(wxListEvent& event) ;
81 void CreateControls(wxWindow* parent);
86 enum {CHECKED=-1,UNCHECKED=-2};
87 int arItem[1]; // real size==nCount.
88 // Each element of nItem==item index (if selected) or accept bool (if not)
92 void AddConflictSolutions (CdlConflict conflict);
93 void RemoveConflictSolutions (CdlConflict conflict);
95 SolutionInfo & Info (const CdlConflict conflict);
96 void SetAll (bool bOnOff);
101 wxHashTable m_Map; // maps conflicts to bool array representing fixes
102 wxArrayString m_arValues;
103 const std::list<CdlConflict> m_conflicts;
104 CdlTransactionBody* m_Transaction;
105 wxList* m_parConflictsOfInterest;
110 ecConflictListCtrl* m_conflictsCtrl;
111 ecSolutionListCtrl* m_solutionsCtrl;
114 DECLARE_EVENT_TABLE()
117 #define ecID_RESOLVE_CONFLICTS_DIALOG 2031
118 #define ecID_CONFLICTS_CONTINUE 3000
119 #define ecID_CONFLICTS_CONFLICTS 3005
120 #define ecID_CONFLICTS_NONE 3001
121 #define ecID_CONFLICTS_ALL 3002
122 #define ecID_CONFLICTS_SOLUTIONS 3004
123 #define ecID_CONFLICTS_MSG 3005
127 // _ECOS_CONFLICTSDLG_H_