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
33 // Version: $Id: conflictwin.h,v 1.2 2001/04/06 15:29:40 julians Exp $
35 // Description: Header file for ecConflictListCtrl
42 //####DESCRIPTIONEND####
44 //===========================================================================
46 #ifndef _ECOS_CONFLICTWIN_H_
47 #define _ECOS_CONFLICTWIN_H_
50 #pragma interface "conflictwin.h"
53 #include "wx/listctrl.h"
60 * Displays conflicts. Equivalent to original configtool's CRulesList class.
63 class ecConflictListCtrl : public wxListCtrl
67 ecConflictListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
68 ~ecConflictListCtrl();
69 bool IsSelected (int nIndex);
72 void OnRightClick(wxMouseEvent& event);
73 void OnLocate(wxCommandEvent& event);
74 void OnResolve(wxCommandEvent& event);
75 void OnLeftDClick(wxMouseEvent& event);
78 void AddConflict (const CdlConflict& conflict);
79 void AddConflicts (const std::list<CdlConflict>& conflicts);
80 void AddConflicts (const std::vector<CdlConflict>& conflicts);
81 ecConfigItem *AssociatedItem (int nRow,int nCol);
84 wxMenu* GetContextMenu() const { return m_contextMenu; }
88 wxMenu* m_contextMenu;
89 long m_contextItem; // Item right-clicked over
90 long m_contextCol; // Column clicked over
93 DECLARE_CLASS(ecConflictListCtrl)
98 // _ECOS_CONFLICTWIN_H_