]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - tools/src/tools/configtool/standalone/wxwin/conflictwin.h
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / tools / src / tools / configtool / standalone / wxwin / conflictwin.h
1 //####COPYRIGHTBEGIN####
2 //
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5 //
6 // This program is part of the eCos host tools.
7 //
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)
11 // any later version.
12 //
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
16 // more details.
17 //
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.
21 //
22 // ----------------------------------------------------------------------------
23 //
24 //####COPYRIGHTEND####
25 // propertywin.h :
26 //
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
29 //
30 // Author(s):   julians
31 // Contact(s):  julians
32 // Date:        2000/09/04
33 // Version:     $Id$
34 // Purpose:
35 // Description: Header file for ecConflictListCtrl
36 // Requires:
37 // Provides:
38 // See also:
39 // Known bugs:
40 // Usage:
41 //
42 //####DESCRIPTIONEND####
43 //
44 //===========================================================================
45
46 #ifndef _ECOS_CONFLICTWIN_H_
47 #define _ECOS_CONFLICTWIN_H_
48
49 #ifdef __GNUG__
50 #pragma interface "conflictwin.h"
51 #endif
52
53 #include "wx/listctrl.h"
54
55 class ecConfigItem;
56
57 /*
58  * ecConflictListCtrl
59  *
60  * Displays conflicts. Equivalent to original configtool's CRulesList class.
61  */
62
63 class ecConflictListCtrl : public wxListCtrl
64 {
65 public:
66 // Ctor(s)
67     ecConflictListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
68     ~ecConflictListCtrl();
69     bool IsSelected (int nIndex);
70
71 //// Event handlers
72     void OnRightClick(wxMouseEvent& event);
73     void OnLocate(wxCommandEvent& event);
74     void OnResolve(wxCommandEvent& event);
75     void OnLeftDClick(wxMouseEvent& event);
76
77 //// Operations
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);
82     void FillRules();
83
84     wxMenu* GetContextMenu() const { return m_contextMenu; }
85
86 protected:
87 private:
88     wxMenu* m_contextMenu;
89     long    m_contextItem; // Item right-clicked over
90     long    m_contextCol;  // Column clicked over
91
92     DECLARE_EVENT_TABLE()
93     DECLARE_CLASS(ecConflictListCtrl)
94 };
95
96
97 #endif
98         // _ECOS_CONFLICTWIN_H_